@ccci/micro-server 1.0.166 → 1.0.167

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -303124,6 +303124,15 @@ var encrypt = (salt, text) => {
303124
303124
  const applySaltToChar = (code) => textToChars(salt).reduce((acc, charCode) => acc ^ charCode, code);
303125
303125
  return Array.from(text).map((char) => char.charCodeAt(0)).map(applySaltToChar).map(byteHex).join("");
303126
303126
  };
303127
+ var getCurrentWeek = () => {
303128
+ const now = new Date;
303129
+ const startOfWeek = new Date(now.setDate(now.getDate() - now.getDay() + 1));
303130
+ startOfWeek.setHours(0, 0, 0, 0);
303131
+ const endOfWeek = new Date(startOfWeek);
303132
+ endOfWeek.setDate(startOfWeek.getDate() + 6);
303133
+ endOfWeek.setHours(23, 59, 59, 999);
303134
+ return { startOfWeek, endOfWeek };
303135
+ };
303127
303136
 
303128
303137
  // src/utils/uploader-s3.ts
303129
303138
  class UploaderS3 {
@@ -304195,6 +304204,7 @@ class BaseAuthenticatorModel extends BaseModel {
304195
304204
  export {
304196
304205
  verify,
304197
304206
  getMimeType,
304207
+ getCurrentWeek,
304198
304208
  generate,
304199
304209
  extractIds,
304200
304210
  endpoint,
@@ -24,4 +24,16 @@ export declare const decrypt: (salt: string, encoded: string) => string;
24
24
  * @returns The encrypted string in hexadecimal format.
25
25
  */
26
26
  export declare const encrypt: (salt: string, text: string) => string;
27
+ /**
28
+ * Returns the start and end dates of the current week.
29
+ * The week starts on Monday (00:00:00.000) and ends on Sunday (23:59:59.999).
30
+ *
31
+ * @returns An object containing:
32
+ * - `startOfWeek`: Date representing the beginning of the current week (Monday at midnight).
33
+ * - `endOfWeek`: Date representing the end of the current week (Sunday at 23:59:59.999).
34
+ */
35
+ export declare const getCurrentWeek: () => {
36
+ startOfWeek: Date;
37
+ endOfWeek: Date;
38
+ };
27
39
  //# sourceMappingURL=Mixins.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ccci/micro-server",
3
- "version": "1.0.166",
3
+ "version": "1.0.167",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",