@capgo/cli 8.0.0-alpha.5 → 8.0.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/README.md +733 -84
- package/dist/index.js +1132 -317
- package/dist/keychain-export.swift +351 -0
- package/dist/package.json +120 -30
- package/dist/src/ai/analyze.d.ts +48 -0
- package/dist/src/ai/log-capture.d.ts +14 -0
- package/dist/src/ai/prompt.d.ts +1 -0
- package/dist/src/ai/render-markdown.d.ts +12 -0
- package/dist/src/ai/sse.d.ts +5 -0
- package/dist/src/ai/stream-markdown.d.ts +22 -0
- package/dist/src/ai/telemetry.d.ts +39 -0
- package/dist/src/analytics/error-category.d.ts +11 -0
- package/dist/src/analytics/org-resolver.d.ts +11 -0
- package/dist/src/analytics/supabase-perf.d.ts +48 -0
- package/dist/src/analytics/track.d.ts +70 -0
- package/dist/src/api/app.d.ts +17 -8
- package/dist/src/api/channels.d.ts +2442 -2729
- package/dist/src/api/crypto.d.ts +26 -0
- package/dist/src/api/update.d.ts +7 -1
- package/dist/src/api/versions.d.ts +9 -2
- package/dist/src/app/add.d.ts +6 -4
- package/dist/src/app/debug.d.ts +3 -7
- package/dist/src/app/delete.d.ts +1 -2
- package/dist/src/app/info.d.ts +5 -1
- package/dist/src/app/list.d.ts +23 -2
- package/dist/src/app/set.d.ts +0 -1
- package/dist/src/app/setting.d.ts +3 -9
- package/dist/src/app/updateProbe.d.ts +43 -0
- package/dist/src/build/credentials-command.d.ts +89 -0
- package/dist/src/build/credentials-manage.d.ts +7 -0
- package/dist/src/build/credentials.d.ts +78 -0
- package/dist/src/build/env-render.d.ts +8 -0
- package/dist/src/build/last-output-command.d.ts +6 -0
- package/dist/src/build/mobileprovision-parser.d.ts +35 -0
- package/dist/src/build/needed.d.ts +28 -0
- package/dist/src/build/onboarding/ai-fit.d.ts +110 -0
- package/dist/src/build/onboarding/analytics.d.ts +23 -0
- package/dist/src/build/onboarding/android/gcp-api.d.ts +128 -0
- package/dist/src/build/onboarding/android/gradle-parser.d.ts +19 -0
- package/dist/src/build/onboarding/android/keystore.d.ts +77 -0
- package/dist/src/build/onboarding/android/oauth-config.d.ts +24 -0
- package/dist/src/build/onboarding/android/oauth-google.d.ts +134 -0
- package/dist/src/build/onboarding/android/play-api.d.ts +91 -0
- package/dist/src/build/onboarding/android/progress.d.ts +22 -0
- package/dist/src/build/onboarding/android/service-account-validation.d.ts +58 -0
- package/dist/src/build/onboarding/android/types.d.ts +72 -0
- package/dist/src/build/onboarding/android/ui/app.d.ts +17 -0
- package/dist/src/build/onboarding/app-verification.d.ts +86 -0
- package/dist/src/build/onboarding/apple-api.d.ts +234 -0
- package/dist/src/build/onboarding/build-log.d.ts +10 -0
- package/dist/src/build/onboarding/bundle-id-detector.d.ts +117 -0
- package/dist/src/build/onboarding/ci-secrets.d.ts +87 -0
- package/dist/src/build/onboarding/command.d.ts +6 -0
- package/dist/src/build/onboarding/csr.d.ts +33 -0
- package/dist/src/build/onboarding/diff-utils.d.ts +24 -0
- package/dist/src/build/onboarding/env-export.d.ts +46 -0
- package/dist/src/build/onboarding/error-categories.d.ts +13 -0
- package/dist/src/build/onboarding/file-picker.d.ts +47 -0
- package/dist/src/build/onboarding/macos-signing.d.ts +190 -0
- package/dist/src/build/onboarding/min-terminal-size.d.ts +16 -0
- package/dist/src/build/onboarding/progress.d.ts +51 -0
- package/dist/src/build/onboarding/recovery.d.ts +7 -0
- package/dist/src/build/onboarding/telemetry.d.ts +28 -0
- package/dist/src/build/onboarding/types.d.ts +140 -0
- package/dist/src/build/onboarding/ui/app.d.ts +36 -0
- package/dist/src/build/onboarding/ui/completed-steps-log.d.ts +9 -0
- package/dist/src/build/onboarding/ui/components.d.ts +178 -0
- package/dist/src/build/onboarding/ui/frame-fit.d.ts +10 -0
- package/dist/src/build/onboarding/ui/min-size-gate.d.ts +20 -0
- package/dist/src/build/onboarding/ui/platform-picker.d.ts +19 -0
- package/dist/src/build/onboarding/ui/shell.d.ts +33 -0
- package/dist/src/build/onboarding/ui/steps/android-ci.d.ts +45 -0
- package/dist/src/build/onboarding/ui/steps/android-keystore.d.ts +75 -0
- package/dist/src/build/onboarding/ui/steps/android-sa-gcp.d.ts +85 -0
- package/dist/src/build/onboarding/ui/steps/android-shared.d.ts +67 -0
- package/dist/src/build/onboarding/ui/steps/ios-ci.d.ts +44 -0
- package/dist/src/build/onboarding/ui/steps/ios-credentials.d.ts +66 -0
- package/dist/src/build/onboarding/ui/steps/ios-import.d.ts +79 -0
- package/dist/src/build/onboarding/ui/steps/ios-shared.d.ts +93 -0
- package/dist/src/build/onboarding/workflow-generator.d.ts +48 -0
- package/dist/src/build/onboarding/workflow-ui-helpers.d.ts +18 -0
- package/dist/src/build/onboarding/workflow-writer.d.ts +36 -0
- package/dist/src/build/output-record.d.ts +30 -0
- package/dist/src/build/pbxproj-parser.d.ts +48 -0
- package/dist/src/build/platform-paths.d.ts +20 -0
- package/dist/src/build/qr.d.ts +5 -0
- package/dist/src/build/request.d.ts +102 -43
- package/dist/src/build/telemetry.d.ts +17 -0
- package/dist/src/bundle/builder-cta.d.ts +67 -0
- package/dist/src/bundle/check.d.ts +0 -1
- package/dist/src/bundle/cleanup.d.ts +3 -12
- package/dist/src/bundle/compatibility.d.ts +23 -12
- package/dist/src/bundle/decrypt.d.ts +4 -0
- package/dist/src/bundle/delete.d.ts +3 -8
- package/dist/src/bundle/encrypt.d.ts +4 -0
- package/dist/src/bundle/list.d.ts +5 -2
- package/dist/src/bundle/partial.d.ts +5 -3
- package/dist/src/bundle/releaseType.d.ts +15 -0
- package/dist/src/bundle/unlink.d.ts +6 -5
- package/dist/src/bundle/upload-command.d.ts +8 -0
- package/dist/src/bundle/upload.d.ts +21 -14
- package/dist/src/bundle/upload_interface.d.ts +2 -50
- package/dist/src/bundle/zip.d.ts +4 -19
- package/dist/src/capacitor-cli.d.ts +13 -0
- package/dist/src/channel/add.d.ts +8 -10
- package/dist/src/channel/currentBundle.d.ts +3 -9
- package/dist/src/channel/delete.d.ts +3 -9
- package/dist/src/channel/list.d.ts +31 -4
- package/dist/src/channel/set.d.ts +2 -17
- package/dist/src/checksum.d.ts +1 -2
- package/dist/src/config/index.d.ts +2 -13
- package/dist/src/docs.d.ts +0 -1
- package/dist/src/github-command.d.ts +9 -0
- package/dist/src/github.d.ts +40 -0
- package/dist/src/index.d.ts +0 -1
- package/dist/src/init/app-conflict.d.ts +2 -0
- package/dist/src/init/command.d.ts +57 -0
- package/dist/src/init/index.d.ts +1 -0
- package/dist/src/init/prompts.d.ts +41 -0
- package/dist/src/init/runtime.d.ts +111 -0
- package/dist/src/init/ui/app.d.ts +9 -0
- package/dist/src/init/ui/components.d.ts +31 -0
- package/dist/src/init/ui.d.ts +12 -0
- package/dist/src/init/updater.d.ts +13 -0
- package/dist/src/key.d.ts +16 -0
- package/dist/src/login.d.ts +0 -1
- package/dist/src/mcp/server.d.ts +5 -0
- package/dist/src/onboarding-support.d.ts +18 -0
- package/dist/src/organization/add.d.ts +26 -0
- package/dist/src/organization/delete.d.ts +3 -0
- package/dist/src/{organisation → organization}/index.d.ts +1 -1
- package/dist/src/{organisation → organization}/list.d.ts +14 -2
- package/dist/src/organization/members.d.ts +12 -0
- package/dist/src/organization/set.d.ts +21 -0
- package/dist/src/posthog.d.ts +13 -0
- package/dist/src/probe.d.ts +20 -0
- package/dist/src/promptPreferences.d.ts +13 -0
- package/dist/src/replicationProgress.d.ts +8 -0
- package/dist/src/run/device.d.ts +5 -0
- package/dist/src/runner-command.d.ts +5 -0
- package/dist/src/schemas/app.d.ts +26 -0
- package/dist/src/schemas/base.d.ts +7 -0
- package/dist/src/schemas/build.d.ts +196 -0
- package/dist/src/schemas/bundle.d.ts +157 -0
- package/dist/src/schemas/channel.d.ts +62 -0
- package/dist/src/schemas/common.d.ts +46 -0
- package/dist/src/schemas/config.d.ts +20 -0
- package/dist/src/schemas/index.d.ts +19 -0
- package/dist/src/schemas/organization.d.ts +41 -0
- package/dist/src/schemas/sdk.d.ts +335 -0
- package/dist/src/schemas/validate.d.ts +12 -0
- package/dist/src/sdk.d.ts +69 -337
- package/dist/src/sdk.js +542 -301
- package/dist/src/terminal-table.d.ts +7 -0
- package/dist/src/types/supabase.types.d.ts +2770 -296
- package/dist/src/updaterConfig.d.ts +8 -0
- package/dist/src/user/account.d.ts +0 -1
- package/dist/src/utils/latest-version.d.ts +0 -1
- package/dist/src/utils/safeWrites.d.ts +21 -0
- package/dist/src/utils/security_policy_errors.d.ts +47 -0
- package/dist/src/utils.d.ts +2869 -341
- package/dist/src/versionHelpers.d.ts +19 -0
- package/package.json +120 -30
- package/skills/native-builds/SKILL.md +255 -0
- package/skills/organization-management/SKILL.md +93 -0
- package/skills/release-management/SKILL.md +225 -0
- package/skills/usage/SKILL.md +92 -0
- package/dist/src/api/app.d.ts.map +0 -1
- package/dist/src/api/channels.d.ts.map +0 -1
- package/dist/src/api/cryptoV2.d.ts +0 -16
- package/dist/src/api/cryptoV2.d.ts.map +0 -1
- package/dist/src/api/update.d.ts.map +0 -1
- package/dist/src/api/versions.d.ts.map +0 -1
- package/dist/src/app/add.d.ts.map +0 -1
- package/dist/src/app/debug.d.ts.map +0 -1
- package/dist/src/app/delete.d.ts.map +0 -1
- package/dist/src/app/info.d.ts.map +0 -1
- package/dist/src/app/list.d.ts.map +0 -1
- package/dist/src/app/set.d.ts.map +0 -1
- package/dist/src/app/setting.d.ts.map +0 -1
- package/dist/src/build/request.d.ts.map +0 -1
- package/dist/src/bundle/check.d.ts.map +0 -1
- package/dist/src/bundle/cleanup.d.ts.map +0 -1
- package/dist/src/bundle/compatibility.d.ts.map +0 -1
- package/dist/src/bundle/decryptV2.d.ts +0 -13
- package/dist/src/bundle/decryptV2.d.ts.map +0 -1
- package/dist/src/bundle/delete.d.ts.map +0 -1
- package/dist/src/bundle/encryptV2.d.ts +0 -14
- package/dist/src/bundle/encryptV2.d.ts.map +0 -1
- package/dist/src/bundle/list.d.ts.map +0 -1
- package/dist/src/bundle/partial.d.ts.map +0 -1
- package/dist/src/bundle/unlink.d.ts.map +0 -1
- package/dist/src/bundle/upload.d.ts.map +0 -1
- package/dist/src/bundle/upload_interface.d.ts.map +0 -1
- package/dist/src/bundle/zip.d.ts.map +0 -1
- package/dist/src/channel/add.d.ts.map +0 -1
- package/dist/src/channel/currentBundle.d.ts.map +0 -1
- package/dist/src/channel/delete.d.ts.map +0 -1
- package/dist/src/channel/list.d.ts.map +0 -1
- package/dist/src/channel/set.d.ts.map +0 -1
- package/dist/src/checksum.d.ts.map +0 -1
- package/dist/src/config/index.d.ts.map +0 -1
- package/dist/src/docs.d.ts.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/init.d.ts +0 -7
- package/dist/src/init.d.ts.map +0 -1
- package/dist/src/keyV2.d.ts +0 -19
- package/dist/src/keyV2.d.ts.map +0 -1
- package/dist/src/login.d.ts.map +0 -1
- package/dist/src/organisation/add.d.ts +0 -19
- package/dist/src/organisation/add.d.ts.map +0 -1
- package/dist/src/organisation/delete.d.ts +0 -8
- package/dist/src/organisation/delete.d.ts.map +0 -1
- package/dist/src/organisation/index.d.ts.map +0 -1
- package/dist/src/organisation/list.d.ts.map +0 -1
- package/dist/src/organisation/set.d.ts +0 -13
- package/dist/src/organisation/set.d.ts.map +0 -1
- package/dist/src/sdk.d.ts.map +0 -1
- package/dist/src/types/supabase.types.d.ts.map +0 -1
- package/dist/src/user/account.d.ts.map +0 -1
- package/dist/src/utils/latest-version.d.ts.map +0 -1
- package/dist/src/utils.d.ts.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type AutoUpdatePolicy = boolean | 'off' | 'atBackground' | 'atInstall' | 'onLaunch' | 'always' | 'onlyDownload';
|
|
2
|
+
type DirectUpdatePolicy = boolean | 'atInstall' | 'always' | 'onLaunch';
|
|
3
|
+
export interface CapacitorUpdaterPluginConfig {
|
|
4
|
+
autoUpdate?: AutoUpdatePolicy;
|
|
5
|
+
directUpdate?: DirectUpdatePolicy;
|
|
6
|
+
}
|
|
7
|
+
export declare function usesAlwaysDirectUpdate(config: CapacitorUpdaterPluginConfig | undefined): boolean;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface WriteOptions {
|
|
2
|
+
mode?: number;
|
|
3
|
+
encoding?: BufferEncoding;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Create (or reuse) a directory and enforce safe permissions.
|
|
7
|
+
*/
|
|
8
|
+
export declare function ensureSecureDirectory(path: string, mode: number): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Append content to a file without following symbolic links.
|
|
11
|
+
*/
|
|
12
|
+
export declare function appendToSafeFile(filePath: string, content: string, mode?: number): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Write content atomically by writing a temp file and renaming.
|
|
15
|
+
*/
|
|
16
|
+
export declare function writeFileAtomic(filePath: string, content: string, options?: WriteOptions): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Read file content while rejecting symbolic-link targets.
|
|
19
|
+
*/
|
|
20
|
+
export declare function readSafeFile(filePath: string): Promise<string>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Security Policy Error Handling for CLI, SDK, and MCP
|
|
3
|
+
*
|
|
4
|
+
* This module provides utilities for parsing and displaying security policy errors
|
|
5
|
+
* returned from the Capgo API. It transforms error codes into human-readable messages.
|
|
6
|
+
*
|
|
7
|
+
* Note: These are the error codes actually returned by the backend API.
|
|
8
|
+
* Other security policies (2FA, password policy, hashed API keys) are enforced
|
|
9
|
+
* via RLS which returns generic permission denied errors.
|
|
10
|
+
*/
|
|
11
|
+
export declare const SECURITY_POLICY_ERRORS: {
|
|
12
|
+
readonly ORG_REQUIRES_EXPIRING_KEY: "org_requires_expiring_key";
|
|
13
|
+
readonly EXPIRATION_REQUIRED: "expiration_required";
|
|
14
|
+
readonly EXPIRATION_EXCEEDS_MAX: "expiration_exceeds_max";
|
|
15
|
+
};
|
|
16
|
+
export type SecurityPolicyErrorCode = typeof SECURITY_POLICY_ERRORS[keyof typeof SECURITY_POLICY_ERRORS];
|
|
17
|
+
export declare const SECURITY_POLICY_MESSAGES: Record<string, string>;
|
|
18
|
+
export type { ParsedSecurityError } from '../schemas/common';
|
|
19
|
+
type ParsedSecurityError = import('../schemas/common').ParsedSecurityError;
|
|
20
|
+
/**
|
|
21
|
+
* Check if an error code is a security policy error.
|
|
22
|
+
*/
|
|
23
|
+
export declare function isSecurityPolicyError(errorCode: string): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Parse an error response and return formatted security policy information.
|
|
26
|
+
*
|
|
27
|
+
* @param error - The error object or error message from the API
|
|
28
|
+
* @returns ParsedSecurityError with formatted message and metadata
|
|
29
|
+
*/
|
|
30
|
+
export declare function parseSecurityPolicyError(error: unknown): ParsedSecurityError;
|
|
31
|
+
/**
|
|
32
|
+
* Get a human-readable message for a security policy error code.
|
|
33
|
+
* Returns the original message if not a security policy error.
|
|
34
|
+
*
|
|
35
|
+
* @param errorCode - The error code from the API
|
|
36
|
+
* @param defaultMessage - The default message to use if not a security policy error
|
|
37
|
+
* @returns Human-readable error message
|
|
38
|
+
*/
|
|
39
|
+
export declare function getSecurityPolicyMessage(errorCode: string, defaultMessage?: string): string;
|
|
40
|
+
/**
|
|
41
|
+
* Format an API error for CLI display with security policy awareness.
|
|
42
|
+
* This should be used when displaying errors to users in the CLI.
|
|
43
|
+
*
|
|
44
|
+
* @param error - The error object from the API
|
|
45
|
+
* @returns Formatted error string for CLI display
|
|
46
|
+
*/
|
|
47
|
+
export declare function formatApiErrorForCli(error: unknown): string;
|