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/node/selenium-webdriver:__subpackages__",
        "//py:__pkg__",
        "//rb/spec:__subpackages__",
    ],
)

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

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