includio-cms 0.0.13 → 0.0.14

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.
@@ -10,4 +10,8 @@
10
10
  <ModeWatcher />
11
11
  <Toaster />
12
12
 
13
- {@render children()}
13
+ <svelte:boundary>
14
+ {#snippet pending()}Loading...{/snippet}
15
+
16
+ {@render children()}
17
+ </svelte:boundary>
@@ -3,6 +3,7 @@ import { randomUUID } from 'node:crypto';
3
3
  import { writeFile } from 'node:fs/promises';
4
4
  import sharp from 'sharp';
5
5
  import ffmpeg from 'fluent-ffmpeg';
6
+ const fullDir = process.env.NODE_ENV === 'production' ? `/data/uploads` : `./static/uploads`;
6
7
  // Funkcja pomocnicza do przetwarzania wideo
7
8
  async function processVideo(filepath, filename) {
8
9
  return new Promise((resolve) => {
@@ -45,13 +46,12 @@ async function processVideo(filepath, filename) {
45
46
  .screenshots({
46
47
  timestamps: ['00:00:01'], // Pobieramy klatkę z 1. sekundy
47
48
  filename: thumbnailFilename,
48
- folder: `/data/uploads`,
49
+ folder: fullDir,
49
50
  size: '320x240' // Rozmiar thumbnaiła
50
51
  });
51
52
  });
52
53
  }
53
54
  export function local() {
54
- const fullDir = `/data/uploads`;
55
55
  return {
56
56
  // getFiles: async (): Promise<MediaFile[]> => {
57
57
  // const files = await readdir(dir);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "includio-cms",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run prepack",