@factor/plugin-sitemap
Advanced tools
Comparing version 1.5.12 to 1.5.24
122
CHANGELOG.md
## [1.5.7](https://github.com/fiction-com/factor/compare/v1.5.6...v1.5.7) (2020-03-24) | ||
### Bug Fixes | ||
* extend ([5e7abd6](https://github.com/fiction-com/factor/commit/5e7abd694919110e97382dcd4db1eab62f8d4f2a)) | ||
- extend ([5e7abd6](https://github.com/fiction-com/factor/commit/5e7abd694919110e97382dcd4db1eab62f8d4f2a)) | ||
## [1.5.4](https://github.com/fiction-com/factor/compare/v1.5.3...v1.5.4) (2020-03-24) | ||
### Bug Fixes | ||
* **plugins:** svg icons ([2090322](https://github.com/fiction-com/factor/commit/2090322a2868420f85a8ff914a0ee7cfa2f99b4a)) | ||
- **plugins:** svg icons ([2090322](https://github.com/fiction-com/factor/commit/2090322a2868420f85a8ff914a0ee7cfa2f99b4a)) | ||
### Features | ||
* **sitemap:** new handling ([a19c084](https://github.com/fiction-com/factor/commit/a19c084dd7dd1a0d794d6578151bd056629a65b1)) | ||
- **sitemap:** new handling ([a19c084](https://github.com/fiction-com/factor/commit/a19c084dd7dd1a0d794d6578151bd056629a65b1)) | ||
# [1.5.0](https://github.com/fiction-com/factor/compare/v1.4.11...v1.5.0) (2020-03-20) | ||
## [1.4.11](https://github.com/fiction-com/factor/compare/v1.4.10...v1.4.11) (2020-03-18) | ||
## [1.4.6](https://github.com/fiction-com/factor/compare/v1.4.5...v1.4.6) (2020-03-08) | ||
## [1.3.5](https://github.com/fiction-com/factor/compare/v1.3.4...v1.3.5) (2020-02-17) | ||
### Bug Fixes | ||
* **apps:** robots, e2e ([cdbdd7e](https://github.com/fiction-com/factor/commit/cdbdd7e1c364e4ee04a8c68bf3d44b8e73166f03)) | ||
- **apps:** robots, e2e ([cdbdd7e](https://github.com/fiction-com/factor/commit/cdbdd7e1c364e4ee04a8c68bf3d44b8e73166f03)) | ||
## [1.3.3](https://github.com/fiction-com/factor/compare/v1.3.2...v1.3.3) (2020-02-10) | ||
### Bug Fixes | ||
* 404 error ([367c010](https://github.com/fiction-com/factor/commit/367c0102b321941dae6be5644f9b1a81e3723cec)) | ||
- 404 error ([367c010](https://github.com/fiction-com/factor/commit/367c0102b321941dae6be5644f9b1a81e3723cec)) | ||
## [1.3.1](https://github.com/fiction-com/factor/compare/v1.3.0...v1.3.1) (2020-02-04) | ||
# [1.3.0](https://github.com/fiction-com/factor/compare/v1.2.10...v1.3.0) (2020-02-04) | ||
## [1.2.10](https://github.com/fiction-com/factor/compare/v1.2.9...v1.2.10) (2020-02-04) | ||
## [1.2.5](https://github.com/fiction-com/factor/compare/v1.2.4...v1.2.5) (2020-01-29) | ||
## [1.2.2](https://github.com/fiction-com/factor/compare/v1.2.1...v1.2.2) (2020-01-27) | ||
## [1.2.1](https://github.com/fiction-com/factor/compare/v1.2.0...v1.2.1) (2020-01-26) | ||
# [1.2.0](https://github.com/fiction-com/factor/compare/v1.1.42...v1.2.0) (2020-01-26) | ||
## [1.1.42](https://github.com/fiction-com/factor/compare/v1.1.41...v1.1.42) (2020-01-25) | ||
## [1.1.40](https://github.com/fiction-com/factor/compare/v1.1.39...v1.1.40) (2020-01-22) | ||
## [1.1.39](https://github.com/fiction-com/factor/compare/v1.1.38...v1.1.39) (2020-01-22) | ||
## [1.1.37](https://github.com/fiction-com/factor/compare/v1.1.36...v1.1.37) (2020-01-22) | ||
## [1.1.36](https://github.com/fiction-com/factor/compare/v1.1.35...v1.1.36) (2020-01-21) | ||
## [1.1.35](https://github.com/fiction-com/factor/compare/v1.1.34...v1.1.35) (2020-01-21) | ||
## [1.1.34](https://github.com/fiction-com/factor/compare/v1.1.33...v1.1.34) (2020-01-21) | ||
## [1.1.33](https://github.com/fiction-com/factor/compare/v1.1.32...v1.1.33) (2020-01-18) | ||
## [1.1.31](https://github.com/fiction-com/factor/compare/v1.1.30...v1.1.31) (2020-01-17) | ||
## [1.1.30](https://github.com/fiction-com/factor/compare/v1.1.29...v1.1.30) (2020-01-17) | ||
## [1.1.29](https://github.com/fiction-com/factor/compare/v1.1.28...v1.1.29) (2020-01-16) | ||
## [1.1.28](https://github.com/fiction-com/factor/compare/v1.1.27...v1.1.28) (2020-01-16) | ||
## [1.1.26](https://github.com/fiction-com/factor/compare/v1.1.25...v1.1.26) (2020-01-15) | ||
## [1.1.24](https://github.com/fiction-com/factor/compare/v1.1.23...v1.1.24) (2020-01-15) | ||
## [1.1.23](https://github.com/fiction-com/factor/compare/v1.1.22...v1.1.23) (2020-01-14) | ||
## [1.1.22](https://github.com/fiction-com/factor/compare/v1.1.21...v1.1.22) (2020-01-11) | ||
### Bug Fixes | ||
* posts ([6c282df](https://github.com/fiction-com/factor/commit/6c282df110eff80f6fa56bf7151ae7b7bfdfa82d)) | ||
- posts ([6c282df](https://github.com/fiction-com/factor/commit/6c282df110eff80f6fa56bf7151ae7b7bfdfa82d)) | ||
## [1.1.20](https://github.com/fiction-com/factor/compare/v1.1.19...v1.1.20) (2020-01-03) | ||
## [1.1.18](https://github.com/fiction-com/factor/compare/v1.1.17...v1.1.18) (2020-01-01) | ||
### Bug Fixes | ||
* typo ([d636bab](https://github.com/fiction-com/factor/commit/d636bab7f15efb950f2c9cdb7ee295a1ef521e7d)) | ||
* **markup:** add some markups and fix sitemap ([3cfc354](https://github.com/fiction-com/factor/commit/3cfc35420e1e835ef184f9c7e34dad7043d12889)) | ||
- typo ([d636bab](https://github.com/fiction-com/factor/commit/d636bab7f15efb950f2c9cdb7ee295a1ef521e7d)) | ||
- **markup:** add some markups and fix sitemap ([3cfc354](https://github.com/fiction-com/factor/commit/3cfc35420e1e835ef184f9c7e34dad7043d12889)) | ||
## [1.1.16](https://github.com/fiction-com/factor/compare/v1.1.16-alpha.0...v1.1.16) (2020-01-01) | ||
## [1.1.5](https://github.com/fiction-com/factor/compare/v1.1.4...v1.1.5) (2019-12-09) | ||
## [1.1.4](https://github.com/fiction-com/factor/compare/v1.1.3...v1.1.4) (2019-12-07) | ||
### Bug Fixes | ||
* **eslint:** import ordering ([865b830](https://github.com/fiction-com/factor/commit/865b8300a6aea2170fad5bb6cd4ac00e5db2cc8c)) | ||
* rollback arrow parens ([9cbc4c4](https://github.com/fiction-com/factor/commit/9cbc4c4e187702169b469f5579974f915772f499)) | ||
- **eslint:** import ordering ([865b830](https://github.com/fiction-com/factor/commit/865b8300a6aea2170fad5bb6cd4ac00e5db2cc8c)) | ||
- rollback arrow parens ([9cbc4c4](https://github.com/fiction-com/factor/commit/9cbc4c4e187702169b469f5579974f915772f499)) | ||
### Features | ||
* **typescript:** ... ([6fe25d5](https://github.com/fiction-com/factor/commit/6fe25d5fd237798be40f6445afc4856522c29fde)) | ||
* **typescript:** [#214](https://github.com/fiction-com/factor/issues/214) to [#135](https://github.com/fiction-com/factor/issues/135) ([99352ce](https://github.com/fiction-com/factor/commit/99352cedca321feba21fe0bbcc926832dc062c83)) | ||
* **typescript:** [#452](https://github.com/fiction-com/factor/issues/452) to [#379](https://github.com/fiction-com/factor/issues/379) ([cd49700](https://github.com/fiction-com/factor/commit/cd497004c47ab7f9daa4fe82b137b1f292196ecf)) | ||
* **typescript:** [#6](https://github.com/fiction-com/factor/issues/6) ([aa4ec2e](https://github.com/fiction-com/factor/commit/aa4ec2e7c35ecde36307238413041c533f993d83)) | ||
* **typescript:** 772 to 691 ([31d5194](https://github.com/fiction-com/factor/commit/31d51940e7d692f3c3f10d53df5bc58d494a13a0)) | ||
* **typescript:** migrate packages ([0413831](https://github.com/fiction-com/factor/commit/041383149fd506aae1c9dbafe05d4180543323db)) | ||
* typescript ([86d2e1d](https://github.com/fiction-com/factor/commit/86d2e1d5d3d67a065c40fb5f458ce7bcb584e702)) | ||
- **typescript:** ... ([6fe25d5](https://github.com/fiction-com/factor/commit/6fe25d5fd237798be40f6445afc4856522c29fde)) | ||
- **typescript:** [#214](https://github.com/fiction-com/factor/issues/214) to [#135](https://github.com/fiction-com/factor/issues/135) ([99352ce](https://github.com/fiction-com/factor/commit/99352cedca321feba21fe0bbcc926832dc062c83)) | ||
- **typescript:** [#452](https://github.com/fiction-com/factor/issues/452) to [#379](https://github.com/fiction-com/factor/issues/379) ([cd49700](https://github.com/fiction-com/factor/commit/cd497004c47ab7f9daa4fe82b137b1f292196ecf)) | ||
- **typescript:** [#6](https://github.com/fiction-com/factor/issues/6) ([aa4ec2e](https://github.com/fiction-com/factor/commit/aa4ec2e7c35ecde36307238413041c533f993d83)) | ||
- **typescript:** 772 to 691 ([31d5194](https://github.com/fiction-com/factor/commit/31d51940e7d692f3c3f10d53df5bc58d494a13a0)) | ||
- **typescript:** migrate packages ([0413831](https://github.com/fiction-com/factor/commit/041383149fd506aae1c9dbafe05d4180543323db)) | ||
- typescript ([86d2e1d](https://github.com/fiction-com/factor/commit/86d2e1d5d3d67a065c40fb5f458ce7bcb584e702)) | ||
## [1.1.1](https://github.com/fiction-com/factor/compare/v1.1.0...v1.1.1) (2019-11-20) | ||
# [1.0.0-beta.15](https://github.com/fiction-com/factor/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2019-11-11) | ||
# [1.0.0-beta.14](https://github.com/fiction-com/factor/compare/v1.0.0-beta.13...v1.0.0-beta.14) (2019-11-11) | ||
# [1.0.0-beta.12](https://github.com/fiction-com/factor/compare/v1.0.0-beta.9...v1.0.0-beta.12) (2019-11-11) | ||
46
index.ts
@@ -11,3 +11,3 @@ import { createGzip } from "zlib" | ||
setting, | ||
currentUrl | ||
currentUrl, | ||
} from "@factor/api" | ||
@@ -26,4 +26,4 @@ import { postTypesConfig, PostTypeConfig } from "@factor/api/post-types" | ||
export interface RegisteredSitemap { | ||
_id: string; | ||
items: SitemapItem[]; | ||
_id: string | ||
items: SitemapItem[] | ||
} | ||
@@ -47,3 +47,3 @@ | ||
return { _id, items } | ||
} | ||
}, | ||
}) | ||
@@ -70,3 +70,3 @@ return | ||
type GetSitemapOptions = { | ||
bust?: true; | ||
bust?: true | ||
} | ||
@@ -98,3 +98,3 @@ | ||
return sitemaps.find(map => map._id == _id) | ||
return sitemaps.find((map) => map._id == _id) | ||
} | ||
@@ -124,6 +124,6 @@ | ||
status: PostStatus.Published, | ||
source: setting("package.name") | ||
source: setting("package.name"), | ||
}) | ||
return posts.map(p => { | ||
return posts.map((p) => { | ||
return { url: permalink(p), lastmod: p.updatedAt?.toString() ?? "" } | ||
@@ -143,3 +143,3 @@ }) | ||
registerSitemap("routes", () => | ||
getKnownRoutePaths().map(_ => { | ||
getKnownRoutePaths().map((_) => { | ||
return { url: _ } | ||
@@ -150,3 +150,3 @@ }) | ||
return setPostTypeSitemaps() | ||
} | ||
}, | ||
}) | ||
@@ -161,3 +161,3 @@ /** | ||
return [..._, ...copyStaticFiles()] | ||
} | ||
}, | ||
}) | ||
@@ -187,3 +187,3 @@ | ||
hostname: currentUrl(), | ||
xslUrl: getStyleUrl() | ||
xslUrl: getStyleUrl(), | ||
}) | ||
@@ -193,3 +193,3 @@ const pipeline = smStream.pipe(createGzip()) | ||
map.items | ||
.map(item => { | ||
.map((item) => { | ||
const merged = { changefreq: "weekly", priority: 0.5, ...item } | ||
@@ -199,3 +199,3 @@ // Ensure priority is a number or throws error | ||
}) | ||
.forEach(item => { | ||
.forEach((item) => { | ||
smStream.write(item) | ||
@@ -205,3 +205,3 @@ }) | ||
pipeline.pipe(response).on("error", e => { | ||
pipeline.pipe(response).on("error", (e) => { | ||
throw e | ||
@@ -213,4 +213,4 @@ }) | ||
} | ||
} | ||
] | ||
}, | ||
], | ||
}) | ||
@@ -227,3 +227,3 @@ _.push({ | ||
xslUrl: getStyleUrl(), | ||
level: ErrorLevel.WARN | ||
level: ErrorLevel.WARN, | ||
}) | ||
@@ -234,3 +234,3 @@ | ||
sitemaps | ||
.filter(_ => _.items && _.items.length > 0) | ||
.filter((_) => _.items && _.items.length > 0) | ||
.forEach(({ _id }) => { | ||
@@ -242,3 +242,3 @@ sitemapIndex.write({ url: getSitemapUrl(_id) }) | ||
pipeline.pipe(response).on("error", e => { | ||
pipeline.pipe(response).on("error", (e) => { | ||
throw e | ||
@@ -251,8 +251,8 @@ }) | ||
} | ||
} | ||
] | ||
}, | ||
], | ||
}) | ||
return _ | ||
} | ||
}, | ||
}) | ||
@@ -259,0 +259,0 @@ } |
{ | ||
"name": "@factor/plugin-sitemap", | ||
"description": "Advanced automatically generated sitemaps for your Factor app", | ||
"version": "1.5.12", | ||
"version": "1.5.24", | ||
"license": "GPL-2.0", | ||
@@ -39,3 +39,3 @@ "author": { | ||
}, | ||
"gitHead": "d77e41cdd00fc9231f2074267fa1b2b33e7217fa", | ||
"gitHead": "28ef0237c1e238fa7b6f87b06ff4770aea5db163", | ||
"keywords": [ | ||
@@ -42,0 +42,0 @@ "factor", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
139133