load("//javascript/typescript:build_defs.bzl", "ts_config", "ts_development_sources", "ts_library") load("//testing/karma/builddefs:karma_web_test_suite.bzl", "karma_web_test_suite") load("//javascript/angular/tools/node/jasmine/builddefs:jasmine_node.bzl", "jasmine_node_test") package(default_visibility = ["//third_party/javascript/cloud_analytics:internal"]) licenses(["notice"]) exports_files(["LICENSE"]) package_group( name = "internal", packages = [ "//third_party/javascript/cloud_analytics/...", ], ) ts_library( name = "browser", srcs = [ "browser_cloud_analytics.ts", ], visibility = ["//visibility:public"], deps = [ ":constants", ":interfaces", "//third_party/javascript/cloud_analytics/event_flushing:browser_event_flushing", "//third_party/javascript/cloud_analytics/event_flushing:interface", "//third_party/javascript/cloud_analytics/implementation:cloud_analytics", "//third_party/javascript/cloud_analytics/network:browser_network", ], ) ts_library( name = "node", srcs = [ "node_cloud_analytics.ts", ], visibility = ["//visibility:public"], deps = [ ":constants", ":interfaces", "//third_party/javascript/cloud_analytics/event_flushing:interface", "//third_party/javascript/cloud_analytics/event_flushing:node_event_flushing", "//third_party/javascript/cloud_analytics/implementation:cloud_analytics", "//third_party/javascript/cloud_analytics/network:node_network", ], ) ts_library( name = "constants", srcs = [ "constants.ts", ], visibility = ["//third_party/javascript/cloud_analytics:internal"], deps = [ ":interfaces", ], ) ts_library( name = "interfaces", srcs = [ "client_info.ts", "cloud_event.ts", "survey_response.ts", ], visibility = ["//visibility:public"], ) ts_config( name = "tsconfig", deps = [ ":browser", ":constants", ":interfaces", ":node", "//third_party/javascript/cloud_analytics/event_flushing:browser_event_flushing_tests", "//third_party/javascript/cloud_analytics/event_flushing:node_events_test", "//third_party/javascript/cloud_analytics/implementation:cloud_analytics", "//third_party/javascript/cloud_analytics/implementation:cloud_analytics_tests", "//third_party/javascript/cloud_analytics/network:browser_network_tests", "//third_party/javascript/cloud_analytics/network:node_network_test", ], ) ts_development_sources( name = "devsrcs_tests", testonly = 1, deps = [ "//third_party/javascript/cloud_analytics/event_flushing:browser_event_flushing_tests", "//third_party/javascript/cloud_analytics/implementation:cloud_analytics_tests", "//third_party/javascript/cloud_analytics/network:browser_network_tests", ], ) jasmine_node_test( name = "tests_node", srcs = [ "//third_party/javascript/cloud_analytics/event_flushing:node_events_test", "//third_party/javascript/cloud_analytics/network:node_network_test", ], ) # Run 'iblaze run :tests_local' for automatic local test runs. karma_web_test_suite( name = "tests_browser", browsers = [ "//testing/web/browsers:chrome-linux", "//testing/web/browsers:ie11-win7", "//testing/web/browsers/v63_0:firefox-linux", ], manifest = ":devsrcs_tests", ) test_suite( name = "tests", tests = [ ":tests_browser", ":tests_node", ], )