dodopayments-cli 2.1.0 → 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.
@@ -0,0 +1,27 @@
1
+ ; Query from: https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/refs/heads/master/queries/markdown/injections.scm
2
+ (fenced_code_block
3
+ (info_string
4
+ (language) @_lang)
5
+ (code_fence_content) @injection.content
6
+ (#set-lang-from-info-string! @_lang))
7
+
8
+ ((html_block) @injection.content
9
+ (#set! injection.language "html")
10
+ (#set! injection.combined)
11
+ (#set! injection.include-children))
12
+
13
+ ((minus_metadata) @injection.content
14
+ (#set! injection.language "yaml")
15
+ (#offset! @injection.content 1 0 -1 0)
16
+ (#set! injection.include-children))
17
+
18
+ ((plus_metadata) @injection.content
19
+ (#set! injection.language "toml")
20
+ (#offset! @injection.content 1 0 -1 0)
21
+ (#set! injection.include-children))
22
+
23
+ ([
24
+ (inline)
25
+ (pipe_table_cell)
26
+ ] @injection.content
27
+ (#set! injection.language "markdown_inline"))
Binary file
package/package.json CHANGED
@@ -1,10 +1,28 @@
1
1
  {
2
2
  "name": "dodopayments-cli",
3
- "version": "2.1.0",
4
- "description": "A CLI for Dodo Payments",
3
+ "version": "3.0.0",
4
+ "description": "Official Dodo Payments CLI — manage payments, customers, products, subscriptions, and webhooks from your terminal. Includes an interactive TUI, an AI assistant powered by MCP, and offline webhook testing.",
5
5
  "keywords": [
6
6
  "dodopayments",
7
- "cli"
7
+ "dodo-payments",
8
+ "cli",
9
+ "command-line",
10
+ "terminal",
11
+ "tui",
12
+ "payments",
13
+ "billing",
14
+ "subscriptions",
15
+ "checkout",
16
+ "saas",
17
+ "developer-tools",
18
+ "webhooks",
19
+ "webhook-testing",
20
+ "ai",
21
+ "mcp",
22
+ "typescript",
23
+ "bun",
24
+ "opentui",
25
+ "stripe-alternative"
8
26
  ],
9
27
  "homepage": "https://github.com/dodopayments/dodopayments-cli#readme",
10
28
  "bugs": {
@@ -14,7 +32,7 @@
14
32
  "type": "git",
15
33
  "url": "git+https://github.com/dodopayments/dodopayments-cli.git"
16
34
  },
17
- "license": "ISC",
35
+ "license": "GPL-3.0-or-later",
18
36
  "author": "Dodo Payments",
19
37
  "type": "module",
20
38
  "main": "index.ts",
@@ -23,15 +41,29 @@
23
41
  "dodopayments": "dist/index.js"
24
42
  },
25
43
  "scripts": {
26
- "build": "bun build ./src/index.ts --minify --target node --outfile ./dist/index.js",
27
- "build-native": "bun run build-binaries.ts"
44
+ "build": "bun run scripts/build.ts",
45
+ "build-native": "bun run build-binaries.ts",
46
+ "dev": "bun src/index.ts"
28
47
  },
29
48
  "dependencies": {
49
+ "@ai-sdk/mcp": "^1.0.36",
50
+ "@ai-sdk/openai": "^3.0.54",
51
+ "@modelcontextprotocol/sdk": "^1.29.0",
52
+ "@openrouter/ai-sdk-provider": "^2.8.0",
53
+ "@opentui/core": "^0.2.3",
54
+ "@opentui/solid": "^0.2.3",
55
+ "ai": "^6.0.168",
56
+ "chalk": "^5.6.2",
30
57
  "dodopayments": "^2.19.0",
31
- "inquirer": "^13.2.2",
32
- "open": "^11.0.0"
58
+ "keytar": "^7.9.0",
59
+ "open": "^11.0.0",
60
+ "solid-js": "^1.9.12"
33
61
  },
34
62
  "devDependencies": {
63
+ "@opentui/core-darwin-x64": "0.2.3",
64
+ "@opentui/core-linux-arm64": "0.2.3",
65
+ "@opentui/core-linux-x64": "0.2.3",
66
+ "@opentui/core-win32-x64": "0.2.3",
35
67
  "@types/bun": "latest"
36
68
  },
37
69
  "peerDependencies": {
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Production bundler. Bun's `bun build` does NOT honor bunfig.toml's
3
+ * preload (per OpenTUI #122), so we drive Bun.build directly with the
4
+ * @opentui/solid bun-plugin to apply the Solid babel transform on every
5
+ * `.tsx/.jsx` file.
6
+ *
7
+ * The runtime path uses bunfig.toml's preload instead -- both code paths
8
+ * end up registering the same plugin, just at different lifecycles.
9
+ */
10
+
11
+ import solidPlugin from '@opentui/solid/bun-plugin';
12
+
13
+ const result = await Bun.build({
14
+ entrypoints: ['./src/index.ts'],
15
+ outdir: './dist',
16
+ target: 'bun',
17
+ minify: true,
18
+ plugins: [solidPlugin],
19
+ });
20
+
21
+ if (!result.success) {
22
+ console.error('Build failed.');
23
+ for (const message of result.logs) console.error(message);
24
+ process.exit(1);
25
+ }
26
+
27
+ const main = result.outputs.find((o) => o.kind === 'entry-point');
28
+ if (main) {
29
+ const sizeKb = (main.size / 1024).toFixed(0);
30
+ console.log(`\u2713 Built ${main.path} (${sizeKb} KB)`);
31
+ }
package/test-select.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { mountTuiApp } from './src/tui/app';
2
+ mountTuiApp();
package/tsconfig.json CHANGED
@@ -1,27 +1,25 @@
1
1
  {
2
2
  "compilerOptions": {
3
- // Environment setup & latest features
4
3
  "lib": ["ESNext"],
5
4
  "target": "ESNext",
6
5
  "module": "Preserve",
7
6
  "moduleDetection": "force",
8
- "jsx": "react-jsx",
7
+ "jsx": "preserve",
8
+ "jsxImportSource": "@opentui/solid",
9
9
  "allowJs": true,
10
10
 
11
- // Bundler mode
12
11
  "moduleResolution": "bundler",
13
12
  "allowImportingTsExtensions": true,
14
13
  "verbatimModuleSyntax": true,
15
14
  "noEmit": true,
15
+ "resolveJsonModule": true,
16
16
 
17
- // Best practices
18
17
  "strict": true,
19
18
  "skipLibCheck": true,
20
19
  "noFallthroughCasesInSwitch": true,
21
20
  "noUncheckedIndexedAccess": true,
22
21
  "noImplicitOverride": true,
23
22
 
24
- // Some stricter flags (disabled by default)
25
23
  "noUnusedLocals": false,
26
24
  "noUnusedParameters": false,
27
25
  "noPropertyAccessFromIndexSignature": false