secure-ls2 2.1.9 → 2.1.11

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/.eslintrc CHANGED
@@ -1,186 +1,186 @@
1
- {
2
- "ecmaFeatures": {
3
- "globalReturn": true,
4
- "jsx": true,
5
- "modules": true
6
- },
7
-
8
- "env": {
9
- "browser": true,
10
- "es6": true,
11
- "node": true
12
- },
13
-
14
- "globals": {
15
- "document": false,
16
- "escape": false,
17
- "navigator": false,
18
- "unescape": false,
19
- "window": false,
20
- "describe": true,
21
- "before": true,
22
- "it": true,
23
- "expect": true,
24
- "sinon": true
25
- },
26
-
27
- "parser": "babel-eslint",
28
-
29
- "plugins": [
30
-
31
- ],
32
-
33
- "rules": {
34
- "block-scoped-var": 2,
35
- "brace-style": [2, "1tbs", { "allowSingleLine": true }],
36
- "camelcase": [2, { "properties": "always" }],
37
- "comma-dangle": [2, "never"],
38
- "comma-spacing": [2, { "before": false, "after": true }],
39
- "comma-style": [2, "last"],
40
- "complexity": 0,
41
- "consistent-return": 2,
42
- "consistent-this": 0,
43
- "curly": [2, "multi-line"],
44
- "default-case": 0,
45
- "dot-location": [2, "property"],
46
- "dot-notation": 0,
47
- "eol-last": 2,
48
- "eqeqeq": [2, "allow-null"],
49
- "func-names": 0,
50
- "func-style": 0,
51
- "generator-star-spacing": [2, "both"],
52
- "guard-for-in": 0,
53
- "handle-callback-err": [2, "^(err|error|anySpecificError)$" ],
54
- "indent": [2, 2, { "SwitchCase": 1 }],
55
- "key-spacing": [2, { "beforeColon": false, "afterColon": true }],
56
- "linebreak-style": 0,
57
- "max-depth": 0,
58
- "max-len": [2, 120, 4],
59
- "max-nested-callbacks": 0,
60
- "max-params": 0,
61
- "max-statements": 0,
62
- "new-cap": [2, { "newIsCap": true, "capIsNew": false }],
63
- "newline-after-var": [2, "always"],
64
- "new-parens": 2,
65
- "no-alert": 0,
66
- "no-array-constructor": 2,
67
- "no-bitwise": 0,
68
- "no-caller": 2,
69
- "no-catch-shadow": 0,
70
- "no-cond-assign": 2,
71
- "no-console": 0,
72
- "no-constant-condition": 0,
73
- "no-continue": 0,
74
- "no-control-regex": 2,
75
- "no-debugger": 2,
76
- "no-delete-var": 2,
77
- "no-div-regex": 0,
78
- "no-dupe-args": 2,
79
- "no-dupe-keys": 2,
80
- "no-duplicate-case": 2,
81
- "no-else-return": 2,
82
- "no-empty": 0,
83
- "no-empty-character-class": 2,
84
- "no-empty-label": 2,
85
- "no-eq-null": 0,
86
- "no-eval": 2,
87
- "no-ex-assign": 2,
88
- "no-extend-native": 2,
89
- "no-extra-bind": 2,
90
- "no-extra-boolean-cast": 2,
91
- "no-extra-parens": 0,
92
- "no-extra-semi": 0,
93
- "no-extra-strict": 0,
94
- "no-fallthrough": 2,
95
- "no-floating-decimal": 2,
96
- "no-func-assign": 2,
97
- "no-implied-eval": 2,
98
- "no-inline-comments": 0,
99
- "no-inner-declarations": [2, "functions"],
100
- "no-invalid-regexp": 2,
101
- "no-irregular-whitespace": 2,
102
- "no-iterator": 2,
103
- "no-label-var": 2,
104
- "no-labels": 2,
105
- "no-lone-blocks": 0,
106
- "no-lonely-if": 0,
107
- "no-loop-func": 0,
108
- "no-mixed-requires": 0,
109
- "no-mixed-spaces-and-tabs": [2, false],
110
- "no-multi-spaces": 2,
111
- "no-multi-str": 2,
112
- "no-multiple-empty-lines": [2, { "max": 1 }],
113
- "no-native-reassign": 2,
114
- "no-negated-in-lhs": 2,
115
- "no-nested-ternary": 0,
116
- "no-new": 2,
117
- "no-new-func": 2,
118
- "no-new-object": 2,
119
- "no-new-require": 2,
120
- "no-new-wrappers": 2,
121
- "no-obj-calls": 2,
122
- "no-octal": 2,
123
- "no-octal-escape": 2,
124
- "no-path-concat": 0,
125
- "no-plusplus": 0,
126
- "no-process-env": 0,
127
- "no-process-exit": 0,
128
- "no-proto": 2,
129
- "no-redeclare": 2,
130
- "no-regex-spaces": 2,
131
- "no-reserved-keys": 0,
132
- "no-restricted-modules": 0,
133
- "no-return-assign": 2,
134
- "no-script-url": 0,
135
- "no-self-compare": 2,
136
- "no-sequences": 2,
137
- "no-shadow": 0,
138
- "no-shadow-restricted-names": 2,
139
- "no-spaced-func": 2,
140
- "no-sparse-arrays": 2,
141
- "no-sync": 0,
142
- "no-ternary": 0,
143
- "no-throw-literal": 2,
144
- "no-trailing-spaces": 2,
145
- "no-undef": 2,
146
- "no-undef-init": 2,
147
- "no-undefined": 0,
148
- "no-underscore-dangle": 0,
149
- "no-unneeded-ternary": 2,
150
- "no-unreachable": 2,
151
- "no-unused-expressions": 0,
152
- "no-unused-vars": [2, { "vars": "all", "args": "none" }],
153
- "no-use-before-define": 2,
154
- "no-var": 0,
155
- "no-void": 0,
156
- "no-warning-comments": 0,
157
- "no-with": 2,
158
- "one-var": 0,
159
- "operator-assignment": 0,
160
- "operator-linebreak": [2, "after"],
161
- "padded-blocks": 0,
162
- "quote-props": 0,
163
- "quotes": [2, "single", "avoid-escape"],
164
- "radix": 2,
165
- "semi": [2, "always"],
166
- "semi-spacing": 0,
167
- "sort-vars": 0,
168
- "space-after-keywords": [2, "always"],
169
- "space-before-blocks": [2, "always"],
170
- "space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
171
- "space-in-brackets": 0,
172
- "space-in-parens": [2, "never"],
173
- "space-infix-ops": 2,
174
- "space-return-throw-case": 2,
175
- "space-unary-ops": [2, { "words": true, "nonwords": false }],
176
- "spaced-comment": [2, "always"],
177
- "strict": 0,
178
- "use-isnan": 2,
179
- "valid-jsdoc": 0,
180
- "valid-typeof": 2,
181
- "vars-on-top": 2,
182
- "wrap-iife": [2, "any"],
183
- "wrap-regex": 0,
184
- "yoda": [2, "never"]
185
- }
186
- }
1
+ {
2
+ "ecmaFeatures": {
3
+ "globalReturn": true,
4
+ "jsx": true,
5
+ "modules": true
6
+ },
7
+
8
+ "env": {
9
+ "browser": true,
10
+ "es6": true,
11
+ "node": true
12
+ },
13
+
14
+ "globals": {
15
+ "document": false,
16
+ "escape": false,
17
+ "navigator": false,
18
+ "unescape": false,
19
+ "window": false,
20
+ "describe": true,
21
+ "before": true,
22
+ "it": true,
23
+ "expect": true,
24
+ "sinon": true
25
+ },
26
+
27
+ "parser": "babel-eslint",
28
+
29
+ "plugins": [
30
+
31
+ ],
32
+
33
+ "rules": {
34
+ "block-scoped-var": 2,
35
+ "brace-style": [2, "1tbs", { "allowSingleLine": true }],
36
+ "camelcase": [2, { "properties": "always" }],
37
+ "comma-dangle": [2, "never"],
38
+ "comma-spacing": [2, { "before": false, "after": true }],
39
+ "comma-style": [2, "last"],
40
+ "complexity": 0,
41
+ "consistent-return": 2,
42
+ "consistent-this": 0,
43
+ "curly": [2, "multi-line"],
44
+ "default-case": 0,
45
+ "dot-location": [2, "property"],
46
+ "dot-notation": 0,
47
+ "eol-last": 2,
48
+ "eqeqeq": [2, "allow-null"],
49
+ "func-names": 0,
50
+ "func-style": 0,
51
+ "generator-star-spacing": [2, "both"],
52
+ "guard-for-in": 0,
53
+ "handle-callback-err": [2, "^(err|error|anySpecificError)$" ],
54
+ "indent": [2, 2, { "SwitchCase": 1 }],
55
+ "key-spacing": [2, { "beforeColon": false, "afterColon": true }],
56
+ "linebreak-style": 0,
57
+ "max-depth": 0,
58
+ "max-len": [2, 120, 4],
59
+ "max-nested-callbacks": 0,
60
+ "max-params": 0,
61
+ "max-statements": 0,
62
+ "new-cap": [2, { "newIsCap": true, "capIsNew": false }],
63
+ "newline-after-var": [2, "always"],
64
+ "new-parens": 2,
65
+ "no-alert": 0,
66
+ "no-array-constructor": 2,
67
+ "no-bitwise": 0,
68
+ "no-caller": 2,
69
+ "no-catch-shadow": 0,
70
+ "no-cond-assign": 2,
71
+ "no-console": 0,
72
+ "no-constant-condition": 0,
73
+ "no-continue": 0,
74
+ "no-control-regex": 2,
75
+ "no-debugger": 2,
76
+ "no-delete-var": 2,
77
+ "no-div-regex": 0,
78
+ "no-dupe-args": 2,
79
+ "no-dupe-keys": 2,
80
+ "no-duplicate-case": 2,
81
+ "no-else-return": 2,
82
+ "no-empty": 0,
83
+ "no-empty-character-class": 2,
84
+ "no-empty-label": 2,
85
+ "no-eq-null": 0,
86
+ "no-eval": 2,
87
+ "no-ex-assign": 2,
88
+ "no-extend-native": 2,
89
+ "no-extra-bind": 2,
90
+ "no-extra-boolean-cast": 2,
91
+ "no-extra-parens": 0,
92
+ "no-extra-semi": 0,
93
+ "no-extra-strict": 0,
94
+ "no-fallthrough": 2,
95
+ "no-floating-decimal": 2,
96
+ "no-func-assign": 2,
97
+ "no-implied-eval": 2,
98
+ "no-inline-comments": 0,
99
+ "no-inner-declarations": [2, "functions"],
100
+ "no-invalid-regexp": 2,
101
+ "no-irregular-whitespace": 2,
102
+ "no-iterator": 2,
103
+ "no-label-var": 2,
104
+ "no-labels": 2,
105
+ "no-lone-blocks": 0,
106
+ "no-lonely-if": 0,
107
+ "no-loop-func": 0,
108
+ "no-mixed-requires": 0,
109
+ "no-mixed-spaces-and-tabs": [2, false],
110
+ "no-multi-spaces": 2,
111
+ "no-multi-str": 2,
112
+ "no-multiple-empty-lines": [2, { "max": 1 }],
113
+ "no-native-reassign": 2,
114
+ "no-negated-in-lhs": 2,
115
+ "no-nested-ternary": 0,
116
+ "no-new": 2,
117
+ "no-new-func": 2,
118
+ "no-new-object": 2,
119
+ "no-new-require": 2,
120
+ "no-new-wrappers": 2,
121
+ "no-obj-calls": 2,
122
+ "no-octal": 2,
123
+ "no-octal-escape": 2,
124
+ "no-path-concat": 0,
125
+ "no-plusplus": 0,
126
+ "no-process-env": 0,
127
+ "no-process-exit": 0,
128
+ "no-proto": 2,
129
+ "no-redeclare": 2,
130
+ "no-regex-spaces": 2,
131
+ "no-reserved-keys": 0,
132
+ "no-restricted-modules": 0,
133
+ "no-return-assign": 2,
134
+ "no-script-url": 0,
135
+ "no-self-compare": 2,
136
+ "no-sequences": 2,
137
+ "no-shadow": 0,
138
+ "no-shadow-restricted-names": 2,
139
+ "no-spaced-func": 2,
140
+ "no-sparse-arrays": 2,
141
+ "no-sync": 0,
142
+ "no-ternary": 0,
143
+ "no-throw-literal": 2,
144
+ "no-trailing-spaces": 2,
145
+ "no-undef": 2,
146
+ "no-undef-init": 2,
147
+ "no-undefined": 0,
148
+ "no-underscore-dangle": 0,
149
+ "no-unneeded-ternary": 2,
150
+ "no-unreachable": 2,
151
+ "no-unused-expressions": 0,
152
+ "no-unused-vars": [2, { "vars": "all", "args": "none" }],
153
+ "no-use-before-define": 2,
154
+ "no-var": 0,
155
+ "no-void": 0,
156
+ "no-warning-comments": 0,
157
+ "no-with": 2,
158
+ "one-var": 0,
159
+ "operator-assignment": 0,
160
+ "operator-linebreak": [2, "after"],
161
+ "padded-blocks": 0,
162
+ "quote-props": 0,
163
+ "quotes": [2, "single", "avoid-escape"],
164
+ "radix": 2,
165
+ "semi": [2, "always"],
166
+ "semi-spacing": 0,
167
+ "sort-vars": 0,
168
+ "space-after-keywords": [2, "always"],
169
+ "space-before-blocks": [2, "always"],
170
+ "space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
171
+ "space-in-brackets": 0,
172
+ "space-in-parens": [2, "never"],
173
+ "space-infix-ops": 2,
174
+ "space-return-throw-case": 2,
175
+ "space-unary-ops": [2, { "words": true, "nonwords": false }],
176
+ "spaced-comment": [2, "always"],
177
+ "strict": 0,
178
+ "use-isnan": 2,
179
+ "valid-jsdoc": 0,
180
+ "valid-typeof": 2,
181
+ "vars-on-top": 2,
182
+ "wrap-iife": [2, "any"],
183
+ "wrap-regex": 0,
184
+ "yoda": [2, "never"]
185
+ }
186
+ }
@@ -1,6 +1,6 @@
1
- # These are supported funding model platforms
2
-
3
- github: [softvar] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
- patreon: softvar # Replace with a single Patreon username
5
- open_collective: softvar # Replace with a single Open Collective username
6
- custom: ['https://paypal.me/softvar'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
1
+ # These are supported funding model platforms
2
+
3
+ github: [softvar] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4
+ patreon: softvar # Replace with a single Patreon username
5
+ open_collective: softvar # Replace with a single Open Collective username
6
+ custom: ['https://paypal.me/softvar'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -1,65 +1,65 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [ master, github-action, develop]
6
- pull_request:
7
- branches: [ master ]
8
-
9
- jobs:
10
- build:
11
- if: "!contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
12
- name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
13
- runs-on: ${{ matrix.os }}
14
- strategy:
15
- fail-fast: false
16
- matrix:
17
- os:
18
- - ubuntu-latest
19
- # - macos-latest
20
- # - windows-latest
21
- node_version: [ 10.x, 12.x, 13.x, 14.x, 15.x, 16.x, 18.x, 19.x, 20.x, 21.x, 22.x ]
22
-
23
- steps:
24
- - uses: actions/checkout@v2
25
- - name: Use Node.js ${{ matrix.node_version }}
26
- uses: actions/setup-node@v1
27
- with:
28
- node-version: ${{ matrix.node_version }}
29
-
30
- - name: Restore packages
31
- uses: actions/cache@v2
32
- with:
33
- path: |
34
- node_modules
35
- */*/node_modules
36
- key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
37
-
38
- - name: Copy package.json compatible with node version
39
- run: |
40
- if [[ ${{ matrix.node_version }} == 10* ]]; then
41
- cp ci-package.json package.json
42
- elif [[ ${{ matrix.node_version }} == 12* ]]; then
43
- cp ci-package.json package.json
44
- elif [[ ${{ matrix.node_version }} == 13* ]]; then
45
- cp ci-package.json package.json
46
- elif [[ ${{ matrix.node_version }} == 14* ]]; then
47
- cp ci-package.json package.json
48
- elif [[ ${{ matrix.node_version }} == 15* ]]; then
49
- cp ci-package.json package.json
50
- elif [[ ${{ matrix.node_version }} == 16* ]]; then
51
- cp ci-package.json package.json
52
- elif [[ ${{ matrix.node_version }} == 19* ]]; then
53
- cp ci-package.json package.json
54
- fi
55
-
56
- - name: Install dependencies and run tests with coverage
57
- run: |
58
- yarn install
59
- yarn test:coverage
60
-
61
- - name: Upload coverage to Codecov
62
- uses: codecov/codecov-action@v4.0.1
63
- with:
64
- token: ${{ secrets.CODECOV_TOKEN }}
65
- flags: ${{ runner.os }}
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [ master, github-action, develop]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ build:
11
+ if: "!contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
12
+ name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }}
13
+ runs-on: ${{ matrix.os }}
14
+ strategy:
15
+ fail-fast: false
16
+ matrix:
17
+ os:
18
+ - ubuntu-latest
19
+ # - macos-latest
20
+ # - windows-latest
21
+ node_version: [ 10.x, 12.x, 13.x, 14.x, 15.x, 16.x, 18.x, 19.x, 20.x, 21.x, 22.x ]
22
+
23
+ steps:
24
+ - uses: actions/checkout@v2
25
+ - name: Use Node.js ${{ matrix.node_version }}
26
+ uses: actions/setup-node@v1
27
+ with:
28
+ node-version: ${{ matrix.node_version }}
29
+
30
+ - name: Restore packages
31
+ uses: actions/cache@v2
32
+ with:
33
+ path: |
34
+ node_modules
35
+ */*/node_modules
36
+ key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
37
+
38
+ - name: Copy package.json compatible with node version
39
+ run: |
40
+ if [[ ${{ matrix.node_version }} == 10* ]]; then
41
+ cp ci-package.json package.json
42
+ elif [[ ${{ matrix.node_version }} == 12* ]]; then
43
+ cp ci-package.json package.json
44
+ elif [[ ${{ matrix.node_version }} == 13* ]]; then
45
+ cp ci-package.json package.json
46
+ elif [[ ${{ matrix.node_version }} == 14* ]]; then
47
+ cp ci-package.json package.json
48
+ elif [[ ${{ matrix.node_version }} == 15* ]]; then
49
+ cp ci-package.json package.json
50
+ elif [[ ${{ matrix.node_version }} == 16* ]]; then
51
+ cp ci-package.json package.json
52
+ elif [[ ${{ matrix.node_version }} == 19* ]]; then
53
+ cp ci-package.json package.json
54
+ fi
55
+
56
+ - name: Install dependencies and run tests with coverage
57
+ run: |
58
+ yarn install
59
+ yarn test:coverage
60
+
61
+ - name: Upload coverage to Codecov
62
+ uses: codecov/codecov-action@v4.0.1
63
+ with:
64
+ token: ${{ secrets.CODECOV_TOKEN }}
65
+ flags: ${{ runner.os }}
package/.husky/commit-msg CHANGED
@@ -1 +1 @@
1
- npx --no-install commitlint --edit "$1"
1
+ npx --no-install commitlint --edit "$1"
package/.husky/pre-commit CHANGED
@@ -1 +1 @@
1
- yarn lint-staged
1
+ yarn lint-staged
package/.husky/pre-push CHANGED
@@ -1,3 +1,3 @@
1
- yarn lint
2
- yarn test:prod
3
- yarn build
1
+ yarn lint
2
+ yarn test:prod
3
+ yarn build
package/.prettierrc CHANGED
@@ -1,8 +1,8 @@
1
- {
2
- "semi": true,
3
- "printWidth": 120,
4
- "tabWidth": 2,
5
- "useTabs": false,
6
- "singleQuote": true,
7
- "bracketSpacing": true
8
- }
1
+ {
2
+ "semi": true,
3
+ "printWidth": 120,
4
+ "tabWidth": 2,
5
+ "useTabs": false,
6
+ "singleQuote": true,
7
+ "bracketSpacing": true
8
+ }
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015-2024 Varun Malhotra
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015-2024 Varun Malhotra
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.