mirror of
https://github.com/dzeiocom/libs.git
synced 2025-04-22 10:52:11 +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'
|
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 {
|
export default class Sitemap {
|
||||||
|
|
||||||
private static allowedChangefreq = ['always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never']
|
private static allowedChangefreq = ['always', 'hourly', 'daily', 'weekly', 'monthly', 'yearly', 'never']
|
||||||
@ -8,7 +21,8 @@ export default class Sitemap {
|
|||||||
|
|
||||||
public constructor(
|
public constructor(
|
||||||
private domain: string, private options?: {
|
private domain: string, private options?: {
|
||||||
response?: ServerResponse
|
response?: ServerResponse,
|
||||||
|
defaults?: SitemapEntry
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
if (this.options?.response) {
|
if (this.options?.response) {
|
||||||
@ -22,18 +36,7 @@ export default class Sitemap {
|
|||||||
* @param path the url path
|
* @param path the url path
|
||||||
* @param options aditional datas you want in the sitemap for the `path`
|
* @param options aditional datas you want in the sitemap for the `path`
|
||||||
*/
|
*/
|
||||||
public addEntry(path: string, options?: {
|
public addEntry(path: string, options?: 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
|
|
||||||
}>
|
|
||||||
}) {
|
|
||||||
let entryString = '<url>'
|
let entryString = '<url>'
|
||||||
|
|
||||||
const url = this.fixText(`${this.domain}${path}`)
|
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",
|
"name": "@dzeio/object-util",
|
||||||
"version": "1.6.0",
|
"version": "1.6.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@dzeio/object-util",
|
"name": "@dzeio/object-util",
|
||||||
"version": "1.6.0",
|
"version": "1.6.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29",
|
"@types/jest": "^29",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@dzeio/object-util",
|
"name": "@dzeio/object-util",
|
||||||
"version": "1.6.0",
|
"version": "1.6.1",
|
||||||
"description": "Utility functions to manipulate an object",
|
"description": "Utility functions to manipulate an object",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -21,8 +21,8 @@
|
|||||||
"default": "./dist/ObjectUtil.js"
|
"default": "./dist/ObjectUtil.js"
|
||||||
},
|
},
|
||||||
"import": {
|
"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",
|
"name": "@dzeio/url-manager",
|
||||||
"version": "1.0.10",
|
"version": "1.1.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@dzeio/url-manager",
|
"name": "@dzeio/url-manager",
|
||||||
"version": "1.0.10",
|
"version": "1.1.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dzeio/object-util": "^1.5.0"
|
"@dzeio/object-util": "^1.5.0"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@dzeio/url-manager",
|
"name": "@dzeio/url-manager",
|
||||||
"version": "1.1.0",
|
"version": "1.1.1",
|
||||||
"description": "A simple to use yet complete Urls parser and serializer",
|
"description": "A simple to use yet complete Urls parser and serializer",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@ -20,8 +20,8 @@
|
|||||||
"exports": {
|
"exports": {
|
||||||
".": {
|
".": {
|
||||||
"require": {
|
"require": {
|
||||||
"types": "./dist/URLManager.d.ts",
|
"default": "./dist/URLManager.js",
|
||||||
"default": "./dist/URLManager.js"
|
"types": "./dist/URLManager.d.ts"
|
||||||
},
|
},
|
||||||
"import": {
|
"import": {
|
||||||
"default": "./dist/URLManager.mjs",
|
"default": "./dist/URLManager.mjs",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user