@cakemail-org/cakemail-cli 1.5.0 → 2.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/.claude/settings.local.json +12 -0
- package/.env.example +40 -0
- package/.env.test.example +45 -0
- package/CHANGELOG.md +1031 -0
- package/README.md +319 -15
- package/audit-formats.js +128 -0
- package/cakemail.rb +20 -0
- package/dist/cli.js +27 -10
- package/dist/cli.js.map +1 -1
- package/dist/client.d.ts +2 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +16 -6
- package/dist/client.js.map +1 -1
- package/dist/commands/account.js +1 -1
- package/dist/commands/account.js.map +1 -1
- package/dist/commands/attributes.js +1 -1
- package/dist/commands/attributes.js.map +1 -1
- package/dist/commands/campaigns.d.ts.map +1 -1
- package/dist/commands/campaigns.js +103 -8
- package/dist/commands/campaigns.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +63 -4
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/contacts.d.ts.map +1 -1
- package/dist/commands/contacts.js +91 -12
- package/dist/commands/contacts.js.map +1 -1
- package/dist/commands/emails.js +1 -1
- package/dist/commands/emails.js.map +1 -1
- package/dist/commands/interests.d.ts +5 -0
- package/dist/commands/interests.d.ts.map +1 -0
- package/dist/commands/interests.js +172 -0
- package/dist/commands/interests.js.map +1 -0
- package/dist/commands/lists.d.ts.map +1 -1
- package/dist/commands/lists.js +6 -8
- package/dist/commands/lists.js.map +1 -1
- package/dist/commands/logs.d.ts +5 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +237 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/reports.js +1 -1
- package/dist/commands/reports.js.map +1 -1
- package/dist/commands/segments.js +1 -1
- package/dist/commands/segments.js.map +1 -1
- package/dist/commands/senders.d.ts.map +1 -1
- package/dist/commands/senders.js +11 -8
- package/dist/commands/senders.js.map +1 -1
- package/dist/commands/suppressed.js +1 -1
- package/dist/commands/suppressed.js.map +1 -1
- package/dist/commands/tags.d.ts +5 -0
- package/dist/commands/tags.d.ts.map +1 -0
- package/dist/commands/tags.js +124 -0
- package/dist/commands/tags.js.map +1 -0
- package/dist/commands/templates.js +1 -1
- package/dist/commands/templates.js.map +1 -1
- package/dist/commands/transactional-templates.d.ts +5 -0
- package/dist/commands/transactional-templates.d.ts.map +1 -0
- package/dist/commands/transactional-templates.js +354 -0
- package/dist/commands/transactional-templates.js.map +1 -0
- package/dist/commands/webhooks.js +1 -1
- package/dist/commands/webhooks.js.map +1 -1
- package/dist/utils/auth.d.ts +8 -1
- package/dist/utils/auth.d.ts.map +1 -1
- package/dist/utils/auth.js +39 -11
- package/dist/utils/auth.js.map +1 -1
- package/dist/utils/config-file.d.ts +7 -0
- package/dist/utils/config-file.d.ts.map +1 -1
- package/dist/utils/config-file.js +15 -0
- package/dist/utils/config-file.js.map +1 -1
- package/dist/utils/config.d.ts +2 -0
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/utils/config.js +12 -4
- package/dist/utils/config.js.map +1 -1
- package/dist/utils/errors.js +1 -1
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/list-defaults.d.ts +33 -0
- package/dist/utils/list-defaults.d.ts.map +1 -0
- package/dist/utils/list-defaults.js +52 -0
- package/dist/utils/list-defaults.js.map +1 -0
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/output.js +36 -13
- package/dist/utils/output.js.map +1 -1
- package/dist/utils/progress.d.ts.map +1 -1
- package/dist/utils/progress.js +32 -4
- package/dist/utils/progress.js.map +1 -1
- package/dist/utils/spinner.d.ts +17 -0
- package/dist/utils/spinner.d.ts.map +1 -0
- package/dist/utils/spinner.js +43 -0
- package/dist/utils/spinner.js.map +1 -0
- package/docs/DOCUMENTATION-STANDARD.md +1068 -0
- package/docs/README.md +161 -0
- package/docs/developer/ARCHITECTURE.md +516 -0
- package/docs/developer/AUTH.md +204 -0
- package/docs/developer/CONTRIBUTING.md +227 -0
- package/docs/developer/DOCUMENTATION_SUMMARY.md +346 -0
- package/docs/developer/PROJECT_INDEX.md +365 -0
- package/docs/planning/API_COVERAGE.md +1045 -0
- package/docs/planning/BACKLOG.md +1159 -0
- package/docs/planning/PROFILE_SYSTEM_TASKS.md +287 -0
- package/docs/planning/UX_IMPLEMENTATION_PLAN.md +691 -0
- package/docs/planning/archive/RELEASE_CHECKLIST_v1.3.0.md +332 -0
- package/docs/planning/archive/RELEASE_v1.3.0.md +428 -0
- package/docs/planning/archive/cakemail-cli-ux-improvements.md +438 -0
- package/docs/planning/cakemail-profile-system-plan.md +1121 -0
- package/docs/testing/AI_USER_SIMULATION_DESIGN.md +1342 -0
- package/docs/testing/KENOGAMI_BIDIRECTIONAL_FLOW.md +1517 -0
- package/docs/testing/KENOGAMI_TRUTH_RECONCILIATION_SYSTEM.md +1369 -0
- package/docs/user-manual/.obsidian/app.json +1 -0
- package/docs/user-manual/.obsidian/appearance.json +1 -0
- package/docs/user-manual/.obsidian/core-plugins.json +33 -0
- package/docs/user-manual/.obsidian/workspace.json +167 -0
- package/docs/user-manual/01-getting-started/01-installation.md +214 -0
- package/docs/user-manual/01-getting-started/02-quick-start.md +432 -0
- package/docs/user-manual/01-getting-started/03-authentication.md +448 -0
- package/docs/user-manual/01-getting-started/04-configuration.md +430 -0
- package/docs/user-manual/01-getting-started/05-output-formats.md +447 -0
- package/docs/user-manual/02-core-concepts/01-accounts.md +514 -0
- package/docs/user-manual/02-core-concepts/02-profile-system.md +771 -0
- package/docs/user-manual/02-core-concepts/03-smart-defaults.md +485 -0
- package/docs/user-manual/02-core-concepts/04-authentication-methods.md +435 -0
- package/docs/user-manual/02-core-concepts/05-pagination-filtering.md +600 -0
- package/docs/user-manual/02-core-concepts/06-error-handling.md +718 -0
- package/docs/user-manual/02-core-concepts/07-api-coverage.md +483 -0
- package/docs/user-manual/03-email-operations/01-senders.md +490 -0
- package/docs/user-manual/03-email-operations/02-templates.md +444 -0
- package/docs/user-manual/03-email-operations/03-transactional-emails.md +706 -0
- package/docs/user-manual/03-email-operations/04-email-tracking.md +407 -0
- package/docs/user-manual/04-campaign-management/01-campaigns-basics.md +394 -0
- package/docs/user-manual/04-campaign-management/02-campaign-scheduling.md +630 -0
- package/docs/user-manual/04-campaign-management/03-campaign-testing.md +997 -0
- package/docs/user-manual/04-campaign-management/04-campaign-lifecycle.md +709 -0
- package/docs/user-manual/04-campaign-management/05-campaign-links.md +934 -0
- package/docs/user-manual/05-contact-management/01-lists.md +836 -0
- package/docs/user-manual/05-contact-management/02-contacts.md +1035 -0
- package/docs/user-manual/05-contact-management/03-custom-attributes.md +788 -0
- package/docs/user-manual/05-contact-management/04-segments.md +1028 -0
- package/docs/user-manual/05-contact-management/05-contact-import-export.md +1031 -0
- package/docs/user-manual/06-analytics-reporting/01-campaign-analytics.md +867 -0
- package/docs/user-manual/06-analytics-reporting/02-account-reports.md +227 -0
- package/docs/user-manual/07-integrations/01-webhooks-integration.md +259 -0
- package/docs/user-manual/07-integrations/02-automation.md +326 -0
- package/docs/user-manual/08-advanced-usage/01-scripting-patterns.md +672 -0
- package/docs/user-manual/08-advanced-usage/02-bulk-operations.md +932 -0
- package/docs/user-manual/08-advanced-usage/03-ci-cd-integration.md +892 -0
- package/docs/user-manual/08-advanced-usage/04-performance-optimization.md +766 -0
- package/docs/user-manual/09-command-reference/01-config.md +776 -0
- package/docs/user-manual/09-command-reference/02-account.md +652 -0
- package/docs/user-manual/09-command-reference/03-lists.md +958 -0
- package/docs/user-manual/09-command-reference/04-contacts.md +1408 -0
- package/docs/user-manual/09-command-reference/05-attributes.md +617 -0
- package/docs/user-manual/09-command-reference/06-segments.md +894 -0
- package/docs/user-manual/09-command-reference/07-senders.md +803 -0
- package/docs/user-manual/09-command-reference/08-templates.md +818 -0
- package/docs/user-manual/09-command-reference/09-campaigns.md +1250 -0
- package/docs/user-manual/09-command-reference/10-emails.md +807 -0
- package/docs/user-manual/09-command-reference/11-reports.md +1135 -0
- package/docs/user-manual/09-command-reference/12-webhooks.md +773 -0
- package/docs/user-manual/09-command-reference/13-suppressed.md +797 -0
- package/docs/user-manual/09-command-reference/14-interests.md +630 -0
- package/docs/user-manual/09-command-reference/15-tags.md +584 -0
- package/docs/user-manual/09-command-reference/16-logs.md +656 -0
- package/docs/user-manual/09-command-reference/17-transactional-templates.md +850 -0
- package/docs/user-manual/10-troubleshooting/01-common-errors.md +457 -0
- package/docs/user-manual/10-troubleshooting/02-authentication-issues.md +558 -0
- package/docs/user-manual/10-troubleshooting/03-connection-problems.md +634 -0
- package/docs/user-manual/10-troubleshooting/04-debugging.md +725 -0
- package/docs/user-manual/11-appendix/04-faq.md +484 -0
- package/docs/user-manual/11-appendix/05-glossary.md +250 -0
- package/docs/user-manual/README.md +0 -0
- package/package.json +13 -47
- package/src/cli.ts +125 -0
- package/src/client.ts +16 -0
- package/src/commands/account.ts +267 -0
- package/src/commands/accounts.ts +78 -0
- package/src/commands/actions.ts +249 -0
- package/src/commands/attributes.ts +139 -0
- package/src/commands/campaign-blueprints.ts +106 -0
- package/src/commands/campaigns.ts +469 -0
- package/src/commands/config.ts +77 -0
- package/src/commands/contacts.ts +612 -0
- package/src/commands/custom-attributes.ts +127 -0
- package/src/commands/dkims.ts +117 -0
- package/src/commands/domains.ts +82 -0
- package/src/commands/email-apis.ts +569 -0
- package/src/commands/emails.ts +197 -0
- package/src/commands/forms.ts +283 -0
- package/src/commands/interests.ts +155 -0
- package/src/commands/links.ts +38 -0
- package/src/commands/lists.ts +406 -0
- package/src/commands/logos.ts +71 -0
- package/src/commands/logs.ts +386 -0
- package/src/commands/reports.ts +306 -0
- package/src/commands/segments.ts +158 -0
- package/src/commands/senders.ts +204 -0
- package/src/commands/sub-accounts.ts +271 -0
- package/src/commands/suppressed-emails.ts +234 -0
- package/src/commands/suppressed.ts +198 -0
- package/src/commands/system-emails.ts +85 -0
- package/src/commands/tags.ts +146 -0
- package/src/commands/tasks.ts +116 -0
- package/src/commands/templates.ts +189 -0
- package/src/commands/tokens.ts +83 -0
- package/src/commands/transactional-emails.ts +374 -0
- package/src/commands/transactional-templates.ts +385 -0
- package/src/commands/users.ts +506 -0
- package/src/commands/webhooks.ts +172 -0
- package/src/commands/workflow-blueprints.ts +123 -0
- package/src/commands/workflows.ts +265 -0
- package/src/types/profile.ts +93 -0
- package/src/utils/auth.ts +272 -0
- package/src/utils/config-file.ts +96 -0
- package/src/utils/config.ts +134 -0
- package/src/utils/confirm.ts +32 -0
- package/src/utils/defaults.ts +99 -0
- package/src/utils/errors.ts +116 -0
- package/src/utils/interactive.ts +91 -0
- package/src/utils/list-defaults.ts +74 -0
- package/src/utils/output.ts +190 -0
- package/src/utils/progress.ts +320 -0
- package/src/utils/spinner.ts +22 -0
- package/tests/IMPLEMENTATION_STATUS.md +258 -0
- package/tests/PTY_SETUP.md +118 -0
- package/tests/PTY_TESTING_GUIDE.md +507 -0
- package/tests/README.md +244 -0
- package/tests/fixtures/api-responses/campaigns.json +34 -0
- package/tests/fixtures/test-config.json +13 -0
- package/tests/helpers/cli-runner.ts +128 -0
- package/tests/helpers/mock-server.ts +301 -0
- package/tests/helpers/pty-runner.ts +181 -0
- package/tests/integration/campaigns-real-api.test.ts +196 -0
- package/tests/integration/setup-integration.ts +50 -0
- package/tests/pty/campaigns.test.ts +241 -0
- package/tests/setup.ts +34 -0
- package/tsconfig.json +15 -0
- package/vitest.config.ts +28 -0
package/README.md
CHANGED
|
@@ -25,18 +25,54 @@ npm install -g @cakemail-org/cakemail-cli
|
|
|
25
25
|
npx @cakemail-org/cakemail-cli --help
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## Quick Start
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
No setup required! Just run any command and the CLI will guide you through authentication:
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
cakemail campaigns list
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The CLI will prompt for your email and password, then save OAuth tokens to `~/.cakemail/config.json`.
|
|
37
|
+
|
|
38
|
+
**NEW in v1.7.0**: The CLI now uses OAuth token-based authentication. Your password is never stored - only secure access and refresh tokens are saved.
|
|
39
|
+
|
|
40
|
+
### Profile System (NEW in v1.5.0)
|
|
41
|
+
|
|
42
|
+
Choose a profile that matches your workflow:
|
|
43
|
+
|
|
44
|
+
- **Developer**: Fast, scriptable, no interruptions (JSON output, no prompts, no confirmations)
|
|
45
|
+
- **Marketer**: Guided, interactive, safe (Compact output, prompts, confirmations, tips)
|
|
46
|
+
- **Balanced**: Best of both worlds (Table output, auto-detect prompts, confirmations) - **Default**
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Switch profiles
|
|
50
|
+
cakemail config profile-set developer # For scripts and automation
|
|
51
|
+
cakemail config profile-set marketer # For exploratory work
|
|
52
|
+
cakemail config profile-set balanced # For general use
|
|
53
|
+
|
|
54
|
+
# Preview a profile before switching
|
|
55
|
+
cakemail config preview developer
|
|
56
|
+
|
|
57
|
+
# Override profile for one command
|
|
58
|
+
cakemail --profile developer campaigns list
|
|
59
|
+
|
|
60
|
+
# Disable all prompts for scripting
|
|
61
|
+
cakemail --batch campaigns create --name "Test" --list-id 123 --sender-id 456
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Manual Configuration (Optional)
|
|
35
65
|
|
|
36
|
-
|
|
66
|
+
You can also configure manually with environment variables or `.env` file:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Option 1: Use email/password
|
|
37
70
|
export CAKEMAIL_EMAIL=your@email.com
|
|
38
71
|
export CAKEMAIL_PASSWORD=your_password
|
|
39
72
|
|
|
73
|
+
# Option 2: Use access token
|
|
74
|
+
export CAKEMAIL_ACCESS_TOKEN=your_access_token
|
|
75
|
+
|
|
40
76
|
# Optional: Set default output format
|
|
41
77
|
export CAKEMAIL_OUTPUT_FORMAT=compact # json, table, or compact
|
|
42
78
|
```
|
|
@@ -65,16 +101,19 @@ cakemail [options] <command>
|
|
|
65
101
|
|
|
66
102
|
### Global Options
|
|
67
103
|
|
|
68
|
-
- `-f, --format <format>` - Output format: `json`, `table`, or `compact` (default:
|
|
104
|
+
- `-f, --format <format>` - Output format: `json`, `table`, or `compact` (default depends on profile: developer=json, marketer=compact, balanced=table)
|
|
105
|
+
- `--profile <type>` - Override profile for this command: `developer`, `marketer`, or `balanced`
|
|
106
|
+
- `--batch` - Run in batch/scripting mode (disable all interactive prompts)
|
|
69
107
|
- `--access-token <token>` - Override access token from environment
|
|
70
108
|
- `--email <email>` - Override email from environment
|
|
71
109
|
- `--password <password>` - Override password from environment
|
|
110
|
+
- `--account <id>` - Override account ID for this command
|
|
72
111
|
|
|
73
112
|
### Output Formats
|
|
74
113
|
|
|
75
114
|
The CLI supports three output formats. You can set a default in your `.env` file with `CAKEMAIL_OUTPUT_FORMAT` or override it per-command with the `-f` flag.
|
|
76
115
|
|
|
77
|
-
**Priority:** CLI flag (`-f`) > Environment variable (`CAKEMAIL_OUTPUT_FORMAT`) >
|
|
116
|
+
**Priority:** CLI flag (`-f`) > Environment variable (`CAKEMAIL_OUTPUT_FORMAT`) > Profile default (developer=json, marketer=compact, balanced=table)
|
|
78
117
|
|
|
79
118
|
**JSON** (default) - Full structured data output:
|
|
80
119
|
```bash
|
|
@@ -106,6 +145,57 @@ cakemail -f json campaigns list # Override to JSON
|
|
|
106
145
|
|
|
107
146
|
### Commands
|
|
108
147
|
|
|
148
|
+
#### Account Management (NEW in v1.7.0)
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
# Show current account details
|
|
152
|
+
cakemail account show
|
|
153
|
+
|
|
154
|
+
# List all accessible accounts (parent and sub-accounts)
|
|
155
|
+
cakemail account list
|
|
156
|
+
cakemail account list --page 1 --per-page 20
|
|
157
|
+
|
|
158
|
+
# Switch active account context
|
|
159
|
+
cakemail account use <account-id>
|
|
160
|
+
|
|
161
|
+
# Validate current credentials
|
|
162
|
+
cakemail account test
|
|
163
|
+
|
|
164
|
+
# Logout and clear all credentials
|
|
165
|
+
cakemail account logout # Interactive confirmation
|
|
166
|
+
cakemail account logout --force # Skip confirmation
|
|
167
|
+
# OR
|
|
168
|
+
cakemail logout # Shorthand command
|
|
169
|
+
cakemail logout --force
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
#### Profile Management (v1.5.0+)
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
# Show current profile and settings
|
|
176
|
+
cakemail config profile
|
|
177
|
+
|
|
178
|
+
# Switch to a different profile
|
|
179
|
+
cakemail config profile-set developer # Fast, scriptable
|
|
180
|
+
cakemail config profile-set marketer # Guided, interactive
|
|
181
|
+
cakemail config profile-set balanced # Balanced (default)
|
|
182
|
+
|
|
183
|
+
# Preview a profile without switching
|
|
184
|
+
cakemail config preview developer
|
|
185
|
+
cakemail config preview marketer
|
|
186
|
+
|
|
187
|
+
# Customize individual settings
|
|
188
|
+
cakemail config set output.format table
|
|
189
|
+
cakemail config set behavior.confirm_destructive false
|
|
190
|
+
cakemail config set display.date_format iso8601
|
|
191
|
+
|
|
192
|
+
# Reset all settings to profile defaults
|
|
193
|
+
cakemail config reset
|
|
194
|
+
|
|
195
|
+
# Show complete configuration
|
|
196
|
+
cakemail config show
|
|
197
|
+
```
|
|
198
|
+
|
|
109
199
|
#### Email API v2
|
|
110
200
|
|
|
111
201
|
```bash
|
|
@@ -197,14 +287,21 @@ cakemail campaigns list [options]
|
|
|
197
287
|
# Get campaign details
|
|
198
288
|
cakemail campaigns get <id>
|
|
199
289
|
|
|
200
|
-
# Create a campaign
|
|
290
|
+
# Create a campaign (interactive in marketer/balanced profiles)
|
|
201
291
|
cakemail campaigns create -n "My Campaign" -l <list-id> [options]
|
|
202
|
-
-n, --name <name> Campaign name (
|
|
203
|
-
-l, --list-id <id> List ID (
|
|
204
|
-
-s, --sender-id <id> Sender ID
|
|
292
|
+
-n, --name <name> Campaign name (prompts if missing)
|
|
293
|
+
-l, --list-id <id> List ID (auto-detects or shows selection)
|
|
294
|
+
-s, --sender-id <id> Sender ID (auto-detects or shows selection)
|
|
205
295
|
-t, --template-id <id> Template ID
|
|
206
296
|
--subject <subject> Email subject
|
|
207
297
|
|
|
298
|
+
# Interactive example (marketer profile)
|
|
299
|
+
cakemail campaigns create
|
|
300
|
+
# Prompts: Campaign name? Select list? Select sender?
|
|
301
|
+
|
|
302
|
+
# Non-interactive example (developer profile or --batch)
|
|
303
|
+
cakemail campaigns create --name "Newsletter" --list-id 123 --sender-id 456
|
|
304
|
+
|
|
208
305
|
# Update a campaign
|
|
209
306
|
cakemail campaigns update <id> [options]
|
|
210
307
|
-n, --name <name> Campaign name
|
|
@@ -244,6 +341,16 @@ cakemail campaigns links <id> [options]
|
|
|
244
341
|
-l, --limit <number> Limit results
|
|
245
342
|
-p, --page <number> Page number
|
|
246
343
|
|
|
344
|
+
# Render campaign HTML preview
|
|
345
|
+
cakemail campaigns render <id>
|
|
346
|
+
cakemail campaigns render <id> --contact-id <contact-id>
|
|
347
|
+
|
|
348
|
+
# List campaign revisions
|
|
349
|
+
cakemail campaigns revisions <id>
|
|
350
|
+
|
|
351
|
+
# List campaign blueprints
|
|
352
|
+
cakemail campaigns blueprints
|
|
353
|
+
|
|
247
354
|
# Delete campaign
|
|
248
355
|
cakemail campaigns delete <id> --force
|
|
249
356
|
```
|
|
@@ -261,10 +368,17 @@ cakemail lists list [options]
|
|
|
261
368
|
# Get list details
|
|
262
369
|
cakemail lists get <id>
|
|
263
370
|
|
|
264
|
-
# Create a list
|
|
371
|
+
# Create a list (interactive in marketer/balanced profiles)
|
|
265
372
|
cakemail lists create -n "My List" [options]
|
|
266
|
-
-n, --name <name> List name (
|
|
267
|
-
-l, --language <lang> Language code (
|
|
373
|
+
-n, --name <name> List name (prompts if missing)
|
|
374
|
+
-l, --language <lang> Language code (optional, prompts in interactive mode)
|
|
375
|
+
|
|
376
|
+
# Interactive example
|
|
377
|
+
cakemail lists create
|
|
378
|
+
# Prompts: List name? Language code (optional)?
|
|
379
|
+
|
|
380
|
+
# Non-interactive example
|
|
381
|
+
cakemail lists create --name "Newsletter Subscribers" --language en
|
|
268
382
|
|
|
269
383
|
# Delete list
|
|
270
384
|
cakemail lists delete <id> --force
|
|
@@ -510,6 +624,151 @@ cakemail emails logs --tag newsletter --status delivered
|
|
|
510
624
|
cakemail emails tags
|
|
511
625
|
```
|
|
512
626
|
|
|
627
|
+
#### Tags (NEW in v1.6.0)
|
|
628
|
+
|
|
629
|
+
```bash
|
|
630
|
+
# List all tags
|
|
631
|
+
cakemail tags list <list-id>
|
|
632
|
+
-p, --page <number> Page number
|
|
633
|
+
--per-page <number> Results per page
|
|
634
|
+
--with-count Include total count
|
|
635
|
+
|
|
636
|
+
# Show tag details
|
|
637
|
+
cakemail tags show <list-id> <tag-id>
|
|
638
|
+
|
|
639
|
+
# Create a tag
|
|
640
|
+
cakemail tags create <list-id> -n "vip" -d "VIP customers"
|
|
641
|
+
-n, --name <name> Tag name (required)
|
|
642
|
+
-d, --description <text> Tag description
|
|
643
|
+
|
|
644
|
+
# Update a tag
|
|
645
|
+
cakemail tags update <list-id> <tag-id> -n "premium" -d "Premium members"
|
|
646
|
+
-n, --name <name> New tag name
|
|
647
|
+
-d, --description <text> New description
|
|
648
|
+
|
|
649
|
+
# Delete a tag
|
|
650
|
+
cakemail tags delete <list-id> <tag-id> --force
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
#### Interests (NEW in v1.6.0)
|
|
654
|
+
|
|
655
|
+
```bash
|
|
656
|
+
# List all interests
|
|
657
|
+
cakemail interests list <list-id>
|
|
658
|
+
-p, --page <number> Page number
|
|
659
|
+
--per-page <number> Results per page
|
|
660
|
+
--with-count Include total count
|
|
661
|
+
|
|
662
|
+
# Show interest details
|
|
663
|
+
cakemail interests show <list-id> <interest-id>
|
|
664
|
+
|
|
665
|
+
# Create an interest
|
|
666
|
+
cakemail interests create <list-id> -n "Product Updates" -d "Receive product announcements"
|
|
667
|
+
-n, --name <name> Interest name (required)
|
|
668
|
+
-d, --description <text> Interest description
|
|
669
|
+
|
|
670
|
+
# Update an interest
|
|
671
|
+
cakemail interests update <list-id> <interest-id> -n "News" -d "Newsletter updates"
|
|
672
|
+
-n, --name <name> New interest name
|
|
673
|
+
-d, --description <text> New description
|
|
674
|
+
|
|
675
|
+
# Delete an interest
|
|
676
|
+
cakemail interests delete <list-id> <interest-id> --force
|
|
677
|
+
|
|
678
|
+
# Manage contact interests
|
|
679
|
+
cakemail contacts add-interests <list-id> -i "Product Updates,News" -c "1,2,3"
|
|
680
|
+
cakemail contacts add-interests <list-id> -i "Newsletter" -q "status='subscribed'"
|
|
681
|
+
cakemail contacts remove-interests <list-id> -i "Old Interest" -c "1,2,3"
|
|
682
|
+
-i, --interests <interests> Comma-separated interest names (required)
|
|
683
|
+
-c, --contacts <ids> Comma-separated contact IDs
|
|
684
|
+
-q, --query <query> SQL query to select contacts
|
|
685
|
+
```
|
|
686
|
+
|
|
687
|
+
#### Activity Logs (NEW in v1.6.0)
|
|
688
|
+
|
|
689
|
+
```bash
|
|
690
|
+
# Campaign activity logs
|
|
691
|
+
cakemail logs campaign <campaign-id>
|
|
692
|
+
--from <date> Filter by start date (YYYY-MM-DD)
|
|
693
|
+
--to <date> Filter by end date (YYYY-MM-DD)
|
|
694
|
+
--status <status> Filter by status
|
|
695
|
+
-p, --page <number> Page number
|
|
696
|
+
--per-page <number> Results per page
|
|
697
|
+
|
|
698
|
+
# List activity logs
|
|
699
|
+
cakemail logs list <list-id>
|
|
700
|
+
--from <date> Filter by start date
|
|
701
|
+
--to <date> Filter by end date
|
|
702
|
+
--status <status> Filter by status
|
|
703
|
+
-p, --page <number> Page number
|
|
704
|
+
--per-page <number> Results per page
|
|
705
|
+
|
|
706
|
+
# Show single log entry
|
|
707
|
+
cakemail logs show <list-id> <log-id>
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
#### Transactional Templates (NEW in v1.6.0)
|
|
711
|
+
|
|
712
|
+
```bash
|
|
713
|
+
# List transactional templates
|
|
714
|
+
cakemail transactional-templates list [list-id]
|
|
715
|
+
-p, --page <number> Page number
|
|
716
|
+
--per-page <number> Results per page
|
|
717
|
+
--with-count Include total count
|
|
718
|
+
|
|
719
|
+
# Show template details
|
|
720
|
+
cakemail transactional-templates show [list-id] <template-id>
|
|
721
|
+
|
|
722
|
+
# Create a transactional template
|
|
723
|
+
cakemail transactional-templates create [list-id] \
|
|
724
|
+
-n "Order Confirmation" \
|
|
725
|
+
-s "Your Order #{{order_id}}" \
|
|
726
|
+
--html "<h1>Order Confirmation</h1>" \
|
|
727
|
+
--sender-id 123
|
|
728
|
+
-n, --name <name> Template name (required)
|
|
729
|
+
-s, --subject <subject> Email subject (required)
|
|
730
|
+
--html <html> HTML content (required)
|
|
731
|
+
--text <text> Plain text content
|
|
732
|
+
--sender-id <id> Sender ID
|
|
733
|
+
--tracking <tracking> Tracking settings
|
|
734
|
+
|
|
735
|
+
# Update a template
|
|
736
|
+
cakemail transactional-templates update [list-id] <template-id> \
|
|
737
|
+
-n "New Name" \
|
|
738
|
+
-s "New Subject"
|
|
739
|
+
-n, --name <name> Template name
|
|
740
|
+
-s, --subject <subject> Email subject
|
|
741
|
+
--html <html> HTML content
|
|
742
|
+
--text <text> Plain text content
|
|
743
|
+
--sender-id <id> Sender ID
|
|
744
|
+
--tracking <tracking> Tracking settings
|
|
745
|
+
|
|
746
|
+
# Delete a template
|
|
747
|
+
cakemail transactional-templates delete [list-id] <template-id> --force
|
|
748
|
+
|
|
749
|
+
# Send transactional email from template
|
|
750
|
+
cakemail transactional-templates send [list-id] <template-id> \
|
|
751
|
+
-c 456 \
|
|
752
|
+
--variables '{"order_id":"12345"}'
|
|
753
|
+
-c, --contact-id <id> Contact ID to send to
|
|
754
|
+
-e, --email <email> Email address (alternative to contact-id)
|
|
755
|
+
--variables <json> Template variables as JSON
|
|
756
|
+
|
|
757
|
+
# Send test email
|
|
758
|
+
cakemail transactional-templates test [list-id] <template-id> \
|
|
759
|
+
-e "test@example.com" \
|
|
760
|
+
--variables '{"order_id":"TEST"}'
|
|
761
|
+
-e, --email <email> Email address (required)
|
|
762
|
+
--variables <json> Template variables as JSON
|
|
763
|
+
|
|
764
|
+
# Render template preview
|
|
765
|
+
cakemail transactional-templates render [list-id] <template-id> \
|
|
766
|
+
-c 456 \
|
|
767
|
+
--variables '{"order_id":"12345"}'
|
|
768
|
+
-c, --contact-id <id> Contact ID for personalization
|
|
769
|
+
--variables <json> Template variables as JSON
|
|
770
|
+
```
|
|
771
|
+
|
|
513
772
|
## Examples
|
|
514
773
|
|
|
515
774
|
```bash
|
|
@@ -591,10 +850,55 @@ npm start -- campaigns list
|
|
|
591
850
|
node dist/cli.js campaigns list
|
|
592
851
|
```
|
|
593
852
|
|
|
853
|
+
### Testing
|
|
854
|
+
|
|
855
|
+
The CLI has a comprehensive test suite:
|
|
856
|
+
|
|
857
|
+
```bash
|
|
858
|
+
# Run all tests
|
|
859
|
+
npm test
|
|
860
|
+
|
|
861
|
+
# Run integration tests (requires real API credentials)
|
|
862
|
+
npm run test:integration
|
|
863
|
+
|
|
864
|
+
# Run PTY tests
|
|
865
|
+
npm run test:pty
|
|
866
|
+
|
|
867
|
+
# Generate coverage report
|
|
868
|
+
npm run test:coverage
|
|
869
|
+
|
|
870
|
+
# Watch mode for development
|
|
871
|
+
npm run test:watch
|
|
872
|
+
```
|
|
873
|
+
|
|
874
|
+
**Test Types:**
|
|
875
|
+
|
|
876
|
+
1. **Integration Tests** - Test against real Cakemail API
|
|
877
|
+
- Requires credentials in `.env` file
|
|
878
|
+
- Tests real API calls and responses
|
|
879
|
+
- Currently: 6 tests (skipped unless credentials provided)
|
|
880
|
+
|
|
881
|
+
2. **PTY Tests** - Simulate real terminal user experience
|
|
882
|
+
- Tests colors, spinners, interactive prompts
|
|
883
|
+
- Tests all output formats (JSON, table, compact)
|
|
884
|
+
- Uses mock HTTP server for isolated testing
|
|
885
|
+
- 16 tests covering authentication, campaigns, profiles, and more
|
|
886
|
+
|
|
887
|
+
**Setting up Integration Tests:**
|
|
888
|
+
|
|
889
|
+
Create a `.env` file with test credentials:
|
|
890
|
+
|
|
891
|
+
```bash
|
|
892
|
+
CAKEMAIL_EMAIL=your_test_account@example.com
|
|
893
|
+
CAKEMAIL_PASSWORD=your_test_password
|
|
894
|
+
```
|
|
895
|
+
|
|
896
|
+
See `tests/PTY_TESTING_GUIDE.md` for complete testing documentation.
|
|
897
|
+
|
|
594
898
|
## License
|
|
595
899
|
|
|
596
900
|
MIT
|
|
597
901
|
|
|
598
902
|
## Support
|
|
599
903
|
|
|
600
|
-
For issues and questions, please visit: https://github.com/cakemail/cli/issues
|
|
904
|
+
For issues and questions, please visit: https://github.com/cakemail/cakemail-cli/issues
|
package/audit-formats.js
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// ABOUTME: Audits all commands to check for output format mapping issues
|
|
3
|
+
// ABOUTME: Identifies commands that don't properly handle compact/table/json formats
|
|
4
|
+
|
|
5
|
+
import fs from 'fs';
|
|
6
|
+
import path from 'path';
|
|
7
|
+
import { fileURLToPath } from 'url';
|
|
8
|
+
|
|
9
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
+
const __dirname = path.dirname(__filename);
|
|
11
|
+
|
|
12
|
+
const commandsDir = path.join(__dirname, 'src', 'commands');
|
|
13
|
+
const issues = [];
|
|
14
|
+
const report = {
|
|
15
|
+
totalCommands: 0,
|
|
16
|
+
commandsChecked: [],
|
|
17
|
+
issues: [],
|
|
18
|
+
warnings: []
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// Read all command files
|
|
22
|
+
const files = fs.readdirSync(commandsDir).filter(f => f.endsWith('.ts'));
|
|
23
|
+
|
|
24
|
+
files.forEach(file => {
|
|
25
|
+
const filePath = path.join(commandsDir, file);
|
|
26
|
+
const content = fs.readFileSync(filePath, 'utf8');
|
|
27
|
+
const commandName = file.replace('.ts', '');
|
|
28
|
+
|
|
29
|
+
report.totalCommands++;
|
|
30
|
+
report.commandsChecked.push(commandName);
|
|
31
|
+
|
|
32
|
+
// Check 1: Does it call formatter.output()?
|
|
33
|
+
const hasFormatterOutput = content.includes('formatter.output(');
|
|
34
|
+
|
|
35
|
+
// Check 2: Does it pass data correctly?
|
|
36
|
+
const formatterOutputCalls = content.match(/formatter\.output\([^)]+\)/g) || [];
|
|
37
|
+
|
|
38
|
+
// Check 3: Are there any direct console.log calls that bypass formatter?
|
|
39
|
+
const consoleLogCalls = content.match(/console\.(log|error|warn|info)\(/g) || [];
|
|
40
|
+
const legitimateConsoleCalls = content.match(/console\.(log|error|warn|info)\((spinner|chalk|'✓|'✗|'ℹ)/g) || [];
|
|
41
|
+
const suspiciousConsoleCalls = consoleLogCalls.length - legitimateConsoleCalls.length;
|
|
42
|
+
|
|
43
|
+
// Check 4: Does it handle paginated data?
|
|
44
|
+
const handlesPagination = content.includes('data.data') || content.includes('pagination');
|
|
45
|
+
|
|
46
|
+
// Check 5: Does it pass fields parameter to formatter.output()?
|
|
47
|
+
const passesFields = formatterOutputCalls.some(call => call.includes(','));
|
|
48
|
+
|
|
49
|
+
// Report findings
|
|
50
|
+
const commandIssues = [];
|
|
51
|
+
|
|
52
|
+
if (!hasFormatterOutput) {
|
|
53
|
+
commandIssues.push({
|
|
54
|
+
type: 'ERROR',
|
|
55
|
+
message: 'Command does not call formatter.output()',
|
|
56
|
+
file: file
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
if (suspiciousConsoleCalls > 0) {
|
|
61
|
+
commandIssues.push({
|
|
62
|
+
type: 'WARNING',
|
|
63
|
+
message: `Found ${suspiciousConsoleCalls} console.log calls that might bypass formatter`,
|
|
64
|
+
file: file,
|
|
65
|
+
details: 'These calls may show output only in some formats'
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
formatterOutputCalls.forEach(call => {
|
|
70
|
+
// Check if passing undefined or incomplete data
|
|
71
|
+
if (call.includes('undefined') || call.includes('null')) {
|
|
72
|
+
commandIssues.push({
|
|
73
|
+
type: 'ERROR',
|
|
74
|
+
message: 'formatter.output() called with undefined/null data',
|
|
75
|
+
file: file,
|
|
76
|
+
call: call
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Check if wrapping single object in array unnecessarily
|
|
81
|
+
if (call.match(/formatter\.output\(\[.*\]\)/)) {
|
|
82
|
+
commandIssues.push({
|
|
83
|
+
type: 'WARNING',
|
|
84
|
+
message: 'formatter.output() called with array wrapper - may cause issues',
|
|
85
|
+
file: file,
|
|
86
|
+
call: call
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
if (commandIssues.length > 0) {
|
|
92
|
+
report.issues.push({
|
|
93
|
+
command: commandName,
|
|
94
|
+
file: file,
|
|
95
|
+
issues: commandIssues
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
// Generate report
|
|
101
|
+
console.log('\n=== OUTPUT FORMAT AUDIT REPORT ===\n');
|
|
102
|
+
console.log(`Total commands checked: ${report.totalCommands}`);
|
|
103
|
+
console.log(`Commands: ${report.commandsChecked.join(', ')}\n`);
|
|
104
|
+
|
|
105
|
+
if (report.issues.length === 0) {
|
|
106
|
+
console.log('✓ No issues found! All commands properly use formatter.output()\n');
|
|
107
|
+
} else {
|
|
108
|
+
console.log(`✗ Found issues in ${report.issues.length} commands:\n`);
|
|
109
|
+
|
|
110
|
+
report.issues.forEach(({ command, file, issues }) => {
|
|
111
|
+
console.log(`\n${command} (${file}):`);
|
|
112
|
+
issues.forEach(issue => {
|
|
113
|
+
const icon = issue.type === 'ERROR' ? '✗' : '⚠';
|
|
114
|
+
console.log(` ${icon} ${issue.type}: ${issue.message}`);
|
|
115
|
+
if (issue.details) {
|
|
116
|
+
console.log(` ${issue.details}`);
|
|
117
|
+
}
|
|
118
|
+
if (issue.call) {
|
|
119
|
+
console.log(` Call: ${issue.call}`);
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
console.log('\n=== END REPORT ===\n');
|
|
126
|
+
|
|
127
|
+
// Exit with error code if issues found
|
|
128
|
+
process.exit(report.issues.length > 0 ? 1 : 0);
|
package/cakemail.rb
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
class CakemailCli < Formula
|
|
2
|
+
desc "Official command-line interface for the Cakemail API"
|
|
3
|
+
homepage "https://github.com/cakemail/cakemail-cli"
|
|
4
|
+
url "https://registry.npmjs.org/@cakemail-org/cakemail-cli/-/cakemail-cli-1.2.0.tgz"
|
|
5
|
+
sha256 "c8d3eae160a892e32837db3dcae515e843e5383fef52b8141940c8bcf8b6d59f"
|
|
6
|
+
license "MIT"
|
|
7
|
+
|
|
8
|
+
depends_on "node"
|
|
9
|
+
|
|
10
|
+
def install
|
|
11
|
+
system "npm", "install", *std_npm_args
|
|
12
|
+
bin.install_symlink Dir["#{libexec}/bin/*"]
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
test do
|
|
16
|
+
# Test that binary exists and is executable
|
|
17
|
+
assert_predicate bin/"cakemail", :exist?
|
|
18
|
+
assert_predicate bin/"cakemail", :executable?
|
|
19
|
+
end
|
|
20
|
+
end
|
package/dist/cli.js
CHANGED
|
@@ -15,14 +15,19 @@ import { createSegmentsCommand } from './commands/segments.js';
|
|
|
15
15
|
import { createAttributesCommand } from './commands/attributes.js';
|
|
16
16
|
import { createSuppressedCommand } from './commands/suppressed.js';
|
|
17
17
|
import { createAccountCommand } from './commands/account.js';
|
|
18
|
+
import { createTagsCommand } from './commands/tags.js';
|
|
19
|
+
import { createInterestsCommand } from './commands/interests.js';
|
|
20
|
+
import { createLogsCommand } from './commands/logs.js';
|
|
21
|
+
import { createTransactionalTemplatesCommand } from './commands/transactional-templates.js';
|
|
18
22
|
import { registerConfigCommands } from './commands/config.js';
|
|
23
|
+
import { getProfileConfig } from './utils/config-file.js';
|
|
19
24
|
import chalk from 'chalk';
|
|
20
25
|
async function main() {
|
|
21
26
|
const program = new Command();
|
|
22
27
|
program
|
|
23
28
|
.name('cakemail')
|
|
24
29
|
.description('Official Cakemail CLI - Command-line interface for the Cakemail API')
|
|
25
|
-
.version('1.
|
|
30
|
+
.version('1.7.0')
|
|
26
31
|
.option('-f, --format <format>', 'Output format (json|table|compact)')
|
|
27
32
|
.option('--profile <type>', 'Override profile for this command (developer|marketer|balanced)')
|
|
28
33
|
.option('--batch', 'Run in batch/scripting mode (disable all interactive prompts)')
|
|
@@ -33,15 +38,24 @@ async function main() {
|
|
|
33
38
|
try {
|
|
34
39
|
// Check if this is a help/version command that doesn't need credentials
|
|
35
40
|
const args = process.argv.slice(2);
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
args
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
// Check if it's root-level help/version (single flag only)
|
|
42
|
+
const isRootHelp = (args.length === 1) &&
|
|
43
|
+
(args[0] === '-h' || args[0] === '--help' ||
|
|
44
|
+
args[0] === '-V' || args[0] === '--version');
|
|
45
|
+
// Check if it's a help request for any subcommand
|
|
46
|
+
const isSubcommandHelp = args.includes('-h') || args.includes('--help');
|
|
47
|
+
// For root help/version only, skip auth and commands
|
|
48
|
+
if (isRootHelp) {
|
|
49
|
+
await program.parseAsync(process.argv);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
// For subcommand help, we need to add commands but can skip auth
|
|
53
|
+
// For everything else, we need full auth
|
|
54
|
+
const needsAuth = !isSubcommandHelp;
|
|
41
55
|
// Get config with interactive authentication if needed
|
|
42
|
-
const config = await getConfig(
|
|
43
|
-
// Create client and formatter
|
|
44
|
-
const client = new CakemailClient(config);
|
|
56
|
+
const config = await getConfig(needsAuth, needsAuth);
|
|
57
|
+
// Create client and formatter (use dummy values for help commands)
|
|
58
|
+
const client = new CakemailClient(needsAuth ? config : { accessToken: 'dummy', profileConfig: config.profileConfig });
|
|
45
59
|
const formatter = new OutputFormatter(() => {
|
|
46
60
|
const opts = program.opts();
|
|
47
61
|
// Override config with CLI options
|
|
@@ -63,7 +77,6 @@ async function main() {
|
|
|
63
77
|
}
|
|
64
78
|
// Handle --profile override
|
|
65
79
|
if (opts.profile) {
|
|
66
|
-
const { getProfileConfig } = require('./utils/config-file.js');
|
|
67
80
|
const validProfiles = ['developer', 'marketer', 'balanced'];
|
|
68
81
|
if (!validProfiles.includes(opts.profile)) {
|
|
69
82
|
console.error(chalk.red(`Invalid profile: ${opts.profile}`));
|
|
@@ -89,6 +102,10 @@ async function main() {
|
|
|
89
102
|
program.addCommand(createSegmentsCommand(client, formatter));
|
|
90
103
|
program.addCommand(createAttributesCommand(client, formatter));
|
|
91
104
|
program.addCommand(createSuppressedCommand(client, formatter));
|
|
105
|
+
program.addCommand(createTagsCommand(client, formatter));
|
|
106
|
+
program.addCommand(createInterestsCommand(client, formatter));
|
|
107
|
+
program.addCommand(createLogsCommand(client, formatter));
|
|
108
|
+
program.addCommand(createTransactionalTemplatesCommand(client, formatter));
|
|
92
109
|
// Parse
|
|
93
110
|
await program.parseAsync(process.argv);
|
|
94
111
|
}
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAgB,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;A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CAAC"}
|
package/dist/client.d.ts
CHANGED
package/dist/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,GAAG,EAAwB,MAAM,4BAA4B,CAAC;AAEzF,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,qBAAa,cAAc;IAClB,GAAG,EAAE,GAAG,CAAC;IAChB,OAAO,CAAC,MAAM,CAAiB;gBAEnB,MAAM,EAAE,cAAc;
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,GAAG,EAAwB,MAAM,4BAA4B,CAAC;AAEzF,MAAM,WAAW,cAAc;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,qBAAa,cAAc;IAClB,GAAG,EAAE,GAAG,CAAC;IAChB,OAAO,CAAC,MAAM,CAAiB;gBAEnB,MAAM,EAAE,cAAc;IAyBlC;;;OAGG;IACG,GAAG,CAAC,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,GAAG,CAAA;KAAE,GAAG,OAAO,CAAC,CAAC,CAAC;IAMhE,IAAI,CAAC,CAAC,GAAG,GAAG,EAAE,GAA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