@hyperframes/aws-lambda 0.7.34 → 0.7.35
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/package.json +2 -2
- package/scripts/build-zip.test.ts +14 -0
- package/scripts/build-zip.ts +4 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperframes/aws-lambda",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.35",
|
|
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.7.
|
|
48
|
+
"@hyperframes/producer": "^0.7.35"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/aws-lambda": "^8.10.146",
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { describe, expect, it } from "bun:test";
|
|
2
|
+
import { readFileSync } from "node:fs";
|
|
3
|
+
import { fileURLToPath } from "node:url";
|
|
4
|
+
|
|
5
|
+
describe("build-zip handler banner", () => {
|
|
6
|
+
it("defines CommonJS path globals for inlined CJS dependencies", () => {
|
|
7
|
+
const source = readFileSync(fileURLToPath(new URL("./build-zip.ts", import.meta.url)), "utf8");
|
|
8
|
+
|
|
9
|
+
expect(source).toContain('import { fileURLToPath as __hf_fileURLToPath } from "url";');
|
|
10
|
+
expect(source).toContain('import { dirname as __hf_dirname } from "path";');
|
|
11
|
+
expect(source).toContain("const __filename = __hf_fileURLToPath(import.meta.url);");
|
|
12
|
+
expect(source).toContain("const __dirname = __hf_dirname(__filename);");
|
|
13
|
+
});
|
|
14
|
+
});
|
package/scripts/build-zip.ts
CHANGED
|
@@ -252,6 +252,10 @@ async function bundleHandler(stagingDir: string): Promise<void> {
|
|
|
252
252
|
"// hyperframes-aws-lambda handler bundle",
|
|
253
253
|
'import { createRequire as __hf_createRequire } from "module";',
|
|
254
254
|
"const require = __hf_createRequire(import.meta.url);",
|
|
255
|
+
'import { fileURLToPath as __hf_fileURLToPath } from "url";',
|
|
256
|
+
'import { dirname as __hf_dirname } from "path";',
|
|
257
|
+
"const __filename = __hf_fileURLToPath(import.meta.url);",
|
|
258
|
+
"const __dirname = __hf_dirname(__filename);",
|
|
255
259
|
].join("\n"),
|
|
256
260
|
},
|
|
257
261
|
});
|