@uploadista/flow-videos-nodes 0.0.16 → 0.0.17-beta.2

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,6 +1,6 @@
1
1
 
2
2
  
3
- > @uploadista/flow-videos-nodes@0.0.16-beta.3 build /Users/denislaboureyras/Documents/uploadista/dev/uploadista-workspace/uploadista-sdk/packages/flow/videos/nodes
3
+ > @uploadista/flow-videos-nodes@0.0.17-beta.1 build /Users/denislaboureyras/Documents/uploadista/dev/uploadista-workspace/uploadista-sdk/packages/flow/videos/nodes
4
4
  > tsdown
5
5
 
6
6
  ℹ tsdown v0.16.5 powered by rolldown v1.0.0-beta.50
@@ -9,14 +9,14 @@
9
9
  ℹ tsconfig: tsconfig.json
10
10
  ℹ Build start
11
11
  ℹ Cleaning 7 files
12
- ℹ [CJS] dist/index.cjs 2.65 kB │ gzip: 0.88 kB
13
- ℹ [CJS] 1 files, total: 2.65 kB
14
- ℹ [ESM] dist/index.mjs  2.44 kB │ gzip: 0.90 kB
15
- ℹ [ESM] dist/index.mjs.map 11.25 kB │ gzip: 2.63 kB
16
- ℹ [ESM] dist/index.d.mts.map  2.10 kB │ gzip: 0.60 kB
12
+ ℹ [CJS] dist/index.cjs 2.83 kB │ gzip: 0.91 kB
13
+ ℹ [CJS] 1 files, total: 2.83 kB
14
+ ℹ [ESM] dist/index.mjs  2.53 kB │ gzip: 0.93 kB
15
+ ℹ [ESM] dist/index.mjs.map 11.66 kB │ gzip: 2.67 kB
16
+ ℹ [ESM] dist/index.d.mts.map  2.10 kB │ gzip: 0.61 kB
17
17
  ℹ [ESM] dist/index.d.mts  9.46 kB │ gzip: 1.50 kB
18
- ℹ [ESM] 4 files, total: 25.24 kB
19
- ℹ [CJS] dist/index.d.cts.map 2.10 kB │ gzip: 0.60 kB
18
+ ℹ [ESM] 4 files, total: 25.74 kB
19
+ ℹ [CJS] dist/index.d.cts.map 2.10 kB │ gzip: 0.61 kB
20
20
  ℹ [CJS] dist/index.d.cts 9.46 kB │ gzip: 1.50 kB
21
21
  ℹ [CJS] 2 files, total: 11.55 kB
22
- ✔ Build complete in 6019ms
22
+ ✔ Build complete in 6791ms
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- let e=require(`@uploadista/core/flow`),t=require(`effect`),n=require(`@uploadista/core/errors`);function r(n){return t.Effect.gen(function*(){let r=yield*e.VideoPlugin;return yield*(0,e.createTransformNode)({id:n,name:`Describe Video`,description:`Extracts video metadata (duration, resolution, codec, etc.)`,transform:(e,n)=>t.Effect.gen(function*(){let t=yield*r.describe(e);return{bytes:e,metadata:{...n.metadata,videoInfo:t}}})})})}function i(n,r){return t.Effect.gen(function*(){let i=yield*e.VideoPlugin;return yield*(0,e.createTransformNode)({id:n,name:`Resize Video`,description:`Changes video resolution`,transform:(e,n)=>t.Effect.map(i.resize(e,r),e=>({bytes:e}))})})}function a(n,r){return t.Effect.gen(function*(){let i=yield*e.VideoPlugin,a=r.format||`jpeg`;return yield*(0,e.createTransformNode)({id:n,name:`Generate Thumbnail`,description:`Extracts a frame from video as an image`,transform:(e,n)=>t.Effect.map(i.extractFrame(e,r),e=>{let t=a===`png`?`image/png`:`image/jpeg`,r=a===`png`?`png`:`jpg`,i=n.metadata?.fileName;return{bytes:e,type:t,fileName:i&&typeof i==`string`?i.replace(/\.[^.]+$/,`.${r}`):void 0}})})})}const o={mp4:`video/mp4`,webm:`video/webm`,mov:`video/quicktime`,avi:`video/x-msvideo`},s={mp4:`mp4`,webm:`webm`,mov:`mov`,avi:`avi`};function c(n,r){return t.Effect.gen(function*(){let i=yield*e.VideoPlugin;return yield*(0,e.createTransformNode)({id:n,name:`Transcode`,description:`Converts video to specified format and codec`,transform:(e,n)=>t.Effect.map(i.transcode(e,r),e=>{let t=o[r.format],i=s[r.format],a=n.metadata?.fileName;return{bytes:e,type:t,fileName:a&&typeof a==`string`?a.replace(/\.[^.]+$/,`.${i}`):void 0}})})})}function l(r,i){return t.Effect.gen(function*(){let a=yield*e.VideoPlugin;return i.endTime!==void 0&&i.endTime<=i.startTime?yield*n.UploadistaError.fromCode(`VALIDATION_ERROR`,{body:`endTime must be greater than startTime`,details:{params:i}}).toEffect():i.duration!==void 0&&i.endTime!==void 0&&i.duration!==i.endTime-i.startTime?yield*n.UploadistaError.fromCode(`VALIDATION_ERROR`,{body:`Cannot specify both endTime and duration with conflicting values`,details:{params:i}}).toEffect():i.duration!==void 0&&i.duration<=0?yield*n.UploadistaError.fromCode(`VALIDATION_ERROR`,{body:`duration must be greater than 0`,details:{params:i}}).toEffect():yield*(0,e.createTransformNode)({id:r,name:`Trim Video`,description:`Extracts a segment from the video`,transform:(e,n)=>t.Effect.map(a.trim(e,i),e=>({bytes:e}))})})}exports.createDescribeVideoNode=r,exports.createTranscodeVideoNode=c,exports.createTrimVideoNode=l,exports.createVideoResizeNode=i,exports.createVideoThumbnailNode=a;
1
+ let e=require(`@uploadista/core/flow`),t=require(`effect`),n=require(`@uploadista/core/errors`);function r(n){return t.Effect.gen(function*(){let r=yield*e.VideoPlugin;return yield*(0,e.createTransformNode)({id:n,name:`Describe Video`,description:`Extracts video metadata (duration, resolution, codec, etc.)`,nodeTypeId:e.STORAGE_OUTPUT_TYPE_ID,transform:(e,n)=>t.Effect.gen(function*(){let t=yield*r.describe(e);return{bytes:e,metadata:{...n.metadata,videoInfo:t}}})})})}function i(n,r){return t.Effect.gen(function*(){let i=yield*e.VideoPlugin;return yield*(0,e.createTransformNode)({id:n,name:`Resize Video`,description:`Changes video resolution`,nodeTypeId:e.STORAGE_OUTPUT_TYPE_ID,transform:(e,n)=>t.Effect.map(i.resize(e,r),e=>({bytes:e}))})})}function a(n,r){return t.Effect.gen(function*(){let i=yield*e.VideoPlugin,a=r.format||`jpeg`;return yield*(0,e.createTransformNode)({id:n,name:`Generate Thumbnail`,description:`Extracts a frame from video as an image`,nodeTypeId:e.STORAGE_OUTPUT_TYPE_ID,transform:(e,n)=>t.Effect.map(i.extractFrame(e,r),e=>{let t=a===`png`?`image/png`:`image/jpeg`,r=a===`png`?`png`:`jpg`,i=n.metadata?.fileName;return{bytes:e,type:t,fileName:i&&typeof i==`string`?i.replace(/\.[^.]+$/,`.${r}`):void 0}})})})}const o={mp4:`video/mp4`,webm:`video/webm`,mov:`video/quicktime`,avi:`video/x-msvideo`},s={mp4:`mp4`,webm:`webm`,mov:`mov`,avi:`avi`};function c(n,r){return t.Effect.gen(function*(){let i=yield*e.VideoPlugin;return yield*(0,e.createTransformNode)({id:n,name:`Transcode`,description:`Converts video to specified format and codec`,nodeTypeId:e.STORAGE_OUTPUT_TYPE_ID,transform:(e,n)=>t.Effect.map(i.transcode(e,r),e=>{let t=o[r.format],i=s[r.format],a=n.metadata?.fileName;return{bytes:e,type:t,fileName:a&&typeof a==`string`?a.replace(/\.[^.]+$/,`.${i}`):void 0}})})})}function l(r,i){return t.Effect.gen(function*(){let a=yield*e.VideoPlugin;return i.endTime!==void 0&&i.endTime<=i.startTime?yield*n.UploadistaError.fromCode(`VALIDATION_ERROR`,{body:`endTime must be greater than startTime`,details:{params:i}}).toEffect():i.duration!==void 0&&i.endTime!==void 0&&i.duration!==i.endTime-i.startTime?yield*n.UploadistaError.fromCode(`VALIDATION_ERROR`,{body:`Cannot specify both endTime and duration with conflicting values`,details:{params:i}}).toEffect():i.duration!==void 0&&i.duration<=0?yield*n.UploadistaError.fromCode(`VALIDATION_ERROR`,{body:`duration must be greater than 0`,details:{params:i}}).toEffect():yield*(0,e.createTransformNode)({id:r,name:`Trim Video`,description:`Extracts a segment from the video`,nodeTypeId:e.STORAGE_OUTPUT_TYPE_ID,transform:(e,n)=>t.Effect.map(a.trim(e,i),e=>({bytes:e}))})})}exports.createDescribeVideoNode=r,exports.createTranscodeVideoNode=c,exports.createTrimVideoNode=l,exports.createVideoResizeNode=i,exports.createVideoThumbnailNode=a;
package/dist/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
- import * as _uploadista_core_flow0 from "@uploadista/core/flow";
1
+ import * as _uploadista_core_flow2 from "@uploadista/core/flow";
2
2
  import { DescribeVideoMetadata, ExtractFrameVideoParams, ExtractFrameVideoParams as ExtractFrameVideoParams$1, ResizeVideoParams, ResizeVideoParams as ResizeVideoParams$1, TranscodeVideoParams, TranscodeVideoParams as TranscodeVideoParams$1, TrimVideoParams, TrimVideoParams as TrimVideoParams$1, VideoPlugin } from "@uploadista/core/flow";
