@vpmedia/simplify 1.46.0 โ†’ 1.47.0

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 (38) hide show
  1. package/CHANGELOG.md +62 -0
  2. package/eslint.config.js +3 -3
  3. package/lefthook.yml +1 -1
  4. package/package.json +15 -14
  5. package/pnpm-workspace.yaml +2 -0
  6. package/src/logging/AbstractLogHandler.js +2 -2
  7. package/src/logging/ConsoleLogHandler.js +2 -2
  8. package/src/logging/Logger.js +11 -8
  9. package/src/logging/OpenTelemetryLogHandler.js +3 -3
  10. package/src/logging/SentryLogHandler.js +3 -3
  11. package/src/pagelifecycle/util.js +4 -4
  12. package/src/util/addLeadingZero.js +3 -4
  13. package/src/util/addLeadingZero.test.js +1 -1
  14. package/src/util/capitalize.js +2 -2
  15. package/src/util/fetchRetry.js +2 -2
  16. package/src/util/getObjValueByPath.js +2 -2
  17. package/src/util/getURLParam.js +3 -3
  18. package/src/util/setObjValueByPath.js +1 -1
  19. package/types/logging/AbstractLogHandler.d.ts +3 -3
  20. package/types/logging/AbstractLogHandler.d.ts.map +1 -1
  21. package/types/logging/Logger.d.ts +15 -14
  22. package/types/logging/Logger.d.ts.map +1 -1
  23. package/types/logging/OpenTelemetryLogHandler.d.ts +3 -3
  24. package/types/logging/OpenTelemetryLogHandler.d.ts.map +1 -1
  25. package/types/pagelifecycle/util.d.ts +2 -2
  26. package/types/pagelifecycle/util.d.ts.map +1 -1
  27. package/types/util/addLeadingZero.d.ts +1 -1
  28. package/types/util/addLeadingZero.d.ts.map +1 -1
  29. package/types/util/capitalize.d.ts +1 -1
  30. package/types/util/capitalize.d.ts.map +1 -1
  31. package/types/util/fetchRetry.d.ts +2 -2
  32. package/types/util/fetchRetry.d.ts.map +1 -1
  33. package/types/util/getObjValueByPath.d.ts +1 -1
  34. package/types/util/getObjValueByPath.d.ts.map +1 -1
  35. package/types/util/getURLParam.d.ts +1 -1
  36. package/types/util/getURLParam.d.ts.map +1 -1
  37. package/types/util/setObjValueByPath.d.ts +1 -1
  38. package/types/util/setObjValueByPath.d.ts.map +1 -1
package/CHANGELOG.md CHANGED
@@ -1,6 +1,68 @@
1
+ ## [1.47.0] - 2025-12-16
2
+
3
+ ### ๐Ÿ’ผ Other
4
+
5
+ - *(deps)* Bump dependency versions
6
+ - *(deps)* Bump dependency versions
7
+ - *(deps)* Bump dependency versions
8
+ - *(deps)* Bump dependency versions
9
+ - *(deps)* Bump dependency versions
10
+ - *(deps)* Bump dependency versions
11
+ - *(deps)* Bump dependency versions
12
+ - *(deps)* Bump dependency versions
13
+ - *(security)* Do not run ci.yml on pull requests
14
+ - *(deps)* Bump dependency versions
15
+ - *(deps)* Bump dependency versions
16
+ - *(deps)* Bump dependency versions
17
+ - *(deps)* Bump dependency versions
18
+ - *(deps)* Bump dependency versions
19
+ - *(deps)* Bumped dependency versions, added type aware lint plugins
20
+ - *(deps)* Bump dependency versions
21
+
22
+ ### ๐Ÿšœ Refactor
23
+
24
+ - Improve strict type checking
25
+
26
+ ### ๐Ÿงช Testing
27
+
28
+ - Fix failing test
29
+
30
+ ### โš™๏ธ Miscellaneous Tasks
31
+
32
+ - Release
33
+ - Do not auto format md files (breaks changelog generator output)
34
+ - Generate complete changelogs
35
+ - *(security)* Added pnpm audit build step
36
+ - *(security)* Protect agains npm supply chain attacks
37
+ - *(lefthook)* Adjusted lefthook rule to do not fail on deleted files
38
+ - Use ts expect error instead of ignore
39
+ - *(release)* V1.47.0
1
40
  ## [1.46.0] - 2025-11-23
2
41
 
42
+ ### ๐Ÿ’ผ Other
43
+
44
+ - Update dependencies
45
+ - Update dependencies
46
+ - Update dependencies
47
+ - Update dependencies
48
+ - Update dependencies
49
+ - Update dependencies
50
+ - Update dependencies
51
+ - Update dependencies
52
+ - Update dependencies
53
+ - Update dependencies
54
+ - Update dependencies
55
+ - *(deps)* Bump dependency versions
56
+ - *(deps)* Bumped github actions/checkout to v6
57
+
58
+ ### ๐Ÿ“š Documentation
59
+
60
+ - Added changelog and license files
61
+
3
62
  ### โš™๏ธ Miscellaneous Tasks
4
63
 
