mirror of
https://github.com/dzeiocom/libs.git
synced 2025-04-22 02:42:13 +00:00
bump(object-util,url-manager): bump patch
Signed-off-by: Florian BOUILLON <f.bouillon@aptatio.com>
This commit is contained in:
parent
231309ae7a
commit
4a4f0ddd1c
@ -1,5 +1,18 @@
|
||||
import { ServerResponse } from 'http'
|
||||
|
||||
interface SitemapEntry {
|
||||
changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never'
|
||||
lastmod?: Date
|
||||
priority?: 1 | 0.9 | 0.8 | 0.7 | 0.6 | 0.5 | 0.4 | 0.3 | 0.2 | 0.1 | 0
|
||||
images?: Array<{
|
||||
location: string
|
||||
caption?: string
|
||||
geoLocation?: string
|
||||
title?: string
|
||||
license?: string
|
||||
}>
|
||||
}
|
||||
|
||||
export default class Sitemap {
|
||||
|
||||
private static allowedChangefreq = ['always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never']
|
||||
@ -8,7 +21,8 @@ export default class Sitemap {
|
||||
|
||||
public constructor(
|
||||
private domain: string, private options?: {
|
||||
response?: ServerResponse
|
||||
response?: ServerResponse,
|
||||
defaults?: SitemapEntry
|
||||
}
|
||||
) {
|
||||
if (this.options?.response) {
|
||||
@ -22,18 +36,7 @@ export default class Sitemap {
|
||||
* @param path the url path
|
||||
* @param options aditional datas you want in the sitemap for the `path`
|
||||
*/
|
||||
public addEntry(path: string, options?: {
|
||||
changefreq?: 'always' | 'hourly' | 'daily' | 'weekly' | 'monthly' | 'yearly' | 'never'
|
||||
lastmod?: Date
|
||||
priority?: 1 | 0.9 | 0.8 | 0.7 | 0.6 | 0.5 | 0.4 | 0.3 | 0.2 | 0.1 | 0
|
||||
images?: Array<{
|
||||
location: string
|
||||
caption?: string
|
||||
geoLocation?: string
|
||||
title?: string
|
||||
license?: string
|
||||
}>
|
||||
}) {
|
||||
public addEntry(path: string, options?: SitemapEntry) {
|
||||
let entryString = '<url>'
|
||||
|
||||
const url = this.fixText(`${this.domain}${path}`)
|
||||
|
4
packages/object-util/package-lock.json
generated
4
packages/object-util/package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@dzeio/object-util",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@dzeio/object-util",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29",
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@dzeio/object-util",
|
||||
"version": "1.6.0",
|
||||
"version": "1.6.1",
|
||||
"description": "Utility functions to manipulate an object",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -21,8 +21,8 @@
|
||||
"default": "./dist/ObjectUtil.js"
|
||||
},
|
||||
"import": {
|
||||
"default": "./dist/ObjectUtil.mjs",
|
||||
"types": "./dist/ObjectUtil.d.mts"
|
||||
"types": "./dist/ObjectUtil.d.mts",
|
||||
"default": "./dist/ObjectUtil.mjs"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
4
packages/url-manager/package-lock.json
generated
4
packages/url-manager/package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@dzeio/url-manager",
|
||||
"version": "1.0.10",
|
||||
"version": "1.1.1",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@dzeio/url-manager",
|
||||
"version": "1.0.10",
|
||||
"version": "1.1.1",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@dzeio/object-util": "^1.5.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@dzeio/url-manager",
|
||||
"version": "1.1.0",
|
||||
"version": "1.1.1",
|
||||
"description": "A simple to use yet complete Urls parser and serializer",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -20,8 +20,8 @@
|
||||
"exports": {
|
||||
".": {
|
||||
"require": {
|
||||
"types": "./dist/URLManager.d.ts",
|
||||
"default": "./dist/URLManager.js"
|
||||
"default": "./dist/URLManager.js",
|
||||
"types": "./dist/URLManager.d.ts"
|
||||
},
|
||||
"import": {
|
||||
"default": "./dist/URLManager.mjs",
|
||||
|
Loading…
x
Reference in New Issue
Block a user