@cogenta/seo 0.1.1 → 0.2.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.
- package/dist/indexable.d.ts.map +1 -1
- package/dist/indexable.js +15 -2
- package/dist/indexable.js.map +1 -1
- package/package.json +3 -3
package/dist/indexable.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexable.d.ts","sourceRoot":"","sources":["../src/indexable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAGtD;;;;;;;;;GASG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,iFAAiF;IACjF,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,CAAA;CACpB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,
|
|
1
|
+
{"version":3,"file":"indexable.d.ts","sourceRoot":"","sources":["../src/indexable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAGtD;;;;;;;;;GASG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,iFAAiF;IACjF,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,CAAA;CACpB;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,YAAY,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAiCxF;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,WAAW,EACrB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAGT;AAED,0DAA0D;AAC1D,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,SAAS,WAAW,EAAE,EACjC,OAAO,GAAE,gBAAqB,GAC7B,SAAS,WAAW,EAAE,CAExB"}
|
package/dist/indexable.js
CHANGED
|
@@ -10,11 +10,24 @@ export function isPublished(entry, options = {}) {
|
|
|
10
10
|
// entry legitimately appears in the list.
|
|
11
11
|
if (entry.state !== 'published')
|
|
12
12
|
return false;
|
|
13
|
+
// No publication date at all means the collection never declared a
|
|
14
|
+
// `publishedAt` field — contract A makes it an ordinary, optional field, and
|
|
15
|
+
// `ContentStore` returns `null` for every collection that does not have one
|
|
16
|
+
// (`publishedAtOf`, packages/schema/src/store/store.ts). Treating that as
|
|
17
|
+
// "not published" made this gate refuse every page of every collection
|
|
18
|
+
// without the field, which is most of them: found the first time the package
|
|
19
|
+
// was wired to a real `cogenta serve` (L10 task 1), not by any unit test,
|
|
20
|
+
// because every fixture happened to set a date by hand.
|
|
21
|
+
//
|
|
22
|
+
// `status` is the authority on whether an entry is public; `publishedAt`
|
|
23
|
+
// only refines it with *when*. With no date there is nothing to refine, and
|
|
24
|
+
// nothing can have been scheduled either — a future date cannot be stored in
|
|
25
|
+
// a field the collection does not declare.
|
|
26
|
+
if (entry.publishedAt === null)
|
|
27
|
+
return true;
|
|
13
28
|
// A published status with a future `publishedAt` is a scheduled entry whose
|
|
14
29
|
// job has not run yet, or one that a scheduler pre-flipped. Either way it is
|
|
15
30
|
// not public.
|
|
16
|
-
if (entry.publishedAt === null)
|
|
17
|
-
return false;
|
|
18
31
|
const at = Date.parse(entry.publishedAt);
|
|
19
32
|
if (Number.isNaN(at))
|
|
20
33
|
return false;
|
package/dist/indexable.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"indexable.js","sourceRoot":"","sources":["../src/indexable.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAkBvC,MAAM,UAAU,WAAW,CAAC,KAAmB,EAAE,OAAO,GAAqB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,EAAE,CAAA;AACpD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,WAAW,CACzB,IAAa,EACb,QAAqB,EACrB,OAAO,GAAqB,EAAE;IAE9B,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;QAAE,OAAO,KAAK,CAAA;IACvD,OAAO,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,KAAK,IAAI,CAAA;AAC9C,CAAC;AAED,0DAA0D;AAC1D,MAAM,UAAU,kBAAkB,CAChC,IAAa,EACb,SAAiC,EACjC,OAAO,GAAqB,EAAE;IAE9B,OAAO,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAA;AAC7E,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cogenta/seo",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Sitemaps, feeds, JSON-LD, hreflang and llms.txt derived from the content schema.",
|
|
5
5
|
"license": "MPL-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"directory": "packages/seo"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@cogenta/core": "0.
|
|
31
|
-
"@cogenta/schema": "0.
|
|
30
|
+
"@cogenta/core": "0.3.0",
|
|
31
|
+
"@cogenta/schema": "0.2.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"typescript": "^7.0.2",
|