3
- import * as _uploadista_core_types0 from "@uploadista/core/types";
4
- import * as zod_v4_core0 from "zod/v4/core";
5
- import * as zod0 from "zod";
3
+ import * as _uploadista_core_types5 from "@uploadista/core/types";
4
+ import * as zod_v4_core1 from "zod/v4/core";
5
+ import * as zod1 from "zod";
6
6
  import * as _uploadista_core_errors0 from "@uploadista/core/errors";
7
7
  import { UploadistaError } from "@uploadista/core/errors";
8
8
  import * as _uploadista_core_upload0 from "@uploadista/core/upload";
@@ -25,17 +25,17 @@ import { Effect } from "effect";
25
25
  * const node = yield* createDescribeVideoNode("describe-1");
26
26
  * ```
27
27
  */
28
- declare function createDescribeVideoNode(id: string): Effect.Effect<_uploadista_core_flow0.FlowNodeData & {
29
- inputSchema: zod0.ZodType<_uploadista_core_types0.UploadFile, unknown, zod_v4_core0.$ZodTypeInternals<_uploadista_core_types0.UploadFile, unknown>>;
30
- outputSchema: zod0.ZodType<_uploadista_core_types0.UploadFile, unknown, zod_v4_core0.$ZodTypeInternals<_uploadista_core_types0.UploadFile, unknown>>;
28
+ declare function createDescribeVideoNode(id: string): Effect.Effect<_uploadista_core_flow2.FlowNodeData & {
29
+ inputSchema: zod1.ZodType<_uploadista_core_types5.UploadFile, unknown, zod_v4_core1.$ZodTypeInternals<_uploadista_core_types5.UploadFile, unknown>>;
30
+ outputSchema: zod1.ZodType<_uploadista_core_types5.UploadFile, unknown, zod_v4_core1.$ZodTypeInternals<_uploadista_core_types5.UploadFile, unknown>>;
31
31
  run: (args: {
32
- data: _uploadista_core_types0.UploadFile;
32
+ data: _uploadista_core_types5.UploadFile;
33
33
  jobId: string;
34
34
  storageId: string;
35
35
  flowId: string;
36
36
  inputs?: Record<string, unknown>;
37
37
  clientId: string | null;
38
- }) => Effect.Effect<_uploadista_core_flow0.NodeExecutionResult<_uploadista_core_types0.UploadFile>, _uploadista_core_errors0.UploadistaError, never>;
38
+ }) => Effect.Effect<_uploadista_core_flow2.NodeExecutionResult<_uploadista_core_types5.UploadFile>, _uploadista_core_errors0.UploadistaError, never>;
39
39
  condition?: {
40
40
  field: string;
41
41
  operator: string;
@@ -50,7 +50,7 @@ declare function createDescribeVideoNode(id: string): Effect.Effect<_uploadista_
50
50
  exponentialBackoff?: boolean;
51
51
  };
52
52
  } & {
53
- type: _uploadista_core_flow0.NodeType;
53
+ type: _uploadista_core_flow2.NodeType;
54
54
  }, _uploadista_core_errors0.UploadistaError, VideoPlugin | _uploadista_core_upload0.UploadServer>;
55
55
  //#endregion
56
56
  //#region src/resize-node.d.ts
@@ -73,17 +73,17 @@ declare function createDescribeVideoNode(id: string): Effect.Effect<_uploadista_
73
73
  * });
74
74
  * ```
75
75
  */
76
- declare function createVideoResizeNode(id: string, params: ResizeVideoParams$1): Effect.Effect<_uploadista_core_flow0.FlowNodeData & {
77
- inputSchema: zod0.ZodType<_uploadista_core_types0.UploadFile, unknown, zod_v4_core0.$ZodTypeInternals<_uploadista_core_types0.UploadFile, unknown>>;
78
- outputSchema: zod0.ZodType<_uploadista_core_types0.UploadFile, unknown, zod_v4_core0.$ZodTypeInternals<_uploadista_core_types0.UploadFile, unknown>>;
76
+ declare function createVideoResizeNode(id: string, params: ResizeVideoParams$1): Effect.Effect<_uploadista_core_flow2.FlowNodeData & {
77
+ inputSchema: zod1.ZodType<_uploadista_core_types5.UploadFile, unknown, zod_v4_core1.$ZodTypeInternals<_uploadista_core_types5.UploadFile, unknown>>;
78
+ outputSchema: zod1.ZodType<_uploadista_core_types5.UploadFile, unknown, zod_v4_core1.$ZodTypeInternals<_uploadista_core_types5.UploadFile, unknown>>;
79
79
  run: (args: {
80
- data: _uploadista_core_types0.UploadFile;
80
+ data: _uploadista_core_types5.UploadFile;
81
81
  jobId: string;
82
82
  storageId: string;
83
83
  flowId: string;
84
84
  inputs?: Record<string, unknown>;
85
85
  clientId: string | null;
86
- }) => Effect.Effect<_uploadista_core_flow0.NodeExecutionResult<_uploadista_core_types0.UploadFile>, _uploadista_core_errors0.UploadistaError, never>;
86
+ }) => Effect.Effect<_uploadista_core_flow2.NodeExecutionResult<_uploadista_core_types5.UploadFile>, _uploadista_core_errors0.UploadistaError, never>;
87
87
  condition?: {
88
88
  field: string;
89
89
  operator: string;
@@ -98,7 +98,7 @@ declare function createVideoResizeNode(id: string, params: ResizeVideoParams$1):
98
98
  exponentialBackoff?: boolean;
99
99
  };
100
100
  } & {
101
- type: _uploadista_core_flow0.NodeType;
101
+ type: _uploadista_core_flow2.NodeType;
102
102
  }, _uploadista_core_errors0.UploadistaError, VideoPlugin | _uploadista_core_upload0.UploadServer>;
103
103
  //#endregion
104
104
  //#region src/thumbnail-node.d.ts
@@ -120,17 +120,17 @@ declare function createVideoResizeNode(id: string, params: ResizeVideoParams$1):
120
120
  * });
