@lensjs/express 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +6 -2
- package/dist/index.js +6 -2
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -38,15 +38,19 @@ const defaultConfig = {
|
|
|
38
38
|
enabled: true,
|
|
39
39
|
path: "/lens",
|
|
40
40
|
ignoredPaths: [],
|
|
41
|
-
onlyPaths: []
|
|
41
|
+
onlyPaths: [],
|
|
42
|
+
requestWatcherEnabled: true
|
|
42
43
|
};
|
|
43
44
|
const lens = async (config) => {
|
|
44
45
|
const adapter = new import_adapter.default({ app: config.app });
|
|
45
|
-
const watchers = [
|
|
46
|
+
const watchers = [];
|
|
46
47
|
const mergedConfig = {
|
|
47
48
|
...config,
|
|
48
49
|
...defaultConfig
|
|
49
50
|
};
|
|
51
|
+
if (config.requestWatcherEnabled) {
|
|
52
|
+
watchers.push(new import_core.RequestWatcher());
|
|
53
|
+
}
|
|
50
54
|
if (config.queryWatcher?.enabled) {
|
|
51
55
|
watchers.push(new import_core.QueryWatcher());
|
|
52
56
|
}
|
package/dist/index.js
CHANGED
|
@@ -10,15 +10,19 @@ const defaultConfig = {
|
|
|
10
10
|
enabled: true,
|
|
11
11
|
path: "/lens",
|
|
12
12
|
ignoredPaths: [],
|
|
13
|
-
onlyPaths: []
|
|
13
|
+
onlyPaths: [],
|
|
14
|
+
requestWatcherEnabled: true
|
|
14
15
|
};
|
|
15
16
|
const lens = async (config) => {
|
|
16
17
|
const adapter = new ExpressAdapter({ app: config.app });
|
|
17
|
-
const watchers = [
|
|
18
|
+
const watchers = [];
|
|
18
19
|
const mergedConfig = {
|
|
19
20
|
...config,
|
|
20
21
|
...defaultConfig
|
|
21
22
|
};
|
|
23
|
+
if (config.requestWatcherEnabled) {
|
|
24
|
+
watchers.push(new RequestWatcher());
|
|
25
|
+
}
|
|
22
26
|
if (config.queryWatcher?.enabled) {
|
|
23
27
|
watchers.push(new QueryWatcher());
|
|
24
28
|
}
|