mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-10-30 09:16:55 +00:00
fix(gcp-cloud-run): the BeginFrame contract image resolves the engine's core import (#5785)
* fix(gcp-cloud-run): the BeginFrame contract image resolves the engine's core import The engine config imports the distributed fps set from @hyperframes/core, and the contract stage of the GCP image copies only parsers and engine sources, so the import failed at build time. The set now lives in a small core subpath (@hyperframes/core/distributed-fps) that the engine imports like its other light core imports, and the contract stage copies core like parsers. The core root export is unchanged. * style(core): format package.json
This commit is contained in:
@@ -32,6 +32,12 @@
|
||||
"types": "./dist/telemetryRedaction.d.ts",
|
||||
"environments": ["browser", "bun", "node"]
|
||||
},
|
||||
"./distributed-fps": {
|
||||
"source": "./src/distributedFps.ts",
|
||||
"runtime": "./dist/distributedFps.js",
|
||||
"types": "./dist/distributedFps.d.ts",
|
||||
"environments": ["browser", "bun", "node"]
|
||||
},
|
||||
"./beats": {
|
||||
"source": "./src/beats/index.ts",
|
||||
"runtime": "./dist/beats/index.js",
|
||||
|
||||
@@ -44,6 +44,12 @@
|
||||
"import": "./src/telemetryRedaction.ts",
|
||||
"types": "./src/telemetryRedaction.ts"
|
||||
},
|
||||
"./distributed-fps": {
|
||||
"bun": "./src/distributedFps.ts",
|
||||
"node": "./dist/distributedFps.js",
|
||||
"import": "./src/distributedFps.ts",
|
||||
"types": "./src/distributedFps.ts"
|
||||
},
|
||||
"./beats": {
|
||||
"bun": "./src/beats/index.ts",
|
||||
"node": "./dist/beats/index.js",
|
||||
@@ -560,6 +566,10 @@
|
||||
"import": "./dist/telemetryRedaction.js",
|
||||
"types": "./dist/telemetryRedaction.d.ts"
|
||||
},
|
||||
"./distributed-fps": {
|
||||
"import": "./dist/distributedFps.js",
|
||||
"types": "./dist/distributedFps.d.ts"
|
||||
},
|
||||
"./beats": {
|
||||
"import": "./dist/beats/index.js",
|
||||
"types": "./dist/beats/index.d.ts"
|
||||
|
||||
@@ -136,14 +136,6 @@ export function parseFpsWithDefault(input: string | number | undefined): FpsPars
|
||||
return parseFps(input);
|
||||
}
|
||||
|
||||
/** Integer rates the distributed renderer (Lambda, Cloud Run) accepts; fractional fps renders in-process only. */
|
||||
export const DISTRIBUTED_FPS = [24, 25, 30, 60] as const;
|
||||
export type DistributedFps = (typeof DISTRIBUTED_FPS)[number];
|
||||
|
||||
export function isDistributedFps(value: unknown): value is DistributedFps {
|
||||
return (DISTRIBUTED_FPS as readonly unknown[]).includes(value);
|
||||
}
|
||||
|
||||
/** Video orientation / aspect ratio. */
|
||||
export type Orientation = "16:9" | "9:16";
|
||||
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
/** Integer rates the distributed renderer (Lambda, Cloud Run) accepts; fractional fps renders in-process only. */
|
||||
export const DISTRIBUTED_FPS = [24, 25, 30, 60] as const;
|
||||
export type DistributedFps = (typeof DISTRIBUTED_FPS)[number];
|
||||
|
||||
export function isDistributedFps(value: unknown): value is DistributedFps {
|
||||
return (DISTRIBUTED_FPS as readonly unknown[]).includes(value);
|
||||
}
|
||||
@@ -14,7 +14,6 @@ export type {
|
||||
CanvasResolution,
|
||||
Fps,
|
||||
FpsInput,
|
||||
DistributedFps,
|
||||
FpsParseResult,
|
||||
MediaFile,
|
||||
CompositionAPI,
|
||||
@@ -73,8 +72,6 @@ export {
|
||||
toFps,
|
||||
fpsToNumber,
|
||||
fpsToFfmpegArg,
|
||||
DISTRIBUTED_FPS,
|
||||
isDistributedFps,
|
||||
TIMELINE_COLORS,
|
||||
DEFAULT_DURATIONS,
|
||||
COMPOSITION_VARIABLE_TYPES,
|
||||
@@ -84,6 +81,8 @@ export {
|
||||
getDefaultStageZoom,
|
||||
} from "./core.types";
|
||||
|
||||
export { DISTRIBUTED_FPS, type DistributedFps, isDistributedFps } from "./distributedFps";
|
||||
|
||||
// Templates
|
||||
export { generateBaseHtml, getStageStyles } from "./templates/base";
|
||||
export {
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import {
|
||||
DISTRIBUTED_FPS,
|
||||
fpsToFfmpegArg,
|
||||
fpsToNumber,
|
||||
isDistributedFps,
|
||||
parseFps,
|
||||
} from "./core.types";
|
||||
import { fpsToFfmpegArg, fpsToNumber, parseFps } from "./core.types";
|
||||
import { DISTRIBUTED_FPS, isDistributedFps } from "./distributedFps";
|
||||
|
||||
describe("parseFps — integer forms", () => {
|
||||
it("parses integer string '30' as { num: 30, den: 1 }", () => {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import { tmpdir } from "node:os";
|
||||
import { DISTRIBUTED_FPS, type DistributedFps } from "@hyperframes/core";
|
||||
import { DISTRIBUTED_FPS, type DistributedFps } from "@hyperframes/core/distributed-fps";
|
||||
import { chromeMajorCeiling } from "./services/chromeHostCeiling.js";
|
||||
import { join } from "node:path";
|
||||
import {
|
||||
|
||||
@@ -132,6 +132,7 @@ RUN timeout 300 bun install --frozen-lockfile \
|
||||
# argument list with the production engine helper so a launcher-flag regression
|
||||
# invalidates this layer and fails the contract instead of testing a duplicate
|
||||
# hard-coded profile.
|
||||
COPY packages/core/ packages/core/
|
||||
COPY packages/parsers/ packages/parsers/
|
||||
COPY packages/engine/ packages/engine/
|
||||
COPY packages/aws-lambda/scripts/probe-beginframe.ts packages/aws-lambda/scripts/probe-beginframe.ts
|
||||
|
||||
Reference in New Issue
Block a user