@xylabs/sdk-meta 4.8.8 → 4.9.0

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.
@@ -45,7 +45,7 @@ var addMetaToHead = ($, name, value) => {
45
45
  if (typeof value === "string") {
46
46
  const newMeta = `<meta property="${name}" content="${value}" />`;
47
47
  const existingMeta = $(`head meta[property="${name}"]`);
48
- if (existingMeta?.length) {
48
+ if ((existingMeta?.length ?? 0) > 0) {
49
49
  existingMeta.replaceWith(newMeta);
50
50
  } else {
51
51
  $("head").append(newMeta);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/html/mergeDocumentHead.ts","../../src/lib/getMetaAsDict.ts","../../src/meta/builder.ts"],"sourcesContent":["import { load } from 'cheerio'\n\nconst opts = {}\n// const opts = { decodeEntities: false }\n\nexport const mergeDocumentHead = (destination: string, source: string) => {\n const $destination = load(destination, opts)\n const $source = load(source, opts)\n\n // For each child node of the source head\n $source('head')\n .children()\n .each((_, element) => {\n const el = $destination(element)\n\n // Special case for meta tags: We want to match them by the name attribute\n if (el[0].tagName === 'meta') {\n const property = el.attr('property')\n if (property) {\n const match = $destination(`head meta[property=\"${property}\"]`)\n\n // If it exists, replace it, otherwise append it\n if (match.length > 0) {\n match.replaceWith(el)\n return\n } else {\n $destination('head').append(el)\n }\n }\n // else {\n // // For all other elements, just check if the same element exists in the first HTML string\n // const match = $destination(el[0].tagName)\n\n // // If it exists, replace it, otherwise append it\n // if (match.length > 0) {\n // match.replaceWith(el)\n // } else {\n // $destination('head').append(el)\n // }\n // }\n }\n })\n\n // Return the merged HTML\n return $destination.html(opts)\n}\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type StringIndexable = { [key: string]: any }\n\nconst propertyDelimiter = ':'\n\nexport const getMetaAsDict = (obj: StringIndexable, parentKey = ''): Record<string, string> => {\n let flatRecord: StringIndexable = {}\n for (const key in obj) {\n if (typeof obj[key] === 'object' && obj[key] !== null) {\n // If the value is another object, we want to iterate through its keys as well.\n const childRecord = getMetaAsDict(obj[key] as StringIndexable, `${parentKey}${key}${propertyDelimiter}`)\n flatRecord = { ...flatRecord, ...childRecord }\n } else {\n // Concatenate the key with its parent key.\n const newKey = parentKey ? `${parentKey}${key}` : key\n const trimmed = newKey.endsWith(propertyDelimiter) ? newKey.slice(0, -1) : newKey\n flatRecord[trimmed] = `${obj[key]}`\n }\n }\n return flatRecord\n}\n","import type { CheerioAPI } from 'cheerio'\nimport { load } from 'cheerio'\n\nimport { getMetaAsDict } from '../lib/index.ts'\nimport type { Meta } from '../models/index.ts'\n\n/* test change */\n\nconst addMetaToHead = ($: CheerioAPI, name: string, value: string | object) => {\n if (typeof value === 'string') {\n const newMeta = `<meta property=\"${name}\" content=\"${value}\" />`\n const existingMeta = $(`head meta[property=\"${name}\"]`)\n if (existingMeta?.length) {\n existingMeta.replaceWith(newMeta)\n } else {\n $('head').append(newMeta)\n }\n } else if (Array.isArray(value)) {\n for (const item of value) addMetaToHead($, `${name}`, item)\n } else if (typeof value === 'object') {\n for (let [key, v] of Object.entries(value)) {\n if (key === 'url') {\n addMetaToHead($, name, v)\n } else {\n addMetaToHead($, `${name}:${key}`, v)\n }\n }\n } else {\n throw new TypeError(`Invalid item type [${name}, ${typeof value}]`)\n }\n}\n\nexport const metaBuilder = (html: string, meta: Meta, handler?: string) => {\n const $ = load(html)\n // NOTE: This assumes unique meta properties (no duplicates)\n // which is generally the case, but not always (you can have\n // multiple og:video:tag tags, for example)\n const metaProperties = getMetaAsDict(meta)\n for (const [key, value] of Object.entries(metaProperties)) {\n if (value) addMetaToHead($, key, value)\n }\n if (meta.description) {\n addMetaToHead($, 'description', meta.description)\n }\n if (meta.title) {\n $('title').text(meta.title)\n }\n if (handler) {\n addMetaToHead($, 'meta-handler', handler)\n }\n return $.html()\n}\n"],"mappings":";AAAA,SAAS,YAAY;AAErB,IAAM,OAAO,CAAC;AAGP,IAAM,oBAAoB,CAAC,aAAqB,WAAmB;AACxE,QAAM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e,EAAE,uBAAuB,IAAI,IAAI;AACtD,QAAI,cAAc,QAAQ;AACxB,mBAAa,YAAY,OAAO;AAAA,IAClC,OAAO;AACL,QAAE,MAAM,EAAE,OAAO,OAAO;AAAA,IAC1B;AAAA,EACF,WAAW,MAAM,QAAQ,KAAK,GAAG;AAC/B,eAAW,QAAQ,MAAO,eAAc,GAAG,GAAG,IAAI,IAAI,IAAI;AAAA,EAC5D,WAAW,OAAO,UAAU,UAAU;AACpC,aAAS,CAAC,KAAK,CAAC,KAAK,OAAO,QAAQ,KAAK,GAAG;AAC1C,UAAI,QAAQ,OAAO;AACjB,sBAAc,GAAG,MAAM,CAAC;AAAA,MAC1B,OAAO;AACL,sBAAc,GAAG,GAAG,IAAI,IAAI,GAAG,IAAI,CAAC;AAAA,MACtC;AAAA,IACF;AAAA,EACF,OAAO;AACL,UAAM,IAAI,UAAU,sBAAsB,IAAI,KAAK,OAAO,KAAK,GAAG;AAAA,EACpE;AACF;AAEO,IAAM,cAAc,CAAC,MAAc,MAAY,YAAqB;AACzE,QAAM,IAAIC,MAAK,IAAI;AAInB,QAAM,iBAAiB,cAAc,IAAI;AACzC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,cAAc,GAAG;AACzD,QAAI,MAAO,eAAc,GAAG,KAAK,KAAK;AAAA,EACxC;AACA,MAAI,KAAK,aAAa;AACpB,kBAAc,GAAG,eAAe,KAAK,WAAW;AAAA,EAClD;AACA,MAAI,KAAK,OAAO;AACd,MAAE,OAAO,EAAE,KAAK,KAAK,KAAK;AAAA,EAC5B;AACA,MAAI,SAAS;AACX,kBAAc,GAAG,gBAAgB,OAAO;AAAA,EAC1C;AACA,SAAO,EAAE,KAAK;AAChB;","names":["load","load"]}
1
+ {"version":3,"sources":["../../src/html/mergeDocumentHead.ts","../../src/lib/getMetaAsDict.ts","../../src/meta/builder.ts"],"sourcesContent":["import { load } from 'cheerio'\n\nconst opts = {}\n// const opts = { decodeEntities: false }\n\nexport const mergeDocumentHead = (destination: string, source: string) => {\n const $destination = load(destination, opts)\n const $source = load(source, opts)\n\n // For each child node of the source head\n $source('head')\n .children()\n .each((_, element) => {\n const el = $destination(element)\n\n // Special case for meta tags: We want to match them by the name attribute\n if (el[0].tagName === 'meta') {\n const property = el.attr('property')\n if (property) {\n const match = $destination(`head meta[property=\"${property}\"]`)\n\n // If it exists, replace it, otherwise append it\n if (match.length > 0) {\n match.replaceWith(el)\n return\n } else {\n $destination('head').append(el)\n }\n }\n // else {\n // // For all other elements, just check if the same element exists in the first HTML string\n // const match = $destination(el[0].tagName)\n\n // // If it exists, replace it, otherwise append it\n // if (match.length > 0) {\n // match.replaceWith(el)\n // } else {\n // $destination('head').append(el)\n // }\n // }\n }\n })\n\n // Return the merged HTML\n return $destination.html(opts)\n}\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type StringIndexable = { [key: string]: any }\n\nconst propertyDelimiter = ':'\n\nexport const getMetaAsDict = (obj: StringIndexable, parentKey = ''): Record<string, string> => {\n let flatRecord: StringIndexable = {}\n for (const key in obj) {\n if (typeof obj[key] === 'object' && obj[key] !== null) {\n // If the value is another object, we want to iterate through its keys as well.\n const childRecord = getMetaAsDict(obj[key] as StringIndexable, `${parentKey}${key}${propertyDelimiter}`)\n flatRecord = { ...flatRecord, ...childRecord }\n } else {\n // Concatenate the key with its parent key.\n const newKey = parentKey ? `${parentKey}${key}` : key\n const trimmed = newKey.endsWith(propertyDelimiter) ? newKey.slice(0, -1) : newKey\n flatRecord[trimmed] = `${obj[key]}`\n }\n }\n return flatRecord\n}\n","import type { CheerioAPI } from 'cheerio'\nimport { load } from 'cheerio'\n\nimport { getMetaAsDict } from '../lib/index.ts'\nimport type { Meta } from '../models/index.ts'\n\n/* test change */\n\nconst addMetaToHead = ($: CheerioAPI, name: string, value: string | object) => {\n if (typeof value === 'string') {\n const newMeta = `<meta property=\"${name}\" content=\"${value}\" />`\n const existingMeta = $(`head meta[property=\"${name}\"]`)\n if ((existingMeta?.length ?? 0) > 0) {\n existingMeta.replaceWith(newMeta)\n } else {\n $('head').append(newMeta)\n }\n } else if (Array.isArray(value)) {\n for (const item of value) addMetaToHead($, `${name}`, item)\n } else if (typeof value === 'object') {\n for (let [key, v] of Object.entries(value)) {\n if (key === 'url') {\n addMetaToHead($, name, v)\n } else {\n addMetaToHead($, `${name}:${key}`, v)\n }\n }\n } else {\n throw new TypeError(`Invalid item type [${name}, ${typeof value}]`)\n }\n}\n\nexport const metaBuilder = (html: string, meta: Meta, handler?: string) => {\n const $ = load(html)\n // NOTE: This assumes unique meta properties (no duplicates)\n // which is generally the case, but not always (you can have\n // multiple og:video:tag tags, for example)\n const metaProperties = getMetaAsDict(meta)\n for (const [key, value] of Object.entries(metaProperties)) {\n if (value) addMetaToHead($, key, value)\n }\n if (meta.description) {\n addMetaToHead($, 'description', meta.description)\n }\n if (meta.title) {\n $('title').text(meta.title)\n }\n if (handler) {\n addMetaToHead($, 'meta-handler', handler)\n }\n return $.html()\n}\n"],"mappings":";AAAA,SAAS,YAAY;AAErB,IAAM,OAAO,CAAC;AAGP,IAAM,oBAAoB,CAAC,aAAqB,WAAmB;AACxE,QAAM,eAAe,KAAK,aAAa,IAAI;AAC3C,QAAM,UAAU,KAAK,QAAQ,IAAI;AAGjC,UAAQ,MAAM,EACX,SAAS,EACT,KAAK,CAAC,GAAG,YAAY;AACpB,UAAM,KAAK,aAAa,OAAO;AAG/B,QAAI,GAAG,CAAC,EAAE,YAAY,QAAQ;AAC5B,YAAM,WAAW,GAAG,KAAK,UAAU;AACnC,UAAI,UAAU;AACZ,cAAM,QAAQ,aAAa,uBAAuB,QAAQ,IAAI;AAG9D,YAAI,MAAM,SAAS,GAAG;AACpB,gBAAM,YAAY,EAAE;AACpB;AAAA,QACF,OAAO;AACL,uBAAa,MAAM,EAAE,OAAO,EAAE;AAAA,QAChC;AAAA,MACF;AAAA,IAYF;AAAA,EACF,CAAC;AAGH,SAAO,aAAa,KAAK,IAAI;AAC/B;;;AC1CA,IAAM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EACF,OAAO;AACL,UAAM,IAAI,UAAU,sBAAsB,IAAI,KAAK,OAAO,KAAK,GAAG;AAAA,EACpE;AACF;AAEO,IAAM,cAAc,CAAC,MAAc,MAAY,YAAqB;AACzE,QAAM,IAAIC,MAAK,IAAI;AAInB,QAAM,iBAAiB,cAAc,IAAI;AACzC,aAAW,CAAC,KAAK,KAAK,KAAK,OAAO,QAAQ,cAAc,GAAG;AACzD,QAAI,MAAO,eAAc,GAAG,KAAK,KAAK;AAAA,EACxC;AACA,MAAI,KAAK,aAAa;AACpB,kBAAc,GAAG,eAAe,KAAK,WAAW;AAAA,EAClD;AACA,MAAI,KAAK,OAAO;AACd,MAAE,OAAO,EAAE,KAAK,KAAK,KAAK;AAAA,EAC5B;AACA,MAAI,SAAS;AACX,kBAAc,GAAG,gBAAgB,OAAO;AAAA,EAC1C;AACA,SAAO,EAAE,KAAK;AAChB;","names":["load","load"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xylabs/sdk-meta",
3
- "version": "4.8.8",
3
+ "version": "4.9.0",
4
4
  "description": "Base functionality used throughout XYO TypeScript/JavaScript libraries",
5
5
  "keywords": [
6
6
  "meta",
@@ -34,11 +34,11 @@
34
34
  "cheerio": "^1.0.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@types/node": "^22.15.3",
38
- "@xylabs/ts-scripts-yarn3": "^6.4.5",
39
- "@xylabs/tsconfig": "^6.4.5",
37
+ "@types/node": "^22.15.8",
38
+ "@xylabs/ts-scripts-yarn3": "^6.5.5",
39
+ "@xylabs/tsconfig": "^6.5.5",
40
40
  "typescript": "^5.8.3",
41
- "vitest": "^3.1.2"
41
+ "vitest": "^3.1.3"
42
42
  },
43
43
  "packageManager": "yarn@3.2.0",
44
44
  "publishConfig": {
@@ -21,25 +21,3 @@ exports[`mergeDocumentHead > with real documents 1`] = `
21
21
 
22
22
  </body></html>"
23
23
  `;
24
-
25
- exports[`mergeDocumentHead with real documents 1`] = `
26
- "<!DOCTYPE html><html lang="en"><head>
27
- <meta charset="utf-8">
28
- <link rel="icon" href="/favicon.ico">
29
- <meta name="viewport" content="width=device-width,initial-scale=1">
30
- <meta name="description" content="Your Data, Forever Long.">
31
- <link rel="preconnect" href="https://fonts.googleapis.com">
32
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin="">
33
- <link href="https://fonts.googleapis.com/css2?family=Roboto+Flex:wght@300;400;500;600;800&amp;display=swap" rel="stylesheet">
34
- <link rel="apple-touch-icon" href="/foreventory-logo-icon-black.png">
35
- <link rel="manifest" href="/manifest.json">
36
- <title>Foreventory</title>
37
- <script defer="defer" src="/static/js/main.297e104a.js"></script>
38
- <meta content="website" property="og:type" data-react-helmet="true"><meta property="og:image" content="/netflix/insights/6f088236519e8e0c9ab9294c2e59fb2b8b434091a7559401ae860ff445fb1355/share/1600/900"><meta property="og:image:height" content="900"><meta property="og:image:secure_url" content="/netflix/insights/6f088236519e8e0c9ab9294c2e59fb2b8b434091a7559401ae860ff445fb1355/share/1600/900"><meta property="og:image:type" content="image/png"><meta property="og:image:url" content="/netflix/insights/6f088236519e8e0c9ab9294c2e59fb2b8b434091a7559401ae860ff445fb1355/share/1600/900"><meta property="og:image:width" content="1600"><meta property="twitter:image" content="/netflix/insights/6f088236519e8e0c9ab9294c2e59fb2b8b434091a7559401ae860ff445fb1355/share/1600/900"></head>
39
-
40
- <body><noscript>You need to enable JavaScript to run this app.</noscript>
41
- <div id="root"></div>
42
-
43
-
44
- </body></html>"
45
- `;
@@ -10,7 +10,7 @@ const addMetaToHead = ($: CheerioAPI, name: string, value: string | object) => {
10
10
  if (typeof value === 'string') {
11
11
  const newMeta = `<meta property="${name}" content="${value}" />`
12
12
  const existingMeta = $(`head meta[property="${name}"]`)
13
- if (existingMeta?.length) {
13
+ if ((existingMeta?.length ?? 0) > 0) {
14
14
  existingMeta.replaceWith(newMeta)
15
15
  } else {
16
16
  $('head').append(newMeta)
@@ -92,96 +92,3 @@ exports[`builder > Overwrites existing values with new values 1`] = `
92
92
 
93
93
  </body></html>"
94
94
  `;
95
-
96
- exports[`builder Adds meta Open Graph (OG) 1`] = `
97
- "<!DOCTYPE html><html lang="en"><head>
98
- <meta charset="utf-8">
99
- <link rel="icon" href="/favicon.ico">
100
- <meta name="viewport" content="width=device-width,initial-scale=1">
101
- <meta name="theme-color" content="#000000">
102
- <meta name="description" content="Own your piece of XYO's Decentralized Digital World!">
103
- <link rel="apple-touch-icon" href="/apple-touch-icon.png">
104
- <link rel="manifest" href="/manifest.json">
105
- <title>Death Valley Wilderness: Wilderness Light</title>
106
- <link href="https://fonts.googleapis.com/css?family=Nunito+Sans|Lexend+Deca|Rock+Salt|Source+Code+Pro&amp;display=swap" rel="stylesheet">
107
- <script async="" src="https://www.googletagmanager.com/gtag/js?id=G-795QBPW744"></script>
108
- <script>function gtag() { dataLayer.push(arguments) } window.dataLayer = window.dataLayer || [], gtag("js", new Date), gtag("config", "G-795QBPW744")</script>
109
- <style>
110
- html {
111
- overflow-y: auto;
112
- overflow-x: hidden
113
- }
114
-
115
- #root,
116
- body {
117
- height: 100%;
118
- width: 100%;
119
- margin: 0;
120
- padding: 0
121
- }
122
- </style>
123
- <script defer="defer" src="/static/js/main.ae7f7033.js"></script>
124
- <link href="/static/css/main.026e3fe6.css" rel="stylesheet">
125
- <meta property="description" content="Follow the course of light through the Death Valley Wilderness and observe the obvious and subtle changes across the landscape.Produced by Sylvia JohnsonTo w..."><meta property="title" content="Death Valley Wilderness: Wilderness Light"><meta property="og:description" content="Follow the course of light through the Death Valley Wilderness and observe the obvious and subtle changes across the landscape.Produced by Sylvia JohnsonTo w..."><meta property="og:image" content="https://i.ytimg.com/vi/Kauv7MVPcsA/maxresdefault.jpg"><meta property="og:image:height" content="720"><meta property="og:image:width" content="1280"><meta property="og:site_name" content="YouTube"><meta property="og:title" content="Death Valley Wilderness: Wilderness Light"><meta property="og:type" content="video.other"><meta property="og:url" content="https://www.youtube.com/watch?v=Kauv7MVPcsA"><meta property="og:video:height" content="720"><meta property="og:video:secure_url" content="https://www.youtube.com/embed/Kauv7MVPcsA"><meta property="og:video:type" content="text/html"><meta property="og:video:url" content="https://www.youtube.com/embed/Kauv7MVPcsA"><meta property="og:video:width" content="1280"></head>
126
-
127
- <body style="padding:0;margin:0;overflow-x:hidden"><noscript><iframe
128
- src="https://www.googletagmanager.com/ns.html?id=GTM-W2TFNXL" height="0" width="0"
129
- style="display:none;visibility:hidden"></iframe></noscript><noscript>You need to enable JavaScript to run this
130
- app.</noscript>
131
- <div id="root"></div>
132
-
133
-
134
- </body></html>"
135
- `;
136
-
137
- exports[`builder Adds meta Twitter 1`] = `
138
- "<!DOCTYPE html><html lang="en"><head>
139
- <meta charset="utf-8">
140
- <link rel="icon" href="/favicon.ico">
141
- <meta name="viewport" content="width=device-width,initial-scale=1">
142
- <meta name="theme-color" content="#000000">
143
- <meta name="description" content="Own your piece of XYO's Decentralized Digital World!">
144
- <link rel="apple-touch-icon" href="/apple-touch-icon.png">
145
- <link rel="manifest" href="/manifest.json">
146
- <title>Death Valley Wilderness: Wilderness Light</title>
147
- <link href="https://fonts.googleapis.com/css?family=Nunito+Sans|Lexend+Deca|Rock+Salt|Source+Code+Pro&amp;display=swap" rel="stylesheet">
148
- <script async="" src="https://www.googletagmanager.com/gtag/js?id=G-795QBPW744"></script>
149
- <script>function gtag() { dataLayer.push(arguments) } window.dataLayer = window.dataLayer || [], gtag("js", new Date), gtag("config", "G-795QBPW744")</script>
150
- <style>
151
- html {
152
- overflow-y: auto;
153
- overflow-x: hidden
154
- }
155
-
156
- #root,
157
- body {
158
- height: 100%;
159
- width: 100%;
160
- margin: 0;
161
- padding: 0
162
- }
163
- </style>
164
- <script defer="defer" src="/static/js/main.ae7f7033.js"></script>
165
- <link href="/static/css/main.026e3fe6.css" rel="stylesheet">
166
- <meta property="description" content="Follow the course of light through the Death Valley Wilderness and observe the obvious and subtle changes across the landscape.Produced by Sylvia JohnsonTo w..."><meta property="title" content="Death Valley Wilderness: Wilderness Light"><meta property="twitter:app:id:googleplay" content="com.google.android.youtube"><meta property="twitter:app:id:ipad" content="544007664"><meta property="twitter:app:id:iphone" content="544007664"><meta property="twitter:app:name:googleplay" content="YouTube"><meta property="twitter:app:name:ipad" content="YouTube"><meta property="twitter:app:name:iphone" content="YouTube"><meta property="twitter:app:url:googleplay" content="https://www.youtube.com/watch?v=Kauv7MVPcsA"><meta property="twitter:app:url:ipad" content="vnd.youtube://www.youtube.com/watch?v=Kauv7MVPcsA&amp;feature=applinks"><meta property="twitter:app:url:iphone" content="vnd.youtube://www.youtube.com/watch?v=Kauv7MVPcsA&amp;feature=applinks"><meta property="twitter:card" content="summary"><meta property="twitter:description" content="Follow the course of light through the Death Valley Wilderness and observe the obvious and subtle changes across the landscape.Produced by Sylvia JohnsonTo w..."><meta property="twitter:image" content="https://www.twitter.com/image/url"><meta property="twitter:player" content="https://www.youtube.com/watch?v=Kauv7MVPcsA"><meta property="twitter:player:height" content="720"><meta property="twitter:player:width" content="1028"><meta property="twitter:site" content="@youtube"><meta property="twitter:title" content="Death Valley Wilderness: Wilderness Light"></head>
167
-
168
- <body style="padding:0;margin:0;overflow-x:hidden"><noscript><iframe
169
- src="https://www.googletagmanager.com/ns.html?id=GTM-W2TFNXL" height="0" width="0"
170
- style="display:none;visibility:hidden"></iframe></noscript><noscript>You need to enable JavaScript to run this
171
- app.</noscript>
172
- <div id="root"></div>
173
-
174
-
175
- </body></html>"
176
- `;
177
-
178
- exports[`builder Overwrites existing values with new values 1`] = `
179
- "<!DOCTYPE html><html lang="en"><head>
180
- <title>XYO 2.0</title>
181
- <meta property="og:image" content="https://example.com/newimage.jpg">
182
- <meta property="twitter:image" content="https://example.com/newimage.jpg">
183
- </head>
184
- <body>
185
-
186
- </body></html>"
187
- `;