load("@aspect_rules_js//js:defs.bzl", "js_library")

filegroup(
    name = "extensions",
    srcs = glob([
        "*",
        "**/*",
    ]),
    visibility = [
        "//java/test/org/openqa/selenium/chrome:__pkg__",
        "//java/test/org/openqa/selenium/edge:__pkg__",
        "//java/test/org/openqa/selenium/environment:__pkg__",
        "//java/test/org/openqa/selenium/firefox:__pkg__",
        "//javascript/selenium-webdriver:__subpackages__",
        "//py:__pkg__",
        "//rb/spec:__subpackages__",
    ],
)

js_library(
    name = "js-lib",
    data = [
        ":extensions",
    ],
    visibility = [
        "//javascript/selenium-webdriver:__subpackages__",
    ],
)

exports_files(
    [
        "webextensions-selenium-example.xpi",
        "webextensions-selenium-example.zip",
        "webextensions-selenium-example-unsigned.zip",
        "webextensions-selenium-example.crx",
        "webextensions-selenium-example",
        "webextensions-selenium-example-signed",
    ],
    visibility = [
        "//java/test/org/openqa/selenium/firefox:__pkg__",
        "//javascript/selenium-webdriver:__subpackages__",
        "//py:__pkg__",
    ],
)
