mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 09:41:38 +08:00
v1.30.3
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-update-cli",
|
"name": "react-native-update-cli",
|
||||||
"version": "1.30.2",
|
"version": "1.30.3",
|
||||||
"description": "Command tools for javaScript updater with `pushy` service for react native apps.",
|
"description": "Command tools for javaScript updater with `pushy` service for react native apps.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
@@ -66,7 +66,11 @@ async function query(url, options) {
|
|||||||
try {
|
try {
|
||||||
json = JSON.parse(text);
|
json = JSON.parse(text);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error(`Server error: ${text}`);
|
if (resp.statusText.includes('Unauthorized')) {
|
||||||
|
throw new Error('登录信息已过期,请使用 pushy login 命令重新登录');
|
||||||
|
} else {
|
||||||
|
throw new Error(`Server error: ${resp.statusText}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (resp.status !== 200) {
|
if (resp.status !== 200) {
|
||||||
@@ -166,7 +170,7 @@ export async function uploadFile(fn, key) {
|
|||||||
}
|
}
|
||||||
if (resp.statusCode > 299) {
|
if (resp.statusCode > 299) {
|
||||||
return reject(
|
return reject(
|
||||||
Object.assign(new Error(JSON.stringify(body)), {
|
Object.assign(new Error(body), {
|
||||||
status: resp.statusCode,
|
status: resp.statusCode,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user