dce-reactkit 3.2.2-beta.4 → 3.2.2-beta.5
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/cjs/index.js +18 -17
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +18 -17
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/helpers/logClientEvent.tsx +5 -0
- package/src/server/initServer.ts +1 -1
package/package.json
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import LOG_ROUTE_PATH from '../constants/LOG_ROUTE_PATH';
|
|
3
3
|
import LogBuiltInMetadata from '../types/LogBuiltInMetadata';
|
|
4
4
|
import LogFunction from '../types/LogFunction';
|
|
5
|
+
import LogLevel from '../types/LogLevel';
|
|
5
6
|
|
|
6
7
|
// Import shared functions
|
|
7
8
|
import visitServerEndpoint from './visitServerEndpoint';
|
|
@@ -27,6 +28,10 @@ const logClientEvent: LogFunction = async (opts) => {
|
|
|
27
28
|
opts.subcontext
|
|
28
29
|
?? LogBuiltInMetadata.Context.Uncategorized
|
|
29
30
|
),
|
|
31
|
+
level: (
|
|
32
|
+
opts.level
|
|
33
|
+
?? LogLevel.Info
|
|
34
|
+
),
|
|
30
35
|
tags: JSON.stringify(opts.tags ?? []),
|
|
31
36
|
metadata: JSON.stringify(opts.metadata ?? {}),
|
|
32
37
|
errorMessage: (
|
package/src/server/initServer.ts
CHANGED
|
@@ -240,7 +240,7 @@ const initServer = (
|
|
|
240
240
|
* @param {number} month the month to query (e.g. 1 = January)
|
|
241
241
|
* @returns {Log[]} list of logs from the given month
|
|
242
242
|
*/
|
|
243
|
-
opts.app.
|
|
243
|
+
opts.app.get(
|
|
244
244
|
`${LOG_REVIEW_ROUTE_PATH_PREFIX}/years/:year/months/:month`,
|
|
245
245
|
genRouteHandler({
|
|
246
246
|
paramTypes: {
|