@syntest/storage
Advanced tools
Comparing version 0.2.1-beta.1 to 0.3.0-beta.0
@@ -1,7 +0,7 @@ | ||
import Yargs = require("yargs"); | ||
export declare class StorageManager { | ||
private static LOGGER; | ||
private _arguments; | ||
get args(): Yargs.ArgumentsCamelCase<{}>; | ||
set args(_arguments: Yargs.ArgumentsCamelCase<{}>); | ||
private syntestDirectory; | ||
private tempSyntestDirectory; | ||
private fid; | ||
constructor(syntestDirectory: string, temporarySynTestDirectory: string, fid: string); | ||
private getFullPath; | ||
@@ -8,0 +8,0 @@ createDirectory(directoryPath: string[], temporary?: boolean): void; |
@@ -26,8 +26,7 @@ "use strict"; | ||
class StorageManager { | ||
get args() { | ||
return this._arguments; | ||
} | ||
set args(_arguments) { | ||
this._arguments = _arguments; | ||
constructor(syntestDirectory, temporarySynTestDirectory, fid) { | ||
StorageManager.LOGGER = (0, logging_1.getLogger)("StorageManager"); | ||
this.syntestDirectory = syntestDirectory; | ||
this.tempSyntestDirectory = temporarySynTestDirectory; | ||
this.fid = fid; | ||
} | ||
@@ -41,5 +40,5 @@ getFullPath(directoryPath, temporary = false) { | ||
if (temporary) { | ||
return path.resolve(path.join(this.args.tempSyntestDirectory, this.args.fid, ...directoryPath)); | ||
return path.resolve(path.join(this.tempSyntestDirectory, this.fid, ...directoryPath)); | ||
} | ||
return path.resolve(path.join(this.args.syntestDirectory, this.args.fid, ...directoryPath)); | ||
return path.resolve(path.join(this.syntestDirectory, this.fid, ...directoryPath)); | ||
} | ||
@@ -84,4 +83,3 @@ createDirectory(directoryPath, temporary = false) { | ||
deleteMainTemporary() { | ||
const directory = this.args | ||
.tempSyntestDirectory; | ||
const directory = this.tempSyntestDirectory; | ||
if (!(0, node_fs_1.existsSync)(directory)) { | ||
@@ -88,0 +86,0 @@ return; |
@@ -28,3 +28,3 @@ "use strict"; | ||
it("test", () => { | ||
new StorageManager_1.StorageManager(); | ||
new StorageManager_1.StorageManager("path", "tempPath", "fid"); | ||
expect(true); | ||
@@ -31,0 +31,0 @@ }); |
{ | ||
"name": "@syntest/storage", | ||
"version": "0.2.1-beta.1", | ||
"version": "0.3.0-beta.0", | ||
"description": "SynTest library for storing namespaced data in a file system", | ||
@@ -47,3 +47,3 @@ "keywords": [ | ||
"dependencies": { | ||
"@syntest/logging": "^0.1.2-beta.1", | ||
"@syntest/logging": "^0.2.0-beta.0", | ||
"fs-extra": "^11.1.1", | ||
@@ -61,3 +61,3 @@ "yargs": "^17.7.1" | ||
}, | ||
"gitHead": "fde9b03d42f12281adcc328da801449c10b3bed7" | ||
"gitHead": "dd7d752f1c013624d0d040f3c9156128136915db" | ||
} |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
67869
349
+ Added@syntest/diagnostics@0.1.0-beta.1(transitive)
+ Added@syntest/logging@0.2.0-beta.5(transitive)
+ Addedwinston@3.13.0(transitive)
- Removed@colors/colors@1.5.0(transitive)
- Removed@syntest/logging@0.1.2-beta.1(transitive)
- Removedwinston@3.8.2(transitive)