@crvouga/mockingbird-service-mediaconvert 0.1.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # Changelog — @crvouga/mockingbird-service-mediaconvert
2
+
3
+ ## 0.1.0 (2026-09-22)
4
+
5
+ Initial release.
package/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # @crvouga/mockingbird-service-mediaconvert
2
+
3
+ Stateful AWS Elemental MediaConvert mock for the official SDK v3 client. It supports endpoint discovery, asynchronous jobs, deterministic controls, EventBridge-compatible events, and output writes to a configured mock S3 service.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -D @crvouga/mockingbird-service-mediaconvert
9
+ ```
10
+
11
+ ESM only. Node 22+ or Bun 1.2+.
12
+
13
+ ## Usage
14
+
15
+ ```ts
16
+ import { createServer } from "@crvouga/mockingbird-service-mediaconvert/server"
17
+
18
+ const mock = await createServer()
19
+ // Point the discovery MediaConvertClient at mock.url. DescribeEndpoints returns
20
+ // mock.url for constructing the second client used to submit jobs.
21
+ const health = await fetch(`${mock.url}/health`)
22
+ ```
23
+
24
+ Supported operations are DescribeEndpoints, CreateJob, GetJob, and CancelJob. CreateJob retains Role, Queue, UserMetadata, and the complete nested Settings structure. A repeated ClientRequestToken returns the original job.
25
+
26
+ ## Controls
27
+
28
+ - `GET /__admin/jobs` and `GET /__admin/jobs/:id` inspect submitted jobs and exact settings.
29
+ - `POST /__admin/jobs/:id/transition` accepts `status` (`PROGRESSING`, `COMPLETE`, `ERROR`, or `CANCELED`) plus optional `progress`, `durationInMs`, `size`, `names`, `errorCode`, and `errorMessage`.
30
+ - Completing a job writes deterministic output bytes to each HLS or file-group S3 destination when `s3.endpoint` is configured.
31
+ - Every state change emits an EventBridge-compatible `MediaConvert Job State Change` event through the shared webhook hub.
32
+ - Fault presets are `too_many_requests`, `internal_error`, and `unavailable`.
33
+
34
+ The shared runtime provides reset, clock, journal, metrics, faults, and namespace isolation.
35
+
36
+ ## API
37
+
38
+ - `MediaConvertAPI`, `MediaConvertAPIOptions`, `MediaConvertEvent`, `TransitionOptions`: portable handler, events, and deterministic controls.
39
+ - `MediaConvertJob`, `MediaConvertJobStatus`, `OutputGroupDetail`: durable job state.
40
+ - `createRuntime`, `MediaConvertRuntime`, `MediaConvertRuntimeOptions`: full Mockingbird runtime and webhook hub.
41
+ - `MEDIACONVERT_NAMESPACE`, `MEDIACONVERT_PRESETS`, `accessKeyCredential`: constants and fault controls.
42
+ - `document`, `operationIds`, `supportedOperationIds`: generated OpenAPI metadata.
43
+ - `createServer`, `MediaConvertServerOptions`, `DEFAULT_PORT`, `serveTarget` from `./server`: Node HTTP adapter and CLI integration.
44
+
45
+ ## Deliberately not modelled
46
+
47
+ Real transcoding, IAM evaluation, arbitrary operations, production limits, billing, dashboards, and codecs outside the submitted HLS/MP4 structure are not modelled.
48
+
49
+ Official oracle: [AWS Elemental MediaConvert API Reference](https://docs.aws.amazon.com/mediaconvert/latest/apireference/what-is.html).