Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
try-import user.bazelrc

test --test_output=errors

115 changes: 115 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,118 @@ SpacesInSquareBrackets: false
Standard: Auto
TabWidth: 8
UseTab: Never
---
Language: Java
# BasedOnStyle: Google
AccessModifierOffset: -1
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: false
AlignTrailingComments: false
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: true
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
AfterExternBlock: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakBeforeBinaryOperators: NonAssignment
BreakBeforeBraces: Attach
BreakBeforeInheritanceComma: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 100
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: true
ForEachMacros:
- foreach
- Q_FOREACH
- BOOST_FOREACH
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<ext/.*\.h>'
Priority: 2
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: true
IndentPPDirectives: None
IndentWidth: 2
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
#RawStringFormats:
# - Delimiter: pb
# Language: TextProto
# BasedOnStyle: google
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
TabWidth: 8
UseTab: Never
24 changes: 22 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install bazel pre-reqs
run: sudo apt install pkg-config zip g++ zlib1g-dev unzip python3
- name: Install deps
run: |
sudo apt install -y \
pkg-config \
zip \
g++\
zlib1g-dev \
unzip \
python3 \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
- name: Install bazelisk
run: |
wget https://github.com/philwo/bazelisk/archive/$BAZELISK_VERSION.tar.gz -O $BAZELISK_ARCHIVE
Expand All @@ -22,6 +34,14 @@ jobs:
env:
BAZELISK_ARCHIVE: /tmp/bazelisk.tar.gz
BAZELISK_VERSION: 8ec9f17a32c6d44abc2dbfb4a86b6b9d559253d0
- name: Install envoy
run: |
curl -sL 'https://getenvoy.io/gpg' | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://dl.bintray.com/tetrate/getenvoy-deb $(lsb_release -cs) stable"
sudo apt-get update && sudo apt-get install -y getenvoy-envoy
which envoy
envoy --version
- name: Build
run: bazel build //...:all
- name: Test
Expand Down
93 changes: 90 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,35 @@ workspace(

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "84abf7ac4234a70924628baa9a73a5a5cbad944c4358cf9abdb4aab29c9a5b77",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.7.0/rules_nodejs-1.7.0.tar.gz"],
)

http_archive(
name = "com_github_grpc_grpc",
sha256 = "950348037825ce013606f5b5b4291fc1d32f79e3c0437747af41813743aa5db8",
strip_prefix = "grpc-3990d9ce9e796abed897517994b3c93598b9525a",
urls = [
"https://github.com/grpc/grpc/archive/3990d9ce9e796abed897517994b3c93598b9525a.tar.gz",
],
)

http_archive(
name = "io_grpc_grpc_java",
sha256 = "233cb87bdfde16602b446a655d204b56772f2395ebf0a5dfa8c4500893adc7f9",
strip_prefix = "grpc-java-57bc1910e4b23220e6a4b1f0f9326e5347e2ec41",
urls = ["https://github.com/grpc/grpc-java/archive/57bc1910e4b23220e6a4b1f0f9326e5347e2ec41.tar.gz"],
)

http_archive(
name = "rules_jvm_external",
sha256 = "02e33287aa6fa129be0a3569ddba0c84ef8eb8b1e5f6f5348373bee559447642",
strip_prefix = "rules_jvm_external-05ba43aa5b671269cf0dfe2f91ec8f26dcea998e",
url = "https://github.com/bazelbuild/rules_jvm_external/archive/05ba43aa5b671269cf0dfe2f91ec8f26dcea998e.tar.gz",
)

http_archive(
name = "rules_proto",
sha256 = "4d421d51f9ecfe9bf96ab23b55c6f2b809cbaf0eea24952683e397decfbd0dd0",
Expand All @@ -14,11 +43,51 @@ http_archive(
)

http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "84abf7ac4234a70924628baa9a73a5a5cbad944c4358cf9abdb4aab29c9a5b77",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.7.0/rules_nodejs-1.7.0.tar.gz"],
name = "io_bazel_rules_sass",
sha256 = "e1af475dacad99c675042fcb3bf15dfaa197a3759821f0244f1b210d4f04d468",
strip_prefix = "rules_sass-1.24.0",
url = "https://github.com/bazelbuild/rules_sass/archive/1.24.0.tar.gz",
)

http_archive(
name = "io_bazel_rules_webtesting",
sha256 = "9bb461d5ef08e850025480bab185fd269242d4e533bca75bfb748001ceb343c3",
urls = [
"https://github.com/bazelbuild/rules_webtesting/releases/download/0.3.3/rules_webtesting.tar.gz",
],
)

###################################################################################################

load("@rules_jvm_external//:defs.bzl", "maven_install")
load("@io_bazel_rules_webtesting//web:java_repositories.bzl", "RULES_WEBTESTING_ARTIFACTS")
load("@io_grpc_grpc_java//:repositories.bzl", "IO_GRPC_GRPC_JAVA_ARTIFACTS", "IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS")

