@sarimarcus/content-sites-core 0.7.0-rc.0 → 0.7.0-rc.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/CHANGELOG.md +4 -0
- package/dist/url/imageMap.d.ts +4 -3
- package/package.json +1 -1
- package/src/url/imageMap.ts +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All packages in the platform release in lockstep; entries are per release version.
|
|
4
4
|
|
|
5
|
+
## 0.7.0-rc.1 (2026-09-30)
|
|
6
|
+
|
|
7
|
+
- `buildImageMap` / `keyBySlug` are typed with Astro's `ImageMetadata` again, as the site copies were; the generic form typed an untyped `import.meta.glob` result as `unknown` (SLA-2747).
|
|
8
|
+
|
|
5
9
|
## 0.7.0-rc.0 (2026-09-30)
|
|
6
10
|
|
|
7
11
|
- Ships compiled `dist/` (ESM + declarations) for every subpath, so code Node loads directly (factory tests, `astro.config.mjs`) can import core.
|
package/dist/url/imageMap.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { ImageMetadata } from 'astro';
|
|
1
2
|
/**
|
|
2
3
|
* Key an eager `import.meta.glob` result by file basename: `/src/assets/x/<slug>.webp` → `<slug>`.
|
|
3
4
|
* The glob itself must stay a literal at the call site (Vite requires it).
|
|
4
5
|
*/
|
|
5
|
-
export declare function buildImageMap
|
|
6
|
-
default:
|
|
7
|
-
}>): Record<string,
|
|
6
|
+
export declare function buildImageMap(mods: Record<string, {
|
|
7
|
+
default: ImageMetadata;
|
|
8
|
+
}>): Record<string, ImageMetadata>;
|
|
8
9
|
export declare const keyBySlug: typeof buildImageMap;
|
package/package.json
CHANGED
package/src/url/imageMap.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { ImageMetadata } from 'astro';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Key an eager `import.meta.glob` result by file basename: `/src/assets/x/<slug>.webp` → `<slug>`.
|
|
3
5
|
* The glob itself must stay a literal at the call site (Vite requires it).
|
|
4
6
|
*/
|
|
5
|
-
export function buildImageMap
|
|
7
|
+
export function buildImageMap(mods: Record<string, { default: ImageMetadata }>): Record<string, ImageMetadata> {
|
|
6
8
|
return Object.fromEntries(
|
|
7
9
|
Object.entries(mods).map(([path, mod]) => {
|
|
8
10
|
const slug = path.split('/').pop()!.replace('.webp', '');
|