Socket
Socket
Sign inDemoInstall

expo-server-sdk

Package Overview
Dependencies
Maintainers
26
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-server-sdk - npm Package Compare versions

Comparing version 3.7.0 to 3.8.0

2

build/ExpoClient.d.ts

@@ -9,2 +9,3 @@ /// <reference types="node" />

private accessToken;
private useFcmV1;
constructor(options?: ExpoClientOptions);

@@ -52,2 +53,3 @@ /**

accessToken?: string;
useFcmV1?: boolean;
};

@@ -54,0 +56,0 @@ export declare type ExpoPushToken = string;

@@ -70,2 +70,3 @@ "use strict";

this.accessToken = options.accessToken;
this.useFcmV1 = options.useFcmV1;
}

@@ -94,2 +95,7 @@ /**

return __awaiter(this, void 0, void 0, function* () {
// @ts-expect-error We don't yet have type declarations for URL
const url = new URL(`${BASE_API_URL}/push/send`);
if (typeof this.useFcmV1 === 'boolean') {
url.searchParams.append('useFcmV1', this.useFcmV1);
}
const actualMessagesCount = Expo._getActualMessageCount(messages);

@@ -99,3 +105,3 @@ const data = yield this.limitConcurrentRequests(() => __awaiter(this, void 0, void 0, function* () {

try {
return yield this.requestAsync(`${BASE_API_URL}/push/send`, {
return yield this.requestAsync(url.toString(), {
httpMethod: 'post',

@@ -102,0 +108,0 @@ body: messages,

2

package.json
{
"name": "expo-server-sdk",
"version": "3.7.0",
"version": "3.8.0",
"description": "Server-side library for working with Expo using Node.js",

@@ -5,0 +5,0 @@ "main": "build/ExpoClient.js",

@@ -19,3 +19,6 @@ # expo-server-sdk-node ![Tests](https://github.com/expo/expo-server-sdk-node/workflows/Tests/badge.svg) [![codecov](https://codecov.io/gh/expo/expo-server-sdk-node/branch/master/graph/badge.svg)](https://codecov.io/gh/expo/expo-server-sdk-node)

// optionally providing an access token if you have enabled push security
let expo = new Expo({ accessToken: process.env.EXPO_ACCESS_TOKEN });
let expo = new Expo({
accessToken: process.env.EXPO_ACCESS_TOKEN,
useFcmV1: false // this can be set to true in order to use the FCM v1 API
});

@@ -71,3 +74,3 @@ // Create the messages that you want to send to clients

// Later, after the Expo push notification service has delivered the
// notifications to Apple or Google (usually quickly, but allow the the service
// notifications to Apple or Google (usually quickly, but allow the service
// up to 30 minutes when under load), a "receipt" for each notification is

@@ -74,0 +77,0 @@ // created. The receipts will be available for at least a day; stale receipts

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc