dodopayments-cli 3.3.0 → 3.4.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/index.js +24216 -257
- package/fetch-cross-deps.ts +28 -3
- package/package.json +10 -3
package/fetch-cross-deps.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { $ } from "bun";
|
|
2
|
+
import { mkdir, rename, rm } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
2
4
|
|
|
3
5
|
const packages = [
|
|
4
6
|
{ name: "@opentui/core-darwin-x64@0.2.3", os: "darwin", cpu: "x64" },
|
|
@@ -8,9 +10,32 @@ const packages = [
|
|
|
8
10
|
{ name: "@opentui/core-darwin-arm64@0.2.3", os: "darwin", cpu: "arm64" }
|
|
9
11
|
];
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
13
|
+
const tempDir = join(process.cwd(), "temp-install");
|
|
14
|
+
await rm(tempDir, { recursive: true, force: true });
|
|
15
|
+
await mkdir(tempDir, { recursive: true });
|
|
16
|
+
|
|
17
|
+
try {
|
|
18
|
+
for (const pkg of packages) {
|
|
19
|
+
console.log(`Fetching ${pkg.name}...`);
|
|
20
|
+
|
|
21
|
+
// Install in the temporary directory to prevent npm from pruning other platforms
|
|
22
|
+
await $`npm install ${pkg.name} --force --os=${pkg.os} --cpu=${pkg.cpu} --prefix ${tempDir}`;
|
|
23
|
+
|
|
24
|
+
const match = pkg.name.match(/@opentui\/([^@]+)/);
|
|
25
|
+
const dirName = match ? match[1] : "";
|
|
26
|
+
if (!dirName) {
|
|
27
|
+
throw new Error(`Could not parse package directory name from: ${pkg.name}`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const src = join(tempDir, "node_modules", "@opentui", dirName);
|
|
31
|
+
const dest = join(process.cwd(), "node_modules", "@opentui", dirName);
|
|
32
|
+
|
|
33
|
+
await rm(dest, { recursive: true, force: true });
|
|
34
|
+
await mkdir(join(process.cwd(), "node_modules", "@opentui"), { recursive: true });
|
|
35
|
+
await rename(src, dest);
|
|
36
|
+
}
|
|
37
|
+
} finally {
|
|
38
|
+
await rm(tempDir, { recursive: true, force: true });
|
|
14
39
|
}
|
|
15
40
|
|
|
16
41
|
console.log("Ready for cross-compilation!");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dodopayments-cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
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",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"dodopayments": "dist/index.js"
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
|
+
"setup-dev": "npm i && bun ./fetch-cross-deps",
|
|
44
45
|
"build": "bun run scripts/build.ts",
|
|
45
46
|
"build-native": "bun run build-binaries.ts",
|
|
46
47
|
"dev": "bun src/index.ts"
|
|
@@ -48,6 +49,8 @@
|
|
|
48
49
|
"dependencies": {
|
|
49
50
|
"@ai-sdk/mcp": "^1.0.36",
|
|
50
51
|
"@ai-sdk/openai": "^3.0.54",
|
|
52
|
+
"@dodopayments/express": "^0.2.8",
|
|
53
|
+
"@dodopayments/nextjs": "^0.3.6",
|
|
51
54
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
52
55
|
"@openrouter/ai-sdk-provider": "^2.8.0",
|
|
53
56
|
"@opentui/core": "0.2.3",
|
|
@@ -55,17 +58,21 @@
|
|
|
55
58
|
"ai": "^6.0.168",
|
|
56
59
|
"chalk": "^5.6.2",
|
|
57
60
|
"dodopayments": "^2.19.0",
|
|
61
|
+
"dodopayments-mcp": "^2.32.0",
|
|
62
|
+
"mcp-remote": "^0.1.38",
|
|
58
63
|
"node-machine-id": "^1.1.12",
|
|
59
64
|
"open": "^11.0.0",
|
|
60
65
|
"solid-js": "^1.9.12"
|
|
61
66
|
},
|
|
62
67
|
"devDependencies": {
|
|
68
|
+
"@types/bun": "latest"
|
|
69
|
+
},
|
|
70
|
+
"optionalDependencies": {
|
|
63
71
|
"@opentui/core-darwin-arm64": "0.2.3",
|
|
64
72
|
"@opentui/core-darwin-x64": "0.2.3",
|
|
65
73
|
"@opentui/core-linux-arm64": "0.2.3",
|
|
66
74
|
"@opentui/core-linux-x64": "0.2.3",
|
|
67
|
-
"@opentui/core-win32-x64": "0.2.3"
|
|
68
|
-
"@types/bun": "latest"
|
|
75
|
+
"@opentui/core-win32-x64": "0.2.3"
|
|
69
76
|
},
|
|
70
77
|
"peerDependencies": {
|
|
71
78
|
"typescript": "^5.9.3"
|