commet 0.7.4 → 0.8.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 +44 -259
- package/dist/index.js +78 -79
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,301 +1,86 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
|
+
<p align="center">
|
|
3
|
+
<a href="https://commet.co">
|
|
4
|
+
<img src="https://commet.co/logo-bg-dark.png" height="96">
|
|
5
|
+
<h3 align="center">Commet CLI</h3>
|
|
6
|
+
</a>
|
|
7
|
+
</p>
|
|
8
|
+
<p>CLI for Commet billing platform</p>
|
|
2
9
|
|
|
3
|
-
|
|
10
|
+
<a href="https://www.npmjs.com/package/commet"><img alt="NPM version" src="https://img.shields.io/npm/v/commet.svg?style=for-the-badge&labelColor=000000"></a>
|
|
11
|
+
<a href="https://docs.commet.co/docs/library/cli/overview"><img alt="Documentation" src="https://img.shields.io/badge/docs-CLI-blue.svg?style=for-the-badge&labelColor=000000"></a>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<br/>
|
|
4
15
|
|
|
5
16
|
## Installation
|
|
6
17
|
|
|
7
18
|
```bash
|
|
8
19
|
npm install -g commet
|
|
9
|
-
# or
|
|
10
|
-
pnpm add -g commet
|
|
11
|
-
# or
|
|
12
|
-
yarn global add commet
|
|
13
20
|
```
|
|
14
21
|
|
|
15
22
|
## Quick Start
|
|
16
23
|
|
|
17
24
|
```bash
|
|
18
|
-
#
|
|
19
|
-
commet login
|
|
20
|
-
|
|
21
|
-
# 2. Navigate to your project directory
|
|
22
|
-
cd apps/dashboard # Recommended: use TypeScript project with tsconfig.json
|
|
23
|
-
|
|
24
|
-
# 3. Link your project to an organization
|
|
25
|
-
commet link
|
|
26
|
-
|
|
27
|
-
# 4. Generate TypeScript types (automatically updates tsconfig.json and .gitignore if found)
|
|
28
|
-
commet pull
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Commands
|
|
32
|
-
|
|
33
|
-
### Authentication
|
|
34
|
-
|
|
35
|
-
#### `commet login`
|
|
36
|
-
|
|
37
|
-
Authenticate with Commet using OAuth device flow.
|
|
38
|
-
|
|
39
|
-
```bash
|
|
25
|
+
# Authenticate
|
|
40
26
|
commet login
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Prompts you to select an environment (Sandbox or Production), then opens your browser to authenticate. Creates `~/.commet/auth.json` with your credentials.
|
|
44
|
-
|
|
45
|
-
**Important:** Sandbox and Production are completely isolated platforms with separate accounts:
|
|
46
|
-
- **Sandbox**: `sandbox.commet.co` - Development and testing
|
|
47
|
-
- **Production**: `commet.co` - Live billing operations
|
|
48
|
-
|
|
49
|
-
Make sure to login to the correct environment for your needs.
|
|
50
|
-
|
|
51
|
-
#### `commet logout`
|
|
52
|
-
|
|
53
|
-
Log out and remove stored credentials.
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
commet logout
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
#### `commet whoami`
|
|
60
|
-
|
|
61
|
-
Display current authentication and project status.
|
|
62
|
-
|
|
63
|
-
```bash
|
|
64
|
-
commet whoami
|
|
65
|
-
```
|
|
66
27
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
#### `commet link`
|
|
70
|
-
|
|
71
|
-
Link the current directory to a Commet organization.
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
cd apps/dashboard
|
|
28
|
+
# Link to organization
|
|
75
29
|
commet link
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
**What it does:**
|
|
79
|
-
- Creates `.commet/config.json` with organization configuration
|
|
80
|
-
- Works anywhere, but for best experience use a TypeScript project directory
|
|
81
|
-
|
|
82
|
-
#### `commet unlink`
|
|
83
|
-
|
|
84
|
-
Unlink the current directory from Commet.
|
|
85
30
|
|
|
86
|
-
|
|
87
|
-
commet unlink
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
#### `commet switch`
|
|
91
|
-
|
|
92
|
-
Switch to a different organization or environment.
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
commet switch
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
#### `commet info`
|
|
99
|
-
|
|
100
|
-
Display detailed information about the current project.
|
|
101
|
-
|
|
102
|
-
```bash
|
|
103
|
-
commet info
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
### Type Generation
|
|
107
|
-
|
|
108
|
-
#### `commet pull`
|
|
109
|
-
|
|
110
|
-
Generate TypeScript type definitions from your Commet configuration.
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
cd apps/dashboard # Recommended: TypeScript project directory
|
|
31
|
+
# Generate types
|
|
114
32
|
commet pull
|
|
115
33
|
```
|
|
116
34
|
|
|
117
|
-
|
|
118
|
-
1. Generates `.commet/types.d.ts` with your event and seat types
|
|
119
|
-
2. Automatically updates `tsconfig.json` to include the types file (if found)
|
|
120
|
-
3. Automatically updates `.gitignore` to exclude `.commet/` directory
|
|
121
|
-
|
|
122
|
-
**Note:** Works anywhere, but if no `tsconfig.json` is found, you'll need to manually configure TypeScript to include the generated types.
|
|
35
|
+
## Type Generation
|
|
123
36
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
```typescript
|
|
127
|
-
// .commet/types.d.ts
|
|
128
|
-
declare module '@commet/node' {
|
|
129
|
-
interface CommetGeneratedTypes {
|
|
130
|
-
eventType: "api_call" | "email_sent" | "payment_processed";
|
|
131
|
-
seatType: "admin" | "editor" | "viewer";
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
export {};
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
**Usage with the SDK:**
|
|
37
|
+
The CLI generates TypeScript types from your organization for type-safe autocomplete:
|
|
139
38
|
|
|
140
39
|
```typescript
|
|
40
|
+
// After running 'commet pull'
|
|
141
41
|
import { Commet } from '@commet/node';
|
|
142
42
|
|
|
143
43
|
const commet = new Commet({ apiKey: '...' });
|
|
144
44
|
|
|
145
|
-
|
|
146
|
-
await commet.usage.events.create({
|
|
147
|
-
customerId: 'cus_123',
|
|
45
|
+
await commet.usage.create({
|
|
148
46
|
eventType: 'api_call', // Autocomplete works!
|
|
149
|
-
|
|
47
|
+
customerId: 'cus_123'
|
|
150
48
|
});
|
|
151
49
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
### Type Inspection
|
|
157
|
-
|
|
158
|
-
#### `commet list events`
|
|
159
|
-
|
|
160
|
-
List all event types in your organization.
|
|
161
|
-
|
|
162
|
-
```bash
|
|
163
|
-
commet list events
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
#### `commet list seats`
|
|
167
|
-
|
|
168
|
-
List all seat types in your organization.
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
commet list seats
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
## Configuration Files
|
|
175
|
-
|
|
176
|
-
### Global Config (`~/.commet/auth.json`)
|
|
177
|
-
|
|
178
|
-
Stores authentication credentials. Created by `commet login`.
|
|
179
|
-
|
|
180
|
-
```json
|
|
181
|
-
{
|
|
182
|
-
"token": "...",
|
|
183
|
-
"refreshToken": "...",
|
|
184
|
-
"expiresAt": 1234567890,
|
|
185
|
-
"environment": "sandbox"
|
|
186
|
-
}
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
The `environment` field determines which platform your authentication is for (sandbox or production).
|
|
190
|
-
|
|
191
|
-
### Project Config (`.commet/config.json`)
|
|
192
|
-
|
|
193
|
-
Stores project-specific configuration. Created by `commet link`.
|
|
194
|
-
|
|
195
|
-
```json
|
|
196
|
-
{
|
|
197
|
-
"orgId": "org_123",
|
|
198
|
-
"orgName": "My Organization",
|
|
199
|
-
"environment": "sandbox"
|
|
200
|
-
}
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
**Note:** The `.commet/` directory is automatically added to `.gitignore` by `commet pull`. This directory contains:
|
|
204
|
-
- `config.json` - Project configuration
|
|
205
|
-
- `types.d.ts` - Generated TypeScript type definitions
|
|
206
|
-
|
|
207
|
-
Add `.commet/` to `.gitignore` if different developers use different organizations.
|
|
208
|
-
|
|
209
|
-
## Environments
|
|
210
|
-
|
|
211
|
-
Commet supports two completely isolated environments:
|
|
212
|
-
|
|
213
|
-
- **Sandbox** (`sandbox.commet.co`): Development and testing with separate data
|
|
214
|
-
- **Production** (`commet.co`): Live billing operations with real customers
|
|
215
|
-
|
|
216
|
-
**Important:** Each environment requires separate authentication because they are independent platforms. To work with both:
|
|
217
|
-
|
|
218
|
-
1. Login to sandbox: `commet login` → Select "Sandbox"
|
|
219
|
-
2. Do your work in sandbox
|
|
220
|
-
3. When ready for production: `commet logout` → `commet login` → Select "Production"
|
|
221
|
-
|
|
222
|
-
Organizations and data do NOT transfer between environments.
|
|
223
|
-
|
|
224
|
-
## Workflow
|
|
225
|
-
|
|
226
|
-
Typical development workflow:
|
|
227
|
-
|
|
228
|
-
```bash
|
|
229
|
-
# 1. One-time setup (Sandbox)
|
|
230
|
-
commet login # Select "Sandbox"
|
|
231
|
-
cd apps/dashboard # Navigate to your TypeScript project (must have tsconfig.json)
|
|
232
|
-
commet link # Choose your organization
|
|
233
|
-
commet pull # Generate types (auto-updates tsconfig.json and .gitignore)
|
|
234
|
-
|
|
235
|
-
# 2. Develop with type-safe autocomplete
|
|
236
|
-
# Your IDE now has full autocomplete for event and seat types!
|
|
237
|
-
|
|
238
|
-
# 3. When you add/change event or seat types in dashboard
|
|
239
|
-
commet pull # Regenerate types
|
|
240
|
-
|
|
241
|
-
# 4. When ready for production
|
|
242
|
-
commet logout
|
|
243
|
-
commet login # Select "Production"
|
|
244
|
-
cd apps/dashboard # Same TypeScript project directory
|
|
245
|
-
commet link # Link to production organization
|
|
246
|
-
commet pull # Generate production types
|
|
50
|
+
await commet.subscriptions.create({
|
|
51
|
+
productId: 'prod_xxx', // Autocomplete with your products!
|
|
52
|
+
customerId: 'cus_123'
|
|
53
|
+
});
|
|
247
54
|
```
|
|
248
55
|
|
|
249
|
-
##
|
|
250
|
-
|
|
251
|
-
### "Not authenticated"
|
|
252
|
-
|
|
253
|
-
Run `commet login` to authenticate.
|
|
254
|
-
|
|
255
|
-
### "No tsconfig.json found" (Warning)
|
|
256
|
-
|
|
257
|
-
This is just a warning - the CLI will still work, but won't automatically update your `tsconfig.json`.
|
|
258
|
-
|
|
259
|
-
For the best experience, run commands from a TypeScript project directory:
|
|
56
|
+
## Commands
|
|
260
57
|
|
|
261
58
|
```bash
|
|
262
|
-
|
|
263
|
-
commet
|
|
264
|
-
commet
|
|
59
|
+
commet login # Authenticate with Commet
|
|
60
|
+
commet logout # Remove credentials
|
|
61
|
+
commet link # Link project to organization
|
|
62
|
+
commet pull # Generate TypeScript types
|
|
63
|
+
commet info # Show project status
|
|
64
|
+
commet list events # List event types
|
|
65
|
+
commet list seats # List seat types
|
|
265
66
|
```
|
|
266
67
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
### "Project not linked"
|
|
270
|
-
|
|
271
|
-
Run `commet link` to connect your project to an organization.
|
|
68
|
+
## Documentation
|
|
272
69
|
|
|
273
|
-
|
|
70
|
+
Visit [docs.commet.co/cli](https://docs.commet.co/cli) for:
|
|
274
71
|
|
|
275
|
-
|
|
72
|
+
- Complete command reference
|
|
73
|
+
- Configuration guide
|
|
74
|
+
- Workflow examples
|
|
75
|
+
- Troubleshooting
|
|
276
76
|
|
|
277
|
-
|
|
77
|
+
## Resources
|
|
278
78
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
"include": [".commet/types.d.ts", "src/**/*"]
|
|
284
|
-
}
|
|
285
|
-
```
|
|
286
|
-
|
|
287
|
-
### Authentication expired
|
|
288
|
-
|
|
289
|
-
Run `commet login` again. Tokens expire after a certain period.
|
|
290
|
-
|
|
291
|
-
## Links
|
|
292
|
-
|
|
293
|
-
- [Documentation](https://docs.commet.co)
|
|
294
|
-
- [API Reference](https://docs.commet.co/api)
|
|
295
|
-
- [GitHub](https://github.com/commet-labs/commet-node)
|
|
296
|
-
- [Issues](https://github.com/commet-labs/commet-node/issues)
|
|
79
|
+
- [CLI Documentation](https://docs.commet.co/docs/library/cli/overview)
|
|
80
|
+
- [SDK Reference](https://docs.commet.co/docs/library/quickstart)
|
|
81
|
+
- [GitHub](https://github.com/commet-labs/commet)
|
|
82
|
+
- [Issues](https://github.com/commet-labs/commet/issues)
|
|
297
83
|
|
|
298
84
|
## License
|
|
299
85
|
|
|
300
86
|
MIT
|
|
301
|
-
|
package/dist/index.js
CHANGED
|
@@ -27,6 +27,63 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
27
|
var import_chalk11 = __toESM(require("chalk"));
|
|
28
28
|
var import_commander10 = require("commander");
|
|
29
29
|
|
|
30
|
+
// package.json
|
|
31
|
+
var package_default = {
|
|
32
|
+
name: "commet",
|
|
33
|
+
version: "0.8.1",
|
|
34
|
+
description: "Commet CLI - Manage your billing platform from the command line",
|
|
35
|
+
bin: {
|
|
36
|
+
commet: "./bin/commet"
|
|
37
|
+
},
|
|
38
|
+
files: [
|
|
39
|
+
"dist",
|
|
40
|
+
"bin",
|
|
41
|
+
"README.md"
|
|
42
|
+
],
|
|
43
|
+
scripts: {
|
|
44
|
+
build: "tsup",
|
|
45
|
+
dev: "tsup --watch",
|
|
46
|
+
lint: "biome lint src/",
|
|
47
|
+
"lint:fix": "biome lint --write src/",
|
|
48
|
+
typecheck: "tsc --noEmit"
|
|
49
|
+
},
|
|
50
|
+
keywords: [
|
|
51
|
+
"billing",
|
|
52
|
+
"cli",
|
|
53
|
+
"typescript",
|
|
54
|
+
"commet"
|
|
55
|
+
],
|
|
56
|
+
author: "Commet Team",
|
|
57
|
+
license: "MIT",
|
|
58
|
+
dependencies: {
|
|
59
|
+
"@commet/node": "workspace:*",
|
|
60
|
+
"@inquirer/prompts": "^7.8.6",
|
|
61
|
+
chalk: "^5.3.0",
|
|
62
|
+
commander: "^12.0.0",
|
|
63
|
+
"jsonc-parser": "^3.3.1",
|
|
64
|
+
open: "^10.0.0",
|
|
65
|
+
ora: "^7.0.1"
|
|
66
|
+
},
|
|
67
|
+
devDependencies: {
|
|
68
|
+
"@types/node": "^20.10.0",
|
|
69
|
+
tsup: "^8.0.1",
|
|
70
|
+
typescript: "^5.3.3"
|
|
71
|
+
},
|
|
72
|
+
engines: {
|
|
73
|
+
node: ">=18.0.0"
|
|
74
|
+
},
|
|
75
|
+
homepage: "https://commet.co",
|
|
76
|
+
repository: {
|
|
77
|
+
type: "git",
|
|
78
|
+
url: "https://github.com/commet-labs/commet.git",
|
|
79
|
+
directory: "packages/cli"
|
|
80
|
+
},
|
|
81
|
+
publishConfig: {
|
|
82
|
+
access: "public",
|
|
83
|
+
provenance: true
|
|
84
|
+
}
|
|
85
|
+
};
|
|
86
|
+
|
|
30
87
|
// src/commands/info.ts
|
|
31
88
|
var import_chalk = __toESM(require("chalk"));
|
|
32
89
|
var import_commander = require("commander");
|
|
@@ -588,48 +645,41 @@ function validateTypeScriptProject() {
|
|
|
588
645
|
}
|
|
589
646
|
|
|
590
647
|
// src/utils/generator.ts
|
|
591
|
-
function generateTypes(eventTypes, seatTypes) {
|
|
648
|
+
function generateTypes(eventTypes, seatTypes, products) {
|
|
592
649
|
const eventTypeUnion = eventTypes.length > 0 ? eventTypes.map((e) => `"${e.code}"`).join(" | ") : "string";
|
|
593
650
|
const seatTypeUnion = seatTypes.length > 0 ? seatTypes.map((s) => `"${s.code}"`).join(" | ") : "string";
|
|
651
|
+
const productTypeUnion = products.length > 0 ? products.map((p) => `"${p.publicId}"`).join(" | ") : "string";
|
|
594
652
|
const eventComments = eventTypes.map(
|
|
595
653
|
(e) => ` * - "${e.code}": ${e.name}${e.description ? ` - ${e.description}` : ""}`
|
|
596
654
|
).join("\n");
|
|
597
655
|
const seatComments = seatTypes.map(
|
|
598
656
|
(s) => ` * - "${s.code}": ${s.name}${s.description ? ` - ${s.description}` : ""} ${s.isFree ? "(Free)" : ""}`
|
|
599
657
|
).join("\n");
|
|
658
|
+
const productComments = products.map(
|
|
659
|
+
(p) => ` * - "${p.publicId}": ${p.name}${p.description ? ` - ${p.description}` : ""}`
|
|
660
|
+
).join("\n");
|
|
600
661
|
return `// Auto-generated by Commet CLI
|
|
601
662
|
// Do not edit this file manually - run 'commet pull' to update
|
|
602
663
|
|
|
603
664
|
/**
|
|
604
|
-
* Module augmentation for automatic type inference
|
|
605
|
-
*
|
|
606
665
|
* This augments the Commet SDK to automatically use your organization's
|
|
607
|
-
* specific event
|
|
666
|
+
* specific event types, seat types, and products without requiring generic type parameters.
|
|
608
667
|
*
|
|
609
668
|
* Event types available in your organization:
|
|
610
|
-
${eventComments}
|
|
669
|
+
${eventComments || " * (none)"}
|
|
611
670
|
*
|
|
612
671
|
* Seat types available in your organization:
|
|
613
|
-
${seatComments}
|
|
614
|
-
*
|
|
615
|
-
* @example
|
|
616
|
-
* import { Commet } from '@commet/node';
|
|
617
|
-
*
|
|
618
|
-
* const commet = new Commet({ apiKey: 'your-api-key' });
|
|
672
|
+
${seatComments || " * (none)"}
|
|
619
673
|
*
|
|
620
|
-
*
|
|
621
|
-
*
|
|
622
|
-
* eventType: 'api_call', // Only accepts your event types
|
|
623
|
-
* customerId: 'cus_123'
|
|
624
|
-
* });
|
|
674
|
+
* Products available in your organization:
|
|
675
|
+
${productComments || " * (none)"}
|
|
625
676
|
*
|
|
626
|
-
|
|
627
|
-
* await commet.seats.add('cus_123', 'admin', 5);
|
|
628
|
-
*/
|
|
677
|
+
*/
|
|
629
678
|
declare module '@commet/node' {
|
|
630
679
|
interface CommetGeneratedTypes {
|
|
631
680
|
eventType: ${eventTypeUnion};
|
|
632
681
|
seatType: ${seatTypeUnion};
|
|
682
|
+
productId: ${productTypeUnion};
|
|
633
683
|
}
|
|
634
684
|
}
|
|
635
685
|
|
|
@@ -709,8 +759,8 @@ var pullCommand = new import_commander6.Command("pull").description("Pull type d
|
|
|
709
759
|
console.error(import_chalk7.default.red("Error:"), result.error);
|
|
710
760
|
return;
|
|
711
761
|
}
|
|
712
|
-
const { eventTypes, seatTypes } = result.data;
|
|
713
|
-
const typeDefinitions = generateTypes(eventTypes, seatTypes);
|
|
762
|
+
const { eventTypes, seatTypes, products } = result.data;
|
|
763
|
+
const typeDefinitions = generateTypes(eventTypes, seatTypes, products);
|
|
714
764
|
const commetDir = path5.resolve(process.cwd(), ".commet");
|
|
715
765
|
const outputPath = path5.join(commetDir, "types.d.ts");
|
|
716
766
|
fs5.mkdirSync(commetDir, { recursive: true });
|
|
@@ -755,12 +805,17 @@ var pullCommand = new import_commander6.Command("pull").description("Pull type d
|
|
|
755
805
|
` Seat types: ${seatTypes.length > 0 ? seatTypes.map((s) => s.code).join(", ") : "none"}`
|
|
756
806
|
)
|
|
757
807
|
);
|
|
808
|
+
console.log(
|
|
809
|
+
import_chalk7.default.dim(
|
|
810
|
+
` Products: ${products.length > 0 ? products.map((p) => p.publicId).join(", ") : "none"}`
|
|
811
|
+
)
|
|
812
|
+
);
|
|
758
813
|
console.log(import_chalk7.default.dim(`
|
|
759
814
|
Output: ${outputPath}`));
|
|
760
|
-
if (eventTypes.length === 0 && seatTypes.length === 0) {
|
|
815
|
+
if (eventTypes.length === 0 && seatTypes.length === 0 && products.length === 0) {
|
|
761
816
|
console.log(
|
|
762
817
|
import_chalk7.default.yellow(
|
|
763
|
-
"\n\u26A0 No types found. Create event types
|
|
818
|
+
"\n\u26A0 No types found. Create event types, seat types, and products in your Commet dashboard."
|
|
764
819
|
)
|
|
765
820
|
);
|
|
766
821
|
}
|
|
@@ -885,62 +940,6 @@ var whoamiCommand = new import_commander9.Command("whoami").description("Display
|
|
|
885
940
|
}
|
|
886
941
|
});
|
|
887
942
|
|
|
888
|
-
// package.json
|
|
889
|
-
var package_default = {
|
|
890
|
-
name: "commet",
|
|
891
|
-
version: "0.7.4",
|
|
892
|
-
description: "Commet CLI - Manage your billing platform from the command line",
|
|
893
|
-
bin: {
|
|
894
|
-
commet: "./bin/commet"
|
|
895
|
-
},
|
|
896
|
-
files: [
|
|
897
|
-
"dist",
|
|
898
|
-
"bin",
|
|
899
|
-
"README.md"
|
|
900
|
-
],
|
|
901
|
-
scripts: {
|
|
902
|
-
build: "tsup",
|
|
903
|
-
dev: "tsup --watch",
|
|
904
|
-
lint: "biome lint src/",
|
|
905
|
-
"lint:fix": "biome lint --write src/",
|
|
906
|
-
typecheck: "tsc --noEmit"
|
|
907
|
-
},
|
|
908
|
-
keywords: [
|
|
909
|
-
"billing",
|
|
910
|
-
"cli",
|
|
911
|
-
"typescript",
|
|
912
|
-
"commet"
|
|
913
|
-
],
|
|
914
|
-
author: "Commet Team",
|
|
915
|
-
license: "MIT",
|
|
916
|
-
dependencies: {
|
|
917
|
-
"@commet/node": "workspace:*",
|
|
918
|
-
"@inquirer/prompts": "^7.8.6",
|
|
919
|
-
chalk: "^5.3.0",
|
|
920
|
-
commander: "^12.0.0",
|
|
921
|
-
"jsonc-parser": "^3.3.1",
|
|
922
|
-
open: "^10.0.0",
|
|
923
|
-
ora: "^7.0.1"
|
|
924
|
-
},
|
|
925
|
-
devDependencies: {
|
|
926
|
-
"@types/node": "^20.10.0",
|
|
927
|
-
tsup: "^8.0.1",
|
|
928
|
-
typescript: "^5.3.3"
|
|
929
|
-
},
|
|
930
|
-
engines: {
|
|
931
|
-
node: ">=18.0.0"
|
|
932
|
-
},
|
|
933
|
-
repository: {
|
|
934
|
-
type: "git",
|
|
935
|
-
url: "https://github.com/commet-labs/commet.git",
|
|
936
|
-
directory: "packages/cli"
|
|
937
|
-
},
|
|
938
|
-
publishConfig: {
|
|
939
|
-
access: "public",
|
|
940
|
-
provenance: true
|
|
941
|
-
}
|
|
942
|
-
};
|
|
943
|
-
|
|
944
943
|
// src/index.ts
|
|
945
944
|
var program = new import_commander10.Command();
|
|
946
945
|
program.name("commet").description(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "commet",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.1",
|
|
4
4
|
"description": "Commet CLI - Manage your billing platform from the command line",
|
|
5
5
|
"bin": {
|
|
6
6
|
"commet": "./bin/commet"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"jsonc-parser": "^3.3.1",
|
|
26
26
|
"open": "^10.0.0",
|
|
27
27
|
"ora": "^7.0.1",
|
|
28
|
-
"@commet/node": "0.
|
|
28
|
+
"@commet/node": "0.10.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/node": "^20.10.0",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"engines": {
|
|
36
36
|
"node": ">=18.0.0"
|
|
37
37
|
},
|
|
38
|
+
"homepage": "https://commet.co",
|
|
38
39
|
"repository": {
|
|
39
40
|
"type": "git",
|
|
40
41
|
"url": "https://github.com/commet-labs/commet.git",
|