@camera.ui/cli 0.0.44 → 0.0.45

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camera.ui/cli",
3
- "version": "0.0.44",
3
+ "version": "0.0.45",
4
4
  "description": "camera.ui cli",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,10 @@
1
+ const mode = process.env.MODE || 'production';
2
+
3
+ const config = {
4
+ input: ['src/index.js'],
5
+ mode: mode === 'development' ? 'development' : 'production',
6
+ external: [],
7
+ additionalFiles: [],
8
+ };
9
+
10
+ export default config;
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ # Change these settings to your own preference
5
+ indent_style = space
6
+ indent_size = 2
7
+
8
+ # I recommend you to keep these unchanged
9
+ end_of_line = lf
10
+ charset = utf-8
11
+ trim_trailing_whitespace = true
12
+ insert_final_newline = true
13
+
14
+ [*.md]
15
+ trim_trailing_whitespace = false
@@ -0,0 +1,64 @@
1
+ import jsLint from '@eslint/js';
2
+ import stylistic from '@stylistic/eslint-plugin';
3
+ import globals from 'globals';
4
+
5
+ export default [
6
+ {
7
+ files: ['**/*.{js,mjs,cjs,ts,mts}'],
8
+ },
9
+ {
10
+ ignores: ['**/dist/**', '**/node_modules/**', '**/public/**', '**/build/**', '**/bundle/**', '**/test/**', '**/wasm/**', '**/example/**'],
11
+ },
12
+ jsLint.configs.recommended,
13
+ stylistic.configs['disable-legacy'],
14
+ stylistic.configs.customize({
15
+ indent: 2,
16
+ quotes: 'single',
17
+ semi: true,
18
+ commaDangle: 'always-multiline',
19
+ jsx: false,
20
+ arrowParens: true,
21
+ braceStyle: '1tbs',
22
+ blockSpacing: true,
23
+ quoteProps: 'as-needed',
24
+ }),
25
+ {
26
+ languageOptions: {
27
+ globals: { ...globals.node },
28
+ },
29
+
30
+ rules: {
31
+ '@stylistic/generator-star-spacing': ['error', { before: true, after: false }],
32
+
33
+ // Stylistic specific rules
34
+ '@stylistic/max-len': ['error', { code: 170, tabWidth: 2 }],
35
+ '@stylistic/quotes': ['error', 'single', { avoidEscape: true }],
36
+ '@stylistic/operator-linebreak': 'off',
37
+ '@stylistic/comma-dangle': [
38
+ 'error',
39
+ {
40
+ arrays: 'always-multiline',
41
+ objects: 'always-multiline',
42
+ imports: 'always-multiline',
43
+ exports: 'only-multiline',
44
+ functions: 'always-multiline',
45
+ enums: 'always-multiline',
46
+ generics: 'always-multiline',
47
+ tuples: 'always-multiline',
48
+ },
49
+ ],
50
+
51
+ semi: [1, 'always'],
52
+ // quotes: ['error', 'single'],
53
+ 'comma-dangle': ['error', 'only-multiline'],
54
+ 'no-multiple-empty-lines': ['warn', { max: 1, maxEOF: 0 }],
55
+ 'eol-last': ['error', 'always'],
56
+ 'space-before-function-paren': ['error', { named: 'never' }],
57
+
58
+ 'no-unused-vars': 'off',
59
+ 'no-case-declarations': 'off',
60
+ 'no-async-promise-executor': 'off',
61
+ 'no-control-regex': 'off',
62
+ },
63
+ },
64
+ ];
@@ -0,0 +1,31 @@
1
+ # Logs
2
+ logs
3
+ *.log
4
+ npm-debug.log*
5
+ yarn-debug.log*
6
+ yarn-error.log*
7
+ pnpm-debug.log*
8
+ lerna-debug.log*
9
+
10
+ node_modules
11
+ .DS_Store
12
+ dist
13
+ bundle
14
+ coverage
15
+ *.local
16
+ test
17
+ __pycache__
18
+ .dockerignore
19
+ python-*
20
+ requirements.dev.txt
21
+ requirements-lock.txt
22
+
23
+ .idea
24
+ *.suo
25
+ *.ntvs*
26
+ *.njsproj
27
+ *.sln
28
+ *.sw?
29
+ *.egg-info
30
+ .venv
31
+ .mypy_cache
@@ -0,0 +1,19 @@
1
+ .editorconfig
2
+ .eslintignore
3
+ .eslintrc.*
4
+ eslint.config.*
5
+ .gitignore
6
+ .npmignore
7
+ .prettierignore
8
+ .prettierrc.*
9
+ tsconfig.json
10
+ updates.config.*
11
+ cameraui.config.*
12
+ ruff.toml
13
+
14
+ node_modules
15
+ .github
16
+ .vscode
17
+
18
+
19
+ src
@@ -0,0 +1,10 @@
1
+ coverage/
2
+ dist/
3
+ __snapshots__/
4
+ media/
5
+ package-lock.json
6
+ *.md
7
+ interface/
8
+ node_modules/
9
+ bundle/
10
+ build/
@@ -0,0 +1,39 @@
1
+ export default class SamplePlugin {
2
+ constructor(logger, api) {
3
+ this.logger = logger;
4
+ this.api = api;
5
+
6
+ this.camera = new Map();
7
+
8
+ this.api.on('finishLaunching', this.start.bind(this));
9
+ this.api.on('shutdown', this.stop.bind(this));
10
+
11
+ this.api.deviceManager.on('cameraSelected', (cameraDevice) => {
12
+ this.logger.log('Camera selected:', cameraDevice.name);
13
+
14
+ if (!this.cameras.has(cameraDevice.id)) {
15
+ this.cameras.set(cameraDevice.id, cameraDevice);
16
+ }
17
+ });
18
+
19
+ this.api.deviceManager.on('cameraDeselected', (cameraId) => {
20
+ const cameraDevice = this.cameras.get(cameraId);
21
+ if (cameraDevice) {
22
+ this.logger.log('Camera deselected:', cameraDevice.name);
23
+ this.cameras.delete(cameraId);
24
+ }
25
+ });
26
+ }
27
+
28
+ configureCameras() {}
29
+
30
+ async onFormSubmit(actionId, payload) {}
31
+
32
+ async start() {
33
+ this.logger.log('Finished launching plugin');
34
+ }
35
+
36
+ stop() {
37
+ this.logger.log('Shutting down plugin');
38
+ }
39
+ }
@@ -0,0 +1,3 @@
1
+ export default {
2
+ exclude: [],
3
+ };