lightnet 3.12.1 → 4.0.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.
Files changed (110) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/__e2e__/basics-fixture.ts +9 -63
  3. package/__e2e__/fixtures/basics/astro.config.mjs +7 -12
  4. package/__e2e__/fixtures/basics/node_modules/.bin/astro +4 -4
  5. package/__e2e__/fixtures/basics/node_modules/.bin/tailwind +2 -2
  6. package/__e2e__/fixtures/basics/node_modules/.bin/tailwindcss +2 -2
  7. package/__e2e__/fixtures/basics/node_modules/.bin/tsc +2 -2
  8. package/__e2e__/fixtures/basics/node_modules/.bin/tsserver +2 -2
  9. package/__e2e__/fixtures/basics/package.json +6 -5
  10. package/__e2e__/fixtures/basics/src/content/categories/christian-living.json +4 -1
  11. package/__e2e__/fixtures/basics/src/content/categories/teens.json +4 -1
  12. package/__e2e__/fixtures/basics/src/content/categories/theology.json +4 -1
  13. package/__e2e__/fixtures/basics/src/content/media/faithful-freestyle--en.json +6 -2
  14. package/__e2e__/fixtures/basics/src/content/media/how-to-kickflip--de.json +6 -1
  15. package/__e2e__/fixtures/basics/src/content/media/skate-sounds--en.json +8 -2
  16. package/__e2e__/fixtures/basics/src/content/media-collections/how-to-articles.json +5 -1
  17. package/__e2e__/fixtures/basics/src/content/media-types/audio.json +5 -2
  18. package/__e2e__/fixtures/basics/src/content/media-types/book.json +10 -4
  19. package/__e2e__/fixtures/basics/src/content/media-types/video.json +5 -2
  20. package/__e2e__/fixtures/basics/src/pages/[locale]/index.astro +0 -1
  21. package/__e2e__/fixtures/basics/src/translations/de.yml +0 -8
  22. package/__e2e__/fixtures/basics/src/translations/en.yml +0 -8
  23. package/__e2e__/global.teardown.ts +2 -2
  24. package/__tests__/astro-integration/config.spec.ts +364 -0
  25. package/__tests__/astro-integration/integration.spec.ts +125 -0
  26. package/__tests__/astro-integration/tailwind.spec.ts +36 -0
  27. package/__tests__/content/content-schema.spec.ts +109 -0
  28. package/__tests__/content/get-media-collections.spec.ts +72 -0
  29. package/__tests__/content/query-media-items.spec.ts +213 -0
  30. package/__tests__/i18n/resolve-current-locale.spec.ts +65 -0
  31. package/__tests__/i18n/translate-map.spec.ts +19 -0
  32. package/__tests__/i18n/translate.spec.ts +91 -0
  33. package/__tests__/pages/details-page/create-content-metadata.spec.ts +43 -25
  34. package/__tests__/pages/details-page/get-translations.spec.ts +56 -0
  35. package/__tests__/utils/paths.spec.ts +116 -0
  36. package/__tests__/utils/urls.spec.ts +9 -4
  37. package/exports/content.ts +7 -2
  38. package/exports/i18n.ts +0 -1
  39. package/exports/index.ts +1 -5
  40. package/exports/utils.ts +0 -1
  41. package/package.json +16 -12
  42. package/src/astro-integration/config.ts +60 -49
  43. package/src/astro-integration/integration.ts +13 -24
  44. package/src/astro-integration/tailwind.ts +86 -0
  45. package/src/astro-integration/validators/validate-inline-translations.ts +51 -0
  46. package/src/astro-integration/validators/validate-languages.ts +39 -0
  47. package/src/astro-integration/virtual.d.ts +8 -6
  48. package/src/astro-integration/vite-plugin-lightnet-config.ts +29 -9
  49. package/src/components/CarouselSection.astro +7 -11
  50. package/src/components/CategoriesSection.astro +2 -2
  51. package/src/components/HighlightSection.astro +4 -7
  52. package/src/components/Icon.tsx +2 -2
  53. package/src/components/MediaGallerySection.astro +88 -68
  54. package/src/components/MediaList.astro +9 -7
  55. package/src/components/SearchInput.astro +7 -4
  56. package/src/components/Section.astro +7 -5
  57. package/src/components/VideoPlayer.astro +2 -3
  58. package/src/content/content-schema.ts +129 -149
  59. package/src/content/get-categories.ts +52 -28
  60. package/src/content/get-languages.ts +29 -8
  61. package/src/content/get-media-collections.ts +43 -0
  62. package/src/content/get-media-types.ts +41 -7
  63. package/src/content/query-media-items.ts +23 -13
  64. package/src/i18n/bcp-47.ts +8 -0
  65. package/src/i18n/get-locale-paths.ts +1 -3
  66. package/src/i18n/locals.d.ts +21 -3
  67. package/src/i18n/locals.ts +18 -11
  68. package/src/i18n/resolve-current-locale.ts +18 -0
  69. package/src/i18n/resolve-language.ts +10 -5
  70. package/src/i18n/translate-map.ts +70 -0
  71. package/src/i18n/translate.ts +68 -47
  72. package/src/layouts/Page.astro +5 -3
  73. package/src/layouts/components/LanguagePicker.astro +22 -17
  74. package/src/layouts/components/Menu.astro +2 -5
  75. package/src/layouts/components/MenuItem.astro +1 -1
  76. package/src/layouts/components/PageNavigation.astro +29 -29
  77. package/src/layouts/components/PageTitle.astro +23 -7
  78. package/src/pages/404Route.astro +2 -1
  79. package/src/pages/RootRoute.astro +6 -1
  80. package/src/pages/details-page/DefaultDetailsPage.astro +9 -2
  81. package/src/pages/details-page/DetailsPageRoute.astro +1 -2
  82. package/src/pages/details-page/components/AudioPanel.astro +7 -3
  83. package/src/pages/details-page/components/AudioPlayer.astro +2 -2
  84. package/src/pages/details-page/components/ContentSection.astro +67 -44
  85. package/src/pages/details-page/components/MediaCollection.astro +8 -4
  86. package/src/pages/details-page/components/MediaCollectionsSection.astro +3 -6
  87. package/src/pages/details-page/components/main-details/EditButton.astro +22 -10
  88. package/src/pages/details-page/components/main-details/OpenButton.astro +17 -12
  89. package/src/pages/details-page/components/main-details/ShareButton.astro +3 -2
  90. package/src/pages/details-page/components/more-details/Categories.astro +5 -3
  91. package/src/pages/details-page/components/more-details/Languages.astro +12 -7
  92. package/src/pages/details-page/utils/create-content-metadata.ts +24 -9
  93. package/src/pages/details-page/utils/get-translations.ts +6 -0
  94. package/src/pages/search-page/components/LoadingSkeleton.tsx +6 -5
  95. package/src/pages/search-page/components/SearchFilter.astro +10 -21
  96. package/src/pages/search-page/components/SearchFilter.tsx +2 -2
  97. package/src/pages/search-page/components/SearchList.astro +10 -7
  98. package/src/pages/search-page/components/SearchListItem.tsx +5 -4
  99. package/src/pages/search-page/hooks/use-search.ts +5 -2
  100. package/src/utils/lazy.ts +20 -0
  101. package/src/utils/paths.ts +40 -3
  102. package/src/utils/urls.ts +1 -2
  103. package/src/utils/verify-schema.ts +12 -10
  104. package/tailwind.config.ts +1 -25
  105. package/vitest.config.js +18 -2
  106. package/src/astro-integration/project-context.ts +0 -5
  107. package/src/content/compare-media-collection-items.ts +0 -24
  108. package/src/i18n/resolve-default-locale.ts +0 -19
  109. package/src/i18n/resolve-locales.ts +0 -5
  110. package/src/pages/details-page/utils/get-collection-items.ts +0 -29
