@lyxa.ai/core 1.2.96-beta.0 → 1.2.96-beta.2

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.
@@ -22,7 +22,7 @@ Perfect for sharing types between frontend and backend applications.
22
22
 
23
23
  ## Version
24
24
 
25
- Version: 1.2.96-beta.0
25
+ Version: 1.2.96-beta.2
26
26
 
27
27
  ## Dependencies
28
28
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/types",
3
- "version": "1.2.96-beta.0",
3
+ "version": "1.2.96-beta.2",
4
4
  "description": "Lyxa type definitions and validation schemas for both frontend and backend",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",
@@ -24,5 +24,9 @@ const _setTimezone = (timezone) => {
24
24
  DEFAULT_TIMEZONE = timezone;
25
25
  };
26
26
  exports._setTimezone = _setTimezone;
27
+ dayjsWithTimezone.setTimezone = (timezone) => {
28
+ DEFAULT_TIMEZONE = timezone;
29
+ };
30
+ dayjsWithTimezone.getTimezone = () => DEFAULT_TIMEZONE;
27
31
  exports.default = dayjsWithTimezone;
28
32
  //# sourceMappingURL=dayjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dayjs.js","sourceRoot":"/","sources":["utilities/dayjs/dayjs.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,2DAAmC;AACnC,qEAA6C;AAE7C,eAAK,CAAC,MAAM,CAAC,aAAG,CAAC,CAAC;AAClB,eAAK,CAAC,MAAM,CAAC,kBAAQ,CAAC,CAAC;AAEvB,IAAI,gBAAgB,GAAG,aAAa,CAAC;AAErC,MAAM,iBAAiB,GAAG,CAAC,IAAU,EAAE,MAAY,EAAE,EAAW,EAAE,EAAE;IAClE,MAAM,cAAc,GAAG,EAAE,IAAI,gBAAgB,CAAC;IAC9C,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,IAAA,eAAK,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,IAAA,eAAK,EAAC,IAAI,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,MAAM,CAAC,IAAI,CAAC,eAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;IAC9B,iBAAyB,CAAC,GAAG,CAAC,GAAI,eAAa,CAAC,GAAG,CAAC,CAAC;AACxD,CAAC,CAAC,CAAC;AAEI,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,EAAE;IAC/C,gBAAgB,GAAG,QAAQ,CAAC;AAC9B,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAEF,kBAAe,iBAAiB,CAAC","sourcesContent":["import dayjs from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\nimport timezone from 'dayjs/plugin/timezone';\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\n\nlet DEFAULT_TIMEZONE = 'Asia/Beirut';\n\nconst dayjsWithTimezone = (date?: any, format?: any, tz?: string) => {\n const targetTimezone = tz || DEFAULT_TIMEZONE;\n if (format) {\n return dayjs(date, format).tz(targetTimezone);\n }\n return dayjs(date).tz(targetTimezone);\n};\n\nObject.keys(dayjs).forEach(key => {\n (dayjsWithTimezone as any)[key] = (dayjs as any)[key];\n});\n\nexport const _setTimezone = (timezone: string) => {\n DEFAULT_TIMEZONE = timezone;\n};\n\nexport default dayjsWithTimezone;"]}
1
+ {"version":3,"file":"dayjs.js","sourceRoot":"/","sources":["utilities/dayjs/dayjs.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAqC;AACrC,2DAAmC;AACnC,qEAA6C;AAE7C,eAAK,CAAC,MAAM,CAAC,aAAG,CAAC,CAAC;AAClB,eAAK,CAAC,MAAM,CAAC,kBAAQ,CAAC,CAAC;AAEvB,IAAI,gBAAgB,GAAG,aAAa,CAAC;AASrC,MAAM,iBAAiB,GAAG,CAAC,IAAU,EAAE,MAAY,EAAE,EAAW,EAAE,EAAE;IAClE,MAAM,cAAc,GAAG,EAAE,IAAI,gBAAgB,CAAC;IAC9C,IAAI,MAAM,EAAE,CAAC;QACX,OAAO,IAAA,eAAK,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC;IAChD,CAAC;IACD,OAAO,IAAA,eAAK,EAAC,IAAI,CAAC,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,MAAM,CAAC,IAAI,CAAC,eAAK,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;IAC9B,iBAAyB,CAAC,GAAG,CAAC,GAAI,eAAa,CAAC,GAAG,CAAC,CAAC;AACxD,CAAC,CAAC,CAAC;AAEI,MAAM,YAAY,GAAG,CAAC,QAAgB,EAAE,EAAE;IAC/C,gBAAgB,GAAG,QAAQ,CAAC;AAC9B,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAED,iBAAyB,CAAC,WAAW,GAAG,CAAC,QAAgB,EAAE,EAAE;IAC5D,gBAAgB,GAAG,QAAQ,CAAC;AAC9B,CAAC,CAAC;AAED,iBAAyB,CAAC,WAAW,GAAG,GAAG,EAAE,CAAC,gBAAgB,CAAC;AAEhE,kBAAe,iBAAiB,CAAC","sourcesContent":["import dayjs, { Dayjs } from 'dayjs';\nimport utc from 'dayjs/plugin/utc';\nimport timezone from 'dayjs/plugin/timezone';\n\ndayjs.extend(utc);\ndayjs.extend(timezone);\n\nlet DEFAULT_TIMEZONE = 'Asia/Beirut';\n\ninterface DayjsWithTimezone {\n (date?: any, format?: any, tz?: string): Dayjs;\n setTimezone: (timezone: string) => void;\n getTimezone: () => string;\n [key: string]: any;\n}\n\nconst dayjsWithTimezone = (date?: any, format?: any, tz?: string) => {\n const targetTimezone = tz || DEFAULT_TIMEZONE;\n if (format) {\n return dayjs(date, format).tz(targetTimezone);\n }\n return dayjs(date).tz(targetTimezone);\n};\n\nObject.keys(dayjs).forEach(key => {\n (dayjsWithTimezone as any)[key] = (dayjs as any)[key];\n});\n\nexport const _setTimezone = (timezone: string) => {\n DEFAULT_TIMEZONE = timezone;\n};\n\n(dayjsWithTimezone as any).setTimezone = (timezone: string) => {\n DEFAULT_TIMEZONE = timezone;\n};\n\n(dayjsWithTimezone as any).getTimezone = () => DEFAULT_TIMEZONE;\n\nexport default dayjsWithTimezone;"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyxa.ai/core",
3
- "version": "1.2.96-beta.0",
3
+ "version": "1.2.96-beta.2",
4
4
  "description": "The Core system of the Lyxa services.",
5
5
  "author": "elie <42282499+Internalizable@users.noreply.github.com>",
6
6
  "license": "MIT",