New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@squarecloud/api

Package Overview
Dependencies
Maintainers
2
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@squarecloud/api - npm Package Compare versions

Comparing version
1.1.8
to
1.1.9
+3
-2
lib/APIManager.d.ts

@@ -0,1 +1,2 @@

import { AxiosRequestConfig } from 'axios';
import { APIResponse, RawUserData } from './typings';

@@ -9,4 +10,4 @@ export declare class SquareCloudAPIError extends Error {

private fetch;
user(id?: string, options?: RequestInit): Promise<RawUserData>;
application(path: string, id: string, options?: RequestInit | boolean): Promise<APIResponse>;
user(id?: string, options?: AxiosRequestConfig): Promise<RawUserData>;
application(path: string, id: string, options?: AxiosRequestConfig | boolean): Promise<APIResponse>;
}
+5
-1
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.APIManager = exports.SquareCloudAPIError = void 0;
const axios_1 = __importDefault(require("axios"));
class SquareCloudAPIError extends Error {

@@ -28,3 +32,3 @@ constructor(code, message) {

options.method = options.method || 'GET';
const data = await fetch('https://api.squarecloud.app/v1/public/' + path, options).then((r) => r.json());
const data = await (0, axios_1.default)('https://api.squarecloud.app/v1/public/' + path, options).then((r) => r.data);
if (data.status === 'error') {

@@ -31,0 +35,0 @@ throw new SquareCloudAPIError(data.code);

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

method: 'POST',
body: formData.getBuffer(),
data: formData.getBuffer(),
headers: formData.getHeaders(),

@@ -122,0 +122,0 @@ });

{
"name": "@squarecloud/api",
"version": "1.1.8",
"version": "1.1.9",
"description": "A JavaScript Wrapper for SquareCloud API",

@@ -30,2 +30,3 @@ "main": "lib/index.js",

"dependencies": {
"axios": "^1.2.1",
"form-data": "^4.0.0",

@@ -32,0 +33,0 @@ "zod": "^3.19.1"