@tstdl/base 0.83.23 → 0.83.25

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.json ADDED
@@ -0,0 +1,259 @@
1
+ {
2
+ "root": true,
3
+ "env": {
4
+ "browser": true,
5
+ "es2022": true,
6
+ "worker": true
7
+ },
8
+ "extends": [
9
+ "eslint:all",
10
+ "plugin:@typescript-eslint/all",
11
+ "plugin:import/recommended",
12
+ "plugin:import/typescript"
13
+ ],
14
+ "settings": {
15
+ "import/resolver": {
16
+ "typescript": true
17
+ }
18
+ },
19
+ "parser": "@typescript-eslint/parser",
20
+ "parserOptions": {
21
+ "ecmaVersion": "latest",
22
+ "sourceType": "module",
23
+ "project": "tsconfig.json"
24
+ },
25
+ "plugins": ["@typescript-eslint"],
26
+ "rules": {
27
+ /** angular */
28
+ "@angular-eslint/template/eqeqeq": "off",
29
+
30
+ /** typescript */
31
+ "@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
32
+ "@typescript-eslint/consistent-type-definitions": "off",
33
+ "@typescript-eslint/explicit-function-return-type": ["error", { "allowExpressions": true }],
34
+ "@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "no-public" }],
35
+ "@typescript-eslint/explicit-module-boundary-types": "off",
36
+ "@typescript-eslint/indent": "off",
37
+ "@typescript-eslint/init-declarations": "off",
38
+ "@typescript-eslint/lines-around-comment": "off",
39
+ "@typescript-eslint/lines-between-class-members": ["warn", "always", { "exceptAfterSingleLine": true }],
40
+ "@typescript-eslint/method-signature-style": "off",
41
+ "@typescript-eslint/no-confusing-void-expression": ["error", { "ignoreArrowShorthand": true, "ignoreVoidOperator": true }],
42
+ "@typescript-eslint/no-empty-interface": ["warn", { "allowSingleExtends": true }],
43
+ "@typescript-eslint/no-explicit-any": "off",
44
+ "@typescript-eslint/no-extra-parens": "off",
45
+ "@typescript-eslint/no-extraneous-class": "off",
46
+ "@typescript-eslint/no-inferrable-types": ["warn", { "ignoreParameters": true, "ignoreProperties": true }],
47
+ "@typescript-eslint/no-invalid-void-type": "off",
48
+ "@typescript-eslint/no-magic-numbers": ["off", { "ignoreNumericLiteralTypes": true, "ignoreEnums": true, "ignore": [0, 1, 128, 256, 512, 1024, 2048, 4096], "ignoreArrayIndexes": true }],
49
+ "@typescript-eslint/no-non-null-assertion": "off",
50
+ "@typescript-eslint/no-restricted-imports": "off",
51
+ "@typescript-eslint/no-type-alias": "off",
52
+ "@typescript-eslint/no-unnecessary-condition": ["error", { "allowConstantLoopConditions": true }],
53
+ "@typescript-eslint/no-unsafe-assignment": "off",
54
+ "@typescript-eslint/no-unused-vars-experimental": "off",
55
+ "@typescript-eslint/no-unused-vars": ["warn", { "varsIgnorePattern": "^_", "argsIgnorePattern": "^_" }],
56
+ "@typescript-eslint/no-use-before-define": ["error", { "functions": false }],
57
+ "@typescript-eslint/no-useless-constructor": "off",
58
+ "@typescript-eslint/object-curly-spacing": "off",
59
+ "@typescript-eslint/prefer-readonly-parameter-types": ["off", { "checkParameterProperties": false }],
60
+ "@typescript-eslint/quotes": ["warn", "single"],
61
+ "@typescript-eslint/restrict-template-expressions": ["error", { "allowNumber": true, "allowBoolean": true, "allowNullish": true }],
62
+ "@typescript-eslint/sort-type-constituents": "off",
63
+ "@typescript-eslint/sort-type-union-intersection-members": "off",
64
+ "@typescript-eslint/space-before-function-paren": ["warn", { "anonymous": "never", "named": "never", "asyncArrow": "always" }],
65
+ "@typescript-eslint/typedef": "off",
66
+
67
+ /** import */
68
+ "import/no-duplicates": ["warn", { "prefer-inline": true }],
69
+ "import/no-cycle": ["off", { "ignoreExternal": true }],
70
+ "import/no-self-import": ["error"],
71
+ "import/no-extraneous-dependencies": ["off", { "devDependencies": false, "includeTypes": true }],
72
+ "import/no-empty-named-blocks": ["error"],
73
+ "import/no-mutable-exports": ["error"],
74
+ "import/no-nodejs-modules": ["error"],
75
+ "import/no-absolute-path": ["error"],
76
+ "import/no-useless-path-segments": ["warn"],
77
+ "import/consistent-type-specifier-style": ["off", "prefer-inline"],
78
+ "import/newline-after-import": ["warn", { "considerComments": true }],
79
+ "import/no-anonymous-default-export": ["error"],
80
+ "import/no-named-default": ["error"],
81
+ "import/no-unassigned-import": ["error"],
82
+
83
+ /** misc */
84
+ "array-bracket-newline": ["error", "consistent"],
85
+ "array-element-newline": ["error", "consistent"],
86
+ "camelcase": "off",
87
+ "capitalized-comments": "off",
88
+ "class-methods-use-this": "off",
89
+ "complexity": "off",
90
+ "dot-location": ["error", "property"],
91
+ "eqeqeq": "off",
92
+ "func-style": ["error", "declaration", { "allowArrowFunctions": true }],
93
+ "function-call-argument-newline": ["warn", "consistent"],
94
+ "function-paren-newline": ["warn", "consistent"],
95
+ "generator-star-spacing": ["off", { "before": false, "after": true }],
96
+ "id-length": "off",
97
+ "indent": "off",
98
+ "init-declarations": "off",
99
+ "line-comment-position": "off",
100
+ "linebreak-style": ["error", "unix"],
101
+ "lines-around-comment": "off",
102
+ "lines-between-class-members": "off",
103
+ "max-classes-per-file": "off",
104
+ "max-len": ["off", { "code": 150 }],
105
+ "max-lines-per-function": ["off", { "max": 100, "skipBlankLines": true, "skipComments": true }],
106
+ "max-lines": "off",
107
+ "max-params": "off",
108
+ "max-statements": "off",
109
+ "multiline-ternary": "off",
110
+ "new-cap": "off",
111
+ "newline-per-chained-call": "off",
112
+ "no-await-in-loop": "off",
113
+ "no-case-declarations": "off",
114
+ "no-constant-condition": "off",
115
+ "no-continue": "off",
116
+ "no-duplicate-imports": "off",
117
+ "no-inline-comments": "off",
118
+ "no-negated-condition": "off",
119
+ "no-nested-ternary": "off",
120
+ "no-plusplus": ["off", { "allowForLoopAfterthoughts": true }],
121
+ "no-promise-executor-return": "off",
122
+ "no-restricted-imports": "off",
123
+ "no-ternary": "off",
124
+ "no-undefined": "off",
125
+ "no-underscore-dangle": "off",
126
+ "no-void": "off",
127
+ "object-curly-spacing": "off",
128
+ "object-property-newline": ["warn", { "allowAllPropertiesOnSameLine": true }],
129
+ "one-var": ["error", "never"],
130
+ "operator-linebreak": ["warn", "before"],
131
+ "padded-blocks": ["error", "never"],
132
+ "prefer-arrow/prefer-arrow-functions": "off",
133
+ "prefer-destructuring": "off",
134
+ "prefer-named-capture-group": "off",
135
+ "quote-props": ["error", "as-needed"],
136
+ "quotes": ["error", "single"],
137
+ "semi": ["error", "always"],
138
+ "sort-imports": ["off", { "ignoreCase": true }],
139
+ "sort-keys": "off",
140
+
141
+ "@typescript-eslint/naming-convention": [
142
+ "warn",
143
+ {
144
+ "selector": "default",
145
+ "format": ["camelCase"],
146
+ "leadingUnderscore": "allowSingleOrDouble"
147
+ },
148
+ {
149
+ "selector": "enumMember",
150
+ "format": ["PascalCase"]
151
+ },
152
+ {
153
+ "selector": "typeLike",
154
+ "format": ["PascalCase"]
155
+ }
156
+ ],
157
+ "@typescript-eslint/member-delimiter-style": ["error", {
158
+ "multiline": {
159
+ "delimiter": "comma",
160
+ "requireLast": false
161
+ },
162
+ "singleline": {
163
+ "delimiter": "comma",
164
+ "requireLast": false
165
+ },
166
+ "overrides": {
167
+ "interface": {
168
+ "multiline": {
169
+ "delimiter": "semi",
170
+ "requireLast": true
171
+ }
172
+ }
173
+ }
174
+ }],
175
+ "@typescript-eslint/member-ordering": ["warn", {
176
+ "default": [
177
+ // Index signature
178
+ "signature",
179
+ "call-signature",
180
+
181
+ // Fields
182
+ "#private-static-field",
183
+ "private-static-field",
184
+ "protected-static-field",
185
+ "public-static-field",
186
+
187
+ /*
188
+ "private-decorated-field",
189
+ "protected-decorated-field",
190
+ "public-decorated-field",
191
+ */
192
+
193
+ "#private-instance-field",
194
+ "private-instance-field",
195
+ "protected-instance-field",
196
+ "public-instance-field",
197
+
198
+ "protected-abstract-field",
199
+ "public-abstract-field",
200
+
201
+ "#private-field",
202
+ "private-field",
203
+ "protected-field",
204
+ "public-field",
205
+
206
+ "static-field",
207
+ "instance-field",
208
+ "abstract-field",
209
+
210
+ // "decorated-field",
211
+
212
+ "field",
213
+
214
+ // Static initialization
215
+ "static-initialization",
216
+
217
+ // Constructors
218
+ "public-constructor",
219
+ "protected-constructor",
220
+ "private-constructor",
221
+
222
+ "constructor",
223
+
224
+ // Methods
225
+ "public-static-method",
226
+ "protected-static-method",
227
+ "private-static-method",
228
+ "#private-static-method",
229
+
230
+ /*
231
+ "public-decorated-method",
232
+ "protected-decorated-method",
233
+ "private-decorated-method",
234
+ */
235
+
236
+ "public-instance-method",
237
+ "protected-instance-method",
238
+ "private-instance-method",
239
+ "#private-instance-method",
240
+
241
+ "public-abstract-method",
242
+ "protected-abstract-method",
243
+
244
+ "public-method",
245
+ "protected-method",
246
+ "private-method",
247
+ "#private-method",
248
+
249
+ "static-method",
250
+ "instance-method",
251
+ "abstract-method",
252
+
253
+ // "decorated-method",
254
+
255
+ "method"
256
+ ]
257
+ }]
258
+ }
259
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tstdl/base",
3
- "version": "0.83.23",
3
+ "version": "0.83.25",
4
4
  "author": "Patrick Hein",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -11,10 +11,10 @@
11
11
  "build:watch": "tsc && (concurrently --raw 'tsc --watch' 'tsc-alias --watch')",
12
12
  "build:production": "rm -rf dist && npm run build && npm run build:production:cjs && npm run build:production:copy-files",
13
13
  "build:production:cjs": "esbuild `find dist \\( -name '*.js' -o -name '*.jsx' \\)` --outdir=dist --allow-overwrite --format=cjs",
14
- "build:production:copy-files": "cp package.json .eslintrc.cjs tsconfig.server.json dist/ && cp tsconfig.base.json dist/tsconfig.json && sed -i 's/\"type\": \"module\",/\"type\": \"commonjs\",/g' dist/package.json",
14
+ "build:production:copy-files": "cp package.json .eslintrc.json tsconfig.server.json dist/ && cp tsconfig.base.json dist/tsconfig.json && sed -i 's/\"type\": \"module\",/\"type\": \"commonjs\",/g' dist/package.json",
15
15
  "build:docs": "typedoc",
16
16
  "build:docs-watch": "typedoc --watch",
17
- "lint": "eslint -c .eslintrc.cjs --ext .ts .",
17
+ "lint": "eslint -c .eslintrc.json --ext .ts .",
18
18
  "pub": "npm run build:production && rm -vf dist/test* && npm publish dist/"
19
19
  },
