@crimson-education/browser-logger 3.0.5 → 3.0.6-beta.1

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.
Files changed (37) hide show
  1. package/lib/index.d.ts +12 -12
  2. package/lib/index.js +69 -69
  3. package/lib/logger/consoleTransport.d.ts +36 -36
  4. package/lib/logger/consoleTransport.js +80 -80
  5. package/lib/logger/datadogTransport.d.ts +7 -7
  6. package/lib/logger/datadogTransport.js +20 -20
  7. package/lib/logger/index.d.ts +15 -15
  8. package/lib/logger/index.js +147 -147
  9. package/lib/logger/index.test.d.ts +1 -1
  10. package/lib/logger/index.test.js +59 -59
  11. package/lib/logger/utils.d.ts +14 -14
  12. package/lib/logger/utils.js +31 -31
  13. package/lib/reporters/amplifyReporter.d.ts +85 -85
  14. package/lib/reporters/amplifyReporter.js +222 -222
  15. package/lib/reporters/amplifyReporter.js.map +1 -1
  16. package/lib/reporters/amplifyReporter.test.d.ts +1 -1
  17. package/lib/reporters/amplifyReporter.test.js +50 -50
  18. package/lib/reporters/datadogReporter.d.ts +85 -85
  19. package/lib/reporters/datadogReporter.js +124 -124
  20. package/lib/reporters/gtmReporter.d.ts +8 -8
  21. package/lib/reporters/gtmReporter.js +56 -56
  22. package/lib/reporters/index.d.ts +66 -66
  23. package/lib/reporters/index.js +212 -212
  24. package/lib/reporters/logReporter.d.ts +34 -34
  25. package/lib/reporters/logReporter.js +61 -61
  26. package/lib/types/index.d.ts +2 -2
  27. package/lib/types/index.js +18 -18
  28. package/lib/types/logger.d.ts +77 -77
  29. package/lib/types/logger.js +10 -10
  30. package/lib/types/reporter.d.ts +154 -154
  31. package/lib/types/reporter.js +2 -2
  32. package/lib/utils.d.ts +9 -9
  33. package/lib/utils.js +31 -31
  34. package/lib/utils.test.d.ts +1 -1
  35. package/lib/utils.test.js +31 -31
  36. package/package.json +1 -1
  37. package/src/reporters/amplifyReporter.ts +2 -2
package/lib/utils.test.js CHANGED
@@ -1,32 +1,32 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const utils_1 = require("./utils");
4
- describe('utils', () => {
5
- describe('filterReporterMetadata', () => {
6
- it('should remove attributes which match the ignore patterns', () => {
7
- const inputAttributeMap = {
8
- includeme: '5',
9
- excludeme: 'false',
10
- differentProp: 'boo',
11
- deep: {
12
- includeme: '5',
13
- excludeme: 'false',
14
- deepExcludeStr: 'boo',
15
- deepExcludeRegex: 'boo',
16
- },
17
- };
18
- const filtered = (0, utils_1.filterReporterMetadata)(inputAttributeMap, {
19
- ignoreMetadataPatterns: [/excludeme/g, /Prop/g, 'deep.deepExcludeStr', /deep\.deepExcludeRegex/g],
20
- });
21
- expect(filtered.includeme).toBeTruthy();
22
- expect(filtered.excludeme).toBeFalsy();
23
- expect(filtered.differentProp).toBeFalsy();
24
- // deep
25
- expect(filtered.deep.includeme).toBeTruthy();
26
- expect(filtered.deep.excludeme).toBeFalsy();
27
- expect(filtered.deep.deepExcludeStr).toBeFalsy();
28
- expect(filtered.deep.deepExcludeRegex).toBeFalsy();
29
- });
30
- });
31
- });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const utils_1 = require("./utils");
4
+ describe('utils', () => {
5
+ describe('filterReporterMetadata', () => {
6
+ it('should remove attributes which match the ignore patterns', () => {
7
+ const inputAttributeMap = {
8
+ includeme: '5',
9
+ excludeme: 'false',
10
+ differentProp: 'boo',
11
+ deep: {
12
+ includeme: '5',
13
+ excludeme: 'false',
14
+ deepExcludeStr: 'boo',
15
+ deepExcludeRegex: 'boo',
16
+ },
17
+ };
18
+ const filtered = (0, utils_1.filterReporterMetadata)(inputAttributeMap, {
19
+ ignoreMetadataPatterns: [/excludeme/g, /Prop/g, 'deep.deepExcludeStr', /deep\.deepExcludeRegex/g],
20
+ });
21
+ expect(filtered.includeme).toBeTruthy();
22
+ expect(filtered.excludeme).toBeFalsy();
23
+ expect(filtered.differentProp).toBeFalsy();
24
+ // deep
25
+ expect(filtered.deep.includeme).toBeTruthy();
26
+ expect(filtered.deep.excludeme).toBeFalsy();
27
+ expect(filtered.deep.deepExcludeStr).toBeFalsy();
28
+ expect(filtered.deep.deepExcludeRegex).toBeFalsy();
29
+ });
30
+ });
31
+ });
32
32
  //# sourceMappingURL=utils.test.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crimson-education/browser-logger",
3
- "version": "3.0.5",
3
+ "version": "3.0.6-beta.1",
4
4
  "description": "An abstract logger and reporting utility for browser environments",
5
5
  "scripts": {
6
6
  "prepack": "npm run build",
@@ -1,5 +1,5 @@
1
- import { Auth } from '@aws-amplify/auth';
2
- import { Analytics } from '@aws-amplify/analytics';
1
+ import { Auth } from '@aws-amplify/auth/lib/Auth';
2
+ import { Analytics } from '@aws-amplify/analytics/lib/Analytics';
3
3
  import { Endpoint, FinalizeRequestMiddleware } from '@aws-sdk/types';
4
4
  import { HttpRequest } from '@aws-sdk/protocol-http';
5
5
  import { PinpointClient, ServiceInputTypes, ServiceOutputTypes } from '@aws-sdk/client-pinpoint';