@zenfs/core
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -24,3 +24,3 @@ import { Buffer } from 'buffer'; | ||
ErrorCode[ErrorCode["ENOTSUP"] = 95] = "ENOTSUP"; | ||
})(ErrorCode || (ErrorCode = {})); | ||
})(ErrorCode = ErrorCode || (ErrorCode = {})); | ||
/** | ||
@@ -27,0 +27,0 @@ * Strings associated with each error code. |
@@ -322,12 +322,9 @@ import * as path from 'path'; | ||
}; | ||
if (parent === '.') { | ||
parent = process.cwd(); | ||
} | ||
if (parent === '/') { | ||
if (filename === '') { | ||
// BASE CASE #1: Return the root's ID. | ||
// Return the root's ID. | ||
return ROOT_NODE_ID; | ||
} | ||
else { | ||
// BASE CASE #2: Find the item in the root node. | ||
// Find the item in the root node. | ||
return readDirectory(this.getINode(tx, parent, ROOT_NODE_ID)); | ||
@@ -334,0 +331,0 @@ } |
export * from './callbacks.js'; | ||
export * from './sync.js'; | ||
import * as promises_1 from './promises.js'; | ||
export { promises_1 as promises }; | ||
import * as constants_1 from './constants.js'; | ||
export { constants_1 as constants }; | ||
export * as promises from './promises.js'; | ||
export * as constants from './constants.js'; | ||
export { initialize, getMount, getMounts, mount, umount, _toUnixTimestamp } from './shared.js'; |
// Utilities and shared data | ||
import { posix as path } from 'path'; | ||
import { ApiError, ErrorCode } from '../ApiError.js'; | ||
import { Cred } from '../cred.js'; | ||
//import { BackendConstructor } from '../backends.js'; | ||
@@ -87,3 +88,3 @@ import { InMemoryFileSystem } from '../backends/InMemory.js'; | ||
// credentials | ||
export let cred; | ||
export let cred = Cred.Root; | ||
export function setCred(val) { | ||
@@ -90,0 +91,0 @@ cred = val; |
@@ -24,3 +24,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
ActionType[ActionType["CREATE_FILE"] = 3] = "CREATE_FILE"; | ||
})(ActionType || (ActionType = {})); | ||
})(ActionType = ActionType || (ActionType = {})); | ||
/** | ||
@@ -27,0 +27,0 @@ * Represents one of the following file flags. A convenience object. |
@@ -18,7 +18,3 @@ /** | ||
import { Cred } from './cred.js'; | ||
import * as process from 'process'; | ||
import { setCred } from './emulation/shared.js'; | ||
if (process && process['initializeTTYs']) { | ||
process['initializeTTYs'](); | ||
} | ||
/** | ||
@@ -25,0 +21,0 @@ * Initializes ZenFS with the given file systems. |
@@ -12,3 +12,3 @@ import { Cred } from './cred.js'; | ||
FileType[FileType["SYMLINK"] = S_IFLNK] = "SYMLINK"; | ||
})(FileType || (FileType = {})); | ||
})(FileType = FileType || (FileType = {})); | ||
/** | ||
@@ -15,0 +15,0 @@ * Implementation of Node's `Stats`. |
{ | ||
"name": "@zenfs/core", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "A filesystem in your browser", | ||
@@ -53,4 +53,2 @@ "main": "dist/index.js", | ||
"archiver": "~2.1.1", | ||
"bfs-path": "~0.1.2", | ||
"bfs-process": "~0.1.6", | ||
"buffer": "~5.1.0", | ||
@@ -64,3 +62,2 @@ "cross-env": "^7.0.3", | ||
"prettier": "^2.8.7", | ||
"source-map-loader": "~0.2.3", | ||
"ts-jest": "^29.1.0", | ||
@@ -67,0 +64,0 @@ "typedoc": "^0.25.1", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
18
977808
9951