@capgo/cli 8.99.0 → 8.99.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
3
  "type": "module",
4
- "version": "8.99.0",
4
+ "version": "8.99.3",
5
5
  "description": "A CLI to upload to capgo servers",
6
6
  "author": "Martin martin@capgo.app",
7
7
  "license": "Apache 2.0",
@@ -107,11 +107,11 @@
107
107
  "test:preview-qr": "bun test/test-preview-qr.mjs",
108
108
  "test:bundle-pages": "bun test test/test-bundle-pages.test.ts",
109
109
  "test:bundle-single-requests": "bun test test/test-bundle-single-requests.test.ts",
110
- "test:mcp-analytics": "bun test/test-mcp-analytics.mjs",
110
+ "test:mcp-analytics": "bun test/test-mcp-analytics.mjs && bun test/test-mcp-telemetry-project.mjs",
111
111
  "test:mcp-instructions": "bun test/test-mcp-instructions.mjs",
112
112
  "test:mcp-error-guidance": "bun test/test-mcp-error-guidance.mjs",
113
113
  "test:mcp-stdout-guard": "bun test/test-mcp-stdout-guard.mjs",
114
- "test:mcp-project-dir": "bun test/test-mcp-project-dir.mjs",
114
+ "test:mcp-project-dir": "bun test/test-mcp-project-dir.mjs && bun test/test-cwd.mjs && bun test/test-project-context.mjs",
115
115
  "test:mcp-host-fields": "bun test/test-mcp-host-fields.mjs",
116
116
  "test:mcp-platform-select": "bun test/test-mcp-platform-select.mjs",
117
117
  "test:mcp-explain-scopes": "bun test/test-mcp-explain-scopes.mjs",
@@ -135,7 +135,7 @@
135
135
  "test:no-redirect-error": "bun test/test-no-redirect-error.mjs",
136
136
  "test:onboarding-recovery": "bun test/test-onboarding-recovery.mjs",
137
137
  "test:onboarding-progress": "bun test/test-onboarding-progress.mjs",
138
- "test:onboarding-run-targets": "bun test/test-onboarding-run-targets.mjs",
138
+ "test:onboarding-run-targets": "bun test/test-onboarding-run-targets.mjs && bun test ./test/test-ios-simulator-compatibility.mjs",
139
139
  "test:run-device-command": "bun test/test-run-device-command.mjs",
140
140
  "test:init-app-conflict": "bun test/test-init-app-conflict.mjs",
141
141
  "test:channel-add-exists": "bun test/test-channel-add-exists.mjs",
@@ -5,6 +5,7 @@ export declare function isBuilderInvocation(commandPath: string): boolean;
5
5
  export declare function resolveTrackingContext(apikey: string, signal?: AbortSignal, builder?: boolean): Promise<{
6
6
  appId?: string;
7
7
  orgId?: string;
8
+ apiHost?: string;
8
9
  }>;
