Socket
Book a DemoInstallSign in
Socket

expo-updates-server

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-updates-server

expo-updates-server =================== > port from expo/custom/expo-updates-server

latest
npmnpm
Version
1.0.5
Version published
Weekly downloads
4
-42.86%
Maintainers
1
Weekly downloads
 
Created
Source

expo-updates-server

port from expo/custom/expo-updates-server

installation

yarn/npm expo-updates-server

how to use

FileSystemUpdatesStorage implements ExpoUpdatesStorageApi based on files. you need output "expo export --experimental-bundle" to UPDATES folder under ${UPDATES}/${version}/${datetime:20230505}/[assets|bundles|metadata.json|expoConfig.json].

const express = require('express')
const {FileSystemUpdatesStorage, manifest, assets}=require("expo-updates-server")

const server=express()

const updatesStorage=new FileSystemUpdatesStorage({
    UPDATES: "/users/test/updates",
    HOSTNAME: "https://mydomain.com/updates",
    PRIVATE_KEY_PATH: "/users/test/private-key.pem",
})

server.use("/updates/manifest", manifest(updatesStorage))
server.use("/updates/assets", assets(updatesStorage))

extension

the interface is at expo-updates-server/lib/common/ExpoUpdatesStorage.

const {ExpoUpdatesStorageApi}=require("expo-updates-server")

class MyExpoUpdatesStorage extends ExpoUpdatesStorageApi{
    getLatestUpdateBundlePathForRuntimeVersionAsync(runtimeVersion) {
	}

	getAssetMetadataAsync() {

	}
	getMetadataAsync() {

	}

	getPrivateKeyAsync() {

	}
	getExpoConfigAsync() {

	}
	//optional
	getAssetExtensionHeaders(){

	}
	//optional
	createRollBackDirectiveAsync() {

	}
	//optional
	createNoUpdateAvailableDirectiveAsync() {

	}
}

or if you already have manifest somewhere

const {ExpoUpdatesStorageApi}=require("expo-updates-server")

const storage=ExpoUpdatesStorageApi.fromManifestURI(({runtimeVersion, platform})=>`https://mydomain.com/updates/${runtimeVersion}/${platform}/manifest.json`)

FAQs

Package last updated on 02 Jul 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts