@sui-tracker/shared 1.0.44 → 1.0.46

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.
@@ -0,0 +1 @@
1
+ export declare function formatToPostgresTimestamp(date: Date): string;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatToPostgresTimestamp = formatToPostgresTimestamp;
4
+ function formatToPostgresTimestamp(date) {
5
+ const iso = date.toISOString();
6
+ const [datePart, timePartRaw] = iso.split('T');
7
+ const [timePart, millis] = timePartRaw.split('.');
8
+ const timeWithMillis = `${timePart}.${millis.slice(0, 3)}000`;
9
+ console.log(date.toString(), `${datePart} ${timeWithMillis} +00:00`);
10
+ return `${datePart} ${timeWithMillis} +00:00`;
11
+ }
12
+ //# sourceMappingURL=date.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"date.js","sourceRoot":"","sources":["../../src/utils/date.ts"],"names":[],"mappings":";;AAAA,8DASG;AATH,SAAgB,yBAAyB,CAAC,IAAU;IAChD,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;IAC/B,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/C,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAClD,MAAM,cAAc,GAAG,GAAG,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC;IAE9D,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,GAAG,QAAQ,IAAI,cAAc,SAAS,CAAC,CAAA;IAEpE,OAAO,GAAG,QAAQ,IAAI,cAAc,SAAS,CAAC;AAChD,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from './common';
2
2
  export * from './number';
3
+ export * from './date';
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./common"), exports);
18
18
  __exportStar(require("./number"), exports);
19
+ __exportStar(require("./date"), exports);
19
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,2CAAyB;AACzB,yCAAuB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sui-tracker/shared",
3
- "version": "1.0.44",
3
+ "version": "1.0.46",
4
4
  "description": "Shared types and utilities for Sui Tracker",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",