9
10
  export interface TrackEventInput {
10
11
  channel: string;
@@ -1,3 +1,4 @@
1
+ import type { IosSimulatorCompatibility } from '../run/ios-compatibility';
1
2
  import { getPMAndCommand } from '../utils';
2
3
  export declare const OUTDATED_DEPENDENCIES_ERROR = "Some dependencies are not up to date";
3
4
  export interface OutdatedDependency {
@@ -49,6 +50,7 @@ export declare function getInfoInternal(options: DoctorInfoOptions, silent?: boo
49
50
  webDir: string;
50
51
  installedDependencies: Record<string, string>;
51
52
  latestDependencies: Record<string, string>;
53
+ iosSimulatorCompatibility: IosSimulatorCompatibility;
52
54
  }>;
53
55
  export declare function getInfo(options: DoctorInfoOptions): Promise<{
54
56
  appName: string;
@@ -57,5 +59,6 @@ export declare function getInfo(options: DoctorInfoOptions): Promise<{
57
59
  webDir: string;
58
60
  installedDependencies: Record<string, string>;
59
61
  latestDependencies: Record<string, string>;
62
+ iosSimulatorCompatibility: IosSimulatorCompatibility;
60
63
  }>;
61
64
  export {};
@@ -89,6 +89,7 @@ export type RunDeviceStepOutcome = {
89
89
  } | {
90
90
  args: undefined;
91
91
  command: string;
92
+ manualInstructions?: string;
92
93
  };
93
94
  export interface CapacitorRunTarget {
94
95
  name: string;
@@ -1,6 +1,7 @@
1
1
  import type { LiveUpdateNextStepInput } from '../../schemas/live-update-onboarding.js';
2
2
  import type { NextStepResult, Platform } from './contract.js';
3
3
  import type { LiveUpdateProgress } from './progress.js';
4
+ import type { IosSimulatorCompatibility } from '../../run/ios-compatibility.js';
4
5
  export interface GitRepoStatus {
5
6
  inRepo: boolean;
6
7
  clean: boolean;
@@ -61,6 +62,8 @@ export interface EngineDeps {
61
62
  getRunDeviceCommand: (platform: Platform) => {
62
63
  command: string;
63
64
  cwd?: string;
65
+ manualInstructions?: string;
66
+ iosSimulatorCompatibility?: IosSimulatorCompatibility;
64
67
  };
65
68
  getGitStatus: (cwd?: string) => GitRepoStatus;
66
69
  reportOnboardingStep?: (appId: string, stepDone: number) => void;
@@ -1 +1,2 @@
1
+ export declare const BUNDLE_ENCRYPTION_GUIDANCE: string;
1
2
  export declare function explainForState(state: string): string;
@@ -1,6 +1,7 @@
1
1
  import type { CapgoSDK } from '../../sdk.js';
2
2
  import type { LiveUpdateStartInput } from '../../schemas/live-update-onboarding.js';
3
3
  import type { McpRegistrar } from '../../mcp/registrar.js';
4
+ import type { Platform } from './contract.js';
4
5
  import type { EngineDeps } from './engine.js';
5
6
  export interface LiveUpdateProjectTarget {
6
7
  packageJsonPath?: string;
@@ -8,6 +9,7 @@ export interface LiveUpdateProjectTarget {
8
9
  }
9
10
  type LiveUpdateProjectTargetInput = Pick<LiveUpdateStartInput, 'packageJson' | 'mainFile'>;
10
11
  export declare function resolveLiveUpdateProjectTarget(input: LiveUpdateProjectTargetInput, initialCwd?: string): LiveUpdateProjectTarget;
12
+ export declare function getRunDeviceCommandForPlatform(platform: Platform, projectDir: string, initialCwd: string): ReturnType<EngineDeps['getRunDeviceCommand']>;
11
13
  export declare function buildDeps(sdkOrGetter: CapgoSDK | (() => CapgoSDK), cwd?: string, getProjectTarget?: () => LiveUpdateProjectTarget | undefined): EngineDeps;
12
14
  export declare function registerLiveUpdateTools(server: McpRegistrar, sdk: CapgoSDK | (() => CapgoSDK), depsOverride?: EngineDeps): void;
13
15
  export {};
@@ -1,5 +1,5 @@
1
- export declare const MONOREPO_ROOT_PATHS_NOTE = "These must be the monorepo/workspace root paths \u2014 the workspace package.json and the hoisted node_modules folder \u2014 not the app package under apps/ or packages/.";
2
- export declare const MONOREPO_UPLOAD_RETRY_HINT = "If this app lives in a monorepo, retry the upload with the monorepo root package.json and the monorepo root node_modules paths (not the app package folder).";
1
+ export declare const MONOREPO_ROOT_PATHS_NOTE = "Use the Capacitor app package.json, not the workspace manifest. Dependencies resolve from app-local and hoisted node_modules automatically; provide explicit paths only to override discovery.";
2
+ export declare const MONOREPO_UPLOAD_RETRY_HINT = "If this app lives in a monorepo, verify the selected app directory and its package.json before installing dependencies. Hoisted node_modules are discovered automatically.";
3
3
  export type BundleUploadRecoveryChoice = 'retry' | 'retry-with-monorepo-paths';
4
4
  export declare function getBundleUploadFailureRecoveryOptions(): {
5
5
  value: BundleUploadRecoveryChoice;
@@ -14,14 +14,18 @@ export declare function rootsToDirectories(roots: McpRoot[]): string[];
14
14
  /**
15
15
  * Pick the project directory from the client's roots. Keeps `currentDir` when it is
16
16
  * already a Capacitor project inside one of the roots (e.g. a project-scoped install
17
- * launched from a sub-app of a monorepo); otherwise prefers the first root holding a
18
- * Capacitor config, then the first root. Returns undefined when no usable root exists.
17
+ * launched from a sub-app of a monorepo); otherwise resolves a unique Capacitor app
18
+ * across the roots and their workspaces, falling back to the first root without an app.
19
+ * Returns undefined when no usable root exists. Multiple apps require explicit selection.
19
20
  */
20
- export declare function pickProjectDirFromRoots(roots: McpRoot[], currentDir?: string): string | undefined;
21
+ export declare function pickProjectDirFromRoots(roots: McpRoot[], currentDir?: string): Promise<string | undefined>;
21
22
  /** Resolve a user/agent-supplied project path (absolute, `~`, or relative to the current dir). */
22
- export declare function resolveProjectDirInput(input: string, currentDir?: string): string;
23
- /** Switch the server's working directory. Returns true when it actually changed. */
24
- export declare function switchProjectDir(dir: string): boolean;
23
+ export declare function resolveProjectDirInput(input: string, currentDir?: string): Promise<string>;
24
+ export declare function resolveProjectDirOptions(input: {
25
+ projectDir?: string;
26
+ cwd?: string;
27
+ }, currentDir: string): Promise<string | undefined>;
28
+ export declare function createProjectDirQueue(): <T>(run: () => Promise<T>) => Promise<T>;
25
29
  export declare function describeProjectDir(dir?: string): string;
26
30
  /**
27
31
  * Memoize a factory per working directory, so long-lived tool dependencies built from
@@ -212,6 +212,8 @@ export declare const mcpSearchDocsInputSchema: z.ZodObject<{
212
212
  export declare const mcpSetProjectDirInputSchema: z.ZodObject<{
213
213
  path: z.ZodString;
214
214
  }, z.core.$strip>;
215
+ export declare const mcpProjectDirOptionSchema: z.ZodOptional<z.ZodString>;
216
+ export declare const mcpCwdOptionSchema: z.ZodOptional<z.ZodString>;
215
217
  export declare const mcpDoctorInputSchema: z.ZodObject<{
216
218
  packageJson: z.ZodOptional<z.ZodString>;
217
219
  }, z.core.$strip>;
@@ -0,0 +1,19 @@
1
+ export declare const IOS_SIMULATOR_ISSUE_URL = "https://github.com/ionic-team/capacitor/issues/8620";
2
+ export declare const LAST_UNSUPPORTED_NATIVE_RUN_VERSION = "2.0.3";
3
+ interface IosSimulatorVersions {
4
+ capacitorCliVersion: string | null;
5
+ nativeRunVersion: string | null;
6
+ }
7
+ export type IosSimulatorCompatibility = {
8
+ kind: 'unaffected';
9
+ } | ({
10
+ kind: 'supported' | 'unsupported' | 'unknown';
11
+ } & IosSimulatorVersions);
12
+ export declare function checkIosSimulatorCompatibility(projectDir: string, { hostPlatform, developerDir }?: {
13
+ hostPlatform?: NodeJS.Platform;
14
+ developerDir?: string;
15
+ }): IosSimulatorCompatibility;
16
+ export declare function formatIosSimulatorGuidance(compatibility: Exclude<IosSimulatorCompatibility, {
17
+ kind: 'unaffected';
18
+ }>): string;
19
+ export {};