@decaf-ts/utils 0.2.7 → 0.2.8

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 (149) hide show
  1. package/LICENSE.md +0 -0
  2. package/README.md +0 -0
  3. package/bin/build-scripts.cjs +507 -67
  4. package/bin/tag-release.cjs +505 -67
  5. package/bin/tag-release.sh +0 -0
  6. package/bin/update-scripts.cjs +505 -67
  7. package/dist/assets/slogans.json +0 -0
  8. package/dist/utils.cjs +8 -150
  9. package/dist/utils.esm.cjs +4 -145
  10. package/lib/assets/slogans.json +0 -0
  11. package/lib/bin/build-scripts.d.ts +0 -0
  12. package/lib/bin/tag-release.d.ts +0 -0
  13. package/lib/bin/update-scripts.d.ts +0 -0
  14. package/lib/cli/command.cjs +0 -0
  15. package/lib/cli/command.d.ts +0 -0
  16. package/lib/cli/commands/build-scripts.cjs +3 -1
  17. package/lib/cli/commands/build-scripts.d.ts +0 -0
  18. package/lib/cli/commands/index.cjs +0 -0
  19. package/lib/cli/commands/index.d.ts +0 -0
  20. package/lib/cli/commands/tag-release.cjs +0 -0
  21. package/lib/cli/commands/tag-release.d.ts +0 -0
  22. package/lib/cli/commands/update-scripts.cjs +0 -0
  23. package/lib/cli/commands/update-scripts.d.ts +0 -0
  24. package/lib/cli/constants.cjs +0 -0
  25. package/lib/cli/constants.d.ts +0 -0
  26. package/lib/cli/index.cjs +0 -0
  27. package/lib/cli/index.d.ts +0 -0
  28. package/lib/cli/types.cjs +0 -0
  29. package/lib/cli/types.d.ts +0 -0
  30. package/lib/esm/assets/slogans.json +0 -0
  31. package/lib/esm/bin/build-scripts.d.ts +0 -0
  32. package/lib/esm/bin/build-scripts.js +0 -0
  33. package/lib/esm/bin/tag-release.d.ts +0 -0
  34. package/lib/esm/bin/tag-release.js +0 -0
  35. package/lib/esm/bin/update-scripts.d.ts +0 -0
  36. package/lib/esm/bin/update-scripts.js +0 -0
  37. package/lib/esm/cli/command.d.ts +0 -0
  38. package/lib/esm/cli/command.js +0 -0
  39. package/lib/esm/cli/commands/build-scripts.d.ts +0 -0
  40. package/lib/esm/cli/commands/build-scripts.js +3 -1
  41. package/lib/esm/cli/commands/index.d.ts +0 -0
  42. package/lib/esm/cli/commands/index.js +0 -0
  43. package/lib/esm/cli/commands/tag-release.d.ts +0 -0
  44. package/lib/esm/cli/commands/tag-release.js +0 -0
  45. package/lib/esm/cli/commands/update-scripts.d.ts +0 -0
  46. package/lib/esm/cli/commands/update-scripts.js +0 -0
  47. package/lib/esm/cli/constants.d.ts +0 -0
  48. package/lib/esm/cli/constants.js +0 -0
  49. package/lib/esm/cli/index.d.ts +0 -0
  50. package/lib/esm/cli/index.js +0 -0
  51. package/lib/esm/cli/types.d.ts +0 -0
  52. package/lib/esm/cli/types.js +0 -0
  53. package/lib/esm/index.d.ts +0 -0
  54. package/lib/esm/index.js +0 -0
  55. package/lib/esm/input/index.d.ts +0 -0
  56. package/lib/esm/input/index.js +0 -0
  57. package/lib/esm/input/input.d.ts +0 -0
  58. package/lib/esm/input/input.js +0 -0
  59. package/lib/esm/input/types.d.ts +0 -0
  60. package/lib/esm/input/types.js +0 -0
  61. package/lib/esm/output/common.d.ts +0 -0
  62. package/lib/esm/output/common.js +0 -0
  63. package/lib/esm/output/index.d.ts +0 -0
  64. package/lib/esm/output/index.js +0 -0
  65. package/lib/esm/utils/constants.d.ts +0 -0
  66. package/lib/esm/utils/constants.js +0 -0
  67. package/lib/esm/utils/environment.d.ts +1 -1
  68. package/lib/esm/utils/environment.js +2 -2
  69. package/lib/esm/utils/fs.d.ts +0 -0
  70. package/lib/esm/utils/fs.js +0 -0
  71. package/lib/esm/utils/http.d.ts +0 -0
  72. package/lib/esm/utils/http.js +0 -0
  73. package/lib/esm/utils/index.d.ts +0 -0
  74. package/lib/esm/utils/index.js +0 -0
  75. package/lib/esm/utils/md.d.ts +0 -0
  76. package/lib/esm/utils/md.js +0 -0
  77. package/lib/esm/utils/tests.d.ts +0 -0
  78. package/lib/esm/utils/tests.js +0 -0
  79. package/lib/esm/utils/text.d.ts +0 -0
  80. package/lib/esm/utils/text.js +0 -0
  81. package/lib/esm/utils/timeout.d.ts +0 -0
  82. package/lib/esm/utils/timeout.js +0 -0
  83. package/lib/esm/utils/types.d.ts +0 -0
  84. package/lib/esm/utils/types.js +0 -0
  85. package/lib/esm/utils/utils.d.ts +0 -0
  86. package/lib/esm/utils/utils.js +0 -0
  87. package/lib/esm/utils/web.d.ts +0 -0
  88. package/lib/esm/utils/web.js +0 -0
  89. package/lib/esm/writers/OutputWriter.d.ts +0 -0
  90. package/lib/esm/writers/OutputWriter.js +0 -0
  91. package/lib/esm/writers/RegexpOutputWriter.d.ts +0 -0
  92. package/lib/esm/writers/RegexpOutputWriter.js +0 -0
  93. package/lib/esm/writers/StandardOutputWriter.d.ts +0 -0
  94. package/lib/esm/writers/StandardOutputWriter.js +0 -0
  95. package/lib/esm/writers/index.d.ts +0 -0
  96. package/lib/esm/writers/index.js +0 -0
  97. package/lib/esm/writers/types.d.ts +0 -0
  98. package/lib/esm/writers/types.js +0 -0
  99. package/lib/index.cjs +0 -0
  100. package/lib/index.d.ts +0 -0
  101. package/lib/input/index.cjs +0 -0
  102. package/lib/input/index.d.ts +0 -0
  103. package/lib/input/input.cjs +0 -0
  104. package/lib/input/input.d.ts +0 -0
  105. package/lib/input/types.cjs +0 -0
  106. package/lib/input/types.d.ts +0 -0
  107. package/lib/output/common.cjs +0 -0
  108. package/lib/output/common.d.ts +0 -0
  109. package/lib/output/index.cjs +0 -0
  110. package/lib/output/index.d.ts +0 -0
  111. package/lib/utils/constants.cjs +0 -0
  112. package/lib/utils/constants.d.ts +0 -0
  113. package/lib/utils/environment.cjs +3 -3
  114. package/lib/utils/environment.d.ts +1 -1
  115. package/lib/utils/fs.cjs +0 -0
  116. package/lib/utils/fs.d.ts +0 -0
  117. package/lib/utils/http.cjs +0 -0
  118. package/lib/utils/http.d.ts +0 -0
  119. package/lib/utils/index.cjs +0 -0
  120. package/lib/utils/index.d.ts +0 -0
  121. package/lib/utils/md.cjs +0 -0
  122. package/lib/utils/md.d.ts +0 -0
  123. package/lib/utils/tests.cjs +0 -0
  124. package/lib/utils/tests.d.ts +0 -0
  125. package/lib/utils/text.cjs +0 -0
  126. package/lib/utils/text.d.ts +0 -0
  127. package/lib/utils/timeout.cjs +0 -0
  128. package/lib/utils/timeout.d.ts +0 -0
  129. package/lib/utils/types.cjs +0 -0
  130. package/lib/utils/types.d.ts +0 -0
  131. package/lib/utils/utils.cjs +0 -0
  132. package/lib/utils/utils.d.ts +0 -0
  133. package/lib/utils/web.cjs +0 -0
  134. package/lib/utils/web.d.ts +0 -0
  135. package/lib/writers/OutputWriter.cjs +0 -0
  136. package/lib/writers/OutputWriter.d.ts +0 -0
  137. package/lib/writers/RegexpOutputWriter.cjs +0 -0
  138. package/lib/writers/RegexpOutputWriter.d.ts +0 -0
  139. package/lib/writers/StandardOutputWriter.cjs +0 -0
  140. package/lib/writers/StandardOutputWriter.d.ts +0 -0
  141. package/lib/writers/index.cjs +0 -0
  142. package/lib/writers/index.d.ts +0 -0
  143. package/lib/writers/types.cjs +0 -0
  144. package/lib/writers/types.d.ts +0 -0
  145. package/package.json +3 -2
  146. package/lib/esm/utils/accumulator.d.ts +0 -105
  147. package/lib/esm/utils/accumulator.js +0 -144
  148. package/lib/utils/accumulator.cjs +0 -148
  149. package/lib/utils/accumulator.d.ts +0 -105
