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

@paradisec/proxyist-adapter-local

Package Overview
Dependencies
Maintainers
2
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paradisec/proxyist-adapter-local - npm Package Compare versions

Comparing version 0.2.18 to 0.3.0

16

dist/index.js
import fs from 'node:fs';
const createAdapter = async (config) => {
const getPath = (identifier, filename) => {
const getDirectory = (identifier) => {
const path = config.transform(identifier);
return `${config.directory}/${path}/${filename}`;
return `${config.directory}/${path}`;
};
const getPath = (identifier, filename) => {
const directory = getDirectory(identifier);
return `${directory}/${filename}`;
};
const exists = async (identifier, filename) => {

@@ -28,2 +32,9 @@ const path = getPath(identifier, filename);

};
const listFiles = async (identifier) => {
const directory = getDirectory(identifier);
if (!fs.existsSync(directory)) {
return [];
}
return fs.readdirSync(directory, { recursive: true, encoding: 'utf8' });
};
return {

@@ -34,4 +45,5 @@ exists,

rm,
listFiles,
};
};
export default createAdapter;

10

package.json
{
"name": "@paradisec/proxyist-adapter-local",
"version": "0.2.18",
"version": "0.3.0",
"description": "Local filesystem adapter for proxyist",

@@ -9,4 +9,4 @@ "exports": "./dist/index.js",

"dependencies": {
"@paradisec/proxyist": "^0.2.18",
"@paradisec/proxyist-adapter-common": "^0.2.18"
"@paradisec/proxyist": "^0.3.0",
"@paradisec/proxyist-adapter-common": "^0.3.0"
},

@@ -20,3 +20,3 @@ "type": "module",

"devDependencies": {
"@paradisec/proxyist-adapter-tests": "^0.2.18",
"@paradisec/proxyist-adapter-tests": "^0.3.0",
"@tsconfig/node18": "^18.2.0",

@@ -41,3 +41,3 @@ "@tsconfig/strictest": "^2.0.1",

],
"gitHead": "1790b039c03d0db49fe7581481a820d03985737e"
"gitHead": "d71986530df347270e90edf7ebe10b844ec7855e"
}

@@ -11,8 +11,14 @@ import fs from 'node:fs';

const createAdapter: ProxyistCreateAdapter<LocalAdapterConfig> = async (config) => {
const getPath = (identifier: string, filename: string) => {
const getDirectory = (identifier: string) => {
const path = config.transform(identifier);
return `${config.directory}/${path}/${filename}`;
return `${config.directory}/${path}`;
};
const getPath = (identifier: string, filename: string) => {
const directory = getDirectory(identifier);
return `${directory}/${filename}`;
};
const exists = async (identifier: string, filename: string) => {

@@ -48,2 +54,12 @@ const path = getPath(identifier, filename);

const listFiles = async (identifier: string) => {
const directory = getDirectory(identifier);
if (!fs.existsSync(directory)) {
return [];
}
return fs.readdirSync(directory, { recursive: true, encoding: 'utf8' });
};
return {

@@ -54,2 +70,3 @@ exists,

rm,
listFiles,
};

@@ -56,0 +73,0 @@ };

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