@pro-laico/payload-mux 0.1.0 → 0.2.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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/endpoints/upload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,eAAe,CAAA;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAErD;wFACwF;AACxF,eAAO,MAAM,sBAAsB,GAChC,KAAK,GAAG,EAAE,eAAe,qBAAqB,KAAG,
|
|
1
|
+
{"version":3,"file":"upload.d.ts","sourceRoot":"","sources":["../../src/endpoints/upload.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,eAAe,CAAA;AACpC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAErD;wFACwF;AACxF,eAAO,MAAM,sBAAsB,GAChC,KAAK,GAAG,EAAE,eAAe,qBAAqB,KAAG,cAmBjD,CAAA;AAEH;6EAC6E;AAC7E,eAAO,MAAM,mBAAmB,GAC7B,KAAK,GAAG,EAAE,eAAe,qBAAqB,KAAG,cAcjD,CAAA"}
|
package/dist/endpoints/upload.js
CHANGED
|
@@ -6,16 +6,30 @@ import { isAllowed } from "../lib/isAllowed.js";
|
|
|
6
6
|
}, {
|
|
7
7
|
status: 403
|
|
8
8
|
});
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
try {
|
|
10
|
+
const upload = await mux.video.uploads.create({
|
|
11
|
+
cors_origin: pluginOptions.uploadSettings?.cors_origin ?? process.env.NEXT_PUBLIC_SERVER_URL ?? '*',
|
|
12
|
+
new_asset_settings: {
|
|
13
|
+
playback_policy: [
|
|
14
|
+
pluginOptions.playbackPolicy ?? 'public'
|
|
15
|
+
],
|
|
16
|
+
...pluginOptions.uploadSettings?.new_asset_settings
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
return Response.json(upload);
|
|
20
|
+
} catch (err) {
|
|
21
|
+
// Without this, a missing-credentials SDK error propagates as Payload's generic 500 with
|
|
22
|
+
// no [payload-mux] context anywhere (unlike the GET sibling below).
|
|
23
|
+
req.payload.logger.error({
|
|
24
|
+
err,
|
|
25
|
+
msg: '[payload-mux] Failed to create upload'
|
|
26
|
+
});
|
|
27
|
+
return Response.json({
|
|
28
|
+
error: 'Failed to create upload.'
|
|
29
|
+
}, {
|
|
30
|
+
status: 500
|
|
31
|
+
});
|
|
32
|
+
}
|
|
19
33
|
};
|
|
20
34
|
/** `GET /api/mux/upload?id=…` — retrieve a direct-upload by id so the client can read the
|
|
21
35
|
* `asset_id` once Mux assigns it. Gated by the plugin's `access` option. */ export const getMuxUploadHandler = (mux, pluginOptions)=>async (req)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/endpoints/upload.ts"],"sourcesContent":["import type Mux from '@mux/mux-node'\nimport type { PayloadHandler } from 'payload'\nimport { isAllowed } from '../lib/isAllowed'\nimport type { MuxVideoPluginOptions } from '../types'\n\n/** `POST /api/mux/upload` — create a Mux direct-upload and return it (the admin uploader\n * POSTs files straight to the returned URL). Gated by the plugin's `access` option. */\nexport const createMuxUploadHandler =\n (mux: Mux, pluginOptions: MuxVideoPluginOptions): PayloadHandler =>\n async (req) => {\n if (!(await isAllowed(pluginOptions, req))) return Response.json({ error: 'Forbidden.' }, { status: 403 })\n\n const upload = await mux.video.uploads.create({\n
|
|
1
|
+
{"version":3,"sources":["../../src/endpoints/upload.ts"],"sourcesContent":["import type Mux from '@mux/mux-node'\nimport type { PayloadHandler } from 'payload'\nimport { isAllowed } from '../lib/isAllowed'\nimport type { MuxVideoPluginOptions } from '../types'\n\n/** `POST /api/mux/upload` — create a Mux direct-upload and return it (the admin uploader\n * POSTs files straight to the returned URL). Gated by the plugin's `access` option. */\nexport const createMuxUploadHandler =\n (mux: Mux, pluginOptions: MuxVideoPluginOptions): PayloadHandler =>\n async (req) => {\n if (!(await isAllowed(pluginOptions, req))) return Response.json({ error: 'Forbidden.' }, { status: 403 })\n\n try {\n const upload = await mux.video.uploads.create({\n cors_origin: pluginOptions.uploadSettings?.cors_origin ?? process.env.NEXT_PUBLIC_SERVER_URL ?? '*',\n new_asset_settings: {\n playback_policy: [pluginOptions.playbackPolicy ?? 'public'],\n ...pluginOptions.uploadSettings?.new_asset_settings,\n },\n })\n return Response.json(upload)\n } catch (err) {\n // Without this, a missing-credentials SDK error propagates as Payload's generic 500 with\n // no [payload-mux] context anywhere (unlike the GET sibling below).\n req.payload.logger.error({ err, msg: '[payload-mux] Failed to create upload' })\n return Response.json({ error: 'Failed to create upload.' }, { status: 500 })\n }\n }\n\n/** `GET /api/mux/upload?id=…` — retrieve a direct-upload by id so the client can read the\n * `asset_id` once Mux assigns it. Gated by the plugin's `access` option. */\nexport const getMuxUploadHandler =\n (mux: Mux, pluginOptions: MuxVideoPluginOptions): PayloadHandler =>\n async (req) => {\n if (!(await isAllowed(pluginOptions, req))) return Response.json({ error: 'Forbidden.' }, { status: 403 })\n\n const id = req.query?.id as string | undefined\n if (!id) return Response.json({ error: 'Missing upload id.' }, { status: 400 })\n\n try {\n const upload = await mux.video.uploads.retrieve(id)\n return Response.json(upload)\n } catch (err) {\n req.payload.logger.error({ err, msg: `[payload-mux] Failed to retrieve upload '${id}'` })\n return Response.json({ error: 'Failed to retrieve upload.' }, { status: 500 })\n }\n }\n"],"names":["isAllowed","createMuxUploadHandler","mux","pluginOptions","req","Response","json","error","status","upload","video","uploads","create","cors_origin","uploadSettings","process","env","NEXT_PUBLIC_SERVER_URL","new_asset_settings","playback_policy","playbackPolicy","err","payload","logger","msg","getMuxUploadHandler","id","query","retrieve"],"mappings":"AAEA,SAASA,SAAS,QAAQ,sBAAkB;AAG5C;sFACsF,GACtF,OAAO,MAAMC,yBACX,CAACC,KAAUC,gBACX,OAAOC;QACL,IAAI,CAAE,MAAMJ,UAAUG,eAAeC,MAAO,OAAOC,SAASC,IAAI,CAAC;YAAEC,OAAO;QAAa,GAAG;YAAEC,QAAQ;QAAI;QAExG,IAAI;YACF,MAAMC,SAAS,MAAMP,IAAIQ,KAAK,CAACC,OAAO,CAACC,MAAM,CAAC;gBAC5CC,aAAaV,cAAcW,cAAc,EAAED,eAAeE,QAAQC,GAAG,CAACC,sBAAsB,IAAI;gBAChGC,oBAAoB;oBAClBC,iBAAiB;wBAAChB,cAAciB,cAAc,IAAI;qBAAS;oBAC3D,GAAGjB,cAAcW,cAAc,EAAEI,kBAAkB;gBACrD;YACF;YACA,OAAOb,SAASC,IAAI,CAACG;QACvB,EAAE,OAAOY,KAAK;YACZ,yFAAyF;YACzF,oEAAoE;YACpEjB,IAAIkB,OAAO,CAACC,MAAM,CAAChB,KAAK,CAAC;gBAAEc;gBAAKG,KAAK;YAAwC;YAC7E,OAAOnB,SAASC,IAAI,CAAC;gBAAEC,OAAO;YAA2B,GAAG;gBAAEC,QAAQ;YAAI;QAC5E;IACF,EAAC;AAEH;2EAC2E,GAC3E,OAAO,MAAMiB,sBACX,CAACvB,KAAUC,gBACX,OAAOC;QACL,IAAI,CAAE,MAAMJ,UAAUG,eAAeC,MAAO,OAAOC,SAASC,IAAI,CAAC;YAAEC,OAAO;QAAa,GAAG;YAAEC,QAAQ;QAAI;QAExG,MAAMkB,KAAKtB,IAAIuB,KAAK,EAAED;QACtB,IAAI,CAACA,IAAI,OAAOrB,SAASC,IAAI,CAAC;YAAEC,OAAO;QAAqB,GAAG;YAAEC,QAAQ;QAAI;QAE7E,IAAI;YACF,MAAMC,SAAS,MAAMP,IAAIQ,KAAK,CAACC,OAAO,CAACiB,QAAQ,CAACF;YAChD,OAAOrB,SAASC,IAAI,CAACG;QACvB,EAAE,OAAOY,KAAK;YACZjB,IAAIkB,OAAO,CAACC,MAAM,CAAChB,KAAK,CAAC;gBAAEc;gBAAKG,KAAK,CAAC,yCAAyC,EAAEE,GAAG,CAAC,CAAC;YAAC;YACvF,OAAOrB,SAASC,IAAI,CAAC;gBAAEC,OAAO;YAA6B,GAAG;gBAAEC,QAAQ;YAAI;QAC9E;IACF,EAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beforeValidate.d.ts","sourceRoot":"","sources":["../../src/hooks/beforeValidate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,eAAe,CAAA;AACpC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAG3D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AA6BrD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,GAC/B,KAAK,GAAG,EAAE,UAAS,qBAA0B,KAAG,
|
|
1
|
+
{"version":3,"file":"beforeValidate.d.ts","sourceRoot":"","sources":["../../src/hooks/beforeValidate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,GAAG,MAAM,eAAe,CAAA;AACpC,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAA;AAG3D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AA6BrD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,GAC/B,KAAK,GAAG,EAAE,UAAS,qBAA0B,KAAG,4BAyChD,CAAA"}
|
|
@@ -26,26 +26,44 @@ import { ingestMuxAsset } from "../lib/ingest.js";
|
|
|
26
26
|
* Playback policy (and the rest of `new_asset_settings`) come from the plugin's `uploadSettings`
|
|
27
27
|
* — the same config the admin direct-upload path uses — so a seeded video matches an admin-uploaded
|
|
28
28
|
* one. A per-video `source.playbackPolicy` overrides it.
|
|
29
|
-
*/ export const getBeforeValidateHook = (mux, options = {})=>async ({ data })=>{
|
|
29
|
+
*/ export const getBeforeValidateHook = (mux, options = {})=>async ({ data, req })=>{
|
|
30
30
|
const d = data ?? {};
|
|
31
31
|
if (!('source' in d)) return data;
|
|
32
32
|
const { source, ...rest } = d;
|
|
33
33
|
const norm = d.assetId ? null : normalizeSource(source);
|
|
34
34
|
if (!norm) return rest;
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
35
|
+
let asset;
|
|
36
|
+
try {
|
|
37
|
+
asset = await ingestMuxAsset(mux, norm.ref, {
|
|
38
|
+
// Mirror the admin direct-upload path (`upload.ts`): the plugin-level `playbackPolicy`
|
|
39
|
+
// shorthand is the base default, overlaid by the full `uploadSettings.new_asset_settings`,
|
|
40
|
+
// with a per-video `source.playbackPolicy` winning last — so seeded and admin-uploaded
|
|
41
|
+
// videos share one policy.
|
|
42
|
+
newAssetSettings: {
|
|
43
|
+
playback_policy: [
|
|
44
|
+
options.playbackPolicy ?? 'public'
|
|
45
|
+
],
|
|
46
|
+
...options.uploadSettings?.new_asset_settings
|
|
47
|
+
},
|
|
48
|
+
playbackPolicy: norm.playbackPolicy,
|
|
49
|
+
corsOrigin: norm.corsOrigin ?? options.uploadSettings?.cors_origin
|
|
50
|
+
});
|
|
51
|
+
} catch (err) {
|
|
52
|
+
// Wrap with context: the raw error (often the Mux SDK's) names neither the doc nor the
|
|
53
|
+
// plugin, which is what a seed/import consumer actually needs to see.
|
|
54
|
+
const raw = err instanceof Error ? err.message : String(err);
|
|
55
|
+
const inner = raw.replace(/^\[payload-mux\]\s*/, '');
|
|
56
|
+
const hint = /Could not resolve authentication method/i.test(raw) ? ' — Mux credentials are missing; set MUX_TOKEN_ID / MUX_TOKEN_SECRET (or pass initSettings to muxVideoPlugin).' : '';
|
|
57
|
+
const title = typeof d.title === 'string' && d.title ? d.title : '(untitled)';
|
|
58
|
+
const message = `[payload-mux] ingest failed for '${title}' (source: ${norm.ref}): ${inner}${hint}`;
|
|
59
|
+
req.payload.logger.error({
|
|
60
|
+
err,
|
|
61
|
+
msg: message
|
|
62
|
+
});
|
|
63
|
+
throw new Error(message, {
|
|
64
|
+
cause: err
|
|
65
|
+
});
|
|
66
|
+
}
|
|
49
67
|
return {
|
|
50
68
|
...rest,
|
|
51
69
|
assetId: asset.id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/hooks/beforeValidate.ts"],"sourcesContent":["import type Mux from '@mux/mux-node'\nimport type { CollectionBeforeValidateHook } from 'payload'\nimport { getAssetMetadata } from '../lib/getAssetMetadata'\nimport { ingestMuxAsset, type MuxSource } from '../lib/ingest'\nimport type { MuxVideoPluginOptions } from '../types'\n\n/** The transient `source` a caller sets to ingest server-side: a string path/URL, or an\n * object carrying the path/URL plus per-video options. Never persisted. */\ninterface MuxSourceInput {\n file?: string\n url?: string\n playbackPolicy?: 'public' | 'signed'\n posterTimestamp?: number\n corsOrigin?: string\n}\n\ninterface NormalizedSource {\n ref: MuxSource\n playbackPolicy?: 'public' | 'signed'\n corsOrigin?: string\n posterTimestamp?: number\n}\n\n/** Normalize a `source` value (string or object) to a ref + options, or null if unusable. */\nfunction normalizeSource(source: unknown): NormalizedSource | null {\n if (!source) return null\n if (typeof source === 'string') return { ref: source }\n const s = source as MuxSourceInput\n const ref = s.url ?? s.file\n if (!ref) return null\n return { ref, playbackPolicy: s.playbackPolicy, corsOrigin: s.corsOrigin, posterTimestamp: s.posterTimestamp }\n}\n\n/**\n * Server-side ingest. When a doc is created (or updated) with a transient `source` (a local\n * path or `http(s)` URL) and no `assetId` yet, upload it to Mux, wait until the asset is\n * `ready`, and fold the asset id + metadata into the doc — running in `beforeValidate` so it\n * lands before `assetId`'s required check. The `source` key is always stripped so it never\n * persists. Docs that already carry an `assetId` (the admin direct-upload flow, webhook\n * backfill, or pre-resolved seed data) skip ingest entirely.\n *\n * Playback policy (and the rest of `new_asset_settings`) come from the plugin's `uploadSettings`\n * — the same config the admin direct-upload path uses — so a seeded video matches an admin-uploaded\n * one. A per-video `source.playbackPolicy` overrides it.\n */\nexport const getBeforeValidateHook =\n (mux: Mux, options: MuxVideoPluginOptions = {}): CollectionBeforeValidateHook =>\n async ({ data }) => {\n const d = (data ?? {}) as Record<string, unknown>\n if (!('source' in d)) return data\n\n const { source, ...rest } = d\n const norm = d.assetId ? null : normalizeSource(source)\n if (!norm) return rest\n\n
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/beforeValidate.ts"],"sourcesContent":["import type Mux from '@mux/mux-node'\nimport type { CollectionBeforeValidateHook } from 'payload'\nimport { getAssetMetadata } from '../lib/getAssetMetadata'\nimport { ingestMuxAsset, type MuxSource } from '../lib/ingest'\nimport type { MuxVideoPluginOptions } from '../types'\n\n/** The transient `source` a caller sets to ingest server-side: a string path/URL, or an\n * object carrying the path/URL plus per-video options. Never persisted. */\ninterface MuxSourceInput {\n file?: string\n url?: string\n playbackPolicy?: 'public' | 'signed'\n posterTimestamp?: number\n corsOrigin?: string\n}\n\ninterface NormalizedSource {\n ref: MuxSource\n playbackPolicy?: 'public' | 'signed'\n corsOrigin?: string\n posterTimestamp?: number\n}\n\n/** Normalize a `source` value (string or object) to a ref + options, or null if unusable. */\nfunction normalizeSource(source: unknown): NormalizedSource | null {\n if (!source) return null\n if (typeof source === 'string') return { ref: source }\n const s = source as MuxSourceInput\n const ref = s.url ?? s.file\n if (!ref) return null\n return { ref, playbackPolicy: s.playbackPolicy, corsOrigin: s.corsOrigin, posterTimestamp: s.posterTimestamp }\n}\n\n/**\n * Server-side ingest. When a doc is created (or updated) with a transient `source` (a local\n * path or `http(s)` URL) and no `assetId` yet, upload it to Mux, wait until the asset is\n * `ready`, and fold the asset id + metadata into the doc — running in `beforeValidate` so it\n * lands before `assetId`'s required check. The `source` key is always stripped so it never\n * persists. Docs that already carry an `assetId` (the admin direct-upload flow, webhook\n * backfill, or pre-resolved seed data) skip ingest entirely.\n *\n * Playback policy (and the rest of `new_asset_settings`) come from the plugin's `uploadSettings`\n * — the same config the admin direct-upload path uses — so a seeded video matches an admin-uploaded\n * one. A per-video `source.playbackPolicy` overrides it.\n */\nexport const getBeforeValidateHook =\n (mux: Mux, options: MuxVideoPluginOptions = {}): CollectionBeforeValidateHook =>\n async ({ data, req }) => {\n const d = (data ?? {}) as Record<string, unknown>\n if (!('source' in d)) return data\n\n const { source, ...rest } = d\n const norm = d.assetId ? null : normalizeSource(source)\n if (!norm) return rest\n\n let asset: Awaited<ReturnType<typeof ingestMuxAsset>>\n try {\n asset = await ingestMuxAsset(mux, norm.ref, {\n // Mirror the admin direct-upload path (`upload.ts`): the plugin-level `playbackPolicy`\n // shorthand is the base default, overlaid by the full `uploadSettings.new_asset_settings`,\n // with a per-video `source.playbackPolicy` winning last — so seeded and admin-uploaded\n // videos share one policy.\n newAssetSettings: { playback_policy: [options.playbackPolicy ?? 'public'], ...options.uploadSettings?.new_asset_settings },\n playbackPolicy: norm.playbackPolicy,\n corsOrigin: norm.corsOrigin ?? options.uploadSettings?.cors_origin,\n })\n } catch (err) {\n // Wrap with context: the raw error (often the Mux SDK's) names neither the doc nor the\n // plugin, which is what a seed/import consumer actually needs to see.\n const raw = err instanceof Error ? err.message : String(err)\n const inner = raw.replace(/^\\[payload-mux\\]\\s*/, '')\n const hint = /Could not resolve authentication method/i.test(raw)\n ? ' — Mux credentials are missing; set MUX_TOKEN_ID / MUX_TOKEN_SECRET (or pass initSettings to muxVideoPlugin).'\n : ''\n const title = typeof d.title === 'string' && d.title ? d.title : '(untitled)'\n const message = `[payload-mux] ingest failed for '${title}' (source: ${norm.ref}): ${inner}${hint}`\n req.payload.logger.error({ err, msg: message })\n throw new Error(message, { cause: err })\n }\n return {\n ...rest,\n assetId: asset.id,\n ...getAssetMetadata(asset),\n // Ingest waits until the asset is ready, so the status can be stamped directly.\n status: 'ready',\n ...(norm.posterTimestamp !== undefined ? { posterTimestamp: norm.posterTimestamp } : {}),\n }\n }\n"],"names":["getAssetMetadata","ingestMuxAsset","normalizeSource","source","ref","s","url","file","playbackPolicy","corsOrigin","posterTimestamp","getBeforeValidateHook","mux","options","data","req","d","rest","norm","assetId","asset","newAssetSettings","playback_policy","uploadSettings","new_asset_settings","cors_origin","err","raw","Error","message","String","inner","replace","hint","test","title","payload","logger","error","msg","cause","id","status","undefined"],"mappings":"AAEA,SAASA,gBAAgB,QAAQ,6BAAyB;AAC1D,SAASC,cAAc,QAAwB,mBAAe;AAoB9D,2FAA2F,GAC3F,SAASC,gBAAgBC,MAAe;IACtC,IAAI,CAACA,QAAQ,OAAO;IACpB,IAAI,OAAOA,WAAW,UAAU,OAAO;QAAEC,KAAKD;IAAO;IACrD,MAAME,IAAIF;IACV,MAAMC,MAAMC,EAAEC,GAAG,IAAID,EAAEE,IAAI;IAC3B,IAAI,CAACH,KAAK,OAAO;IACjB,OAAO;QAAEA;QAAKI,gBAAgBH,EAAEG,cAAc;QAAEC,YAAYJ,EAAEI,UAAU;QAAEC,iBAAiBL,EAAEK,eAAe;IAAC;AAC/G;AAEA;;;;;;;;;;;CAWC,GACD,OAAO,MAAMC,wBACX,CAACC,KAAUC,UAAiC,CAAC,CAAC,GAC9C,OAAO,EAAEC,IAAI,EAAEC,GAAG,EAAE;QAClB,MAAMC,IAAKF,QAAQ,CAAC;QACpB,IAAI,CAAE,CAAA,YAAYE,CAAAA,GAAI,OAAOF;QAE7B,MAAM,EAAEX,MAAM,EAAE,GAAGc,MAAM,GAAGD;QAC5B,MAAME,OAAOF,EAAEG,OAAO,GAAG,OAAOjB,gBAAgBC;QAChD,IAAI,CAACe,MAAM,OAAOD;QAElB,IAAIG;QACJ,IAAI;YACFA,QAAQ,MAAMnB,eAAeW,KAAKM,KAAKd,GAAG,EAAE;gBAC1C,uFAAuF;gBACvF,2FAA2F;gBAC3F,uFAAuF;gBACvF,2BAA2B;gBAC3BiB,kBAAkB;oBAAEC,iBAAiB;wBAACT,QAAQL,cAAc,IAAI;qBAAS;oBAAE,GAAGK,QAAQU,cAAc,EAAEC,kBAAkB;gBAAC;gBACzHhB,gBAAgBU,KAAKV,cAAc;gBACnCC,YAAYS,KAAKT,UAAU,IAAII,QAAQU,cAAc,EAAEE;YACzD;QACF,EAAE,OAAOC,KAAK;YACZ,uFAAuF;YACvF,sEAAsE;YACtE,MAAMC,MAAMD,eAAeE,QAAQF,IAAIG,OAAO,GAAGC,OAAOJ;YACxD,MAAMK,QAAQJ,IAAIK,OAAO,CAAC,uBAAuB;YACjD,MAAMC,OAAO,2CAA2CC,IAAI,CAACP,OACzD,kHACA;YACJ,MAAMQ,QAAQ,OAAOnB,EAAEmB,KAAK,KAAK,YAAYnB,EAAEmB,KAAK,GAAGnB,EAAEmB,KAAK,GAAG;YACjE,MAAMN,UAAU,CAAC,iCAAiC,EAAEM,MAAM,WAAW,EAAEjB,KAAKd,GAAG,CAAC,GAAG,EAAE2B,QAAQE,MAAM;YACnGlB,IAAIqB,OAAO,CAACC,MAAM,CAACC,KAAK,CAAC;gBAAEZ;gBAAKa,KAAKV;YAAQ;YAC7C,MAAM,IAAID,MAAMC,SAAS;gBAAEW,OAAOd;YAAI;QACxC;QACA,OAAO;YACL,GAAGT,IAAI;YACPE,SAASC,MAAMqB,EAAE;YACjB,GAAGzC,iBAAiBoB,MAAM;YAC1B,gFAAgF;YAChFsB,QAAQ;YACR,GAAIxB,KAAKR,eAAe,KAAKiC,YAAY;gBAAEjC,iBAAiBQ,KAAKR,eAAe;YAAC,IAAI,CAAC,CAAC;QACzF;IACF,EAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pro-laico/payload-mux",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Mux Video for Payload CMS: a Videos collection that uploads straight to Mux, signed or public playback, virtual playback/poster/gif URLs, two-way delete, and an admin uploader + list-view previews.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|