Socket
Socket
Sign inDemoInstall

@supabase/functions-js

Package Overview
Dependencies
Maintainers
5
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@supabase/functions-js - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

2

dist/main/index.d.ts

@@ -24,3 +24,3 @@ import { Fetch, FunctionInvokeOptions } from './types';

*/
invoke(functionName: string, invokeOptions: FunctionInvokeOptions): Promise<{
invoke(functionName: string, invokeOptions?: FunctionInvokeOptions): Promise<{
data: string | null;

@@ -27,0 +27,0 @@ error: Error | null;

@@ -49,3 +49,3 @@ "use strict";

try {
const { headers, body } = invokeOptions;
const { headers, body } = invokeOptions !== null && invokeOptions !== void 0 ? invokeOptions : {};
const response = yield this.fetch(`${this.url}/${functionName}`, {

@@ -57,3 +57,3 @@ method: 'POST',

let data;
const { responseType } = invokeOptions;
const { responseType } = invokeOptions !== null && invokeOptions !== void 0 ? invokeOptions : {};
if (!responseType || responseType === 'json') {

@@ -60,0 +60,0 @@ data = yield response.json();

@@ -24,3 +24,3 @@ import { Fetch, FunctionInvokeOptions } from './types';

*/
invoke(functionName: string, invokeOptions: FunctionInvokeOptions): Promise<{
invoke(functionName: string, invokeOptions?: FunctionInvokeOptions): Promise<{
data: string | null;

@@ -27,0 +27,0 @@ error: Error | null;

@@ -43,3 +43,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

try {
const { headers, body } = invokeOptions;
const { headers, body } = invokeOptions !== null && invokeOptions !== void 0 ? invokeOptions : {};
const response = yield this.fetch(`${this.url}/${functionName}`, {

@@ -51,3 +51,3 @@ method: 'POST',

let data;
const { responseType } = invokeOptions;
const { responseType } = invokeOptions !== null && invokeOptions !== void 0 ? invokeOptions : {};
if (!responseType || responseType === 'json') {

@@ -54,0 +54,0 @@ data = yield response.json();

{
"name": "@supabase/functions-js",
"version": "1.1.2",
"description": "JS Client library to interact with Supabase Functions",
"version": "1.1.3",
"description": "JS Client library to interact with Supabase Functions.",
"main": "dist/main/index.js",

@@ -6,0 +6,0 @@ "module": "dist/module/index.js",

@@ -40,6 +40,6 @@ import crossFetch from 'cross-fetch'

functionName: string,
invokeOptions: FunctionInvokeOptions
invokeOptions?: FunctionInvokeOptions
): Promise<{ data: string | null; error: Error | null }> {
try {
const { headers, body } = invokeOptions
const { headers, body } = invokeOptions ?? {}
const response = await this.fetch(`${this.url}/${functionName}`, {

@@ -52,3 +52,3 @@ method: 'POST',

let data
const { responseType } = invokeOptions
const { responseType } = invokeOptions ?? {}
if (!responseType || responseType === 'json') {

@@ -55,0 +55,0 @@ data = await response.json()

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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