@vpmedia/simplify 1.45.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.
- package/.oxlintrc.json +72 -0
- package/CHANGELOG.md +68 -0
- package/commitlint.config.js +117 -0
- package/eslint.config.js +7 -31
- package/lefthook.yml +17 -4
- package/package.json +19 -14
- package/pnpm-workspace.yaml +2 -0
- package/src/logging/AbstractLogHandler.js +2 -2
- package/src/logging/ConsoleLogHandler.js +2 -2
- package/src/logging/Logger.js +11 -8
- package/src/logging/OpenTelemetryLogHandler.js +3 -3
- package/src/logging/SentryLogHandler.js +3 -3
- package/src/pagelifecycle/util.js +4 -4
- package/src/util/addLeadingZero.js +3 -4
- package/src/util/addLeadingZero.test.js +1 -1
- package/src/util/capitalize.js +2 -2
- package/src/util/fetchRetry.js +2 -2
- package/src/util/getObjValueByPath.js +2 -2
- package/src/util/getURLParam.js +3 -3
- package/src/util/setObjValueByPath.js +1 -1
- package/types/logging/AbstractLogHandler.d.ts +3 -3
- package/types/logging/AbstractLogHandler.d.ts.map +1 -1
- package/types/logging/Logger.d.ts +15 -14
- package/types/logging/Logger.d.ts.map +1 -1
- package/types/logging/OpenTelemetryLogHandler.d.ts +3 -3
- package/types/logging/OpenTelemetryLogHandler.d.ts.map +1 -1
- package/types/pagelifecycle/util.d.ts +2 -2
- package/types/pagelifecycle/util.d.ts.map +1 -1
- package/types/util/addLeadingZero.d.ts +1 -1
- package/types/util/addLeadingZero.d.ts.map +1 -1
- package/types/util/capitalize.d.ts +1 -1
- package/types/util/capitalize.d.ts.map +1 -1
- package/types/util/fetchRetry.d.ts +2 -2
- package/types/util/fetchRetry.d.ts.map +1 -1
- package/types/util/getObjValueByPath.d.ts +1 -1
- package/types/util/getObjValueByPath.d.ts.map +1 -1
- package/types/util/getURLParam.d.ts +1 -1
- package/types/util/getURLParam.d.ts.map +1 -1
- package/types/util/setObjValueByPath.d.ts +1 -1
- package/types/util/setObjValueByPath.d.ts.map +1 -1
package/.oxlintrc.json
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./node_modules/oxlint/configuration_schema.json",
|
|
3
|
+
"env": { "browser": true },
|
|
4
|
+
"plugins": [
|
|
5
|
+
"eslint",
|
|
6
|
+
"import",
|
|
7
|
+
"jsdoc",
|
|
8
|
+
"jsx-a11y",
|
|
9
|
+
"oxc",
|
|
10
|
+
"promise",
|
|
11
|
+
"react-perf",
|
|
12
|
+
"react",
|
|
13
|
+
"typescript",
|
|
14
|
+
"unicorn"
|
|
15
|
+
],
|
|
16
|
+
"categories": {
|
|
17
|
+
"correctness": "warn",
|
|
18
|
+
"nursery": "warn",
|
|
19
|
+
"pedantic": "warn",
|
|
20
|
+
"perf": "warn",
|
|
21
|
+
"restriction": "warn",
|
|
22
|
+
"style": "warn",
|
|
23
|
+
"suspicious": "warn"
|
|
24
|
+
},
|
|
25
|
+
"rules": {
|
|
26
|
+
"arrow-body-style": "off",
|
|
27
|
+
"class-methods-use-this": "off",
|
|
28
|
+
"consistent-type-imports": "off",
|
|
29
|
+
"curly": "off",
|
|
30
|
+
"default-param-last": "off",
|
|
31
|
+
"explicit-module-boundary-types": "off",
|
|
32
|
+
"exports-last": "off",
|
|
33
|
+
"extensions": "off",
|
|
34
|
+
"filename-case": "off",
|
|
35
|
+
"first": "off",
|
|
36
|
+
"func-style": "off",
|
|
37
|
+
"group-exports": "off",
|
|
38
|
+
"id-length": "off",
|
|
39
|
+
"init-declarations": "off",
|
|
40
|
+
"max-dependencies": "off",
|
|
41
|
+
"max-params": "off",
|
|
42
|
+
"no-anonymous-default-export": "off",
|
|
43
|
+
"no-async-await": "off",
|
|
44
|
+
"no-await-in-loop": "off",
|
|
45
|
+
"no-console": "off",
|
|
46
|
+
"no-continue": "off",
|
|
47
|
+
"no-default-export": "off",
|
|
48
|
+
"no-empty-interface": "off",
|
|
49
|
+
"no-empty-object-type": "off",
|
|
50
|
+
"no-explicit-any": "off",
|
|
51
|
+
"no-magic-numbers": "off",
|
|
52
|
+
"no-named-export": "off",
|
|
53
|
+
"no-null": "off",
|
|
54
|
+
"no-optional-chaining": "off",
|
|
55
|
+
"no-param-reassign": "off",
|
|
56
|
+
"no-rest-spread-properties": "off",
|
|
57
|
+
"no-ternary": "off",
|
|
58
|
+
"no-undef": "off",
|
|
59
|
+
"no-undefined": "off",
|
|
60
|
+
"no-unused-expressions": "off",
|
|
61
|
+
"no-unused-vars": "off",
|
|
62
|
+
"numeric-operators-style": "off",
|
|
63
|
+
"numeric-separators-style": "off",
|
|
64
|
+
"prefer-default-export": "off",
|
|
65
|
+
"prefer-destructuring": "off",
|
|
66
|
+
"prefer-event-target": "off",
|
|
67
|
+
"prefer-global-this": "off",
|
|
68
|
+
"require-module-specifiers": "off",
|
|
69
|
+
"sort-imports": "off",
|
|
70
|
+
"sort-keys": "off"
|
|
71
|
+
}
|
|
72
|
+
}
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +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
|
|
40
|
+
## [1.46.0] - 2025-11-23
|
|
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
|
+
|
|
62
|
+
### ⚙️ Miscellaneous Tasks
|
|
63
|
+
|
|
64
|
+
- *(lint)* Integrated commitlint
|
|
65
|
+
- Integrated git cliff to generater changelogs
|
|
66
|
+
- Adjusted publish release commit message format
|
|
67
|
+
- *(release)* V1.46.0
|
|
68
|
+
## [1.32.0] - 2025-10-12
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
const config = {
|
|
2
|
+
rules: {
|
|
3
|
+
'body-leading-blank': [1, 'always'],
|
|
4
|
+
'body-max-line-length': [2, 'always', 100],
|
|
5
|
+
'footer-leading-blank': [1, 'always'],
|
|
6
|
+
'footer-max-line-length': [2, 'always', 100],
|
|
7
|
+
'header-max-length': [2, 'always', 100],
|
|
8
|
+
'header-trim': [2, 'always'],
|
|
9
|
+
'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
|
|
10
|
+
'subject-empty': [2, 'never'],
|
|
11
|
+
'subject-full-stop': [2, 'never', '.'],
|
|
12
|
+
'type-case': [2, 'always', 'lower-case'],
|
|
13
|
+
'type-empty': [2, 'never'],
|
|
14
|
+
'type-enum': [
|
|
15
|
+
2,
|
|
16
|
+
'always',
|
|
17
|
+
['build', 'chore', 'ci', 'docs', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style', 'test'],
|
|
18
|
+
],
|
|
19
|
+
},
|
|
20
|
+
prompt: {
|
|
21
|
+
questions: {
|
|
22
|
+
type: {
|
|
23
|
+
description: "Select the type of change that you're committing",
|
|
24
|
+
enum: {
|
|
25
|
+
feat: {
|
|
26
|
+
description: 'A new feature',
|
|
27
|
+
title: 'Features',
|
|
28
|
+
emoji: '✨',
|
|
29
|
+
},
|
|
30
|
+
fix: {
|
|
31
|
+
description: 'A bug fix',
|
|
32
|
+
title: 'Bug Fixes',
|
|
33
|
+
emoji: '🐛',
|
|
34
|
+
},
|
|
35
|
+
docs: {
|
|
36
|
+
description: 'Documentation only changes',
|
|
37
|
+
title: 'Documentation',
|
|
38
|
+
emoji: '📚',
|
|
39
|
+
},
|
|
40
|
+
style: {
|
|
41
|
+
description:
|
|
42
|
+
'Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)',
|
|
43
|
+
title: 'Styles',
|
|
44
|
+
emoji: '💎',
|
|
45
|
+
},
|
|
46
|
+
refactor: {
|
|
47
|
+
description: 'A code change that neither fixes a bug nor adds a feature',
|
|
48
|
+
title: 'Code Refactoring',
|
|
49
|
+
emoji: '📦',
|
|
50
|
+
},
|
|
51
|
+
perf: {
|
|
52
|
+
description: 'A code change that improves performance',
|
|
53
|
+
title: 'Performance Improvements',
|
|
54
|
+
emoji: '🚀',
|
|
55
|
+
},
|
|
56
|
+
test: {
|
|
57
|
+
description: 'Adding missing tests or correcting existing tests',
|
|
58
|
+
title: 'Tests',
|
|
59
|
+
emoji: '🚨',
|
|
60
|
+
},
|
|
61
|
+
build: {
|
|
62
|
+
description:
|
|
63
|
+
'Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)',
|
|
64
|
+
title: 'Builds',
|
|
65
|
+
emoji: '🛠',
|
|
66
|
+
},
|
|
67
|
+
ci: {
|
|
68
|
+
description:
|
|
69
|
+
'Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)',
|
|
70
|
+
title: 'Continuous Integrations',
|
|
71
|
+
emoji: '⚙️',
|
|
72
|
+
},
|
|
73
|
+
chore: {
|
|
74
|
+
description: "Other changes that don't modify src or test files",
|
|
75
|
+
title: 'Chores',
|
|
76
|
+
emoji: '♻️',
|
|
77
|
+
},
|
|
78
|
+
revert: {
|
|
79
|
+
description: 'Reverts a previous commit',
|
|
80
|
+
title: 'Reverts',
|
|
81
|
+
emoji: '🗑',
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
scope: {
|
|
86
|
+
description: 'What is the scope of this change (e.g. component or file name)',
|
|
87
|
+
},
|
|
88
|
+
subject: {
|
|
89
|
+
description: 'Write a short, imperative tense description of the change',
|
|
90
|
+
},
|
|
91
|
+
body: {
|
|
92
|
+
description: 'Provide a longer description of the change',
|
|
93
|
+
},
|
|
94
|
+
isBreaking: {
|
|
95
|
+
description: 'Are there any breaking changes?',
|
|
96
|
+
},
|
|
97
|
+
breakingBody: {
|
|
98
|
+
description: 'A BREAKING CHANGE commit requires a body. Please enter a longer description of the commit itself',
|
|
99
|
+
},
|
|
100
|
+
breaking: {
|
|
101
|
+
description: 'Describe the breaking changes',
|
|
102
|
+
},
|
|
103
|
+
isIssueAffected: {
|
|
104
|
+
description: 'Does this change affect any open issues?',
|
|
105
|
+
},
|
|
106
|
+
issuesBody: {
|
|
107
|
+
description:
|
|
108
|
+
'If issues are closed, the commit requires a body. Please enter a longer description of the commit itself',
|
|
109
|
+
},
|
|
110
|
+
issues: {
|
|
111
|
+
description: 'Add issue references (e.g. "fix #123", "re #123".)',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
export default config;
|
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
|
-
|
|
7
|
-
export default [
|
|
7
|
+
export default defineConfig([
|
|
8
8
|
{
|
|
9
9
|
ignores: [
|
|
10
10
|
'.github/**/*.*',
|
|
@@ -24,7 +24,7 @@ export default [
|
|
|
24
24
|
...globals.vitest,
|
|
25
25
|
...globals.browser,
|
|
26
26
|
...globals.node,
|
|
27
|
-
...globals.
|
|
27
|
+
...globals.es2026,
|
|
28
28
|
},
|
|
29
29
|
parserOptions: {
|
|
30
30
|
ecmaVersion: 'latest',
|
|
@@ -51,36 +51,12 @@ export default [
|
|
|
51
51
|
...js.configs.recommended.rules,
|
|
52
52
|
...jsdocPlugin.configs['flat/recommended'].rules,
|
|
53
53
|
...unicornPlugin.configs.recommended.rules,
|
|
54
|
+
'no-unused-vars': 'off',
|
|
54
55
|
'unicorn/filename-case': 'off',
|
|
55
56
|
'unicorn/no-null': 'off',
|
|
56
|
-
'unicorn/prevent-abbreviations': 'off',
|
|
57
|
-
'unicorn/prefer-global-this': 'off',
|
|
58
57
|
'unicorn/numeric-separators-style': 'off',
|
|
59
|
-
'
|
|
60
|
-
'
|
|
61
|
-
'prefer-template': 'error',
|
|
62
|
-
'jsdoc/require-jsdoc': [
|
|
63
|
-
'error',
|
|
64
|
-
{
|
|
65
|
-
require: {
|
|
66
|
-
FunctionDeclaration: true,
|
|
67
|
-
MethodDefinition: true,
|
|
68
|
-
ClassDeclaration: false,
|
|
69
|
-
ArrowFunctionExpression: false,
|
|
70
|
-
FunctionExpression: false,
|
|
71
|
-
},
|
|
72
|
-
},
|
|
73
|
-
],
|
|
74
|
-
'jsdoc/check-indentation': 1,
|
|
75
|
-
'jsdoc/check-line-alignment': 1,
|
|
76
|
-
'jsdoc/check-syntax': 1,
|
|
77
|
-
'jsdoc/require-asterisk-prefix': 1,
|
|
78
|
-
'jsdoc/require-description': 1,
|
|
79
|
-
'jsdoc/require-description-complete-sentence': 1,
|
|
80
|
-
'jsdoc/require-hyphen-before-param-description': 1,
|
|
81
|
-
'jsdoc/require-throws': 1,
|
|
82
|
-
'jsdoc/sort-tags': 1,
|
|
83
|
-
'jsdoc/no-undefined-types': 0,
|
|
58
|
+
'unicorn/prefer-global-this': 'off',
|
|
59
|
+
'unicorn/prevent-abbreviations': 'off',
|
|
84
60
|
},
|
|
85
61
|
},
|
|
86
|
-
];
|
|
62
|
+
]);
|
package/lefthook.yml
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
|
+
# Lefthook configuration
|
|
2
|
+
# @namespace javascript
|
|
3
|
+
# @copyright Copyright (c) 2025-present VPMedia
|
|
4
|
+
# @author Andras Csizmadia <andras@vpmedia.hu>
|
|
5
|
+
# @version 1.0.0
|
|
6
|
+
# @see https://github.com/evilmartians/lefthook/blob/master/docs/configuration.md
|
|
7
|
+
|
|
1
8
|
pre-commit:
|
|
2
9
|
parallel: false
|
|
3
10
|
commands:
|
|
4
11
|
lint_yaml:
|
|
5
12
|
glob: "*.{yml,yaml}"
|
|
13
|
+
run: yq 'true' {staged_files} > /dev/null
|
|
14
|
+
format_js:
|
|
15
|
+
glob: "*.{js,jsx}"
|
|
6
16
|
run: |
|
|
7
17
|
set -e
|
|
8
|
-
|
|
18
|
+
pnpm exec prettier --write -- {staged_files} || true
|
|
19
|
+
git add {staged_files} &> /dev/null || true
|
|
9
20
|
lint_js:
|
|
10
21
|
glob: "*.{js,jsx}"
|
|
11
|
-
run:
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
run: pnpm exec eslint {staged_files}
|
|
23
|
+
commit-msg:
|
|
24
|
+
commands:
|
|
25
|
+
commitlint:
|
|
26
|
+
run: pnpm exec commitlint --edit {1}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vpmedia/simplify",
|
|
3
|
-
"version": "1.
|
|
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,21 +22,26 @@
|
|
|
22
22
|
"eventemitter3": "^5.0.1"
|
|
23
23
|
},
|
|
24
24
|
"optionalDependencies": {
|
|
25
|
-
"@sentry/browser": "^10.
|
|
25
|
+
"@sentry/browser": "^10.30.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@
|
|
29
|
-
"@
|
|
30
|
-
"@
|
|
31
|
-
"@
|
|
32
|
-
"
|
|
33
|
-
"eslint
|
|
34
|
-
"eslint": "^
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
28
|
+
"@commitlint/cli": "^20.2.0",
|
|
29
|
+
"@commitlint/config-conventional": "^20.2.0",
|
|
30
|
+
"@eslint/js": "^9.39.1",
|
|
31
|
+
"@types/node": "^25.0.1",
|
|
32
|
+
"@vitest/coverage-v8": "^4.0.15",
|
|
33
|
+
"eslint": "^9.39.1",
|
|
34
|
+
"eslint-plugin-jsdoc": "^61.5.0",
|
|
35
|
+
"eslint-plugin-oxlint": "^1.32.0",
|
|
36
|
+
"eslint-plugin-unicorn": "^62.0.0",
|
|
37
|
+
"globals": "^16.5.0",
|
|
38
|
+
"jsdom": "^27.3.0",
|
|
39
|
+
"oxlint": "^1.32.0",
|
|
40
|
+
"oxlint-tsgolint": "^0.8.6",
|
|
41
|
+
"prettier": "^3.7.4",
|
|
38
42
|
"typescript": "^5.9.3",
|
|
39
|
-
"
|
|
43
|
+
"typescript-eslint": "^8.49.0",
|
|
44
|
+
"vitest": "^4.0.15"
|
|
40
45
|
},
|
|
41
46
|
"browserslist": [
|
|
42
47
|
"> 0.5%",
|
|
@@ -47,7 +52,7 @@
|
|
|
47
52
|
"scripts": {
|
|
48
53
|
"build": "exit 0",
|
|
49
54
|
"check": "pnpm lint && pnpm test && pnpm typecheck",
|
|
50
|
-
"format": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json,
|
|
55
|
+
"format": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json,css}\"",
|
|
51
56
|
"lint": "eslint \"**/*.{js,jsx}\"",
|
|
52
57
|
"test": "vitest --coverage",
|
|
53
58
|
"typecheck": "rm -rf types && tsc"
|
package/pnpm-workspace.yaml
CHANGED
|
@@ -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) {
|
package/src/logging/Logger.js
CHANGED
|
@@ -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
|
-
|
|
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-
|
|
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
|
-
|
|
10
|
-
return value;
|
|
9
|
+
return null;
|
|
11
10
|
}
|
|
12
11
|
value = value.toString();
|
|
13
12
|
while (value.length < size) {
|
package/src/util/capitalize.js
CHANGED
|
@@ -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) {
|
package/src/util/fetchRetry.js
CHANGED
|
@@ -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}
|
|
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 {
|
|
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];
|
package/src/util/getURLParam.js
CHANGED
|
@@ -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
|
|
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 {
|
|
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,
|
|
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;
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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,
|
|
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):
|
|
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,
|
|
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,
|
|
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:
|
|
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,
|
|
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"}
|