namirasoft-node-cli
Advanced tools
Comparing version
export declare abstract class BaseStorage { | ||
private config_path; | ||
constructor(name: string); | ||
constructor(); | ||
protected get(): any; | ||
@@ -5,0 +5,0 @@ protected set(item: any): void; |
@@ -29,6 +29,8 @@ "use strict"; | ||
const fs = __importStar(require("fs")); | ||
const namirasoft_core_1 = require("namirasoft-core"); | ||
class BaseStorage { | ||
constructor(name) { | ||
constructor() { | ||
var _a, _b; | ||
this.config_path = path.join((_b = (_a = process.env.HOME) !== null && _a !== void 0 ? _a : process.env.USERPROFILE) !== null && _b !== void 0 ? _b : "", `.${name}.config`); | ||
let pkg = namirasoft_core_1.PackageService.getMain(); | ||
this.config_path = path.join((_b = (_a = process.env.HOME) !== null && _a !== void 0 ? _a : process.env.USERPROFILE) !== null && _b !== void 0 ? _b : "", `.${pkg.getName()}.config`); | ||
} | ||
@@ -35,0 +37,0 @@ get() { |
@@ -18,3 +18,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
let pkg = namirasoft_core_1.PackageService.getThis(); | ||
let pkg = namirasoft_core_1.PackageService.getMain(); | ||
this.app.logger.info("Name: " + pkg.getName()); | ||
@@ -21,0 +21,0 @@ this.app.logger.info("Title: " + pkg.getTitle()); |
{ | ||
"name": "namirasoft-node-cli", | ||
"description": "Namira Software Corporation Node CLI NPM Package", | ||
"version": "1.2.3", | ||
"version": "1.2.4", | ||
"main": "./dist/index.js", | ||
@@ -13,4 +13,4 @@ "types": "./dist/index.d.ts", | ||
"axios": "^1.6.7", | ||
"namirasoft-core": "^1.2.15" | ||
"namirasoft-core": "^1.2.16" | ||
} | ||
} |
import * as path from "path"; | ||
import * as fs from "fs"; | ||
import { PackageService } from "namirasoft-core"; | ||
@@ -7,5 +8,6 @@ export abstract class BaseStorage | ||
private config_path: string; | ||
constructor(name: string) | ||
constructor() | ||
{ | ||
this.config_path = path.join(process.env.HOME ?? process.env.USERPROFILE ?? "", `.${name}.config`); | ||
let pkg = PackageService.getMain(); | ||
this.config_path = path.join(process.env.HOME ?? process.env.USERPROFILE ?? "", `.${pkg.getName()}.config`); | ||
} | ||
@@ -12,0 +14,0 @@ protected get(): any |
@@ -8,3 +8,3 @@ import { PackageService } from "namirasoft-core"; | ||
{ | ||
let pkg = PackageService.getThis(); | ||
let pkg = PackageService.getMain(); | ||
this.app.logger.info("Name: " + pkg.getName()); | ||
@@ -11,0 +11,0 @@ this.app.logger.info("Title: " + pkg.getTitle()); |
Sorry, the diff of this file is not supported yet
23943
1.11%504
0.8%Updated