fix(core): update
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@push.rocks/npmextra',
|
||||
version: '4.0.4',
|
||||
version: '4.0.5',
|
||||
description: 'do more with npm'
|
||||
}
|
||||
|
@@ -3,9 +3,15 @@ import * as paths from './npmextra.paths.js';
|
||||
import { KeyValueStore } from './npmextra.classes.keyvaluestore.js';
|
||||
|
||||
export class AppData {
|
||||
/**
|
||||
* creates appdata. If no pathArg is given, data will be stored here:
|
||||
* ${PWD}/.nogit/appdata
|
||||
* @param pathArg
|
||||
* @returns
|
||||
*/
|
||||
public static async createAndInit(pathArg?: string) {
|
||||
const appData = new AppData(pathArg);
|
||||
await appData.init();
|
||||
await appData.readyDeferred.promise;
|
||||
return appData;
|
||||
}
|
||||
|
||||
@@ -14,12 +20,17 @@ export class AppData {
|
||||
public dirPathArg: string;
|
||||
private kvStore: KeyValueStore;
|
||||
constructor(pathArg?: string) {
|
||||
this.init(pathArg);
|
||||
this.dirPathArg = pathArg;
|
||||
this.init;
|
||||
}
|
||||
|
||||
/**
|
||||
* inits app data
|
||||
* @param pathArg
|
||||
*/
|
||||
private async init(pathArg?: string) {
|
||||
if (pathArg) {
|
||||
this.dirPathArg = pathArg;
|
||||
if (this.dirPathArg) {
|
||||
// ok, nothing to do here;
|
||||
} else {
|
||||
const appDataDir = '/app/data';
|
||||
const dataDir = '/data';
|
||||
|
Reference in New Issue
Block a user