@stripe/link-cli 0.2.1 → 0.2.3
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/README.md +15 -0
- package/dist/cli.js +15 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,6 +16,21 @@ npx @stripe/link-cli
|
|
|
16
16
|
|
|
17
17
|
You can install the skill via `npx skills add stripe/link-cli`.
|
|
18
18
|
|
|
19
|
+
### MCP Server
|
|
20
|
+
|
|
21
|
+
Link CLI can also run as a local MCP server. Add the following to your MCP client config (`.mcp.json`, etc.)
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"link": {
|
|
27
|
+
"command": "npx",
|
|
28
|
+
"args": ["@stripe/link-cli", "--mcp"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
19
34
|
## Quickstart
|
|
20
35
|
|
|
21
36
|
### Login
|
package/dist/cli.js
CHANGED
|
@@ -11525,6 +11525,7 @@ function createAuthCli(authResource, updateInfo) {
|
|
|
11525
11525
|
const maxAttempts = opts.maxAttempts;
|
|
11526
11526
|
const deadline = Date.now() + opts.timeout * 1e3;
|
|
11527
11527
|
let attempts = 0;
|
|
11528
|
+
let previousAttemptData;
|
|
11528
11529
|
while (true) {
|
|
11529
11530
|
const pending = storage.getPendingDeviceAuth();
|
|
11530
11531
|
if (pending && !storage.isAuthenticated()) {
|
|
@@ -11567,7 +11568,11 @@ function createAuthCli(authResource, updateInfo) {
|
|
|
11567
11568
|
yield status;
|
|
11568
11569
|
return;
|
|
11569
11570
|
}
|
|
11570
|
-
|
|
11571
|
+
const snapshot = JSON.stringify(status);
|
|
11572
|
+
if (snapshot !== previousAttemptData) {
|
|
11573
|
+
previousAttemptData = snapshot;
|
|
11574
|
+
yield status;
|
|
11575
|
+
}
|
|
11571
11576
|
await new Promise((resolve) => setTimeout(resolve, interval * 1e3));
|
|
11572
11577
|
}
|
|
11573
11578
|
}
|
|
@@ -12829,9 +12834,8 @@ var RetrieveSpendRequest = ({
|
|
|
12829
12834
|
] }),
|
|
12830
12835
|
request?.card.valid_until && /* @__PURE__ */ jsxs10(Text11, { children: [
|
|
12831
12836
|
" ",
|
|
12832
|
-
"Valid Until:",
|
|
12833
|
-
|
|
12834
|
-
/* @__PURE__ */ jsx14(Text11, { bold: true, children: new Date(request.card.valid_until * 1e3).toISOString() })
|
|
12837
|
+
"Valid Until: ",
|
|
12838
|
+
/* @__PURE__ */ jsx14(Text11, { bold: true, children: request.card.valid_until })
|
|
12835
12839
|
] }),
|
|
12836
12840
|
request?.card.billing_address && /* @__PURE__ */ jsxs10(Box11, { flexDirection: "column", marginTop: 1, children: [
|
|
12837
12841
|
/* @__PURE__ */ jsx14(Text11, { bold: true, children: " Billing Address:" }),
|
|
@@ -13268,6 +13272,7 @@ function createSpendRequestCli(repository) {
|
|
|
13268
13272
|
]);
|
|
13269
13273
|
const deadline = Date.now() + timeout * 1e3;
|
|
13270
13274
|
let attempts = 0;
|
|
13275
|
+
let previousAttemptData;
|
|
13271
13276
|
while (true) {
|
|
13272
13277
|
const request = await repository.getSpendRequest(id, { include });
|
|
13273
13278
|
if (!request) {
|
|
@@ -13286,7 +13291,11 @@ function createSpendRequestCli(repository) {
|
|
|
13286
13291
|
yield request;
|
|
13287
13292
|
return;
|
|
13288
13293
|
}
|
|
13289
|
-
|
|
13294
|
+
const snapshot = JSON.stringify(request);
|
|
13295
|
+
if (snapshot !== previousAttemptData) {
|
|
13296
|
+
previousAttemptData = snapshot;
|
|
13297
|
+
yield request;
|
|
13298
|
+
}
|
|
13290
13299
|
await new Promise((resolve) => setTimeout(resolve, interval * 1e3));
|
|
13291
13300
|
}
|
|
13292
13301
|
}
|
|
@@ -13594,7 +13603,7 @@ var ResourceFactory = class {
|
|
|
13594
13603
|
};
|
|
13595
13604
|
|
|
13596
13605
|
// src/cli.tsx
|
|
13597
|
-
var cliVersion = "0.2.
|
|
13606
|
+
var cliVersion = "0.2.3";
|
|
13598
13607
|
var buildNumber = "1";
|
|
13599
13608
|
var cliName = "@stripe/link-cli";
|
|
13600
13609
|
var defaultHeaders = {
|