@capgo/cli 7.93.4 → 7.94.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 +254 -77
- package/dist/index.js +464 -466
- package/dist/package.json +10 -7
- package/dist/src/api/channels.d.ts +2 -0
- package/dist/src/bundle/upload.d.ts +1 -1
- package/dist/src/init/command.d.ts +29 -0
- package/dist/src/sdk.js +321 -330
- package/dist/src/utils.d.ts +20 -3
- package/package.json +10 -7
- package/skills/_artifacts/domain_map.yaml +0 -32
- package/skills/_artifacts/skill_spec.md +0 -30
- package/skills/_artifacts/skill_tree.yaml +0 -17
package/dist/src/utils.d.ts
CHANGED
|
@@ -3594,7 +3594,6 @@ export declare function createSupabaseClient(apikey: string, supaHost?: string,
|
|
|
3594
3594
|
}, {
|
|
3595
3595
|
PostgrestVersion: "14.1";
|
|
3596
3596
|
}>>;
|
|
3597
|
-
export declare function checkKey(supabase: SupabaseClient<Database>, apikey: string, keymode: Database['public']['Enums']['key_mode'][]): Promise<void>;
|
|
3598
3597
|
export declare function isPayingOrg(supabase: SupabaseClient<Database>, orgId: string): Promise<boolean>;
|
|
3599
3598
|
export declare function isTrialOrg(supabase: SupabaseClient<Database>, orgId: string): Promise<number>;
|
|
3600
3599
|
export declare function isAllowedActionOrg(supabase: SupabaseClient<Database>, orgId: string): Promise<boolean>;
|
|
@@ -3641,7 +3640,7 @@ export declare function generateManifest(path: string): Promise<{
|
|
|
3641
3640
|
export type manifestType = Awaited<ReturnType<typeof generateManifest>>;
|
|
3642
3641
|
export type { uploadUrlsType } from './schemas/common';
|
|
3643
3642
|
export declare function zipFile(filePath: string): Promise<Buffer>;
|
|
3644
|
-
export declare function zipFileUnix(filePath: string): Buffer<
|
|
3643
|
+
export declare function zipFileUnix(filePath: string): Buffer<ArrayBuffer>;
|
|
3645
3644
|
export declare function zipFileWindows(filePath: string): Promise<Buffer>;
|
|
3646
3645
|
export declare function uploadTUS(apikey: string, data: Buffer, orgId: string, appId: string, name: string, spinner: ReturnType<typeof spinnerC>, localConfig: CapgoConfig, chunkSize: number): Promise<boolean>;
|
|
3647
3646
|
export declare function deletedFailedVersion(supabase: SupabaseClient<Database>, appId: string, name: string): Promise<void>;
|
|
@@ -3670,7 +3669,25 @@ export declare function sendEvent(capgkey: string, payload: TrackOptions & {
|
|
|
3670
3669
|
}, verbose?: boolean): Promise<void>;
|
|
3671
3670
|
export declare function show2FADeniedError(organizationName?: string): never;
|
|
3672
3671
|
export declare function getOrganization(supabase: SupabaseClient<Database>, roles: string[]): Promise<Organization>;
|
|
3673
|
-
export declare function
|
|
3672
|
+
export declare function filterOrgsByPermission(supabase: SupabaseClient<Database>, apikey: string, orgs: Organization[], permissionKey: string): Promise<Organization[]>;
|
|
3673
|
+
export declare function getOrganizationListWithPermission(supabase: SupabaseClient<Database>, apikey: string, permissionKey: string): Promise<{
|
|
3674
|
+
allOrganizations: Organization[];
|
|
3675
|
+
allowedOrganizations: Organization[];
|
|
3676
|
+
}>;
|
|
3677
|
+
export declare function getOrganizationWithPermission(supabase: SupabaseClient<Database>, apikey: string, permissionKey: string): Promise<Organization>;
|
|
3678
|
+
export declare function resolveUserIdFromApiKey(supabase: SupabaseClient<Database>, apikey: string, silent?: boolean): Promise<string>;
|
|
3679
|
+
interface CliPermissionScope {
|
|
3680
|
+
orgId?: string | null;
|
|
3681
|
+
appId?: string | null;
|
|
3682
|
+
channelId?: number | null;
|
|
3683
|
+
}
|
|
3684
|
+
export declare function hasCliPermission(supabase: SupabaseClient<Database>, apikey: string, permissionKey: string, scope?: CliPermissionScope): Promise<boolean>;
|
|
3685
|
+
export declare function assertCliPermission(supabase: SupabaseClient<Database>, apikey: string, permissionKey: string, scope?: CliPermissionScope, options?: {
|
|
3686
|
+
message?: string;
|
|
3687
|
+
silent?: boolean;
|
|
3688
|
+
}): Promise<void>;
|
|
3689
|
+
export declare function assertOrgPermission(supabase: SupabaseClient<Database>, apikey: string, permissionKey: string, orgId: string, message: string, silent: boolean): Promise<void>;
|
|
3690
|
+
export declare function getAccessibleAppsForApiKey(supabase: SupabaseClient<Database>, apikey: string): Promise<Database['public']['Tables']['apps']['Row'][]>;
|
|
3674
3691
|
export declare function getOrganizationId(supabase: SupabaseClient<Database>, appId: string): Promise<string>;
|
|
3675
3692
|
export declare function requireUpdateMetadata(supabase: SupabaseClient<Database>, channel: string, appId: string): Promise<boolean>;
|
|
3676
3693
|
export declare function getHumanDate(createdA: string | null): string;
|
package/package.json
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.94.1",
|
|
5
5
|
"description": "A CLI to upload to capgo servers",
|
|
6
6
|
"author": "Martin martin@capgo.app",
|
|
7
7
|
"license": "Apache 2.0",
|
|
8
|
-
"homepage": "https://github.com/Cap-go/
|
|
8
|
+
"homepage": "https://github.com/Cap-go/capgo/tree/main/cli#readme",
|
|
9
9
|
"repository": {
|
|
10
10
|
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/Cap-go/
|
|
11
|
+
"url": "git+https://github.com/Cap-go/capgo.git",
|
|
12
|
+
"directory": "cli"
|
|
12
13
|
},
|
|
13
14
|
"bugs": {
|
|
14
|
-
"url": "https://github.com/Cap-go/
|
|
15
|
+
"url": "https://github.com/Cap-go/capgo/issues"
|
|
15
16
|
},
|
|
16
17
|
"keywords": [
|
|
17
18
|
"appflow alternative",
|
|
@@ -56,9 +57,10 @@
|
|
|
56
57
|
"no-debug": "node dist/index.js",
|
|
57
58
|
"dev-build": "SUPA_DB=development ncc build",
|
|
58
59
|
"pack": "pkg",
|
|
59
|
-
"types": "
|
|
60
|
+
"types": "bunx --bun supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",
|
|
60
61
|
"typecheck": "tsc --noEmit",
|
|
61
|
-
"lint": "eslint \"src/**/*.ts\"
|
|
62
|
+
"lint": "eslint \"src/**/*.ts\"",
|
|
63
|
+
"lint:fix": "eslint \"src/**/*.ts\" --fix",
|
|
62
64
|
"check-posix-paths": "node test/check-posix-paths.js",
|
|
63
65
|
"generate-docs": "node dist/index.js generate-docs README.md",
|
|
64
66
|
"test:bundle": "bun test/test-bundle.mjs",
|
|
@@ -76,6 +78,7 @@
|
|
|
76
78
|
"test:onboarding-run-targets": "bun test/test-onboarding-run-targets.mjs",
|
|
77
79
|
"test:run-device-command": "bun test/test-run-device-command.mjs",
|
|
78
80
|
"test:init-app-conflict": "bun test/test-init-app-conflict.mjs",
|
|
81
|
+
"test:init-guardrails": "bun test/test-init-guardrails.mjs",
|
|
79
82
|
"test:prompt-preferences": "bun test/test-prompt-preferences.mjs",
|
|
80
83
|
"test:esm-sdk": "node test/test-sdk-esm.mjs",
|
|
81
84
|
"test:mcp": "node test/test-mcp.mjs",
|
|
@@ -83,7 +86,7 @@
|
|
|
83
86
|
"test:version-detection:setup": "./test/fixtures/setup-test-projects.sh",
|
|
84
87
|
"test:platform-paths": "bun test/test-platform-paths.mjs",
|
|
85
88
|
"test:payload-split": "bun test/test-payload-split.mjs",
|
|
86
|
-
"test": "bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:credentials && bun run test:credentials-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:ci-prompts && bun run test:onboarding-recovery && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-app-conflict && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:version-detection && bun run test:platform-paths && bun run test:payload-split"
|
|
89
|
+
"test": "bun run build && bun run test:version-detection:setup && bun run test:bundle && bun run test:functional && bun run test:semver && bun run test:version-edge-cases && bun run test:regex && bun run test:upload && bun run test:credentials && bun run test:credentials-validation && bun run test:build-zip-filter && bun run test:checksum && bun run test:ci-prompts && bun run test:onboarding-recovery && bun run test:onboarding-run-targets && bun run test:run-device-command && bun run test:init-app-conflict && bun run test:init-guardrails && bun run test:prompt-preferences && bun run test:esm-sdk && bun run test:mcp && bun run test:version-detection && bun run test:platform-paths && bun run test:payload-split"
|
|
87
90
|
},
|
|
88
91
|
"devDependencies": {
|
|
89
92
|
"@antfu/eslint-config": "^7.0.0",
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
domains:
|
|
2
|
-
- name: cli-usage
|
|
3
|
-
summary: High-level command routing, setup, diagnostics, app management, docs generation, MCP, and GitHub support commands.
|
|
4
|
-
primary_sources:
|
|
5
|
-
- webdocs/init.mdx
|
|
6
|
-
- webdocs/doctor.mdx
|
|
7
|
-
- webdocs/login.mdx
|
|
8
|
-
- webdocs/app.mdx
|
|
9
|
-
- webdocs/account.mdx
|
|
10
|
-
- webdocs/probe.mdx
|
|
11
|
-
- webdocs/star.mdx
|
|
12
|
-
- webdocs/star-all.mdx
|
|
13
|
-
- src/index.ts
|
|
14
|
-
- name: ota-release-management
|
|
15
|
-
summary: OTA bundle uploads, channel operations, compatibility checks, cleanup, and encryption-key workflows.
|
|
16
|
-
primary_sources:
|
|
17
|
-
- webdocs/bundle.mdx
|
|
18
|
-
- webdocs/channel.mdx
|
|
19
|
-
- webdocs/key.mdx
|
|
20
|
-
- src/index.ts
|
|
21
|
-
- name: native-builds
|
|
22
|
-
summary: Native cloud build requests and local build credential management for iOS and Android.
|
|
23
|
-
primary_sources:
|
|
24
|
-
- webdocs/build.mdx
|
|
25
|
-
- src/index.ts
|
|
26
|
-
- name: organization-management
|
|
27
|
-
summary: Account lookup, organization administration, and deprecated organisation aliases.
|
|
28
|
-
primary_sources:
|
|
29
|
-
- webdocs/account.mdx
|
|
30
|
-
- webdocs/organization.mdx
|
|
31
|
-
- webdocs/organisation.mdx
|
|
32
|
-
- src/index.ts
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Capgo CLI skill spec
|
|
2
|
-
|
|
3
|
-
## Goal
|
|
4
|
-
|
|
5
|
-
Provide a small Capgo CLI skill set that helps an agent choose and invoke the correct CLI commands for app setup, OTA release operations, organization administration, MCP setup, GitHub support commands, and native cloud builds without exceeding TanStack Intent size limits.
|
|
6
|
-
|
|
7
|
-
## Sources
|
|
8
|
-
|
|
9
|
-
- `webdocs/*.mdx` for published command descriptions, examples, and option tables.
|
|
10
|
-
- `src/index.ts` for the currently registered commands, aliases, and flags that may not yet be fully reflected in the web docs.
|
|
11
|
-
- `AGENTS.md` for repository-specific maintenance requirements.
|
|
12
|
-
|
|
13
|
-
## Skill set
|
|
14
|
-
|
|
15
|
-
- `usage`: routing, setup, diagnostics, app commands, docs generation, MCP, and GitHub support commands.
|
|
16
|
-
- `release-management`: bundle, channel, compatibility, cleanup, and encryption-key workflows.
|
|
17
|
-
- `native-builds`: native cloud build requests and build credential storage/update flows.
|
|
18
|
-
- `organization-management`: account ID lookup, organization admin flows, and deprecated `organisation` aliases.
|
|
19
|
-
|
|
20
|
-
## Scope
|
|
21
|
-
|
|
22
|
-
- Include the documented command purpose, invocation patterns, key options, and important caveats.
|
|
23
|
-
- Prefer the public user-facing examples already used by the project.
|
|
24
|
-
- Keep the skills aligned with the published docs and current CLI registration.
|
|
25
|
-
|
|
26
|
-
## Maintenance rules
|
|
27
|
-
|
|
28
|
-
- Any CLI command or option change should update the relevant `skills/*/SKILL.md` file in the same pull request.
|
|
29
|
-
- Use `webdocs/` as the primary wording source and `src/index.ts` as the completeness check.
|
|
30
|
-
- Validate the skills with `bunx @tanstack/intent@latest validate` before release.
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
skills:
|
|
2
|
-
- name: usage
|
|
3
|
-
path: skills/usage/SKILL.md
|
|
4
|
-
domain: cli-usage
|
|
5
|
-
focus: High-level routing and shared invocation rules.
|
|
6
|
-
- name: release-management
|
|
7
|
-
path: skills/release-management/SKILL.md
|
|
8
|
-
domain: ota-release-management
|
|
9
|
-
focus: OTA bundle, channel, compatibility, cleanup, and encryption workflows.
|
|
10
|
-
- name: native-builds
|
|
11
|
-
path: skills/native-builds/SKILL.md
|
|
12
|
-
domain: native-builds
|
|
13
|
-
focus: Native build request flows and local build credential management.
|
|
14
|
-
- name: organization-management
|
|
15
|
-
path: skills/organization-management/SKILL.md
|
|
16
|
-
domain: organization-management
|
|
17
|
-
focus: Account and organization administration commands, including deprecated aliases.
|