@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 +6 -0
- package/dist/cli.js +9 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.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().
|
|
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
|
|
1744
|
-
"
|
|
1745
|
-
"Authorization endpoint response
|
|
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
|
}
|