@capgo/cli 8.73.0 → 8.75.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/README.md +1 -0
- package/dist/index.js +788 -787
- package/dist/notify-app-ready-worker.js +135 -134
- package/dist/onboarding-worker.js +173 -172
- package/dist/package.json +3 -3
- package/dist/src/bundle/manifest-upload.d.ts +75 -0
- package/dist/src/bundle/partial.d.ts +13 -6
- package/dist/src/schemas/bundle.d.ts +1 -0
- package/dist/src/sdk.js +382 -381
- package/dist/src/types/supabase.types.d.ts +3 -0
- package/dist/src/utils.d.ts +5720 -4
- package/dist/updater-installed-worker.js +107 -106
- package/package.json +3 -3
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.75.1",
|
|
5
5
|
"description": "A CLI to upload to capgo servers",
|
|
6
6
|
"author": "Martin martin@capgo.app",
|
|
7
7
|
"license": "Apache 2.0",
|
|
@@ -161,7 +161,6 @@
|
|
|
161
161
|
"test:apple-api-cert-create": "bun test/test-apple-api-cert-create.mjs",
|
|
162
162
|
"test:app-verification": "bun test/test-app-verification.mjs",
|
|
163
163
|
"test:pbxproj-parser": "bun test/test-pbxproj-parser.mjs",
|
|
164
|
-
"test:manifest-path-encoding": "bun test/test-manifest-path-encoding.mjs",
|
|
165
164
|
"test:self-update": "bun test/test-self-update.mjs",
|
|
166
165
|
"test:update-prompt": "bun test/test-update-prompt.mjs",
|
|
167
166
|
"test:android-tail-engine": "bun test/test-android-tail-engine.mjs",
|
|
@@ -195,7 +194,7 @@
|
|
|
195
194
|
"test": "bun run build && bun scripts/run-test-suite.ts",
|
|
196
195
|
"test:run": "bun scripts/run-test-suite.ts",
|
|
197
196
|
"test:serial": "bun run build && bun scripts/run-test-suite.ts --serial",
|
|
198
|
-
"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: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:supabase-perf && bun run test:preview-qr && bun run test:bundle-pages && 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-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-output-text && bun run test:app-todo && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:cli-recovery && bun run test:create-supabase-client && 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:
|
|
197
|
+
"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: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:supabase-perf && bun run test:preview-qr && bun run test:bundle-pages && 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-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-output-text && bun run test:app-todo && bun run test:doctor-analytics && bun run test:posthog-exception && bun run test:cli-recovery && bun run test:create-supabase-client && 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:ai-analyze-stream && bun run test:support-mailto && bun run test:support-redact && bun run test:support-internal-log && bun run test:support-help-menu && bun run test:support-contact && bun run test:support-upload-prompt && bun run test:support-bundle-files && 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:frame-fit-ios-shared && 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-flow-contract && 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:trial-warning && bun run test:plan-validation",
|
|
199
198
|
"test:build-platform-selection": "bun test/test-build-platform-selection.mjs",
|
|
200
199
|
"test:builder-project-discovery": "bun test/test-builder-project-discovery.mjs",
|
|
201
200
|
"test:builder-app-selection": "bun test/test-builder-app-selection.mjs",
|
|
@@ -286,6 +285,7 @@
|
|
|
286
285
|
"@modelcontextprotocol/client": "^2.0.0-beta.5",
|
|
287
286
|
"@modelcontextprotocol/server": "^2.0.0-beta.5",
|
|
288
287
|
"@sauber/table": "npm:@jsr/sauber__table",
|
|
288
|
+
"@sinonjs/fake-timers": "15.4.0",
|
|
289
289
|
"@std/semver": "npm:@jsr/std__semver@1.0.8",
|
|
290
290
|
"@supabase/supabase-js": "^2.110.8",
|
|
291
291
|
"@tanstack/intent": "^0.3.6",
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { CapgoCliInvokeOptions } from '../utils';
|
|
2
|
+
import { invokeCapgoCliApi } from '../utils';
|
|
3
|
+
export declare const MANIFEST_UPLOAD_PROTOCOL_VERSION: 1;
|
|
4
|
+
export type ManifestUploadAction = 'upload_if_doesnt_exist' | 'reuse' | 'upload';
|
|
5
|
+
export type ManifestUploadFileHashFormat = 'sha256_hex' | 'rsa_v2_base64' | 'rsa_v3_hex';
|
|
6
|
+
export interface ManifestUploadRequestEntry {
|
|
7
|
+
id: number;
|
|
8
|
+
file_name: string;
|
|
9
|
+
compression: 'none' | 'brotli';
|
|
10
|
+
file_hash: string;
|
|
11
|
+
uploaded_bytes_sha256: string;
|
|
12
|
+
uploaded_bytes_size: number;
|
|
13
|
+
}
|
|
14
|
+
export interface ManifestUploadRequest {
|
|
15
|
+
protocol_version: typeof MANIFEST_UPLOAD_PROTOCOL_VERSION;
|
|
16
|
+
version_id: number;
|
|
17
|
+
delta_encryption: {
|
|
18
|
+
enabled: boolean;
|
|
19
|
+
};
|
|
20
|
+
manifest_upload_auto_enabled: boolean;
|
|
21
|
+
file_hash_format: ManifestUploadFileHashFormat;
|
|
22
|
+
entries: ManifestUploadRequestEntry[];
|
|
23
|
+
}
|
|
24
|
+
interface ManifestUploadAuthorization {
|
|
25
|
+
type: 'header';
|
|
26
|
+
header_name: string;
|
|
27
|
+
token_prefix: string;
|
|
28
|
+
expires_at: number;
|
|
29
|
+
}
|
|
30
|
+
export interface ManifestUploadTarget {
|
|
31
|
+
id: string;
|
|
32
|
+
protocol: 'tus';
|
|
33
|
+
upload_url: string;
|
|
34
|
+
existence_check_url_prefix: string;
|
|
35
|
+
authorization: ManifestUploadAuthorization;
|
|
36
|
+
}
|
|
37
|
+
interface ManifestUploadResponseEntry {
|
|
38
|
+
id: number;
|
|
39
|
+
action?: ManifestUploadAction;
|
|
40
|
+
upload_target?: string;
|
|
41
|
+
s3_path?: string;
|
|
42
|
+
s3_path_suffix?: string;
|
|
43
|
+
upload_token?: string;
|
|
44
|
+
file_size_receipt?: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ManifestUploadResponse {
|
|
47
|
+
protocol_version: number;
|
|
48
|
+
version_id: number;
|
|
49
|
+
default_action: ManifestUploadAction;
|
|
50
|
+
default_s3_path_prefix?: string;
|
|
51
|
+
default_upload_target?: string;
|
|
52
|
+
upload_targets: ManifestUploadTarget[];
|
|
53
|
+
entries: ManifestUploadResponseEntry[];
|
|
54
|
+
}
|
|
55
|
+
export interface ResolvedManifestUploadEntry {
|
|
56
|
+
request: ManifestUploadRequestEntry;
|
|
57
|
+
action: ManifestUploadAction;
|
|
58
|
+
s3Path: string;
|
|
59
|
+
uploadTarget?: ManifestUploadTarget;
|
|
60
|
+
uploadAuthorization?: {
|
|
61
|
+
headerName: string;
|
|
62
|
+
value: string;
|
|
63
|
+
};
|
|
64
|
+
fileSizeReceipt?: string;
|
|
65
|
+
}
|
|
66
|
+
export interface ResolvedManifestUpload {
|
|
67
|
+
response: ManifestUploadResponse;
|
|
68
|
+
entries: ResolvedManifestUploadEntry[];
|
|
69
|
+
}
|
|
70
|
+
export declare function manifestUploadFileHashFormat(encryptionEnabled: boolean, supportsHexChecksum: boolean): ManifestUploadFileHashFormat;
|
|
71
|
+
export declare function isManifestUploadAutoEnabled(userRequestedDelta: boolean, fullZipEnabled: boolean): boolean;
|
|
72
|
+
type ManifestUploadInvoke = typeof invokeCapgoCliApi;
|
|
73
|
+
export declare function resolveManifestUploadResponse(request: ManifestUploadRequest, input: unknown): ResolvedManifestUpload;
|
|
74
|
+
export declare function requestManifestUpload(apikey: string, request: ManifestUploadRequest, options?: Pick<CapgoCliInvokeOptions, 'supaHost' | 'supaAnon'>, invoke?: ManifestUploadInvoke): Promise<ResolvedManifestUpload>;
|
|
75
|
+
export {};
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
import type { manifestType } from '../utils';
|
|
2
2
|
import type { OptionsUpload } from './upload_interface';
|
|
3
3
|
import { Buffer } from 'node:buffer';
|
|
4
|
+
import { CliUserError } from '../shared/cli-user-error';
|
|
5
|
+
import type { ManifestUploadRequestEntry, ResolvedManifestUpload, ResolvedManifestUploadEntry } from './manifest-upload';
|
|
6
|
+
export declare function fileExistsAtUploadTarget(existenceCheckUrlPrefix: string, filename: string): Promise<{
|
|
7
|
+
exists: boolean;
|
|
8
|
+
receipt?: string;
|
|
9
|
+
}>;
|
|
4
10
|
export declare function prepareBundlePartialFiles(path: string, apikey: string, orgId: string, appid: string, encryptionMethod: 'none' | 'v2' | 'v1', finalKeyData: string, supportsHexChecksum?: boolean): Promise<{
|
|
5
11
|
file: string;
|
|
6
12
|
hash: string;
|
|
7
13
|
}[]>;
|
|
8
|
-
export
|
|
9
|
-
ivSessionKey: string;
|
|
10
|
-
}): string;
|
|
11
|
-
interface PartialEncryptionOptions {
|
|
14
|
+
export interface PartialEncryptionOptions {
|
|
12
15
|
sessionKey: Buffer;
|
|
13
16
|
ivSessionKey: string;
|
|
14
17
|
}
|
|
15
|
-
export declare
|
|
16
|
-
|
|
18
|
+
export declare class PartialUploadValidationError extends CliUserError {
|
|
19
|
+
constructor(message: string);
|
|
20
|
+
}
|
|
21
|
+
export declare function prepareManifestUploadEntries(manifest: manifestType, path: string, encryptionOptions: PartialEncryptionOptions | undefined, options: OptionsUpload): Promise<ManifestUploadRequestEntry[]>;
|
|
22
|
+
export declare function buildPartialUploadHeaders(manifestUploadEntry: ResolvedManifestUploadEntry): Record<string, string>;
|
|
23
|
+
export declare function uploadPartial(apikey: string, manifest: manifestType, path: string, appId: string, orgId: string, encryptionOptions: PartialEncryptionOptions | undefined, options: OptionsUpload, manifestUpload: ResolvedManifestUpload): Promise<any[] | null>;
|
|
@@ -51,6 +51,7 @@ export declare const optionsUploadSchema: z.ZodObject<{
|
|
|
51
51
|
partialOnly: z.ZodOptional<z.ZodBoolean>;
|
|
52
52
|
delta: z.ZodOptional<z.ZodBoolean>;
|
|
53
53
|
deltaOnly: z.ZodOptional<z.ZodBoolean>;
|
|
54
|
+
deltaUploadConcurrency: z.ZodOptional<z.ZodNumber>;
|
|
54
55
|
userRequestedDelta: z.ZodOptional<z.ZodBoolean>;
|
|
55
56
|
tus: z.ZodOptional<z.ZodBoolean>;
|
|
56
57
|
encryptedChecksum: z.ZodOptional<z.ZodString>;
|