-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBUILD.bazel
104 lines (89 loc) · 2.59 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
load("@aspect_bazel_lib//lib:copy_file.bzl", "copy_file")
load("@aspect_bazel_lib//lib:copy_to_bin.bzl", "copy_to_bin")
load("@aspect_rules_js//npm:defs.bzl", "npm_link_package", "npm_package")
load("@aspect_rules_ts//ts:defs.bzl", "ts_config")
load("@npm//:defs.bzl", "npm_link_all_packages")
load("//tools:workspace_dir.bzl", "write_workspace_dir")
package(default_visibility = ["//visibility:public"])
exports_files(glob(["*.config.js"]) + [".swcrc"])
write_workspace_dir(
name = "workspace_dir",
)
ts_config(
name = "tsconfig",
src = "tsconfig.bazel.json",
)
npm_link_package(
name = "node_modules/@omedym/nestjs-telemetry",
src = "//packages/nestjs-telemetry:js",
)
npm_link_package(
name = "node_modules/@omedym/nestjs-dmq-repository",
src = "//packages/nestjs-dmq-repository:js",
)
npm_link_package(
name = "node_modules/@omedym/nestjs-dmq-datastore-client-postgres",
src = "//datastores/nestjs-dmq-postgres/prisma:npm",
)
npm_link_package(
name = "node_modules/@omedym/nestjs-dmq",
src = "//packages/nestjs-dmq: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"],
)
copy_to_bin(
name = "swc_config_jest",
srcs = ["swc.test.json"],
visibility = ["//visibility:public"],
)
filegroup(
name = "test_unit_deps",
srcs = [
"//:node_modules/@jest/core",
"//:node_modules/@jest/transform",
"//:node_modules/@nestjs/testing",
"//:node_modules/@types",
"//: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 = [
"//datastores/nestjs-dmq-postgres/prisma:prisma_schema_postgres",
],
visibility = ["//visibility:public"],
)