@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/README.md +67 -0
- package/dist/index.js +893 -875
- package/dist/notify-app-ready-worker.js +137 -137
- package/dist/onboarding-worker.js +297 -297
- package/dist/package.json +4 -4
- package/dist/src/analytics/track.d.ts +1 -0
- package/dist/src/app/info.d.ts +3 -0
- package/dist/src/init/command.d.ts +1 -0
- package/dist/src/init/mcp/engine.d.ts +3 -0
- package/dist/src/init/mcp/explanations.d.ts +1 -0
- package/dist/src/init/mcp/live-update-tools.d.ts +2 -0
- package/dist/src/init/upload-recovery.d.ts +2 -2
- package/dist/src/mcp/project-dir.d.ts +10 -6
- package/dist/src/mcp/tool-schemas.d.ts +2 -0
- package/dist/src/run/ios-compatibility.d.ts +19 -0
- package/dist/src/sdk.js +350 -349
- package/dist/src/simulator/session.d.ts +41 -0
- package/dist/src/utils.d.ts +1 -0
- package/dist/updater-installed-worker.js +108 -108
- package/package.json +4 -4
- package/skills/native-builds/SKILL.md +33 -1
- package/skills/release-management/SKILL.md +1 -1
- package/skills/usage/SKILL.md +5 -2
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "8.99.
|
|
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;
|
package/dist/src/app/info.d.ts
CHANGED
|
@@ -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 {};
|
|
@@ -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,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 = "
|
|
2
|
-
export declare const MONOREPO_UPLOAD_RETRY_HINT = "If this app lives in a monorepo,
|
|
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
|
|
18
|
-
*
|
|
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
|
-
|
|
24
|
-
|
|
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 {};
|