@venizia/ignis-helpers 0.4.2 → 0.4.3

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 (183) hide show
  1. package/dist/cjs/common/types/field-mapping.d.ts +13 -1
  2. package/dist/cjs/common/types/field-mapping.d.ts.map +1 -1
  3. package/dist/cjs/common/types/field-mapping.js +20 -0
  4. package/dist/cjs/common/types/field-mapping.js.map +1 -1
  5. package/dist/cjs/core.d.ts +2 -1
  6. package/dist/cjs/core.d.ts.map +1 -1
  7. package/dist/cjs/core.js +6 -1
  8. package/dist/cjs/core.js.map +1 -1
  9. package/dist/cjs/modules/crypto/algorithms/aes.algorithm.d.ts +2 -2
  10. package/dist/cjs/modules/crypto/algorithms/aes.algorithm.d.ts.map +1 -1
  11. package/dist/cjs/modules/crypto/algorithms/aes.algorithm.js +3 -1
  12. package/dist/cjs/modules/crypto/algorithms/aes.algorithm.js.map +1 -1
  13. package/dist/cjs/modules/crypto/algorithms/aes.constants.d.ts +11 -0
  14. package/dist/cjs/modules/crypto/algorithms/aes.constants.d.ts.map +1 -0
  15. package/dist/cjs/modules/crypto/algorithms/aes.constants.js +14 -0
  16. package/dist/cjs/modules/crypto/algorithms/aes.constants.js.map +1 -0
  17. package/dist/cjs/modules/error/index.d.ts +1 -1
  18. package/dist/cjs/modules/error/index.d.ts.map +1 -1
  19. package/dist/cjs/modules/error/index.js +2 -1
  20. package/dist/cjs/modules/error/index.js.map +1 -1
  21. package/dist/cjs/modules/logger/hf/common/types.d.ts +3 -1
  22. package/dist/cjs/modules/logger/hf/common/types.d.ts.map +1 -1
  23. package/dist/cjs/modules/logger/hf/common/types.js.map +1 -1
  24. package/dist/cjs/modules/logger/pino/common/constants.d.ts +10 -1
  25. package/dist/cjs/modules/logger/pino/common/constants.d.ts.map +1 -1
  26. package/dist/cjs/modules/logger/pino/common/constants.js +11 -1
  27. package/dist/cjs/modules/logger/pino/common/constants.js.map +1 -1
  28. package/dist/cjs/modules/logger/pino/destination.d.ts.map +1 -1
  29. package/dist/cjs/modules/logger/pino/destination.js +4 -3
  30. package/dist/cjs/modules/logger/pino/destination.js.map +1 -1
  31. package/dist/cjs/modules/network/http-request/common/constants.d.ts +11 -0
  32. package/dist/cjs/modules/network/http-request/common/constants.d.ts.map +1 -0
  33. package/dist/cjs/modules/network/http-request/common/constants.js +14 -0
  34. package/dist/cjs/modules/network/http-request/common/constants.js.map +1 -0
  35. package/dist/cjs/modules/network/http-request/common/index.d.ts +1 -0
  36. package/dist/cjs/modules/network/http-request/common/index.d.ts.map +1 -1
  37. package/dist/cjs/modules/network/http-request/common/index.js +1 -0
  38. package/dist/cjs/modules/network/http-request/common/index.js.map +1 -1
  39. package/dist/cjs/modules/network/http-request/common/types.d.ts +1 -1
  40. package/dist/cjs/modules/network/http-request/common/types.d.ts.map +1 -1
  41. package/dist/cjs/modules/network/http-request/common/types.js.map +1 -1
  42. package/dist/cjs/modules/network/tcp-socket/base-tcp-server.helper.d.ts +13 -2
  43. package/dist/cjs/modules/network/tcp-socket/base-tcp-server.helper.d.ts.map +1 -1
  44. package/dist/cjs/modules/network/tcp-socket/base-tcp-server.helper.js +23 -6
  45. package/dist/cjs/modules/network/tcp-socket/base-tcp-server.helper.js.map +1 -1
  46. package/dist/cjs/modules/queue/common/constants.d.ts +11 -0
  47. package/dist/cjs/modules/queue/common/constants.d.ts.map +1 -0
  48. package/dist/cjs/modules/queue/common/constants.js +14 -0
  49. package/dist/cjs/modules/queue/common/constants.js.map +1 -0
  50. package/dist/cjs/modules/queue/common/index.d.ts +1 -0
  51. package/dist/cjs/modules/queue/common/index.d.ts.map +1 -1
  52. package/dist/cjs/modules/queue/common/index.js +1 -0
  53. package/dist/cjs/modules/queue/common/index.js.map +1 -1
  54. package/dist/cjs/modules/queue/common/types.d.ts +1 -1
  55. package/dist/cjs/modules/queue/common/types.d.ts.map +1 -1
  56. package/dist/cjs/modules/queue/common/types.js.map +1 -1
  57. package/dist/cjs/modules/queue/kafka/common/constants.d.ts +9 -0
  58. package/dist/cjs/modules/queue/kafka/common/constants.d.ts.map +1 -1
  59. package/dist/cjs/modules/queue/kafka/common/constants.js +11 -1
  60. package/dist/cjs/modules/queue/kafka/common/constants.js.map +1 -1
  61. package/dist/cjs/modules/queue/kafka/consumer.d.ts +2 -1
  62. package/dist/cjs/modules/queue/kafka/consumer.d.ts.map +1 -1
  63. package/dist/cjs/modules/queue/kafka/consumer.js +2 -2
  64. package/dist/cjs/modules/queue/kafka/consumer.js.map +1 -1
  65. package/dist/cjs/modules/temporal/common/constants.d.ts +21 -0
  66. package/dist/cjs/modules/temporal/common/constants.d.ts.map +1 -1
  67. package/dist/cjs/modules/temporal/common/constants.js +22 -1
  68. package/dist/cjs/modules/temporal/common/constants.js.map +1 -1
  69. package/dist/cjs/modules/temporal/locale/locale.d.ts +4 -3
  70. package/dist/cjs/modules/temporal/locale/locale.d.ts.map +1 -1
  71. package/dist/cjs/modules/temporal/locale/locale.js +2 -1
  72. package/dist/cjs/modules/temporal/locale/locale.js.map +1 -1
  73. package/dist/cjs/modules/temporal/pattern/common/constants.d.ts +43 -0
  74. package/dist/cjs/modules/temporal/pattern/common/constants.d.ts.map +1 -0
  75. package/dist/cjs/modules/temporal/pattern/common/constants.js +74 -0
  76. package/dist/cjs/modules/temporal/pattern/common/constants.js.map +1 -0
  77. package/dist/cjs/modules/temporal/pattern/common/index.d.ts +1 -0
  78. package/dist/cjs/modules/temporal/pattern/common/index.d.ts.map +1 -1
  79. package/dist/cjs/modules/temporal/pattern/common/index.js +1 -0
  80. package/dist/cjs/modules/temporal/pattern/common/index.js.map +1 -1
  81. package/dist/cjs/modules/temporal/pattern/common/types.d.ts +2 -11
  82. package/dist/cjs/modules/temporal/pattern/common/types.d.ts.map +1 -1
  83. package/dist/cjs/modules/temporal/pattern/common/types.js.map +1 -1
  84. package/dist/cjs/modules/temporal/pattern/tokens.d.ts +2 -1
  85. package/dist/cjs/modules/temporal/pattern/tokens.d.ts.map +1 -1
  86. package/dist/cjs/modules/temporal/pattern/tokens.js +2 -14
  87. package/dist/cjs/modules/temporal/pattern/tokens.js.map +1 -1
  88. package/dist/cjs/utilities/request.utility.d.ts +21 -2
  89. package/dist/cjs/utilities/request.utility.d.ts.map +1 -1
  90. package/dist/cjs/utilities/request.utility.js +25 -5
  91. package/dist/cjs/utilities/request.utility.js.map +1 -1
  92. package/dist/esm/common/types/field-mapping.d.ts +13 -1
  93. package/dist/esm/common/types/field-mapping.d.ts.map +1 -1
  94. package/dist/esm/common/types/field-mapping.js +18 -1
  95. package/dist/esm/common/types/field-mapping.js.map +1 -1
  96. package/dist/esm/core.d.ts +2 -1
  97. package/dist/esm/core.d.ts.map +1 -1
  98. package/dist/esm/core.js +4 -0
  99. package/dist/esm/core.js.map +1 -1
  100. package/dist/esm/modules/crypto/algorithms/aes.algorithm.d.ts +2 -2
  101. package/dist/esm/modules/crypto/algorithms/aes.algorithm.d.ts.map +1 -1
  102. package/dist/esm/modules/crypto/algorithms/aes.algorithm.js +2 -0
  103. package/dist/esm/modules/crypto/algorithms/aes.algorithm.js.map +1 -1
  104. package/dist/esm/modules/crypto/algorithms/aes.constants.d.ts +11 -0
  105. package/dist/esm/modules/crypto/algorithms/aes.constants.d.ts.map +1 -0
  106. package/dist/esm/modules/crypto/algorithms/aes.constants.js +10 -0
  107. package/dist/esm/modules/crypto/algorithms/aes.constants.js.map +1 -0
  108. package/dist/esm/modules/error/index.d.ts +1 -1
  109. package/dist/esm/modules/error/index.d.ts.map +1 -1
  110. package/dist/esm/modules/error/index.js +1 -1
  111. package/dist/esm/modules/error/index.js.map +1 -1
  112. package/dist/esm/modules/logger/hf/common/types.d.ts +3 -1
  113. package/dist/esm/modules/logger/hf/common/types.d.ts.map +1 -1
  114. package/dist/esm/modules/logger/hf/common/types.js.map +1 -1
  115. package/dist/esm/modules/logger/pino/common/constants.d.ts +10 -1
  116. package/dist/esm/modules/logger/pino/common/constants.d.ts.map +1 -1
  117. package/dist/esm/modules/logger/pino/common/constants.js +9 -0
  118. package/dist/esm/modules/logger/pino/common/constants.js.map +1 -1
  119. package/dist/esm/modules/logger/pino/destination.d.ts.map +1 -1
  120. package/dist/esm/modules/logger/pino/destination.js +4 -3
  121. package/dist/esm/modules/logger/pino/destination.js.map +1 -1
  122. package/dist/esm/modules/network/http-request/common/constants.d.ts +11 -0
  123. package/dist/esm/modules/network/http-request/common/constants.d.ts.map +1 -0
  124. package/dist/esm/modules/network/http-request/common/constants.js +10 -0
  125. package/dist/esm/modules/network/http-request/common/constants.js.map +1 -0
  126. package/dist/esm/modules/network/http-request/common/index.d.ts +1 -0
  127. package/dist/esm/modules/network/http-request/common/index.d.ts.map +1 -1
  128. package/dist/esm/modules/network/http-request/common/index.js +1 -0
  129. package/dist/esm/modules/network/http-request/common/index.js.map +1 -1
  130. package/dist/esm/modules/network/http-request/common/types.d.ts +1 -1
  131. package/dist/esm/modules/network/http-request/common/types.d.ts.map +1 -1
  132. package/dist/esm/modules/network/http-request/common/types.js.map +1 -1
  133. package/dist/esm/modules/network/tcp-socket/base-tcp-server.helper.d.ts +13 -2
  134. package/dist/esm/modules/network/tcp-socket/base-tcp-server.helper.d.ts.map +1 -1
  135. package/dist/esm/modules/network/tcp-socket/base-tcp-server.helper.js +21 -5
  136. package/dist/esm/modules/network/tcp-socket/base-tcp-server.helper.js.map +1 -1
  137. package/dist/esm/modules/queue/common/constants.d.ts +11 -0
  138. package/dist/esm/modules/queue/common/constants.d.ts.map +1 -0
  139. package/dist/esm/modules/queue/common/constants.js +10 -0
  140. package/dist/esm/modules/queue/common/constants.js.map +1 -0
  141. package/dist/esm/modules/queue/common/index.d.ts +1 -0
  142. package/dist/esm/modules/queue/common/index.d.ts.map +1 -1
  143. package/dist/esm/modules/queue/common/index.js +1 -0
  144. package/dist/esm/modules/queue/common/index.js.map +1 -1
  145. package/dist/esm/modules/queue/common/types.d.ts +1 -1
  146. package/dist/esm/modules/queue/common/types.d.ts.map +1 -1
  147. package/dist/esm/modules/queue/common/types.js.map +1 -1
  148. package/dist/esm/modules/queue/kafka/common/constants.d.ts +9 -0
  149. package/dist/esm/modules/queue/kafka/common/constants.d.ts.map +1 -1
  150. package/dist/esm/modules/queue/kafka/common/constants.js +9 -0
  151. package/dist/esm/modules/queue/kafka/common/constants.js.map +1 -1
  152. package/dist/esm/modules/queue/kafka/consumer.d.ts +2 -1
  153. package/dist/esm/modules/queue/kafka/consumer.d.ts.map +1 -1
  154. package/dist/esm/modules/queue/kafka/consumer.js +3 -3
  155. package/dist/esm/modules/queue/kafka/consumer.js.map +1 -1
  156. package/dist/esm/modules/temporal/common/constants.d.ts +21 -0
  157. package/dist/esm/modules/temporal/common/constants.d.ts.map +1 -1
  158. package/dist/esm/modules/temporal/common/constants.js +19 -0
  159. package/dist/esm/modules/temporal/common/constants.js.map +1 -1
  160. package/dist/esm/modules/temporal/locale/locale.d.ts +4 -3
  161. package/dist/esm/modules/temporal/locale/locale.d.ts.map +1 -1
  162. package/dist/esm/modules/temporal/locale/locale.js +2 -1
  163. package/dist/esm/modules/temporal/locale/locale.js.map +1 -1
  164. package/dist/esm/modules/temporal/pattern/common/constants.d.ts +43 -0
  165. package/dist/esm/modules/temporal/pattern/common/constants.d.ts.map +1 -0
  166. package/dist/esm/modules/temporal/pattern/common/constants.js +70 -0
  167. package/dist/esm/modules/temporal/pattern/common/constants.js.map +1 -0
  168. package/dist/esm/modules/temporal/pattern/common/index.d.ts +1 -0
  169. package/dist/esm/modules/temporal/pattern/common/index.d.ts.map +1 -1
  170. package/dist/esm/modules/temporal/pattern/common/index.js +1 -0
  171. package/dist/esm/modules/temporal/pattern/common/index.js.map +1 -1
  172. package/dist/esm/modules/temporal/pattern/common/types.d.ts +2 -11
  173. package/dist/esm/modules/temporal/pattern/common/types.d.ts.map +1 -1
  174. package/dist/esm/modules/temporal/pattern/common/types.js.map +1 -1
  175. package/dist/esm/modules/temporal/pattern/tokens.d.ts +2 -1
  176. package/dist/esm/modules/temporal/pattern/tokens.d.ts.map +1 -1
  177. package/dist/esm/modules/temporal/pattern/tokens.js +2 -14
  178. package/dist/esm/modules/temporal/pattern/tokens.js.map +1 -1
  179. package/dist/esm/utilities/request.utility.d.ts +21 -2
  180. package/dist/esm/utilities/request.utility.d.ts.map +1 -1
  181. package/dist/esm/utilities/request.utility.js +22 -4
  182. package/dist/esm/utilities/request.utility.js.map +1 -1
  183. package/package.json +3 -3