121
121
  * ```
122
122
  */
123
- declare function createVideoThumbnailNode(id: string, params: ExtractFrameVideoParams$1): Effect.Effect<_uploadista_core_flow0.FlowNodeData & {
124
- inputSchema: zod0.ZodType<_uploadista_core_types0.UploadFile, unknown, zod_v4_core0.$ZodTypeInternals<_uploadista_core_types0.UploadFile, unknown>>;
125
- outputSchema: zod0.ZodType<_uploadista_core_types0.UploadFile, unknown, zod_v4_core0.$ZodTypeInternals<_uploadista_core_types0.UploadFile, unknown>>;
123
+ declare function createVideoThumbnailNode(id: string, params: ExtractFrameVideoParams$1): Effect.Effect<_uploadista_core_flow2.FlowNodeData & {
124
+ inputSchema: zod1.ZodType<_uploadista_core_types5.UploadFile, unknown, zod_v4_core1.$ZodTypeInternals<_uploadista_core_types5.UploadFile, unknown>>;
125
+ outputSchema: zod1.ZodType<_uploadista_core_types5.UploadFile, unknown, zod_v4_core1.$ZodTypeInternals<_uploadista_core_types5.UploadFile, unknown>>;
126
126
  run: (args: {
127
- data: _uploadista_core_types0.UploadFile;
127
+ data: _uploadista_core_types5.UploadFile;
128
128
  jobId: string;
129
129
  storageId: string;
130
130
  flowId: string;
131
131
  inputs?: Record<string, unknown>;
132
132
  clientId: string | null;
133
- }) => Effect.Effect<_uploadista_core_flow0.NodeExecutionResult<_uploadista_core_types0.UploadFile>, _uploadista_core_errors0.UploadistaError, never>;
133
+ }) => Effect.Effect<_uploadista_core_flow2.NodeExecutionResult<_uploadista_core_types5.UploadFile>, _uploadista_core_errors0.UploadistaError, never>;
134
134
  condition?: {
135
135
  field: string;
136
136
  operator: string;
@@ -145,7 +145,7 @@ declare function createVideoThumbnailNode(id: string, params: ExtractFrameVideoP
145
145
  exponentialBackoff?: boolean;
146
146
  };
147
147
  } & {
148
- type: _uploadista_core_flow0.NodeType;
148
+ type: _uploadista_core_flow2.NodeType;
149
149
  }, _uploadista_core_errors0.UploadistaError, VideoPlugin | _uploadista_core_upload0.UploadServer>;
150
150
  //#endregion
151
151
  //#region src/transcode-node.d.ts
@@ -167,17 +167,17 @@ declare function createVideoThumbnailNode(id: string, params: ExtractFrameVideoP
167
167
  * });
168
168
  * ```
169
169
  */
170
- declare function createTranscodeVideoNode(id: string, params: TranscodeVideoParams$1): Effect.Effect<_uploadista_core_flow0.FlowNodeData & {
171
- inputSchema: zod0.ZodType<_uploadista_core_types0.UploadFile, unknown, zod_v4_core0.$ZodTypeInternals<_uploadista_core_types0.UploadFile, unknown>>;
172
- outputSchema: zod0.ZodType<_uploadista_core_types0.UploadFile, unknown, zod_v4_core0.$ZodTypeInternals<_uploadista_core_types0.UploadFile, unknown>>;
170
+ declare function createTranscodeVideoNode(id: string, params: TranscodeVideoParams$1): Effect.Effect<_uploadista_core_flow2.FlowNodeData & {
171
+ inputSchema: zod1.ZodType<_uploadista_core_types5.UploadFile, unknown, zod_v4_core1.$ZodTypeInternals<_uploadista_core_types5.UploadFile, unknown>>;
172
+ outputSchema: zod1.ZodType<_uploadista_core_types5.UploadFile, unknown, zod_v4_core1.$ZodTypeInternals<_uploadista_core_types5.UploadFile, unknown>>;
173
173
  run: (args: {
174
- data: _uploadista_core_types0.UploadFile;
174
+ data: _uploadista_core_types5.UploadFile;
175
175
  jobId: string;
176
176
  storageId: string;
177
177
  flowId: string;
178
178
  inputs?: Record<string, unknown>;
179
179
  clientId: string | null;
180
- }) => Effect.Effect<_uploadista_core_flow0.NodeExecutionResult<_uploadista_core_types0.UploadFile>, _uploadista_core_errors0.UploadistaError, never>;
180
+ }) => Effect.Effect<_uploadista_core_flow2.NodeExecutionResult<_uploadista_core_types5.UploadFile>, _uploadista_core_errors0.UploadistaError, never>;
181
181
  condition?: {
182
182
  field: string;
183
183
  operator: string;
@@ -192,7 +192,7 @@ declare function createTranscodeVideoNode(id: string, params: TranscodeVideoPara
192
192
  exponentialBackoff?: boolean;
193
193
  };
194
194
  } & {
195
- type: _uploadista_core_flow0.NodeType;
195
+ type: _uploadista_core_flow2.NodeType;
196
196
  }, _uploadista_core_errors0.UploadistaError, VideoPlugin | _uploadista_core_upload0.UploadServer>;
197
197
  //#endregion
198
198
  //#region src/trim-node.d.ts
@@ -219,17 +219,17 @@ declare function createTranscodeVideoNode(id: string, params: TranscodeVideoPara
219
219
  * });
