@hyperframes/aws-lambda 0.6.79 → 0.6.81

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,56 +1,31 @@
1
1
  /**
2
- * Client-side validation of `SerializableDistributedRenderConfig` so the
3
- * SDK fails on shape errors with a typed `InvalidConfigError` *before* a
4
- * Step Functions execution starts.
2
+ * Client-side validation for the AWS Lambda adapter.
5
3
  *
6
- * The producer's `plan` stage validates the same fields server-side, but a
7
- * caller staring at "ExecutionFailed: BROWSER_GPU_NOT_SOFTWARE" five
8
- * minutes after StartExecution has to dig through Step Functions history
9
- * to learn that the renderToLambda call passed an unsupported format.
10
- * Catching the obvious mistakes locally turns that wait into a synchronous
11
- * throw.
12
- *
13
- * The check is deliberately narrow — it covers the *shape* errors any
14
- * caller could have surfaced with `tsc` if they passed a literal, plus
15
- * the `force-hdr` rejection (HDR mp4 isn't supported in distributed
16
- * mode). webm was previously rejected here too; v0.7+ supports it via
17
- * closed-GOP concat-copy. Anything deeper (font availability, plan
18
- * size cap, GPU mode at runtime) needs the actual planner.
19
- */
20
- import type { SerializableDistributedRenderConfig } from "../events.js";
21
- /** Thrown for any client-side `SerializableDistributedRenderConfig` violation. */
22
- export declare class InvalidConfigError extends Error {
23
- readonly name = "InvalidConfigError";
24
- /** Dotted JSON-pointer-ish path to the offending field, e.g. `config.fps`. */
25
- readonly field: string;
26
- constructor(field: string, message: string);
27
- }
28
- /**
29
- * Throw an `InvalidConfigError` if `config` is not a valid
30
- * `SerializableDistributedRenderConfig`. Returns the same reference on
31
- * success so the call site reads:
32
- *
33
- * const validated = validateDistributedRenderConfig(input);
4
+ * The cloud-agnostic config-shape validation (`validateDistributedRenderConfig`,
5
+ * `validateVariablesPayload`, `InvalidConfigError`) lives in
6
+ * `@hyperframes/producer/distributed` and is shared with the other adapters.
7
+ * This module re-exports those and adds the one piece specific to Step
8
+ * Functions: the 256 KiB Standard-workflow execution-input size cap.
34
9
  */
35
- export declare function validateDistributedRenderConfig(config: SerializableDistributedRenderConfig): SerializableDistributedRenderConfig;
10
+ export { InvalidConfigError, validateDistributedRenderConfig, validateVariablesPayload, } from "@hyperframes/producer/distributed";
36
11
  /**
37
- * Hard cap on Step Functions Standard workflow execution input — 256 KiB
38
- * per the AWS limits page. Express workflows cap at 32 KiB; the render
39
- * stack runs Standard for execution-history visibility, so the larger
40
- * limit applies. The cap is on the entire serialized input, not just the
41
- * variables, because users hit it at the wire boundary regardless of
42
- * which field caused the bloat.
12
+ * Hard cap on Step Functions Standard workflow execution input — 256 KiB per
13
+ * the AWS limits page. Express workflows cap at 32 KiB; the render stack runs
14
+ * Standard for execution-history visibility, so the larger limit applies. The
15
+ * cap is on the entire serialized input, not just the variables, because
16
+ * users hit it at the wire boundary regardless of which field caused the
17
+ * bloat.
43
18
  *
44
19
  * Specific to Step Functions Standard. Other workflow runtimes (Temporal,
45
- * Express SFN, raw Lambda invoke) have different caps; this constant
46
- * shouldn't be reused for those without confirming the limit.
20
+ * Express SFN, Cloud Workflows, raw Lambda invoke) have different caps; don't
21
+ * reuse this constant for those without confirming the limit.
47
22
  */
48
23
  export declare const MAX_STEP_FUNCTIONS_INPUT_BYTES: number;
49
24
  /**
50
- * Validate that the serialized Step Functions execution input fits inside
51
- * the 256 KiB Standard-workflow cap. Measured in UTF-8 bytes (the format
52
- * Step Functions uses on the wire) — JS strings count UTF-16 code units,
53
- * which under-reports for any multi-byte character.
25
+ * Validate that the serialized Step Functions execution input fits inside the
26
+ * 256 KiB Standard-workflow cap. Measured in UTF-8 bytes (the format Step
27
+ * Functions uses on the wire) — JS strings count UTF-16 code units, which
28
+ * under-reports for any multi-byte character.
54
29
  *
55
30
  * Throws {@link InvalidConfigError} with a clear message naming the actual
56
31
  * byte count, the cap, and a pointer to the "working with large variables"
@@ -59,17 +34,4 @@ export declare const MAX_STEP_FUNCTIONS_INPUT_BYTES: number;
59
34
  * execution.
60
35
  */
61
36
  export declare function validateStepFunctionsInputSize(input: unknown): void;
62
- /**
63
- * Validate that `variables` is a plain JSON-safe object — no functions,
64
- * Symbols, `undefined` leaves, BigInts, non-finite numbers, or non-plain
65
- * objects (Dates, Maps, Sets, class instances). Rejected values would
66
- * either round-trip incorrectly through Step Functions (`undefined` is
67
- * silently dropped by `JSON.stringify`) or throw at the wire boundary
68
- * (`bigint`), so we surface the offending path synchronously.
69
- *
70
- * The check is purely structural — semantic constraints (e.g. "is this
71
- * variable declared in `data-composition-variables`?") belong to the CLI
72
- * layer where the project's HTML is on disk.
73
- */
74
- export declare function validateVariablesPayload(value: unknown): void;
75
37
  //# sourceMappingURL=validateConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validateConfig.d.ts","sourceRoot":"","sources":["../../src/sdk/validateConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,cAAc,CAAC;AAExE,kFAAkF;AAClF,qBAAa,kBAAmB,SAAQ,KAAK;IAG3C,SAAkB,IAAI,wBAAwB;IAC9C,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;gBACX,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM;CAI3C;AAmBD;;;;;;GAMG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,mCAAmC,GAC1C,mCAAmC,CAoHrC;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,8BAA8B,QAAa,CAAC;AAMzD;;;;;;;;;;;GAWG;AAEH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAkCnE;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CAQ7D"}
1
+ {"version":3,"file":"validateConfig.d.ts","sourceRoot":"","sources":["../../src/sdk/validateConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,kBAAkB,EAClB,+BAA+B,EAC/B,wBAAwB,GACzB,MAAM,mCAAmC,CAAC;AAE3C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,8BAA8B,QAAa,CAAC;AAMzD;;;;;;;;;;;GAWG;AAEH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI,CA6BnE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/aws-lambda",
3
- "version": "0.6.79",
3
+ "version": "0.6.81",
4
4
  "description": "AWS Lambda adapter for HyperFrames distributed rendering — handler, client-side SDK, and CDK construct.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -45,7 +45,7 @@
45
45
  "ffprobe-static": "^3.1.0",
46
46
  "puppeteer-core": "^24.39.1",
47
47
  "tar": "^7.4.3",
48
- "@hyperframes/producer": "^0.6.79"
48
+ "@hyperframes/producer": "^0.6.81"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/aws-lambda": "^8.10.146",