@recur-tw/cli 0.2.0 → 0.2.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/dist/cli.mjs +6 -5
- package/dist/index.mjs +2 -1
- package/package.json +8 -5
package/dist/cli.mjs
CHANGED
|
@@ -123,6 +123,7 @@ function resolveBaseUrl(opts) {
|
|
|
123
123
|
//#endregion
|
|
124
124
|
//#region src/errors.ts
|
|
125
125
|
var CLIError = class extends Error {
|
|
126
|
+
statusCode;
|
|
126
127
|
constructor(message, statusCode) {
|
|
127
128
|
super(message);
|
|
128
129
|
this.statusCode = statusCode;
|
|
@@ -920,7 +921,7 @@ var RecurClient = class {
|
|
|
920
921
|
}
|
|
921
922
|
const headers = {
|
|
922
923
|
Authorization: `Bearer ${this.secretKey}`,
|
|
923
|
-
"User-Agent": `@recur-tw/cli/0.2.
|
|
924
|
+
"User-Agent": `@recur-tw/cli/0.2.1`
|
|
924
925
|
};
|
|
925
926
|
const hasBody = opts?.body !== void 0;
|
|
926
927
|
if (hasBody) headers["Content-Type"] = "application/json";
|
|
@@ -989,7 +990,7 @@ function sanitizeResponse(data) {
|
|
|
989
990
|
//#endregion
|
|
990
991
|
//#region src/output.ts
|
|
991
992
|
/** Fields to hide in table mode unless explicitly requested via --fields */
|
|
992
|
-
const TABLE_HIDDEN_FIELDS = new Set([
|
|
993
|
+
const TABLE_HIDDEN_FIELDS = /* @__PURE__ */ new Set([
|
|
993
994
|
"object",
|
|
994
995
|
"metadata",
|
|
995
996
|
"display_order",
|
|
@@ -2740,7 +2741,7 @@ Requires a Secret Key (sk_test_* or sk_live_*) via --key, RECUR_SECRET_KEY, or r
|
|
|
2740
2741
|
});
|
|
2741
2742
|
const server = new McpServer({
|
|
2742
2743
|
name: "recur",
|
|
2743
|
-
version: "0.2.
|
|
2744
|
+
version: "0.2.1"
|
|
2744
2745
|
}, { capabilities: { tools: {} } });
|
|
2745
2746
|
registerTools(server, client);
|
|
2746
2747
|
const transport = new StdioServerTransport();
|
|
@@ -2796,7 +2797,7 @@ function walkCommandTree(program) {
|
|
|
2796
2797
|
});
|
|
2797
2798
|
return {
|
|
2798
2799
|
name: program.name(),
|
|
2799
|
-
version: "0.2.
|
|
2800
|
+
version: "0.2.1",
|
|
2800
2801
|
global_options: globalOptions,
|
|
2801
2802
|
commands
|
|
2802
2803
|
};
|
|
@@ -2893,7 +2894,7 @@ function configureAgentHelp(program) {
|
|
|
2893
2894
|
//#endregion
|
|
2894
2895
|
//#region src/cli.ts
|
|
2895
2896
|
const program = new Command();
|
|
2896
|
-
program.name("recur").description("Recur CLI — Taiwan subscription payment platform.\nManage products, customers, subscriptions, webhooks, and more.\nAll commands require a Secret Key (sk_test_* or sk_live_*).").version("0.2.
|
|
2897
|
+
program.name("recur").description("Recur CLI — Taiwan subscription payment platform.\nManage products, customers, subscriptions, webhooks, and more.\nAll commands require a Secret Key (sk_test_* or sk_live_*).").version("0.2.1").option("--key <secret-key>", "API secret key (sk_test_* or sk_live_*)").option("--profile <name>", "Use a named profile from ~/.recur/credentials.json").option("--base-url <url>", "API base URL (default: https://api.recur.tw)").option("--output <format>", "Output format: json, table, csv, ndjson (default: json when piped, table otherwise)").hook("preAction", (thisCommand) => {
|
|
2897
2898
|
const opts = thisCommand.opts();
|
|
2898
2899
|
if (!opts.output) opts.output = process.stdout.isTTY ? "table" : "json";
|
|
2899
2900
|
if (![
|
package/dist/index.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import os from "node:os";
|
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
//#region src/errors.ts
|
|
6
6
|
var CLIError = class extends Error {
|
|
7
|
+
statusCode;
|
|
7
8
|
constructor(message, statusCode) {
|
|
8
9
|
super(message);
|
|
9
10
|
this.statusCode = statusCode;
|
|
@@ -188,7 +189,7 @@ function resolveBaseUrl(opts) {
|
|
|
188
189
|
//#endregion
|
|
189
190
|
//#region src/output.ts
|
|
190
191
|
/** Fields to hide in table mode unless explicitly requested via --fields */
|
|
191
|
-
const TABLE_HIDDEN_FIELDS = new Set([
|
|
192
|
+
const TABLE_HIDDEN_FIELDS = /* @__PURE__ */ new Set([
|
|
192
193
|
"object",
|
|
193
194
|
"metadata",
|
|
194
195
|
"display_order",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@recur-tw/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "CLI for Recur - Taiwan's subscription payment platform",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"recur",
|
|
@@ -13,9 +13,12 @@
|
|
|
13
13
|
"homepage": "https://recur.tw/docs/cli",
|
|
14
14
|
"repository": {
|
|
15
15
|
"type": "git",
|
|
16
|
-
"url": "https://github.com/
|
|
16
|
+
"url": "https://github.com/kaikhq/recur.tw.git",
|
|
17
17
|
"directory": "packages/cli"
|
|
18
18
|
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/kaikhq/recur.tw/issues"
|
|
21
|
+
},
|
|
19
22
|
"license": "MIT",
|
|
20
23
|
"author": {
|
|
21
24
|
"name": "Recur",
|
|
@@ -49,9 +52,9 @@
|
|
|
49
52
|
},
|
|
50
53
|
"devDependencies": {
|
|
51
54
|
"@types/node": "^22.0.0",
|
|
52
|
-
"tsdown": "^0.
|
|
53
|
-
"typescript": "^
|
|
54
|
-
"vitest": "^4.
|
|
55
|
+
"tsdown": "^0.22.12",
|
|
56
|
+
"typescript": "^6.0.3",
|
|
57
|
+
"vitest": "^4.1.10",
|
|
55
58
|
"@workspace/core": "0.0.1"
|
|
56
59
|
},
|
|
57
60
|
"engines": {
|