Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@defer.run/client

Package Overview
Dependencies
Maintainers
1
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@defer.run/client - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

6

dist/cjs/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.defer = exports.init = void 0;
const fetch_1 = require("@whatwg-node/fetch");

@@ -11,2 +12,3 @@ const constants_js_1 = require("./constants.js");

};
exports.init = init;
function defer(fn) {

@@ -32,3 +34,3 @@ const ret = (...args) => {

"Content-type": "application/json",
Authorization: `Bearer ${token}`,
Authorization: `Basic ${Buffer.from(":" + token).toString("base64")}`,
},

@@ -47,2 +49,2 @@ }).then(resolve, (error) => {

}
exports.default = { defer, init };
exports.defer = defer;

@@ -5,7 +5,7 @@ import { fetch } from "@whatwg-node/fetch";

let apiEndpoint = `${DOMAIN}${PATH}`;
const init = ({ apiToken, apiUrl }) => {
export const init = ({ apiToken, apiUrl }) => {
token = apiToken || process.env[TOKEN_ENV_NAME];
apiEndpoint = apiUrl || `${DOMAIN}${PATH}`;
};
function defer(fn) {
export function defer(fn) {
const ret = (...args) => {

@@ -30,3 +30,3 @@ if (token) {

"Content-type": "application/json",
Authorization: `Bearer ${token}`,
Authorization: `Basic ${Buffer.from(":" + token).toString("base64")}`,
},

@@ -45,2 +45,1 @@ }).then(resolve, (error) => {

}
export default { defer, init };

@@ -5,7 +5,4 @@ interface Options {

}
declare function defer<F extends (...args: any | undefined) => Promise<any>>(fn: F): F;
declare const _default: {
defer: typeof defer;
init: ({ apiToken, apiUrl }: Options) => void;
};
export default _default;
export declare const init: ({ apiToken, apiUrl }: Options) => void;
export declare function defer<F extends (...args: any | undefined) => Promise<any>>(fn: F): F;
export {};
{
"name": "@defer.run/client",
"version": "0.0.9",
"version": "0.0.10",
"description": "cua JavaScript client",

@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js",

@@ -12,3 +12,3 @@ import { fetch } from "@whatwg-node/fetch";

const init = ({ apiToken, apiUrl }: Options) => {
export const init = ({ apiToken, apiUrl }: Options) => {
token = apiToken || process.env[TOKEN_ENV_NAME];

@@ -18,4 +18,6 @@ apiEndpoint = apiUrl || `${DOMAIN}${PATH}`;

function defer<F extends (...args: any | undefined) => Promise<any>>(fn: F): F;
function defer(fn: any): any {
export function defer<F extends (...args: any | undefined) => Promise<any>>(
fn: F
): F;
export function defer(fn: any): any {
const ret = (...args: any[]) => {

@@ -41,3 +43,5 @@ if (token) {

"Content-type": "application/json",
Authorization: `Bearer ${token}`,
Authorization: `Basic ${Buffer.from(":" + token).toString(
"base64"
)}`,
},

@@ -55,3 +59,1 @@ }).then(resolve, (error) => {

}
export default { defer, init };

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