@clickraft/cli 0.1.0 → 0.1.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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## [0.1.1](https://github.com/clickraft/cli/compare/v0.1.0...v0.1.1) (2026-05-22)
2
+
3
+ ### Bug Fixes
4
+
5
+ * **auth:** allow mixed-case user_code in OAuth device flow ([#6](https://github.com/clickraft/cli/issues/6)) ([7e94403](https://github.com/clickraft/cli/commit/7e94403d66b598db6966fd2fd24f326e386cbcd3))
6
+
1
7
  # Changelog
2
8
 
3
9
  All notable changes to the Clickraft CLI are documented here.
package/dist/cli.js CHANGED
@@ -923,7 +923,7 @@ var DeviceAuthorizationRequestSchema = z4.object({
923
923
  });
924
924
  var DeviceAuthorizationResponseSchema = z4.object({
925
925
  device_code: z4.string(),
926
- user_code: z4.string().regex(/^[A-Z0-9]{4}-[A-Z0-9]{4}$/),
926
+ user_code: z4.string().min(1),
927
927
  verification_uri: z4.string().url(),
928
928
  verification_uri_complete: z4.string().url().optional(),
929
929
  expires_in: z4.number().int().positive(),
@@ -1740,9 +1740,14 @@ async function requestDeviceAuthorization(opts) {
1740
1740
  const parsed = parseJson(text, "authorization");
1741
1741
  const validated = DeviceAuthorizationResponseSchema.safeParse(parsed);
1742
1742
  if (!validated.success) {
1743
- throw new AuthError(
1744
- "AUTH_TOKEN_INVALID",
1745
- "Authorization endpoint response failed schema validation.",
1743
+ throw new ApiError(
1744
+ "SCHEMA_MISMATCH",
1745
+ "Authorization endpoint response did not match the expected schema.",
1746
+ {
1747
+ status: resp.statusCode,
1748
+ retryable: false,
1749
+ redactedBody: redactTokenLikeFields(truncate(text))
1750
+ },
1746
1751
  validated.error
1747
1752
  );
1748
1753
  }