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

@zenfs/core

Package Overview
Dependencies
Maintainers
1
Versions
171
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zenfs/core - npm Package Compare versions

Comparing version 0.7.4 to 0.7.5

8

dist/backends/AsyncStore.d.ts

@@ -102,2 +102,3 @@ import type { Cred } from '../cred.js';

export declare class AsyncStoreFS extends AsyncStoreFS_base {
protected _options: AsyncStoreOptions;
protected store: AsyncStore;

@@ -109,9 +110,4 @@ private _cache?;

metadata(): FileSystemMetadata;
constructor(options: AsyncStoreOptions);
constructor(_options: AsyncStoreOptions);
/**
* Initializes the file system. Typically called by subclasses' async
* constructors.
*/
private _initialize;
/**
* Delete all contents stored in the file system.

@@ -118,0 +114,0 @@ */

@@ -56,3 +56,8 @@ import { dirname, basename, join, resolve } from '../emulation/path.js';

await super.ready();
await this._ready;
if (this._options.lruCacheSize > 0) {
this._cache = new LRUCache(this._options.lruCacheSize);
}
this.store = await this._options.store;
await this.makeRootDirectory();
this._sync = this._options.sync || InMemory.create({ name: 'test' });
return this;

@@ -66,19 +71,7 @@ }

}
constructor(options) {
constructor(_options) {
super();
this._ready = this._initialize(options);
this._options = _options;
}
/**
* Initializes the file system. Typically called by subclasses' async
* constructors.
*/
async _initialize({ store, lruCacheSize, sync }) {
if (lruCacheSize > 0) {
this._cache = new LRUCache(lruCacheSize);
}
this.store = await store;
await this.makeRootDirectory();
this._sync = sync || InMemory.create({ name: 'test' });
}
/**
* Delete all contents stored in the file system.

@@ -85,0 +78,0 @@ */

@@ -128,3 +128,13 @@ import { ApiError, ErrorCode } from './ApiError.js';

async ready() {
await this._initialize();
if (this._isInitialized) {
return this;
}
try {
await this.crossCopy('/');
this._isInitialized = true;
}
catch (e) {
this._isInitialized = false;
throw e;
}
return this;

@@ -207,18 +217,2 @@ }

/**
* Called once to load up files from async storage into sync storage.
*/
async _initialize() {
if (this._isInitialized) {
return;
}
try {
await this.crossCopy('/');
this._isInitialized = true;
}
catch (e) {
this._isInitialized = false;
throw e;
}
}
/**
* @internal

@@ -225,0 +219,0 @@ */

{
"name": "@zenfs/core",
"version": "0.7.4",
"version": "0.7.5",
"description": "A filesystem in your browser",

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

Sorry, the diff of this file is too big to display

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