diff --git a/types/aws-synthetics-puppeteer/README.md b/types/aws-synthetics-puppeteer/README.md index 8972f255a3379d..caf17b178dd2f6 100644 --- a/types/aws-synthetics-puppeteer/README.md +++ b/types/aws-synthetics-puppeteer/README.md @@ -3,7 +3,7 @@ Types for writing AWS Synthetic Canaries using the syn-nodejs-puppeteer runtime. ### Structure The syn-nodejs-puppeteer runtime has an unusual structure - files are in node_modules with no package! -```` +``` nodejs/node_modules/Synthetics.js nodejs/node_modules/SyntheticsLogger.js nodejs/node_modules/SyntheticsScreenshot.js @@ -13,3 +13,10 @@ Because of this, every type definition file declares it's own module, similar to If you choose to define "types" in tsconfig, it must include this package for it to work. +### Contributions + +Please ensure that changes are aligned with the runtime. +You can download the runtime with this command (you need to be logged into AWS, any account will do): +``` +aws lambda get-layer-version-by-arn --arn arn:aws:lambda:us-east-1:378653112637:layer:Synthetics:73 --query Content.Location --output text +``` diff --git a/types/aws-synthetics-puppeteer/aws-synthetics-puppeteer-tests.ts b/types/aws-synthetics-puppeteer/aws-synthetics-puppeteer-tests.ts index 5b54a158cfa7e5..cebef4d35391c0 100644 --- a/types/aws-synthetics-puppeteer/aws-synthetics-puppeteer-tests.ts +++ b/types/aws-synthetics-puppeteer/aws-synthetics-puppeteer-tests.ts @@ -1,7 +1,7 @@ import * as synthetics from "Synthetics"; export const handler = async () => { - const page = synthetics.getPage(); + const page = await synthetics.getPage(); await page.goto("https://example.com"); await page.waitForFrame("https://example.com"); await page.screenshot({ path: "/tmp/example.png" }); diff --git a/types/aws-synthetics-puppeteer/package.json b/types/aws-synthetics-puppeteer/package.json index 371e91679a02a7..a43124152adf15 100644 --- a/types/aws-synthetics-puppeteer/package.json +++ b/types/aws-synthetics-puppeteer/package.json @@ -1,7 +1,7 @@ { "private": true, "name": "@types/aws-synthetics-puppeteer", - "version": "10.0.9999", + "version": "11.0.9999", "nonNpm": true, "nonNpmDescription": "aws-synthetics-puppeteer", "projects": [ @@ -9,8 +9,8 @@ ], "dependencies": { "@types/node": "*", - "puppeteer-core": "24.2.0", - "aws-xray-sdk-core": "3.10.3" + "puppeteer-core": "24.25.0", + "aws-xray-sdk-core": "3.5.0" }, "devDependencies": { "@types/aws-synthetics-puppeteer": "workspace:." diff --git a/types/aws-synthetics-puppeteer/src/Synthetics.d.ts b/types/aws-synthetics-puppeteer/src/Synthetics.d.ts index bfcfe62747b7bb..363d2db502b7d7 100644 --- a/types/aws-synthetics-puppeteer/src/Synthetics.d.ts +++ b/types/aws-synthetics-puppeteer/src/Synthetics.d.ts @@ -76,7 +76,7 @@ declare module "Synthetics" { getCanaryArn(): string; getCanaryUserAgentString(): string; getRuntimeVersion(): string; - getPage(): localPuppeteer.Page; + getPage(): Promise; getUrl(): string; /** * Returns global syntheticsConfiguration instance. diff --git a/types/w3c-direct-sockets/index.d.ts b/types/w3c-direct-sockets/index.d.ts index cbdecc73fa6b05..e0e022144b5b32 100644 --- a/types/w3c-direct-sockets/index.d.ts +++ b/types/w3c-direct-sockets/index.d.ts @@ -87,8 +87,8 @@ export interface UDPSocketOpenInfo extends SocketOpenInfo { export interface TCPServerSocketOpenInfo { readable: ReadableStream; - localAddress?: string; - localPort?: number; + localAddress: string; + localPort: number; } declare global {