@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 CHANGED
@@ -50698,7 +50698,7 @@ async function runCommand(context, operation, errorContext = UNKNOWN_COMMAND_ERR
50698
50698
  // package.json
50699
50699
  var package_default = {
50700
50700
  name: "@settlemint/dalp-cli",
50701
- version: "3.1.32-main.42350939226",
50701
+ version: "3.1.32-main.42355193064",
50702
50702
  private: false,
50703
50703
  description: "CLI for the Digital Asset Lifecycle Platform \u2014 manage tokens, identities, compliance, and more from the command line.",
50704
50704
  homepage: "https://settlemint.com",
@@ -51249,11 +51249,21 @@ async function pollForToken(apiUrl, deviceCode, intervalSeconds, expiresInSecond
51249
51249
  let pollInterval = intervalSeconds * 1000;
51250
51250
  while (now() < deadline) {
51251
51251
  await sleep(pollInterval);
51252
+ if (now() >= deadline) {
51253
+ break;
51254
+ }
51252
51255
  const response = await postJson(`${baseUrl}/api/auth/device/token`, {
51253
51256
  grant_type: "urn:ietf:params:oauth:grant-type:device_code",
51254
51257
  device_code: deviceCode,
51255
51258
  client_id: DEVICE_CLIENT_ID
51256
51259
  });
51260
+ if (now() >= deadline) {
51261
+ throw makeCliError({
51262
+ code: "kit.cli.DEVICE_AUTHORIZATION_TIMEOUT",
51263
+ message: "Device code expired. Run 'dalp login' again.",
51264
+ retryable: true
51265
+ });
51266
+ }
51257
51267
  if (response.ok) {
51258
51268
  return readBoundedJson(response, tokenResponseSchema);
51259
51269
  }
@@ -52627,4 +52637,4 @@ if (false) {}
52627
52637
  // src/bin.ts
52628
52638
  await cli.serve();
52629
52639
 
52630
- //# debugId=62AD2DA767CCE2F264756E2164756E21
52640
+ //# debugId=8F097FBC0B7FD5D264756E2164756E21