mirror of
https://github.com/status-im/realm-js.git
synced 2025-01-11 14:54:33 +00:00
parent
933b3ad765
commit
795be904a1
@ -80,7 +80,6 @@
|
||||
"dependencies": {
|
||||
"command-line-args": "^4.0.6",
|
||||
"decompress": "^4.2.0",
|
||||
"decompress-tarxz": "^2.1.1",
|
||||
"fs-extra": "^4.0.2",
|
||||
"ini": "^1.3.4",
|
||||
"nan": "^2.3.3",
|
||||
@ -91,8 +90,7 @@
|
||||
"request": "^2.78.0",
|
||||
"stream-counter": "^1.0.0",
|
||||
"sync-request": "^3.0.1",
|
||||
"url-parse": "^1.1.7",
|
||||
"lzma-native": "^3.0.4"
|
||||
"url-parse": "^1.1.7"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^4.0.35",
|
||||
|
@ -60,7 +60,6 @@
|
||||
"src/object-store/src/impl/transact_log_handler.cpp",
|
||||
"src/object-store/src/impl/weak_realm_notifier.cpp",
|
||||
"src/object-store/src/util/uuid.cpp",
|
||||
|
||||
"src/object-store/src/binding_callback_thread_observer.hpp",
|
||||
"src/object-store/src/binding_context.hpp",
|
||||
"src/object-store/src/collection_notifications.hpp",
|
||||
|
@ -62,6 +62,7 @@ function printProgress(input, totalBytes, archive) {
|
||||
|
||||
function download(serverFolder, archive, destination) {
|
||||
const url = `https://static.realm.io/downloads/${serverFolder}/${archive}`;
|
||||
console.log(`Download url: ${url}`);
|
||||
return fetch(url).then((response) => {
|
||||
if (response.status !== 200) {
|
||||
throw new Error(`Error downloading ${url} - received status ${response.status} ${response.statusText}`);
|
||||
@ -98,12 +99,11 @@ function download(serverFolder, archive, destination) {
|
||||
|
||||
function extract(downloadedArchive, targetFolder, archiveRootFolder) {
|
||||
console.log(`Extracting ${path.basename(downloadedArchive)} => ${targetFolder}`);
|
||||
const decompressOptions = /tar\.xz$/.test(downloadedArchive) ? { plugins: [ require('decompress-tarxz')() ] } : undefined;
|
||||
if (!archiveRootFolder) {
|
||||
return decompress(downloadedArchive, targetFolder, decompressOptions);
|
||||
return decompress(downloadedArchive, targetFolder);
|
||||
} else {
|
||||
const tempExtractLocation = path.resolve(os.tmpdir(), path.basename(downloadedArchive, path.extname(downloadedArchive)));
|
||||
return decompress(downloadedArchive, tempExtractLocation, decompressOptions)
|
||||
return decompress(downloadedArchive, tempExtractLocation)
|
||||
.then(() => fs.readdir(path.resolve(tempExtractLocation, archiveRootFolder)))
|
||||
.then(items => Promise.all(items.map(item => {
|
||||
const source = path.resolve(tempExtractLocation, archiveRootFolder, item);
|
||||
@ -178,7 +178,7 @@ function getSyncRequirements(dependencies, options, required = {}) {
|
||||
required.SYNC_ARCHIVE_ROOT = `realm-sync-node-cocoa-${dependencies.REALM_SYNC_VERSION}`;
|
||||
return Promise.resolve(required);
|
||||
case 'ios':
|
||||
required.SYNC_ARCHIVE = `realm-sync-cocoa-${dependencies.REALM_SYNC_VERSION}.tar.xz`;
|
||||
required.SYNC_ARCHIVE = `realm-sync-cocoa-${dependencies.REALM_SYNC_VERSION}.tar.gz`;
|
||||
required.SYNC_ARCHIVE_ROOT = `core`;
|
||||
return Promise.resolve(required);
|
||||
case 'win': {
|
||||
|
@ -234,8 +234,6 @@
|
||||
F620F0741CB9F60C0082977B /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/CoreFoundation.framework; sourceTree = DEVELOPER_DIR; };
|
||||
F6267BC91CADC30000AC36B1 /* js_util.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = js_util.hpp; sourceTree = "<group>"; };
|
||||
F6267BCA1CADC49200AC36B1 /* node_dummy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = node_dummy.cpp; sourceTree = "<group>"; };
|
||||
F63118431CEBA7B700ECB2DE /* external_commit_helper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = external_commit_helper.cpp; sourceTree = "<group>"; };
|
||||
F63118441CEBA7B700ECB2DE /* external_commit_helper.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = external_commit_helper.hpp; sourceTree = "<group>"; };
|
||||
F631184A1CEBA7D800ECB2DE /* external_commit_helper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = external_commit_helper.cpp; sourceTree = "<group>"; };
|
||||
F631184B1CEBA7D800ECB2DE /* external_commit_helper.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = external_commit_helper.hpp; sourceTree = "<group>"; };
|
||||
F63FF2B11C1241E500B3B8E0 /* libRealmJS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libRealmJS.a; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
@ -615,8 +613,6 @@
|
||||
F63118421CEBA7A100ECB2DE /* android */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F63118431CEBA7B700ECB2DE /* external_commit_helper.cpp */,
|
||||
F63118441CEBA7B700ECB2DE /* external_commit_helper.hpp */,
|
||||
);
|
||||
path = android;
|
||||
sourceTree = "<group>";
|
||||
|
Loading…
x
Reference in New Issue
Block a user