@wenrwa/marketplace-cli 0.1.0 → 0.3.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.
Files changed (54) hide show
  1. package/README.md +18 -1
  2. package/dist/__tests__/agent.test.d.ts +1 -0
  3. package/dist/__tests__/agent.test.js +138 -0
  4. package/dist/__tests__/apps.test.d.ts +1 -0
  5. package/dist/__tests__/apps.test.js +160 -0
  6. package/dist/__tests__/auth.test.d.ts +1 -0
  7. package/dist/__tests__/auth.test.js +94 -0
  8. package/dist/__tests__/bounty.test.d.ts +1 -0
  9. package/dist/__tests__/bounty.test.js +185 -0
  10. package/dist/__tests__/client.test.d.ts +1 -0
  11. package/dist/__tests__/client.test.js +106 -0
  12. package/dist/__tests__/config.test.d.ts +1 -0
  13. package/dist/__tests__/config.test.js +99 -0
  14. package/dist/__tests__/dashboard-helpers.test.d.ts +1 -0
  15. package/dist/__tests__/dashboard-helpers.test.js +123 -0
  16. package/dist/__tests__/format.test.d.ts +1 -0
  17. package/dist/__tests__/format.test.js +144 -0
  18. package/dist/__tests__/helpers.d.ts +7 -0
  19. package/dist/__tests__/helpers.js +12 -0
  20. package/dist/__tests__/treasury.test.d.ts +1 -0
  21. package/dist/__tests__/treasury.test.js +122 -0
  22. package/dist/__tests__/websocket.test.d.ts +1 -0
  23. package/dist/__tests__/websocket.test.js +61 -0
  24. package/dist/__tests__/workspace.test.d.ts +1 -0
  25. package/dist/__tests__/workspace.test.js +105 -0
  26. package/dist/commands/agent.d.ts +0 -0
  27. package/dist/commands/agent.js +0 -0
  28. package/dist/commands/apps.d.ts +2 -0
  29. package/dist/commands/apps.js +200 -0
  30. package/dist/commands/auth.d.ts +0 -0
  31. package/dist/commands/auth.js +0 -0
  32. package/dist/commands/bounty.d.ts +0 -0
  33. package/dist/commands/bounty.js +128 -7
  34. package/dist/commands/dashboard.d.ts +31 -0
  35. package/dist/commands/dashboard.js +5 -0
  36. package/dist/commands/keys.d.ts +2 -0
  37. package/dist/commands/keys.js +72 -0
  38. package/dist/commands/treasury.d.ts +0 -0
  39. package/dist/commands/treasury.js +2 -2
  40. package/dist/commands/webhook.d.ts +2 -0
  41. package/dist/commands/webhook.js +131 -0
  42. package/dist/commands/workspace.d.ts +1 -0
  43. package/dist/commands/workspace.js +293 -14
  44. package/dist/index.d.ts +0 -0
  45. package/dist/index.js +8 -1
  46. package/dist/utils/client.d.ts +1 -0
  47. package/dist/utils/client.js +3 -0
  48. package/dist/utils/config.d.ts +0 -0
  49. package/dist/utils/config.js +0 -0
  50. package/dist/utils/format.d.ts +0 -1
  51. package/dist/utils/format.js +2 -11
  52. package/dist/utils/websocket.d.ts +0 -0
  53. package/dist/utils/websocket.js +0 -0
  54. package/package.json +5 -2
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.statusColor = statusColor;
7
7
  exports.shorten = shorten;
8
- exports.formatSol = formatSol;
9
8
  exports.formatUsdc = formatUsdc;
10
9
  exports.formatReward = formatReward;
11
10
  exports.formatTimestamp = formatTimestamp;
@@ -49,20 +48,12 @@ function shorten(s, len = 12) {
49
48
  return s;
50
49
  return `${s.slice(0, 4)}...${s.slice(-4)}`;
51
50
  }
52
- function formatSol(lamports) {
53
- const val = Number(lamports) / 1e9;
54
- return val.toFixed(4);
55
- }
56
51
  function formatUsdc(amount) {
57
52
  const val = Number(amount) / 1e6;
58
53
  return val.toFixed(2);
59
54
  }
60
- function formatReward(amount, symbol) {
61
- if (symbol === 'USDC')
62
- return `${formatUsdc(amount)} USDC`;
63
- if (symbol === 'SOL')
64
- return `${formatSol(amount)} SOL`;
65
- return `${amount} ${symbol || ''}`.trim();
55
+ function formatReward(amount, symbol = 'USDC') {
56
+ return `${formatUsdc(amount)} ${symbol}`;
66
57
  }
67
58
  function formatTimestamp(ts) {
68
59
  return new Date(ts).toISOString().slice(11, 19);
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenrwa/marketplace-cli",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "CLI tool for the Wenrwa Agent Marketplace — monitor bounties, agents, workspaces, and treasury from your terminal",
5
5
  "author": "Wenrwa <dev@wenrwa.com>",
6
6
  "license": "MIT",
@@ -34,7 +34,7 @@
34
34
  "build": "tsc",
35
35
  "dev": "ts-node src/index.ts",
36
36
  "prepublishOnly": "npm run build",
37
- "test": "echo 'No tests yet'"
37
+ "test": "jest"
38
38
  },
39
39
  "dependencies": {
40
40
  "commander": "^12.0.0",
@@ -45,6 +45,9 @@
45
45
  "devDependencies": {
46
46
  "typescript": "^5.5.0",
47
47
  "@types/node": "^20.0.0",
48
+ "@types/jest": "^29.5.0",
49
+ "jest": "^29.7.0",
50
+ "ts-jest": "^29.2.0",
48
51
  "ts-node": "^10.9.0"
49
52
  }
50
53
  }