vowel 0.1.36 → 0.1.38
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/CHANGELOG.md +9 -0
- package/package.json +1 -1
- package/src/lib/utilities/mutateMarkdownAST.js +6 -7
- package/src/lib/utilities/mutateMarkdownFrontmatter.js +9 -5
- package/src/lib/utilities/writeCache.js +0 -1
- package/src/routes/$vowel/published.json/+server.js +2 -0
- package/src/routes/[...path]/+page.server.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [0.1.38](https://github.com/samlfair/vowel/compare/v0.1.37...v0.1.38) (2024-10-17)
|
|
6
|
+
|
|
7
|
+
## [0.1.37](https://github.com/samlfair/vowel/compare/v0.1.36...v0.1.37) (2024-10-17)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* add 'new' status for webmentions ([12ea209](https://github.com/samlfair/vowel/commit/12ea2098eb24f4bf64c681fa7dc66371592bb08c))
|
|
13
|
+
|
|
5
14
|
## [0.1.36](https://github.com/samlfair/vowel/compare/v0.1.35...v0.1.36) (2024-10-17)
|
|
6
15
|
|
|
7
16
|
|
package/package.json
CHANGED
|
@@ -33,18 +33,17 @@ export default async function mutateMarkdownAST(ast, cache, webmentions) {
|
|
|
33
33
|
ensureSecureImageRequest: true
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
console.log("UR:")
|
|
37
|
-
|
|
38
36
|
|
|
39
37
|
if(webmentions && !webmentions.find(webmention => webmention.target === url)) {
|
|
40
|
-
console.log("Sending webmention)")
|
|
41
|
-
const webmentionStatus = await sendWebmention(response.responseBody)
|
|
42
|
-
console.log({webmentionStatus})
|
|
43
|
-
|
|
44
38
|
webmentions.push({
|
|
45
39
|
target: url,
|
|
46
|
-
status:
|
|
40
|
+
status: "new"
|
|
47
41
|
})
|
|
42
|
+
} else if (webmentions) {
|
|
43
|
+
const webmention = webmentions.find(webmention => webmention.target === url)
|
|
44
|
+
if(webmention.status === "new") {
|
|
45
|
+
webmention.status = await sendWebmention(response.responseBody)
|
|
46
|
+
}
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
const metadata = {
|
|
@@ -79,7 +79,7 @@ export default async function mutateMarkdownFrontmatter(frontmatter, cache, webm
|
|
|
79
79
|
try {
|
|
80
80
|
const url = new URL(input);
|
|
81
81
|
const metadata = await urlMetadata(url.href, {
|
|
82
|
-
includeResponseBody:
|
|
82
|
+
includeResponseBody: true,
|
|
83
83
|
ensureSecureImageRequest: true
|
|
84
84
|
});
|
|
85
85
|
|
|
@@ -96,15 +96,19 @@ export default async function mutateMarkdownFrontmatter(frontmatter, cache, webm
|
|
|
96
96
|
og_image: url['og:image']
|
|
97
97
|
};
|
|
98
98
|
|
|
99
|
-
if(webmentions && !webmentions.find(webmention => webmention.target ===
|
|
100
|
-
const webmentionStatus = await sendWebmention(response.responseBody)
|
|
101
|
-
|
|
99
|
+
if(webmentions && !webmentions.find(webmention => webmention.target === input)) {
|
|
102
100
|
webmentions.push({
|
|
103
101
|
target: input,
|
|
104
|
-
status:
|
|
102
|
+
status: "new"
|
|
105
103
|
})
|
|
104
|
+
} else if (webmentions) {
|
|
105
|
+
const webmention = webmentions.find(webmention => webmention.target === input)
|
|
106
|
+
if(webmention.status === "new") {
|
|
107
|
+
webmention.status = await sendWebmention(metadata.responseBody)
|
|
108
|
+
}
|
|
106
109
|
}
|
|
107
110
|
|
|
111
|
+
|
|
108
112
|
cache[input] = selectedMetadata;
|
|
109
113
|
|
|
110
114
|
frontmatter[key] = {
|