@cenk1cenk2/oclif-common 6.3.30 → 6.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commands/base.command.d.ts +43 -0
- package/dist/commands/base.command.js +156 -0
- package/dist/commands/index.js +1 -0
- package/dist/constants/file.constants.d.ts +6 -0
- package/dist/constants/file.constants.js +8 -0
- package/dist/constants/help-groups.constants.d.ts +6 -0
- package/dist/constants/help-groups.constants.js +8 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/not-found.hook.d.ts +6 -0
- package/dist/hooks/not-found.hook.js +18 -0
- package/dist/hooks/update-notifier.hook.d.ts +6 -0
- package/dist/hooks/update-notifier.hook.js +11 -0
- package/dist/index.d.ts +51 -450
- package/dist/index.js +42 -1361
- package/dist/interfaces/class.interface.d.ts +4 -0
- package/dist/interfaces/hooks.interface.d.ts +16 -0
- package/dist/interfaces/index.js +1 -0
- package/dist/interfaces/oclif.interface.d.ts +9 -0
- package/dist/interfaces/oclif.interface.js +3 -0
- package/dist/interfaces/type-helper.interface.d.ts +7 -0
- package/dist/lib/cli.interface.d.ts +8 -0
- package/dist/lib/cli.module.d.ts +11 -0
- package/dist/lib/cli.module.js +57 -0
- package/dist/lib/config/config.constants.js +12 -0
- package/dist/lib/config/config.interface.d.ts +21 -0
- package/dist/lib/config/config.module.d.ts +4 -0
- package/dist/lib/config/config.module.js +15 -0
- package/dist/lib/config/config.service.d.ts +32 -0
- package/dist/lib/config/config.service.js +152 -0
- package/dist/lib/config/index.js +2 -0
- package/dist/lib/fs/filesystem.interface.d.ts +2 -0
- package/dist/lib/fs/filesystem.module.d.ts +4 -0
- package/dist/lib/fs/filesystem.module.js +13 -0
- package/dist/lib/fs/filesystem.service.d.ts +31 -0
- package/dist/lib/fs/filesystem.service.js +141 -0
- package/dist/lib/fs/index.js +2 -0
- package/dist/lib/index.js +32 -0
- package/dist/lib/locker/index.js +2 -0
- package/dist/lib/locker/locker.interface.d.ts +28 -0
- package/dist/lib/locker/locker.module.d.ts +9 -0
- package/dist/lib/locker/locker.module.js +33 -0
- package/dist/lib/locker/locker.service.d.ts +41 -0
- package/dist/lib/locker/locker.service.js +170 -0
- package/dist/lib/logger/index.js +6 -0
- package/dist/lib/logger/logger.constants.d.ts +21 -0
- package/dist/lib/logger/logger.constants.js +24 -0
- package/dist/lib/logger/logger.interface.d.ts +13 -0
- package/dist/lib/logger/logger.module.d.ts +4 -0
- package/dist/lib/logger/logger.module.js +17 -0
- package/dist/lib/logger/logger.service.d.ts +31 -0
- package/dist/lib/logger/logger.service.js +70 -0
- package/dist/lib/logger/pipe/pipe-process-to-listr.d.ts +7 -0
- package/dist/lib/logger/pipe/pipe-process-to-listr.js +9 -0
- package/dist/lib/logger/pipe/pipe-process-to-logger.d.ts +12 -0
- package/dist/lib/logger/pipe/pipe-process-to-logger.interface.d.ts +19 -0
- package/dist/lib/logger/pipe/pipe-process-to-logger.js +54 -0
- package/dist/lib/logger/winston.service.d.ts +15 -0
- package/dist/lib/logger/winston.service.js +91 -0
- package/dist/lib/logo/index.js +3 -0
- package/dist/lib/logo/logo.constants.d.ts +6 -0
- package/dist/lib/logo/logo.constants.js +5 -0
- package/dist/lib/logo/logo.interface.d.ts +6 -0
- package/dist/lib/logo/logo.module.d.ts +4 -0
- package/dist/lib/logo/logo.module.js +13 -0
- package/dist/lib/logo/logo.service.d.ts +17 -0
- package/dist/lib/logo/logo.service.js +42 -0
- package/dist/lib/parser/fts/env-parser.service.d.ts +16 -0
- package/dist/lib/parser/fts/env-parser.service.js +42 -0
- package/dist/lib/parser/fts/index.js +3 -0
- package/dist/lib/parser/fts/json-parser.service.d.ts +15 -0
- package/dist/lib/parser/fts/json-parser.service.js +32 -0
- package/dist/lib/parser/fts/yaml-parser.service.d.ts +15 -0
- package/dist/lib/parser/fts/yaml-parser.service.js +33 -0
- package/dist/lib/parser/index.js +6 -0
- package/dist/lib/parser/parser.interface.d.ts +8 -0
- package/dist/lib/parser/parser.module.d.ts +4 -0
- package/dist/lib/parser/parser.module.js +16 -0
- package/dist/lib/parser/parser.service.d.ts +29 -0
- package/dist/lib/parser/parser.service.js +76 -0
- package/dist/lib/setup.d.ts +4 -0
- package/dist/lib/setup.js +16 -0
- package/dist/lib/validator/index.js +3 -0
- package/dist/lib/validator/validator.constants.d.ts +6 -0
- package/dist/lib/validator/validator.constants.js +5 -0
- package/dist/lib/validator/validator.interface.d.ts +10 -0
- package/dist/lib/validator/validator.module.d.ts +4 -0
- package/dist/lib/validator/validator.module.js +13 -0
- package/dist/lib/validator/validator.service.d.ts +19 -0
- package/dist/lib/validator/validator.service.js +76 -0
- package/dist/utils/defaults.d.ts +12 -0
- package/dist/utils/defaults.js +16 -0
- package/dist/utils/environment.d.ts +8 -0
- package/dist/utils/environment.js +16 -0
- package/dist/utils/guards.d.ts +9 -0
- package/dist/utils/guards.js +13 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.js +8 -0
- package/dist/utils/merge.constants.d.ts +7 -0
- package/dist/utils/merge.constants.js +9 -0
- package/dist/utils/merge.d.ts +9 -0
- package/dist/utils/merge.js +15 -0
- package/package.json +27 -23
- package/dist/chunk-DzC9Nte8.js +0 -31
- package/dist/source-map-support-CuBekda-.js +0 -2435
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region src/utils/guards.ts
|
|
2
|
+
function isHookedWithShouldRunBefore(command) {
|
|
3
|
+
return typeof command.shouldRunBefore === "function";
|
|
4
|
+
}
|
|
5
|
+
function isHookedWithShouldRunAfter(command) {
|
|
6
|
+
return typeof command.shouldRunAfter === "function";
|
|
7
|
+
}
|
|
8
|
+
function isHookedWithRegister(command) {
|
|
9
|
+
return typeof command.register === "function";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { isHookedWithRegister, isHookedWithShouldRunAfter, isHookedWithShouldRunBefore };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SetCtxAssignOptions, SetCtxDefaultsOptions, setCtxAssign, setCtxDefaults } from "./defaults.js";
|
|
2
|
+
import { isDebug, isSilent, isVerbose } from "./environment.js";
|
|
3
|
+
import { isHookedWithRegister, isHookedWithShouldRunAfter, isHookedWithShouldRunBefore } from "./guards.js";
|
|
4
|
+
import { MergeStrategy } from "./merge.constants.js";
|
|
5
|
+
import { merge, uniqueArrayFilter } from "./merge.js";
|
|
6
|
+
import { ux } from "@oclif/core";
|
|
7
|
+
export { ux };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { setCtxAssign, setCtxDefaults } from "./defaults.js";
|
|
2
|
+
import { isDebug, isSilent, isVerbose } from "./environment.js";
|
|
3
|
+
import { isHookedWithRegister, isHookedWithShouldRunAfter, isHookedWithShouldRunBefore } from "./guards.js";
|
|
4
|
+
import { MergeStrategy } from "./merge.constants.js";
|
|
5
|
+
import { merge, uniqueArrayFilter } from "./merge.js";
|
|
6
|
+
import { ux } from "@oclif/core";
|
|
7
|
+
|
|
8
|
+
export { ux };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region src/utils/merge.constants.ts
|
|
2
|
+
let MergeStrategy = /* @__PURE__ */ function(MergeStrategy$1) {
|
|
3
|
+
MergeStrategy$1["OVERWRITE"] = "OVERWRITE";
|
|
4
|
+
MergeStrategy$1["EXTEND"] = "EXTEND";
|
|
5
|
+
return MergeStrategy$1;
|
|
6
|
+
}({});
|
|
7
|
+
|
|
8
|
+
//#endregion
|
|
9
|
+
export { MergeStrategy };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MergeStrategy } from "./merge.constants.js";
|
|
2
|
+
|
|
3
|
+
//#region src/utils/merge.d.ts
|
|
4
|
+
/** Merge objects deep from overwriting the properties from source to target.
|
|
5
|
+
* Does not mutate the object */
|
|
6
|
+
declare function merge<T extends Record<PropertyKey, any> | any[]>(strategy: MergeStrategy, ...source: Partial<T>[]): T;
|
|
7
|
+
declare function uniqueArrayFilter(value: any, index: any, self: string | any[]): boolean;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { merge, uniqueArrayFilter };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MergeStrategy } from "./merge.constants.js";
|
|
2
|
+
import deepmerge from "deepmerge";
|
|
3
|
+
|
|
4
|
+
//#region src/utils/merge.ts
|
|
5
|
+
/** Merge objects deep from overwriting the properties from source to target.
|
|
6
|
+
* Does not mutate the object */
|
|
7
|
+
function merge(strategy, ...source) {
|
|
8
|
+
return deepmerge.all(source, { arrayMerge: strategy === MergeStrategy.EXTEND ? (dest, src) => [...dest, ...src].filter(uniqueArrayFilter) : (_, src) => src });
|
|
9
|
+
}
|
|
10
|
+
function uniqueArrayFilter(value, index, self) {
|
|
11
|
+
return self.indexOf(value) === index;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { merge, uniqueArrayFilter };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cenk1cenk2/oclif-common",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.4.1",
|
|
4
4
|
"description": "Oclif common package for oclif2 projects.",
|
|
5
5
|
"repository": "https://gitlab.kilic.dev/libraries/oclif-tools",
|
|
6
6
|
"type": "module",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
30
|
"engines": {
|
|
31
|
-
"node": ">=
|
|
31
|
+
"node": ">= 18"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "tsdown",
|
|
@@ -46,28 +46,10 @@
|
|
|
46
46
|
"prettier --log-level warn --write"
|
|
47
47
|
]
|
|
48
48
|
},
|
|
49
|
-
"peerDependencies": {
|
|
50
|
-
"@listr2/manager": ">= 1",
|
|
51
|
-
"@oclif/core": ">= 1",
|
|
52
|
-
"class-transformer": ">= 0.5.0",
|
|
53
|
-
"class-validator": ">= 0.14.0",
|
|
54
|
-
"enquirer": ">= 2",
|
|
55
|
-
"fs-extra": ">= 10",
|
|
56
|
-
"listr2": ">= 7",
|
|
57
|
-
"update-notifier": ">= 5",
|
|
58
|
-
"yaml": ">= 2"
|
|
59
|
-
},
|
|
60
|
-
"peerDependenciesMeta": {
|
|
61
|
-
"update-notifier": {
|
|
62
|
-
"optional": true
|
|
63
|
-
},
|
|
64
|
-
"yaml": {
|
|
65
|
-
"optional": true
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
49
|
"dependencies": {
|
|
69
50
|
"@nestjs/common": "^11.1.5",
|
|
70
51
|
"@nestjs/core": "^11.1.5",
|
|
52
|
+
"@oxc-project/runtime": "^0.78.0",
|
|
71
53
|
"deepmerge": "^4.3.1",
|
|
72
54
|
"object-path-immutable": "^4.1.2",
|
|
73
55
|
"reflect-metadata": "^0.2.1",
|
|
@@ -75,16 +57,38 @@
|
|
|
75
57
|
},
|
|
76
58
|
"devDependencies": {
|
|
77
59
|
"@listr2/manager": "^3.0.1",
|
|
78
|
-
"@oclif/core": "^4.5.
|
|
60
|
+
"@oclif/core": "^4.5.2",
|
|
79
61
|
"@types/fs-extra": "^11.0.4",
|
|
80
62
|
"@types/through": "^0.0.33",
|
|
81
63
|
"@types/update-notifier": "^6.0.8",
|
|
82
64
|
"class-transformer": "^0.5.1",
|
|
83
65
|
"class-validator": "^0.14.2",
|
|
84
|
-
"enquirer": "^2.4.1",
|
|
85
66
|
"fs-extra": "^11.3.0",
|
|
86
67
|
"listr2": "^9.0.1",
|
|
87
68
|
"source-map-support": "^0.5.21",
|
|
88
69
|
"yaml": "^2.8.0"
|
|
70
|
+
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"@listr2/manager": ">= 1",
|
|
73
|
+
"@oclif/core": ">= 1",
|
|
74
|
+
"class-transformer": ">= 0.5.0",
|
|
75
|
+
"class-validator": ">= 0.14.0",
|
|
76
|
+
"enquirer": ">= 2",
|
|
77
|
+
"fs-extra": ">= 10",
|
|
78
|
+
"listr2": ">= 7",
|
|
79
|
+
"update-notifier": ">= 5",
|
|
80
|
+
"yaml": ">= 2",
|
|
81
|
+
"source-map-support": ">= 0.5.0"
|
|
82
|
+
},
|
|
83
|
+
"peerDependenciesMeta": {
|
|
84
|
+
"update-notifier": {
|
|
85
|
+
"optional": true
|
|
86
|
+
},
|
|
87
|
+
"yaml": {
|
|
88
|
+
"optional": true
|
|
89
|
+
},
|
|
90
|
+
"source-map-support": {
|
|
91
|
+
"optional": true
|
|
92
|
+
}
|
|
89
93
|
}
|
|
90
94
|
}
|
package/dist/chunk-DzC9Nte8.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
|
|
3
|
-
//#region rolldown:runtime
|
|
4
|
-
var __create = Object.create;
|
|
5
|
-
var __defProp = Object.defineProperty;
|
|
6
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
7
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
9
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
10
|
-
var __commonJS = (cb, mod) => function() {
|
|
11
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
-
};
|
|
13
|
-
var __copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
15
|
-
key = keys[i];
|
|
16
|
-
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
|
-
get: ((k) => from[k]).bind(null, key),
|
|
18
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
return to;
|
|
22
|
-
};
|
|
23
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
24
|
-
value: mod,
|
|
25
|
-
enumerable: true
|
|
26
|
-
}) : target, mod));
|
|
27
|
-
var __toDynamicImportESM = (isNodeMode) => (mod) => __toESM(mod.default, isNodeMode);
|
|
28
|
-
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export { __commonJS, __require, __toDynamicImportESM, __toESM };
|