@@ -1,4 +1,16 @@
1
- export type TFieldMappingDataType = 'string' | 'number' | 'strings' | 'numbers' | 'boolean';
1
+ import type { TConstValue } from './const-value';
2
+ /** The value kinds a field mapping reads. */
3
+ export declare class FieldMappingDataTypes {
4
+ static readonly STRING = "string";
5
+ static readonly NUMBER = "number";
6
+ static readonly STRINGS = "strings";
7
+ static readonly NUMBERS = "numbers";
8
+ static readonly BOOLEAN = "boolean";
9
+ static readonly SCHEME_SET: Set<string>;
10
+ static isValid(value: string): boolean;
11
+ }
12
+ /** Valid field mapping data type values. */
13
+ export type TFieldMappingDataType = TConstValue<typeof FieldMappingDataTypes>;
2
14
  export interface IFieldMapping {
3
15
  name: string;
4
16
  type: TFieldMappingDataType;
@@ -1 +1 @@
1
- {"version":3,"file":"field-mapping.d.ts","sourceRoot":"","sources":["../../../../src/common/types/field-mapping.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAC5F,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,qBAAqB,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC;CACrE;AAED,MAAM,MAAM,kBAAkB,CAAC,CAAC,SAAS,KAAK,CAAC,aAAa,CAAC,IAAI,OAAO,CACtE,CAAC,CAAC,MAAM,CAAC,EACT;IAAE,IAAI,EAAE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,CAAC,GAAG,CAAC,SAAS;QAClC,IAAI,EAAE,CAAC,CAAC;QACR,IAAI,EAAE,QAAQ,CAAC;QACf,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;KAC/B,GACG,MAAM,GACN,CAAC,SAAS;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,IAAI,EAAE,QAAQ,CAAC;QAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAA;KAAE,GAClE,MAAM,GACN,CAAC,SAAS;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,IAAI,EAAE,SAAS,CAAC;QAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAA;KAAE,GACnE,OAAO,GACP,CAAC,SAAS;QAAE,IAAI,EAAE,CAAC,CAAC;QAAC,IAAI,EAAE,SAAS,CAAC;QAAC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAA;KAAE,GACnE,MAAM,EAAE,GACR,CAAC,SAAS;QACN,IAAI,EAAE,CAAC,CAAC;QACR,IAAI,EAAE,SAAS,CAAC;QAChB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,GAAG,CAAC;KAC/B,GACD,MAAM,EAAE,GACR,KAAK;CAClB,CAAC"}
@@ -1,3 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FieldMappingDataTypes = void 0;
4
+ /** The value kinds a field mapping reads. */
5
+ class FieldMappingDataTypes {
6
+ static { this.STRING = 'string'; }
7
+ static { this.NUMBER = 'number'; }
8
+ static { this.STRINGS = 'strings'; }
9
+ static { this.NUMBERS = 'numbers'; }
10
+ static { this.BOOLEAN = 'boolean'; }
11
+ static { this.SCHEME_SET = new Set([
12
+ this.STRING,
13
+ this.NUMBER,
14
+ this.STRINGS,
15
+ this.NUMBERS,
16
+ this.BOOLEAN,
17
+ ]); }
18
+ static isValid(value) {
19
+ return this.SCHEME_SET.has(value);
20
+ }
21
+ }
22
+ exports.FieldMappingDataTypes = FieldMappingDataTypes;
3
23
  //# sourceMappingURL=field-mapping.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"field-mapping.js","sourceRoot":"","sources":["../../../../src/common/types/field-mapping.ts"],"names":[],"mappings":"","sourcesContent":["export type TFieldMappingDataType = 'string' | 'number' | 'strings' | 'numbers' | 'boolean';\nexport interface IFieldMapping {\n name: string;\n type: TFieldMappingDataType;\n default?: string | number | Array<string> | Array<number> | boolean;\n}\n\nexport type TFieldMappingNames<T extends Array<IFieldMapping>> = Extract<\n T[number],\n { type: Exclude<T[number]['type'], undefined> }\n>['name'];\n\nexport type TObjectFromFieldMappings<\n T extends readonly {\n name: string;\n type: string;\n [extra: string | symbol]: any;\n }[],\n> = {\n [K in T[number]['name']]: T extends {\n name: K;\n type: 'string';\n [extra: string | symbol]: any;\n }\n ? string\n : T extends { name: K; type: 'number'; [extra: string | symbol]: any }\n ? number\n : T extends { name: K; type: 'boolean'; [extra: string | symbol]: any }\n ? boolean\n : T extends { name: K; type: 'strings'; [extra: string | symbol]: any }\n ? string[]\n : T extends {\n name: K;\n type: 'numbers';\n [extra: string | symbol]: any;\n }\n ? number[]\n : never;\n};\n"]}
1
+ {"version":3,"file":"field-mapping.js","sourceRoot":"","sources":["../../../../src/common/types/field-mapping.ts"],"names":[],"mappings":";;;AAEA,6CAA6C;AAC7C,MAAa,qBAAqB;aAChB,WAAM,GAAG,QAAQ,CAAC;aAClB,WAAM,GAAG,QAAQ,CAAC;aAClB,YAAO,GAAG,SAAS,CAAC;aACpB,YAAO,GAAG,SAAS,CAAC;aACpB,YAAO,GAAG,SAAS,CAAC;aAEpB,eAAU,GAAG,IAAI,GAAG,CAAS;QAC3C,IAAI,CAAC,MAAM;QACX,IAAI,CAAC,MAAM;QACX,IAAI,CAAC,OAAO;QACZ,IAAI,CAAC,OAAO;QACZ,IAAI,CAAC,OAAO;KACb,CAAC,CAAC;IAEH,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AAjBH,sDAkBC","sourcesContent":["import type { TConstValue } from './const-value';\n\n/** The value kinds a field mapping reads. */\nexport class FieldMappingDataTypes {\n static readonly STRING = 'string';\n static readonly NUMBER = 'number';\n static readonly STRINGS = 'strings';\n static readonly NUMBERS = 'numbers';\n static readonly BOOLEAN = 'boolean';\n\n static readonly SCHEME_SET = new Set<string>([\n this.STRING,\n this.NUMBER,\n this.STRINGS,\n this.NUMBERS,\n this.BOOLEAN,\n ]);\n\n static isValid(value: string): boolean {\n return this.SCHEME_SET.has(value);\n }\n}\n\n/** Valid field mapping data type values. */\nexport type TFieldMappingDataType = TConstValue<typeof FieldMappingDataTypes>;\n\nexport interface IFieldMapping {\n name: string;\n type: TFieldMappingDataType;\n default?: string | number | Array<string> | Array<number> | boolean;\n}\n\nexport type TFieldMappingNames<T extends Array<IFieldMapping>> = Extract<\n T[number],\n { type: Exclude<T[number]['type'], undefined> }\n>['name'];\n\nexport type TObjectFromFieldMappings<\n T extends readonly {\n name: string;\n type: string;\n [extra: string | symbol]: any;\n }[],\n> = {\n [K in T[number]['name']]: T extends {\n name: K;\n type: 'string';\n [extra: string | symbol]: any;\n }\n ? string\n : T extends { name: K; type: 'number'; [extra: string | symbol]: any }\n ? number\n : T extends { name: K; type: 'boolean'; [extra: string | symbol]: any }\n ? boolean\n : T extends { name: K; type: 'strings'; [extra: string | symbol]: any }\n ? string[]\n : T extends {\n name: K;\n type: 'numbers';\n [extra: string | symbol]: any;\n }\n ? number[]\n : never;\n};\n"]}
@@ -28,7 +28,8 @@ export { blankToUndefined, int, keysToCamel, toBoolean, toCamel } from './utilit
28
28
  export { executeWithPerformanceMeasure } from './utilities/performance.utility';
29
29
  export { readFormBody, RequestBodyErrors } from './utilities/form-body.utility';
30
30
  export { ProjectRootRegistry } from './utilities/project-root.utility';
31
- export type { AESAlgorithmType } from './modules/crypto/algorithms/aes.algorithm';
31
+ export { AESAlgorithms } from './modules/crypto/algorithms/aes.constants';
32
+ export type { AESAlgorithmType } from './modules/crypto/algorithms/aes.constants';
32
33
  export type { IPayloadCipher } from './modules/crypto/common/types';
33
34
  export type { IRedisHelper } from './modules/redis/common/interfaces';
34
35
  //# sourceMappingURL=core.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../src/core.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAG5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AACzF,cAAc,qDAAqD,CAAC;AAIpE,cAAc,qDAAqD,CAAC;AACpE,cAAc,4DAA4D,CAAC;AAC3E,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAG9B,cAAc,yDAAyD,CAAC;AACxE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qDAAqD,CAAC;AAC5F,cAAc,+CAA+C,CAAC;AAC9D,cAAc,0CAA0C,CAAC;AACzD,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAC5F,YAAY,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAChG,YAAY,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACxF,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAA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AgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,YAAY,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,YAAY,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC"}
package/dist/cjs/core.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.ProjectRootRegistry = exports.RequestBodyErrors = exports.readFormBody = exports.executeWithPerformanceMeasure = exports.toCamel = exports.toBoolean = exports.keysToCamel = exports.int = exports.blankToUndefined = exports.BuildInfoRegistry = exports.TreeWalker = exports.TreeBuilder = exports.SlugHelper = exports.RetryHelper = exports.RetryJitterModes = exports.RetryBackoffStrategies = exports.LogLevels = exports.EnvironmentNames = exports.BaseHelper = void 0;
17
+ exports.AESAlgorithms = exports.ProjectRootRegistry = exports.RequestBodyErrors = exports.readFormBody = exports.executeWithPerformanceMeasure = exports.toCamel = exports.toBoolean = exports.keysToCamel = exports.int = exports.blankToUndefined = exports.BuildInfoRegistry = exports.TreeWalker = exports.TreeBuilder = exports.SlugHelper = exports.RetryHelper = exports.RetryJitterModes = exports.RetryBackoffStrategies = exports.LogLevels = exports.EnvironmentNames = exports.BaseHelper = void 0;
18
18
  var base_1 = require("./modules/base");
19
19
  Object.defineProperty(exports, "BaseHelper", { enumerable: true, get: function () { return base_1.BaseHelper; } });
20
20
  // By name, never `export *` from `./modules/env`: that barrel also carries `Environment` and
@@ -69,4 +69,9 @@ Object.defineProperty(exports, "readFormBody", { enumerable: true, get: function
69
69
  Object.defineProperty(exports, "RequestBodyErrors", { enumerable: true, get: function () { return form_body_utility_1.RequestBodyErrors; } });
70
70
  var project_root_utility_1 = require("./utilities/project-root.utility");
71
71
  Object.defineProperty(exports, "ProjectRootRegistry", { enumerable: true, get: function () { return project_root_utility_1.ProjectRootRegistry; } });
72
+ // Type-only: erased at compile time, so re-exporting these carries no runtime/bundle cost even
73
+ // though the concrete classes they describe (crypto algorithms, the ioredis-backed helper) are not
74
+ // themselves part of this pure surface.
75
+ var aes_constants_1 = require("./modules/crypto/algorithms/aes.constants");
76
+ Object.defineProperty(exports, "AESAlgorithms", { enumerable: true, get: function () { return aes_constants_1.AESAlgorithms; } });
72
77
  //# sourceMappingURL=core.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["../../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAA4C;AAAnC,kGAAA,UAAU,OAAA;AACnB,6FAA6F;AAC7F,8DAA8D;AAC9D,6CAAuD;AAA9C,yGAAA,gBAAgB,OAAA;AACzB,kDAAgC;AAChC,uDAA0D;AAAjD,kGAAA,SAAS,OAAA;AAElB,sFAAoE;AACpE,qGAAqG;AACrG,4FAA4F;AAC5F,oBAAoB;AACpB,sFAAoE;AACpE,6FAA2E;AAC3E,iDAA+B;AAC/B,8DAA4C;AAC5C,qDAAmC;AACnC,gDAA8B;AAC9B,iGAAiG;AACjG,yFAAyF;AACzF,0FAAwE;AAExE,gFAA8D;AAC9D,2EAAyD;AACzD,8DAA4F;AAAnF,mHAAA,sBAAsB,OAAA;AAAE,6GAAA,gBAAgB,OAAA;AAGjD,iDAAqD;AAA5C,qGAAA,WAAW,OAAA;AACpB,gDAAmD;AAA1C,oGAAA,UAAU,OAAA;AACnB,kDAAqD;AAA5C,sGAAA,WAAW,OAAA;AAcpB,4CAAiD;AAAxC,kGAAA,UAAU,OAAA;AAEnB,gGAAgG;AAChG,6FAA6F;AAC7F,iGAAiG;AACjG,0DAA0D;AAC1D,qEAAmE;AAA1D,uHAAA,iBAAiB,OAAA;AAE1B,2DAAmG;AAA1F,iHAAA,gBAAgB,OAAA;AAAE,oGAAA,GAAG,OAAA;AAAE,4GAAA,WAAW,OAAA;AAAE,0GAAA,SAAS,OAAA;AAAE,wGAAA,OAAO,OAAA;AAC/D,uEAAgF;AAAvE,oIAAA,6BAA6B,OAAA;AACtC,mEAAgF;AAAvE,iHAAA,YAAY,OAAA;AAAE,sHAAA,iBAAiB,OAAA;AACxC,yEAAuE;AAA9D,2HAAA,mBAAmB,OAAA","sourcesContent":["export { BaseHelper } from './modules/base';\n// By name, never `export *` from `./modules/env`: that barrel also carries `Environment` and\n// `applicationEnvironment`, both of which read `process.env`.\nexport { EnvironmentNames } from './modules/env/names';\nexport * from './modules/error';\nexport { LogLevels } from './modules/logger/common/types';\nexport type { ILogger, ILoggerProvider, TLogLevel } from './modules/logger/common/types';\nexport * from './modules/network/http-request/fetcher/base-fetcher';\n// The node fetcher carries no node builtin - its one `querystring.stringify` is written out - so the\n// framework HTTP layer is reachable from a browser bundle, and a connector on HTTP need not\n// re-implement one.\nexport * from './modules/network/http-request/fetcher/node-fetcher';\nexport * from './modules/network/http-request/base-network-request.helper';\nexport * from './modules/pool';\nexport * from './modules/queue/internal/hf';\nexport * from './modules/temporal';\nexport * from './modules/uid';\n// The url guard, pure half only: `UrlPolicy` decides a url and a literal address with string and\n// number work. Its sibling `UrlIngest` reaches `node:dns` and stays out of this subpath.\nexport * from './modules/network/utilities/url-safety/common/constants';\nexport type { IUrlSafetyPolicy } from './modules/network/utilities/url-safety/common/types';\nexport * from './modules/network/utilities/url-safety/policy';\nexport * from './modules/network/utilities/query-string';\nexport { RetryBackoffStrategies, RetryJitterModes } from './modules/retry/common/constants';\nexport type { TRetryBackoffStrategy, TRetryJitterMode } from './modules/retry/common/constants';\nexport type { IRetryBackoffOptions, IRetryContext } from './modules/retry/common/types';\nexport { RetryHelper } from './modules/retry/helper';\nexport { SlugHelper } from './modules/slug/helper';\nexport { TreeBuilder } from './modules/tree/builder';\nexport type {\n IBuildOptions,\n IHeightWhereOptions,\n ILeavesOptions,\n INodeWithPath,\n IPrintOptions,\n ITreeNode,\n IWalkAsyncOptions,\n IWalkOptions,\n TNodePredicate,\n TOnVisit,\n TOnVisitAsync,\n} from './modules/tree/common/types';\nexport { TreeWalker } from './modules/tree/walk';\n\n// Pure value/type utilities that already live under the root barrel's `./utilities` re-export -\n// that barrel also carries node-only siblings (module.utility.ts, request.utility.ts), so it\n// cannot itself become a subpath. Named one at a time here instead of widening the barrel: every\n// symbol below is verified free of node builtins/globals.\nexport { BuildInfoRegistry } from './utilities/build-info.utility';\nexport type { IBuildInfo, TBuildInfoRecord } from './utilities/build-info.utility';\nexport { blankToUndefined, int, keysToCamel, toBoolean, toCamel } from './utilities/parse.utility';\nexport { executeWithPerformanceMeasure } from './utilities/performance.utility';\nexport { readFormBody, RequestBodyErrors } from './utilities/form-body.utility';\nexport { ProjectRootRegistry } from './utilities/project-root.utility';\n\n// Type-only: erased at compile time, so re-exporting these carries no runtime/bundle cost even\n// though the concrete classes they describe (crypto algorithms, the ioredis-backed helper) are not\n// themselves part of this pure surface.\nexport type { AESAlgorithmType } from './modules/crypto/algorithms/aes.algorithm';\nexport type { IPayloadCipher } from './modules/crypto/common/types';\nexport type { IRedisHelper } from './modules/redis/common/interfaces';\n"]}
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../../src/core.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAA4C;AAAnC,kGAAA,UAAU,OAAA;AACnB,6FAA6F;AAC7F,8DAA8D;AAC9D,6CAAuD;AAA9C,yGAAA,gBAAgB,OAAA;AACzB,kDAAgC;AAChC,uDAA0D;AAAjD,kGAAA,SAAS,OAAA;AAElB,sFAAoE;AACpE,qGAAqG;AACrG,4FAA4F;AAC5F,oBAAoB;AACpB,sFAAoE;AACpE,6FAA2E;AAC3E,iDAA+B;AAC/B,8DAA4C;AAC5C,qDAAmC;AACnC,gDAA8B;AAC9B,iGAAiG;AACjG,yFAAyF;AACzF,0FAAwE;AAExE,gFAA8D;AAC9D,2EAAyD;AACzD,8DAA4F;AAAnF,mHAAA,sBAAsB,OAAA;AAAE,6GAAA,gBAAgB,OAAA;AAGjD,iDAAqD;AAA5C,qGAAA,WAAW,OAAA;AACpB,gDAAmD;AAA1C,oGAAA,UAAU,OAAA;AACnB,kDAAqD;AAA5C,sGAAA,WAAW,OAAA;AAcpB,4CAAiD;AAAxC,kGAAA,UAAU,OAAA;AAEnB,gGAAgG;AAChG,6FAA6F;AAC7F,iGAAiG;AACjG,0DAA0D;AAC1D,qEAAmE;AAA1D,uHAAA,iBAAiB,OAAA;AAE1B,2DAAmG;AAA1F,iHAAA,gBAAgB,OAAA;AAAE,oGAAA,GAAG,OAAA;AAAE,4GAAA,WAAW,OAAA;AAAE,0GAAA,SAAS,OAAA;AAAE,wGAAA,OAAO,OAAA;AAC/D,uEAAgF;AAAvE,oIAAA,6BAA6B,OAAA;AACtC,mEAAgF;AAAvE,iHAAA,YAAY,OAAA;AAAE,sHAAA,iBAAiB,OAAA;AACxC,yEAAuE;AAA9D,2HAAA,mBAAmB,OAAA;AAE5B,+FAA+F;AAC/F,mGAAmG;AACnG,wCAAwC;AACxC,2EAA0E;AAAjE,8GAAA,aAAa,OAAA","sourcesContent":["export { BaseHelper } from './modules/base';\n// By name, never `export *` from `./modules/env`: that barrel also carries `Environment` and\n// `applicationEnvironment`, both of which read `process.env`.\nexport { EnvironmentNames } from './modules/env/names';\nexport * from './modules/error';\nexport { LogLevels } from './modules/logger/common/types';\nexport type { ILogger, ILoggerProvider, TLogLevel } from './modules/logger/common/types';\nexport * from './modules/network/http-request/fetcher/base-fetcher';\n// The node fetcher carries no node builtin - its one `querystring.stringify` is written out - so the\n// framework HTTP layer is reachable from a browser bundle, and a connector on HTTP need not\n// re-implement one.\nexport * from './modules/network/http-request/fetcher/node-fetcher';\nexport * from './modules/network/http-request/base-network-request.helper';\nexport * from './modules/pool';\nexport * from './modules/queue/internal/hf';\nexport * from './modules/temporal';\nexport * from './modules/uid';\n// The url guard, pure half only: `UrlPolicy` decides a url and a literal address with string and\n// number work. Its sibling `UrlIngest` reaches `node:dns` and stays out of this subpath.\nexport * from './modules/network/utilities/url-safety/common/constants';\nexport type { IUrlSafetyPolicy } from './modules/network/utilities/url-safety/common/types';\nexport * from './modules/network/utilities/url-safety/policy';\nexport * from './modules/network/utilities/query-string';\nexport { RetryBackoffStrategies, RetryJitterModes } from './modules/retry/common/constants';\nexport type { TRetryBackoffStrategy, TRetryJitterMode } from './modules/retry/common/constants';\nexport type { IRetryBackoffOptions, IRetryContext } from './modules/retry/common/types';\nexport { RetryHelper } from './modules/retry/helper';\nexport { SlugHelper } from './modules/slug/helper';\nexport { TreeBuilder } from './modules/tree/builder';\nexport type {\n IBuildOptions,\n IHeightWhereOptions,\n ILeavesOptions,\n INodeWithPath,\n IPrintOptions,\n ITreeNode,\n IWalkAsyncOptions,\n IWalkOptions,\n TNodePredicate,\n TOnVisit,\n TOnVisitAsync,\n} from './modules/tree/common/types';\nexport { TreeWalker } from './modules/tree/walk';\n\n// Pure value/type utilities that already live under the root barrel's `./utilities` re-export -\n// that barrel also carries node-only siblings (module.utility.ts, request.utility.ts), so it\n// cannot itself become a subpath. Named one at a time here instead of widening the barrel: every\n// symbol below is verified free of node builtins/globals.\nexport { BuildInfoRegistry } from './utilities/build-info.utility';\nexport type { IBuildInfo, TBuildInfoRecord } from './utilities/build-info.utility';\nexport { blankToUndefined, int, keysToCamel, toBoolean, toCamel } from './utilities/parse.utility';\nexport { executeWithPerformanceMeasure } from './utilities/performance.utility';\nexport { readFormBody, RequestBodyErrors } from './utilities/form-body.utility';\nexport { ProjectRootRegistry } from './utilities/project-root.utility';\n\n// Type-only: erased at compile time, so re-exporting these carries no runtime/bundle cost even\n// though the concrete classes they describe (crypto algorithms, the ioredis-backed helper) are not\n// themselves part of this pure surface.\nexport { AESAlgorithms } from './modules/crypto/algorithms/aes.constants';\nexport type { AESAlgorithmType } from './modules/crypto/algorithms/aes.constants';\nexport type { IPayloadCipher } from './modules/crypto/common/types';\nexport type { IRedisHelper } from './modules/redis/common/interfaces';\n"]}
@@ -1,3 +1,4 @@
1
+ import { AESAlgorithms, type AESAlgorithmType } from './aes.constants';
1
2
  import { BaseCryptoAlgorithm } from './base.algorithm';
2
3
  interface IAESDecryptOptions {
3
4
  inputEncoding?: BufferEncoding;
@@ -17,7 +18,7 @@ export interface IAESKeyringEntry {
17
18
  secret: string;
18
19
  }
19
20
  export type TAESSecret = string | IAESKeyringEntry[];
20
- export type AESAlgorithmType = 'aes-256-cbc' | 'aes-256-gcm';
21
+ export { AESAlgorithms, type AESAlgorithmType };
21
22
  export declare class AES extends BaseCryptoAlgorithm<AESAlgorithmType, string, string, TAESSecret, string, string, IAESExtraOptions> {
22
23
  constructor(opts: {
23
24
  algorithm: AESAlgorithmType;
@@ -56,5 +57,4 @@ export declare class AES extends BaseCryptoAlgorithm<AESAlgorithmType, string, s
56
57
  secret: TAESSecret;
57
58
  }): string;
58
59
  }
59
- export {};
60
60
  //# sourceMappingURL=aes.algorithm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aes.algorithm.d.ts","sourceRoot":"","sources":["../../../../../src/modules/crypto/algorithms/aes.algorithm.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAMvD,UAAU,kBAAkB;IAC1B,aAAa,CAAC,EAAE,cAAc,CAAC;IAC/B,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,8HAA8H;IAC9H,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0HAA0H;IAC1H,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,sIAAsI;AACtI,UAAU,gBAAiB,SAAQ,kBAAkB;IACnD,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,gBAAgB,EAAE,CAAC;AAErD,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG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ACnB,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB,GAAG,MAAM;IAyBV,OAAO,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,UAAU,CAAC;QAAC,IAAI,CAAC,EAAE,gBAAgB,CAAA;KAAE;IAiD9E,WAAW,CAAC,IAAI,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,UAAU,CAAA;KAAE,GAAG,MAAM;IAavE,OAAO,CAAC,IAAI,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,UAAU,CAAC;QAAC,IAAI,CAAC,EAAE,kBAAkB,CAAA;KAAE;IAuDhF,WAAW,CAAC,IAAI,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,UAAU,CAAA;KAAE;CAY/D"}
@@ -3,7 +3,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.AES = void 0;
6
+ exports.AES = exports.AESAlgorithms = void 0;
7
+ const aes_constants_1 = require("./aes.constants");
8
+ Object.defineProperty(exports, "AESAlgorithms", { enumerable: true, get: function () { return aes_constants_1.AESAlgorithms; } });
7
9
  const ignis_inversion_1 = require("@venizia/ignis-inversion");
8
10
  const node_crypto_1 = __importDefault(require("node:crypto"));
9
11
  const node_fs_1 = __importDefault(require("node:fs"));
@@ -1 +1 @@
1
- {"version":3,"file":"aes.algorithm.js","sourceRoot":"","sources":["../../../../../src/modules/crypto/algorithms/aes.algorithm.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAmD;AACnD,8DAA4B;AAC5B,sDAAyB;AACzB,2CAA2C;AAC3C,qDAAuD;AAEvD,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1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C,YAAY,IAAI,IAAA,yBAAO,EAAC,EAAE,KAAK,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;YACtD,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,MAAM,GAAG,iBAAE,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;QAC7C,MAAM,WAAW,GAAG,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC9C,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC,CAAC;QACjE,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AArMD,kBAqMC","sourcesContent":["import { isEmpty } from '@venizia/ignis-inversion';\nimport C from 'node:crypto';\nimport fs from 'node:fs';\nimport { getError } from '@/modules/error';\nimport { BaseCryptoAlgorithm } from './base.algorithm';\n\nconst DEFAULT_LENGTH = 16;\nconst CIPHERTEXT_VERSION = 0x01;\nconst DEFAULT_KEY_ID = '0';\n\ninterface IAESDecryptOptions {\n inputEncoding?: BufferEncoding;\n outputEncoding?: BufferEncoding;\n doThrow?: boolean;\n /** Per-deployment PBKDF2 salt override. Must be supplied identically on encrypt and decrypt; omit for the shipped default. */\n kdfSalt?: string;\n /** PBKDF2 iteration count override. Must be supplied identically on encrypt and decrypt; omit for the shipped default. */\n kdfIterations?: number;\n}\n\n/** `iv` is encrypt-only: the envelope carries the IV, so decrypt reads it from there and a supplied one would be silently ignored. */\ninterface IAESExtraOptions extends IAESDecryptOptions {\n iv?: Buffer;\n}\n\nexport interface IAESKeyringEntry {\n id: string;\n secret: string;\n}\n\nexport type TAESSecret = string | IAESKeyringEntry[];\n\nexport type AESAlgorithmType = 'aes-256-cbc' | 'aes-256-gcm';\n\nexport class AES extends BaseCryptoAlgorithm<\n AESAlgorithmType,\n string,\n string,\n TAESSecret,\n string,\n string,\n IAESExtraOptions\n> {\n constructor(opts: { algorithm: AESAlgorithmType }) {\n super({ scope: AES.name, ...opts });\n }\n\n static withAlgorithm(algorithm: AESAlgorithmType) {\n return new AES({ algorithm });\n }\n\n protected resolveEncryptKey(opts: {\n secret: TAESSecret;\n kdfSalt?: string;\n kdfIterations?: number;\n }): { id: string; key: Buffer } {\n const { secret, kdfSalt, kdfIterations } = opts;\n const entry = Array.isArray(secret) ? secret[0] : { id: DEFAULT_KEY_ID, secret };\n\n if (!entry || isEmpty({ value: entry.secret })) {\n throw getError({ message: '[AES][resolveEncryptKey] Missing secret or empty keyring' });\n }\n\n const key = this.normalizeSecretKey({\n secret: entry.secret,\n length: this.getAlgorithmKeySize(),\n kdfSalt,\n kdfIterations,\n });\n return { id: entry.id, key };\n }\n\n protected resolveDecryptKey(opts: {\n secret: TAESSecret;\n id: string;\n kdfSalt?: string;\n kdfIterations?: number;\n }): Buffer {\n const { secret, id, kdfSalt, kdfIterations } = opts;\n const length = this.getAlgorithmKeySize();\n\n if (!Array.isArray(secret)) {\n return this.normalizeSecretKey({ secret, length, kdfSalt, kdfIterations });\n }\n\n const entry = secret.find((e) => e.id === id);\n if (!entry) {\n throw getError({\n message: `[AES][resolveDecryptKey] No key in keyring matches ciphertext key id \"${id}\"`,\n });\n }\n\n // Without this the empty secret derives a key from '' and fails as an opaque OpenSSL error, hiding a plain configuration mistake.\n if (isEmpty({ value: entry.secret })) {\n throw getError({\n message: `[AES][resolveDecryptKey] Keyring entry for key id \"${id}\" has an empty secret`,\n });\n }\n\n return this.normalizeSecretKey({ secret: entry.secret, length, kdfSalt, kdfIterations });\n }\n\n encrypt(opts: { message: string; secret: TAESSecret; opts?: IAESExtraOptions }) {\n const { message, secret } = opts;\n const {\n iv = C.randomBytes(DEFAULT_LENGTH),\n inputEncoding = 'utf-8',\n outputEncoding = 'base64',\n doThrow = true,\n kdfSalt,\n kdfIterations,\n } = opts.opts ?? {};\n\n try {\n const { id, key } = this.resolveEncryptKey({ secret, kdfSalt, kdfIterations });\n const idBuffer = Buffer.from(id, 'utf-8');\n if (idBuffer.length > 0xff) {\n throw getError({ message: '[AES][encrypt] Key id too long (max 255 bytes)' });\n }\n\n const cipher = C.createCipheriv(this.algorithm, key, iv);\n\n // Envelope: [version(1)][idLen(1)][id(idLen)][iv(16)][authTag(16, gcm only)][cipher]\n const header = Buffer.from([CIPHERTEXT_VERSION, idBuffer.length]);\n const parts = [header, idBuffer, iv];\n\n const cipherText = cipher.update(message, inputEncoding);\n const cipherFinal = cipher.final();\n\n switch (this.algorithm) {\n case 'aes-256-cbc': {\n break;\n }\n case 'aes-256-gcm': {\n parts.push((cipher as C.CipherGCM).getAuthTag());\n break;\n }\n }\n parts.push(cipherText);\n parts.push(cipherFinal);\n\n return Buffer.concat(parts).toString(outputEncoding);\n } catch (error) {\n if (doThrow) {\n throw error;\n }\n\n return message;\n }\n }\n\n encryptFile(opts: { absolutePath: string; secret: TAESSecret }): string {\n const { absolutePath, secret } = opts;\n\n if (!absolutePath || isEmpty({ value: absolutePath })) {\n return '';\n }\n\n const buffer = fs.readFileSync(absolutePath);\n const fileContent = buffer?.toString('utf-8');\n const encrypted = this.encrypt({ message: fileContent, secret });\n return encrypted;\n }\n\n decrypt(opts: { message: string; secret: TAESSecret; opts?: IAESDecryptOptions }) {\n const { message, secret } = opts;\n const {\n inputEncoding = 'base64',\n outputEncoding = 'utf-8',\n doThrow = true,\n kdfSalt,\n kdfIterations,\n } = opts.opts ?? {};\n\n try {\n const raw = Buffer.from(message, inputEncoding);\n\n const version = raw[0];\n if (version !== CIPHERTEXT_VERSION) {\n throw getError({ message: `[AES][decrypt] Unsupported ciphertext version: ${version}` });\n }\n\n const idLength = raw[1];\n let cursor = 2;\n\n const id = raw.subarray(cursor, cursor + idLength).toString('utf-8');\n cursor += idLength;\n\n const iv = raw.subarray(cursor, cursor + DEFAULT_LENGTH);\n cursor += DEFAULT_LENGTH;\n\n const key = this.resolveDecryptKey({ secret, id, kdfSalt, kdfIterations });\n const decipher = C.createDecipheriv(this.algorithm, key, iv);\n\n switch (this.algorithm) {\n case 'aes-256-cbc': {\n break;\n }\n case 'aes-256-gcm': {\n const authTag = raw.subarray(cursor, cursor + DEFAULT_LENGTH);\n cursor += DEFAULT_LENGTH;\n (decipher as C.DecipherGCM).setAuthTag(authTag);\n break;\n }\n }\n\n const cipherText = raw.subarray(cursor);\n return Buffer.concat([decipher.update(cipherText), decipher.final()]).toString(\n outputEncoding,\n );\n } catch (error) {\n if (doThrow) {\n throw error;\n }\n\n return message;\n }\n }\n\n decryptFile(opts: { absolutePath: string; secret: TAESSecret }) {\n const { absolutePath, secret } = opts;\n\n if (!absolutePath || isEmpty({ value: absolutePath })) {\n return '';\n }\n\n const buffer = fs.readFileSync(absolutePath);\n const fileContent = buffer?.toString('utf-8');\n const decrypted = this.decrypt({ message: fileContent, secret });\n return decrypted;\n }\n}\n"]}
1
+ {"version":3,"file":"aes.algorithm.js","sourceRoot":"","sources":["../../../../../src/modules/crypto/algorithms/aes.algorithm.ts"],"names":[],"mappings":";;;;;;AAAA,mDAAuE;AAiC9D,8FAjCA,6BAAa,OAiCA;AAhCtB,8DAAmD;AACnD,8DAA4B;AAC5B,sDAAyB;AACzB,2CAA2C;AAC3C,qDAAuD;AAEvD,MAAM,cAAc,GAAG,EAAE,CAAC;AAC1B,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAChC,MAAM,cAAc,GAAG,GAAG,CAAC;AA0B3B,MAAa,GAAI,SAAQ,oCAQxB;IACC,YAAY,IAAqC;QAC/C,KAAK,CAAC,EAAE,KAAK,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;IACtC,CAAC;IAED,MAAM,CAAC,aAAa,CAAC,SAA2B;QAC9C,OAAO,IAAI,GAAG,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAChC,CAAC;IAES,iBAAiB,CAAC,IAI3B;QACC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,GAAG,IAAI,CAAC;QAChD,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,MA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ion';\nimport C from 'node:crypto';\nimport fs from 'node:fs';\nimport { getError } from '@/modules/error';\nimport { BaseCryptoAlgorithm } from './base.algorithm';\n\nconst DEFAULT_LENGTH = 16;\nconst CIPHERTEXT_VERSION = 0x01;\nconst DEFAULT_KEY_ID = '0';\n\ninterface IAESDecryptOptions {\n inputEncoding?: BufferEncoding;\n outputEncoding?: BufferEncoding;\n doThrow?: boolean;\n /** Per-deployment PBKDF2 salt override. Must be supplied identically on encrypt and decrypt; omit for the shipped default. */\n kdfSalt?: string;\n /** PBKDF2 iteration count override. Must be supplied identically on encrypt and decrypt; omit for the shipped default. */\n kdfIterations?: number;\n}\n\n/** `iv` is encrypt-only: the envelope carries the IV, so decrypt reads it from there and a supplied one would be silently ignored. */\ninterface IAESExtraOptions extends IAESDecryptOptions {\n iv?: Buffer;\n}\n\nexport interface IAESKeyringEntry {\n id: string;\n secret: string;\n}\n\nexport type TAESSecret = string | IAESKeyringEntry[];\n\nexport { AESAlgorithms, type AESAlgorithmType };\n\nexport class AES extends BaseCryptoAlgorithm<\n AESAlgorithmType,\n string,\n string,\n TAESSecret,\n string,\n string,\n IAESExtraOptions\n> {\n constructor(opts: { algorithm: AESAlgorithmType }) {\n super({ scope: AES.name, ...opts });\n }\n\n static withAlgorithm(algorithm: AESAlgorithmType) {\n return new AES({ algorithm });\n }\n\n protected resolveEncryptKey(opts: {\n secret: TAESSecret;\n kdfSalt?: string;\n kdfIterations?: number;\n }): { id: string; key: Buffer } {\n const { secret, kdfSalt, kdfIterations } = opts;\n const entry = Array.isArray(secret) ? secret[0] : { id: DEFAULT_KEY_ID, secret };\n\n if (!entry || isEmpty({ value: entry.secret })) {\n throw getError({ message: '[AES][resolveEncryptKey] Missing secret or empty keyring' });\n }\n\n const key = this.normalizeSecretKey({\n secret: entry.secret,\n length: this.getAlgorithmKeySize(),\n kdfSalt,\n kdfIterations,\n });\n return { id: entry.id, key };\n }\n\n protected resolveDecryptKey(opts: {\n secret: TAESSecret;\n id: string;\n kdfSalt?: string;\n kdfIterations?: number;\n }): Buffer {\n const { secret, id, kdfSalt, kdfIterations } = opts;\n const length = this.getAlgorithmKeySize();\n\n if (!Array.isArray(secret)) {\n return this.normalizeSecretKey({ secret, length, kdfSalt, kdfIterations });\n }\n\n const entry = secret.find((e) => e.id === id);\n if (!entry) {\n throw getError({\n message: `[AES][resolveDecryptKey] No key in keyring matches ciphertext key id \"${id}\"`,\n });\n }\n\n // Without this the empty secret derives a key from '' and fails as an opaque OpenSSL error, hiding a plain configuration mistake.\n if (isEmpty({ value: entry.secret })) {\n throw getError({\n message: `[AES][resolveDecryptKey] Keyring entry for key id \"${id}\" has an empty secret`,\n });\n }\n\n return this.normalizeSecretKey({ secret: entry.secret, length, kdfSalt, kdfIterations });\n }\n\n encrypt(opts: { message: string; secret: TAESSecret; opts?: IAESExtraOptions }) {\n const { message, secret } = opts;\n const {\n iv = C.randomBytes(DEFAULT_LENGTH),\n inputEncoding = 'utf-8',\n outputEncoding = 'base64',\n doThrow = true,\n kdfSalt,\n kdfIterations,\n } = opts.opts ?? {};\n\n try {\n const { id, key } = this.resolveEncryptKey({ secret, kdfSalt, kdfIterations });\n const idBuffer = Buffer.from(id, 'utf-8');\n if (idBuffer.length > 0xff) {\n throw getError({ message: '[AES][encrypt] Key id too long (max 255 bytes)' });\n }\n\n const cipher = C.createCipheriv(this.algorithm, key, iv);\n\n // Envelope: [version(1)][idLen(1)][id(idLen)][iv(16)][authTag(16, gcm only)][cipher]\n const header = Buffer.from([CIPHERTEXT_VERSION, idBuffer.length]);\n const parts = [header, idBuffer, iv];\n\n const cipherText = cipher.update(message, inputEncoding);\n const cipherFinal = cipher.final();\n\n switch (this.algorithm) {\n case 'aes-256-cbc': {\n break;\n }\n case 'aes-256-gcm': {\n parts.push((cipher as C.CipherGCM).getAuthTag());\n break;\n }\n }\n parts.push(cipherText);\n parts.push(cipherFinal);\n\n return Buffer.concat(parts).toString(outputEncoding);\n } catch (error) {\n if (doThrow) {\n throw error;\n }\n\n return message;\n }\n }\n\n encryptFile(opts: { absolutePath: string; secret: TAESSecret }): string {\n const { absolutePath, secret } = opts;\n\n if (!absolutePath || isEmpty({ value: absolutePath })) {\n return '';\n }\n\n const buffer = fs.readFileSync(absolutePath);\n const fileContent = buffer?.toString('utf-8');\n const encrypted = this.encrypt({ message: fileContent, secret });\n return encrypted;\n }\n\n decrypt(opts: { message: string; secret: TAESSecret; opts?: IAESDecryptOptions }) {\n const { message, secret } = opts;\n const {\n inputEncoding = 'base64',\n outputEncoding = 'utf-8',\n doThrow = true,\n kdfSalt,\n kdfIterations,\n } = opts.opts ?? {};\n\n try {\n const raw = Buffer.from(message, inputEncoding);\n\n const version = raw[0];\n if (version !== CIPHERTEXT_VERSION) {\n throw getError({ message: `[AES][decrypt] Unsupported ciphertext version: ${version}` });\n }\n\n const idLength = raw[1];\n let cursor = 2;\n\n const id = raw.subarray(cursor, cursor + idLength).toString('utf-8');\n cursor += idLength;\n\n const iv = raw.subarray(cursor, cursor + DEFAULT_LENGTH);\n cursor += DEFAULT_LENGTH;\n\n const key = this.resolveDecryptKey({ secret, id, kdfSalt, kdfIterations });\n const decipher = C.createDecipheriv(this.algorithm, key, iv);\n\n switch (this.algorithm) {\n case 'aes-256-cbc': {\n break;\n }\n case 'aes-256-gcm': {\n const authTag = raw.subarray(cursor, cursor + DEFAULT_LENGTH);\n cursor += DEFAULT_LENGTH;\n (decipher as C.DecipherGCM).setAuthTag(authTag);\n break;\n }\n }\n\n const cipherText = raw.subarray(cursor);\n return Buffer.concat([decipher.update(cipherText), decipher.final()]).toString(\n outputEncoding,\n );\n } catch (error) {\n if (doThrow) {\n throw error;\n }\n\n return message;\n }\n }\n\n decryptFile(opts: { absolutePath: string; secret: TAESSecret }) {\n const { absolutePath, secret } = opts;\n\n if (!absolutePath || isEmpty({ value: absolutePath })) {\n return '';\n }\n\n const buffer = fs.readFileSync(absolutePath);\n const fileContent = buffer?.toString('utf-8');\n const decrypted = this.decrypt({ message: fileContent, secret });\n return decrypted;\n }\n}\n"]}
@@ -0,0 +1,11 @@
1
+ import type { TConstValue } from '../../../common/types';
2
+ /** The ciphers `AES` supports. */
3
+ export declare class AESAlgorithms {
4
+ static readonly AES_256_CBC = "aes-256-cbc";
5
+ static readonly AES_256_GCM = "aes-256-gcm";
6
+ static readonly SCHEME_SET: Set<string>;
7
+ static isValid(value: string): boolean;
8
+ }
9
+ /** Valid AES algorithm values. */
10
+ export type AESAlgorithmType = TConstValue<typeof AESAlgorithms>;
11
+ //# sourceMappingURL=aes.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aes.constants.d.ts","sourceRoot":"","sources":["../../../../../src/modules/crypto/algorithms/aes.constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,kCAAkC;AAClC,qBAAa,aAAa;IACxB,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAiB;IAC5C,MAAM,CAAC,QAAQ,CAAC,WAAW,iBAAiB;IAE5C,MAAM,CAAC,QAAQ,CAAC,UAAU,cAAyD;IAEnF,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAGvC;AAED,kCAAkC;AAClC,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AESAlgorithms = void 0;
4
+ /** The ciphers `AES` supports. */
5
+ class AESAlgorithms {
6
+ static { this.AES_256_CBC = 'aes-256-cbc'; }
7
+ static { this.AES_256_GCM = 'aes-256-gcm'; }
8
+ static { this.SCHEME_SET = new Set([this.AES_256_CBC, this.AES_256_GCM]); }
9
+ static isValid(value) {
10
+ return this.SCHEME_SET.has(value);
11
+ }
12
+ }
13
+ exports.AESAlgorithms = AESAlgorithms;
14
+ //# sourceMappingURL=aes.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aes.constants.js","sourceRoot":"","sources":["../../../../../src/modules/crypto/algorithms/aes.constants.ts"],"names":[],"mappings":";;;AAEA,kCAAkC;AAClC,MAAa,aAAa;aACR,gBAAW,GAAG,aAAa,CAAC;aAC5B,gBAAW,GAAG,aAAa,CAAC;aAE5B,eAAU,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAEnF,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,sCASC","sourcesContent":["import type { TConstValue } from '@/common/types';\n\n/** The ciphers `AES` supports. */\nexport class AESAlgorithms {\n static readonly AES_256_CBC = 'aes-256-cbc';\n static readonly AES_256_GCM = 'aes-256-gcm';\n\n static readonly SCHEME_SET = new Set<string>([this.AES_256_CBC, this.AES_256_GCM]);\n\n static isValid(value: string): boolean {\n return this.SCHEME_SET.has(value);\n }\n}\n\n/** Valid AES algorithm values. */\nexport type AESAlgorithmType = TConstValue<typeof AESAlgorithms>;\n"]}
@@ -1,5 +1,5 @@
1
1
  /** Error layer lives in `@venizia/ignis-inversion` so browser apps (DI-only, no helpers) share the same class; re-exported by NAME, not `export *`, to keep inversion's DI container off the helpers surface. */
2
2
  /** Augment `IErrorKeyRegistry` via whichever module the file imports - see `registry-augmentation.test.ts`. */
3
- export { ApplicationError, ErrorScopes, fromError, getError, isApplicationError, MessageCode, MessageTemplate, } from '@venizia/ignis-inversion';
3
+ export { ApplicationError, ErrorLogLevels, ErrorScopes, fromError, getError, isApplicationError, MessageCode, MessageTemplate, } from '@venizia/ignis-inversion';
4
4
  export type { IErrorKeyRegistry, TError, TErrorByDefinition, TErrorByField, TErrorDefinition, TErrorDefinitionMessage, TErrorKey, TErrorLogLevel, TErrorMessage, TErrorMessageInput, TErrorMessageOverride, TErrorNormalized, TErrorNormalizeTransformFn, TErrorScope, TRegisterErrors, TResponsedError, } from '@venizia/ignis-inversion';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/error/index.ts"],"names":[],"mappings":"AAAA,iNAAiN;AACjN,+GAA+G;AAC/G,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,WAAW,EACX,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAElC,YAAY,EACV,iBAAiB,EACjB,MAAM,EACN,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,SAAS,EACT,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,0BAA0B,EAC1B,WAAW,EACX,eAAe,EACf,eAAe,GAChB,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/error/index.ts"],"names":[],"mappings":"AAAA,iNAAiN;AACjN,+GAA+G;AAC/G,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,WAAW,EACX,eAAe,GAChB,MAAM,0BAA0B,CAAC;AAElC,YAAY,EACV,iBAAiB,EACjB,MAAM,EACN,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,SAAS,EACT,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,0BAA0B,EAC1B,WAAW,EACX,eAAe,EACf,eAAe,GAChB,MAAM,0BAA0B,CAAC"}
@@ -1,10 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MessageTemplate = exports.MessageCode = exports.isApplicationError = exports.getError = exports.fromError = exports.ErrorScopes = exports.ApplicationError = void 0;
3
+ exports.MessageTemplate = exports.MessageCode = exports.isApplicationError = exports.getError = exports.fromError = exports.ErrorScopes = exports.ErrorLogLevels = exports.ApplicationError = void 0;
4
4
  /** Error layer lives in `@venizia/ignis-inversion` so browser apps (DI-only, no helpers) share the same class; re-exported by NAME, not `export *`, to keep inversion's DI container off the helpers surface. */
5
5
  /** Augment `IErrorKeyRegistry` via whichever module the file imports - see `registry-augmentation.test.ts`. */
6
6
  var ignis_inversion_1 = require("@venizia/ignis-inversion");
7
7
  Object.defineProperty(exports, "ApplicationError", { enumerable: true, get: function () { return ignis_inversion_1.ApplicationError; } });
8
+ Object.defineProperty(exports, "ErrorLogLevels", { enumerable: true, get: function () { return ignis_inversion_1.ErrorLogLevels; } });
8
9
  Object.defineProperty(exports, "ErrorScopes", { enumerable: true, get: function () { return ignis_inversion_1.ErrorScopes; } });
9
10
  Object.defineProperty(exports, "fromError", { enumerable: true, get: function () { return ignis_inversion_1.fromError; } });
10
11
  Object.defineProperty(exports, "getError", { enumerable: true, get: function () { return ignis_inversion_1.getError; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/error/index.ts"],"names":[],"mappings":";;;AAAA,iNAAiN;AACjN,+GAA+G;AAC/G,4DAQkC;AAPhC,mHAAA,gBAAgB,OAAA;AAChB,8GAAA,WAAW,OAAA;AACX,4GAAA,SAAS,OAAA;AACT,2GAAA,QAAQ,OAAA;AACR,qHAAA,kBAAkB,OAAA;AAClB,8GAAA,WAAW,OAAA;AACX,kHAAA,eAAe,OAAA","sourcesContent":["/** Error layer lives in `@venizia/ignis-inversion` so browser apps (DI-only, no helpers) share the same class; re-exported by NAME, not `export *`, to keep inversion's DI container off the helpers surface. */\n/** Augment `IErrorKeyRegistry` via whichever module the file imports - see `registry-augmentation.test.ts`. */\nexport {\n ApplicationError,\n ErrorScopes,\n fromError,\n getError,\n isApplicationError,\n MessageCode,\n MessageTemplate,\n} from '@venizia/ignis-inversion';\n\nexport type {\n IErrorKeyRegistry,\n TError,\n TErrorByDefinition,\n TErrorByField,\n TErrorDefinition,\n TErrorDefinitionMessage,\n TErrorKey,\n TErrorLogLevel,\n TErrorMessage,\n TErrorMessageInput,\n TErrorMessageOverride,\n TErrorNormalized,\n TErrorNormalizeTransformFn,\n TErrorScope,\n TRegisterErrors,\n TResponsedError,\n} from '@venizia/ignis-inversion';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/error/index.ts"],"names":[],"mappings":";;;AAAA,iNAAiN;AACjN,+GAA+G;AAC/G,4DASkC;AARhC,mHAAA,gBAAgB,OAAA;AAChB,iHAAA,cAAc,OAAA;AACd,8GAAA,WAAW,OAAA;AACX,4GAAA,SAAS,OAAA;AACT,2GAAA,QAAQ,OAAA;AACR,qHAAA,kBAAkB,OAAA;AAClB,8GAAA,WAAW,OAAA;AACX,kHAAA,eAAe,OAAA","sourcesContent":["/** Error layer lives in `@venizia/ignis-inversion` so browser apps (DI-only, no helpers) share the same class; re-exported by NAME, not `export *`, to keep inversion's DI container off the helpers surface. */\n/** Augment `IErrorKeyRegistry` via whichever module the file imports - see `registry-augmentation.test.ts`. */\nexport {\n ApplicationError,\n ErrorLogLevels,\n ErrorScopes,\n fromError,\n getError,\n isApplicationError,\n MessageCode,\n MessageTemplate,\n} from '@venizia/ignis-inversion';\n\nexport type {\n IErrorKeyRegistry,\n TError,\n TErrorByDefinition,\n TErrorByField,\n TErrorDefinition,\n TErrorDefinitionMessage,\n TErrorKey,\n TErrorLogLevel,\n TErrorMessage,\n TErrorMessageInput,\n TErrorMessageOverride,\n TErrorNormalized,\n TErrorNormalizeTransformFn,\n TErrorScope,\n TRegisterErrors,\n TResponsedError,\n} from '@venizia/ignis-inversion';\n"]}
@@ -1,4 +1,6 @@
1
- export type THfLogLevel = 'debug' | 'info' | 'warn' | 'error' | 'emerg';
1
+ import type { TLogLevel } from '../../common';
2
+ /** The levels the high-frequency logger writes: the shared log levels. */
3
+ export type THfLogLevel = TLogLevel;
2
4
  export type THfSinkBatch = {
3
5
  lines: Array<string>;
4
6
  dropped: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/logger/hf/common/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAExE,MAAM,MAAM,YAAY,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAErE,uQAAuQ;AACvQ,MAAM,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC,gDAAgD;IAChD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/logger/hf/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,0EAA0E;AAC1E,MAAM,MAAM,WAAW,GAAG,SAAS,CAAC;AAEpC,MAAM,MAAM,YAAY,GAAG;IAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAErE,uQAAuQ;AACvQ,MAAM,MAAM,OAAO,GAAG,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC,gDAAgD;IAChD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,GAAG,EAAE,YAAY,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/hf/common/types.ts"],"names":[],"mappings":"","sourcesContent":["export type THfLogLevel = 'debug' | 'info' | 'warn' | 'error' | 'emerg';\n\nexport type THfSinkBatch = { lines: Array<string>; dropped: number };\n\n/** Declared `=> void` ON PURPOSE: TS's void-return exemption lets both sync and `async` sinks assign to it (`void | Promise<void>` would reject the sync form); the flusher still awaits a returned thenable, so a rejection is caught and logged, never unhandled. */\nexport type THfSink = (batch: THfSinkBatch) => void;\n\nexport interface IHfLogFlusherOptions {\n /** Full custom delivery. Overrides filePath. */\n sink?: THfSink;\n /** Default sink appends here instead of writing to stdout. */\n filePath?: string;\n /** Entries rendered per batch before yielding. Defaults to HF_DEFAULT_BATCH_SIZE. */\n batchSize?: number;\n}\n\nexport type TRingState = { bytes: Uint8Array; f64: Float64Array; writeIndex: number };\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/hf/common/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TLogLevel } from '../../common';\n\n/** The levels the high-frequency logger writes: the shared log levels. */\nexport type THfLogLevel = TLogLevel;\n\nexport type THfSinkBatch = { lines: Array<string>; dropped: number };\n\n/** Declared `=> void` ON PURPOSE: TS's void-return exemption lets both sync and `async` sinks assign to it (`void | Promise<void>` would reject the sync form); the flusher still awaits a returned thenable, so a rejection is caught and logged, never unhandled. */\nexport type THfSink = (batch: THfSinkBatch) => void;\n\nexport interface IHfLogFlusherOptions {\n /** Full custom delivery. Overrides filePath. */\n sink?: THfSink;\n /** Default sink appends here instead of writing to stdout. */\n filePath?: string;\n /** Entries rendered per batch before yielding. Defaults to HF_DEFAULT_BATCH_SIZE. */\n batchSize?: number;\n}\n\nexport type TRingState = { bytes: Uint8Array; f64: Float64Array; writeIndex: number };\n"]}
@@ -1,5 +1,14 @@
1
+ import type { TConstValue } from '../../../../common/types';
1
2
  import { type TPinoCustomLevelName } from './types';
2
3
  /** pino levels are ASCENDING severity (error 50 > warn 40 > info 30 > debug 20); `emerg`(70) extends above error. NORMATIVE - do not renumber without updating the spec. */
3
4
  export declare const PINO_CUSTOM_LEVELS: Record<TPinoCustomLevelName, number>;
4
- export type TFrequency = 'hourly' | 'daily';
5
+ /** How often the file destination rolls (pino-roll's `frequency`). */
6
+ export declare class PinoFrequencies {
7
+ static readonly HOURLY = "hourly";
8
+ static readonly DAILY = "daily";
9
+ static readonly SCHEME_SET: Set<string>;
10
+ static isValid(value: string): boolean;
11
+ }
12
+ /** Valid pino roll frequency values. */
13
+ export type TFrequency = TConstValue<typeof PinoFrequencies>;
5
14
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/logger/pino/common/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,4KAA4K;AAC5K,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAEnE,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/logger/pino/common/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,4KAA4K;AAC5K,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAEnE,CAAC;AAEF,sEAAsE;AACtE,qBAAa,eAAe;IAC1B,MAAM,CAAC,QAAQ,CAAC,MAAM,YAAY;IAClC,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAEhC,MAAM,CAAC,QAAQ,CAAC,UAAU,cAA8C;IAExE,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAGvC;AAED,wCAAwC;AACxC,MAAM,MAAM,UAAU,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -1,8 +1,18 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PINO_CUSTOM_LEVELS = void 0;
3
+ exports.PinoFrequencies = exports.PINO_CUSTOM_LEVELS = void 0;
4
4
  /** pino levels are ASCENDING severity (error 50 > warn 40 > info 30 > debug 20); `emerg`(70) extends above error. NORMATIVE - do not renumber without updating the spec. */
5
5
  exports.PINO_CUSTOM_LEVELS = {
6
6
  emerg: 70,
7
7
  };
8
+ /** How often the file destination rolls (pino-roll's `frequency`). */
9
+ class PinoFrequencies {
10
+ static { this.HOURLY = 'hourly'; }
11
+ static { this.DAILY = 'daily'; }
12
+ static { this.SCHEME_SET = new Set([this.HOURLY, this.DAILY]); }
13
+ static isValid(value) {
14
+ return this.SCHEME_SET.has(value);
15
+ }
16
+ }
17
+ exports.PinoFrequencies = PinoFrequencies;
8
18
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/pino/common/constants.ts"],"names":[],"mappings":";;;AAEA,4KAA4K;AAC/J,QAAA,kBAAkB,GAAyC;IACtE,KAAK,EAAE,EAAE;CACV,CAAC","sourcesContent":["import { type TPinoCustomLevelName } from './types';\n\n/** pino levels are ASCENDING severity (error 50 > warn 40 > info 30 > debug 20); `emerg`(70) extends above error. NORMATIVE - do not renumber without updating the spec. */\nexport const PINO_CUSTOM_LEVELS: Record<TPinoCustomLevelName, number> = {\n emerg: 70,\n};\n\nexport type TFrequency = 'hourly' | 'daily';\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/pino/common/constants.ts"],"names":[],"mappings":";;;AAGA,4KAA4K;AAC/J,QAAA,kBAAkB,GAAyC;IACtE,KAAK,EAAE,EAAE;CACV,CAAC;AAEF,sEAAsE;AACtE,MAAa,eAAe;aACV,WAAM,GAAG,QAAQ,CAAC;aAClB,UAAK,GAAG,OAAO,CAAC;aAEhB,eAAU,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAExE,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,0CASC","sourcesContent":["import type { TConstValue } from '@/common/types';\nimport { type TPinoCustomLevelName } from './types';\n\n/** pino levels are ASCENDING severity (error 50 > warn 40 > info 30 > debug 20); `emerg`(70) extends above error. NORMATIVE - do not renumber without updating the spec. */\nexport const PINO_CUSTOM_LEVELS: Record<TPinoCustomLevelName, number> = {\n emerg: 70,\n};\n\n/** How often the file destination rolls (pino-roll's `frequency`). */\nexport class PinoFrequencies {\n static readonly HOURLY = 'hourly';\n static readonly DAILY = 'daily';\n\n static readonly SCHEME_SET = new Set<string>([this.HOURLY, this.DAILY]);\n\n static isValid(value: string): boolean {\n return this.SCHEME_SET.has(value);\n }\n}\n\n/** Valid pino roll frequency values. */\nexport type TFrequency = TConstValue<typeof PinoFrequencies>;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"destination.d.ts","sourceRoot":"","sources":["../../../../../src/modules/logger/pino/destination.ts"],"names":[],"mappings":"AAIA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,UAAU,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BAAiB,GAAG,SAAS;CAyBzE;AAID,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,KAAG,UAAiD,CAAC;AAEhG,eAAO,MAAM,kBAAkB,GAAI,MAAM;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,UAAU,CAAA;CAAE,KAAG,MAC3C,CAAC;AAE3C,eAAO,MAAM,sBAAsB,QAAO,gBAAiD,CAAC;AAE5F,eAAO,MAAM,gBAAgB,GAAI,MAAM,gBAAgB,KAAG,IAAI,CAAC,iBAAiB,GAAG,SACtD,CAAC"}
@@ -10,20 +10,21 @@ const module_utility_1 = require("../../../utilities/module.utility");
10
10
  const node_path_1 = __importDefault(require("node:path"));
11
11
  const pino_1 = __importDefault(require("pino"));
12
12
  const common_1 = require("../common");
13
+ const common_2 = require("./common");
13
14
  /** Reads `APP_ENV_LOGGER_*` and turns it into a destination. Warning prefixes name the operation, not the class - the tests and the published API still call these `mapFrequency`/`mapMaxFilesToCount`. */
14
15
  class PinoDestination {
15
- static { this.DEFAULT_FREQUENCY = 'hourly'; }
16
+ static { this.DEFAULT_FREQUENCY = common_2.PinoFrequencies.HOURLY; }
16
17
  static { this.DEFAULT_MAX_FILES = '5d'; }
17
18
  /** `APP_ENV_LOGGER_FILE_FREQUENCY` -> pino-roll's `frequency`; an unrecognized value warns and falls back rather than throwing, so the app still boots. */
18
19
  static mapFrequency(value) {
19
20
  const normalized = (value ?? '1h').trim().toLowerCase();
20
21
  switch (normalized) {
21
22
  case '1h': {
22
- return 'hourly';
23
+ return common_2.PinoFrequencies.HOURLY;
23
24
  }
24
25
  case '1d':
25
26
  case '24h': {
26
- return 'daily';
27
+ return common_2.PinoFrequencies.DAILY;
27
28
  }
28
29
  default: {
29
30
  console.warn('[mapFrequency] Invalid logger file frequency | value: %s | fallback: %s', value, PinoDestination.DEFAULT_FREQUENCY);
@@ -1 +1 @@
1
- {"version":3,"file":"destination.js","sourceRoot":"","sources":["../../../../../src/modules/logger/pino/dest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C,CAAC;gBAC/E,OAAO,cAAI,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;YACxE,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACR,OAAO,SAAS,CAAC;YACnB,CAAC;QACH,CAAC;IACH,CAAC;;AA9HH,0CA+HC;AAED,kGAAkG;AAClG,gEAAgE;AACzD,MAAM,YAAY,GAAG,CAAC,KAAc,EAAc,EAAE,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;AAAnF,QAAA,YAAY,gBAAuE;AAEzF,MAAM,kBAAkB,GAAG,CAAC,IAA+C,EAAU,EAAE,CAC5F,eAAe,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;AAD9B,QAAA,kBAAkB,sBACY;AAEpC,MAAM,sBAAsB,GAAG,GAAqB,EAAE,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC;AAA/E,QAAA,sBAAsB,0BAAyD;AAErF,MAAM,gBAAgB,GAAG,CAAC,IAAsB,EAAsC,EAAE,CAC7F,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AADjB,QAAA,gBAAgB,oBACC","sourcesContent":["import { Defaults } from '@/common/constants';\nimport { blankToUndefined } from '@/utilities/parse.utility';\nimport { ModuleUtility } from '@/utilities/module.utility';\nimport path from 'node:path';\nimport pino from 'pino';\nimport { LoggerFormats, resolveLoggerColorize } from '../common';\n\nimport { type TFrequency } from './common';\n\n/** Pure description of where pino should write, derived from env; `PinoDestination.build()` is the impure half that acts on it. */\nexport type TDestinationPlan =\n | { kind: 'stdout' }\n | { kind: 'pretty' }\n | {\n kind: 'roll';\n options: {\n file: string;\n frequency: TFrequency;\n size: string;\n limit: { count: number };\n mkdir: true;\n };\n };\n\n/** Reads `APP_ENV_LOGGER_*` and turns it into a destination. Warning prefixes name the operation, not the class - the tests and the published API still call these `mapFrequency`/`mapMaxFilesToCount`. */\nexport class PinoDestination {\n private static readonly DEFAULT_FREQUENCY: TFrequency = 'hourly';\n private static readonly DEFAULT_MAX_FILES = '5d';\n\n /** `APP_ENV_LOGGER_FILE_FREQUENCY` -> pino-roll's `frequency`; an unrecognized value warns and falls back rather than throwing, so the app still boots. */\n static mapFrequency(value?: string): TFrequency {\n const normalized = (value ?? '1h').trim().toLowerCase();\n\n switch (normalized) {\n case '1h': {\n return 'hourly';\n }\n case '1d':\n case '24h': {\n return 'daily';\n }\n default: {\n console.warn(\n '[mapFrequency] Invalid logger file frequency | value: %s | fallback: %s',\n value,\n PinoDestination.DEFAULT_FREQUENCY,\n );\n return PinoDestination.DEFAULT_FREQUENCY;\n }\n }\n }\n\n /** `null` means \"not a recognized shape\" - the caller decides what default to fall back to. */\n private static parseMaxFilesValue(value: string, frequency: TFrequency): number | null {\n const dayMatch = /^(\\d+)d$/i.exec(value);\n if (dayMatch) {\n const days = Number.parseInt(dayMatch[1], 10);\n return frequency === 'hourly' ? days * 24 : days;\n }\n\n const bareMatch = /^\\d+$/.exec(value);\n if (bareMatch) {\n return Number.parseInt(value, 10);\n }\n\n return null;\n }\n\n /** `APP_ENV_LOGGER_FILE_MAX_FILES` -> pino-roll's `limit.count`: `'<n>d'` scales by frequency (hourly: days*24), a bare integer is a literal count, unrecognized falls back to `'5d'`. */\n static mapMaxFilesToCount(opts: { value?: string; frequency: TFrequency }): number {\n const { value, frequency } = opts;\n const normalized = value?.trim();\n\n if (normalized) {\n const parsed = PinoDestination.parseMaxFilesValue(normalized, frequency);\n if (parsed !== null) {\n return parsed;\n }\n }\n\n // Unset is a normal configuration (mirror the sibling defaults) - only a PROVIDED value that failed to parse deserves a warning.\n if (normalized && normalized !== PinoDestination.DEFAULT_MAX_FILES) {\n console.warn(\n '[mapMaxFilesToCount] Invalid logger file max files value | value: %s | fallback: %s',\n value,\n PinoDestination.DEFAULT_MAX_FILES,\n );\n }\n\n return PinoDestination.parseMaxFilesValue(\n PinoDestination.DEFAULT_MAX_FILES,\n frequency,\n ) as number;\n }\n\n /** Pure: which destination pino should write to, derived from `APP_ENV_LOGGER_*` at CALL time. `DATE_PATTERN` is deliberately not read - pino-roll has no equivalent. */\n static resolvePlan(): TDestinationPlan {\n const folderPath = process.env.APP_ENV_LOGGER_FOLDER_PATH;\n\n if (folderPath && folderPath.trim() !== '') {\n const frequency = PinoDestination.mapFrequency(process.env.APP_ENV_LOGGER_FILE_FREQUENCY);\n const count = PinoDestination.mapMaxFilesToCount({\n value: process.env.APP_ENV_LOGGER_FILE_MAX_FILES,\n frequency,\n });\n\n return {\n kind: 'roll',\n options: {\n file: path.join(folderPath, Defaults.APPLICATION_NAME),\n frequency,\n size: blankToUndefined(process.env.APP_ENV_LOGGER_FILE_MAX_SIZE) ?? '100m',\n limit: { count },\n mkdir: true,\n },\n };\n }\n\n // UNSET means NDJSON to stdout, the locked default for this provider; only an EXPLICIT `text` opts into pino-pretty, and falling back to TEXT here (winston's default) would make the documented minimal install (pino only, no pino-pretty) crash on its first log line.\n if (process.env.APP_ENV_LOGGER_FORMAT === LoggerFormats.TEXT) {\n return { kind: 'pretty' };\n }\n\n return { kind: 'stdout' };\n }\n\n /** `pino.transport()` is SYNCHRONOUS - it returns a `ThreadStream` that BUFFERS writes until its worker thread loads, so no async gating is needed; `ModuleUtility.assertInstalled` runs first so a missing optional peer fails loudly here, not as an opaque worker-thread crash. */\n static build(plan: TDestinationPlan): pino.DestinationStream | undefined {\n switch (plan.kind) {\n case 'stdout': {\n return undefined;\n }\n case 'pretty': {\n ModuleUtility.assertInstalled({ scope: 'PinoLogger', modules: ['pino-pretty'] });\n\n // Only a decision is forwarded. Left alone, pino-pretty's own `isColorSupported` still\n // suppresses color when stdout is not a terminal - a check winston has no equivalent of.\n const colorize = resolveLoggerColorize();\n return pino.transport({\n target: 'pino-pretty',\n ...(colorize === undefined ? {} : { options: { colorize } }),\n });\n }\n case 'roll': {\n ModuleUtility.assertInstalled({ scope: 'PinoLogger', modules: ['pino-roll'] });\n return pino.transport({ target: 'pino-roll', options: plan.options });\n }\n default: {\n return undefined;\n }\n }\n }\n}\n\n// Published names, kept so `@venizia/ignis-helpers/pino` consumers do not have to move; the class\n// above is the implementation and the entry point for new code.\nexport const mapFrequency = (value?: string): TFrequency => PinoDestination.mapFrequency(value);\n\nexport const mapMaxFilesToCount = (opts: { value?: string; frequency: TFrequency }): number =>\n PinoDestination.mapMaxFilesToCount(opts);\n\nexport const resolveDestinationPlan = (): TDestinationPlan => PinoDestination.resolvePlan();\n\nexport const buildDestination = (plan: TDestinationPlan): pino.DestinationStream | undefined =>\n PinoDestination.build(plan);\n"]}
1
+ {"version":3,"file":"destination.js","sourceRoot":"","sources":["../../../../../src/modules/logger/pino/destination.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA8C;AAC9C,6DAA6D;AAC7D,+DAA2D;AAC3D,0DAA6B;AAC7B,gDAAwB;AACxB,sCAAiE;AAEjE,qCAA4D;AAiB5D,2MAA2M;AAC3M,MAAa,eAAe;aACF,sBAAiB,GAAe,wBAAe,CAAC,MAAM,CAAC;aACvD,sBAAiB,GAAG,IAAI,CAAC;IAEjD,2JAA2J;IAC3J,MAAM,CAAC,YAAY,CAAC,KAAc;QAChC,MAAM,UAAU,GAAG,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QAExD,QAAQ,UAAU,EAAE,CAAC;YACnB,KAAK,IAAI,CAAC,CAAC,CAAC;gBACV,OAAO,wBAAe,CAAC,MAAM,CAAC;YAChC,CAAC;YACD,KAAK,IAAI,CAAC;YACV,KAAK,KAAK,CAAC,CAAC,CAAC;gBACX,OAAO,wBAAe,CAAC,KAAK,CAAC;YAC/B,CAAC;YACD,OAAO,CAAC,CAAC,CAAC;gBACR,OAAO,CAAC,IAAI,CACV,yEAAyE,EACzE,KAAK,EACL,eAAe,CAAC,iBAAiB,CAClC,CAAC;gBACF,OAAO,eAAe,CAAC,iBAAiB,CAAC;YAC3C,CAAC;QACH,C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QAAA,gBAAgB,oBACC","sourcesContent":["import { Defaults } from '@/common/constants';\nimport { blankToUndefined } from '@/utilities/parse.utility';\nimport { ModuleUtility } from '@/utilities/module.utility';\nimport path from 'node:path';\nimport pino from 'pino';\nimport { LoggerFormats, resolveLoggerColorize } from '../common';\n\nimport { PinoFrequencies, type TFrequency } from './common';\n\n/** Pure description of where pino should write, derived from env; `PinoDestination.build()` is the impure half that acts on it. */\nexport type TDestinationPlan =\n | { kind: 'stdout' }\n | { kind: 'pretty' }\n | {\n kind: 'roll';\n options: {\n file: string;\n frequency: TFrequency;\n size: string;\n limit: { count: number };\n mkdir: true;\n };\n };\n\n/** Reads `APP_ENV_LOGGER_*` and turns it into a destination. Warning prefixes name the operation, not the class - the tests and the published API still call these `mapFrequency`/`mapMaxFilesToCount`. */\nexport class PinoDestination {\n private static readonly DEFAULT_FREQUENCY: TFrequency = PinoFrequencies.HOURLY;\n private static readonly DEFAULT_MAX_FILES = '5d';\n\n /** `APP_ENV_LOGGER_FILE_FREQUENCY` -> pino-roll's `frequency`; an unrecognized value warns and falls back rather than throwing, so the app still boots. */\n static mapFrequency(value?: string): TFrequency {\n const normalized = (value ?? '1h').trim().toLowerCase();\n\n switch (normalized) {\n case '1h': {\n return PinoFrequencies.HOURLY;\n }\n case '1d':\n case '24h': {\n return PinoFrequencies.DAILY;\n }\n default: {\n console.warn(\n '[mapFrequency] Invalid logger file frequency | value: %s | fallback: %s',\n value,\n PinoDestination.DEFAULT_FREQUENCY,\n );\n return PinoDestination.DEFAULT_FREQUENCY;\n }\n }\n }\n\n /** `null` means \"not a recognized shape\" - the caller decides what default to fall back to. */\n private static parseMaxFilesValue(value: string, frequency: TFrequency): number | null {\n const dayMatch = /^(\\d+)d$/i.exec(value);\n if (dayMatch) {\n const days = Number.parseInt(dayMatch[1], 10);\n return frequency === 'hourly' ? days * 24 : days;\n }\n\n const bareMatch = /^\\d+$/.exec(value);\n if (bareMatch) {\n return Number.parseInt(value, 10);\n }\n\n return null;\n }\n\n /** `APP_ENV_LOGGER_FILE_MAX_FILES` -> pino-roll's `limit.count`: `'<n>d'` scales by frequency (hourly: days*24), a bare integer is a literal count, unrecognized falls back to `'5d'`. */\n static mapMaxFilesToCount(opts: { value?: string; frequency: TFrequency }): number {\n const { value, frequency } = opts;\n const normalized = value?.trim();\n\n if (normalized) {\n const parsed = PinoDestination.parseMaxFilesValue(normalized, frequency);\n if (parsed !== null) {\n return parsed;\n }\n }\n\n // Unset is a normal configuration (mirror the sibling defaults) - only a PROVIDED value that failed to parse deserves a warning.\n if (normalized && normalized !== PinoDestination.DEFAULT_MAX_FILES) {\n console.warn(\n '[mapMaxFilesToCount] Invalid logger file max files value | value: %s | fallback: %s',\n value,\n PinoDestination.DEFAULT_MAX_FILES,\n );\n }\n\n return PinoDestination.parseMaxFilesValue(\n PinoDestination.DEFAULT_MAX_FILES,\n frequency,\n ) as number;\n }\n\n /** Pure: which destination pino should write to, derived from `APP_ENV_LOGGER_*` at CALL time. `DATE_PATTERN` is deliberately not read - pino-roll has no equivalent. */\n static resolvePlan(): TDestinationPlan {\n const folderPath = process.env.APP_ENV_LOGGER_FOLDER_PATH;\n\n if (folderPath && folderPath.trim() !== '') {\n const frequency = PinoDestination.mapFrequency(process.env.APP_ENV_LOGGER_FILE_FREQUENCY);\n const count = PinoDestination.mapMaxFilesToCount({\n value: process.env.APP_ENV_LOGGER_FILE_MAX_FILES,\n frequency,\n });\n\n return {\n kind: 'roll',\n options: {\n file: path.join(folderPath, Defaults.APPLICATION_NAME),\n frequency,\n size: blankToUndefined(process.env.APP_ENV_LOGGER_FILE_MAX_SIZE) ?? '100m',\n limit: { count },\n mkdir: true,\n },\n };\n }\n\n // UNSET means NDJSON to stdout, the locked default for this provider; only an EXPLICIT `text` opts into pino-pretty, and falling back to TEXT here (winston's default) would make the documented minimal install (pino only, no pino-pretty) crash on its first log line.\n if (process.env.APP_ENV_LOGGER_FORMAT === LoggerFormats.TEXT) {\n return { kind: 'pretty' };\n }\n\n return { kind: 'stdout' };\n }\n\n /** `pino.transport()` is SYNCHRONOUS - it returns a `ThreadStream` that BUFFERS writes until its worker thread loads, so no async gating is needed; `ModuleUtility.assertInstalled` runs first so a missing optional peer fails loudly here, not as an opaque worker-thread crash. */\n static build(plan: TDestinationPlan): pino.DestinationStream | undefined {\n switch (plan.kind) {\n case 'stdout': {\n return undefined;\n }\n case 'pretty': {\n ModuleUtility.assertInstalled({ scope: 'PinoLogger', modules: ['pino-pretty'] });\n\n // Only a decision is forwarded. Left alone, pino-pretty's own `isColorSupported` still\n // suppresses color when stdout is not a terminal - a check winston has no equivalent of.\n const colorize = resolveLoggerColorize();\n return pino.transport({\n target: 'pino-pretty',\n ...(colorize === undefined ? {} : { options: { colorize } }),\n });\n }\n case 'roll': {\n ModuleUtility.assertInstalled({ scope: 'PinoLogger', modules: ['pino-roll'] });\n return pino.transport({ target: 'pino-roll', options: plan.options });\n }\n default: {\n return undefined;\n }\n }\n }\n}\n\n// Published names, kept so `@venizia/ignis-helpers/pino` consumers do not have to move; the class\n// above is the implementation and the entry point for new code.\nexport const mapFrequency = (value?: string): TFrequency => PinoDestination.mapFrequency(value);\n\nexport const mapMaxFilesToCount = (opts: { value?: string; frequency: TFrequency }): number =>\n PinoDestination.mapMaxFilesToCount(opts);\n\nexport const resolveDestinationPlan = (): TDestinationPlan => PinoDestination.resolvePlan();\n\nexport const buildDestination = (plan: TDestinationPlan): pino.DestinationStream | undefined =>\n PinoDestination.build(plan);\n"]}
@@ -0,0 +1,11 @@
1
+ import type { TConstValue } from '../../../../common/types';
2
+ /** The HTTP clients a fetcher can be built on. */
3
+ export declare class FetcherVariants {
4
+ static readonly NODE_FETCH = "node-fetch";
5
+ static readonly AXIOS = "axios";
6
+ static readonly SCHEME_SET: Set<string>;
7
+ static isValid(value: string): boolean;
8
+ }
9
+ /** Valid fetcher variant values. */
10
+ export type TFetcherVariant = TConstValue<typeof FetcherVariants>;
11
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network/http-request/common/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,kDAAkD;AAClD,qBAAa,eAAe;IAC1B,MAAM,CAAC,QAAQ,CAAC,UAAU,gBAAgB;IAC1C,MAAM,CAAC,QAAQ,CAAC,KAAK,WAAW;IAEhC,MAAM,CAAC,QAAQ,CAAC,UAAU,cAAkD;IAE5E,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAGvC;AAED,oCAAoC;AACpC,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,OAAO,eAAe,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.FetcherVariants = void 0;
4
+ /** The HTTP clients a fetcher can be built on. */
5
+ class FetcherVariants {
6
+ static { this.NODE_FETCH = 'node-fetch'; }
7
+ static { this.AXIOS = 'axios'; }
8
+ static { this.SCHEME_SET = new Set([this.NODE_FETCH, this.AXIOS]); }
9
+ static isValid(value) {
10
+ return this.SCHEME_SET.has(value);
11
+ }
12
+ }
13
+ exports.FetcherVariants = FetcherVariants;
14
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../src/modules/network/http-request/common/constants.ts"],"names":[],"mappings":";;;AAEA,kDAAkD;AAClD,MAAa,eAAe;aACV,eAAU,GAAG,YAAY,CAAC;aAC1B,UAAK,GAAG,OAAO,CAAC;aAEhB,eAAU,GAAG,IAAI,GAAG,CAAS,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAE5E,MAAM,CAAC,OAAO,CAAC,KAAa;QAC1B,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IACpC,CAAC;;AARH,0CASC","sourcesContent":["import type { TConstValue } from '@/common/types';\n\n/** The HTTP clients a fetcher can be built on. */\nexport class FetcherVariants {\n static readonly NODE_FETCH = 'node-fetch';\n static readonly AXIOS = 'axios';\n\n static readonly SCHEME_SET = new Set<string>([this.NODE_FETCH, this.AXIOS]);\n\n static isValid(value: string): boolean {\n return this.SCHEME_SET.has(value);\n }\n}\n\n/** Valid fetcher variant values. */\nexport type TFetcherVariant = TConstValue<typeof FetcherVariants>;\n"]}
@@ -1,2 +1,3 @@
1
+ export * from './constants';
1
2
  export * from './types';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network/http-request/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network/http-request/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./constants"), exports);
17
18
  __exportStar(require("./types"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/network/http-request/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,0CAAwB","sourcesContent":["export * from './types';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/network/http-request/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,0CAAwB","sourcesContent":["export * from './constants';\nexport * from './types';\n"]}
@@ -1,2 +1,2 @@
1
- export type TFetcherVariant = 'node-fetch' | 'axios';
1
+ export {};
2
2
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network/http-request/common/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network/http-request/common/types.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/modules/network/http-request/common/types.ts"],"names":[],"mappings":"","sourcesContent":["export type TFetcherVariant = 'node-fetch' | 'axios';\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../src/modules/network/http-request/common/types.ts"],"names":[],"mappings":"","sourcesContent":[""]}