Skip to content

Files

Latest commit

 

History

History
59 lines (33 loc) · 3.12 KB

integrity_map.md

File metadata and controls

59 lines (33 loc) · 3.12 KB

Public API re-exports

playwright_integrity_map

load("@rules_playwright//playwright:defs.bzl", "playwright_integrity_map")

playwright_integrity_map(name, browsers, output, silent)

ATTRIBUTES

Name Description Type Mandatory Default
name A unique name for this target. Name required
browsers A list of browser targets to generate integrity values for.

These targets should usually be the result of the playwright_browser_matrix() function, which creates a cross-product of browser names and platforms. Each target must provide the UnzippedBrowserInfo provider.
List of labels optional []
output The name of the output file to create containing the integrity map.

This file will contain the generated integrity values for the specified browsers. Defaults to "target_name.json"
String optional ""
silent Whether to suppress debug information output.

When set to False (default), the rule will print integrity information that users would typically copy and paste into their MODULE.bazel or WORKSPACE file. Set to True to prevent this debug output from being printed.
Boolean optional False

playwright_browser_matrix

load("@rules_playwright//playwright:defs.bzl", "playwright_browser_matrix")

playwright_browser_matrix(playright_repo_name, platforms, browser_names)

Generates a list of Bazel target labels for browser dependencies.

This function creates a cross-product of browser names and platforms, constructing the appropriate Bazel target labels for each combination.

"@{playright_repo_name}//browsers:{browser_name}-{platform}"

PARAMETERS

Name Description Default Value
playright_repo_name The name of the Playwright repository. none
platforms A list of platform identifiers (e.g., ['mac14-arm', 'ubuntu20.04-x64]). none
browser_names A list of browser names (e.g., ['chromium', 'firefox']). none

RETURNS

A list of browser labels to be used as the browsers attribute of the integrity_map rule.