maven_install(
artifacts = [
"com.google.code.gson:gson:2.8.5",
"com.google.guava:guava:28.2-jre",
"com.google.truth:truth:0.42",
"com.google.truth.extensions:truth-java8-extension:0.42",
"io.netty:netty-tcnative-boringssl-static:2.0.25.Final",
"junit:junit:4.13-beta-1",
"net.bytebuddy:byte-buddy:1.8.22",
"org.seleniumhq.selenium:selenium-api:3.141.59",
"org.seleniumhq.selenium:selenium-remote-driver:3.141.59",
"org.seleniumhq.selenium:selenium-support:3.141.59",
] + RULES_WEBTESTING_ARTIFACTS + IO_GRPC_GRPC_JAVA_ARTIFACTS,
generate_compat_repositories = True,
override_targets = IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS,
repositories = [
"https://jcenter.bintray.com/",
"https://maven.google.com",
"https://repo1.maven.org/maven2",
)

load("@maven//:compat.bzl", "compat_repositories")

compat_repositories()

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")

rules_proto_dependencies()
Expand All @@ -29,6 +98,14 @@ load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps")

grpc_deps()

load("@io_grpc_grpc_java//:repositories.bzl", "grpc_java_repositories")

grpc_java_repositories()

load("@build_bazel_rules_nodejs//:index.bzl", "yarn_install")

yarn_install(
Expand All @@ -37,6 +114,12 @@ yarn_install(
yarn_lock = "//:yarn.lock",
)

yarn_install(
name = "test_npm",
package_json = "//test:package.json",
yarn_lock = "//test:yarn.lock",
)

load("@npm//:install_bazel_dependencies.bzl", "install_bazel_dependencies")

install_bazel_dependencies()
Expand All @@ -60,3 +143,7 @@ ts_setup_workspace()
load("@rules_typescript_proto//:index.bzl", "rules_typescript_proto_dependencies")

rules_typescript_proto_dependencies()

load("@io_bazel_rules_sass//sass:sass_repositories.bzl", "sass_repositories")

sass_repositories()
33 changes: 30 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,46 @@
"repository": "https://github.com/Dig-Doug/rules_typescript_proto",
"license": "Apache-2.0",
"dependencies": {
"@angular/animations": "8.2.3",
"@angular/common": "8.2.3",
"@angular/core": "8.2.3",
"@angular/platform-browser": "8.2.3",
"@angular/platform-browser-dynamic": "8.2.3",
"google-protobuf": "3.12.2"
"rxjs": "6.5.3",
"systemjs": "6.1.2",
"zone.js": "0.10.2"
},
"devDependencies": {
"@angular/bazel": "9.0.0",
"@angular/cli": "8.3.10",
"@angular/compiler": "8.2.3",
"@angular/compiler-cli": "8.2.3",
"@bazel/jasmine": "1.7.0",
"@bazel/karma": "1.7.0",
"@bazel/rollup": "1.7.0",
"@bazel/typescript": "1.7.0",
"@babel/cli": "7.6.0",
"@babel/core": "7.6.0",
"@babel/preset-env": "7.6.0",
"@bazel/hide-bazel-files": "1.4.1",
"@bazel/jasmine": "1.4.1",
"@bazel/karma": "1.4.1",
"@bazel/rollup": "1.4.1",
"@bazel/terser": "1.4.1",
"@bazel/typescript": "1.4.1",
"@improbable-eng/grpc-web": "0.12.0",
"@rollup/plugin-commonjs": "11.0.0",
"@rollup/plugin-node-resolve": "6.0.0",
"@types/google-protobuf": "3.7.2",
"@types/jasmine": "3.5.9",
"babelify": "^10.0.0",
"clang-format": "1.4.0",
"core-js": "2.6.9",
"history-server": "1.3.1",
"husky": "4.2.5",
"karma": "5.0.1",
"html-insert-assets": "0.4.0",
"karma-chrome-launcher": "3.1.0",
"karma-firefox-launcher": "1.3.0",
"karma-jasmine": "3.3.1",
Expand All @@ -25,13 +52,13 @@
"minimist": "^1.2.5",
"requirejs": "2.3.6",
"rollup": "2.18.1",
"rollup-plugin-commonjs": "10.1.0",
"rollup-plugin-node-resolve": "5.2.0",
"terser": "4.3.9",
"ts-protoc-gen": "0.12.0",
"typescript": "^3.9.5"
},
"scripts": {
"format": "git-clang-format"
"format": "git-clang-format",
"postinstall": "ngc -p postinstall.tsconfig.json"
},
"husky": {
"hooks": {
Expand Down
35 changes: 35 additions & 0 deletions postinstall.tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"compilerOptions": {
"lib": [
"dom",
"es2015"
],
"experimentalDecorators": true,
"types": [],
"module": "amd",
"moduleResolution": "node"
},
"angularCompilerOptions": {
"enableSummariesForJit": true
},
"include": [
"node_modules/@angular/**/*",
"node_modules/@ctrl/**/*",
"node_modules/@ngrx/**/*",
],
"exclude": [
"node_modules/@ngrx/store/migrations/**",
"node_modules/@ngrx/store/schematics/**",
"node_modules/@ngrx/store/schematics-core/**",
"node_modules/@ngrx/effects/schematics/**",
"node_modules/@angular/cdk/schematics/**",
"node_modules/@angular/cdk/typings/schematics/**",
"node_modules/@angular/common/upgrade*",
"node_modules/@angular/material/schematics/**",
"node_modules/@angular/material/typings/schematics/**",
"node_modules/@angular/router/upgrade*",
"node_modules/@angular/bazel/**",
"node_modules/@angular/compiler-cli/**",
"node_modules/@angular/**/testing/**",
]
}
Loading