@teacinema/common 1.1.3 → 1.1.4

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.
@@ -1 +1,2 @@
1
1
  export * from './convert-enum';
2
+ export * from './timestamp-to-iso';
@@ -15,3 +15,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./convert-enum"), exports);
18
+ __exportStar(require("./timestamp-to-iso"), exports);
@@ -0,0 +1,2 @@
1
+ import { Timestamp } from '@teacinema/contracts/gen/ts/google/protobuf/timestamp';
2
+ export declare function timestampToISO(ts: Timestamp): string | null;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.timestampToISO = timestampToISO;
4
+ function timestampToISO(ts) {
5
+ return new Date(ts.seconds * 1000 + ts.nanos / 1_000_000).toISOString();
6
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teacinema/common",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Core shared components for TeaCinema microservice ecosystem",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",