package/CHANGELOG.md CHANGED
@@ -1,5 +1,60 @@
1
1
  # lightnet
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - LightNet now targets Astro v6, so sites using LightNet should upgrade their Astro app and follow the Astro v6 migration guide.
8
+
9
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - LightNet no longer injects Astro `i18n` routing config during setup, and locale-aware code should now use `Astro.locals.i18n.currentLocale`.
10
+
11
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - Label fields now use explicit inline locale maps across config and content, and `t(...)` treats string input strictly as a translation key.
12
+
13
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - `MediaGallerySection` props were renamed for clarity, with `layout` becoming `itemWidth`, `viewLayout` becoming `layout`, and the default layout changing to `"carousel"`.
14
+
15
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - Media item `content` entries now require explicit typed objects with `type: "upload"` or `type: "link"`.
16
+
17
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - DaisyUI was removed from LightNet's built-in Tailwind configuration, so projects using `dy-` classes must install and configure DaisyUI themselves.
18
+
19
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - Deprecated `media-types.detailsPage.coverStyle` support was removed, and cover styling now belongs at top-level `coverImageStyle`.
20
+
21
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - The `verifySchema` and `verifySchemaAsync` utility exports were removed from `lightnet/utils`.
22
+ Replace them with Zod's native parse functions.
23
+
24
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - Collection ownership was reversed from `media[].collections` to `media-collections[].mediaItems`, so collections now define membership and order directly.
25
+
26
+ ### Minor Changes
27
+
28
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - User translation keys no longer need the `x.` prefix, so custom keys can use direct names like `site.title` while built-in LightNet keys remain under `ln.*`.
29
+
30
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - LightNet now uses Lucide icons, and projects should update custom icon names from the deprecated `mdi--` prefix to `lucide--`.
31
+
32
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - LightNet no longer depends on `@astrojs/tailwind`, so sites should remove that package and use LightNet's built-in Tailwind implementation instead.
33
+
34
+ ### Patch Changes
35
+
36
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - `commonId` is now optional for media items in both `lightnet` schema validation and `@lightnet/sveltia-admin`.
37
+
38
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - Avoid a dev-time Vite dependency re-optimization caused by mutating Astro integrations during startup.
39
+
40
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - Export `pathWithBase` from `lightnet/utils` and use that public entrypoint inside `@lightnet/sveltia-admin` so published installs resolve the media edit button controller correctly.
41
+
42
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - Strip the Astro `base` path before resolving the current locale from the URL pathname so localized pages render with the correct site language under deployments like `/docs/de/...`.
43
+
44
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - Preserve inline Vite PostCSS options when LightNet injects Tailwind and Autoprefixer so existing user plugins and PostCSS settings are not dropped.
45
+
46
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - Fix i18n missing-key detection so translations are validated by key presence instead of comparing the translated value to the key.
47
+
48
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - Respect Astro `base` paths when LightNet builds internal page and API URLs so localized links, redirects, search form actions, and search API requests work correctly under subpath deployments such as `/docs`.
49
+
50
+ - [#361](https://github.com/LightNetDev/LightNet/pull/361) [`65b3eec`](https://github.com/LightNetDev/LightNet/commit/65b3eec5b68565237b46c6423d21257ad4747dce) Thanks [@smn-cds](https://github.com/smn-cds)! - Deduplicate media-collection memberships so repeated media items in one collection do not render the same collection multiple times.
51
+
52
+ ## 3.12.2
53
+
54
+ ### Patch Changes
55
+
56
+ - [#359](https://github.com/LightNetDev/LightNet/pull/359) [`1e71adf`](https://github.com/LightNetDev/LightNet/commit/1e71adfd03c218efeb06a20b73132a688a7d0ce3) Thanks [@smn-cds](https://github.com/smn-cds)! - Remove internal image path collection
57
+
3
58
  ## 3.12.1
4
59
 
5
60
  ### Patch Changes
@@ -1,77 +1,23 @@
1
- /**
2
- * This code is based on https://github.com/withastro/starlight/blob/main/packages/starlight/__e2e__/test-utils.ts
3
- * Here is the source license of the original code.
4
- *
5
- * MIT License
6
- *
7
- * Copyright (c) 2023 [Astro contributors](https://github.com/withastro/starlight/graphs/contributors)
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in all
17
- * copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
- * SOFTWARE.
26
- */
27
- import { fileURLToPath } from "node:url"
28
-
29
- import { type Page, test as baseTest } from "@playwright/test"
30
- import { build, preview } from "astro"
1
+ import {
2
+ type AstroFixturePage as LightNetPage,
3
+ createAstroFixturePage,
4
+ resolveFixturePath,
5
+ } from "@internal/e2e-test-utils"
6
+ import { test as baseTest } from "@playwright/test"
31
7
 
32
8
  export { expect, type Locator } from "@playwright/test"
33
9
 
34
- process.env.ASTRO_TELEMETRY_DISABLED = "true"
35
- process.env.ASTRO_DISABLE_UPDATE_CHECK = "true"
36
- const root = fileURLToPath(new URL("./fixtures/basics/", import.meta.url))
10
+ const root = resolveFixturePath(import.meta.url, "./fixtures/basics/")
37
11
 
38
- let server: Server | null = null
39
12
  const test = baseTest.extend<{
40
13
  lightnet: (path?: string) => Promise<LightNetPage>
41
14
  }>({
42
15
  lightnet: ({ page }, use) =>
43
16
  use(async (path) => {
44
- if (!server) {
45
- await build({ logLevel: "error", root })
46
- server = await preview({ logLevel: "error", root })
47
- }
48
- const ln = new LightNetPage(server, page)
17
+ const ln = await createAstroFixturePage(root, page)
49
18
  await ln.goto(path ?? "/")
50
19
  return ln
51
20
  }),
52
21
  })
53
22
 
54
- const teardown = async () => {
55
- await server?.stop()
56
- }
57
-
58
- // A Playwright test fixture accessible from within all tests.
59
- class LightNetPage {
60
- constructor(
61
- private readonly server: Server,
62
- private readonly page: Page,
63
- ) {}
64
-
65
- // Navigate to a URL relative to the server used during a test run and return the resource response.
66
- goto(path: string) {
67
- return this.page.goto(this.resolveURL(path))
68
- }
69
-
70
- resolveURL(path: string) {
71
- return `http://localhost:${this.server.port}${path.replace(/^\/?/, "/")}`
72
- }
73
- }
74
-
75
- type Server = Awaited<ReturnType<typeof preview>>
76
-
77
- export { teardown, test }
23
+ export { test }
@@ -4,37 +4,32 @@ import lightnet from "lightnet"
4
4
 
5
5
  // https://astro.build/config
6
6
  export default defineConfig({
7
- site: "https://test.com",
7
+ site: "https://lightnet.community",
8
8
  integrations: [
9
9
  lightnet({
10
- title: "Basic Test",
11
10
  logo: { src: "./src/assets/logo.png" },
12
- credits: true,
11
+ title: { en: "Basic Test", de: "Basic Test" },
13
12
  languages: [
14
13
  {
15
14
  code: "en",
16
- label: "English",
15
+ label: { en: "English", de: "English" },
17
16
  isDefaultSiteLanguage: true,
18
17
  },
19
18
  {
20
19
  code: "de",
21
- label: "Deutsch",
20
+ label: { en: "Deutsch", de: "Deutsch" },
22
21
  isSiteLanguage: true,
23
22
  },
24
23
  ],
25
24
  favicon: [{ href: "favicon.svg" }],
25
+ credits: true,
26
26
  mainMenu: [
27
27
  {
28
28
  href: "/",
29
- label: "ln.home.title",
29
+ label: { en: "Home", de: "Startseite" },
30
30
  },
31
- { href: "/media", label: "ln.search.title" },
31
+ { href: "/media", label: { en: "Search", de: "Suche" } },
32
32
  ],
33
- experimental: {
34
- admin: {
35
- enabled: true,
36
- },
37
- },
38
33
  }),
39
34
  ],
40
35
  })
@@ -10,12 +10,12 @@ case `uname` in
10
10
  esac
11
11
 
12
12
  if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@5.17.2_@types+node@25.0.3_jiti@2.4.2_lightningcss@1.29.1_rollup@4.57.1_terser@5.39.0_typescript@5.9.3_yaml@2.8.2/node_modules/astro/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@5.17.2_@types+node@25.0.3_jiti@2.4.2_lightningcss@1.29.1_rollup@4.57.1_terser@5.39.0_typescript@5.9.3_yaml@2.8.2/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
13
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@6.1.1_@types+node@24.12.0_jiti@1.21.7_rollup@4.60.1_typescript@5.9.3_yaml@2.8.3/node_modules/astro/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@6.1.1_@types+node@24.12.0_jiti@1.21.7_rollup@4.60.1_typescript@5.9.3_yaml@2.8.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
14
14
  else
15
- export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@5.17.2_@types+node@25.0.3_jiti@2.4.2_lightningcss@1.29.1_rollup@4.57.1_terser@5.39.0_typescript@5.9.3_yaml@2.8.2/node_modules/astro/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@5.17.2_@types+node@25.0.3_jiti@2.4.2_lightningcss@1.29.1_rollup@4.57.1_terser@5.39.0_typescript@5.9.3_yaml@2.8.2/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
15
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@6.1.1_@types+node@24.12.0_jiti@1.21.7_rollup@4.60.1_typescript@5.9.3_yaml@2.8.3/node_modules/astro/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/astro@6.1.1_@types+node@24.12.0_jiti@1.21.7_rollup@4.60.1_typescript@5.9.3_yaml@2.8.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
16
16
  fi
17
17
  if [ -x "$basedir/node" ]; then
18
- exec "$basedir/node" "$basedir/../astro/astro.js" "$@"
18
+ exec "$basedir/node" "$basedir/../astro/bin/astro.mjs" "$@"
19
19
  else
20
- exec node "$basedir/../astro/astro.js" "$@"
20
+ exec node "$basedir/../astro/bin/astro.mjs" "$@"
21
21
  fi
@@ -10,9 +10,9 @@ case `uname` in
10
10
  esac
11
11
 
12
12
  if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.2/node_modules/tailwindcss/lib/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.2/node_modules/tailwindcss/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.2/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
13
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.3/node_modules/tailwindcss/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
14
14
  else
15
- export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.2/node_modules/tailwindcss/lib/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.2/node_modules/tailwindcss/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.2/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
15
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.3/node_modules/tailwindcss/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
16
16
  fi
17
17
  if [ -x "$basedir/node" ]; then
18
18
  exec "$basedir/node" "$basedir/../tailwindcss/lib/cli.js" "$@"
@@ -10,9 +10,9 @@ case `uname` in
10
10
  esac
11
11
 
12
12
  if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.2/node_modules/tailwindcss/lib/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.2/node_modules/tailwindcss/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.2/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
13
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.3/node_modules/tailwindcss/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
14
14
  else
15
- export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.2/node_modules/tailwindcss/lib/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.2/node_modules/tailwindcss/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.2/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
15
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.3/node_modules/tailwindcss/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/tailwindcss@3.4.19_yaml@2.8.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
16
16
  fi
17
17
  if [ -x "$basedir/node" ]; then
18
18
  exec "$basedir/node" "$basedir/../tailwindcss/lib/cli.js" "$@"
@@ -10,9 +10,9 @@ case `uname` in
10
10
  esac
11
11
 
12
12
  if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
13
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
14
14
  else
15
- export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
15
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
16
16
  fi
17
17
  if [ -x "$basedir/node" ]; then
18
18
  exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
@@ -10,9 +10,9 @@ case `uname` in
10
10
  esac
11
11
 
12
12
  if [ -z "$NODE_PATH" ]; then
13
- export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
13
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules"
14
14
  else
15
- export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
15
+ export NODE_PATH="/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/typescript@5.9.3/node_modules:/home/runner/work/LightNet/LightNet/node_modules/.pnpm/node_modules:$NODE_PATH"
16
16
  fi
17
17
  if [ -x "$basedir/node" ]; then
18
18
  exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
@@ -3,12 +3,13 @@
3
3
  "type": "module",
4
4
  "version": "0.0.1",
5
5
  "private": "true",
6
+ "scripts": {
7
+ "dev": "astro dev"
8
+ },
6
9
  "dependencies": {
7
- "@astrojs/react": "^4.4.2",
8
- "@astrojs/tailwind": "^6.0.2",
9
- "@lightnet/decap-admin": "^3.1.4",
10
- "astro": "^5.17.2",
11
- "lightnet": "^3.12.0",
10
+ "@astrojs/react": "^5.0.2",
11
+ "astro": "^6.1.1",
12
+ "lightnet": "^4.0.0",
12
13
  "react": "^19.2.4",
13
14
  "react-dom": "^19.2.4",
14
15
  "sharp": "^0.34.5",
@@ -1,3 +1,6 @@
1
1
  {
2
- "label": "category.christian-living"
2
+ "label": {
3
+ "en": "Christian Living",
4
+ "de": "Glaube leben"
5
+ }
3
6
  }
@@ -1,3 +1,6 @@
1
1
  {
2
- "label": "category.teens"
2
+ "label": {
3
+ "en": "Teens",
4
+ "de": "Teens"
5
+ }
3
6
  }
@@ -1,3 +1,6 @@
1
1
  {
2
- "label": "category.theology"
2
+ "label": {
3
+ "en": "Theology",
4
+ "de": "Theologie"
5
+ }
3
6
  }
@@ -4,10 +4,14 @@
4
4
  "type": "book",
5
5
  "dateCreated": "2024-04-21",
6
6
  "authors": ["Sk8 Ministries"],
7
- "content": [{ "url": "/files/example.pdf" }],
7
+ "content": [
8
+ {
9
+ "type": "upload",
10
+ "url": "/files/example.pdf"
11
+ }
12
+ ],
8
13
  "image": "./images/cover.jpg",
9
14
  "language": "en",
10
15
  "categories": ["christian-living"],
11
- "collections": [{ "collection": "how-to-articles" }],
12
16
  "description": "*How to: Faithful Freestyle* empowers you to express your Christianity through the unique and creative outlet of skateboarding. This book includes:\n\n* **Creative ways to incorporate faith** into your skating routines\n* **Stories of freestyle skaters** who honor God through their sport\n* **Practical advice on witnessing** to others in the skateboarding scene\n* **Inspirational devotions** designed for skaters\n\nEmbrace a faithful freestyle and let every trick and turn reflect your devotion to Christ."
13
17
  }
@@ -3,7 +3,12 @@
3
3
  "title": "Kickflip Anleitung",
4
4
  "type": "video",
5
5
  "dateCreated": "2024-04-21",
6
- "content": [{ "url": "https://www.youtube.com/watch?v=tnpLkUQZODc" }],
6
+ "content": [
7
+ {
8
+ "type": "link",
9
+ "url": "https://www.youtube.com/watch?v=tnpLkUQZODc"
10
+ }
11
+ ],
7
12
  "image": "./images/how-to-kickflip--en.webp",
8
13
  "authors": ["Skiddy Skates"],
9
14
  "language": "de",
@@ -5,8 +5,14 @@
5
5
  "dateCreated": "2024-04-21",
6
6
  "authors": ["Sk8 Ministries"],
7
7
  "content": [
8
- { "url": "/files/example-audio.mp3" },
9
- { "url": "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-2.mp3" }
8
+ {
9
+ "type": "upload",
10
+ "url": "/files/example-audio.mp3"
11
+ },
12
+ {
13
+ "type": "link",
14
+ "url": "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-2.mp3"
15
+ }
10
16
  ],
11
17
  "image": "./images/cover.jpg",
12
18
  "language": "en",
@@ -1,3 +1,7 @@
1
1
  {
2
- "label": "Guides to Living Your Faith"
2
+ "label": {
3
+ "en": "Guides to Living Your Faith",
4
+ "de": "Guides to Living Your Faith"
5
+ },
6
+ "mediaItems": ["faithful-freestyle--en"]
3
7
  }
@@ -1,7 +1,10 @@
1
1
  {
2
- "label": "type.audio",
2
+ "label": {
3
+ "en": "Audio",
4
+ "de": "Audio"
5
+ },
3
6
  "detailsPage": {
4
7
  "layout": "audio"
5
8
  },
6
- "icon": "mdi--music-box-outline"
9
+ "icon": "lucide--music"
7
10
  }
@@ -1,9 +1,15 @@
1
1
  {
2
- "label": "type.book",
2
+ "label": {
3
+ "en": "Book",
4
+ "de": "Buch"
5
+ },
6
+ "coverImageStyle": "book",
3
7
  "detailsPage": {
4
8
  "layout": "default",
5
- "coverStyle": "book",
6
- "openActionLabel": "details.action.read"
9
+ "openActionLabel": {
10
+ "en": "Read",
11
+ "de": "Lesen"
12
+ }
7
13
  },
8
- "icon": "mdi--book-open-blank-variant"
14
+ "icon": "lucide--book-open-text"
9
15
  }
@@ -1,7 +1,10 @@
1
1
  {
2
- "label": "type.video",
2
+ "label": {
3
+ "en": "Video",
4
+ "de": "Video"
5
+ },
3
6
  "detailsPage": {
4
7
  "layout": "video"
5
8
  },
6
- "icon": "mdi--video-outline"
9
+ "icon": "lucide--video"
7
10
  }
@@ -11,6 +11,5 @@ const allItems = await getMediaItems()
11
11
  <MediaGallerySection
12
12
  title={Astro.locals.i18n.t("home.all-items")}
13
13
  items={allItems}
14
- layout="book"
15
14
  />
16
15
  </Page>
@@ -1,9 +1 @@
1
1
  home.all-items: Alle Artikel
2
- category.christian-living: Glaube leben
3
- category.teens: Teens
4
- category.theology: Theologie
5
- type.book: Buch
6
- type.video: Video
7
- type.audio: Audio
8
- details.action.read: Lesen
9
- details.action.watch: Anschauen
@@ -1,9 +1 @@
1
1
  home.all-items: All items
2
- category.christian-living: Christian Living
3
- category.teens: Teens
4
- category.theology: Theology
5
- type.book: Book
6
- type.video: Video
7
- type.audio: Audio
8
- details.action.read: Read
9
- details.action.watch: Watch
@@ -1,5 +1,5 @@
1
- import { teardown } from "./basics-fixture"
1
+ import { teardownAstroFixtures } from "@internal/e2e-test-utils"
2
2
 
3
3
  export default async function globalTeardown() {
4
- await teardown()
4
+ await teardownAstroFixtures()
5
5
  }