-
Notifications
You must be signed in to change notification settings - Fork 1
/
BUILD.bazel
90 lines (77 loc) · 2.22 KB
/
BUILD.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
load("//tools:workspace_dir.bzl", "write_workspace_dir")
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
load("@aspect_rules_js//npm:defs.bzl", "npm_link_package")
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
load("@npm//:defs.bzl", "npm_link_all_packages")
package(default_visibility = ["//visibility:public"])
write_workspace_dir(
name = "workspace_dir",
)
ts_config(
name = "tsconfig",
src = "tsconfig.bazel.json",
)
npm_link_package(
name = "node_modules/@omedym/nestjs-dmq-repository-postgres",
src = "//packages/repository-postgres:npm",
)
npm_link_package(
name = "node_modules/@omedym/nestjs-dmq-repository-postgres-client",
src = "//packages/repository-postgres-client:npm",
)
npm_link_package(
name = "node_modules/@omedym/nestjs-dmq-core",
src = "//packages/core:npm",
)
npm_link_all_packages(name = "node_modules")
copy_to_bin(
name = "npm_license",
srcs = ["LICENSE"],
visibility = ["//visibility:public"],
)
copy_to_bin(
name = "jest_config_unit",
srcs = ["jest.unit.config.js"],
visibility = ["//visibility:public"],
)
copy_to_bin(
name = "jest_config_integration",
srcs = ["jest.integration.config.js"],
visibility = ["//visibility:public"],
)
filegroup(
name = "test_unit_deps",
srcs = [
"//:node_modules/@jest/core",
"//:node_modules/@jest/transform",
"//:node_modules/@nestjs/testing",
"//:node_modules/@types/jest",
"//:node_modules/@types/supertest",
"//:node_modules/c8",
"//:node_modules/jest-junit",
"//:node_modules/jest-mock-extended",
"//:node_modules/neverthrow",
"//:node_modules/reflect-metadata",
"//:node_modules/supertest",
"//:node_modules/ts-jest",
],
visibility = ["//visibility:public"],
)
filegroup(
name = "test_integration_deps",
srcs = [
":test_unit_deps",
"//:node_modules/@bazel/runfiles",
"//:node_modules/@nestjs/testing",
"//:node_modules/@prisma/client",
"//:node_modules/@testcontainers/postgresql",
"//:node_modules/@types/async-redis",
"//:node_modules/async-redis",
"//:node_modules/prisma",
"//:node_modules/testcontainers",
],
data = [
"//packages/repository-postgres-client:prisma_schema_postgres",
],
visibility = ["//visibility:public"],
)