@cometchat/skills-cli 2.4.1 → 3.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 +45 -37
- package/dist/index.js +1821 -13090
- package/dist/utils/error-dictionary.js +0 -69
- package/package.json +10 -12
- package/dist/registry/schemas/config.schema.json +0 -119
- package/dist/registry/schemas/template.schema.json +0 -142
- package/dist/registry/v6/experiences/1-conversation-list/astro.template.json +0 -89
- package/dist/registry/v6/experiences/1-conversation-list/nextjs-pages.template.json +0 -83
- package/dist/registry/v6/experiences/1-conversation-list/nextjs.template.json +0 -83
- package/dist/registry/v6/experiences/1-conversation-list/react-router.template.json +0 -102
- package/dist/registry/v6/experiences/1-conversation-list/reactjs-dedicated-route.template.json +0 -81
- package/dist/registry/v6/experiences/1-conversation-list/reactjs.template.json +0 -86
- package/dist/registry/v6/experiences/1-conversation-list/templates/astro/ChatApp.css.tpl +0 -43
- package/dist/registry/v6/experiences/1-conversation-list/templates/astro/ChatApp.tsx.tpl +0 -86
- package/dist/registry/v6/experiences/1-conversation-list/templates/astro/CometChatSelector.tsx.tpl +0 -40
- package/dist/registry/v6/experiences/1-conversation-list/templates/astro/chat.astro.tpl +0 -17
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs/CometChatNoSSR.css.tpl +0 -43
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs/CometChatNoSSR.tsx.tpl +0 -86
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs/CometChatSelector.tsx.tpl +0 -41
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs/chat-page.tsx.tpl +0 -11
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs-pages/CometChatNoSSR.css.tpl +0 -43
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs-pages/CometChatNoSSR.tsx.tpl +0 -88
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs-pages/CometChatSelector.tsx.tpl +0 -41
- package/dist/registry/v6/experiences/1-conversation-list/templates/nextjs-pages/chat-page.tsx.tpl +0 -15
- package/dist/registry/v6/experiences/1-conversation-list/templates/react-router/CometChat-route.tsx.tpl +0 -22
- package/dist/registry/v6/experiences/1-conversation-list/templates/react-router/CometChatNoSSR.css.tpl +0 -43
- package/dist/registry/v6/experiences/1-conversation-list/templates/react-router/CometChatNoSSR.tsx.tpl +0 -87
- package/dist/registry/v6/experiences/1-conversation-list/templates/react-router/CometChatSelector.tsx.tpl +0 -40
- package/dist/registry/v6/experiences/1-conversation-list/templates/reactjs/App.css.tpl +0 -40
- package/dist/registry/v6/experiences/1-conversation-list/templates/reactjs/App.tsx.tpl +0 -55
- package/dist/registry/v6/experiences/1-conversation-list/templates/reactjs/CometChatSelector.tsx.tpl +0 -40
- package/dist/registry/v6/experiences/1-conversation-list/templates/reactjs/main.tsx.tpl +0 -46
- package/dist/registry/v6/experiences/1-conversation-list/templates/reactjs-dedicated-route/ChatPage.tsx.tpl +0 -87
- package/dist/registry/v6/experiences/1-conversation-list/templates/reactjs-dedicated-route/CometChatMessenger.css.tpl +0 -20
- package/dist/registry/v6/experiences/1-conversation-list/templates/reactjs-dedicated-route/CometChatMessenger.tsx.tpl +0 -54
- package/dist/registry/v6/experiences/1-conversation-list/templates/reactjs-dedicated-route/CometChatSelector.tsx.tpl +0 -40
- package/dist/registry/v6/experiences/2-one-to-one/astro.template.json +0 -81
- package/dist/registry/v6/experiences/2-one-to-one/nextjs.template.json +0 -77
- package/dist/registry/v6/experiences/2-one-to-one/react-router.template.json +0 -93
- package/dist/registry/v6/experiences/2-one-to-one/reactjs-dedicated-route.template.json +0 -75
- package/dist/registry/v6/experiences/2-one-to-one/reactjs.template.json +0 -80
- package/dist/registry/v6/experiences/2-one-to-one/templates/astro/ChatApp.css.tpl +0 -21
- package/dist/registry/v6/experiences/2-one-to-one/templates/astro/ChatApp.tsx.tpl +0 -66
- package/dist/registry/v6/experiences/2-one-to-one/templates/astro/chat.astro.tpl +0 -17
- package/dist/registry/v6/experiences/2-one-to-one/templates/nextjs/CometChatNoSSR.css.tpl +0 -21
- package/dist/registry/v6/experiences/2-one-to-one/templates/nextjs/CometChatNoSSR.tsx.tpl +0 -66
- package/dist/registry/v6/experiences/2-one-to-one/templates/nextjs/chat-page.tsx.tpl +0 -11
- package/dist/registry/v6/experiences/2-one-to-one/templates/react-router/CometChat-route.tsx.tpl +0 -21
- package/dist/registry/v6/experiences/2-one-to-one/templates/react-router/CometChatNoSSR.css.tpl +0 -21
- package/dist/registry/v6/experiences/2-one-to-one/templates/react-router/CometChatNoSSR.tsx.tpl +0 -67
- package/dist/registry/v6/experiences/2-one-to-one/templates/reactjs/App.css.tpl +0 -4
- package/dist/registry/v6/experiences/2-one-to-one/templates/reactjs/App.tsx.tpl +0 -44
- package/dist/registry/v6/experiences/2-one-to-one/templates/reactjs/main.tsx.tpl +0 -46
- package/dist/registry/v6/experiences/2-one-to-one/templates/reactjs-dedicated-route/ChatPage.tsx.tpl +0 -84
- package/dist/registry/v6/experiences/2-one-to-one/templates/reactjs-dedicated-route/CometChatMessenger.css.tpl +0 -9
- package/dist/registry/v6/experiences/2-one-to-one/templates/reactjs-dedicated-route/CometChatMessenger.tsx.tpl +0 -43
- package/dist/registry/v6/experiences/3-tab-based/astro.template.json +0 -93
- package/dist/registry/v6/experiences/3-tab-based/nextjs.template.json +0 -90
- package/dist/registry/v6/experiences/3-tab-based/react-router.template.json +0 -105
- package/dist/registry/v6/experiences/3-tab-based/reactjs-dedicated-route.template.json +0 -89
- package/dist/registry/v6/experiences/3-tab-based/reactjs.template.json +0 -93
- package/dist/registry/v6/experiences/3-tab-based/templates/astro/ChatApp.css.tpl +0 -39
- package/dist/registry/v6/experiences/3-tab-based/templates/astro/ChatApp.tsx.tpl +0 -93
- package/dist/registry/v6/experiences/3-tab-based/templates/astro/CometChatTabs.css.tpl +0 -43
- package/dist/registry/v6/experiences/3-tab-based/templates/astro/CometChatTabs.tsx.tpl +0 -72
- package/dist/registry/v6/experiences/3-tab-based/templates/astro/chat.astro.tpl +0 -17
- package/dist/registry/v6/experiences/3-tab-based/templates/nextjs/CometChatNoSSR.css.tpl +0 -39
- package/dist/registry/v6/experiences/3-tab-based/templates/nextjs/CometChatNoSSR.tsx.tpl +0 -93
- package/dist/registry/v6/experiences/3-tab-based/templates/nextjs/CometChatTabs.css.tpl +0 -43
- package/dist/registry/v6/experiences/3-tab-based/templates/nextjs/CometChatTabs.tsx.tpl +0 -73
- package/dist/registry/v6/experiences/3-tab-based/templates/nextjs/chat-page.tsx.tpl +0 -11
- package/dist/registry/v6/experiences/3-tab-based/templates/react-router/CometChat-route.tsx.tpl +0 -21
- package/dist/registry/v6/experiences/3-tab-based/templates/react-router/CometChatNoSSR.css.tpl +0 -39
- package/dist/registry/v6/experiences/3-tab-based/templates/react-router/CometChatNoSSR.tsx.tpl +0 -94
- package/dist/registry/v6/experiences/3-tab-based/templates/react-router/CometChatTabs.css.tpl +0 -43
- package/dist/registry/v6/experiences/3-tab-based/templates/react-router/CometChatTabs.tsx.tpl +0 -72
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs/App.css.tpl +0 -7
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs/App.tsx.tpl +0 -62
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs/CometChatTabs.css.tpl +0 -43
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs/CometChatTabs.tsx.tpl +0 -72
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs/main.tsx.tpl +0 -46
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs-dedicated-route/ChatPage.tsx.tpl +0 -84
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs-dedicated-route/CometChatMessenger.css.tpl +0 -11
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs-dedicated-route/CometChatMessenger.tsx.tpl +0 -61
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs-dedicated-route/CometChatTabs.css.tpl +0 -43
- package/dist/registry/v6/experiences/3-tab-based/templates/reactjs-dedicated-route/CometChatTabs.tsx.tpl +0 -72
- package/dist/registry/v6/features/catalog.json +0 -990
- package/dist/registry/v6/production/astro/cometchat-token.ts.tpl +0 -86
- package/dist/registry/v6/production/astro.template.json +0 -51
- package/dist/registry/v6/production/nextjs/route.ts.tpl +0 -79
- package/dist/registry/v6/production/nextjs.template.json +0 -50
- package/dist/registry/v6/production/react-router/api.cometchat-token.ts.tpl +0 -73
- package/dist/registry/v6/production/react-router.template.json +0 -58
- package/dist/registry/v6/user-mgmt/astro/cometchat-user.ts.tpl +0 -164
- package/dist/registry/v6/user-mgmt/astro.template.json +0 -33
- package/dist/registry/v6/user-mgmt/nextjs/route.ts.tpl +0 -212
- package/dist/registry/v6/user-mgmt/nextjs.template.json +0 -57
- package/dist/registry/v6/user-mgmt/react-router/api.cometchat-user.ts.tpl +0 -176
- package/dist/registry/v6/user-mgmt/react-router.template.json +0 -40
- package/dist/registry/v6/widget/astro/CometChatWidget.css.tpl +0 -105
- package/dist/registry/v6/widget/astro/CometChatWidget.tsx.tpl +0 -88
- package/dist/registry/v6/widget/astro.template.json +0 -38
- package/dist/registry/v6/widget/nextjs/CometChatWidget.css.tpl +0 -105
- package/dist/registry/v6/widget/nextjs/CometChatWidget.tsx.tpl +0 -88
- package/dist/registry/v6/widget/nextjs.template.json +0 -40
- package/dist/registry/v6/widget/react-router/CometChatWidget.css.tpl +0 -105
- package/dist/registry/v6/widget/react-router/CometChatWidget.tsx.tpl +0 -98
- package/dist/registry/v6/widget/react-router.template.json +0 -36
- package/dist/registry/v6/widget/reactjs/CometChatWidget.css.tpl +0 -105
- package/dist/registry/v6/widget/reactjs/CometChatWidget.tsx.tpl +0 -89
- package/dist/registry/v6/widget/reactjs.template.json +0 -36
package/README.md
CHANGED
|
@@ -1,65 +1,73 @@
|
|
|
1
1
|
# @cometchat/skills-cli
|
|
2
2
|
|
|
3
|
-
> CLI for
|
|
3
|
+
> CLI for CometChat dashboard authentication + app-credential provisioning.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npx @cometchat/skills-cli@latest
|
|
6
|
+
npx @cometchat/skills-cli@latest auth login
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
## Why this exists
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
This CLI is a **pure dashboard/API client**. Its only job is authenticating
|
|
12
|
+
against the CometChat dashboard and fetching your app credentials (App ID /
|
|
13
|
+
Region / Auth Key). It knows nothing about UI Kit, React, frameworks, or
|
|
14
|
+
codegen — the CometChat **skills** own framework detection, env-file writing,
|
|
15
|
+
and all code generation. The CLI just gets you authenticated and hands the
|
|
16
|
+
skills a neutral `.cometchat/config.json` to build on.
|
|
17
|
+
|
|
18
|
+
> **3.0.0 is a breaking re-architecture.** Earlier versions (≤2.x) also did
|
|
19
|
+
> framework detection, integration codegen, and `.env` writing. All of that
|
|
20
|
+
> moved into the skills. Only `auth`, `provision`, and `config` remain.
|
|
12
21
|
|
|
13
22
|
## Commands
|
|
14
23
|
|
|
15
24
|
| Command | Purpose |
|
|
16
25
|
|---|---|
|
|
17
|
-
| `cometchat
|
|
18
|
-
| `cometchat
|
|
19
|
-
| `cometchat
|
|
20
|
-
| `cometchat apply --experience N --framework F` | Perform the integration. Transactional. Idempotent. |
|
|
21
|
-
| `cometchat install` | Install the deps the integration needs (auto-detects pnpm/npm/yarn/bun) |
|
|
22
|
-
| `cometchat verify` | Run AST checks: css imports, init order, no auth key in source, error UI |
|
|
23
|
-
| `cometchat info` | Drift detection via SHA-256 checksums |
|
|
24
|
-
| `cometchat uninstall [--force]` | Remove only the files this integration owns |
|
|
26
|
+
| `cometchat auth <login\|logout\|status\|signup>` | Dashboard device-auth. Opens your browser at the CometChat dashboard and stores the bearer token in the OS keychain (falling back to a chmod-600 file). |
|
|
27
|
+
| `cometchat provision <run\|list\|create\|use>` | Dashboard app operations. Fetches App ID / Region / Auth Key, prints them as JSON, and writes a neutral `.cometchat/config.json`. Writes **no** framework env file. |
|
|
28
|
+
| `cometchat config <init\|get\|set\|show\|path>` | Manage `.cometchat/config.json` — credential/app state only (appId, region, authKey + app metadata). |
|
|
25
29
|
|
|
26
30
|
All commands accept `--json` for machine-readable output.
|
|
27
31
|
|
|
28
32
|
## Quick start
|
|
29
33
|
|
|
30
34
|
```bash
|
|
31
|
-
# 1.
|
|
32
|
-
npx @cometchat/skills-cli@latest
|
|
35
|
+
# 1. Authenticate against the dashboard (opens your browser)
|
|
36
|
+
npx @cometchat/skills-cli@latest auth login
|
|
33
37
|
|
|
34
|
-
# 2.
|
|
35
|
-
npx @cometchat/skills-cli@latest
|
|
38
|
+
# 2. List the apps on your account
|
|
39
|
+
npx @cometchat/skills-cli@latest provision list --json
|
|
36
40
|
|
|
37
|
-
# 3.
|
|
38
|
-
npx @cometchat/skills-cli@latest
|
|
41
|
+
# 3. End-to-end: pick/create an app, fetch creds, write .cometchat/config.json
|
|
42
|
+
npx @cometchat/skills-cli@latest provision run --json
|
|
39
43
|
|
|
40
|
-
#
|
|
41
|
-
npx @cometchat/skills-cli@latest
|
|
44
|
+
# …or select a specific app by id
|
|
45
|
+
npx @cometchat/skills-cli@latest provision use --app-id <id> --json
|
|
42
46
|
|
|
43
|
-
#
|
|
44
|
-
npx @cometchat/skills-cli@latest
|
|
47
|
+
# 4. Inspect the local config the skills read
|
|
48
|
+
npx @cometchat/skills-cli@latest config show --json
|
|
45
49
|
```
|
|
46
50
|
|
|
47
|
-
##
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
## What `provision` writes
|
|
52
|
+
|
|
53
|
+
`provision` writes **only** `.cometchat/config.json`, a neutral credential/app
|
|
54
|
+
record:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"version": 1,
|
|
59
|
+
"appId": "…",
|
|
60
|
+
"region": "us",
|
|
61
|
+
"authKey": "…",
|
|
62
|
+
"appName": "My Chat",
|
|
63
|
+
"plan": "…",
|
|
64
|
+
"industry": "…"
|
|
65
|
+
}
|
|
66
|
+
```
|
|
57
67
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
- **Drift detection** — `info` re-checksums every owned file and reports user edits.
|
|
62
|
-
- **Clean uninstall** — `uninstall` only removes files in `.cometchat/state.json`'s `files_owned` list.
|
|
68
|
+
It does **not** write any framework env file (`.env` / `VITE_` /
|
|
69
|
+
`NEXT_PUBLIC_` / …) and takes **no** `--framework` flag. The skill reads
|
|
70
|
+
`config.json` and writes the framework-specific env itself.
|
|
63
71
|
|
|
64
72
|
## License
|
|
65
73
|
|
|
@@ -67,4 +75,4 @@ MIT — © CometChat
|
|
|
67
75
|
|
|
68
76
|
## Repository
|
|
69
77
|
|
|
70
|
-
Source + tests
|
|
78
|
+
Source + tests live at <https://github.com/cometchat/cometchat-skills>
|