nuxt-upload-kit 0.1.26 → 0.1.27

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/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-upload-kit",
3
3
  "configKey": "uploadKit",
4
- "version": "0.1.26",
4
+ "version": "0.1.27",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -1,5 +1,3 @@
1
- import { FFmpeg } from "@ffmpeg/ffmpeg";
2
- import { fetchFile, toBlobURL } from "@ffmpeg/util";
3
1
  import { ref } from "vue";
4
2
  const defaultOptions = {
5
3
  convertOptions: []
@@ -7,16 +5,21 @@ const defaultOptions = {
7
5
  const baseURL = "https://unpkg.com/@ffmpeg/core@0.12.6/dist/esm";
8
6
  export const useFFMpeg = (options) => {
9
7
  options = { ...defaultOptions, ...options };
10
- const ffmpeg = new FFmpeg();
8
+ let ffmpeg;
9
+ let _fetchFile;
11
10
  const status = ref("paused");
12
11
  const progress = ref(0);
13
12
  const originalFile = ref();
14
13
  const convertedFile = ref();
15
14
  let _onConvertSuccess;
16
- ffmpeg.on("progress", ({ time }) => {
17
- progress.value = time / 1e6;
18
- });
19
15
  const load = async () => {
16
+ const { FFmpeg } = await import("@ffmpeg/ffmpeg");
17
+ const { toBlobURL, fetchFile } = await import("@ffmpeg/util");
18
+ _fetchFile = fetchFile;
19
+ ffmpeg = new FFmpeg();
20
+ ffmpeg.on("progress", ({ time }) => {
21
+ progress.value = time / 1e6;
22
+ });
20
23
  await ffmpeg.load({
21
24
  coreURL: await toBlobURL(`${baseURL}/ffmpeg-core.js`, "text/javascript"),
22
25
  wasmURL: await toBlobURL(`${baseURL}/ffmpeg-core.wasm`, "application/wasm")
@@ -27,7 +30,7 @@ export const useFFMpeg = (options) => {
27
30
  status.value = "converting";
28
31
  const command = ["-i", "input.avi", ...options.convertOptions, ...convertOptions, "-c", "copy", "output.mp4"];
29
32
  try {
30
- originalFile.value = await fetchFile(options.inputUrl);
33
+ originalFile.value = await _fetchFile(options.inputUrl);
31
34
  await ffmpeg.writeFile("input.avi", originalFile.value);
32
35
  await ffmpeg.exec(command);
33
36
  convertedFile.value = await getModifiedVideo();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-upload-kit",
3
- "version": "0.1.26",
3
+ "version": "0.1.27",
4
4
  "description": "A powerful, plugin-based file upload manager for Nuxt applications",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/genu/nuxt-upload-kit.git",
@@ -53,8 +53,8 @@
53
53
  "mitt": "3.0.1"
54
54
  },
55
55
  "devDependencies": {
56
- "@aws-sdk/client-s3": "3.989.0",
57
- "@aws-sdk/lib-storage": "3.989.0",
56
+ "@aws-sdk/client-s3": "3.995.0",
57
+ "@aws-sdk/lib-storage": "3.995.0",
58
58
  "@azure/storage-file-datalake": "12.29.0",
59
59
  "@ffmpeg/ffmpeg": "0.12.15",
60
60
  "@ffmpeg/util": "0.12.2",
@@ -67,18 +67,18 @@
67
67
  "@types/node": "latest",
68
68
  "@vitejs/plugin-vue": "6.0.4",
69
69
  "@vitest/coverage-v8": "4.0.18",
70
- "eslint": "10.0.0",
70
+ "eslint": "10.0.1",
71
71
  "eslint-config-prettier": "10.1.8",
72
72
  "eslint-plugin-prettier": "5.5.5",
73
73
  "firebase": "12.9.0",
74
- "happy-dom": "20.6.1",
74
+ "happy-dom": "20.7.0",
75
75
  "nuxt": "4.3.1",
76
76
  "prettier": "3.8.1",
77
77
  "typescript": "5.9.3",
78
78
  "unbuild": "3.6.1",
79
79
  "vitest": "4.0.18",
80
80
  "vue": "3.5.28",
81
- "vue-tsc": "3.2.4"
81
+ "vue-tsc": "3.2.5"
82
82
  },
83
83
  "peerDependencies": {
84
84
  "@azure/storage-file-datalake": "^12.0.0",