@@ -1,105 +0,0 @@
1
- /**
2
- * @class ObjectAccumulator
3
- * @template T - The type of the accumulated object, extends object
4
- * @description A class that accumulates objects and provides type-safe access to their properties.
5
- * It allows for dynamic addition of properties while maintaining type information.
6
- * @summary Accumulates objects and maintains type information for accumulated properties
7
- * @memberOf utils
8
- */
9
- export declare class ObjectAccumulator<T extends object> {
10
- /**
11
- * @private
12
- * @description The size of the accumulated object
13
- * @type {number}
14
- */
15
- private __size;
16
- constructor();
17
- /**
18
- * @protected
19
- * @description Expands the accumulator with properties from a new object
20
- * @summary Adds new properties to the accumulator
21
- * @template V - The type of the object being expanded
22
- * @param {V} value - The object to expand with
23
- * @returns {void}
24
- */
25
- protected expand<V extends object>(value: V): void;
26
- /**
27
- * @description Accumulates a new object into the accumulator
28
- * @summary Adds properties from a new object to the accumulator, maintaining type information
29
- * @template V - The type of the object being accumulated
30
- * @param {V} value - The object to accumulate
31
- * @returns A new ObjectAccumulator instance with updated type information
32
- * @mermaid
33
- * sequenceDiagram
34
- * participant A as Accumulator
35
- * participant O as Object
36
- * A->>O: Get entries
37
- * loop For each entry
38
- * A->>A: Define property
39
- * end
40
- * A->>A: Update size
41
- * A->>A: Return updated accumulator
42
- */
43
- accumulate<V extends object>(value: V): T & V & ObjectAccumulator<T & V>;
44
- /**
45
- * @description Retrieves a value from the accumulator by its key
46
- * @summary Gets a value from the accumulated object using a type-safe key
47
- * @template K - The key type, must be a key of this
48
- * @param {K} key - The key of the value to retrieve
49
- * @returns {any | undefined} The value associated with the key, or undefined if not found
50
- */
51
- get<K extends keyof this>(key: K): this[K] | undefined;
52
- /**
53
- * @description Checks if a key exists in the accumulator
54
- * @summary Determines whether the accumulator contains a specific key
55
- * @param {string} key - The key to check for existence
56
- * @returns {boolean} True if the key exists, false otherwise
57
- */
58
- has(key: string): boolean;
59
- /**
60
- * @description Removes a key-value pair from the accumulator
61
- * @summary Deletes a property from the accumulated object
62
- * @param {string} key - The key of the property to remove
63
- * @returns {} The accumulator instance with the specified property removed
64
- */
65
- remove(key: keyof this | string): (Omit<this, typeof key> & ObjectAccumulator<Omit<this, typeof key>>) | this;
66
- /**
67
- * @description Retrieves all keys from the accumulator
68
- * @summary Gets an array of all accumulated property keys
69
- * @returns {string[]} An array of keys as strings
70
- */
71
- keys(): string[];
72
- /**
73
- * @description Retrieves all values from the accumulator
74
- * @summary Gets an array of all accumulated property values
75
- * @returns An array of values
76
- */
77
- values(): T[keyof T][];
78
- /**
79
- * @description Gets the number of key-value pairs in the accumulator
80
- * @summary Returns the count of accumulated properties
81
- * @returns {number} The number of key-value pairs
82
- */
83
- size(): number;
84
- /**
85
- * @description Clears all accumulated key-value pairs
86
- * @summary Removes all properties from the accumulator and returns a new empty instance
87
- * @returns {ObjectAccumulator<never>} A new empty ObjectAccumulator instance
88
- */
89
- clear(): ObjectAccumulator<never>;
90
- /**
91
- * @description Executes a callback for each key-value pair in the accumulator
92
- * @summary Iterates over all accumulated properties, calling a function for each
93
- * @param {function(any, string, number): void} callback - The function to execute for each entry
94
- * @returns {void}
95
- */
96
- forEach(callback: (value: this[keyof this], key: keyof this, i: number) => void): void;
97
- /**
98
- * @description Creates a new array with the results of calling a provided function on every element in the accumulator
99
- * @summary Maps each accumulated property to a new value using a callback function
100
- * @template R - The type of the mapped values
101
- * @param {function(any, string,number): R} callback - Function that produces an element of the new array
102
- * @returns {R[]} A new array with each element being the result of the callback function
103
- */
104
- map<R>(callback: (value: this[keyof this], key: keyof this, i: number) => R): R[];
105
- }