laxy-verify 1.1.0 → 1.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/dist/auth.js +12 -1
- package/package.json +1 -1
package/dist/auth.js
CHANGED
|
@@ -52,7 +52,7 @@ const os = __importStar(require("node:os"));
|
|
|
52
52
|
const readline = __importStar(require("node:readline"));
|
|
53
53
|
const CREDENTIALS_DIR = path.join(os.homedir(), ".laxy");
|
|
54
54
|
const CREDENTIALS_PATH = path.join(CREDENTIALS_DIR, "credentials.json");
|
|
55
|
-
exports.LAXY_API_URL = process.env.LAXY_API_URL ?? "https://laxy.
|
|
55
|
+
exports.LAXY_API_URL = process.env.LAXY_API_URL ?? "https://laxy-blue.vercel.app";
|
|
56
56
|
function loadToken() {
|
|
57
57
|
// 환경변수 우선
|
|
58
58
|
const envToken = process.env.LAXY_TOKEN;
|
|
@@ -176,6 +176,17 @@ async function login(emailArg) {
|
|
|
176
176
|
console.error(` ❌ 서버에 연결할 수 없습니다. (${exports.LAXY_API_URL})`);
|
|
177
177
|
process.exit(1);
|
|
178
178
|
}
|
|
179
|
+
// HTML(404/500 에러 페이지) 응답 감지
|
|
180
|
+
const contentType = res.headers.get("content-type") ?? "";
|
|
181
|
+
if (!contentType.includes("application/json")) {
|
|
182
|
+
const body = await res.text();
|
|
183
|
+
const preview = body.slice(0, 200).replace(/\n/g, " ");
|
|
184
|
+
console.error(` ❌ 서버가 JSON이 아닌 응답을 반환했습니다. (HTTP ${res.status})`);
|
|
185
|
+
console.error(` URL: ${exports.LAXY_API_URL}/api/cli-auth`);
|
|
186
|
+
console.error(` 응답 미리보기: ${preview}`);
|
|
187
|
+
console.error(` 해결 방법: Vercel 환경변수(CLI_JWT_SECRET, SUPABASE_SERVICE_ROLE_KEY)가 설정됐는지 확인하세요.`);
|
|
188
|
+
process.exit(1);
|
|
189
|
+
}
|
|
179
190
|
const data = (await res.json());
|
|
180
191
|
if (!res.ok || !data.token) {
|
|
181
192
|
console.error(` ❌ ${data.error ?? "로그인에 실패했습니다."}`);
|