64
+ - *(lint)* Integrated commitlint
65
+ - Integrated git cliff to generater changelogs
5
66
  - Adjusted publish release commit message format
6
67
  - *(release)* V1.46.0
68
+ ## [1.32.0] - 2025-10-12
package/eslint.config.js CHANGED
@@ -1,10 +1,10 @@
1
+ import { defineConfig } from 'eslint/config';
1
2
  import js from '@eslint/js';
2
3
  import jsdocPlugin from 'eslint-plugin-jsdoc';
3
4
  import unicornPlugin from 'eslint-plugin-unicorn';
4
5
  import globals from 'globals';
5
6
 
6
- /** @type { import('eslint').Linter.Config[] } */
7
- export default [
7
+ export default defineConfig([
8
8
  {
9
9
  ignores: [
10
10
  '.github/**/*.*',
@@ -59,4 +59,4 @@ export default [
59
59
  'unicorn/prevent-abbreviations': 'off',
60
60
  },
61
61
  },
62
- ];
62
+ ]);
package/lefthook.yml CHANGED
@@ -15,7 +15,7 @@ pre-commit:
15
15
  glob: "*.{js,jsx}"
16
16
  run: |
17
17
  set -e
18
- pnpm exec prettier --write -- {staged_files}
18
+ pnpm exec prettier --write -- {staged_files} || true
19
19
  git add {staged_files} &> /dev/null || true
20
20
  lint_js:
21
21
  glob: "*.{js,jsx}"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vpmedia/simplify",
3
- "version": "1.46.0",
3
+ "version": "1.47.0",
4
4
  "description": "@vpmedia/simplify",
5
5
  "author": "Andras Csizmadia <andras@vpmedia.hu> (www.vpmedia.hu)",
6
6
  "license": "MIT",
@@ -22,25 +22,26 @@
22
22
  "eventemitter3": "^5.0.1"
23
23
  },
24
24
  "optionalDependencies": {
25
- "@sentry/browser": "^10.26.0"
25
+ "@sentry/browser": "^10.30.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@babel/preset-env": "^7.28.5",
29
- "@commitlint/cli": "^20.1.0",
30
- "@commitlint/config-conventional": "^20.0.0",
28
+ "@commitlint/cli": "^20.2.0",
29
+ "@commitlint/config-conventional": "^20.2.0",
31
30
  "@eslint/js": "^9.39.1",
32
- "@types/node": "^24.10.1",
33
- "@vitest/coverage-v8": "^4.0.13",
31
+ "@types/node": "^25.0.1",
32
+ "@vitest/coverage-v8": "^4.0.15",
34
33
  "eslint": "^9.39.1",
35
- "eslint-plugin-jsdoc": "^61.4.0",
36
- "eslint-plugin-oxlint": "^1.29.0",
34
+ "eslint-plugin-jsdoc": "^61.5.0",
35
+ "eslint-plugin-oxlint": "^1.32.0",
37
36
  "eslint-plugin-unicorn": "^62.0.0",
38
37
  "globals": "^16.5.0",
39
- "jsdom": "^27.2.0",
40
- "oxlint": "^1.29.0",
41
- "prettier": "^3.6.2",
38
+ "jsdom": "^27.3.0",
39
+ "oxlint": "^1.32.0",
40
+ "oxlint-tsgolint": "^0.8.6",
41
+ "prettier": "^3.7.4",
42
42
  "typescript": "^5.9.3",
43
- "vitest": "^4.0.13"
43
+ "typescript-eslint": "^8.49.0",
44
+ "vitest": "^4.0.15"
44
45
  },
45
46
  "browserslist": [
46
47
  "> 0.5%",
@@ -51,7 +52,7 @@
51
52
  "scripts": {
52
53
  "build": "exit 0",
53
54
  "check": "pnpm lint && pnpm test && pnpm typecheck",
54
- "format": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json,md,css}\"",
55
+ "format": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json,css}\"",
55
56
  "lint": "eslint \"**/*.{js,jsx}\"",
56
57
  "test": "vitest --coverage",
57
58
  "typecheck": "rm -rf types && tsc"
@@ -1,2 +1,4 @@
1
1
  onlyBuiltDependencies:
2
2
  - esbuild
