@turnipxenon/pineapple 4.3.0 → 4.3.2

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.
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @deprecated use {@PinyaHeadMetaWrap}
3
+ */
1
4
  export interface OverridableMetaProps {
2
5
  title?: string;
3
6
  ogUrl?: string;
@@ -1,3 +1,4 @@
1
1
  export { menuPageServerLoad } from "./route-util/menuPageServerLoad";
2
2
  export { slugPageServerLoad } from "./route-util/slugPageServerLoad";
3
+ export { getSlugEntries } from "./route-util/getSlugEntries";
3
4
  export { default as ParsnipBlog } from "./route-util/ParsnipBlog.svelte";
@@ -1,3 +1,4 @@
1
1
  export { menuPageServerLoad } from "./route-util/menuPageServerLoad";
2
2
  export { slugPageServerLoad } from "./route-util/slugPageServerLoad";
3
+ export { getSlugEntries } from "./route-util/getSlugEntries";
3
4
  export { default as ParsnipBlog } from "./route-util/ParsnipBlog.svelte";
@@ -0,0 +1,3 @@
1
+ export declare const getSlugEntries: () => Promise<{
2
+ slug: string;
3
+ }[]>;
@@ -0,0 +1,17 @@
1
+ // https://svelte.dev/docs/kit/page-options#entries
2
+ import { getCmsBaseUrl } from "../../../util/env-getter";
3
+ export const getSlugEntries = async () => {
4
+ const baseUrl = getCmsBaseUrl();
5
+ const mainMeta = await fetch(`${baseUrl}/main.meta.json`);
6
+ if (!mainMeta.ok) {
7
+ console.error("Failed to get entries");
8
+ return [];
9
+ }
10
+ const parsnipOverall = {
11
+ ...(await mainMeta.json()),
12
+ baseUrl
13
+ };
14
+ return parsnipOverall.files.map(f => ({
15
+ slug: f.slug
16
+ }));
17
+ };
@@ -5,4 +5,7 @@ export interface PinyaHead {
5
5
  ogDescription?: string;
6
6
  ogImage?: string[];
7
7
  }
8
+ export interface PinyaHeadMetaWrap {
9
+ meta: PinyaHead;
10
+ }
8
11
  export declare const pinyaHead: PinyaHead;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@turnipxenon/pineapple",
3
3
  "description": "personal package for base styling for other personal projects",
4
- "version": "4.3.0",
4
+ "version": "4.3.2",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
7
7
  "build": "vite build && yarn package",