220
220
  * ```
221
221
  */
222
- declare function createTrimVideoNode(id: string, params: TrimVideoParams$1): Effect.Effect<_uploadista_core_flow0.FlowNodeData & {
223
- inputSchema: zod0.ZodType<_uploadista_core_types0.UploadFile, unknown, zod_v4_core0.$ZodTypeInternals<_uploadista_core_types0.UploadFile, unknown>>;
224
- outputSchema: zod0.ZodType<_uploadista_core_types0.UploadFile, unknown, zod_v4_core0.$ZodTypeInternals<_uploadista_core_types0.UploadFile, unknown>>;
222
+ declare function createTrimVideoNode(id: string, params: TrimVideoParams$1): Effect.Effect<_uploadista_core_flow2.FlowNodeData & {
223
+ inputSchema: zod1.ZodType<_uploadista_core_types5.UploadFile, unknown, zod_v4_core1.$ZodTypeInternals<_uploadista_core_types5.UploadFile, unknown>>;
224
+ outputSchema: zod1.ZodType<_uploadista_core_types5.UploadFile, unknown, zod_v4_core1.$ZodTypeInternals<_uploadista_core_types5.UploadFile, unknown>>;
225
225
  run: (args: {
226
- data: _uploadista_core_types0.UploadFile;
226
+ data: _uploadista_core_types5.UploadFile;
227
227
  jobId: string;
228
228
  storageId: string;
229
229
  flowId: string;
230
230
  inputs?: Record<string, unknown>;
231
231
  clientId: string | null;
232
- }) => Effect.Effect<_uploadista_core_flow0.NodeExecutionResult<_uploadista_core_types0.UploadFile>, UploadistaError, never>;
232
+ }) => Effect.Effect<_uploadista_core_flow2.NodeExecutionResult<_uploadista_core_types5.UploadFile>, UploadistaError, never>;
233
233
  condition?: {
234
234
  field: string;
235
235
  operator: string;
@@ -244,7 +244,7 @@ declare function createTrimVideoNode(id: string, params: TrimVideoParams$1): Eff
244
244
  exponentialBackoff?: boolean;
245
245
  };
246
246
  } & {
247
- type: _uploadista_core_flow0.NodeType;
247
+ type: _uploadista_core_flow2.NodeType;
248
248
  }, UploadistaError, VideoPlugin | _uploadista_core_upload0.UploadServer>;
249
249
  //#endregion
250
250
  export { type DescribeVideoMetadata, type ExtractFrameVideoParams, type ResizeVideoParams, type TranscodeVideoParams, type TrimVideoParams, createDescribeVideoNode, createTranscodeVideoNode, createTrimVideoNode, createVideoResizeNode, createVideoThumbnailNode };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/describe-video-node.ts","../src/resize-node.ts","../src/thumbnail-node.ts","../src/transcode-node.ts","../src/trim-node.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkBA;;;;;;iBAAgB,uBAAA,cAAkC,MAAA,CAAA,OAAX,sBAAA,CAAW,YAAA;4BAAA,uBAAA,CAAA,UAAA;;;;IA0BoqqI,KAAA,EAAA,MAAA;IAAA,SAAA,EAAA,MAAA;;aAAA;;iEAAA,uBAAA,CAAA,U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sBAAA,CAAA,YAAA;4BAAA,uBAAA,CAAA,UAAA;EHCwrqI,YAAA,cAAA,qCAAA,OAAA,gCAAA,qCAAA,OAAA,CAAA,CAAA;EAAA,GAAA,EAAA,CAAA,IAAA,EAAA;;;;;aGiCnqB;;iEAAA,uBAAA,CAAA,UAAA;EH3DjgpI,SAAA,CAAA,EAAA;IAAA,KAAA,EAAA,MAAA;;;;ECQlC,UAAA,CAAA,EAAA,OAAA;EAA0C,WAAA,CAAA,EAAA,OAAA;EAAiB,QAAA,CAAA,EAAA,OAAA;EAAA,KAAA,CAAA,EAAA;;;;;;;;;;;;;;;;;;ADR3E;;;;;;;;;;;;;;;iBIagB,mBAAA,qBAAwC,oBAAe,MAAA,CAAA,OAAA,sBAAA,CAAA,YAAA;4BAAA,uBAAA,CAAA,UAAA;;;;IJbrB,KAAA,EAAA,MAAA;IAAA,SAAA,EAAA,MAAA;;aIyD09oI;;EHjD5/oI,CAAA,EAAA,gBAAA,2CAAqB,CGiDu+oI,uBAAA,CAAA,UAAA,CHjDv+oI,iBAAA,EAAA,KAAA,CAAA;EAAqB,SAAA,CAAA,EAAA;IAAiB,KAAA,EAAA,MAAA;IAAA,QAAA,EAAA,MAAA;;;;;;;;;IAkB43qI,kBAAA,CAAA,EAAA,OAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"index.d.cts","names":[],"sources":["../src/describe-video-node.ts","../src/resize-node.ts","../src/thumbnail-node.ts","../src/transcode-node.ts","../src/trim-node.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA;;;;;;iBAAgB,uBAAA,cAAkC,MAAA,CAAA,OAAX,sBAAA,CAAW,YAAA;4BAAA,uBAAA,CAAA,UAAA;;;;IA2BghlI,KAAA,EAAA,MAAA;IAAA,SAAA,EAAA,MAAA;;aAAA;;iEAAA,uBAAA,CAAA,UAAA;;;;IA3BhhlI,KAAA,EAAA,OAAA;EAAA,CAAA;;;;ECKlC,KAAA,CAAA,EAAA;IAA0C,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qCAAA,OAAA,CAAA,CAAA;EAAA,GAAA,EAAA,CAAA,IAAA,EAAA;;;;;aG8B9pB;;iEAAA,uBAAA,CAAA,UAAA;EHzDl3jI,SAAA,CAAA,EAAA;IAAA,KAAA,EAAA,MAAA;;;;ECKlC,UAAA,CAAA,EAAA,OAAA;EAA0C,WAAA,CAAA,EAAA,OAAA;EAAiB,QAAA,CAAA,EAAA,OAAA;EAAA,KAAA,CAAA,EAAA;;;;;;;;;;;;;;;;;;ADL3E;;;;;;;;;;;;;;;iBIUgB,mBAAA,qBAAwC,oBAAe,MAAA,CAAA,OAAA,sBAAA,CAAA,YAAA;4BAAA,uBAAA,CAAA,UAAA;;;;IJVrB,KAAA,EAAA,MAAA;IAAA,SAAA,EAAA,MAAA;;aIuD20jI;;EHlD72jI,CAAA,EAAA,gBAAA,2CAAqB,CGkDw1jI,uBAAA,CAAA,UAAA,CHlDx1jI,iBAAA,EAAA,KAAA,CAAA;EAAqB,SAAA,CAAA,EAAA;IAAiB,KAAA,EAAA,MAAA;IAAA,QAAA,EAAA,MAAA;;;;;;;;;IAmB6ulI,kBAAA,CAAA,EAAA,OAAA;EAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/describe-video-node.ts","../src/resize-node.ts","../src/thumbnail-node.ts","../src/transcode-node.ts","../src/trim-node.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkBA;;;;;;iBAAgB,uBAAA,cAAkC,MAAA,CAAA,OAAX,sBAAA,CAAW,YAAA;4BAAA,uBAAA,CAAA,UAAA;;;;IA0BoqqI,KAAA,EAAA,MAAA;IAAA,SAAA,EAAA,MAAA;;aAAA;;iEAAA,uBAAA,CAAA,UAAA;;;;IA1BpqqI,KAAA,EAAA,OAAA;EAAA,CAAA;;;;ECQlC,KAAA,CAAA,EAAA;IAA0C,UAAA,CAAA,EAAA,MAAA;IAAiB,UAAA,CAAA,EAAA,MAAA;IAAA,kBAAA,CAA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CnqB;;iEAAA,uBAAA,CAAA,UAAA;EH3DjgpI,SAAA,CAAA,EAAA;IAAA,KAAA,EAAA,MAAA;;;;ECQlC,UAAA,CAAA,EAAA,OAAA;EAA0C,WAAA,CAAA,EAAA,OAAA;EAAiB,QAAA,CAAA,EAAA,OAAA;EAAA,KAAA,CAAA,EAAA;;;;;;;;;;;;;;;;;;ADR3E;;;;;;;;;;;;;;;iBIagB,mBAAA,qBAAwC,oBAAe,MAAA,CAAA,OAAA,sBAAA,CAAA,YAAA;4BAAA,uBAAA,CAAA,UAAA;;;;IJbrB,KAAA,EAAA,MAAA;IAAA,SAAA,EAAA,MAAA;;aIyD09oI;;EHjD5/oI,CAAA,EAAA,gBAAA,2CAAqB,CGiDu+oI,uBAAA,CAAA,UAAA,CHjDv+oI,iBAAA,EAAA,KAAA,CAAA;EAAqB,SAAA,CAAA,EAAA;IAAiB,KAAA,EAAA,MAAA;IAAA,QAAA,EAAA,MAAA;;;;;;;;;IAkB43qI,kBAAA,CAAA,EAAA,OAAA;EAAA,CAAA"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/describe-video-node.ts","../src/resize-node.ts","../src/thumbnail-node.ts","../src/transcode-node.ts","../src/trim-node.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA;;;;;;iBAAgB,uBAAA,cAAkC,MAAA,CAAA,OAAX,sBAAA,CAAW,YAAA;4BAAA,uBAAA,CAAA,UAAA;;;;IA2BghlI,KAAA,EAAA,MAAA;IAAA,SAAA,EAAA,MAAA;;aAAA;;iEAAA,uBAAA,CAAA,UAAA;;;;IA3BhhlI,KAAA,EAAA,OAAA;EAAA,CAAA;;;;ECKlC,KAAA,CAAA,EAAA;IAA0C,UAAA,CAAA,EAAA,MAAA;IAAiB,UAAA,CAAA,EAAA,MAAA;IAAA,kBAAA,CAAA,EAAA,OAAA;;;;;;;;;;;;;;;;ADL3E;;;;;;;;;;iBCKgB,qBAAA,qBAA0C,sBAAiB,MA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;;ECKlC,UAAA,CAAA,EAAA,OAAA;EAA0C,WAAA,CAAA,EAAA,OAAA;EAAiB,QAAA,CAAA,EAAA,OAAA;EAAA,KAAA,CAAA,EAAA;;;;;;;;;;;;;;;;;;ADL3E;;;;;;;;;;;;;;;iBIUgB,mBAAA,qBAAwC,oBAAe,MAAA,CAAA,OAAA,sBAAA,CAAA,YAAA;4BAAA,uBAAA,CAAA,UAAA;;;;IJVrB,KAAA,EAAA,MAAA;IAAA,SAAA,EAAA,MAAA;;aIuD20jI;;EHlD72jI,CAAA,EAAA,gBAAA,2CAAqB,CGkDw1jI,uBAAA,CAAA,UAAA,CHlDx1jI,iBAAA,EAAA,KAAA,CAAA;EAAqB,SAAA,CAAA,EAAA;IAAiB,KAAA,EAAA,MAAA;IAAA,QAAA,EAAA,MAAA;;;;;;;;;IAmB6ulI,kBAAA,CAAA,EAAA,OAAA;EAAA,CAAA"}
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import{VideoPlugin as e,createTransformNode as t}from"@uploadista/core/flow";import{Effect as n}from"effect";import{UploadistaError as r}from"@uploadista/core/errors";function i(r){return n.gen(function*(){let i=yield*e;return yield*t({id:r,name:`Describe Video`,description:`Extracts video metadata (duration, resolution, codec, etc.)`,transform:(e,t)=>n.gen(function*(){let n=yield*i.describe(e);return{bytes:e,metadata:{...t.metadata,videoInfo:n}}})})})}function a(r,i){return n.gen(function*(){let a=yield*e;return yield*t({id:r,name:`Resize Video`,description:`Changes video resolution`,transform:(e,t)=>n.map(a.resize(e,i),e=>({bytes:e}))})})}function o(r,i){return n.gen(function*(){let a=yield*e,o=i.format||`jpeg`;return yield*t({id:r,name:`Generate Thumbnail`,description:`Extracts a frame from video as an image`,transform:(e,t)=>n.map(a.extractFrame(e,i),e=>{let n=o===`png`?`image/png`:`image/jpeg`,r=o===`png`?`png`:`jpg`,i=t.metadata?.fileName;return{bytes:e,type:n,fileName:i&&typeof i==`string`?i.replace(/\.[^.]+$/,`.${r}`):void 0}})})})}const s={mp4:`video/mp4`,webm:`video/webm`,mov:`video/quicktime`,avi:`video/x-msvideo`},c={mp4:`mp4`,webm:`webm`,mov:`mov`,avi:`avi`};function l(r,i){return n.gen(function*(){let a=yield*e;return yield*t({id:r,name:`Transcode`,description:`Converts video to specified format and codec`,transform:(e,t)=>n.map(a.transcode(e,i),e=>{let n=s[i.format],r=c[i.format],a=t.metadata?.fileName;return{bytes:e,type:n,fileName:a&&typeof a==`string`?a.replace(/\.[^.]+$/,`.${r}`):void 0}})})})}function u(i,a){return n.gen(function*(){let o=yield*e;return a.endTime!==void 0&&a.endTime<=a.startTime?yield*r.fromCode(`VALIDATION_ERROR`,{body:`endTime must be greater than startTime`,details:{params:a}}).toEffect():a.duration!==void 0&&a.endTime!==void 0&&a.duration!==a.endTime-a.startTime?yield*r.fromCode(`VALIDATION_ERROR`,{body:`Cannot specify both endTime and duration with conflicting values`,details:{params:a}}).toEffect():a.duration!==void 0&&a.duration<=0?yield*r.fromCode(`VALIDATION_ERROR`,{body:`duration must be greater than 0`,details:{params:a}}).toEffect():yield*t({id:i,name:`Trim Video`,description:`Extracts a segment from the video`,transform:(e,t)=>n.map(o.trim(e,a),e=>({bytes:e}))})})}export{i as createDescribeVideoNode,l as createTranscodeVideoNode,u as createTrimVideoNode,a as createVideoResizeNode,o as createVideoThumbnailNode};
1
+ import{STORAGE_OUTPUT_TYPE_ID as e,VideoPlugin as t,createTransformNode as n}from"@uploadista/core/flow";import{Effect as r}from"effect";import{UploadistaError as i}from"@uploadista/core/errors";function a(i){return r.gen(function*(){let a=yield*t;return yield*n({id:i,name:`Describe Video`,description:`Extracts video metadata (duration, resolution, codec, etc.)`,nodeTypeId:e,transform:(e,t)=>r.gen(function*(){let n=yield*a.describe(e);return{bytes:e,metadata:{...t.metadata,videoInfo:n}}})})})}function o(i,a){return r.gen(function*(){let o=yield*t;return yield*n({id:i,name:`Resize Video`,description:`Changes video resolution`,nodeTypeId:e,transform:(e,t)=>r.map(o.resize(e,a),e=>({bytes:e}))})})}function s(i,a){return r.gen(function*(){let o=yield*t,s=a.format||`jpeg`;return yield*n({id:i,name:`Generate Thumbnail`,description:`Extracts a frame from video as an image`,nodeTypeId:e,transform:(e,t)=>r.map(o.extractFrame(e,a),e=>{let n=s===`png`?`image/png`:`image/jpeg`,r=s===`png`?`png`:`jpg`,i=t.metadata?.fileName;return{bytes:e,type:n,fileName:i&&typeof i==`string`?i.replace(/\.[^.]+$/,`.${r}`):void 0}})})})}const c={mp4:`video/mp4`,webm:`video/webm`,mov:`video/quicktime`,avi:`video/x-msvideo`},l={mp4:`mp4`,webm:`webm`,mov:`mov`,avi:`avi`};function u(i,a){return r.gen(function*(){let o=yield*t;return yield*n({id:i,name:`Transcode`,description:`Converts video to specified format and codec`,nodeTypeId:e,transform:(e,t)=>r.map(o.transcode(e,a),e=>{let n=c[a.format],r=l[a.format],i=t.metadata?.fileName;return{bytes:e,type:n,fileName:i&&typeof i==`string`?i.replace(/\.[^.]+$/,`.${r}`):void 0}})})})}function d(a,o){return r.gen(function*(){let s=yield*t;return o.endTime!==void 0&&o.endTime<=o.startTime?yield*i.fromCode(`VALIDATION_ERROR`,{body:`endTime must be greater than startTime`,details:{params:o}}).toEffect():o.duration!==void 0&&o.endTime!==void 0&&o.duration!==o.endTime-o.startTime?yield*i.fromCode(`VALIDATION_ERROR`,{body:`Cannot specify both endTime and duration with conflicting values`,details:{params:o}}).toEffect():o.duration!==void 0&&o.duration<=0?yield*i.fromCode(`VALIDATION_ERROR`,{body:`duration must be greater than 0`,details:{params:o}}).toEffect():yield*n({id:a,name:`Trim Video`,description:`Extracts a segment from the video`,nodeTypeId:e,transform:(e,t)=>r.map(s.trim(e,o),e=>({bytes:e}))})})}export{a as createDescribeVideoNode,u as createTranscodeVideoNode,d as createTrimVideoNode,o as createVideoResizeNode,s as createVideoThumbnailNode};
2
2
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["formatToMimeType: Record<TranscodeVideoParams[\"format\"], string>","formatToExtension: Record<TranscodeVideoParams[\"format\"], string>"],"sources":["../src/describe-video-node.ts","../src/resize-node.ts","../src/thumbnail-node.ts","../src/transcode-node.ts","../src/trim-node.ts"],"sourcesContent":["import { createTransformNode, VideoPlugin } from \"@uploadista/core/flow\";\nimport { Effect } from \"effect\";\n\n/**\n * Creates a Describe Video metadata extraction node\n *\n * Extracts comprehensive metadata from the video file including duration,\n * resolution, codec, bitrate, and audio information. The metadata is stored\n * in the file context for downstream nodes while passing through the original bytes.\n *\n * @param id - Unique node identifier\n * @returns Effect that resolves to the configured node\n *\n * @example\n * ```typescript\n * const node = yield* createDescribeVideoNode(\"describe-1\");\n * ```\n */\nexport function createDescribeVideoNode(id: string) {\n return Effect.gen(function* () {\n const videoService = yield* VideoPlugin;\n\n return yield* createTransformNode({\n id,\n name: \"Describe Video\",\n description:\n \"Extracts video metadata (duration, resolution, codec, etc.)\",\n transform: (inputBytes, file) =>\n Effect.gen(function* () {\n // Extract metadata\n const metadata = yield* videoService.describe(inputBytes);\n\n // Store metadata in file context for downstream nodes\n return {\n bytes: inputBytes, // Pass through original bytes unchanged\n metadata: {\n ...file.metadata,\n videoInfo: metadata,\n },\n };\n }),\n });\n });\n}\n","import {\n createTransformNode,\n type ResizeVideoParams,\n VideoPlugin,\n} from \"@uploadista/core/flow\";\nimport { Effect } from \"effect\";\n\n/**\n * Creates a Resize video processing node\n *\n * Changes video resolution while optionally maintaining aspect ratio.\n *\n * @param id - Unique node identifier\n * @param params - Resize parameters\n * @returns Effect that resolves to the configured node\n *\n * @example\n * ```typescript\n * const node = yield* createResizeNode(\"resize-1\", {\n * width: 1280,\n * height: 720,\n * aspectRatio: \"keep\",\n * scaling: \"bicubic\"\n * });\n * ```\n */\nexport function createVideoResizeNode(id: string, params: ResizeVideoParams) {\n return Effect.gen(function* () {\n const videoService = yield* VideoPlugin;\n\n return yield* createTransformNode({\n id,\n name: \"Resize Video\",\n description: \"Changes video resolution\",\n transform: (inputBytes, _file) =>\n Effect.map(videoService.resize(inputBytes, params), (resizedBytes) => {\n // Pass through video bytes (no metadata changes needed)\n return {\n bytes: resizedBytes,\n };\n }),\n });\n });\n}\n","import {\n createTransformNode,\n type ExtractFrameVideoParams,\n VideoPlugin,\n} from \"@uploadista/core/flow\";\nimport { Effect } from \"effect\";\n\n/**\n * Creates a Thumbnail generation node\n *\n * Extracts a single frame from the video as an image (JPEG or PNG).\n *\n * @param id - Unique node identifier\n * @param params - Frame extraction parameters\n * @returns Effect that resolves to the configured node\n *\n * @example\n * ```typescript\n * const node = yield* createThumbnailNode(\"thumbnail-1\", {\n * timestamp: 15,\n * format: \"jpeg\",\n * quality: 85\n * });\n * ```\n */\nexport function createVideoThumbnailNode(\n id: string,\n params: ExtractFrameVideoParams,\n) {\n return Effect.gen(function* () {\n const videoService = yield* VideoPlugin;\n\n const format = params.format || \"jpeg\";\n\n return yield* createTransformNode({\n id,\n name: \"Generate Thumbnail\",\n description: \"Extracts a frame from video as an image\",\n transform: (inputBytes, file) =>\n Effect.map(\n videoService.extractFrame(inputBytes, params),\n (imageBytes) => {\n // Map output to image MIME type and extension\n const mimeType = format === \"png\" ? \"image/png\" : \"image/jpeg\";\n const extension = format === \"png\" ? \"png\" : \"jpg\";\n\n // Update file extension\n const fileName = file.metadata?.fileName;\n const newFileName =\n fileName && typeof fileName === \"string\"\n ? fileName.replace(/\\.[^.]+$/, `.${extension}`)\n : undefined;\n\n return {\n bytes: imageBytes,\n type: mimeType,\n fileName: newFileName,\n };\n },\n ),\n });\n });\n}\n","import {\n createTransformNode,\n type TranscodeVideoParams,\n VideoPlugin,\n} from \"@uploadista/core/flow\";\nimport { Effect } from \"effect\";\n\n// Map video format to MIME type\nconst formatToMimeType: Record<TranscodeVideoParams[\"format\"], string> = {\n mp4: \"video/mp4\",\n webm: \"video/webm\",\n mov: \"video/quicktime\",\n avi: \"video/x-msvideo\",\n};\n\n// Map video format to file extension\nconst formatToExtension: Record<TranscodeVideoParams[\"format\"], string> = {\n mp4: \"mp4\",\n webm: \"webm\",\n mov: \"mov\",\n avi: \"avi\",\n};\n\n/**\n * Creates a Transcode video processing node\n *\n * Converts video to specified format and codec, optionally adjusting bitrates.\n *\n * @param id - Unique node identifier\n * @param params - Transcode parameters\n * @returns Effect that resolves to the configured node\n *\n * @example\n * ```typescript\n * const node = yield* createTranscodeNode(\"transcode-1\", {\n * format: \"webm\",\n * codec: \"vp9\",\n * videoBitrate: \"1000k\"\n * });\n * ```\n */\nexport function createTranscodeVideoNode(\n id: string,\n params: TranscodeVideoParams,\n) {\n return Effect.gen(function* () {\n const videoService = yield* VideoPlugin;\n\n return yield* createTransformNode({\n id,\n name: \"Transcode\",\n description: \"Converts video to specified format and codec\",\n transform: (inputBytes, file) =>\n Effect.map(\n videoService.transcode(inputBytes, params),\n (transcodedBytes) => {\n // Update metadata if format changes\n const newType = formatToMimeType[params.format];\n const newExtension = formatToExtension[params.format];\n\n // Update file extension\n const fileName = file.metadata?.fileName;\n const newFileName =\n fileName && typeof fileName === \"string\"\n ? fileName.replace(/\\.[^.]+$/, `.${newExtension}`)\n : undefined;\n\n return {\n bytes: transcodedBytes,\n type: newType,\n fileName: newFileName,\n };\n },\n ),\n });\n });\n}\n","import { UploadistaError } from \"@uploadista/core/errors\";\nimport {\n createTransformNode,\n type TrimVideoParams,\n VideoPlugin,\n} from \"@uploadista/core/flow\";\nimport { Effect } from \"effect\";\n\n/**\n * Creates a Trim video processing node\n *\n * Extracts a segment from the video by time range.\n *\n * @param id - Unique node identifier\n * @param params - Trim parameters\n * @returns Effect that resolves to the configured node\n *\n * @example\n * ```typescript\n * const node = yield* createTrimNode(\"trim-1\", {\n * startTime: 10,\n * endTime: 30\n * });\n *\n * // Or using duration\n * const node2 = yield* createTrimNode(\"trim-2\", {\n * startTime: 10,\n * duration: 20\n * });\n * ```\n */\nexport function createTrimVideoNode(id: string, params: TrimVideoParams) {\n return Effect.gen(function* () {\n const videoService = yield* VideoPlugin;\n\n // Validate params\n if (params.endTime !== undefined && params.endTime <= params.startTime) {\n return yield* UploadistaError.fromCode(\"VALIDATION_ERROR\", {\n body: \"endTime must be greater than startTime\",\n details: { params },\n }).toEffect();\n }\n\n if (\n params.duration !== undefined &&\n params.endTime !== undefined &&\n params.duration !== params.endTime - params.startTime\n ) {\n return yield* UploadistaError.fromCode(\"VALIDATION_ERROR\", {\n body: \"Cannot specify both endTime and duration with conflicting values\",\n details: { params },\n }).toEffect();\n }\n\n if (params.duration !== undefined && params.duration <= 0) {\n return yield* UploadistaError.fromCode(\"VALIDATION_ERROR\", {\n body: \"duration must be greater than 0\",\n details: { params },\n }).toEffect();\n }\n\n return yield* createTransformNode({\n id,\n name: \"Trim Video\",\n description: \"Extracts a segment from the video\",\n transform: (inputBytes, _file) =>\n Effect.map(videoService.trim(inputBytes, params), (trimmedBytes) => {\n // Pass through video bytes\n return {\n bytes: trimmedBytes,\n };\n }),\n });\n });\n}\n"],"mappings":"uKAkBA,SAAgB,EAAwB,EAAY,CAClD,OAAO,EAAO,IAAI,WAAa,CAC7B,IAAM,EAAe,MAAO,EAE5B,OAAO,MAAO,EAAoB,CAChC,KACA,KAAM,iBACN,YACE,8DACF,WAAY,EAAY,IACtB,EAAO,IAAI,WAAa,CAEtB,IAAM,EAAW,MAAO,EAAa,SAAS,EAAW,CAGzD,MAAO,CACL,MAAO,EACP,SAAU,CACR,GAAG,EAAK,SACR,UAAW,EACZ,CACF,EACD,CACL,CAAC,EACF,CChBJ,SAAgB,EAAsB,EAAY,EAA2B,CAC3E,OAAO,EAAO,IAAI,WAAa,CAC7B,IAAM,EAAe,MAAO,EAE5B,OAAO,MAAO,EAAoB,CAChC,KACA,KAAM,eACN,YAAa,2BACb,WAAY,EAAY,IACtB,EAAO,IAAI,EAAa,OAAO,EAAY,EAAO,CAAG,IAE5C,CACL,MAAO,EACR,EACD,CACL,CAAC,EACF,CCjBJ,SAAgB,EACd,EACA,EACA,CACA,OAAO,EAAO,IAAI,WAAa,CAC7B,IAAM,EAAe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AAa,IAAA,IACpB,EAAO,UAAY,IAAA,IACnB,EAAO,WAAa,EAAO,QAAU,EAAO,UAErC,MAAO,EAAgB,SAAS,mBAAoB,CACzD,KAAM,mEACN,QAAS,CAAE,SAAQ,CACpB,CAAC,CAAC,UAAU,CAGX,EAAO,WAAa,IAAA,IAAa,EAAO,UAAY,EAC/C,MAAO,EAAgB,SAAS,mBAAoB,CACzD,KAAM,kCACN,QAAS,CAAE,SAAQ,CACpB,CAAC,CAAC,UAAU,CAGR,MAAO,EAAoB,CAChC,KACA,KAAM,aACN,YAAa,oCACb,WAAY,EAAY,IACtB,EAAO,IAAI,EAAa,KAAK,EAAY,EAAO,CAAG,IAE1C,CACL,MAAO,EACR,EACD,CACL,CAAC,EACF"}
1
+ {"version":3,"file":"index.mjs","names":["formatToMimeType: Record<TranscodeVideoParams[\"format\"], string>","formatToExtension: Record<TranscodeVideoParams[\"format\"], string>"],"sources":["../src/describe-video-node.ts","../src/resize-node.ts","../src/thumbnail-node.ts","../src/transcode-node.ts","../src/trim-node.ts"],"sourcesContent":["import {\n createTransformNode,\n STORAGE_OUTPUT_TYPE_ID,\n VideoPlugin,\n} from \"@uploadista/core/flow\";\nimport { Effect } from \"effect\";\n\n/**\n * Creates a Describe Video metadata extraction node\n *\n * Extracts comprehensive metadata from the video file including duration,\n * resolution, codec, bitrate, and audio information. The metadata is stored\n * in the file context for downstream nodes while passing through the original bytes.\n *\n * @param id - Unique node identifier\n * @returns Effect that resolves to the configured node\n *\n * @example\n * ```typescript\n * const node = yield* createDescribeVideoNode(\"describe-1\");\n * ```\n */\nexport function createDescribeVideoNode(id: string) {\n return Effect.gen(function* () {\n const videoService = yield* VideoPlugin;\n\n return yield* createTransformNode({\n id,\n name: \"Describe Video\",\n description:\n \"Extracts video metadata (duration, resolution, codec, etc.)\",\n nodeTypeId: STORAGE_OUTPUT_TYPE_ID,\n transform: (inputBytes, file) =>\n Effect.gen(function* () {\n // Extract metadata\n const metadata = yield* videoService.describe(inputBytes);\n\n // Store metadata in file context for downstream nodes\n return {\n bytes: inputBytes, // Pass through original bytes unchanged\n metadata: {\n ...file.metadata,\n videoInfo: metadata,\n },\n };\n }),\n });\n });\n}\n","import {\n createTransformNode,\n type ResizeVideoParams,\n STORAGE_OUTPUT_TYPE_ID,\n VideoPlugin,\n} from \"@uploadista/core/flow\";\nimport { Effect } from \"effect\";\n\n/**\n * Creates a Resize video processing node\n *\n * Changes video resolution while optionally maintaining aspect ratio.\n *\n * @param id - Unique node identifier\n * @param params - Resize parameters\n * @returns Effect that resolves to the configured node\n *\n * @example\n * ```typescript\n * const node = yield* createResizeNode(\"resize-1\", {\n * width: 1280,\n * height: 720,\n * aspectRatio: \"keep\",\n * scaling: \"bicubic\"\n * });\n * ```\n */\nexport function createVideoResizeNode(id: string, params: ResizeVideoParams) {\n return Effect.gen(function* () {\n const videoService = yield* VideoPlugin;\n\n return yield* createTransformNode({\n id,\n name: \"Resize Video\",\n description: \"Changes video resolution\",\n nodeTypeId: STORAGE_OUTPUT_TYPE_ID,\n transform: (inputBytes, _file) =>\n Effect.map(videoService.resize(inputBytes, params), (resizedBytes) => {\n // Pass through video bytes (no metadata changes needed)\n return {\n bytes: resizedBytes,\n };\n }),\n });\n });\n}\n","import {\n createTransformNode,\n type ExtractFrameVideoParams,\n STORAGE_OUTPUT_TYPE_ID,\n VideoPlugin,\n} from \"@uploadista/core/flow\";\nimport { Effect } from \"effect\";\n\n/**\n * Creates a Thumbnail generation node\n *\n * Extracts a single frame from the video as an image (JPEG or PNG).\n *\n * @param id - Unique node identifier\n * @param params - Frame extraction parameters\n * @returns Effect that resolves to the configured node\n *\n * @example\n * ```typescript\n * const node = yield* createThumbnailNode(\"thumbnail-1\", {\n * timestamp: 15,\n * format: \"jpeg\",\n * quality: 85\n * });\n * ```\n */\nexport function createVideoThumbnailNode(\n id: string,\n params: ExtractFrameVideoParams,\n) {\n return Effect.gen(function* () {\n const videoService = yield* VideoPlugin;\n\n const format = params.format || \"jpeg\";\n\n return yield* createTransformNode({\n id,\n name: \"Generate Thumbnail\",\n description: \"Extracts a frame from video as an image\",\n nodeTypeId: STORAGE_OUTPUT_TYPE_ID,\n transform: (inputBytes, file) =>\n Effect.map(\n videoService.extractFrame(inputBytes, params),\n (imageBytes) => {\n // Map output to image MIME type and extension\n const mimeType = format === \"png\" ? \"image/png\" : \"image/jpeg\";\n const extension = format === \"png\" ? \"png\" : \"jpg\";\n\n // Update file extension\n const fileName = file.metadata?.fileName;\n const newFileName =\n fileName && typeof fileName === \"string\"\n ? fileName.replace(/\\.[^.]+$/, `.${extension}`)\n : undefined;\n\n return {\n bytes: imageBytes,\n type: mimeType,\n fileName: newFileName,\n };\n },\n ),\n });\n });\n}\n","import {\n createTransformNode,\n STORAGE_OUTPUT_TYPE_ID,\n type TranscodeVideoParams,\n VideoPlugin,\n} from \"@uploadista/core/flow\";\nimport { Effect } from \"effect\";\n\n// Map video format to MIME type\nconst formatToMimeType: Record<TranscodeVideoParams[\"format\"], string> = {\n mp4: \"video/mp4\",\n webm: \"video/webm\",\n mov: \"video/quicktime\",\n avi: \"video/x-msvideo\",\n};\n\n// Map video format to file extension\nconst formatToExtension: Record<TranscodeVideoParams[\"format\"], string> = {\n mp4: \"mp4\",\n webm: \"webm\",\n mov: \"mov\",\n avi: \"avi\",\n};\n\n/**\n * Creates a Transcode video processing node\n *\n * Converts video to specified format and codec, optionally adjusting bitrates.\n *\n * @param id - Unique node identifier\n * @param params - Transcode parameters\n * @returns Effect that resolves to the configured node\n *\n * @example\n * ```typescript\n * const node = yield* createTranscodeNode(\"transcode-1\", {\n * format: \"webm\",\n * codec: \"vp9\",\n * videoBitrate: \"1000k\"\n * });\n * ```\n */\nexport function createTranscodeVideoNode(\n id: string,\n params: TranscodeVideoParams,\n) {\n return Effect.gen(function* () {\n const videoService = yield* VideoPlugin;\n\n return yield* createTransformNode({\n id,\n name: \"Transcode\",\n description: \"Converts video to specified format and codec\",\n nodeTypeId: STORAGE_OUTPUT_TYPE_ID,\n transform: (inputBytes, file) =>\n Effect.map(\n videoService.transcode(inputBytes, params),\n (transcodedBytes) => {\n // Update metadata if format changes\n const newType = formatToMimeType[params.format];\n const newExtension = formatToExtension[params.format];\n\n // Update file extension\n const fileName = file.metadata?.fileName;\n const newFileName =\n fileName && typeof fileName === \"string\"\n ? fileName.replace(/\\.[^.]+$/, `.${newExtension}`)\n : undefined;\n\n return {\n bytes: transcodedBytes,\n type: newType,\n fileName: newFileName,\n };\n },\n ),\n });\n });\n}\n","import { UploadistaError } from \"@uploadista/core/errors\";\nimport {\n createTransformNode,\n STORAGE_OUTPUT_TYPE_ID,\n type TrimVideoParams,\n VideoPlugin,\n} from \"@uploadista/core/flow\";\nimport { Effect } from \"effect\";\n\n/**\n * Creates a Trim video processing node\n *\n * Extracts a segment from the video by time range.\n *\n * @param id - Unique node identifier\n * @param params - Trim parameters\n * @returns Effect that resolves to the configured node\n *\n * @example\n * ```typescript\n * const node = yield* createTrimNode(\"trim-1\", {\n * startTime: 10,\n * endTime: 30\n * });\n *\n * // Or using duration\n * const node2 = yield* createTrimNode(\"trim-2\", {\n * startTime: 10,\n * duration: 20\n * });\n * ```\n */\nexport function createTrimVideoNode(id: string, params: TrimVideoParams) {\n return Effect.gen(function* () {\n const videoService = yield* VideoPlugin;\n\n // Validate params\n if (params.endTime !== undefined && params.endTime <= params.startTime) {\n return yield* UploadistaError.fromCode(\"VALIDATION_ERROR\", {\n body: \"endTime must be greater than startTime\",\n details: { params },\n }).toEffect();\n }\n\n if (\n params.duration !== undefined &&\n params.endTime !== undefined &&\n params.duration !== params.endTime - params.startTime\n ) {\n return yield* UploadistaError.fromCode(\"VALIDATION_ERROR\", {\n body: \"Cannot specify both endTime and duration with conflicting values\",\n details: { params },\n }).toEffect();\n }\n\n if (params.duration !== undefined && params.duration <= 0) {\n return yield* UploadistaError.fromCode(\"VALIDATION_ERROR\", {\n body: \"duration must be greater than 0\",\n details: { params },\n }).toEffect();\n }\n\n return yield* createTransformNode({\n id,\n name: \"Trim Video\",\n description: \"Extracts a segment from the video\",\n nodeTypeId: STORAGE_OUTPUT_TYPE_ID,\n transform: (inputBytes, _file) =>\n Effect.map(videoService.trim(inputBytes, params), (trimmedBytes) => {\n // Pass through video bytes\n return {\n bytes: trimmedBytes,\n };\n }),\n });\n });\n}\n"],"mappings":"mMAsBA,SAAgB,EAAwB,EAAY,CAClD,OAAO,EAAO,IAAI,WAAa,CAC7B,IAAM,EAAe,MAAO,EAE5B,OAAO,MAAO,EAAoB,CAChC,KACA,KAAM,iBACN,YACE,8DACF,WAAY,EACZ,WAAY,EAAY,IACtB,EAAO,IAAI,WAAa,CAEtB,IAAM,EAAW,MAAO,EAAa,SAAS,EAAW,CAGzD,MAAO,CACL,MAAO,EACP,SAAU,CACR,GAAG,EAAK,SACR,UAAW,EACZ,CACF,EACD,CACL,CAAC,EACF,CCpBJ,SAAgB,EAAsB,EAAY,EAA2B,CAC3E,OAAO,EAAO,IAAI,WAAa,CAC7B,IAAM,EAAe,MAAO,EAE5B,OAAO,MAAO,EAAoB,CAChC,KACA,KAAM,eACN,YAAa,2BACb,WAAY,EACZ,WAAY,EAAY,IACtB,EAAO,IAAI,EAAa,OAAO,EAAY,EAAO,CAAG,IAE5C,CACL,MAAO,EACR,EACD,CACL,CAAC,EACF,CClBJ,SAAgB,EACd,EACA,EACA,CACA,OAAO,EAAO,IAAI,WAAa,CAC7B,IAAM,EAAe,MAAO,EAEtB,EAAS,EAAO,QAAU,OAEhC,OAAO,MAAO,EAAoB,CAChC,KACA,KAAM,qBACN,YAAa,0CACb,WAAY,EACZ,WAAY,EAAY,IACtB,EAAO,IACL,EAAa,aAAa,EAAY,EAAO,CAC5C,GAAe,CAEd,IAAM,EAAW,IAAW,MAAQ,YAAc,aAC5C,EAAY,IAAW,MAAQ,MAAQ,MAGvC,EAAW,EAAK,UAAU,SAMhC,MAAO,CACL,MAAO,EACP,KAAM,EACN,SAPA,GAAY,OAAO,GAAa,SAC5B,EAAS,QAAQ,WAAY,IAAI,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aACN,YAAa,oCACb,WAAY,EACZ,WAAY,EAAY,IACtB,EAAO,IAAI,EAAa,KAAK,EAAY,EAAO,CAAG,IAE1C,CACL,MAAO,EACR,EACD,CACL,CAAC,EACF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uploadista/flow-videos-nodes",
3
3
  "type": "module",
4
- "version": "0.0.16",
4
+ "version": "0.0.17-beta.2",
5
5
  "description": "Video processing nodes for Uploadista Flow",
6
6
  "license": "MIT",
7
7
  "author": "Uploadista",
@@ -16,14 +16,14 @@
16
16
  "dependencies": {
17
17
  "effect": "3.19.4",
18
18
  "zod": "4.1.12",
19
- "@uploadista/core": "0.0.16"
19
+ "@uploadista/core": "0.0.17-beta.2"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@effect/vitest": "0.27.0",
23
23
  "@types/node": "24.10.1",
24
24
  "tsdown": "0.16.5",
25
- "vitest": "4.0.9",
26
- "@uploadista/typescript-config": "0.0.16"
25
+ "vitest": "4.0.10",
26
+ "@uploadista/typescript-config": "0.0.17-beta.2"
27
27
  },
28
28
  "scripts": {
29
29
  "build": "tsdown",
@@ -1,4 +1,8 @@
1
- import { createTransformNode, VideoPlugin } from "@uploadista/core/flow";
1
+ import {
2
+ createTransformNode,
3
+ STORAGE_OUTPUT_TYPE_ID,
4
+ VideoPlugin,
5
+ } from "@uploadista/core/flow";
2
6
  import { Effect } from "effect";
3
7
 
4
8
  /**
@@ -25,6 +29,7 @@ export function createDescribeVideoNode(id: string) {
25
29
  name: "Describe Video",
26
30
  description:
27
31
  "Extracts video metadata (duration, resolution, codec, etc.)",
32
+ nodeTypeId: STORAGE_OUTPUT_TYPE_ID,
28
33
  transform: (inputBytes, file) =>
29
34
  Effect.gen(function* () {
30
35
  // Extract metadata
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  createTransformNode,
3
3
  type ResizeVideoParams,
4
+ STORAGE_OUTPUT_TYPE_ID,
4
5
  VideoPlugin,
5
6
  } from "@uploadista/core/flow";
6
7
  import { Effect } from "effect";
@@ -32,6 +33,7 @@ export function createVideoResizeNode(id: string, params: ResizeVideoParams) {
32
33
  id,
33
34
  name: "Resize Video",
34
35
  description: "Changes video resolution",
36
+ nodeTypeId: STORAGE_OUTPUT_TYPE_ID,
35
37
  transform: (inputBytes, _file) =>
36
38
  Effect.map(videoService.resize(inputBytes, params), (resizedBytes) => {
37
39
  // Pass through video bytes (no metadata changes needed)
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  createTransformNode,
3
3
  type ExtractFrameVideoParams,
4
+ STORAGE_OUTPUT_TYPE_ID,
4
5
  VideoPlugin,
5
6
  } from "@uploadista/core/flow";
6
7
  import { Effect } from "effect";
@@ -36,6 +37,7 @@ export function createVideoThumbnailNode(
36
37
  id,
37
38
  name: "Generate Thumbnail",
38
39
  description: "Extracts a frame from video as an image",
40
+ nodeTypeId: STORAGE_OUTPUT_TYPE_ID,
39
41
  transform: (inputBytes, file) =>
40
42
  Effect.map(
41
43
  videoService.extractFrame(inputBytes, params),
@@ -1,5 +1,6 @@
1
1
  import {
2
2
  createTransformNode,
3
+ STORAGE_OUTPUT_TYPE_ID,
3
4
  type TranscodeVideoParams,
4
5
  VideoPlugin,
5
6
  } from "@uploadista/core/flow";
@@ -50,6 +51,7 @@ export function createTranscodeVideoNode(
50
51
  id,
51
52
  name: "Transcode",
52
53
  description: "Converts video to specified format and codec",
54
+ nodeTypeId: STORAGE_OUTPUT_TYPE_ID,
53
55
  transform: (inputBytes, file) =>
54
56
  Effect.map(
55
57
  videoService.transcode(inputBytes, params),
package/src/trim-node.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { UploadistaError } from "@uploadista/core/errors";
2
2
  import {
3
3
  createTransformNode,
4
+ STORAGE_OUTPUT_TYPE_ID,
4
5
  type TrimVideoParams,
5
6
  VideoPlugin,
6
7
  } from "@uploadista/core/flow";
@@ -63,6 +64,7 @@ export function createTrimVideoNode(id: string, params: TrimVideoParams) {
63
64
  id,
64
65
  name: "Trim Video",
65
66
  description: "Extracts a segment from the video",
67
+ nodeTypeId: STORAGE_OUTPUT_TYPE_ID,
66
68
  transform: (inputBytes, _file) =>
67
69
  Effect.map(videoService.trim(inputBytes, params), (trimmedBytes) => {
68
70
  // Pass through video bytes