@camera.ui/browser 0.0.103 → 0.0.104

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.
@@ -99,9 +99,7 @@ export interface API {
99
99
  username?: string;
100
100
  password?: string;
101
101
  }
102
- export interface Streams {
103
- [key: string]: string | string[] | null;
104
- }
102
+ export type Streams = Record<string, string | string[] | null>;
105
103
  export interface SRTP {
106
104
  listen: string;
107
105
  }
@@ -136,9 +134,7 @@ export interface Ffmpeg {
136
134
  output: string;
137
135
  [key: string]: string;
138
136
  }
139
- export interface HomeKit {
140
- [key: string]: Partial<HomeKitSettings> | null | undefined;
141
- }
137
+ export type HomeKit = Record<string, Partial<HomeKitSettings> | null | undefined>;
142
138
  export interface Hass {
143
139
  config: string;
144
140
  }
@@ -151,9 +147,7 @@ export interface HomeKitSettings {
151
147
  export interface Webtorrent {
152
148
  shares: Shares;
153
149
  }
154
- export interface Shares {
155
- [key: string]: Partial<ShareSettings>;
156
- }
150
+ export type Shares = Record<string, Partial<ShareSettings>>;
157
151
  export interface ShareSettings {
158
152
  pwd: string;
159
153
  src: string;
@@ -0,0 +1,89 @@
1
+ import jsLint from '@eslint/js';
2
+ import stylistic from '@stylistic/eslint-plugin';
3
+ import tsParser from '@typescript-eslint/parser';
4
+ import globals from 'globals';
5
+ import tsLint from 'typescript-eslint';
6
+
7
+ export default [
8
+ {
9
+ files: ['**/*.{js,mjs,cjs,ts,mts}'],
10
+ },
11
+ {
12
+ ignores: ['**/dist/**', '**/node_modules/**', '**/public/**', '**/build/**', '**/bundle/**', '**/test/**', '**/wasm/**', '**/example/**'],
13
+ },
14
+ jsLint.configs.recommended,
15
+ // ...tsLint.configs.recommended,
16
+ ...tsLint.configs.recommendedTypeChecked,
17
+ ...tsLint.configs.stylisticTypeChecked,
18
+ stylistic.configs['disable-legacy'],
19
+ stylistic.configs.customize({
20
+ indent: 2,
21
+ quotes: 'single',
22
+ semi: true,
23
+ commaDangle: 'always-multiline',
24
+ jsx: false,
25
+ arrowParens: true,
26
+ braceStyle: '1tbs',
27
+ blockSpacing: true,
28
+ quoteProps: 'as-needed',
29
+ }),
30
+ {
31
+ languageOptions: {
32
+ globals: { ...globals.node },
33
+ parser: tsParser,
34
+ parserOptions: {
35
+ projectService: true,
36
+ tsconfigRootDir: import.meta.dirname,
37
+ },
38
+ },
39
+
40
+ rules: {
41
+ // TypeScript specific rules
42
+ '@typescript-eslint/consistent-type-imports': 'error',
43
+ '@typescript-eslint/await-thenable': 'error',
44
+ '@typescript-eslint/no-explicit-any': 'off',
45
+ '@typescript-eslint/no-unused-vars': ['error'],
46
+ '@typescript-eslint/no-unsafe-assignment': 'off',
47
+ '@typescript-eslint/no-unsafe-member-access': 'off',
48
+ '@typescript-eslint/no-unsafe-argument': 'off',
49
+ '@typescript-eslint/no-unsafe-return': 'off',
50
+ '@typescript-eslint/require-await': 'off',
51
+ '@typescript-eslint/no-floating-promises': 'off',
52
+ '@typescript-eslint/prefer-promise-reject-errors': 'off',
53
+ '@typescript-eslint/no-misused-promises': 'off',
54
+ '@typescript-eslint/ban-ts-comment': 'off',
55
+ '@typescript-eslint/no-empty-function': 'off',
56
+ '@typescript-eslint/restrict-template-expressions': 'off',
57
+ '@typescript-eslint/no-unsafe-call': 'off',
58
+ '@typescript-eslint/no-empty-object-type': 'off',
59
+ '@typescript-eslint/no-unsafe-function-type': 'off',
60
+ '@typescript-eslint/no-unsafe-declaration-merging': 'off',
61
+ '@typescript-eslint/prefer-for-of': 'off',
62
+ '@typescript-eslint/prefer-find': 'off',
63
+ '@typescript-eslint/no-require-imports': 'off',
64
+ '@typescript-eslint/no-redundant-type-constituents': 'off',
65
+ '@typescript-eslint/no-namespace': 'off',
66
+
67
+ // Stylistic specific rules
68
+ '@stylistic/max-len': ['error', { code: 170, tabWidth: 2 }],
69
+ '@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
70
+ '@stylistic/operator-linebreak': 'off',
71
+
72
+ semi: [1, 'always'],
73
+ // quotes: ['error', 'single'],
74
+ 'comma-dangle': ['error', 'only-multiline'],
75
+ 'no-multiple-empty-lines': ['warn', { max: 1, maxEOF: 0 }],
76
+ 'eol-last': ['error', 'always'],
77
+ 'space-before-function-paren': ['error', { named: 'never' }],
78
+
79
+ 'no-unused-vars': 'off',
80
+ 'no-case-declarations': 'off',
81
+ 'no-async-promise-executor': 'off',
82
+ 'no-control-regex': 'off',
83
+ },
84
+ },
85
+ {
86
+ files: ['**/*.js', '**/*.cjs', '**/*.mjs', '*.d.ts', '*.config.ts'],
87
+ ...tsLint.configs.disableTypeChecked,
88
+ },
89
+ ];
package/package.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "name": "@camera.ui/browser",
3
- "version": "0.0.103",
3
+ "version": "0.0.104",
4
4
  "description": "camera.ui browser client",
5
5
  "author": "seydx (https://github.com/seydx/camera.ui)",
6
- "module": "./dist/bundle.js",
7
- "types": "./dist/types/packages/client/browser/src/index.d.ts",
8
6
  "exports": {
9
7
  ".": {
8
+ "types": "./dist/types/packages/client/browser/src/index.d.ts",
10
9
  "import": "./dist/bundle.js",
11
- "types": "./dist/types/packages/client/browser/src/index.d.ts"
10
+ "default": "./dist/bundle.js"
12
11
  }
13
12
  },
14
13
  "type": "module",
@@ -17,7 +16,8 @@
17
16
  "build:types": "tsc --project tsconfig.json",
18
17
  "build": "rimraf dist && npm run build:js && npm run build:types",
19
18
  "format": "prettier --write 'src/' --ignore-unknown --no-error-on-unmatched-pattern",
20
- "lint": "eslint --fix --ext .js,.ts .",
19
+ "lint": "eslint .",
20
+ "lint:fix": "eslint --fix .",
21
21
  "update": "updates --update ./",
22
22
  "install-updates": "npm i --save",
23
23
  "prebuild": "rimraf dist",
@@ -27,19 +27,18 @@
27
27
  "dependencies": {
28
28
  "@isaacs/ttlcache": "^1.4.1",
29
29
  "rxjs": "^7.8.1",
30
- "socket.io-client": "^4.8.0"
30
+ "socket.io-client": "^4.8.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@rushstack/eslint-patch": "^1.10.4",
33
+ "@stylistic/eslint-plugin": "^2.9.0",
34
+ "@typescript-eslint/parser": "^8.11.0",
35
+ "eslint": "^9.13.0",
36
+ "globals": "^15.11.0",
37
+ "prettier": "^3.3.3",
38
+ "typescript-eslint": "^8.11.0",
34
39
  "@swc/register": "^0.1.10",
35
40
  "@types/webrtc": "^0.0.44",
36
- "@typescript-eslint/eslint-plugin": "^8.10.0",
37
- "@typescript-eslint/parser": "^8.10.0",
38
41
  "bufferutil": "^4.0.8",
39
- "eslint": "^8.57.0",
40
- "eslint-config-prettier": "^9.1.0",
41
- "eslint-plugin-prettier": "^5.2.1",
42
- "prettier": "^3.3.3",
43
42
  "rimraf": "^6.0.1",
44
43
  "ts-loader": "^9.5.1",
45
44
  "typescript": "^5.6.3",