Upgrade Nomulus to latest Closure Rules

Significant technical debt has been eliminated. The latest best
practices are also now adopted for dealing with runfiles and dealing
with files across repositories.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=140762937
This commit is contained in:
jart 2016-12-01 12:33:53 -08:00 committed by Ben McIlwain
parent 79a72387ee
commit 59f4984083
28 changed files with 193 additions and 361 deletions

View file

@ -6,9 +6,9 @@ domain_registry_repositories()
http_archive( http_archive(
name = "io_bazel_rules_closure", name = "io_bazel_rules_closure",
sha256 = "7d75688c63ac09a55ca092a76c12f8d1e9ee8e7a890f3be6594a4e7d714f0e8a", sha256 = "1e2e6f73c4bb219a37a667ecb637539d7d7839f99b4f97496e5ea5e16cc87431",
strip_prefix = "rules_closure-b8841276e73ca677c139802f1168aaad9791dec0", strip_prefix = "rules_closure-b2ff976c8585e2051153bd62fbef6ef176b41b42",
url = "http://bazel-mirror.storage.googleapis.com/github.com/bazelbuild/rules_closure/archive/b8841276e73ca677c139802f1168aaad9791dec0.tar.gz", # 2016-10-02 url = "http://bazel-mirror.storage.googleapis.com/github.com/bazelbuild/rules_closure/archive/b2ff976c8585e2051153bd62fbef6ef176b41b42.tar.gz", # 2016-11-29
) )
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories") load("@io_bazel_rules_closure//closure:defs.bzl", "closure_repositories")
@ -17,7 +17,10 @@ closure_repositories(
omit_gson = True, omit_gson = True,
omit_guava = True, omit_guava = True,
omit_icu4j = True, omit_icu4j = True,
omit_jetty = True,
omit_jetty_util = True,
omit_json = True, omit_json = True,
omit_jsr305 = True, omit_jsr305 = True,
omit_jsr330_inject = True, omit_jsr330_inject = True,
omit_servlet_api = True,
) )

View file

