@hagicode/hagilight-core 0.4.0 → 0.4.1
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/rss-ownership.d.ts +2 -1
- package/dist/rss-ownership.js +2 -4
- package/package.json +1 -1
package/dist/rss-ownership.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export declare function registerStarlightRssOwner(enabled: boolean): () => void;
|
|
|
20
20
|
/**
|
|
21
21
|
* Decide whether the plain-Astro RSS integration should generate routes.
|
|
22
22
|
* Consumes pending Starlight claims. Returns `'starlight'` when an enabled
|
|
23
|
-
* Starlight RSS integration owns the routes, otherwise `'astro'`.
|
|
23
|
+
* Starlight RSS integration owns the routes, otherwise `'astro'`. A disabled or
|
|
24
|
+
* absent Starlight claim lets the plain-Astro integration own the routes.
|
|
24
25
|
*/
|
|
25
26
|
export declare function resolvePlainAstroRssOwner(integrations?: readonly unknown[]): RssOwnerPackage;
|
package/dist/rss-ownership.js
CHANGED
|
@@ -43,7 +43,8 @@ function claimOf(integration) {
|
|
|
43
43
|
/**
|
|
44
44
|
* Decide whether the plain-Astro RSS integration should generate routes.
|
|
45
45
|
* Consumes pending Starlight claims. Returns `'starlight'` when an enabled
|
|
46
|
-
* Starlight RSS integration owns the routes, otherwise `'astro'`.
|
|
46
|
+
* Starlight RSS integration owns the routes, otherwise `'astro'`. A disabled or
|
|
47
|
+
* absent Starlight claim lets the plain-Astro integration own the routes.
|
|
47
48
|
*/
|
|
48
49
|
export function resolvePlainAstroRssOwner(integrations = []) {
|
|
49
50
|
const owners = registry();
|
|
@@ -58,8 +59,5 @@ export function resolvePlainAstroRssOwner(integrations = []) {
|
|
|
58
59
|
}
|
|
59
60
|
if (active.length === 1)
|
|
60
61
|
return 'starlight';
|
|
61
|
-
if (starlightOwners.length > 0) {
|
|
62
|
-
throw new Error('Hagilight RSS cannot establish route ownership: Starlight RSS is explicitly disabled while hagilightRss() requests feed generation. Enable Starlight RSS or remove hagilightRss().');
|
|
63
|
-
}
|
|
64
62
|
return 'astro';
|
|
65
63
|
}
|