node-confmanager
Advanced tools
Comparing version 1.8.2 to 1.9.0
@@ -5,5 +5,3 @@ import NodeContainerPattern = require("node-containerpattern"); | ||
spaces: boolean; | ||
shortcuts: { | ||
[key: string]: string; | ||
}; | ||
shortcuts: Record<string, string>; | ||
constructor(filePath: string, spaces?: boolean, recursionSeparator?: string); | ||
@@ -10,0 +8,0 @@ private _loadFromConsole; |
"use strict"; | ||
// deps | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
@@ -6,3 +7,2 @@ return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// deps | ||
// natives | ||
@@ -69,8 +69,8 @@ const node_path_1 = require("node:path"); | ||
// array | ||
else if (this.skeletons[key] && "array" === this.skeletons[key]) { | ||
else if ("undefined" !== typeof this.skeletons[key] && "array" === this.skeletons[key]) { | ||
const nextArgs = args.slice(i + 1, args.length); | ||
if (nextArgs.length) { | ||
const endArrayArgs = nextArgs.findIndex((a) => { | ||
return a.startsWith("--") || | ||
(a.startsWith("-") && !!this.shortcuts[a.slice(1)]); | ||
return a.startsWith("--") | ||
|| (a.startsWith("-") && !!this.shortcuts[a.slice(1)]); | ||
}); | ||
@@ -150,5 +150,5 @@ const values = 0 < endArrayArgs ? nextArgs.slice(0, endArrayArgs) : nextArgs; | ||
}); | ||
return this.spaces ? | ||
(0, promises_1.writeFile)(this.filePath, JSON.stringify(objects, undefined, 2), "utf-8") : | ||
(0, promises_1.writeFile)(this.filePath, JSON.stringify(objects), "utf-8"); | ||
return this.spaces | ||
? (0, promises_1.writeFile)(this.filePath, JSON.stringify(objects, undefined, 2), "utf-8") | ||
: (0, promises_1.writeFile)(this.filePath, JSON.stringify(objects), "utf-8"); | ||
}); | ||
@@ -164,2 +164,1 @@ } | ||
exports.default = ConfManager; | ||
; |
"use strict"; | ||
// module | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// module | ||
function checkShortcut(key, shortkey) { | ||
@@ -31,2 +31,1 @@ if ("undefined" === typeof key) { | ||
exports.default = checkShortcut; | ||
; |
"use strict"; | ||
// module | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// module | ||
function clone(from) { | ||
@@ -9,3 +9,3 @@ if (from && "object" === typeof from) { | ||
} | ||
else if (Array === from.constructor) { | ||
else if (Array.isArray(from)) { | ||
return [...from]; | ||
@@ -22,2 +22,1 @@ } | ||
exports.default = clone; | ||
; |
"use strict"; | ||
// deps | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// deps | ||
// natives | ||
@@ -26,2 +26,1 @@ const node_fs_1 = require("node:fs"); | ||
exports.default = isFile; | ||
; |
{ | ||
"name": "node-confmanager", | ||
"version": "1.8.2", | ||
"version": "1.9.0", | ||
"description": "A configuration manager", | ||
@@ -22,5 +22,8 @@ | ||
"build": "node ./removeOldBuild.js && npx tsc --project \"./tsconfig.json\"", | ||
"prepare": "npx husky install", | ||
"lint": "npx eslint ./test/**/*.js", | ||
"clean": "npx rimraf lib", | ||
"build": "npm run-script clean && npx tsc --project \"./tsconfig.json\"", | ||
"lint": "npx eslint --config .eslintrc-src.js --ext .cts,.ts ./src/**/* && npx eslint --config .eslintrc-tests.js ./test/**/*.js", | ||
"check-requires": "npx used-deps-analyzer \"./package.json\" \"./src\" --no-dev --overkill \"fs-extra\" \"node-promfs\"", | ||
@@ -30,4 +33,3 @@ "check-updates": "npx check-version-modules", | ||
"tests": "npm run-script lint && npm run check-requires && npm run-script check-updates && npm run-script unit-tests", | ||
"ci": "npm run-script tests && npx nyc report --reporter=text-lcov | coveralls" | ||
"tests": "npm run-script lint && npm run check-requires && npm run-script check-updates && npm run-script unit-tests" | ||
@@ -37,3 +39,5 @@ }, | ||
"files": [ | ||
"/lib" | ||
"/bin", | ||
"/lib", | ||
"/public" | ||
], | ||
@@ -45,13 +49,14 @@ "engines": { | ||
"dependencies": { | ||
"node-containerpattern": "1.7.6" | ||
"node-containerpattern": "1.8.0" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "20.8.2", | ||
"@types/node": "20.11.0", | ||
"check-version-modules": "2.0.0", | ||
"coveralls": "3.1.1", | ||
"eslint": "8.50.0", | ||
"colors": "1.4.0", | ||
"eslint-plugin-personnallinter": "git+ssh://git@github.com/Psychopoulet/eslint-plugin-personnallinter", | ||
"husky": "8.0.3", | ||
"mocha": "10.2.0", | ||
"nyc": "15.1.0", | ||
"typescript": "5.2.2", | ||
"rimraf": "5.0.5", | ||
"typescript": "5.3.3", | ||
"used-deps-analyzer": "0.1.8" | ||
@@ -58,0 +63,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
15429
10
265
+ Addednode-containerpattern@1.8.0(transitive)
- Removednode-containerpattern@1.7.6(transitive)
Updatednode-containerpattern@1.8.0