@kekkle/shared 2.0.0-next.4 → 2.0.0-next.6
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/cjs/convertors/node/comment-document.converter.d.ts.map +1 -1
- package/dist/cjs/convertors/node/comment-document.converter.js +10 -6
- package/dist/cjs/convertors/web/comment-document.converter.d.ts.map +1 -1
- package/dist/cjs/convertors/web/comment-document.converter.js +10 -6
- package/dist/cjs/types/fields/comment/comment.d.ts +1 -1
- package/dist/cjs/types/fields/comment/comment.d.ts.map +1 -1
- package/dist/cjs/types/fields/comment/node/comment-firestore.d.ts +1 -1
- package/dist/cjs/types/fields/comment/node/comment-firestore.d.ts.map +1 -1
- package/dist/cjs/types/fields/comment/web/comment-firestore.d.ts +1 -1
- package/dist/cjs/types/fields/comment/web/comment-firestore.d.ts.map +1 -1
- package/dist/esm/convertors/node/comment-document.converter.d.ts.map +1 -1
- package/dist/esm/convertors/node/comment-document.converter.js +10 -6
- package/dist/esm/convertors/web/comment-document.converter.d.ts.map +1 -1
- package/dist/esm/convertors/web/comment-document.converter.js +10 -6
- package/dist/esm/types/fields/comment/comment.d.ts +1 -1
- package/dist/esm/types/fields/comment/comment.d.ts.map +1 -1
- package/dist/esm/types/fields/comment/node/comment-firestore.d.ts +1 -1
- package/dist/esm/types/fields/comment/node/comment-firestore.d.ts.map +1 -1
- package/dist/esm/types/fields/comment/web/comment-firestore.d.ts +1 -1
- package/dist/esm/types/fields/comment/web/comment-firestore.d.ts.map +1 -1
- package/dist/node/convertors/node/comment-document.converter.d.ts.map +1 -1
- package/dist/node/convertors/node/comment-document.converter.js +10 -6
- package/dist/node/convertors/web/comment-document.converter.d.ts.map +1 -1
- package/dist/node/convertors/web/comment-document.converter.js +10 -6
- package/dist/node/types/fields/comment/comment.d.ts +1 -1
- package/dist/node/types/fields/comment/comment.d.ts.map +1 -1
- package/dist/node/types/fields/comment/node/comment-firestore.d.ts +1 -1
- package/dist/node/types/fields/comment/node/comment-firestore.d.ts.map +1 -1
- package/dist/node/types/fields/comment/web/comment-firestore.d.ts +1 -1
- package/dist/node/types/fields/comment/web/comment-firestore.d.ts.map +1 -1
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/dist/tsconfig.node.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/node/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/node/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AA6EjE,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC"}
|
|
@@ -18,12 +18,14 @@ const createCommentDocumentConverter = () => ({
|
|
|
18
18
|
const { _id, affected_field, ...comments } = doc;
|
|
19
19
|
const convertedComments = {};
|
|
20
20
|
for (const [key, value] of Object.entries(comments)) {
|
|
21
|
-
if (typeof value === "object" &&
|
|
21
|
+
if (typeof value === "object" &&
|
|
22
|
+
value !== null &&
|
|
23
|
+
"created_at" in value) {
|
|
22
24
|
convertedComments[key] = {
|
|
23
25
|
...value,
|
|
24
|
-
|
|
25
|
-
? firestore_1.Timestamp.fromDate(value.
|
|
26
|
-
: value.
|
|
26
|
+
created_at: value.created_at instanceof Date
|
|
27
|
+
? firestore_1.Timestamp.fromDate(value.created_at)
|
|
28
|
+
: value.created_at, // FieldValue, Timestamp, or undefined passes through
|
|
27
29
|
};
|
|
28
30
|
}
|
|
29
31
|
}
|
|
@@ -42,11 +44,13 @@ const createCommentDocumentConverter = () => ({
|
|
|
42
44
|
const { affected_field, ...comments } = data;
|
|
43
45
|
const convertedComments = {};
|
|
44
46
|
for (const [key, value] of Object.entries(comments)) {
|
|
45
|
-
if (typeof value === "object" &&
|
|
47
|
+
if (typeof value === "object" &&
|
|
48
|
+
value !== null &&
|
|
49
|
+
"created_at" in value) {
|
|
46
50
|
convertedComments[key] = {
|
|
47
51
|
author: value.author,
|
|
48
52
|
comment: value.comment,
|
|
49
|
-
|
|
53
|
+
created_at: value.created_at.toDate(),
|
|
50
54
|
};
|
|
51
55
|
}
|
|
52
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/web/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/web/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,oBAAoB,CAAC;AAoF5B,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC"}
|
|
@@ -18,12 +18,14 @@ const createCommentDocumentConverter = () => ({
|
|
|
18
18
|
const { _id, affected_field, ...comments } = doc;
|
|
19
19
|
const convertedComments = {};
|
|
20
20
|
for (const [key, value] of Object.entries(comments)) {
|
|
21
|
-
if (typeof value === "object" &&
|
|
21
|
+
if (typeof value === "object" &&
|
|
22
|
+
value !== null &&
|
|
23
|
+
"created_at" in value) {
|
|
22
24
|
convertedComments[key] = {
|
|
23
25
|
...value,
|
|
24
|
-
|
|
25
|
-
? firestore_1.Timestamp.fromDate(value.
|
|
26
|
-
: value.
|
|
26
|
+
created_at: value.created_at instanceof Date
|
|
27
|
+
? firestore_1.Timestamp.fromDate(value.created_at)
|
|
28
|
+
: value.created_at, // FieldValue, Timestamp, or undefined passes through
|
|
27
29
|
};
|
|
28
30
|
}
|
|
29
31
|
}
|
|
@@ -42,11 +44,13 @@ const createCommentDocumentConverter = () => ({
|
|
|
42
44
|
const { affected_field, ...comments } = data;
|
|
43
45
|
const convertedComments = {};
|
|
44
46
|
for (const [key, value] of Object.entries(comments)) {
|
|
45
|
-
if (typeof value === "object" &&
|
|
47
|
+
if (typeof value === "object" &&
|
|
48
|
+
value !== null &&
|
|
49
|
+
"created_at" in value) {
|
|
46
50
|
convertedComments[key] = {
|
|
47
51
|
author: value.author,
|
|
48
52
|
comment: value.comment,
|
|
49
|
-
|
|
53
|
+
created_at: value.created_at.toDate(),
|
|
50
54
|
};
|
|
51
55
|
}
|
|
52
56
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../../src/types/fields/comment/comment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,
|
|
1
|
+
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../../src/types/fields/comment/comment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC"}
|
|
@@ -5,7 +5,7 @@ import type { CommentFirestoreBase } from "../../../../types/fields/comment/comm
|
|
|
5
5
|
* Uses Timestamp from firebase-admin/firestore
|
|
6
6
|
*/
|
|
7
7
|
export type CommentFirestore = CommentFirestoreBase & {
|
|
8
|
-
|
|
8
|
+
created_at: Timestamp;
|
|
9
9
|
};
|
|
10
10
|
export type PhotoCommentFirestore = CommentFirestore;
|
|
11
11
|
export type QuoteCommentFirestore = CommentFirestore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/node/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,
|
|
1
|
+
{"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/node/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
|
|
@@ -5,7 +5,7 @@ import type { CommentFirestoreBase } from "../../../../types/fields/comment/comm
|
|
|
5
5
|
* Uses Timestamp from firebase/firestore
|
|
6
6
|
*/
|
|
7
7
|
export type CommentFirestore = CommentFirestoreBase & {
|
|
8
|
-
|
|
8
|
+
created_at: Timestamp;
|
|
9
9
|
};
|
|
10
10
|
export type PhotoCommentFirestore = CommentFirestore;
|
|
11
11
|
export type QuoteCommentFirestore = CommentFirestore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/web/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,
|
|
1
|
+
{"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/web/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/node/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/node/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AA6EjE,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC"}
|
|
@@ -15,12 +15,14 @@ const createCommentDocumentConverter = () => ({
|
|
|
15
15
|
const { _id, affected_field, ...comments } = doc;
|
|
16
16
|
const convertedComments = {};
|
|
17
17
|
for (const [key, value] of Object.entries(comments)) {
|
|
18
|
-
if (typeof value === "object" &&
|
|
18
|
+
if (typeof value === "object" &&
|
|
19
|
+
value !== null &&
|
|
20
|
+
"created_at" in value) {
|
|
19
21
|
convertedComments[key] = {
|
|
20
22
|
...value,
|
|
21
|
-
|
|
22
|
-
? Timestamp.fromDate(value.
|
|
23
|
-
: value.
|
|
23
|
+
created_at: value.created_at instanceof Date
|
|
24
|
+
? Timestamp.fromDate(value.created_at)
|
|
25
|
+
: value.created_at, // FieldValue, Timestamp, or undefined passes through
|
|
24
26
|
};
|
|
25
27
|
}
|
|
26
28
|
}
|
|
@@ -39,11 +41,13 @@ const createCommentDocumentConverter = () => ({
|
|
|
39
41
|
const { affected_field, ...comments } = data;
|
|
40
42
|
const convertedComments = {};
|
|
41
43
|
for (const [key, value] of Object.entries(comments)) {
|
|
42
|
-
if (typeof value === "object" &&
|
|
44
|
+
if (typeof value === "object" &&
|
|
45
|
+
value !== null &&
|
|
46
|
+
"created_at" in value) {
|
|
43
47
|
convertedComments[key] = {
|
|
44
48
|
author: value.author,
|
|
45
49
|
comment: value.comment,
|
|
46
|
-
|
|
50
|
+
created_at: value.created_at.toDate(),
|
|
47
51
|
};
|
|
48
52
|
}
|
|
49
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/web/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/web/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,oBAAoB,CAAC;AAoF5B,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC"}
|
|
@@ -15,12 +15,14 @@ const createCommentDocumentConverter = () => ({
|
|
|
15
15
|
const { _id, affected_field, ...comments } = doc;
|
|
16
16
|
const convertedComments = {};
|
|
17
17
|
for (const [key, value] of Object.entries(comments)) {
|
|
18
|
-
if (typeof value === "object" &&
|
|
18
|
+
if (typeof value === "object" &&
|
|
19
|
+
value !== null &&
|
|
20
|
+
"created_at" in value) {
|
|
19
21
|
convertedComments[key] = {
|
|
20
22
|
...value,
|
|
21
|
-
|
|
22
|
-
? Timestamp.fromDate(value.
|
|
23
|
-
: value.
|
|
23
|
+
created_at: value.created_at instanceof Date
|
|
24
|
+
? Timestamp.fromDate(value.created_at)
|
|
25
|
+
: value.created_at, // FieldValue, Timestamp, or undefined passes through
|
|
24
26
|
};
|
|
25
27
|
}
|
|
26
28
|
}
|
|
@@ -39,11 +41,13 @@ const createCommentDocumentConverter = () => ({
|
|
|
39
41
|
const { affected_field, ...comments } = data;
|
|
40
42
|
const convertedComments = {};
|
|
41
43
|
for (const [key, value] of Object.entries(comments)) {
|
|
42
|
-
if (typeof value === "object" &&
|
|
44
|
+
if (typeof value === "object" &&
|
|
45
|
+
value !== null &&
|
|
46
|
+
"created_at" in value) {
|
|
43
47
|
convertedComments[key] = {
|
|
44
48
|
author: value.author,
|
|
45
49
|
comment: value.comment,
|
|
46
|
-
|
|
50
|
+
created_at: value.created_at.toDate(),
|
|
47
51
|
};
|
|
48
52
|
}
|
|
49
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../../src/types/fields/comment/comment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,
|
|
1
|
+
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../../src/types/fields/comment/comment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC"}
|
|
@@ -5,7 +5,7 @@ import type { CommentFirestoreBase } from "../../../../types/fields/comment/comm
|
|
|
5
5
|
* Uses Timestamp from firebase-admin/firestore
|
|
6
6
|
*/
|
|
7
7
|
export type CommentFirestore = CommentFirestoreBase & {
|
|
8
|
-
|
|
8
|
+
created_at: Timestamp;
|
|
9
9
|
};
|
|
10
10
|
export type PhotoCommentFirestore = CommentFirestore;
|
|
11
11
|
export type QuoteCommentFirestore = CommentFirestore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/node/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,
|
|
1
|
+
{"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/node/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
|
|
@@ -5,7 +5,7 @@ import type { CommentFirestoreBase } from "../../../../types/fields/comment/comm
|
|
|
5
5
|
* Uses Timestamp from firebase/firestore
|
|
6
6
|
*/
|
|
7
7
|
export type CommentFirestore = CommentFirestoreBase & {
|
|
8
|
-
|
|
8
|
+
created_at: Timestamp;
|
|
9
9
|
};
|
|
10
10
|
export type PhotoCommentFirestore = CommentFirestore;
|
|
11
11
|
export type QuoteCommentFirestore = CommentFirestore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/web/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,
|
|
1
|
+
{"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/web/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/node/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/node/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,0BAA0B,CAAC;AAOlC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AA6EjE,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;EACc,CAAC"}
|
|
@@ -15,12 +15,14 @@ const createCommentDocumentConverter = () => ({
|
|
|
15
15
|
const { _id, affected_field, ...comments } = doc;
|
|
16
16
|
const convertedComments = {};
|
|
17
17
|
for (const [key, value] of Object.entries(comments)) {
|
|
18
|
-
if (typeof value === "object" &&
|
|
18
|
+
if (typeof value === "object" &&
|
|
19
|
+
value !== null &&
|
|
20
|
+
"created_at" in value) {
|
|
19
21
|
convertedComments[key] = {
|
|
20
22
|
...value,
|
|
21
|
-
|
|
22
|
-
? Timestamp.fromDate(value.
|
|
23
|
-
: value.
|
|
23
|
+
created_at: value.created_at instanceof Date
|
|
24
|
+
? Timestamp.fromDate(value.created_at)
|
|
25
|
+
: value.created_at, // FieldValue, Timestamp, or undefined passes through
|
|
24
26
|
};
|
|
25
27
|
}
|
|
26
28
|
}
|
|
@@ -39,11 +41,13 @@ const createCommentDocumentConverter = () => ({
|
|
|
39
41
|
const { affected_field, ...comments } = data;
|
|
40
42
|
const convertedComments = {};
|
|
41
43
|
for (const [key, value] of Object.entries(comments)) {
|
|
42
|
-
if (typeof value === "object" &&
|
|
44
|
+
if (typeof value === "object" &&
|
|
45
|
+
value !== null &&
|
|
46
|
+
"created_at" in value) {
|
|
43
47
|
convertedComments[key] = {
|
|
44
48
|
author: value.author,
|
|
45
49
|
comment: value.comment,
|
|
46
|
-
|
|
50
|
+
created_at: value.created_at.toDate(),
|
|
47
51
|
};
|
|
48
52
|
}
|
|
49
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/web/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"comment-document.converter.d.ts","sourceRoot":"","sources":["../../../../src/convertors/web/comment-document.converter.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,sBAAsB,EAI5B,MAAM,oBAAoB,CAAC;AAoF5B,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC;AACzD,eAAO,MAAM,6BAA6B;;;;8CACc,CAAC"}
|
|
@@ -15,12 +15,14 @@ const createCommentDocumentConverter = () => ({
|
|
|
15
15
|
const { _id, affected_field, ...comments } = doc;
|
|
16
16
|
const convertedComments = {};
|
|
17
17
|
for (const [key, value] of Object.entries(comments)) {
|
|
18
|
-
if (typeof value === "object" &&
|
|
18
|
+
if (typeof value === "object" &&
|
|
19
|
+
value !== null &&
|
|
20
|
+
"created_at" in value) {
|
|
19
21
|
convertedComments[key] = {
|
|
20
22
|
...value,
|
|
21
|
-
|
|
22
|
-
? Timestamp.fromDate(value.
|
|
23
|
-
: value.
|
|
23
|
+
created_at: value.created_at instanceof Date
|
|
24
|
+
? Timestamp.fromDate(value.created_at)
|
|
25
|
+
: value.created_at, // FieldValue, Timestamp, or undefined passes through
|
|
24
26
|
};
|
|
25
27
|
}
|
|
26
28
|
}
|
|
@@ -39,11 +41,13 @@ const createCommentDocumentConverter = () => ({
|
|
|
39
41
|
const { affected_field, ...comments } = data;
|
|
40
42
|
const convertedComments = {};
|
|
41
43
|
for (const [key, value] of Object.entries(comments)) {
|
|
42
|
-
if (typeof value === "object" &&
|
|
44
|
+
if (typeof value === "object" &&
|
|
45
|
+
value !== null &&
|
|
46
|
+
"created_at" in value) {
|
|
43
47
|
convertedComments[key] = {
|
|
44
48
|
author: value.author,
|
|
45
49
|
comment: value.comment,
|
|
46
|
-
|
|
50
|
+
created_at: value.created_at.toDate(),
|
|
47
51
|
};
|
|
48
52
|
}
|
|
49
53
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../../src/types/fields/comment/comment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,
|
|
1
|
+
{"version":3,"file":"comment.d.ts","sourceRoot":"","sources":["../../../../../src/types/fields/comment/comment.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;AAEnC,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC"}
|
|
@@ -5,7 +5,7 @@ import type { CommentFirestoreBase } from "../../../../types/fields/comment/comm
|
|
|
5
5
|
* Uses Timestamp from firebase-admin/firestore
|
|
6
6
|
*/
|
|
7
7
|
export type CommentFirestore = CommentFirestoreBase & {
|
|
8
|
-
|
|
8
|
+
created_at: Timestamp;
|
|
9
9
|
};
|
|
10
10
|
export type PhotoCommentFirestore = CommentFirestore;
|
|
11
11
|
export type QuoteCommentFirestore = CommentFirestore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/node/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,
|
|
1
|
+
{"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/node/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
|
|
@@ -5,7 +5,7 @@ import type { CommentFirestoreBase } from "../../../../types/fields/comment/comm
|
|
|
5
5
|
* Uses Timestamp from firebase/firestore
|
|
6
6
|
*/
|
|
7
7
|
export type CommentFirestore = CommentFirestoreBase & {
|
|
8
|
-
|
|
8
|
+
created_at: Timestamp;
|
|
9
9
|
};
|
|
10
10
|
export type PhotoCommentFirestore = CommentFirestore;
|
|
11
11
|
export type QuoteCommentFirestore = CommentFirestore;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/web/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,
|
|
1
|
+
{"version":3,"file":"comment-firestore.d.ts","sourceRoot":"","sources":["../../../../../../src/types/fields/comment/web/comment-firestore.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kDAAkD,CAAC;AAE7F;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,GAAG;IACpD,UAAU,EAAE,SAAS,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAErD,MAAM,MAAM,qBAAqB,GAAG,gBAAgB,CAAC"}
|