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