@magicpages/ghost-typesense-core 1.6.2 → 1.6.3
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.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -0
- package/dist/index.mjs +3 -0
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -4,6 +4,7 @@ interface Post {
|
|
|
4
4
|
id: string;
|
|
5
5
|
title: string;
|
|
6
6
|
slug: string;
|
|
7
|
+
url: string;
|
|
7
8
|
html?: string;
|
|
8
9
|
plaintext: string;
|
|
9
10
|
excerpt: string;
|
|
@@ -13,6 +14,7 @@ interface Post {
|
|
|
13
14
|
'tags.name'?: string[];
|
|
14
15
|
'tags.slug'?: string[];
|
|
15
16
|
authors?: string[];
|
|
17
|
+
tags?: string[];
|
|
16
18
|
[key: string]: unknown;
|
|
17
19
|
}
|
|
18
20
|
declare class GhostTypesenseManager {
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ interface Post {
|
|
|
4
4
|
id: string;
|
|
5
5
|
title: string;
|
|
6
6
|
slug: string;
|
|
7
|
+
url: string;
|
|
7
8
|
html?: string;
|
|
8
9
|
plaintext: string;
|
|
9
10
|
excerpt: string;
|
|
@@ -13,6 +14,7 @@ interface Post {
|
|
|
13
14
|
'tags.name'?: string[];
|
|
14
15
|
'tags.slug'?: string[];
|
|
15
16
|
authors?: string[];
|
|
17
|
+
tags?: string[];
|
|
16
18
|
[key: string]: unknown;
|
|
17
19
|
}
|
|
18
20
|
declare class GhostTypesenseManager {
|
package/dist/index.js
CHANGED
|
@@ -92,6 +92,8 @@ var GhostTypesenseManager = class {
|
|
|
92
92
|
id: post.id,
|
|
93
93
|
title: post.title,
|
|
94
94
|
slug: post.slug,
|
|
95
|
+
url: post.url || `${this.config.ghost.url}/${post.slug}/`,
|
|
96
|
+
html: post.html || "",
|
|
95
97
|
plaintext,
|
|
96
98
|
excerpt: post.excerpt || "",
|
|
97
99
|
published_at: new Date(post.published_at || Date.now()).getTime(),
|
|
@@ -104,6 +106,7 @@ var GhostTypesenseManager = class {
|
|
|
104
106
|
if (tags && Array.isArray(tags) && tags.length > 0) {
|
|
105
107
|
transformed["tags.name"] = tags.map((tag) => tag.name);
|
|
106
108
|
transformed["tags.slug"] = tags.map((tag) => tag.slug);
|
|
109
|
+
transformed.tags = tags.map((tag) => tag.name);
|
|
107
110
|
}
|
|
108
111
|
const authors = post.authors;
|
|
109
112
|
if (authors && Array.isArray(authors) && authors.length > 0) {
|
package/dist/index.mjs
CHANGED
|
@@ -68,6 +68,8 @@ var GhostTypesenseManager = class {
|
|
|
68
68
|
id: post.id,
|
|
69
69
|
title: post.title,
|
|
70
70
|
slug: post.slug,
|
|
71
|
+
url: post.url || `${this.config.ghost.url}/${post.slug}/`,
|
|
72
|
+
html: post.html || "",
|
|
71
73
|
plaintext,
|
|
72
74
|
excerpt: post.excerpt || "",
|
|
73
75
|
published_at: new Date(post.published_at || Date.now()).getTime(),
|
|
@@ -80,6 +82,7 @@ var GhostTypesenseManager = class {
|
|
|
80
82
|
if (tags && Array.isArray(tags) && tags.length > 0) {
|
|
81
83
|
transformed["tags.name"] = tags.map((tag) => tag.name);
|
|
82
84
|
transformed["tags.slug"] = tags.map((tag) => tag.slug);
|
|
85
|
+
transformed.tags = tags.map((tag) => tag.name);
|
|
83
86
|
}
|
|
84
87
|
const authors = post.authors;
|
|
85
88
|
if (authors && Array.isArray(authors) && authors.length > 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@magicpages/ghost-typesense-core",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.3",
|
|
4
4
|
"description": "Core functionality for Ghost-Typesense integration",
|
|
5
5
|
"author": "MagicPages",
|
|
6
6
|
"license": "MIT",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"typecheck": "tsc --noEmit"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@magicpages/ghost-typesense-config": "^1.6.
|
|
27
|
+
"@magicpages/ghost-typesense-config": "^1.6.3",
|
|
28
28
|
"@ts-ghost/content-api": "^4.0.6",
|
|
29
29
|
"@ts-ghost/core-api": "^4.0.6",
|
|
30
30
|
"typesense": "^1.7.2",
|