@hyperframes/studio-server 0.8.211 → 0.8.213

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.
@@ -3,6 +3,7 @@ var CRF_MAX_BY_FORMAT = { mp4: 51, webm: 63 };
3
3
  var VIDEO_BITRATE = /^\d+(\.\d+)?[kKmMgG]?$/;
4
4
  var VIDEO_FRAME_FORMATS = ["auto", "jpg", "png"];
5
5
  var HDR_MODES = ["auto", "force-hdr", "force-sdr"];
6
+ var PRORES_PROFILES = ["4444", "hq", "422", "lt", "proxy"];
6
7
  var isSet = (value) => value !== void 0 && value !== null;
7
8
  function oneOf(value, allowed) {
8
9
  return typeof value === "string" && allowed.includes(value);
@@ -63,12 +64,21 @@ function parseDelivery(body, format) {
63
64
  }
64
65
  return { ok: true, options };
65
66
  }
67
+ function parseProres(value, format) {
68
+ if (!isSet(value)) return { ok: true, options: {} };
69
+ if (!oneOf(value, PRORES_PROFILES)) {
70
+ return { ok: false, error: `proresProfile must be one of ${PRORES_PROFILES.join(", ")}` };
71
+ }
72
+ return { ok: true, options: format === "mov" ? { proresProfile: value } : {} };
73
+ }
66
74
  function parseEncoderOptions(body, format) {
67
75
  const rate = parseRateControl(body, format);
68
76
  if (!rate.ok) return rate;
69
77
  const delivery = parseDelivery(body, format);
70
78
  if (!delivery.ok) return delivery;
71
- const options = { ...rate.options, ...delivery.options };
79
+ const prores = parseProres(body.proresProfile, format);
80
+ if (!prores.ok) return prores;
81
+ const options = { ...rate.options, ...delivery.options, ...prores.options };
72
82
  if (isSet(body.gifLoop)) {
73
83
  if (typeof body.gifLoop !== "number" || !Number.isInteger(body.gifLoop) || body.gifLoop < 0 || body.gifLoop > 65535) {
74
84
  return { ok: false, error: "gifLoop must be an integer from 0 to 65535" };
@@ -1,11 +1,13 @@
1
1
  declare const VIDEO_FRAME_FORMATS: readonly ["auto", "jpg", "png"];
2
2
  declare const HDR_MODES: readonly ["auto", "force-hdr", "force-sdr"];
3
+ declare const PRORES_PROFILES: readonly ["4444", "hq", "422", "lt", "proxy"];
3
4
  interface EncoderOptions {
4
5
  gifLoop?: number;
5
6
  crf?: number;
6
7
  videoBitrate?: string;
7
8
  videoFrameFormat?: (typeof VIDEO_FRAME_FORMATS)[number];
8
9
  hdrMode?: (typeof HDR_MODES)[number];
10
+ proresProfile?: (typeof PRORES_PROFILES)[number];
9
11
  keyframeIntervalSeconds?: number;
10
12
  maxBitrate?: string;
11
13
  bufferSize?: string;
@@ -16,6 +18,7 @@ interface EncoderOptionsBody {
16
18
  videoBitrate?: unknown;
17
19
  videoFrameFormat?: unknown;
18
20
  hdrMode?: unknown;
21
+ proresProfile?: unknown;
19
22
  keyframeIntervalSeconds?: unknown;
20
23
  maxBitrate?: unknown;
21
24
  bufferSize?: unknown;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  encoderJobOptions,
3
3
  parseEncoderOptions
4
- } from "../chunk-ZR3T4TKU.js";
4
+ } from "../chunk-H5AB5322.js";
5
5
  export {
6
6
  encoderJobOptions,
7
7
  parseEncoderOptions
@@ -1,5 +1,5 @@
1
1
  import '@hyperframes/core';
2
- export { a as PreviewApiAdapter, P as PreviewDocumentStore, i as injectMediaCodecMap, f as injectMediaCodecMapIntoHtml, g as isAutoProxyEnabled, p as proxyEtagSalt, r as resolvePreviewMediaCodecProbeCache } from '../mediaProxyPreview-DIEtpLJo.js';
2
+ export { a as PreviewApiAdapter, P as PreviewDocumentStore, i as injectMediaCodecMap, f as injectMediaCodecMapIntoHtml, g as isAutoProxyEnabled, p as proxyEtagSalt, r as resolvePreviewMediaCodecProbeCache } from '../mediaProxyPreview-BnQDzKj1.js';
3
3
  import './mediaCodecMap.js';
4
4
  import 'sharp';
5
5
  import '@hyperframes/parsers';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Hono } from 'hono';
2
- import { S as StudioApiAdapter, P as PreviewDocumentStore, M as MediaProcessingJobState } from './mediaProxyPreview-DIEtpLJo.js';
3
- export { L as LintResult, a as PreviewApiAdapter, R as RenderJobState, b as ResolvedProject, c as StudioSelectionResponse, d as StudioSelectionSnapshot, e as StudioSelectionTextField } from './mediaProxyPreview-DIEtpLJo.js';
2
+ import { S as StudioApiAdapter, P as PreviewDocumentStore, M as MediaProcessingJobState } from './mediaProxyPreview-BnQDzKj1.js';
3
+ export { L as LintResult, a as PreviewApiAdapter, R as RenderJobState, b as ResolvedProject, c as StudioSelectionResponse, d as StudioSelectionSnapshot, e as StudioSelectionTextField } from './mediaProxyPreview-BnQDzKj1.js';
4
4
  export { C as ClosedWindow, D as DEFAULT_HISTORY_ROOT, S as HISTORY_START, H as HistoryClosedError, a as HistoryEntry, b as HistoryEntrySide, c as HistoryFileChange, d as HistoryListItem, e as HistoryRefusedError, f as HistoryResult, g as HistoryTarget, h as HistoryWho, i as HistoryWindow, M as MAX_WINDOW_IDLE_MS, P as ProjectHistory, j as ProjectHistoryOptions, k as ProjectHistoryView, U as UNDO_MODES, l as UndoMode, o as openProjectHistory, r as readProjectHistory } from './projectHistory-C18HDvac.js';
5
5
  export { ArtifactCapture, ArtifactInput, ArtifactRecord, HistoryBusyError, HistoryIdError, InPlaceOutcome, ProjectHistoryRecord, PrunedHistory, ReclaimedHistory, RenderRecord, VideoState, artifactDirectory, beginArtifactCapture, finishSnapshotRun, forgetRecordedArtifacts, historyCache, listProjectHistories, onRestoredInPlace, pruneGoneProjectHistories, reclaimUncopiedBlobs, recordArtifact, recordArtifacts, recordRenderSuccess, registerRenderOutput, retainSnapshotOutput } from './history/index.js';
6
6
  export { CACHE_DIR_NAME as PROXY_CACHE_DIR_NAME } from './helpers/proxyTranscoder.js';
package/dist/index.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  } from "./chunk-FJBJJURY.js";
25
25
  import {
26
26
  parseEncoderOptions
27
- } from "./chunk-ZR3T4TKU.js";
27
+ } from "./chunk-H5AB5322.js";
28
28
  import {
29
29
  DEFAULT_HISTORY_ROOT,
30
30
  DELETED_VERSION,
@@ -172,6 +172,7 @@ interface StudioApiAdapter {
172
172
  bufferSize?: string;
173
173
  videoFrameFormat?: "auto" | "jpg" | "png";
174
174
  hdrMode?: "auto" | "force-hdr" | "force-sdr";
175
+ proresProfile?: "4444" | "hq" | "422" | "lt" | "proxy";
175
176
  jobId: string;
176
177
  /**
177
178
  * The triggering browser profile has telemetry disabled (localStorage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/studio-server",
3
- "version": "0.8.211",
3
+ "version": "0.8.213",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/heygen-com/hyperframes",
@@ -84,8 +84,8 @@
84
84
  "linkedom": "^0.18.12",
85
85
  "postcss": "^8.5.8",
86
86
  "postcss-selector-parser": "^7.1.2",
87
- "@hyperframes/core": "0.8.211",
88
- "@hyperframes/parsers": "0.8.211"
87
+ "@hyperframes/parsers": "0.8.213",
88
+ "@hyperframes/core": "0.8.213"
89
89
  },
90
90
  "devDependencies": {
91
91
  "@types/node": "^25.0.10",