@ -7,7 +7,7 @@ This document covers the steps necessary to download, build, and deploy Nomulus.
You will need the following programs installed on your local machine: You will need the following programs installed on your local machine:
* A recent version of the [Java 7 JDK][java-jdk7]. * A recent version of the [Java 7 JDK][java-jdk7].
* [Bazel build system](http://bazel.io/) >= version 0.3.1. Make sure to * [Bazel build system](http://bazel.io/) >= version 0.3.2. Make sure to
download the JDK7-compatible version. download the JDK7-compatible version.
* [Google App Engine SDK for Java][app-engine-sdk], and configure aliases to * [Google App Engine SDK for Java][app-engine-sdk], and configure aliases to
to the `gcloud` and `appcfg.sh` utilities (you'll use them a lot). to the `gcloud` and `appcfg.sh` utilities (you'll use them a lot).

View file

@ -23,7 +23,7 @@ zip_file(
], ],
out = "mandatory_stuff.war", out = "mandatory_stuff.war",
mappings = { mappings = {
"external/appengine_api_sdk/jar": "WEB-INF/lib", "appengine_api_sdk/jar": "WEB-INF/lib",
}, },
visibility = ["//visibility:private"], visibility = ["//visibility:private"],
) )
@ -59,9 +59,9 @@ zip_file(
], ],
out = "registry_default.war", out = "registry_default.war",
mappings = { mappings = {
"java/google/registry/env/common/default": "", "domain_registry/java/google/registry/env/common/default": "",
"java/google/registry/env/production/default": "", "domain_registry/java/google/registry/env/production/default": "",
"java/google/registry/module/frontend": "WEB-INF/lib", "domain_registry/java/google/registry/module/frontend": "WEB-INF/lib",
}, },
deps = [ deps = [
":common_war", ":common_war",
@ -79,9 +79,9 @@ zip_file(
], ],
out = "registry_backend.war", out = "registry_backend.war",
mappings = { mappings = {
"java/google/registry/env/common/backend": "", "domain_registry/java/google/registry/env/common/backend": "",
"java/google/registry/env/production/backend": "", "domain_registry/java/google/registry/env/production/backend": "",
"java/google/registry/module/backend": "WEB-INF/lib", "domain_registry/java/google/registry/module/backend": "WEB-INF/lib",
}, },
deps = [ deps = [
":common_war", ":common_war",
@ -99,9 +99,9 @@ zip_file(
], ],
out = "registry_tools.war", out = "registry_tools.war",
mappings = { mappings = {
"java/google/registry/env/common/tools": "", "domain_registry/java/google/registry/env/common/tools": "",
"java/google/registry/env/production/tools": "", "domain_registry/java/google/registry/env/production/tools": "",
"java/google/registry/module/tools": "WEB-INF/lib", "domain_registry/java/google/registry/module/tools": "WEB-INF/lib",
}, },
deps = [ deps = [
":common_war", ":common_war",
@ -136,7 +136,7 @@ zip_file(
"env/sandbox/default/WEB-INF/cron.xml", "env/sandbox/default/WEB-INF/cron.xml",
], ],
out = "registry_default_sandbox.war", out = "registry_default_sandbox.war",
mappings = {"java/google/registry/env/sandbox/default": ""}, mappings = {"domain_registry/java/google/registry/env/sandbox/default": ""},
deps = [":registry_default_war"], deps = [":registry_default_war"],
) )
@ -144,7 +144,7 @@ zip_file(
name = "registry_backend_sandbox_war", name = "registry_backend_sandbox_war",
srcs = ["env/sandbox/backend/WEB-INF/appengine-web.xml"], srcs = ["env/sandbox/backend/WEB-INF/appengine-web.xml"],
out = "registry_backend_sandbox.war", out = "registry_backend_sandbox.war",
mappings = {"java/google/registry/env/sandbox/backend": ""}, mappings = {"domain_registry/java/google/registry/env/sandbox/backend": ""},
deps = [":registry_backend_war"], deps = [":registry_backend_war"],
) )
@ -152,7 +152,7 @@ zip_file(
name = "registry_tools_sandbox_war", name = "registry_tools_sandbox_war",
srcs = ["env/sandbox/tools/WEB-INF/appengine-web.xml"], srcs = ["env/sandbox/tools/WEB-INF/appengine-web.xml"],
out = "registry_tools_sandbox.war", out = "registry_tools_sandbox.war",
mappings = {"java/google/registry/env/sandbox/tools": ""}, mappings = {"domain_registry/java/google/registry/env/sandbox/tools": ""},
deps = [":registry_tools_war"], deps = [":registry_tools_war"],
) )
@ -182,7 +182,7 @@ zip_file(
"env/alpha/default/WEB-INF/cron.xml", "env/alpha/default/WEB-INF/cron.xml",
], ],
out = "registry_default_alpha.war", out = "registry_default_alpha.war",
mappings = {"java/google/registry/env/alpha/default": ""}, mappings = {"domain_registry/java/google/registry/env/alpha/default": ""},
deps = [":registry_default_war"], deps = [":registry_default_war"],
) )
@ -190,7 +190,7 @@ zip_file(
name = "registry_backend_alpha_war", name = "registry_backend_alpha_war",
srcs = ["env/alpha/backend/WEB-INF/appengine-web.xml"], srcs = ["env/alpha/backend/WEB-INF/appengine-web.xml"],
out = "registry_backend_alpha.war", out = "registry_backend_alpha.war",
mappings = {"java/google/registry/env/alpha/backend": ""}, mappings = {"domain_registry/java/google/registry/env/alpha/backend": ""},
deps = [":registry_backend_war"], deps = [":registry_backend_war"],
) )
@ -198,7 +198,7 @@ zip_file(
name = "registry_tools_alpha_war", name = "registry_tools_alpha_war",
srcs = ["env/alpha/tools/WEB-INF/appengine-web.xml"], srcs = ["env/alpha/tools/WEB-INF/appengine-web.xml"],
out = "registry_tools_alpha.war", out = "registry_tools_alpha.war",
mappings = {"java/google/registry/env/alpha/tools": ""}, mappings = {"domain_registry/java/google/registry/env/alpha/tools": ""},
deps = [":registry_tools_war"], deps = [":registry_tools_war"],
) )
@ -228,7 +228,7 @@ zip_file(
"env/crash/default/WEB-INF/cron.xml", "env/crash/default/WEB-INF/cron.xml",
], ],
out = "registry_default_crash.war", out = "registry_default_crash.war",
mappings = {"java/google/registry/env/crash/default": ""}, mappings = {"domain_registry/java/google/registry/env/crash/default": ""},
deps = [":registry_default_war"], deps = [":registry_default_war"],
) )
@ -236,7 +236,7 @@ zip_file(
name = "registry_backend_crash_war", name = "registry_backend_crash_war",
srcs = ["env/crash/backend/WEB-INF/appengine-web.xml"], srcs = ["env/crash/backend/WEB-INF/appengine-web.xml"],
out = "registry_backend_crash.war", out = "registry_backend_crash.war",
mappings = {"java/google/registry/env/crash/backend": ""}, mappings = {"domain_registry/java/google/registry/env/crash/backend": ""},
deps = [":registry_backend_war"], deps = [":registry_backend_war"],
) )
@ -244,7 +244,7 @@ zip_file(
name = "registry_tools_crash_war", name = "registry_tools_crash_war",
srcs = ["env/crash/tools/WEB-INF/appengine-web.xml"], srcs = ["env/crash/tools/WEB-INF/appengine-web.xml"],
out = "registry_tools_crash.war", out = "registry_tools_crash.war",
mappings = {"java/google/registry/env/crash/tools": ""}, mappings = {"domain_registry/java/google/registry/env/crash/tools": ""},
deps = [":registry_tools_war"], deps = [":registry_tools_war"],
) )
@ -271,7 +271,7 @@ zip_file(
name = "registry_default_local_war", name = "registry_default_local_war",
srcs = ["env/local/default/WEB-INF/appengine-web.xml"], srcs = ["env/local/default/WEB-INF/appengine-web.xml"],
out = "registry_default_local.war", out = "registry_default_local.war",
mappings = {"java/google/registry/env/local/default": ""}, mappings = {"domain_registry/java/google/registry/env/local/default": ""},
deps = [":registry_default_war"], deps = [":registry_default_war"],
) )
@ -279,7 +279,7 @@ zip_file(
name = "registry_backend_local_war", name = "registry_backend_local_war",
srcs = ["env/local/backend/WEB-INF/appengine-web.xml"], srcs = ["env/local/backend/WEB-INF/appengine-web.xml"],
out = "registry_backend_local.war", out = "registry_backend_local.war",
mappings = {"java/google/registry/env/local/backend": ""}, mappings = {"domain_registry/java/google/registry/env/local/backend": ""},
deps = [":registry_backend_war"], deps = [":registry_backend_war"],
) )
@ -287,6 +287,6 @@ zip_file(
name = "registry_tools_local_war", name = "registry_tools_local_war",
srcs = ["env/local/tools/WEB-INF/appengine-web.xml"], srcs = ["env/local/tools/WEB-INF/appengine-web.xml"],
out = "registry_tools_local.war", out = "registry_tools_local.war",
mappings = {"java/google/registry/env/local/tools": ""}, mappings = {"domain_registry/java/google/registry/env/local/tools": ""},
deps = [":registry_tools_war"], deps = [":registry_tools_war"],
) )

View file

@ -16,11 +16,45 @@
ZIPPER = "@bazel_tools//tools/zip:zipper" ZIPPER = "@bazel_tools//tools/zip:zipper"
_OUTPUT_DIRS = ("bazel-out/", "bazel-genfiles/") def long_path(ctx, file_):
"""Constructs canonical runfile path relative to TEST_SRCDIR.
def runpath(f): Args:
"""Figures out the proper runfiles path for a file.""" ctx: A Skylark rule context.
for prefix in _OUTPUT_DIRS: file_: A File object that should appear in the runfiles for the test.
if f.path.startswith(prefix):
return f.short_path Returns:
return f.path A string path relative to TEST_SRCDIR suitable for use in tests and
testing infrastructure.
"""
if file_.short_path.startswith("../"):
return file_.short_path[3:]
if file_.owner and file_.owner.workspace_root:
return file_.owner.workspace_root + "/" + file_.short_path
return ctx.workspace_name + "/" + file_.short_path
def collect_runfiles(targets):
"""Aggregates runfiles from targets.
Args:
targets: A list of Bazel targets.
Returns:
A list of Bazel files.
"""
data = set()
for target in targets:
if hasattr(target, "runfiles"):
data += target.runfiles.files
continue
if hasattr(target, "data_runfiles"):
data += target.data_runfiles.files
if hasattr(target, "default_runfiles"):
data += target.default_runfiles.files
return data
def _get_runfiles(target, attribute):
runfiles = getattr(target, attribute, None)
if runfiles:
return runfiles.files
return []