3
+ trustPolicy: no-downgrade
4
+ minimumReleaseAge: 2880
@@ -13,8 +13,8 @@ export class AbstractLogHandler {
13
13
  * @param {number} timestamp - Log timestamp.
14
14
  * @param {number} level - Log level.
15
15
  * @param {string} message - Log message.
16
- * @param {object} extra - Log extra data.
17
- * @param {Error} error - Log error.
16
+ * @param {object | null | undefined} extra - Log extra data.
17
+ * @param {Error | null | undefined} error - Log error.
18
18
  * @throws {Error}
19
19
  */
20
20
  emit(logger, timestamp, level, message, extra, error) {
@@ -26,8 +26,8 @@ export class ConsoleLogHandler extends AbstractLogHandler {
26
26
  * @param {number} timestamp - Log timestamp.
27
27
  * @param {number} level - Log level.
28
28
  * @param {string} message - Log message.
29
- * @param {object} extra - Log extra data.
30
- * @param {Error} error - Log error.
29
+ * @param {object | null | undefined} extra - Log extra data.
30
+ * @param {Error | null | undefined} error - Log error.
31
31
  * @throws {Error}
32
32
  */
33
33
  emit(logger, timestamp, level, message, extra, error) {
@@ -27,7 +27,10 @@ export class Logger {
27
27
  const isProduction = appEnvironment === 'production' || appEnvironment === 'release';
28
28
  const defaultLevel = isProduction ? LOG_LEVEL_SILENT : LOG_LEVEL_DEBUG;
29
29
  const parameterName = `log_${this.name.toLowerCase()}`;
30
- this.level = Number.parseInt(getURLParam(parameterName, getURLParam('log_all', defaultLevel.toString())), 10);
30
+ const paramLevel =
31
+ getURLParam(parameterName, getURLParam('log_all', defaultLevel.toString())) ?? defaultLevel.toString();
32
+ /** @type {number} */
33
+ this.level = Number.parseInt(paramLevel, 10);
31
34
  }
32
35
 
33
36
  /**
@@ -44,7 +47,7 @@ export class Logger {
44
47
  * @param {number} level - Log level.
45
48
  * @param {string} message - Log message.
46
49
  * @param {object} extra - Log extra data.
47
- * @param {Error} [error] - Log exception.
50
+ * @param {Error | null | undefined} [error] - Log exception.
48
51
  */
49
52
  static emit = (logger, level, message, extra, error) => {
50
53
  const timestamp = Date.now();
@@ -58,7 +61,7 @@ export class Logger {
58
61
  /**
59
62
  * Emit debug log.
60
63
  * @param {string} message - Log message.
61
- * @param {object} [extra] - Log extra data.
64
+ * @param {object | null | undefined} [extra] - Log extra data.
62
65
  */
63
66
  debug(message, extra) {
64
67
  Logger.emit(this, LOG_LEVEL_DEBUG, message, extra);
@@ -67,7 +70,7 @@ export class Logger {
67
70
  /**
68
71
  * Emit info log.
69
72
  * @param {string} message - Log message.
70
- * @param {object} [extra] - Log extra data.
73
+ * @param {object | null | undefined} [extra] - Log extra data.
71
74
  */
72
75
  info(message, extra) {
73
76
  Logger.emit(this, LOG_LEVEL_INFO, message, extra);
@@ -76,7 +79,7 @@ export class Logger {
76
79
  /**
77
80
  * Emit warning log.
78
81
  * @param {string} message - Log message.
79
- * @param {object} [extra] - Log extra data.
82
+ * @param {object | null | undefined} [extra] - Log extra data.
80
83
  */
81
84
  warn(message, extra) {
82
85
  Logger.emit(this, LOG_LEVEL_WARNING, message, extra);
@@ -85,7 +88,7 @@ export class Logger {
85
88
  /**
86
89
  * Emit warning log.
87
90
  * @param {string} message - Log message.
88
- * @param {object} [extra] - Log extra data.
91
+ * @param {object | null | undefined} [extra] - Log extra data.
89
92
  */
90
93
  warning(message, extra) {
91
94
  Logger.emit(this, LOG_LEVEL_WARNING, message, extra);
@@ -94,7 +97,7 @@ export class Logger {
94
97
  /**
95
98
  * Emit error log.
96
99
  * @param {string} message - Log message.
97
- * @param {object} [extra] - Log extra data.
100
+ * @param {object | null | undefined} [extra] - Log extra data.
98
101
  */
99
102
  error(message, extra) {
100
103
  Logger.emit(this, LOG_LEVEL_ERROR, message, extra);
@@ -104,7 +107,7 @@ export class Logger {
104
107
  * Emit exception log.
105
108
  * @param {string} message - Log message.
106
109
  * @param {Error} error - Log error.
107
- * @param {object} [extra] - Log extra data.
110
+ * @param {object | null | undefined} [extra] - Log extra data.
108
111
  */
109
112
  exception(message, error, extra) {
110
113
  Logger.emit(this, LOG_LEVEL_FATAL, message, extra, error);
@@ -5,7 +5,7 @@ export class OpenTelemetryLogHandler extends AbstractLogHandler {
5
5
  /**
6
6
  * Open Telemetry log handler.
7
7
  * @param {number} level - Log handler level.
8
- * @param {(logger: import('./Logger.js').Logger, timestamp: number, level: number, message: string, extra: object, error: Error) => void} emitter - Log handler emitter.
8
+ * @param {(logger: import('./Logger.js').Logger, timestamp: number, level: number, message: string, extra: object | null | undefined, error: Error | null | undefined) => void} emitter - Log handler emitter.
9
9
  */
10
10
  constructor(level = LOG_LEVEL_DEBUG, emitter) {
11
11
  super(level);
@@ -18,8 +18,8 @@ export class OpenTelemetryLogHandler extends AbstractLogHandler {
18
18
  * @param {number} timestamp - Log timestamp.
19
19
  * @param {number} level - Log level.
20
20
  * @param {string} message - Log message.
21
- * @param {object} extra - Log extra data.
22
- * @param {Error} error - Log error.
21
+ * @param {object | null | undefined} extra - Log extra data.
22
+ * @param {Error | null | undefined} error - Log error.
23
23
  * @throws {Error}
24
24
  */
25
25
  emit(logger, timestamp, level, message, extra, error) {
@@ -18,13 +18,13 @@ export class SentryLogHandler extends AbstractLogHandler {
18
18
  * @param {number} timestamp - Log timestamp.
19
19
  * @param {number} level - Log level.
20
20
  * @param {string} message - Log message.
21
- * @param {object} extra - Log extra data.
22
- * @param {Error} error - Log error.
21
+ * @param {object | null | undefined} extra - Log extra data.
22
+ * @param {Error | null | undefined} error - Log error.
23
23
  * @throws {Error}
24
24
  */
25
25
  emit(logger, timestamp, level, message, extra, error) {
26
26
  /** @type {import('@sentry/browser').SeverityLevel} */
27
- // @ts-ignore
27
+ // @ts-expect-error
28
28
  const levelName = getLogLevelName(level);
29
29
  const logMessage = `[${logger.name}] ${message}`;
30
30
  const breadcrumb = {
@@ -20,10 +20,10 @@ const logger = new Logger('pagelifecycle');
20
20
 
21
21
  const eventEmitter = new EventEmitter();
22
22
 
23
- /** @type {import('./typedef.js').PageLifecycleState} */
23
+ /** @type {import('./typedef.js').PageLifecycleState | null | undefined} */
24
24
  let currentPageLifecycleState = null;
25
25
 
26
- /** @type {import('./typedef.js').DocumentState} */
26
+ /** @type {import('./typedef.js').DocumentState | null | undefined} */
27
27
  let currentDocumentState = null;
28
28
 
29
29
  let isInitialized = false;
@@ -133,7 +133,7 @@ export const initPageLifecycle = () => {
133
133
 
134
134
  /**
135
135
  * Returns the current page lifecycle state.
136
- * @returns {string} Current page lifecycle state.
136
+ * @returns {string | null | undefined} Current page lifecycle state.
137
137
  */
138
138
  export const getPageLifecycleState = () => {
139
139
  return currentPageLifecycleState;
@@ -141,7 +141,7 @@ export const getPageLifecycleState = () => {
141
141
 
142
142
  /**
143
143
  * Returns the current document state.
144
- * @returns {import('./typedef.js').DocumentState} Current document state.
144
+ * @returns {import('./typedef.js').DocumentState | null | undefined} Current document state.
145
145
  */
146
146
  export const getDocumentState = () => {
147
147
  return currentDocumentState;
@@ -1,13 +1,12 @@
1
1
  /**
2
2
  * TBD.
3
- * @param {number|string} value - TBD.
3
+ * @param {number | string | null | undefined} value - TBD.
4
4
  * @param {number} size - TBD.
5
- * @returns {string} TBD.
5
+ * @returns {string | null} TBD.
6
6
  */
7
7
  export const addLeadingZero = (value, size = 2) => {
8
8
  if (value === null || value === undefined) {
9
- // @ts-ignore: Type 'string | number' is not assignable to type 'string'.
10
- return value;
9
+ return null;
11
10
  }
12
11
  value = value.toString();
13
12
  while (value.length < size) {
@@ -7,5 +7,5 @@ test('Tests add leading zero', () => {
7
7
  expect(addLeadingZero('21')).toBe('21');
8
8
  expect(addLeadingZero(21)).toBe('21');
9
9
  expect(addLeadingZero(null)).toBe(null);
10
- expect(addLeadingZero()).toBe(undefined);
10
+ expect(addLeadingZero()).toBe(null);
11
11
  });
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Capitalize a string.
3
- * @param {string} value - Ther input string.
4
- * @returns {string} TBD.
3
+ * @param {string | null | undefined} value - Ther input string.
4
+ * @returns {string | null | undefined} TBD.
5
5
  */
6
6
  export const capitalize = (value) => {
7
7
  if (!value || value?.length === 0) {
@@ -32,9 +32,9 @@ export class FetchError extends Error {
32
32
  /**
33
33
  * Fetch with retry.
34
34
  * @param {string | URL | Request} resource - Fetch URL.
35
- * @param {RequestInit} [fetchOptions] - Fetch options.
35
+ * @param {RequestInit} fetchOptions - Fetch options.
36
36
  * @param {{delay?: number, numTries?: number, statusExcludes?: number[], timeout?: number}} [retryOptions] - Retry options.
37
- * @returns {Promise<Response>} Fetch result.
37
+ * @returns {Promise<Response | undefined>} Fetch result.
38
38
  */
39
39
  export const fetchRetry = async (resource, fetchOptions, retryOptions) => {
40
40
  retryOptions = retryOptions ?? {};
@@ -2,11 +2,11 @@
2
2
  * Get object value by path.
3
3
  * @param {object} obj - TBD.
4
4
  * @param {string} path - TBD.
5
- * @returns {*} TBD.
5
+ * @returns {object | null} TBD.
6
6
  */
7
7
  export const getObjValueByPath = (obj, path) => {
8
8
  if (!obj || !path) {
9
- return;
9
+ return null;
10
10
  }
11
11
  const keyParts = path.split('.');
12
12
  const nextKey = keyParts[0];
@@ -5,14 +5,14 @@ const urlSearchParams = new URLSearchParams(window.location.search);
5
5
  /**
6
6
  * TBD.
7
7
  * @param {string} key - TBD.
8
- * @param {string} defaultValue - TBD.
8
+ * @param {string | null | undefined} defaultValue - TBD.
9
9
  * @param {boolean} isSanitize - TBD.
10
- * @returns {string} TBD.
10
+ * @returns {string | null} TBD.
11
11
  */
12
12
  export const getURLParam = (key, defaultValue = null, isSanitize = true) => {
13
13
  const paramValue = urlSearchParams.get(key);
14
14
  if (paramValue === null || paramValue === undefined) {
15
- return defaultValue;
15
+ return null;
16
16
  }
17
17
  if (isSanitize) {
18
18
  return sanitizeURLParam(paramValue);
@@ -2,7 +2,7 @@
2
2
  * Get object value by path.
3
3
  * @param {object} obj - TBD.
4
4
  * @param {string} path - TBD.
5
- * @param {*} value - TBD.
5
+ * @param {object | null | undefined} value - TBD.
6
6
  * @throws {SyntaxError} Error when illegal path value has been provided.
7
7
  */
8
8
  export const setObjValueByPath = (obj, path, value) => {
@@ -11,10 +11,10 @@ export class AbstractLogHandler {
11
11
  * @param {number} timestamp - Log timestamp.
12
12
  * @param {number} level - Log level.
13
13
  * @param {string} message - Log message.
14
- * @param {object} extra - Log extra data.
15
- * @param {Error} error - Log error.
14
+ * @param {object | null | undefined} extra - Log extra data.
15
+ * @param {Error | null | undefined} error - Log error.
16
16
  * @throws {Error}
17
17
  */
18
- emit(logger: import("./Logger.js").Logger, timestamp: number, level: number, message: string, extra: object, error: Error): void;
18
+ emit(logger: import("./Logger.js").Logger, timestamp: number, level: number, message: string, extra: object | null | undefined, error: Error | null | undefined): void;
19
19
  }
20
20
  //# sourceMappingURL=AbstractLogHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractLogHandler.d.ts","sourceRoot":"","sources":["../../src/logging/AbstractLogHandler.js"],"names":[],"mappings":"AAAA;IACE;;;OAGG;IACH,mBAFW,MAAM,EAIhB;IADC,cAAkB;IAGpB;;;;;;;;;OASG;IACH,aARW,OAAO,aAAa,EAAE,MAAM,aAC5B,MAAM,SACN,MAAM,WACN,MAAM,SACN,MAAM,SACN,KAAK,QAKf;CACF"}
1
+ {"version":3,"file":"AbstractLogHandler.d.ts","sourceRoot":"","sources":["../../src/logging/AbstractLogHandler.js"],"names":[],"mappings":"AAAA;IACE;;;OAGG;IACH,mBAFW,MAAM,EAIhB;IADC,cAAkB;IAGpB;;;;;;;;;OASG;IACH,aARW,OAAO,aAAa,EAAE,MAAM,aAC5B,MAAM,SACN,MAAM,WACN,MAAM,SACN,MAAM,GAAG,IAAI,GAAG,SAAS,SACzB,KAAK,GAAG,IAAI,GAAG,SAAS,QAKlC;CACF"}
@@ -14,52 +14,53 @@ export class Logger {
14
14
  * @param {number} level - Log level.
15
15
  * @param {string} message - Log message.
16
16
  * @param {object} extra - Log extra data.
17
- * @param {Error} [error] - Log exception.
17
+ * @param {Error | null | undefined} [error] - Log exception.
18
18
  */
19
- static emit: (logger: Logger, level: number, message: string, extra: object, error?: Error) => void;
19
+ static emit: (logger: Logger, level: number, message: string, extra: object, error?: Error | null | undefined) => void;
20
20
  /**
21
21
  * Creates a new Logger instance.
22
22
  * @param {string} [name] - The logger name.
23
23
  */
24
24
  constructor(name?: string);
25
25
  name: string;
26
+ /** @type {number} */
26
27
  level: number;
27
28
  /**
28
29
  * Emit debug log.
29
30
  * @param {string} message - Log message.
30
- * @param {object} [extra] - Log extra data.
31
+ * @param {object | null | undefined} [extra] - Log extra data.
31
32
  */
32
- debug(message: string, extra?: object): void;
33
+ debug(message: string, extra?: object | null | undefined): void;
33
34
  /**
34
35
  * Emit info log.
35
36
  * @param {string} message - Log message.
36
- * @param {object} [extra] - Log extra data.
37
+ * @param {object | null | undefined} [extra] - Log extra data.
37
38
  */
38
- info(message: string, extra?: object): void;
39
+ info(message: string, extra?: object | null | undefined): void;
39
40
  /**
40
41
  * Emit warning log.
41
42
  * @param {string} message - Log message.
42
- * @param {object} [extra] - Log extra data.
43
+ * @param {object | null | undefined} [extra] - Log extra data.
43
44
  */
44
- warn(message: string, extra?: object): void;
45
+ warn(message: string, extra?: object | null | undefined): void;
45
46
  /**
46
47
  * Emit warning log.
47
48
  * @param {string} message - Log message.
48
- * @param {object} [extra] - Log extra data.
49
+ * @param {object | null | undefined} [extra] - Log extra data.
49
50
  */
50
- warning(message: string, extra?: object): void;
51
+ warning(message: string, extra?: object | null | undefined): void;
51
52
  /**
52
53
  * Emit error log.
53
54
  * @param {string} message - Log message.
54
- * @param {object} [extra] - Log extra data.
55
+ * @param {object | null | undefined} [extra] - Log extra data.
55
56
  */
56
- error(message: string, extra?: object): void;
57
+ error(message: string, extra?: object | null | undefined): void;
57
58
  /**
58
59
  * Emit exception log.
59
60
  * @param {string} message - Log message.
60
61
  * @param {Error} error - Log error.
61
- * @param {object} [extra] - Log extra data.
62
+ * @param {object | null | undefined} [extra] - Log extra data.
62
63
  */
63
- exception(message: string, error: Error, extra?: object): void;
64
+ exception(message: string, error: Error, extra?: object | null | undefined): void;
64
65
  }
65
66
  //# sourceMappingURL=Logger.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/logging/Logger.js"],"names":[],"mappings":"AAaA;IACE;;OAEG;IACH,iBAFU,OAAO,yBAAyB,EAAE,kBAAkB,EAAE,CAE3C;IAerB;;;OAGG;IACH,oBAAqB,SAFV,OAAO,yBAAyB,EAAE,kBAEjB,UAE1B;IAEF;;;;;;;OAOG;IACH,cAAe,QANJ,MAMU,EAAE,OALZ,MAKiB,EAAE,SAJnB,MAI0B,EAAE,OAH5B,MAGiC,EAAE,QAFnC,KAEwC,UAOjD;IApCF;;;OAGG;IACH,mBAFW,MAAM,EAShB;IANC,aAAoC;IAKpC,cAA6G;IA4B/G;;;;OAIG;IACH,eAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;;OAIG;IACH,cAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;;OAIG;IACH,cAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;;OAIG;IACH,iBAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;;OAIG;IACH,eAHW,MAAM,UACN,MAAM,QAIhB;IAED;;;;;OAKG;IACH,mBAJW,MAAM,SACN,KAAK,UACL,MAAM,QAIhB;CACF"}
1
+ {"version":3,"file":"Logger.d.ts","sourceRoot":"","sources":["../../src/logging/Logger.js"],"names":[],"mappings":"AAaA;IACE;;OAEG;IACH,iBAFU,OAAO,yBAAyB,EAAE,kBAAkB,EAAE,CAE3C;IAiBrB;;;OAGG;IACH,oBAAqB,SAFV,OAAO,yBAAyB,EAAE,kBAEjB,UAE1B;IAEF;;;;;;;OAOG;IACH,cAAe,QANJ,MAMU,EAAE,OALZ,MAKiB,EAAE,SAJnB,MAI0B,EAAE,OAH5B,MAGiC,EAAE,QAFnC,KAAK,GAAG,IAAI,GAAG,SAEyB,UAOjD;IAtCF;;;OAGG;IACH,mBAFW,MAAM,EAWhB;IARC,aAAoC;IAMpC,qBAAqB;IACrB,OADW,MAAM,CAC2B;IA4B9C;;;;OAIG;IACH,eAHW,MAAM,UACN,MAAM,GAAG,IAAI,GAAG,SAAS,QAInC;IAED;;;;OAIG;IACH,cAHW,MAAM,UACN,MAAM,GAAG,IAAI,GAAG,SAAS,QAInC;IAED;;;;OAIG;IACH,cAHW,MAAM,UACN,MAAM,GAAG,IAAI,GAAG,SAAS,QAInC;IAED;;;;OAIG;IACH,iBAHW,MAAM,UACN,MAAM,GAAG,IAAI,GAAG,SAAS,QAInC;IAED;;;;OAIG;IACH,eAHW,MAAM,UACN,MAAM,GAAG,IAAI,GAAG,SAAS,QAInC;IAED;;;;;OAKG;IACH,mBAJW,MAAM,SACN,KAAK,UACL,MAAM,GAAG,IAAI,GAAG,SAAS,QAInC;CACF"}
@@ -2,10 +2,10 @@ export class OpenTelemetryLogHandler extends AbstractLogHandler {
2
2
  /**
3
3
  * Open Telemetry log handler.
4
4
  * @param {number} level - Log handler level.
5
- * @param {(logger: import('./Logger.js').Logger, timestamp: number, level: number, message: string, extra: object, error: Error) => void} emitter - Log handler emitter.
5
+ * @param {(logger: import('./Logger.js').Logger, timestamp: number, level: number, message: string, extra: object | null | undefined, error: Error | null | undefined) => void} emitter - Log handler emitter.
6
6
  */
7
- constructor(level: number, emitter: (logger: import("./Logger.js").Logger, timestamp: number, level: number, message: string, extra: object, error: Error) => void);
8
- emitter: (logger: import("./Logger.js").Logger, timestamp: number, level: number, message: string, extra: object, error: Error) => void;
7
+ constructor(level: number | undefined, emitter: (logger: import("./Logger.js").Logger, timestamp: number, level: number, message: string, extra: object | null | undefined, error: Error | null | undefined) => void);
8
+ emitter: (logger: import("./Logger.js").Logger, timestamp: number, level: number, message: string, extra: object | null | undefined, error: Error | null | undefined) => void;
9
9
  }
10
10
  import { AbstractLogHandler } from './AbstractLogHandler.js';
11
11
  //# sourceMappingURL=OpenTelemetryLogHandler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OpenTelemetryLogHandler.d.ts","sourceRoot":"","sources":["../../src/logging/OpenTelemetryLogHandler.js"],"names":[],"mappings":"AAGA;IACE;;;;OAIG;IACH,mBAHW,MAAM,WACN,CAAC,MAAM,EAAE,OAAO,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,EAKxI;IADC,kBAJkB,OAAO,aAAa,EAAE,MAAM,aAAa,MAAM,SAAS,MAAM,WAAW,MAAM,SAAS,MAAM,SAAS,KAAK,KAAK,IAAI,CAIjH;CAmBzB;mCA9BkC,yBAAyB"}
1
+ {"version":3,"file":"OpenTelemetryLogHandler.d.ts","sourceRoot":"","sources":["../../src/logging/OpenTelemetryLogHandler.js"],"names":[],"mappings":"AAGA;IACE;;;;OAIG;IACH,mBAHW,MAAM,uBACN,CAAC,MAAM,EAAE,OAAO,aAAa,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,EAK9K;IADC,kBAJkB,OAAO,aAAa,EAAE,MAAM,aAAa,MAAM,SAAS,MAAM,WAAW,MAAM,SAAS,MAAM,GAAG,IAAI,GAAG,SAAS,SAAS,KAAK,GAAG,IAAI,GAAG,SAAS,KAAK,IAAI,CAIvJ;CAmBzB;mCA9BkC,yBAAyB"}
@@ -1,7 +1,7 @@
1
1
  export function addPageLifecycleCallback(state: import("./typedef.js").DocumentState | import("./typedef.js").PageLifecycleState, callback: () => void): void;
2
2
  export function initPageLifecycle(): void;
3
- export function getPageLifecycleState(): string;
4
- export function getDocumentState(): import("./typedef.js").DocumentState;
3
+ export function getPageLifecycleState(): string | null | undefined;
4
+ export function getDocumentState(): import("./typedef.js").DocumentState | null | undefined;
5
5
  export function getPageLifecycleEventEmitter(): EventEmitter;
6
6
  export function isPageLifecycleInitialized(): boolean;
7
7
  import { EventEmitter } from 'eventemitter3';
@@ -1 +1 @@
1
- {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/pagelifecycle/util.js"],"names":[],"mappings":"AAsCO,gDAHI,OAAO,cAAc,EAAE,aAAa,GAAG,OAAO,cAAc,EAAE,kBAAkB,YAChF,MAAM,IAAI,QAMpB;AAgEM,0CAyBN;AAMM,yCAFM,MAAM,CAIlB;AAMM,oCAFM,OAAO,cAAc,EAAE,aAAa,CAIhD;AAMM,gDAFM,YAAY,CAOxB;AAMM,8CAFM,OAAO,CAInB;6BAjK4B,eAAe"}
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../src/pagelifecycle/util.js"],"names":[],"mappings":"AAsCO,gDAHI,OAAO,cAAc,EAAE,aAAa,GAAG,OAAO,cAAc,EAAE,kBAAkB,YAChF,MAAM,IAAI,QAMpB;AAgEM,0CAyBN;AAMM,yCAFM,MAAM,GAAG,IAAI,GAAG,SAAS,CAIrC;AAMM,oCAFM,OAAO,cAAc,EAAE,aAAa,GAAG,IAAI,GAAG,SAAS,CAInE;AAMM,gDAFM,YAAY,CAOxB;AAMM,8CAFM,OAAO,CAInB;6BAjK4B,eAAe"}
@@ -1,2 +1,2 @@
1
- export function addLeadingZero(value: number | string, size?: number): string;
1
+ export function addLeadingZero(value: number | string | null | undefined, size?: number): string | null;
2
2
  //# sourceMappingURL=addLeadingZero.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"addLeadingZero.d.ts","sourceRoot":"","sources":["../../src/util/addLeadingZero.js"],"names":[],"mappings":"AAMO,sCAJI,MAAM,GAAC,MAAM,SACb,MAAM,GACJ,MAAM,CAYlB"}
1
+ {"version":3,"file":"addLeadingZero.d.ts","sourceRoot":"","sources":["../../src/util/addLeadingZero.js"],"names":[],"mappings":"AAMO,sCAJI,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,SAClC,MAAM,GACJ,MAAM,GAAG,IAAI,CAWzB"}
@@ -1,2 +1,2 @@
1
- export function capitalize(value: string): string;
1
+ export function capitalize(value: string | null | undefined): string | null | undefined;
2
2
  //# sourceMappingURL=capitalize.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"capitalize.d.ts","sourceRoot":"","sources":["../../src/util/capitalize.js"],"names":[],"mappings":"AAKO,kCAHI,MAAM,GACJ,MAAM,CAQlB"}
1
+ {"version":3,"file":"capitalize.d.ts","sourceRoot":"","sources":["../../src/util/capitalize.js"],"names":[],"mappings":"AAKO,kCAHI,MAAM,GAAG,IAAI,GAAG,SAAS,GACvB,MAAM,GAAG,IAAI,GAAG,SAAS,CAQrC"}
@@ -12,10 +12,10 @@ export class FetchError extends Error {
12
12
  fetchOptions: RequestInit;
13
13
  response: Response;
14
14
  }
15
- export function fetchRetry(resource: string | URL | Request, fetchOptions?: RequestInit, retryOptions?: {
15
+ export function fetchRetry(resource: string | URL | Request, fetchOptions: RequestInit, retryOptions?: {
16
16
  delay?: number;
17
17
  numTries?: number;
18
18
  statusExcludes?: number[];
19
19
  timeout?: number;
20
- }): Promise<Response>;
20
+ }): Promise<Response | undefined>;
21
21
  //# sourceMappingURL=fetchRetry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fetchRetry.d.ts","sourceRoot":"","sources":["../../src/util/fetchRetry.js"],"names":[],"mappings":"AAYA,yBAA0B,CAAC,CAAC;AAE5B;IACE;;;;;;OAMG;IACH,qBALW,MAAM,YACN,MAAM,GAAG,GAAG,GAAG,OAAO,gBACtB,WAAW,YACX,QAAQ,EAQlB;IAHC,iCAAwB;IACxB,0BAAgC;IAChC,mBAAwB;CAE3B;AASM,qCALI,MAAM,GAAG,GAAG,GAAG,OAAO,iBACtB,WAAW,iBACX;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,GAC9E,OAAO,CAAC,QAAQ,CAAC,CAgD7B"}
1
+ {"version":3,"file":"fetchRetry.d.ts","sourceRoot":"","sources":["../../src/util/fetchRetry.js"],"names":[],"mappings":"AAYA,yBAA0B,CAAC,CAAC;AAE5B;IACE;;;;;;OAMG;IACH,qBALW,MAAM,YACN,MAAM,GAAG,GAAG,GAAG,OAAO,gBACtB,WAAW,YACX,QAAQ,EAQlB;IAHC,iCAAwB;IACxB,0BAAgC;IAChC,mBAAwB;CAE3B;AASM,qCALI,MAAM,GAAG,GAAG,GAAG,OAAO,gBACtB,WAAW,iBACX;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,GAC9E,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC,CAgDzC"}
@@ -1,2 +1,2 @@
1
- export function getObjValueByPath(obj: object, path: string): any;
1
+ export function getObjValueByPath(obj: object, path: string): object | null;
2
2
  //# sourceMappingURL=getObjValueByPath.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getObjValueByPath.d.ts","sourceRoot":"","sources":["../../src/util/getObjValueByPath.js"],"names":[],"mappings":"AAMO,uCAJI,MAAM,QACN,MAAM,GACJ,GAAC,CAYb"}
1
+ {"version":3,"file":"getObjValueByPath.d.ts","sourceRoot":"","sources":["../../src/util/getObjValueByPath.js"],"names":[],"mappings":"AAMO,uCAJI,MAAM,QACN,MAAM,GACJ,MAAM,GAAG,IAAI,CAYzB"}
@@ -1,2 +1,2 @@
1
- export function getURLParam(key: string, defaultValue?: string, isSanitize?: boolean): string;
1
+ export function getURLParam(key: string, defaultValue?: string | null | undefined, isSanitize?: boolean): string | null;
2
2
  //# sourceMappingURL=getURLParam.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getURLParam.d.ts","sourceRoot":"","sources":["../../src/util/getURLParam.js"],"names":[],"mappings":"AAWO,iCALI,MAAM,iBACN,MAAM,eACN,OAAO,GACL,MAAM,CAWlB"}
1
+ {"version":3,"file":"getURLParam.d.ts","sourceRoot":"","sources":["../../src/util/getURLParam.js"],"names":[],"mappings":"AAWO,iCALI,MAAM,iBACN,MAAM,GAAG,IAAI,GAAG,SAAS,eACzB,OAAO,GACL,MAAM,GAAG,IAAI,CAWzB"}
@@ -1,2 +1,2 @@
1
- export function setObjValueByPath(obj: object, path: string, value: any): void;
1
+ export function setObjValueByPath(obj: object, path: string, value: object | null | undefined): void;
2
2
  //# sourceMappingURL=setObjValueByPath.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"setObjValueByPath.d.ts","sourceRoot":"","sources":["../../src/util/setObjValueByPath.js"],"names":[],"mappings":"AAOO,uCALI,MAAM,QACN,MAAM,SACN,GAAC,QAgBX"}
1
+ {"version":3,"file":"setObjValueByPath.d.ts","sourceRoot":"","sources":["../../src/util/setObjValueByPath.js"],"names":[],"mappings":"AAOO,uCALI,MAAM,QACN,MAAM,SACN,MAAM,GAAG,IAAI,GAAG,SAAS,QAgBnC"}