New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cordis-axios

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordis-axios - npm Package Compare versions

Comparing version 2.1.6 to 2.2.0

1

lib/index.d.ts

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

}
export declare function base64ToArrayBuffer(base64: string): ArrayBuffer | Uint8Array;
export interface Quester {

@@ -22,0 +21,0 @@ <T = any>(method: Method, url: string, config?: AxiosRequestConfig): Promise<T>;

@@ -30,3 +30,2 @@ var __create = Object.create;

Quester: () => Quester,
base64ToArrayBuffer: () => base64ToArrayBuffer,
default: () => src_default

@@ -37,19 +36,5 @@ });

var import_cosmokit = require("cosmokit");
var import_file_type = require("file-type");
var import_mime_db = __toESM(require("mime-db"));
var import_axios = __toESM(require("axios"));
var import_schemastery = __toESM(require("schemastery"));
function base64ToArrayBuffer(base64) {
if (typeof Buffer !== "undefined") {
return Buffer.from(base64, "base64").buffer;
} else {
const binary = atob(base64.replace(/\s/g, ""));
const buffer = new Uint8Array(binary.length);
for (let i = 0; i < binary.length; i++) {
buffer[i] = binary.charCodeAt(i);
}
return buffer;
}
}
__name(base64ToArrayBuffer, "base64ToArrayBuffer");
var Quester = class {

@@ -96,8 +81,2 @@ constructor(ctx, config) {

var _a, _b;
if (url.startsWith("base64://")) {
const data2 = base64ToArrayBuffer(url.slice(9));
const result = await (0, import_file_type.fromBuffer)(data2);
const name2 = "file" + (result ? "." + result.ext : "");
return { mime: result == null ? void 0 : result.mime, filename: name2, data: data2 };
}
const capture = /^data:([\w/-]+);base64,(.*)$/.exec(url);

@@ -108,3 +87,3 @@ if (capture) {

const name2 = "file" + (ext ? "." + ext : "");
return { mime: mime2, filename: name2, data: base64ToArrayBuffer(base64) };
return { mime: mime2, filename: name2, data: (0, import_cosmokit.base64ToArrayBuffer)(base64) };
}

@@ -165,5 +144,4 @@ const [_, name] = new URL(url).pathname.match(/.+\/([^/]*)/);

0 && (module.exports = {
Quester,
base64ToArrayBuffer
Quester
});
//# sourceMappingURL=index.js.map

5

package.json
{
"name": "cordis-axios",
"description": "Axios service for cordis",
"version": "2.1.6",
"version": "2.2.0",
"main": "lib/index.js",

@@ -47,4 +47,3 @@ "typings": "lib/index.d.ts",

"axios": "~1.1.3",
"cosmokit": "^1.3.4",
"file-type": "^16.5.4",
"cosmokit": "^1.4.0",
"mime-db": "^1.52.0",

@@ -51,0 +50,0 @@ "schemastery": "^3.6.1"

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