@capgo/cli 8.92.2 → 8.93.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +718 -711
- package/dist/notify-app-ready-worker.js +1 -1
- package/dist/onboarding-worker.js +280 -273
- package/dist/package.json +5 -2
- package/dist/src/api/preflight.d.ts +2 -2
- package/dist/src/init/command-execution.d.ts +4 -0
- package/dist/src/init/command.d.ts +1 -1
- package/dist/src/onboarding/background-shutdown.d.ts +1 -1
- package/dist/src/onboarding/github-notice.d.ts +1 -0
- package/dist/src/onboarding/setup-notice-policy.d.ts +10 -1
- package/dist/src/sdk.js +327 -320
- package/dist/updater-installed-worker.js +1 -1
- package/package.json +5 -2
- package/skills/usage/SKILL.md +7 -5
- package/dist/src/bundle/finalize-upload.d.ts +0 -26
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.
|
|
4
|
+
"version": "8.93.0",
|
|
5
5
|
"description": "A CLI to upload to capgo servers",
|
|
6
6
|
"author": "Martin martin@capgo.app",
|
|
7
7
|
"license": "Apache 2.0",
|
|
@@ -136,6 +136,7 @@
|
|
|
136
136
|
"test:channel-add-exists": "bun test/test-channel-add-exists.mjs",
|
|
137
137
|
"test:wait-log": "bun test/test-wait-log.mjs",
|
|
138
138
|
"test:init-guardrails": "bun test/test-init-guardrails.mjs",
|
|
139
|
+
"test:init-command-execution": "bun test/test-init-command-execution.mjs",
|
|
139
140
|
"test:init-upload-recovery": "bun test/test-init-upload-monorepo-recovery.mjs",
|
|
140
141
|
"test:init-replay": "bun test/test-init-replay.mjs",
|
|
141
142
|
"test:init-telemetry": "bun test/test-init-telemetry.mjs",
|
|
@@ -196,7 +197,7 @@
|
|
|
196
197
|
"test": "bun run build && bun scripts/run-test-suite.ts",
|
|
197
198
|
"test:run": "bun scripts/run-test-suite.ts",
|
|
198
199
|
"test:serial": "bun run build && bun scripts/run-test-suite.ts --serial",
|
|
199
|
-
"test:suite": "bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:notify-app-ready-background && bun run test:bundle-validation && bun run test:functional && bun run test:semver && bun run test:auto-bump-version && bun run test:auto-bump-ai-diff && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:cordova-upload-mode && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:package-json-guard && bun run test:credentials && bun run test:credentials-export && bun run test:ios-provisioning-map && bun run test:ios-provisioning-command && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:cli-help && bun run test:build-cache-payload && bun run test:build-cancellation && bun run test:ci-prompts && bun run test: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-live-update-onboarding && bun run test:mcp-stdout-guard && 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: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-upload-recovery && bun run test:init-replay && bun run test:init-telemetry && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:mcp-no-key-handshake && bun run test:auth-session && bun run test:version-detection && bun run test:platform-paths && bun run test:project-type-detection && bun run test:payload-split && bun run test: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: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",
|
|
200
|
+
"test:suite": "bun run test:helper-dce && bun run test:version-detection:setup && bun run test:bundle && bun run test:notify-app-ready-background && bun run test:bundle-validation && bun run test:functional && bun run test:semver && bun run test:auto-bump-version && bun run test:auto-bump-ai-diff && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:cordova-upload-mode && bun run test:fail-on-incompatible && bun run test:native-dependencies && bun run test:package-json-guard && bun run test:credentials && bun run test:credentials-export && bun run test:ios-provisioning-map && bun run test:ios-provisioning-command && bun run test:credentials-validation && bun run test:android-service-account-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:build-needed && bun run test:cli-help && bun run test:build-cache-payload && bun run test:build-cancellation && bun run test:ci-prompts && bun run test: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-live-update-onboarding && bun run test:mcp-stdout-guard && 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: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: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: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",
|
|
200
201
|
"test:build-platform-selection": "bun test/test-build-platform-selection.mjs",
|
|
201
202
|
"test:builder-project-discovery": "bun test/test-builder-project-discovery.mjs",
|
|
202
203
|
"test:builder-app-selection": "bun test/test-builder-app-selection.mjs",
|
|
@@ -290,6 +291,7 @@
|
|
|
290
291
|
"@std/semver": "npm:@jsr/std__semver@1.0.8",
|
|
291
292
|
"@tanstack/intent": "^0.3.6",
|
|
292
293
|
"@types/adm-zip": "^0.5.8",
|
|
294
|
+
"@types/cross-spawn": "^6.0.6",
|
|
293
295
|
"@types/jsonwebtoken": "^9.0.10",
|
|
294
296
|
"@types/node": "^26.1.1",
|
|
295
297
|
"@types/node-forge": "^1.3.14",
|
|
@@ -305,6 +307,7 @@
|
|
|
305
307
|
"adm-zip": "^0.6.0",
|
|
306
308
|
"ci-info": "^4.4.0",
|
|
307
309
|
"commander": "^15.0.0",
|
|
310
|
+
"cross-spawn": "^7.0.6",
|
|
308
311
|
"eslint": "^10.7.0",
|
|
309
312
|
"git-format-staged": "4.0.2",
|
|
310
313
|
"husky": "^9.1.7",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { NoticeOutputOptions } from '../onboarding/setup-notice-policy';
|
|
1
2
|
import type { CapgoClient } from '../utils';
|
|
2
3
|
/** What a command needs checked before it acts. The backend owns every rule. */
|
|
3
4
|
export interface CliPreflightRequest {
|
|
@@ -23,8 +24,7 @@ export interface CliPreflightResult {
|
|
|
23
24
|
fatal: boolean;
|
|
24
25
|
}>;
|
|
25
26
|
}
|
|
26
|
-
export interface CliPreflightOptions {
|
|
27
|
-
silent?: boolean;
|
|
27
|
+
export interface CliPreflightOptions extends NoticeOutputOptions {
|
|
28
28
|
/** Print the unpaid-trial reminder (default true). */
|
|
29
29
|
warnTrial?: boolean;
|
|
30
30
|
/** Message for `app_not_found`; defaults to the `app add` hint. */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { PackageManagerRunner, PackageManagerType } from '@capgo/find-package-manager';
|
|
2
2
|
import type { ChildProcess } from 'node:child_process';
|
|
3
3
|
import { findInstallCommand } from '@capgo/find-package-manager';
|
|
4
|
+
import { spawn as spawnProcess, sync as spawnProcessSync } from 'cross-spawn';
|
|
4
5
|
export type SupportedPackageManager = Exclude<PackageManagerType, 'unknown'>;
|
|
5
6
|
export interface PackageManagerInfo {
|
|
6
7
|
pm: SupportedPackageManager;
|
|
@@ -24,6 +25,9 @@ export interface CommandResult {
|
|
|
24
25
|
success: boolean;
|
|
25
26
|
error?: Error;
|
|
26
27
|
}
|
|
28
|
+
export declare function assertNoWindowsCommandLineBreaks(command: string, args?: readonly string[]): void;
|
|
29
|
+
export declare const spawnCommand: typeof spawnProcess;
|
|
30
|
+
export declare const spawnCommandSync: typeof spawnProcessSync;
|
|
27
31
|
export declare function createMissingExecutableError(command: string, executablePath?: string): NodeJS.ErrnoException;
|
|
28
32
|
export declare function preparePackageManagerCommandEnvironment(environment?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
|
|
29
33
|
export declare function probeExecutable(command: string, options?: ExecutableProbeOptions): ExecutableProbeResult;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Options } from '../api/app';
|
|
2
2
|
import type { Organization } from '../utils';
|
|
3
|
-
import { spawnSync } from 'node:child_process';
|
|
4
3
|
import { getConfig, getPMAndCommand } from '../utils';
|
|
4
|
+
import { spawnCommandSync as spawnSync } from './command-execution';
|
|
5
5
|
interface SuperOptions extends Options {
|
|
6
6
|
analytics?: boolean;
|
|
7
7
|
capacitorConfig?: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { Command } from 'commander';
|
|
2
|
-
export declare function waitForOnboardingChecks(command: Pick<Command, 'optsWithGlobals'>, commandPath: string): Promise<void>;
|
|
2
|
+
export declare function waitForOnboardingChecks(command: Pick<Command, 'optsWithGlobals'>, commandPath: string, started?: number): Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function renderGitHubNotice(text: string): boolean;
|
|
@@ -1,3 +1,12 @@
|
|
|
1
1
|
export declare const ONBOARDING_CHECK_GRACE_MS = 5000;
|
|
2
|
-
export
|
|
2
|
+
export interface NoticeOutputOptions {
|
|
3
|
+
json?: boolean;
|
|
4
|
+
outputText?: boolean;
|
|
5
|
+
quiet?: boolean;
|
|
6
|
+
silent?: boolean;
|
|
7
|
+
format?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function setNoticeOutputOptions(options: NoticeOutputOptions): void;
|
|
10
|
+
export declare function shouldPrintNotice(options: NoticeOutputOptions): boolean;
|
|
11
|
+
export declare function shouldEvaluateSetupNotice(command: string, options: Record<string, unknown>): boolean;
|
|
3
12
|
export declare function shouldRefreshSetupProgress(command: string): boolean;
|