View file

@ -39,10 +39,9 @@ Prefixes are matched with component granularity, not characters. Mappings with
more components take precedence. Mappings with equal components are sorted more components take precedence. Mappings with equal components are sorted
asciibetically. asciibetically.
Mappings apply to the "short path" of a file, which is relative to the root of Mappings apply to the "long path" of a file, i.e. relative to TEST_SRCDIR,
the repository, not the current directory. Short paths do not take into e.g. workspace_name/pkg/file. Long paths do not take into consideration
consideration bazel-foo/ output directories. Furthermore, if a file is located bazel-foo/ output directories.
in an external repository, then its short path will begin with external/foo/.
The deps attribute allows zip_file() rules to depend on other zip_file() rules. The deps attribute allows zip_file() rules to depend on other zip_file() rules.
In such cases, the contents of directly dependent zip files are unzipped and In such cases, the contents of directly dependent zip files are unzipped and
@ -110,15 +109,22 @@ A zip file can be assembled across many rules. For example:
""" """
load('//java/google/registry/builddefs:defs.bzl', 'ZIPPER', 'runpath') load('//java/google/registry/builddefs:defs.bzl',
'ZIPPER',
'collect_runfiles',
'long_path')
def _impl(ctx): def _zip_file(ctx):
"""Implementation of zip_file() rule.""" """Implementation of zip_file() rule."""
for s, d in ctx.attr.mappings.items(): for s, d in ctx.attr.mappings.items():
if (s.startswith('/') or s.endswith('/') or if (s.startswith('/') or s.endswith('/') or
d.startswith('/') or d.endswith('/')): d.startswith('/') or d.endswith('/')):
fail('mappings should not begin or end with slash') fail('mappings should not begin or end with slash')
mapped = _map_sources(ctx.files.srcs, ctx.attr.mappings) srcs = set()
srcs += ctx.files.srcs
srcs += ctx.files.data
srcs += collect_runfiles(ctx.attr.data)
mapped = _map_sources(ctx, srcs, ctx.attr.mappings)
cmd = [ cmd = [
'#!/bin/sh', '#!/bin/sh',
'set -e', 'set -e',
@ -146,7 +152,7 @@ def _impl(ctx):
ctx.file_action(output=script, content='\n'.join(cmd), executable=True) ctx.file_action(output=script, content='\n'.join(cmd), executable=True)
inputs = [ctx.file._zipper] inputs = [ctx.file._zipper]
inputs += [dep.zip_file for dep in ctx.attr.deps] inputs += [dep.zip_file for dep in ctx.attr.deps]
inputs += ctx.files.srcs inputs += list(srcs)
ctx.action( ctx.action(
inputs=inputs, inputs=inputs,
outputs=[ctx.outputs.out], outputs=[ctx.outputs.out],
@ -154,10 +160,9 @@ def _impl(ctx):
mnemonic='zip', mnemonic='zip',
progress_message='Creating zip with %d inputs %s' % ( progress_message='Creating zip with %d inputs %s' % (
len(inputs), ctx.label)) len(inputs), ctx.label))
return struct(files=set([ctx.outputs.out]), return struct(files=set([ctx.outputs.out]), zip_file=ctx.outputs.out)
zip_file=ctx.outputs.out)
def _map_sources(srcs, mappings): def _map_sources(ctx, srcs, mappings):
"""Calculates paths in zip file for srcs.""" """Calculates paths in zip file for srcs."""
# order mappings with more path components first # order mappings with more path components first
mappings = sorted([(-len(source.split('/')), source, dest) mappings = sorted([(-len(source.split('/')), source, dest)
@ -168,32 +173,32 @@ def _map_sources(srcs, mappings):
used = {i: False for i in mappings_indexes} used = {i: False for i in mappings_indexes}
mapped = [] mapped = []
for file_ in srcs: for file_ in srcs:
short_path = runpath(file_) run_path = long_path(ctx, file_)
zip_path = None zip_path = None
for i in mappings_indexes: for i in mappings_indexes:
source = mappings[i][0] source = mappings[i][0]
dest = mappings[i][1] dest = mappings[i][1]
if not source: if not source:
if dest: if dest:
zip_path = dest + '/' + short_path zip_path = dest + '/' + run_path
else: else:
zip_path = short_path zip_path = run_path
elif source == short_path: elif source == run_path:
if dest: if dest:
zip_path = dest zip_path = dest
else: else:
zip_path = short_path zip_path = run_path
elif short_path.startswith(source + '/'): elif run_path.startswith(source + '/'):
if dest: if dest:
zip_path = dest + short_path[len(source):] zip_path = dest + run_path[len(source):]
else: else:
zip_path = short_path[len(source) + 1:] zip_path = run_path[len(source) + 1:]
else: else:
continue continue
used[i] = True used[i] = True
break break
if not zip_path: if not zip_path:
fail('no mapping matched: ' + short_path) fail('no mapping matched: ' + run_path)
mapped += [(file_.path, zip_path)] mapped += [(file_.path, zip_path)]
for i in mappings_indexes: for i in mappings_indexes:
if not used[i]: if not used[i]:
@ -201,11 +206,12 @@ def _map_sources(srcs, mappings):
return mapped return mapped
zip_file = rule( zip_file = rule(
implementation=_impl, implementation=_zip_file,
output_to_genfiles = True, output_to_genfiles = True,
attrs={ attrs={
'out': attr.output(mandatory=True), 'out': attr.output(mandatory=True),
'srcs': attr.label_list(allow_files=True), 'srcs': attr.label_list(allow_files=True),
'data': attr.label_list(cfg='data', allow_files=True),
'deps': attr.label_list(providers=['zip_file']), 'deps': attr.label_list(providers=['zip_file']),
'mappings': attr.string_dict(), 'mappings': attr.string_dict(),
'_zipper': attr.label(default=Label(ZIPPER), single_file=True), '_zipper': attr.label(default=Label(ZIPPER), single_file=True),

View file

@ -11,9 +11,7 @@ filegroup(
name = "runfiles", name = "runfiles",
srcs = glob(["assets/**"]) + [ srcs = glob(["assets/**"]) + [
"brain_bin.js", "brain_bin.js",
"brain_bin_map.js",
"registrar_bin.js", "registrar_bin.js",
"registrar_bin_map.js",
"//java/google/registry/ui/css:registrar_bin.css", "//java/google/registry/ui/css:registrar_bin.css",
"//java/google/registry/ui/html:html_files", "//java/google/registry/ui/html:html_files",
], ],
@ -22,20 +20,13 @@ filegroup(
filegroup( filegroup(
name = "runfiles_debug", name = "runfiles_debug",
srcs = [ srcs = [
"brain_bin.js.map", ":brain_bin",
"deps.js", ":deps",
"registrar_bin.js.map", ":registrar_bin",
"registrar_dbg.js", ":registrar_dbg",
"//java/google/registry/ui/css:css_files", "//java/google/registry/ui/css:registrar_dbg",
"//java/google/registry/ui/css:registrar_dbg.css",
"//java/google/registry/ui/js:js_files",
"//java/google/registry/ui/js/registrar:js_files",
"//java/google/registry/ui/soy:js_files",
"//java/google/registry/ui/soy/registrar:js_files",
"//javascript/closure:js_files_recursive",
"//javascript/template/soy:soy_usegoog_js_files",
"@closure_library//:js_files",
], ],
data = [":deps"],
) )
zip_file( zip_file(
@ -43,10 +34,10 @@ zip_file(
srcs = [":runfiles"], srcs = [":runfiles"],
out = "ui.war", out = "ui.war",
mappings = { mappings = {
"java/google/registry/ui/assets": "assets", "domain_registry/java/google/registry/ui/assets": "assets",
"java/google/registry/ui/css": "assets/css", "domain_registry/java/google/registry/ui/css": "assets/css",
"java/google/registry/ui/html": "", "domain_registry/java/google/registry/ui/html": "",
"java/google/registry/ui": "assets/js", "domain_registry/java/google/registry/ui": "assets/js",
}, },
) )
@ -54,12 +45,12 @@ zip_file(
name = "war_debug", name = "war_debug",
srcs = [":runfiles_debug"], srcs = [":runfiles_debug"],
out = "ui_debug.war", out = "ui_debug.war",
data = [":runfiles_debug"],
mappings = { mappings = {
"java/google/registry/ui/deps.js": "assets/sources/deps.js", "domain_registry/java/google/registry/ui/brain_bin.js.map": "assets/js/brain_bin.js.map",
"java/google/registry/ui/brain_bin.js.map": "assets/js/brain_bin.js.map", "domain_registry/java/google/registry/ui/registrar_bin.js.map": "assets/js/registrar_bin.js.map",
"java/google/registry/ui/registrar_bin.js.map": "assets/js/registrar_bin.js.map", "domain_registry/java/google/registry/ui/registrar_dbg.js": "assets/js/registrar_dbg.js",
"java/google/registry/ui/registrar_dbg.js": "assets/js/registrar_dbg.js", "domain_registry/java/google/registry/ui/css/registrar_dbg.css": "assets/css/registrar_dbg.css",
"java/google/registry/ui/css/registrar_dbg.css": "assets/css/registrar_dbg.css",
"": "assets/sources", "": "assets/sources",
}, },
deps = [":war"], deps = [":war"],
@ -80,10 +71,7 @@ java_library(
closure_js_deps( closure_js_deps(
name = "deps", name = "deps",
deps = [ deps = ["//java/google/registry/ui/js/registrar"],
"//java/google/registry/ui/js",
"//java/google/registry/ui/js/registrar",
],
) )
################################################################################ ################################################################################
@ -98,22 +86,13 @@ closure_js_binary(
name = "registrar_bin", name = "registrar_bin",
css = "//java/google/registry/ui/css:registrar_bin", css = "//java/google/registry/ui/css:registrar_bin",
entry_points = ["goog:registry.registrar.main"], entry_points = ["goog:registry.registrar.main"],
output_wrapper = "%output%//# sourceMappingURL=registrar_bin.js.map",
deps = [ deps = [
"//java/google/registry/ui/externs", "//java/google/registry/ui/externs",
"//java/google/registry/ui/js/registrar", "//java/google/registry/ui/js/registrar",
], ],
) )
# The webserver should provide this to trusted admin users, rather than
# registrar_bin.js. This is what makes debugging in production possible.
genrule(
name = "registrar_mapped",
srcs = ["registrar_bin.js"],
outs = ["registrar_bin_map.js"],
cmd = "cat $(location registrar_bin.js) >$@ && " +
"echo '//# sourceMappingURL=registrar_bin.js.map' >>$@",
)
# This target creates a compiled JavaScript file where symbols are renamed to # This target creates a compiled JavaScript file where symbols are renamed to
# include dollar signs. This is useful for testing, because you can still read # include dollar signs. This is useful for testing, because you can still read
# the source code, but it'll fail if your code is incorrect with regard to # the source code, but it'll fail if your code is incorrect with regard to
@ -137,16 +116,9 @@ closure_js_binary(
closure_js_binary( closure_js_binary(
name = "brain_bin", name = "brain_bin",
entry_points = ["goog:registry.registrar.BrainFrame.main"], entry_points = ["goog:registry.registrar.BrainFrame.main"],
output_wrapper = "%output%//# sourceMappingURL=brain_bin.js.map",
deps = [ deps = [
"//java/google/registry/ui/externs", "//java/google/registry/ui/externs",
"//java/google/registry/ui/js/registrar", "//java/google/registry/ui/js/registrar",
], ],
) )
genrule(
name = "brain_mapped",
srcs = ["brain_bin.js"],
outs = ["brain_bin_map.js"],
cmd = "cat $(location brain_bin.js) >$@ && " +
"echo '//# sourceMappingURL=brain_bin.js.map' >>$@",
)

View file

@ -2,7 +2,7 @@
<!-- gsutil cp -a public-read -z html brainframe-alpha.html gs://domain-registry-alpha/brainframe.html --> <!-- gsutil cp -a public-read -z html brainframe-alpha.html gs://domain-registry-alpha/brainframe.html -->
<!-- curl https://domain-registry-alpha.storage.googleapis.com/brainframe.html --> <!-- curl https://domain-registry-alpha.storage.googleapis.com/brainframe.html -->
<script src="https://js.braintreegateway.com/v2/braintree.js"></script> <script src="https://js.braintreegateway.com/v2/braintree.js"></script>
<script src="https://domain-registry-alpha.appspot.com/assets/js/brain_bin_map.js"></script> <script src="https://domain-registry-alpha.appspot.com/assets/js/brain_bin.js"></script>
<body style="margin:0"> <body style="margin:0">
<form><div id="brainframe"></div></form> <form><div id="brainframe"></div></form>
<script>registry.registrar.BrainFrame.main('https://domain-registry-alpha.appspot.com', 'brainframe');</script> <script>registry.registrar.BrainFrame.main('https://domain-registry-alpha.appspot.com', 'brainframe');</script>

View file

@ -1,13 +0,0 @@
<!doctype html>
<!-- Source-mapped production iframe sandbox for Braintree iframe -->
<!-- -->
<!-- This is the same thing as brainframe.html except it allows admins of -->
<!-- the App Engine application to see the original source code in Chrome's -->
<!-- debugger if an exception is thrown by the minified JavaScript blob. -->
<!-- -->
<!-- gsutil cp -a public-read -z html brainframe-map.html gs://domain-registry/brainframe-map.html -->
<script src="https://js.braintreegateway.com/v2/braintree.js"></script>
<script src="https://domain-registry.appspot.com/assets/js/brain_bin_map.js"></script>
<body style="margin:0">
<form><div id="brainframe"></div></form>
<script>registry.registrar.BrainFrame.main('https://domain-registry.appspot.com', 'brainframe');</script>

View file

@ -3,8 +3,8 @@
<!-- This iframe provides no isolation of Braintree from Console. --> <!-- This iframe provides no isolation of Braintree from Console. -->
<script src="https://js.braintreegateway.com/v2/braintree.js"></script> <script src="https://js.braintreegateway.com/v2/braintree.js"></script>
<script>var CLOSURE_NO_DEPS = true;</script> <script>var CLOSURE_NO_DEPS = true;</script>
<script src="/assets/sources/javascript/closure/base.js"></script> <script src="/assets/sources/closure_library/closure/goog/base.js"></script>
<script src="/assets/sources/deps.js"></script> <script src="/assets/sources/domain_registry/java/google/registry/ui/deps.js"></script>
<body style="margin:0"> <body style="margin:0">
<form><div id="brainframe"></div></form> <form><div id="brainframe"></div></form>
<script>goog.require('registry.registrar.BrainFrame.main');</script> <script>goog.require('registry.registrar.BrainFrame.main');</script>

View file

@ -4,12 +4,7 @@ package(
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_css_library", "closure_css_binary") load("@io_bazel_rules_closure//closure:defs.bzl", "closure_css_binary", "closure_css_library")
filegroup(
name = "css_files",
srcs = glob(["*.css"]),
)
closure_css_library( closure_css_library(
name = "kd_components_lib", name = "kd_components_lib",
@ -23,7 +18,9 @@ closure_css_library(
"forms.css", "forms.css",
"registry.css", "registry.css",
], ],
deps = [":kd_components_lib"], deps = [
":kd_components_lib",
],
) )
closure_css_library( closure_css_library(
@ -49,3 +46,9 @@ closure_css_binary(
debug = 1, debug = 1,
deps = [":registrar_lib"], deps = [":registrar_lib"],
) )
closure_css_library(
name = "registrar_raw",
srcs = ["registrar_imports_raw.css"],
deps = [":registrar_lib"],
)

View file

@ -8,10 +8,5 @@ load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library")
closure_js_library( closure_js_library(
name = "externs", name = "externs",
externs = glob(["*.js"]),
)
filegroup(
name = "js_files_recursive",
srcs = glob(["*.js"]), srcs = glob(["*.js"]),
) )

View file

@ -6,17 +6,15 @@ licenses(["notice"]) # Apache 2.0
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library") load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library")
filegroup(
name = "js_files",
srcs = glob(["*.js"]),
)
closure_js_library( closure_js_library(
name = "js", name = "js",
srcs = [":js_files"], srcs = glob(["*.js"]),
suppress = [
"JSC_UNKNOWN_EXPR_TYPE",
"JSC_IMPLICITLY_NULLABLE_JSDOC",
],
deps = [ deps = [
"//java/google/registry/ui/soy:Console", "//java/google/registry/ui/soy",
"//java/google/registry/ui/soy:Forms", "@io_bazel_rules_closure//closure/library",
"//javascript/closure",
], ],
) )

View file

@ -6,29 +6,17 @@ licenses(["notice"]) # Apache 2.0
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library") load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library")
filegroup(
name = "js_files",
srcs = glob(["*.js"]),
)
closure_js_library( closure_js_library(
name = "registrar", name = "registrar",
srcs = [":js_files"], srcs = glob(["*.js"]),
suppress = [
"JSC_UNKNOWN_EXPR_TYPE",
"JSC_IMPLICITLY_NULLABLE_JSDOC",
],
deps = [ deps = [
"//java/google/registry/ui/js", "//java/google/registry/ui/js",
"//java/google/registry/ui/soy:Forms", "//java/google/registry/ui/soy",
"//java/google/registry/ui/soy/registrar:Console", "//java/google/registry/ui/soy/registrar",
"//java/google/registry/ui/soy/registrar:Contact", "@io_bazel_rules_closure//closure/library",
"//java/google/registry/ui/soy/registrar:ContactEpp",
"//java/google/registry/ui/soy/registrar:ContactSettings",
"//java/google/registry/ui/soy/registrar:Domain",
"//java/google/registry/ui/soy/registrar:DomainEpp",
"//java/google/registry/ui/soy/registrar:Epp",
"//java/google/registry/ui/soy/registrar:Host",
"//java/google/registry/ui/soy/registrar:HostEpp",
"//java/google/registry/ui/soy/registrar:Payment",
"//java/google/registry/ui/soy/registrar:SecuritySettings",
"//java/google/registry/ui/soy/registrar:WhoisSettings",
"//javascript/closure",
], ],
) )

View file

@ -106,7 +106,6 @@ public final class ConsoleUiAction implements Runnable {
Registrar registrar = Registrar.loadByClientId(sessionUtils.getRegistrarClientId(req)); Registrar registrar = Registrar.loadByClientId(sessionUtils.getRegistrarClientId(req));
data.put("xsrfToken", XsrfTokenManager.generateToken(EppConsoleAction.XSRF_SCOPE)); data.put("xsrfToken", XsrfTokenManager.generateToken(EppConsoleAction.XSRF_SCOPE));
data.put("clientId", registrar.getClientId()); data.put("clientId", registrar.getClientId());
data.put("isAdmin", userService.isUserAdmin());
data.put("showPaymentLink", registrar.getBillingMethod() == Registrar.BillingMethod.BRAINTREE); data.put("showPaymentLink", registrar.getBillingMethod() == Registrar.BillingMethod.BRAINTREE);
String payload = TOFU_SUPPLIER.get() String payload = TOFU_SUPPLIER.get()

View file

@ -6,12 +6,10 @@ licenses(["notice"]) # Apache 2.0
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_java_template_library", "closure_js_template_library") load("@io_bazel_rules_closure//closure:defs.bzl", "closure_java_template_library", "closure_js_template_library")
filegroup( closure_js_template_library(
name = "js_files", name = "soy",
srcs = [ srcs = glob(["*.soy"]),
"Console.soy.js", globals = "//java/google/registry/ui:globals.txt",
"Forms.soy.js",
],
) )
closure_java_template_library( closure_java_template_library(
@ -19,15 +17,3 @@ closure_java_template_library(
srcs = glob(["*.soy"]), srcs = glob(["*.soy"]),
java_package = "google.registry.ui.soy", java_package = "google.registry.ui.soy",
) )
closure_js_template_library(
name = "Console",
srcs = ["Console.soy"],
globals = "//java/google/registry/ui:globals.txt",
)
closure_js_template_library(
name = "Forms",
srcs = ["Forms.soy"],
globals = "//java/google/registry/ui:globals.txt",
)

View file

@ -50,13 +50,8 @@
{case google.registry.ui.ConsoleDebug.DEBUG} {case google.registry.ui.ConsoleDebug.DEBUG}
<link rel="stylesheet" href="/assets/css/{$app}_dbg.css"> <link rel="stylesheet" href="/assets/css/{$app}_dbg.css">
{case google.registry.ui.ConsoleDebug.RAW} {case google.registry.ui.ConsoleDebug.RAW}
{if $app == 'admin'} <link rel="stylesheet"
<link rel="stylesheet" href="/assets/sources/domain_registry/java/google/registry/ui/css/{$app}_imports_raw.css">
href="/assets/sources/java/google/registry/ui/css/admin_imports_raw.css">
{else}
<link rel="stylesheet"
href="/assets/sources/java/google/registry/ui/css/registrar_imports_raw.css">
{/if}
{default} {default}
<!-- No DEBUG option set. --> <!-- No DEBUG option set. -->
{/switch} {/switch}

View file

@ -6,22 +6,12 @@ licenses(["notice"]) # Apache 2.0
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_java_template_library", "closure_js_template_library") load("@io_bazel_rules_closure//closure:defs.bzl", "closure_java_template_library", "closure_js_template_library")
filegroup( closure_js_template_library(
name = "js_files", name = "registrar",
srcs = [ srcs = glob(["*.soy"]),
"Console.soy.js", data = ["//java/google/registry/ui/css:registrar_raw"],
"Contact.soy.js", globals = "//java/google/registry/ui:globals.txt",
"ContactEpp.soy.js", deps = ["//java/google/registry/ui/soy"],
"ContactSettings.soy.js",
"Domain.soy.js",
"DomainEpp.soy.js",
"Epp.soy.js",
"Host.soy.js",
"HostEpp.soy.js",
"Payment.soy.js",
"SecuritySettings.soy.js",
"WhoisSettings.soy.js",
],
) )
closure_java_template_library( closure_java_template_library(
@ -29,82 +19,3 @@ closure_java_template_library(
srcs = glob(["*.soy"]), srcs = glob(["*.soy"]),
java_package = "google.registry.ui.soy.registrar", java_package = "google.registry.ui.soy.registrar",
) )
closure_js_template_library(
name = "Console",
srcs = ["Console.soy"],
globals = "//java/google/registry/ui:globals.txt",
deps = ["//java/google/registry/ui/soy:Console"],
)
closure_js_template_library(
name = "ContactEpp",
srcs = ["ContactEpp.soy"],
globals = "//java/google/registry/ui:globals.txt",
)
closure_js_template_library(
name = "ContactSettings",
srcs = ["ContactSettings.soy"],
globals = "//java/google/registry/ui:globals.txt",
deps = ["//java/google/registry/ui/soy:Forms"],
)
closure_js_template_library(
name = "Contact",
srcs = ["Contact.soy"],
globals = "//java/google/registry/ui:globals.txt",
deps = ["//java/google/registry/ui/soy:Forms"],
)
closure_js_template_library(
name = "Domain",
srcs = ["Domain.soy"],
globals = "//java/google/registry/ui:globals.txt",
deps = ["//java/google/registry/ui/soy:Forms"],
)
closure_js_template_library(
name = "DomainEpp",
srcs = ["DomainEpp.soy"],
globals = "//java/google/registry/ui:globals.txt",
)
closure_js_template_library(
name = "Epp",
srcs = ["Epp.soy"],
globals = "//java/google/registry/ui:globals.txt",
)
closure_js_template_library(
name = "HostEpp",
srcs = ["HostEpp.soy"],
globals = "//java/google/registry/ui:globals.txt",
)
closure_js_template_library(
name = "Host",
srcs = ["Host.soy"],
globals = "//java/google/registry/ui:globals.txt",
deps = ["//java/google/registry/ui/soy:Forms"],
)
closure_js_template_library(
name = "Payment",
srcs = ["Payment.soy"],
globals = "//java/google/registry/ui:globals.txt",
deps = ["//java/google/registry/ui/soy:Forms"],
)
closure_js_template_library(
name = "SecuritySettings",
srcs = ["SecuritySettings.soy"],
globals = "//java/google/registry/ui:globals.txt",
)
closure_js_template_library(
name = "WhoisSettings",
srcs = ["WhoisSettings.soy"],
globals = "//java/google/registry/ui:globals.txt",
deps = ["//java/google/registry/ui/soy:Forms"],
)

View file

@ -24,7 +24,6 @@
{@param xsrfToken: string} /** Security token. */ {@param xsrfToken: string} /** Security token. */
{@param clientId: string} /** Registrar client identifier. */ {@param clientId: string} /** Registrar client identifier. */
{@param username: string} /** Arbitrary username to display. */ {@param username: string} /** Arbitrary username to display. */
{@param isAdmin: bool} /** Is this user an App Engine account admin? */
{@param logoutUrl: string} /** Generated URL for logging out of Google. */ {@param logoutUrl: string} /** Generated URL for logging out of Google. */
{@param showPaymentLink: bool} {@param showPaymentLink: bool}
{@param productName: string} /** Name to display for this software product. */ {@param productName: string} /** Name to display for this software product. */
@ -51,18 +50,13 @@
</div> </div>
{switch DEBUG} {switch DEBUG}
{case google.registry.ui.ConsoleDebug.PRODUCTION} {case google.registry.ui.ConsoleDebug.PRODUCTION}
{if $isAdmin} <script src="/assets/js/registrar_bin.js"></script>
<script src="/assets/js/registrar_bin_map.js"></script>
{else}
<script src="/assets/js/registrar_bin.js"></script>
{/if}
{case google.registry.ui.ConsoleDebug.DEBUG} {case google.registry.ui.ConsoleDebug.DEBUG}
<script src="/assets/js/registrar_dbg.js"></script> <script src="/assets/js/registrar_dbg.js"></script>
{case google.registry.ui.ConsoleDebug.RAW} {case google.registry.ui.ConsoleDebug.RAW}
<script>var CLOSURE_NO_DEPS = true;</script> <script>var CLOSURE_NO_DEPS = true;</script>
<script src="/assets/sources/external/closure_library/closure/goog/base.js"> <script src="/assets/sources/closure_library/closure/goog/base.js"></script>
</script> <script src="/assets/sources/domain_registry/java/google/registry/ui/deps.js"></script>
<script src="/assets/sources/deps.js"></script>
<script>goog.require('registry.registrar.main');</script> <script>goog.require('registry.registrar.main');</script>
{/switch} {/switch}
{if isNonnull(DEBUG)} {if isNonnull(DEBUG)}

View file

@ -1,19 +0,0 @@
package(default_visibility = ["//visibility:public"])
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library")
closure_js_library(
name = "closure",
exports = ["@io_bazel_rules_closure//closure/library"],
)
closure_js_library(
name = "testing",
testonly = 1,
exports = ["@io_bazel_rules_closure//closure/library:testing"],
)
filegroup(
name = "js_files_recursive",
srcs = ["@closure_library//:js_files"],
)

View file

@ -1,6 +0,0 @@
package(default_visibility = ["//visibility:public"])
filegroup(
name = "soy_usegoog_js_files",
srcs = ["@io_bazel_rules_closure//closure/templates:soy_jssrc"],
)

View file

@ -29,9 +29,9 @@ zip_contents_test(
name = "zip_emptyMapping_leavesShortPathsInTact", name = "zip_emptyMapping_leavesShortPathsInTact",
src = "basic.zip", src = "basic.zip",
contents = { contents = {
"javatests/google/registry/builddefs/generated.txt": "generated", "domain_registry/javatests/google/registry/builddefs/generated.txt": "generated",
"javatests/google/registry/builddefs/hello.txt": "hello", "domain_registry/javatests/google/registry/builddefs/hello.txt": "hello",
"javatests/google/registry/builddefs/world.txt": "world", "domain_registry/javatests/google/registry/builddefs/world.txt": "world",
}, },
) )
@ -39,7 +39,7 @@ zip_file(
name = "stripped", name = "stripped",
srcs = ["hello.txt"], srcs = ["hello.txt"],
out = "stripped.zip", out = "stripped.zip",
mappings = {"javatests/google/registry/builddefs": ""}, mappings = {"domain_registry/javatests/google/registry/builddefs": ""},
) )
zip_contents_test( zip_contents_test(
@ -57,8 +57,8 @@ zip_file(
], ],
out = "repath.zip", out = "repath.zip",
mappings = { mappings = {
"javatests/google/registry/builddefs": "a/b/c", "domain_registry/javatests/google/registry/builddefs": "a/b/c",
"javatests/google/registry/builddefs/generated.txt": "x/y/z/generated.txt", "domain_registry/javatests/google/registry/builddefs/generated.txt": "x/y/z/generated.txt",
}, },
) )
@ -76,7 +76,7 @@ zip_file(
name = "overridden", name = "overridden",
srcs = ["override/hello.txt"], srcs = ["override/hello.txt"],
out = "overridden.zip", out = "overridden.zip",
mappings = {"javatests/google/registry/builddefs/override": "a/b/c"}, mappings = {"domain_registry/javatests/google/registry/builddefs/override": "a/b/c"},
deps = [":repath"], deps = [":repath"],
) )

View file

@ -14,15 +14,15 @@
"""Build rule for unit testing the zip_file() rule.""" """Build rule for unit testing the zip_file() rule."""
load('//java/google/registry/builddefs:defs.bzl', 'ZIPPER', 'runpath') load('//java/google/registry/builddefs:defs.bzl', 'ZIPPER')
def _impl(ctx): def _impl(ctx):
"""Implementation of zip_contents_test() rule.""" """Implementation of zip_contents_test() rule."""
cmd = [ cmd = [
'set -e', 'set -e',
'repo="$(pwd)"', 'repo="$(pwd)"',
'zipper="${repo}/%s"' % runpath(ctx.file._zipper), 'zipper="${repo}/%s"' % ctx.file._zipper.short_path,
'archive="${repo}/%s"' % runpath(ctx.file.src), 'archive="${repo}/%s"' % ctx.file.src.short_path,
('listing="$("${zipper}" v "${archive}"' + ('listing="$("${zipper}" v "${archive}"' +
' | grep -v ^d | awk \'{print $3}\' | LC_ALL=C sort)"'), ' | grep -v ^d | awk \'{print $3}\' | LC_ALL=C sort)"'),
'if [[ "${listing}" != "%s" ]]; then' % ( 'if [[ "${listing}" != "%s" ]]; then' % (

View file

@ -30,17 +30,22 @@ public final class RegistryTestServer {
new ImmutableMap.Builder<String, Path>() new ImmutableMap.Builder<String, Path>()
.put( .put(
"/index.html", "/index.html",
Paths.get("java/google/registry/ui/html/index.html")) Paths.get(
"../domain_registry/java/google/registry/ui/html/index.html"))
.put( .put(
"/error.html", "/error.html",
Paths.get("java/google/registry/ui/html/error.html")) Paths.get(
.put("/assets/js/*", Paths.get("java/google/registry/ui")) "../domain_registry/java/google/registry/ui/html/error.html"))
.put("/assets/css/*", Paths.get("java/google/registry/ui/css"))
.put( .put(
"/assets/sources/deps.js", "/assets/js/*",
Paths.get("java/google/registry/ui/deps.js")) Paths.get("../domain_registry/java/google/registry/ui"))
.put("/assets/sources/*", Paths.get("")) .put(
.put("/assets/*", Paths.get("java/google/registry/ui/assets")) "/assets/css/*",
Paths.get("../domain_registry/java/google/registry/ui/css"))
.put("/assets/sources/*", Paths.get(".."))
.put(
"/assets/*",
Paths.get("../domain_registry/java/google/registry/ui/assets"))
.build(); .build();
private static final ImmutableList<Route> ROUTES = ImmutableList.of( private static final ImmutableList<Route> ROUTES = ImmutableList.of(

View file

@ -16,6 +16,7 @@ package google.registry.server;
import com.beust.jcommander.JCommander; import com.beust.jcommander.JCommander;
import com.beust.jcommander.Parameter; import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import com.google.common.net.HostAndPort; import com.google.common.net.HostAndPort;
import google.registry.testing.AppEngineRule; import google.registry.testing.AppEngineRule;
@ -27,6 +28,7 @@ import org.junit.runner.Description;
import org.junit.runners.model.Statement; import org.junit.runners.model.Statement;
/** Command-line interface for {@link RegistryTestServer}. */ /** Command-line interface for {@link RegistryTestServer}. */
@Parameters(separators = " =", commandDescription = "Runs web development server.")
public final class RegistryTestServerMain { public final class RegistryTestServerMain {
private static final String RESET = "\u001b[0m"; private static final String RESET = "\u001b[0m";

View file

@ -17,7 +17,6 @@ package google.registry.server;
import static com.google.common.base.MoreObjects.firstNonNull; import static com.google.common.base.MoreObjects.firstNonNull;
import static com.google.common.base.Preconditions.checkArgument; import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Verify.verify; import static com.google.common.base.Verify.verify;
import static javax.servlet.http.HttpServletResponse.SC_BAD_REQUEST;
import static javax.servlet.http.HttpServletResponse.SC_FORBIDDEN; import static javax.servlet.http.HttpServletResponse.SC_FORBIDDEN;
import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND; import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND;
@ -122,12 +121,7 @@ public final class StaticResourceServlet extends HttpServlet {
Optional<Path> doHead(HttpServletRequest req, HttpServletResponse rsp) throws IOException { Optional<Path> doHead(HttpServletRequest req, HttpServletResponse rsp) throws IOException {
verify(req.getRequestURI().startsWith(prefix)); verify(req.getRequestURI().startsWith(prefix));
Path file = root.resolve(req.getRequestURI().substring(prefix.length())).normalize(); Path file = root.resolve(req.getRequestURI().substring(prefix.length()));
if (!file.startsWith(root)) {
logger.infofmt("Evil request: %s (%s) (%s + %s)", req.getRequestURI(), file, root, prefix);
rsp.sendError(SC_BAD_REQUEST, "Naughty naughty!");
return Optional.absent();
}
if (!Files.exists(file)) { if (!Files.exists(file)) {
logger.infofmt("Not found: %s (%s)", req.getRequestURI(), file); logger.infofmt("Not found: %s (%s)", req.getRequestURI(), file);
rsp.sendError(SC_NOT_FOUND, "Not found"); rsp.sendError(SC_NOT_FOUND, "Not found");

View file

@ -11,8 +11,8 @@ closure_js_library(
name = "testing", name = "testing",
srcs = ["testing.js"], srcs = ["testing.js"],
deps = [ deps = [
"//javascript/closure", "@io_bazel_rules_closure//closure/library",
"//javascript/closure:testing", "@io_bazel_rules_closure//closure/library:testing",
], ],
) )
@ -25,7 +25,7 @@ closure_js_test(
deps = [ deps = [
":testing", ":testing",
"//java/google/registry/ui/js", "//java/google/registry/ui/js",
"//javascript/closure", "@io_bazel_rules_closure//closure/library",
"//javascript/closure:testing", "@io_bazel_rules_closure//closure/library:testing",
], ],
) )

View file

@ -13,8 +13,8 @@ closure_js_library(
deps = [ deps = [
"//java/google/registry/ui/js", "//java/google/registry/ui/js",
"//java/google/registry/ui/js/registrar", "//java/google/registry/ui/js/registrar",
"//javascript/closure", "@io_bazel_rules_closure//closure/library",
"//javascript/closure:testing", "@io_bazel_rules_closure//closure/library:testing",
], ],
) )
@ -28,9 +28,9 @@ closure_js_test(
":console_test_util", ":console_test_util",
"//java/google/registry/ui/js", "//java/google/registry/ui/js",
"//java/google/registry/ui/js/registrar", "//java/google/registry/ui/js/registrar",
"//java/google/registry/ui/soy/registrar:Console", "//java/google/registry/ui/soy/registrar",
"//javascript/closure",
"//javascript/closure:testing",
"//javatests/google/registry/ui/js:testing", "//javatests/google/registry/ui/js:testing",
"@io_bazel_rules_closure//closure/library",
"@io_bazel_rules_closure//closure/library:testing",
], ],
) )

View file

@ -1,15 +0,0 @@
package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # Apache License 2.0
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library")
closure_js_library(
name = "closure",
exports = ["//third_party/closure/library"],
)
filegroup(
name = "js_files_recursive",
srcs = ["@closure_library//:js_files"],
)