@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.
Files changed (104) hide show
  1. package/dist/commands/base.command.d.ts +43 -0
  2. package/dist/commands/base.command.js +156 -0
  3. package/dist/commands/index.js +1 -0
  4. package/dist/constants/file.constants.d.ts +6 -0
  5. package/dist/constants/file.constants.js +8 -0
  6. package/dist/constants/help-groups.constants.d.ts +6 -0
  7. package/dist/constants/help-groups.constants.js +8 -0
  8. package/dist/hooks/index.js +2 -0
  9. package/dist/hooks/not-found.hook.d.ts +6 -0
  10. package/dist/hooks/not-found.hook.js +18 -0
  11. package/dist/hooks/update-notifier.hook.d.ts +6 -0
  12. package/dist/hooks/update-notifier.hook.js +11 -0
  13. package/dist/index.d.ts +51 -450
  14. package/dist/index.js +42 -1361
  15. package/dist/interfaces/class.interface.d.ts +4 -0
  16. package/dist/interfaces/hooks.interface.d.ts +16 -0
  17. package/dist/interfaces/index.js +1 -0
  18. package/dist/interfaces/oclif.interface.d.ts +9 -0
  19. package/dist/interfaces/oclif.interface.js +3 -0
  20. package/dist/interfaces/type-helper.interface.d.ts +7 -0
  21. package/dist/lib/cli.interface.d.ts +8 -0
  22. package/dist/lib/cli.module.d.ts +11 -0
  23. package/dist/lib/cli.module.js +57 -0
  24. package/dist/lib/config/config.constants.js +12 -0
  25. package/dist/lib/config/config.interface.d.ts +21 -0
  26. package/dist/lib/config/config.module.d.ts +4 -0
  27. package/dist/lib/config/config.module.js +15 -0
  28. package/dist/lib/config/config.service.d.ts +32 -0
  29. package/dist/lib/config/config.service.js +152 -0
  30. package/dist/lib/config/index.js +2 -0
  31. package/dist/lib/fs/filesystem.interface.d.ts +2 -0
  32. package/dist/lib/fs/filesystem.module.d.ts +4 -0
  33. package/dist/lib/fs/filesystem.module.js +13 -0
  34. package/dist/lib/fs/filesystem.service.d.ts +31 -0
  35. package/dist/lib/fs/filesystem.service.js +141 -0
  36. package/dist/lib/fs/index.js +2 -0
  37. package/dist/lib/index.js +32 -0
  38. package/dist/lib/locker/index.js +2 -0
  39. package/dist/lib/locker/locker.interface.d.ts +28 -0
  40. package/dist/lib/locker/locker.module.d.ts +9 -0
  41. package/dist/lib/locker/locker.module.js +33 -0
  42. package/dist/lib/locker/locker.service.d.ts +41 -0
  43. package/dist/lib/locker/locker.service.js +170 -0
  44. package/dist/lib/logger/index.js +6 -0
  45. package/dist/lib/logger/logger.constants.d.ts +21 -0
  46. package/dist/lib/logger/logger.constants.js +24 -0
  47. package/dist/lib/logger/logger.interface.d.ts +13 -0
  48. package/dist/lib/logger/logger.module.d.ts +4 -0
  49. package/dist/lib/logger/logger.module.js +17 -0
  50. package/dist/lib/logger/logger.service.d.ts +31 -0
  51. package/dist/lib/logger/logger.service.js +70 -0
  52. package/dist/lib/logger/pipe/pipe-process-to-listr.d.ts +7 -0
  53. package/dist/lib/logger/pipe/pipe-process-to-listr.js +9 -0
  54. package/dist/lib/logger/pipe/pipe-process-to-logger.d.ts +12 -0
  55. package/dist/lib/logger/pipe/pipe-process-to-logger.interface.d.ts +19 -0
  56. package/dist/lib/logger/pipe/pipe-process-to-logger.js +54 -0
  57. package/dist/lib/logger/winston.service.d.ts +15 -0
  58. package/dist/lib/logger/winston.service.js +91 -0
  59. package/dist/lib/logo/index.js +3 -0
  60. package/dist/lib/logo/logo.constants.d.ts +6 -0
  61. package/dist/lib/logo/logo.constants.js +5 -0
  62. package/dist/lib/logo/logo.interface.d.ts +6 -0
  63. package/dist/lib/logo/logo.module.d.ts +4 -0
  64. package/dist/lib/logo/logo.module.js +13 -0
  65. package/dist/lib/logo/logo.service.d.ts +17 -0
  66. package/dist/lib/logo/logo.service.js +42 -0
  67. package/dist/lib/parser/fts/env-parser.service.d.ts +16 -0
  68. package/dist/lib/parser/fts/env-parser.service.js +42 -0
  69. package/dist/lib/parser/fts/index.js +3 -0
  70. package/dist/lib/parser/fts/json-parser.service.d.ts +15 -0
  71. package/dist/lib/parser/fts/json-parser.service.js +32 -0
  72. package/dist/lib/parser/fts/yaml-parser.service.d.ts +15 -0
  73. package/dist/lib/parser/fts/yaml-parser.service.js +33 -0
  74. package/dist/lib/parser/index.js +6 -0
  75. package/dist/lib/parser/parser.interface.d.ts +8 -0
  76. package/dist/lib/parser/parser.module.d.ts +4 -0
  77. package/dist/lib/parser/parser.module.js +16 -0
  78. package/dist/lib/parser/parser.service.d.ts +29 -0
  79. package/dist/lib/parser/parser.service.js +76 -0
  80. package/dist/lib/setup.d.ts +4 -0
  81. package/dist/lib/setup.js +16 -0
  82. package/dist/lib/validator/index.js +3 -0
  83. package/dist/lib/validator/validator.constants.d.ts +6 -0
  84. package/dist/lib/validator/validator.constants.js +5 -0
  85. package/dist/lib/validator/validator.interface.d.ts +10 -0
  86. package/dist/lib/validator/validator.module.d.ts +4 -0
  87. package/dist/lib/validator/validator.module.js +13 -0
  88. package/dist/lib/validator/validator.service.d.ts +19 -0
  89. package/dist/lib/validator/validator.service.js +76 -0
  90. package/dist/utils/defaults.d.ts +12 -0
  91. package/dist/utils/defaults.js +16 -0
  92. package/dist/utils/environment.d.ts +8 -0
  93. package/dist/utils/environment.js +16 -0
  94. package/dist/utils/guards.d.ts +9 -0
  95. package/dist/utils/guards.js +13 -0
  96. package/dist/utils/index.d.ts +7 -0
  97. package/dist/utils/index.js +8 -0
  98. package/dist/utils/merge.constants.d.ts +7 -0
  99. package/dist/utils/merge.constants.js +9 -0
  100. package/dist/utils/merge.d.ts +9 -0
  101. package/dist/utils/merge.js +15 -0
  102. package/package.json +27 -23
  103. package/dist/chunk-DzC9Nte8.js +0 -31
  104. 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,7 @@
1
+ //#region src/utils/merge.constants.d.ts
2
+ declare enum MergeStrategy {
3
+ OVERWRITE = "OVERWRITE",
4
+ EXTEND = "EXTEND",
5
+ }
6
+ //#endregion
7
+ export { MergeStrategy };
@@ -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.30",
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": ">= 16"
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.1",
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
  }
@@ -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 };