@settlemint/dalp-cli 3.1.32-main.42350939226 → 3.1.32-main.42355193064
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/dalp.js +12 -2
- package/dist/dalp.js.map +4 -4
- package/package.json +4 -4
- package/src/commands/login.ts +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@settlemint/dalp-cli",
|
|
3
|
-
"version": "3.1.32-main.
|
|
3
|
+
"version": "3.1.32-main.42355193064",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "CLI for the Digital Asset Lifecycle Platform — manage tokens, identities, compliance, and more from the command line.",
|
|
6
6
|
"homepage": "https://settlemint.com",
|
|
@@ -50,14 +50,14 @@
|
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@modelcontextprotocol/server": "2.0.0-alpha.4",
|
|
53
|
-
"@settlemint/dalp-sdk": "3.1.32-main.
|
|
53
|
+
"@settlemint/dalp-sdk": "3.1.32-main.42355193064",
|
|
54
54
|
"incur": "0.7.1",
|
|
55
55
|
"zod": "4.6.7"
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@arethetypeswrong/cli": "0.18.5",
|
|
59
|
-
"@testkit/effect-bun-test": "3.1.32-main.
|
|
60
|
-
"@tools/typescript-config": "3.1.32-main.
|
|
59
|
+
"@testkit/effect-bun-test": "3.1.32-main.42355193064",
|
|
60
|
+
"@tools/typescript-config": "3.1.32-main.42355193064",
|
|
61
61
|
"@types/bun": "1.4.4",
|
|
62
62
|
"publint": "0.3.25"
|
|
63
63
|
},
|
package/src/commands/login.ts
CHANGED
|
@@ -174,12 +174,23 @@ export async function pollForToken(
|
|
|
174
174
|
|
|
175
175
|
while (now() < deadline) {
|
|
176
176
|
await sleep(pollInterval);
|
|
177
|
+
if (now() >= deadline) {
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
177
180
|
const response = await postJson(`${baseUrl}/api/auth/device/token`, {
|
|
178
181
|
grant_type: "urn:ietf:params:oauth:grant-type:device_code",
|
|
179
182
|
device_code: deviceCode,
|
|
180
183
|
client_id: DEVICE_CLIENT_ID,
|
|
181
184
|
});
|
|
182
185
|
|
|
186
|
+
if (now() >= deadline) {
|
|
187
|
+
throw makeCliError({
|
|
188
|
+
code: "kit.cli.DEVICE_AUTHORIZATION_TIMEOUT",
|
|
189
|
+
message: "Device code expired. Run 'dalp login' again.",
|
|
190
|
+
retryable: true,
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
|
|
183
194
|
if (response.ok) {
|
|
184
195
|
return readBoundedJson(response, tokenResponseSchema);
|
|
185
196
|
}
|