@clawapps/cli 0.4.0 → 0.5.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/dist/commands/subscribe.d.ts +1 -0
- package/dist/commands/subscribe.js +10 -0
- package/dist/commands/subscribe.js.map +1 -0
- package/dist/index.js +11 -16
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function subscribeCommand(): Promise<void>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { CONFIG } from '../lib/config.js';
|
|
3
|
+
import { displayQRCode } from '../auth/qr-poll.js';
|
|
4
|
+
export async function subscribeCommand() {
|
|
5
|
+
const url = `${CONFIG.CLAW_WEB_BASE}/membership`;
|
|
6
|
+
console.log(chalk.yellow('\nScan the QR code to subscribe membership.\n'));
|
|
7
|
+
displayQRCode(url);
|
|
8
|
+
console.log(chalk.gray(`\nOr visit: ${url}\n`));
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=subscribe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscribe.js","sourceRoot":"","sources":["../../src/commands/subscribe.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,MAAM,GAAG,GAAG,GAAG,MAAM,CAAC,aAAa,aAAa,CAAC;IAEjD,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,+CAA+C,CAAC,CAAC,CAAC;IAC3E,aAAa,CAAC,GAAG,CAAC,CAAC;IACnB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC,CAAC;AAClD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -2,19 +2,18 @@ import { Command } from 'commander';
|
|
|
2
2
|
import { loginCommand } from './commands/login.js';
|
|
3
3
|
import { logoutCommand } from './commands/logout.js';
|
|
4
4
|
import { whoamiCommand } from './commands/whoami.js';
|
|
5
|
-
import { creditCommand } from './commands/credit.js';
|
|
6
|
-
import { membershipCommand } from './commands/membership.js';
|
|
7
5
|
import { tokenCommand } from './commands/token.js';
|
|
8
6
|
import { paymentGrantCommand } from './commands/payment-grant.js';
|
|
9
7
|
import { rechargeCreditsCommand } from './commands/recharge-credits.js';
|
|
8
|
+
import { subscribeCommand } from './commands/subscribe.js';
|
|
10
9
|
const program = new Command();
|
|
11
10
|
program
|
|
12
11
|
.name('clawapps')
|
|
13
|
-
.description('ClawApps CLI -
|
|
14
|
-
.version('0.
|
|
12
|
+
.description('ClawApps CLI - Authenticate, manage payments, and recharge credits via QR code')
|
|
13
|
+
.version('0.5.0');
|
|
15
14
|
program
|
|
16
15
|
.command('login')
|
|
17
|
-
.description('Log in
|
|
16
|
+
.description('Log in via QR code (scan to authenticate, valid for 3 minutes)')
|
|
18
17
|
.action(loginCommand);
|
|
19
18
|
program
|
|
20
19
|
.command('logout')
|
|
@@ -24,26 +23,22 @@ program
|
|
|
24
23
|
.command('whoami')
|
|
25
24
|
.description('Show your ClawApps account info')
|
|
26
25
|
.action(whoamiCommand);
|
|
27
|
-
program
|
|
28
|
-
.command('credit')
|
|
29
|
-
.description('Open credit recharge page in browser')
|
|
30
|
-
.action(creditCommand);
|
|
31
|
-
program
|
|
32
|
-
.command('membership')
|
|
33
|
-
.description('Open membership subscription page in browser')
|
|
34
|
-
.action(membershipCommand);
|
|
35
26
|
program
|
|
36
27
|
.command('token')
|
|
37
|
-
.description('Print
|
|
28
|
+
.description('Print valid access token (auto-refreshes if expired)')
|
|
38
29
|
.action(tokenCommand);
|
|
39
30
|
program
|
|
40
31
|
.command('payment-grant')
|
|
41
|
-
.description('
|
|
32
|
+
.description('Authorize skill payment via QR code (valid for 3 minutes)')
|
|
42
33
|
.argument('<skill_id>', 'The skill ID to grant payment for')
|
|
43
34
|
.action(paymentGrantCommand);
|
|
44
35
|
program
|
|
45
36
|
.command('recharge-credits')
|
|
46
|
-
.description('Display QR code
|
|
37
|
+
.description('Display QR code to recharge credits')
|
|
47
38
|
.action(rechargeCreditsCommand);
|
|
39
|
+
program
|
|
40
|
+
.command('subscribe')
|
|
41
|
+
.description('Display QR code to subscribe membership')
|
|
42
|
+
.action(subscribeCommand);
|
|
48
43
|
program.parse();
|
|
49
44
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,MAAM,OAAO,GAAG,IAAI,OAAO,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