20
20
  "dependencies": {
@@ -43,7 +43,7 @@
43
43
  "typescript": "5.0"
44
44
  },
45
45
  "peerDependencies": {
46
- "@elastic/elasticsearch": "^8.6",
46
+ "@elastic/elasticsearch": "^8.7",
47
47
  "@koa/router": "^12.0",
48
48
  "@tstdl/angular": "^0.83",
49
49
  "@zxcvbn-ts/core": "2.2",
@@ -60,7 +60,7 @@
60
60
  "nodemailer": "^6.9",
61
61
  "preact": "^10.13",
62
62
  "preact-render-to-string": "^5.2",
63
- "puppeteer": "^19.8",
63
+ "puppeteer": "^19.9",
64
64
  "undici": "^5.21",
65
65
  "urlpattern-polyfill": "^7.0"
66
66
  },
package/.eslintrc.cjs DELETED
@@ -1,259 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- env: {
4
- browser: true,
5
- es2022: true,
6
- worker: true
7
- },
8
- extends: [
9
- 'eslint:all',
10
- 'plugin:@typescript-eslint/all',
11
- 'plugin:import/recommended',
12
- 'plugin:import/typescript'
13
- ],
14
- settings: {
15
- 'import/resolver': {
16
- typescript: true
17
- }
18
- },
19
- parser: '@typescript-eslint/parser',
20
- parserOptions: {
21
- ecmaVersion: 'latest',
22
- sourceType: 'module',
23
- project: 'tsconfig.json'
24
- },
25
- plugins: ['@typescript-eslint'],
26
- rules: {
27
- /** angular */
28
- '@angular-eslint/template/eqeqeq': 'off',
29
-
30
- /** typescript */
31
- '@typescript-eslint/brace-style': ['error', 'stroustrup', { allowSingleLine: true }],
32
- '@typescript-eslint/consistent-type-definitions': 'off',
33
- '@typescript-eslint/explicit-function-return-type': ['error', { allowExpressions: true }],
34
- '@typescript-eslint/explicit-member-accessibility': ['error', { accessibility: 'no-public' }],
35
- '@typescript-eslint/explicit-module-boundary-types': 'off',
36
- '@typescript-eslint/indent': 'off',
37
- '@typescript-eslint/init-declarations': 'off',
38
- '@typescript-eslint/lines-around-comment': 'off',
39
- '@typescript-eslint/lines-between-class-members': ['warn', 'always', { exceptAfterSingleLine: true }],
40
- '@typescript-eslint/method-signature-style': 'off',
41
- '@typescript-eslint/no-confusing-void-expression': ['error', { ignoreArrowShorthand: true, ignoreVoidOperator: true }],
42
- '@typescript-eslint/no-empty-interface': ['warn', { 'allowSingleExtends': true }],
43
- '@typescript-eslint/no-explicit-any': 'off',
44
- '@typescript-eslint/no-extra-parens': 'off',
45
- '@typescript-eslint/no-extraneous-class': 'off',
46
- '@typescript-eslint/no-inferrable-types': ['warn', { ignoreParameters: true, ignoreProperties: true }],
47
- '@typescript-eslint/no-invalid-void-type': 'off',
48
- '@typescript-eslint/no-magic-numbers': ['off', { ignoreNumericLiteralTypes: true, ignoreEnums: true, ignore: [0, 1, 128, 256, 512, 1024, 2048, 4096], ignoreArrayIndexes: true }],
49
- '@typescript-eslint/no-non-null-assertion': 'off',
50
- '@typescript-eslint/no-restricted-imports': 'off',
51
- '@typescript-eslint/no-type-alias': 'off',
52
- '@typescript-eslint/no-unnecessary-condition': ['error', { allowConstantLoopConditions: true }],
53
- '@typescript-eslint/no-unsafe-assignment': 'off',
54
- '@typescript-eslint/no-unused-vars-experimental': 'off',
55
- '@typescript-eslint/no-unused-vars': ['warn', { varsIgnorePattern: '^_', argsIgnorePattern: '^_' }],
56
- '@typescript-eslint/no-use-before-define': ['error', { functions: false }],
57
- '@typescript-eslint/no-useless-constructor': 'off',
58
- '@typescript-eslint/object-curly-spacing': 'off',
59
- '@typescript-eslint/prefer-readonly-parameter-types': ['off', { checkParameterProperties: false }],
60
- '@typescript-eslint/quotes': ['warn', 'single'],
61
- '@typescript-eslint/restrict-template-expressions': ['error', { allowNumber: true, allowBoolean: true, allowNullish: true }],
62
- '@typescript-eslint/sort-type-constituents': 'off',
63
- '@typescript-eslint/sort-type-union-intersection-members': 'off',
64
- '@typescript-eslint/space-before-function-paren': ['warn', { anonymous: 'never', named: 'never', asyncArrow: 'always' }],
65
- '@typescript-eslint/typedef': 'off',
66
-
67
- /** import */
68
- 'import/no-duplicates': ['warn', { 'prefer-inline': true }],
69
- 'import/no-cycle': ['off', { ignoreExternal: true }],
70
- 'import/no-self-import': ['error'],
71
- 'import/no-extraneous-dependencies': ['off', { devDependencies: false, includeTypes: true }],
72
- 'import/no-empty-named-blocks': ['error'],
73
- 'import/no-mutable-exports': ['error'],
74
- 'import/no-nodejs-modules': ['error'],
75
- 'import/no-absolute-path': ['error'],
76
- 'import/no-useless-path-segments': ['warn'],
77
- 'import/consistent-type-specifier-style': ['off', 'prefer-inline'],
78
- 'import/newline-after-import': ['warn', { considerComments: true }],
79
- 'import/no-anonymous-default-export': ['error'],
80
- 'import/no-named-default': ['error'],
81
- 'import/no-unassigned-import': ['error'],
82
-
83
- /** misc */
84
- 'array-bracket-newline': ['error', 'consistent'],
85
- 'array-element-newline': ['error', 'consistent'],
86
- 'camelcase': 'off',
87
- 'capitalized-comments': 'off',
88
- 'class-methods-use-this': 'off',
89
- 'complexity': 'off',
90
- 'dot-location': ['error', 'property'],
91
- 'eqeqeq': 'off',
92
- 'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
93
- 'function-call-argument-newline': ['warn', 'consistent'],
94
- 'function-paren-newline': ['warn', 'consistent'],
95
- 'generator-star-spacing': ['off', { before: false, after: true }],
96
- 'id-length': 'off',
97
- 'indent': 'off',
98
- 'init-declarations': 'off',
99
- 'line-comment-position': 'off',
100
- 'linebreak-style': ['error', 'unix'],
101
- 'lines-around-comment': 'off',
102
- 'lines-between-class-members': 'off',
103
- 'max-classes-per-file': 'off',
104
- 'max-len': ['off', { code: 150 }],
105
- 'max-lines-per-function': ['off', { 'max': 100, 'skipBlankLines': true, 'skipComments': true }],
106
- 'max-lines': 'off',
107
- 'max-params': 'off',
108
- 'max-statements': 'off',
109
- 'multiline-ternary': 'off',
110
- 'new-cap': 'off',
111
- 'newline-per-chained-call': 'off',
112
- 'no-await-in-loop': 'off',
113
- 'no-case-declarations': 'off',
114
- 'no-constant-condition': 'off',
115
- 'no-continue': 'off',
116
- 'no-duplicate-imports': 'off',
117
- 'no-inline-comments': 'off',
118
- 'no-negated-condition': 'off',
119
- 'no-nested-ternary': 'off',
120
- 'no-plusplus': ['off', { allowForLoopAfterthoughts: true }],
121
- 'no-promise-executor-return': 'off',
122
- 'no-restricted-imports': 'off',
123
- 'no-ternary': 'off',
124
- 'no-undefined': 'off',
125
- 'no-underscore-dangle': 'off',
126
- 'no-void': 'off',
127
- 'object-curly-spacing': 'off',
128
- 'object-property-newline': ['warn', { allowAllPropertiesOnSameLine: true }],
129
- 'one-var': ['error', 'never'],
130
- 'operator-linebreak': ['warn', 'before'],
131
- 'padded-blocks': ['error', 'never'],
132
- 'prefer-arrow/prefer-arrow-functions': 'off',
133
- 'prefer-destructuring': 'off',
134
- 'prefer-named-capture-group': 'off',
135
- 'quote-props': ['error', 'as-needed'],
136
- 'quotes': ['error', 'single'],
137
- 'semi': ['error', 'always'],
138
- 'sort-imports': ['off', { ignoreCase: true }],
139
- 'sort-keys': 'off',
140
-
141
- '@typescript-eslint/naming-convention': [
142
- 'warn',
143
- {
144
- selector: 'default',
145
- format: ['camelCase'],
146
- leadingUnderscore: 'allowSingleOrDouble'
147
- },
148
- {
149
- selector: 'enumMember',
150
- format: ['PascalCase']
151
- },
152
- {
153
- selector: 'typeLike',
154
- format: ['PascalCase']
155
- }
156
- ],
157
- '@typescript-eslint/member-delimiter-style': ['error', {
158
- multiline: {
159
- delimiter: 'comma',
160
- requireLast: false
161
- },
162
- singleline: {
163
- delimiter: 'comma',
164
- requireLast: false
165
- },
166
- overrides: {
167
- interface: {
168
- multiline: {
169
- delimiter: 'semi',
170
- requireLast: true
171
- }
172
- }
173
- }
174
- }],
175
- '@typescript-eslint/member-ordering': ['warn', {
176
- default: [
177
- // Index signature
178
- 'signature',
179
- 'call-signature',
180
-
181
- // Fields
182
- '#private-static-field',
183
- 'private-static-field',
184
- 'protected-static-field',
185
- 'public-static-field',
186
-
187
- /*
188
- 'private-decorated-field',
189
- 'protected-decorated-field',
190
- 'public-decorated-field',
191
- */
192
-
193
- '#private-instance-field',
194
- 'private-instance-field',
195
- 'protected-instance-field',
196
- 'public-instance-field',
197
-
198
- 'protected-abstract-field',
199
- 'public-abstract-field',
200
-
201
- '#private-field',
202
- 'private-field',
203
- 'protected-field',
204
- 'public-field',
205
-
206
- 'static-field',
207
- 'instance-field',
208
- 'abstract-field',
209
-
210
- // 'decorated-field',
211
-
212
- 'field',
213
-
214
- // Static initialization
215
- 'static-initialization',
216
-
217
- // Constructors
218
- 'public-constructor',
219
- 'protected-constructor',
220
- 'private-constructor',
221
-
222
- 'constructor',
223
-
224
- // Methods
225
- 'public-static-method',
226
- 'protected-static-method',
227
- 'private-static-method',
228
- '#private-static-method',
229
-
230
- /*
231
- 'public-decorated-method',
232
- 'protected-decorated-method',
233
- 'private-decorated-method',
234
- */
235
-
236
- 'public-instance-method',
237
- 'protected-instance-method',
238
- 'private-instance-method',
239
- '#private-instance-method',
240
-
241
- 'public-abstract-method',
242
- 'protected-abstract-method',
243
-
244
- 'public-method',
245
- 'protected-method',
246
- 'private-method',
247
- '#private-method',
248
-
249
- 'static-method',
250
- 'instance-method',
251
- 'abstract-method',
252
-
253
- // 'decorated-method',
254
-
255
- 'method'
256
- ]
257
- }]
258
- }
259
- }