mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-18 02:16:11 +08:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
85db61704c | ||
![]() |
57ddfc5d7d | ||
![]() |
6cb38eeec1 | ||
![]() |
8a7c21fb50 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-update-cli",
|
"name": "react-native-update-cli",
|
||||||
"version": "1.1.16",
|
"version": "1.1.18",
|
||||||
"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": {
|
||||||
|
@@ -147,6 +147,10 @@ async function uploadFile(fn, key) {
|
|||||||
realUrl,
|
realUrl,
|
||||||
{
|
{
|
||||||
formData,
|
formData,
|
||||||
|
headers: {
|
||||||
|
'User-Agent': userAgent,
|
||||||
|
'X-AccessToken': session ? session.token : '',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
(err, resp, body) => {
|
(err, resp, body) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@@ -68,10 +68,10 @@ export async function getApkInfo(fn) {
|
|||||||
const updateJsonFile = await appInfoParser.parser.getEntry(
|
const updateJsonFile = await appInfoParser.parser.getEntry(
|
||||||
/res\/raw\/update.json/,
|
/res\/raw\/update.json/,
|
||||||
);
|
);
|
||||||
if (!updateJsonFile) {
|
let appCredential = {};
|
||||||
throw new Error('找不到update.json文件');
|
if (updateJsonFile) {
|
||||||
|
appCredential = JSON.parse(updateJsonFile.toString()).android;
|
||||||
}
|
}
|
||||||
const appCredential = JSON.parse(updateJsonFile.toString()).android;
|
|
||||||
const { versionName, application } = await appInfoParser.parse();
|
const { versionName, application } = await appInfoParser.parse();
|
||||||
let buildTime = 0;
|
let buildTime = 0;
|
||||||
if (Array.isArray(application.metaData)) {
|
if (Array.isArray(application.metaData)) {
|
||||||
@@ -102,10 +102,10 @@ export async function getIpaInfo(fn) {
|
|||||||
const updateJsonFile = await appInfoParser.parser.getEntry(
|
const updateJsonFile = await appInfoParser.parser.getEntry(
|
||||||
/payload\/.+?\.app\/assets\/update.json/,
|
/payload\/.+?\.app\/assets\/update.json/,
|
||||||
);
|
);
|
||||||
if (!updateJsonFile) {
|
let appCredential = {};
|
||||||
throw new Error('找不到update.json文件');
|
if (updateJsonFile) {
|
||||||
|
appCredential = JSON.parse(updateJsonFile.toString()).ios;
|
||||||
}
|
}
|
||||||
const appCredential = JSON.parse(updateJsonFile.toString()).ios;
|
|
||||||
const {
|
const {
|
||||||
CFBundleShortVersionString: versionName,
|
CFBundleShortVersionString: versionName,
|
||||||
} = await appInfoParser.parse();
|
} = await appInfoParser.parse();
|
||||||
|
Reference in New Issue
Block a user