nuxt-media-library 0.0.44
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/README.md +243 -0
- package/dist/module.d.mts +31 -0
- package/dist/module.d.ts +31 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +118 -0
- package/dist/runtime/components/MLAssetManager/AssetActivity.d.vue.ts +6 -0
- package/dist/runtime/components/MLAssetManager/AssetActivity.vue +13 -0
- package/dist/runtime/components/MLAssetManager/AssetActivity.vue.d.ts +6 -0
- package/dist/runtime/components/MLAssetManager/AssetCard.d.vue.ts +14 -0
- package/dist/runtime/components/MLAssetManager/AssetCard.vue +100 -0
- package/dist/runtime/components/MLAssetManager/AssetCard.vue.d.ts +14 -0
- package/dist/runtime/components/MLAssetManager/AssetDetail.d.vue.ts +14 -0
- package/dist/runtime/components/MLAssetManager/AssetDetail.vue +156 -0
- package/dist/runtime/components/MLAssetManager/AssetDetail.vue.d.ts +14 -0
- package/dist/runtime/components/MLAssetManager/AssetList.d.vue.ts +15 -0
- package/dist/runtime/components/MLAssetManager/AssetList.vue +41 -0
- package/dist/runtime/components/MLAssetManager/AssetList.vue.d.ts +15 -0
- package/dist/runtime/components/MLAssetManager/AssetOverview.d.vue.ts +8 -0
- package/dist/runtime/components/MLAssetManager/AssetOverview.vue +321 -0
- package/dist/runtime/components/MLAssetManager/AssetOverview.vue.d.ts +8 -0
- package/dist/runtime/components/MLAssetManager/AssetPreview.d.vue.ts +10 -0
- package/dist/runtime/components/MLAssetManager/AssetPreview.vue +18 -0
- package/dist/runtime/components/MLAssetManager/AssetPreview.vue.d.ts +10 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewAudio.d.vue.ts +9 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewAudio.vue +21 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewAudio.vue.d.ts +9 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewDocument.d.vue.ts +9 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewDocument.vue +39 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewDocument.vue.d.ts +9 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewFallback.d.vue.ts +7 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewFallback.vue +41 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewFallback.vue.d.ts +7 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewImage.d.vue.ts +9 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewImage.vue +30 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewImage.vue.d.ts +9 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewSidebar.d.vue.ts +15 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewSidebar.vue +69 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewSidebar.vue.d.ts +15 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewVideo.d.vue.ts +9 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewVideo.vue +148 -0
- package/dist/runtime/components/MLAssetManager/AssetPreviewVideo.vue.d.ts +9 -0
- package/dist/runtime/components/MLAssetManager/AssetRenditions.d.vue.ts +8 -0
- package/dist/runtime/components/MLAssetManager/AssetRenditions.vue +148 -0
- package/dist/runtime/components/MLAssetManager/AssetRenditions.vue.d.ts +8 -0
- package/dist/runtime/components/MLAssetManager/Processing.d.vue.ts +8 -0
- package/dist/runtime/components/MLAssetManager/Processing.vue +84 -0
- package/dist/runtime/components/MLAssetManager/Processing.vue.d.ts +8 -0
- package/dist/runtime/components/MLAssetManager/SlotCard.d.vue.ts +17 -0
- package/dist/runtime/components/MLAssetManager/SlotCard.vue +94 -0
- package/dist/runtime/components/MLAssetManager/SlotCard.vue.d.ts +17 -0
- package/dist/runtime/components/MLAssetManager/Widget.d.vue.ts +14 -0
- package/dist/runtime/components/MLAssetManager/Widget.vue +328 -0
- package/dist/runtime/components/MLAssetManager/Widget.vue.d.ts +14 -0
- package/dist/runtime/components/MLPreviewProvider.d.vue.ts +31 -0
- package/dist/runtime/components/MLPreviewProvider.vue +51 -0
- package/dist/runtime/components/MLPreviewProvider.vue.d.ts +31 -0
- package/dist/runtime/components/MLProcessing/Forms/ConfigureStepModal.d.vue.ts +13 -0
- package/dist/runtime/components/MLProcessing/Forms/ConfigureStepModal.vue +47 -0
- package/dist/runtime/components/MLProcessing/Forms/ConfigureStepModal.vue.d.ts +13 -0
- package/dist/runtime/components/MLProcessing/Forms/FramePicker.d.vue.ts +11 -0
- package/dist/runtime/components/MLProcessing/Forms/FramePicker.vue +162 -0
- package/dist/runtime/components/MLProcessing/Forms/FramePicker.vue.d.ts +11 -0
- package/dist/runtime/components/MLProcessing/Forms/StepOptionsForm.d.vue.ts +14 -0
- package/dist/runtime/components/MLProcessing/Forms/StepOptionsForm.vue +113 -0
- package/dist/runtime/components/MLProcessing/Forms/StepOptionsForm.vue.d.ts +14 -0
- package/dist/runtime/components/MLProcessing/Pipeline.d.vue.ts +15 -0
- package/dist/runtime/components/MLProcessing/Pipeline.vue +178 -0
- package/dist/runtime/components/MLProcessing/Pipeline.vue.d.ts +15 -0
- package/dist/runtime/components/MLProcessing/PipelineStepItem.d.vue.ts +20 -0
- package/dist/runtime/components/MLProcessing/PipelineStepItem.vue +309 -0
- package/dist/runtime/components/MLProcessing/PipelineStepItem.vue.d.ts +20 -0
- package/dist/runtime/components/MLProcessing/ProgressBar.d.vue.ts +9 -0
- package/dist/runtime/components/MLProcessing/ProgressBar.vue +27 -0
- package/dist/runtime/components/MLProcessing/ProgressBar.vue.d.ts +9 -0
- package/dist/runtime/components/MLProcessing/StepLayout.d.vue.ts +31 -0
- package/dist/runtime/components/MLProcessing/StepLayout.vue +36 -0
- package/dist/runtime/components/MLProcessing/StepLayout.vue.d.ts +31 -0
- package/dist/runtime/components/MLProcessing/Stepper.d.vue.ts +16 -0
- package/dist/runtime/components/MLProcessing/Stepper.vue +87 -0
- package/dist/runtime/components/MLProcessing/Stepper.vue.d.ts +16 -0
- package/dist/runtime/components/MLProcessing/StepperItem.d.vue.ts +16 -0
- package/dist/runtime/components/MLProcessing/StepperItem.vue +150 -0
- package/dist/runtime/components/MLProcessing/StepperItem.vue.d.ts +16 -0
- package/dist/runtime/components/MLProcessing/TopBar.d.vue.ts +21 -0
- package/dist/runtime/components/MLProcessing/TopBar.vue +46 -0
- package/dist/runtime/components/MLProcessing/TopBar.vue.d.ts +21 -0
- package/dist/runtime/components/MLUploader/ButtonUploader.d.vue.ts +55 -0
- package/dist/runtime/components/MLUploader/ButtonUploader.vue +211 -0
- package/dist/runtime/components/MLUploader/ButtonUploader.vue.d.ts +55 -0
- package/dist/runtime/components/MLUploader/Item.d.vue.ts +34 -0
- package/dist/runtime/components/MLUploader/Item.vue +242 -0
- package/dist/runtime/components/MLUploader/Item.vue.d.ts +34 -0
- package/dist/runtime/components/MLUploader/PolicyPopover.d.vue.ts +7 -0
- package/dist/runtime/components/MLUploader/PolicyPopover.vue +160 -0
- package/dist/runtime/components/MLUploader/PolicyPopover.vue.d.ts +7 -0
- package/dist/runtime/components/MLUploader/Widget.d.vue.ts +44 -0
- package/dist/runtime/components/MLUploader/Widget.vue +251 -0
- package/dist/runtime/components/MLUploader/Widget.vue.d.ts +44 -0
- package/dist/runtime/composables/resourcePolicy/mimeUtils.d.ts +4 -0
- package/dist/runtime/composables/resourcePolicy/mimeUtils.js +71 -0
- package/dist/runtime/composables/resourcePolicy/useMLResourcePolicy.d.ts +17 -0
- package/dist/runtime/composables/resourcePolicy/useMLResourcePolicy.js +150 -0
- package/dist/runtime/composables/useElapsedTimer.d.ts +13 -0
- package/dist/runtime/composables/useElapsedTimer.js +46 -0
- package/dist/runtime/composables/useMLAssetLibrary.d.ts +31 -0
- package/dist/runtime/composables/useMLAssetLibrary.js +53 -0
- package/dist/runtime/composables/useMLAssetManager.d.ts +30 -0
- package/dist/runtime/composables/useMLAssetManager.js +229 -0
- package/dist/runtime/composables/useMLAssetManagerPreview.d.ts +28 -0
- package/dist/runtime/composables/useMLAssetManagerPreview.js +232 -0
- package/dist/runtime/composables/useMLAssetPreview.d.ts +23 -0
- package/dist/runtime/composables/useMLAssetPreview.js +153 -0
- package/dist/runtime/composables/useMLChunkUploader.d.ts +9 -0
- package/dist/runtime/composables/useMLChunkUploader.js +22 -0
- package/dist/runtime/composables/useMLProcessingPipeline.d.ts +38 -0
- package/dist/runtime/composables/useMLProcessingPipeline.js +258 -0
- package/dist/runtime/composables/useMLProcessingStatus.d.ts +34 -0
- package/dist/runtime/composables/useMLProcessingStatus.js +100 -0
- package/dist/runtime/composables/useMLProcessingStepper.d.ts +32 -0
- package/dist/runtime/composables/useMLProcessingStepper.js +280 -0
- package/dist/runtime/composables/useMLProcessingStrategies.d.ts +7 -0
- package/dist/runtime/composables/useMLProcessingStrategies.js +47 -0
- package/dist/runtime/composables/useMLRepeater.d.ts +5 -0
- package/dist/runtime/composables/useMLRepeater.js +11 -0
- package/dist/runtime/css/index.css +1 -0
- package/dist/runtime/index.d.ts +13 -0
- package/dist/runtime/index.js +13 -0
- package/dist/runtime/plugins/asset-direcetive-client.d.ts +2 -0
- package/dist/runtime/plugins/asset-direcetive-client.js +64 -0
- package/dist/runtime/plugins/config.d.ts +13 -0
- package/dist/runtime/plugins/config.js +23 -0
- package/dist/runtime/schemas/resource-policy.schema.d.ts +607 -0
- package/dist/runtime/schemas/resource-policy.schema.js +117 -0
- package/dist/runtime/server/assets-proxy.d.ts +2 -0
- package/dist/runtime/server/assets-proxy.js +81 -0
- package/dist/runtime/server/create-ml-proxy.d.ts +47 -0
- package/dist/runtime/server/create-ml-proxy.js +232 -0
- package/dist/runtime/server/delivery-proxy.d.ts +2 -0
- package/dist/runtime/server/delivery-proxy.js +74 -0
- package/dist/runtime/server/index.d.ts +2 -0
- package/dist/runtime/server/index.js +1 -0
- package/dist/runtime/server/processing-proxy.d.ts +2 -0
- package/dist/runtime/server/processing-proxy.js +55 -0
- package/dist/runtime/server/resource-policy-proxy.d.ts +2 -0
- package/dist/runtime/server/resource-policy-proxy.js +80 -0
- package/dist/runtime/server/tsconfig.json +0 -0
- package/dist/runtime/server/uploads-proxy.d.ts +2 -0
- package/dist/runtime/server/uploads-proxy.js +99 -0
- package/dist/runtime/types/asset.d.ts +174 -0
- package/dist/runtime/types/asset.js +7 -0
- package/dist/runtime/types/preview.d.ts +20 -0
- package/dist/runtime/types/preview.js +0 -0
- package/dist/runtime/types/resourcePolicy.d.ts +77 -0
- package/dist/runtime/types/resourcePolicy.js +25 -0
- package/dist/runtime/types/uploader.d.ts +71 -0
- package/dist/runtime/types/uploader.js +0 -0
- package/dist/runtime/utils/uploader/checksum.d.ts +21 -0
- package/dist/runtime/utils/uploader/checksum.js +23 -0
- package/dist/runtime/utils/uploader/chunking.d.ts +8 -0
- package/dist/runtime/utils/uploader/chunking.js +21 -0
- package/dist/runtime/utils/uploader/uploader.d.ts +20 -0
- package/dist/runtime/utils/uploader/uploader.js +206 -0
- package/dist/types.d.mts +11 -0
- package/package.json +81 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { buildParts, clampPercent } from "./chunking.js";
|
|
2
|
+
import { digestHex, finalSha256HexIfSmall } from "./checksum.js";
|
|
3
|
+
function resolveRoute(route, ...args) {
|
|
4
|
+
if (typeof route === "function") return route(...args);
|
|
5
|
+
if (typeof route !== "string") return "";
|
|
6
|
+
let argIndex = 0;
|
|
7
|
+
return route.replace(/:(\w+)/g, (_match, key) => {
|
|
8
|
+
const value = args[argIndex++];
|
|
9
|
+
if (value === void 0 || value === null) {
|
|
10
|
+
throw new Error(`Missing route param: ${key}`);
|
|
11
|
+
}
|
|
12
|
+
return encodeURIComponent(String(value));
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function getHeaders(cfg) {
|
|
16
|
+
const h = cfg.headers;
|
|
17
|
+
return typeof h === "function" ? h() : h || {};
|
|
18
|
+
}
|
|
19
|
+
async function limitedMap(items, concurrency, worker, signal) {
|
|
20
|
+
const results = Array.from({ length: items.length });
|
|
21
|
+
let idx = 0;
|
|
22
|
+
const runners = Array.from({ length: Math.max(1, concurrency) }, async () => {
|
|
23
|
+
while (true) {
|
|
24
|
+
if (signal?.aborted) throw new DOMException("Aborted", "AbortError");
|
|
25
|
+
const current = idx++;
|
|
26
|
+
if (current >= items.length) break;
|
|
27
|
+
const item = items[current];
|
|
28
|
+
if (item === void 0) break;
|
|
29
|
+
results[current] = await worker(item);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
await Promise.all(runners);
|
|
33
|
+
return results;
|
|
34
|
+
}
|
|
35
|
+
export class ChunkUploader {
|
|
36
|
+
cfg;
|
|
37
|
+
controller = null;
|
|
38
|
+
constructor(cfg) {
|
|
39
|
+
this.cfg = cfg;
|
|
40
|
+
}
|
|
41
|
+
abort() {
|
|
42
|
+
this.controller?.abort();
|
|
43
|
+
}
|
|
44
|
+
async createSession(createPayload) {
|
|
45
|
+
const url = this.cfg.baseURL + resolveRoute(this.cfg.routes.createSession);
|
|
46
|
+
return await $fetch(url, {
|
|
47
|
+
method: "POST",
|
|
48
|
+
headers: {
|
|
49
|
+
"Content-Type": "application/json",
|
|
50
|
+
...getHeaders(this.cfg)
|
|
51
|
+
},
|
|
52
|
+
body: createPayload,
|
|
53
|
+
signal: this.controller?.signal
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
async getSession(sessionId) {
|
|
57
|
+
const url = this.cfg.baseURL + resolveRoute(this.cfg.routes.getSession, sessionId);
|
|
58
|
+
return await $fetch(url, {
|
|
59
|
+
method: "GET",
|
|
60
|
+
headers: {
|
|
61
|
+
...getHeaders(this.cfg)
|
|
62
|
+
},
|
|
63
|
+
signal: this.controller?.signal
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
async uploadPart(params) {
|
|
67
|
+
const { sessionId, partNumber, blob, start, endExclusive, total } = params;
|
|
68
|
+
const url = this.cfg.baseURL + resolveRoute(this.cfg.routes.uploadPart, sessionId, partNumber);
|
|
69
|
+
let partShaHex;
|
|
70
|
+
if (this.cfg.checksum.perPart) {
|
|
71
|
+
const arr = await blob.arrayBuffer();
|
|
72
|
+
partShaHex = await digestHex(this.cfg.checksum.algorithm, arr);
|
|
73
|
+
}
|
|
74
|
+
const headers = {
|
|
75
|
+
...getHeaders(this.cfg),
|
|
76
|
+
"Content-Type": "application/octet-stream",
|
|
77
|
+
"Content-Range": `bytes ${start}-${endExclusive - 1}/${total}`
|
|
78
|
+
};
|
|
79
|
+
if (partShaHex) headers["X-Part-SHA256"] = partShaHex;
|
|
80
|
+
return await $fetch(url, {
|
|
81
|
+
method: "PUT",
|
|
82
|
+
headers,
|
|
83
|
+
body: blob,
|
|
84
|
+
signal: this.controller?.signal
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
async finalize(sessionId, payload) {
|
|
88
|
+
const url = this.cfg.baseURL + resolveRoute(this.cfg.routes.finalize, sessionId);
|
|
89
|
+
return await $fetch(url, {
|
|
90
|
+
method: "POST",
|
|
91
|
+
headers: {
|
|
92
|
+
"Content-Type": "application/json",
|
|
93
|
+
...getHeaders(this.cfg)
|
|
94
|
+
},
|
|
95
|
+
body: payload,
|
|
96
|
+
signal: this.controller?.signal
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
async abortSession(sessionId) {
|
|
100
|
+
const abortRoute = this.cfg.routes.abort;
|
|
101
|
+
if (!abortRoute) return;
|
|
102
|
+
const url = this.cfg.baseURL + resolveRoute(abortRoute, sessionId);
|
|
103
|
+
await $fetch(url, {
|
|
104
|
+
method: "POST",
|
|
105
|
+
headers: {
|
|
106
|
+
...getHeaders(this.cfg)
|
|
107
|
+
},
|
|
108
|
+
signal: this.controller?.signal
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
async uploadFile(file, options) {
|
|
112
|
+
this.controller = new AbortController();
|
|
113
|
+
const concurrency = this.cfg.concurrency;
|
|
114
|
+
const onProgress = options.onProgress;
|
|
115
|
+
const onPartUploaded = options.onPartUploaded;
|
|
116
|
+
const onState = options.onState;
|
|
117
|
+
const totalBytes = file.size;
|
|
118
|
+
let uploadedBytes = 0;
|
|
119
|
+
const emitProgress = () => {
|
|
120
|
+
if (!onProgress) return;
|
|
121
|
+
const percent = clampPercent(uploadedBytes / Math.max(1, totalBytes) * 100);
|
|
122
|
+
const p = { totalBytes, uploadedBytes, percent };
|
|
123
|
+
onProgress(p);
|
|
124
|
+
};
|
|
125
|
+
onState?.({ phase: "init" });
|
|
126
|
+
let expectedSha256Hex;
|
|
127
|
+
if (this.cfg.checksum.final) {
|
|
128
|
+
onState?.({
|
|
129
|
+
phase: "checksum.final.compute",
|
|
130
|
+
message: "Computing final SHA-256 (may be skipped for large files)"
|
|
131
|
+
});
|
|
132
|
+
expectedSha256Hex = await finalSha256HexIfSmall(file).catch(() => void 0);
|
|
133
|
+
}
|
|
134
|
+
let sessionId = options.sessionId;
|
|
135
|
+
let session;
|
|
136
|
+
if (!sessionId) {
|
|
137
|
+
onState?.({ phase: "session.create" });
|
|
138
|
+
const createPayload = {
|
|
139
|
+
...options.create,
|
|
140
|
+
expected_size_bytes: options.create.expected_size_bytes ?? file.size,
|
|
141
|
+
original_filename: options.create.original_filename ?? file.name,
|
|
142
|
+
mime_type: options.create.mime_type ?? file.type,
|
|
143
|
+
// do NOT trust client part size; server decides
|
|
144
|
+
parts_expected: void 0,
|
|
145
|
+
expected_sha256_hex: options.create.expected_sha256_hex ?? expectedSha256Hex
|
|
146
|
+
};
|
|
147
|
+
session = await this.createSession(createPayload);
|
|
148
|
+
sessionId = session.id;
|
|
149
|
+
} else {
|
|
150
|
+
onState?.({ phase: "session.fetch" });
|
|
151
|
+
session = await this.getSession(sessionId);
|
|
152
|
+
if (session.expected_size_bytes != null && session.expected_size_bytes !== file.size) {
|
|
153
|
+
throw new Error("This session was created for a different file size; cannot resume.");
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
const effectivePartSize = session.part_size_bytes ?? this.cfg.partSize;
|
|
157
|
+
const parts = buildParts(file.size, effectivePartSize);
|
|
158
|
+
const partsExpected = parts.length;
|
|
159
|
+
const receivedParts = new Set(session.received_parts || []);
|
|
160
|
+
uploadedBytes = (() => {
|
|
161
|
+
let sum = 0;
|
|
162
|
+
for (const partNo of receivedParts) {
|
|
163
|
+
const idx = partNo - 1;
|
|
164
|
+
const start = idx * effectivePartSize;
|
|
165
|
+
if (start >= file.size) continue;
|
|
166
|
+
const endExclusive = Math.min(start + effectivePartSize, file.size);
|
|
167
|
+
sum += endExclusive - start;
|
|
168
|
+
}
|
|
169
|
+
return sum;
|
|
170
|
+
})();
|
|
171
|
+
emitProgress();
|
|
172
|
+
const queue = parts.filter((p) => !receivedParts.has(p.partNumber));
|
|
173
|
+
onState?.({
|
|
174
|
+
phase: "upload.parts",
|
|
175
|
+
message: `Uploading ${queue.length}/${partsExpected} parts`
|
|
176
|
+
});
|
|
177
|
+
await limitedMap(queue, concurrency, async (p) => {
|
|
178
|
+
if (this.controller?.signal.aborted) throw new DOMException("Aborted", "AbortError");
|
|
179
|
+
const blob = file.slice(p.start, p.endExclusive);
|
|
180
|
+
await this.uploadPart({
|
|
181
|
+
sessionId,
|
|
182
|
+
partNumber: p.partNumber,
|
|
183
|
+
blob,
|
|
184
|
+
start: p.start,
|
|
185
|
+
endExclusive: p.endExclusive,
|
|
186
|
+
total: file.size
|
|
187
|
+
});
|
|
188
|
+
uploadedBytes += p.size;
|
|
189
|
+
onPartUploaded?.(p.partNumber);
|
|
190
|
+
emitProgress();
|
|
191
|
+
return true;
|
|
192
|
+
}, this.controller.signal);
|
|
193
|
+
onState?.({ phase: "finalize" });
|
|
194
|
+
const finalizePayload = {
|
|
195
|
+
expected_sha256_hex: expectedSha256Hex
|
|
196
|
+
};
|
|
197
|
+
const finalizeRes = await this.finalize(sessionId, finalizePayload);
|
|
198
|
+
onState?.({ phase: "done" });
|
|
199
|
+
emitProgress();
|
|
200
|
+
return {
|
|
201
|
+
sessionId,
|
|
202
|
+
finalize: finalizeRes,
|
|
203
|
+
expectedSha256Hex
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
}
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { default } from './module.mjs'
|
|
2
|
+
|
|
3
|
+
export { type ChunkUploaderRoutesConfig, type ModuleOptions } from './module.mjs'
|
|
4
|
+
|
|
5
|
+
export * from '../dist/runtime/types/resourcePolicy.js'
|
|
6
|
+
|
|
7
|
+
export * from '../dist/runtime/types/uploader.js'
|
|
8
|
+
|
|
9
|
+
export * from '../dist/runtime/types/preview.js'
|
|
10
|
+
|
|
11
|
+
export * from '../dist/runtime/types/asset.js'
|
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nuxt-media-library",
|
|
3
|
+
"version": "0.0.44",
|
|
4
|
+
"description": "Nuxt module for media library management — chunked uploads, asset previews, and resource policies",
|
|
5
|
+
"repository": "fritill-team/nuxt-media-library",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"types": "./dist/types.d.mts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/types.d.mts",
|
|
12
|
+
"import": "./dist/module.mjs"
|
|
13
|
+
},
|
|
14
|
+
"./server": {
|
|
15
|
+
"types": "./dist/runtime/server/index.d.ts",
|
|
16
|
+
"import": "./dist/runtime/server/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./style.css": "./dist/runtime/css/index.css"
|
|
19
|
+
},
|
|
20
|
+
"main": "./dist/module.mjs",
|
|
21
|
+
"typesVersions": {
|
|
22
|
+
"*": {
|
|
23
|
+
".": [
|
|
24
|
+
"./dist/types.d.mts"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"files": [
|
|
29
|
+
"dist"
|
|
30
|
+
],
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"dev": "yarn dev:prepare && nuxi dev playground",
|
|
36
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
37
|
+
"build": "nuxt build playground",
|
|
38
|
+
"admin:dev": "yarn dev:prepare && yarn --cwd admin-playground dev",
|
|
39
|
+
"prepack": "nuxt-module-build build",
|
|
40
|
+
"lint": "eslint .",
|
|
41
|
+
"test": "yarn dev:prepare && nuxi prepare test/fixtures/basic && vitest run"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@nuxt/ui": "^4.0.0",
|
|
45
|
+
"dashjs": "^4.7.0 || ^5.0.0",
|
|
46
|
+
"hls.js": "^1.5.0",
|
|
47
|
+
"zod": "^4.0.0"
|
|
48
|
+
},
|
|
49
|
+
"peerDependenciesMeta": {
|
|
50
|
+
"hls.js": {
|
|
51
|
+
"optional": true
|
|
52
|
+
},
|
|
53
|
+
"dashjs": {
|
|
54
|
+
"optional": true
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"packageManager": "yarn@1.22.22",
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@nuxt/kit": "^4.2.2"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@nuxt/devtools": "^3.1.1",
|
|
63
|
+
"@nuxt/devtools-kit": "^2.3.0",
|
|
64
|
+
"@nuxt/devtools-ui-kit": "^3.2.0",
|
|
65
|
+
"@nuxt/eslint-config": "^1.12.1",
|
|
66
|
+
"@nuxt/module-builder": "^1.0.2",
|
|
67
|
+
"@nuxt/schema": "^4.2.2",
|
|
68
|
+
"@nuxt/test-utils": "^3.21.0",
|
|
69
|
+
"@nuxt/ui": "4.3.0",
|
|
70
|
+
"@types/node": "latest",
|
|
71
|
+
"dashjs": "^5.1.1",
|
|
72
|
+
"eslint": "^9.39.2",
|
|
73
|
+
"hls.js": "^1.6.16",
|
|
74
|
+
"nuxt": "^4.2.2",
|
|
75
|
+
"sirv": "^3.0.1",
|
|
76
|
+
"typescript": "~5.9.3",
|
|
77
|
+
"vitest": "^4.0.15",
|
|
78
|
+
"vue-tsc": "^3.1.8",
|
|
79
|
+
"zod": "^4.3.5"
|
|
80
|
+
}
|
|
81
|
+
}
|