@camera.ui/camera-ui-smtp 0.0.1

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/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ All notable changes to this project will be documented in this file.
2
+
3
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
4
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
5
+
6
+ ## [X.X.X] - ???
7
+
8
+ - Initial Release
package/LICENSE.md ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) - NAME
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,194 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/SeydX/camera.ui/refs/heads/master/images/logo.png">
3
+ </p>
4
+
5
+ # camera-ui-smtp
6
+
7
+ A plugin for [camera.ui](https://github.com/SeydX/camera.ui) that allows you to extend the functionality of your camera system.
8
+
9
+ ## Setup Development Environment
10
+
11
+ 1. Make sure you have [Node.js](https://nodejs.org) 20.x or later installed
12
+ 2. Install dependencies as described below
13
+
14
+ ## Install Development Dependencies
15
+
16
+ Install Node dependencies:
17
+ ```bash
18
+ npm install
19
+ ```
20
+
21
+ For Python plugins, also install Python dependencies:
22
+ ```bash
23
+ pip install -r requirements.txt
24
+ pip install -r requirements.dev.txt
25
+ ```
26
+
27
+ Note: Create a virtual environment for Python plugins to avoid conflicts with system packages.
28
+
29
+ ## Update package.json
30
+
31
+ Open the [`package.json`](./package.json) and customize the following attributes:
32
+
33
+ - `name` - Must be prefixed with `camera-ui-` or `@username/camera-ui-` (e.g., `camera-ui-motion` or `@john/camera-ui-motion`)
34
+ - `displayName` - The user-friendly name shown in the camera.ui interface
35
+ - `description` - A short description of your plugin's functionality
36
+ - `author` - Your name and email address
37
+ - `homepage` - Link to your plugin's README.md
38
+ - `repository.url` - Link to your GitHub repository
39
+ - `bugs.url` - Link to your GitHub issues page
40
+
41
+ Set `private` to `false` when you're ready to publish.
42
+
43
+ ## Config Schema
44
+
45
+ The plugin configuration is defined in `config.schema.json`. This schema defines the configuration options available to users.
46
+
47
+ Example schema:
48
+ ```json
49
+ {
50
+ "schema": {
51
+ "items": {
52
+ "type": "object",
53
+ "title": "Remove Models",
54
+ "opened": true,
55
+ "properties": {
56
+ "model": {
57
+ "type": "string",
58
+ "title": "Model",
59
+ "description": "Model to use for object detection",
60
+ "required": true,
61
+ "store": false,
62
+ "defaultValue": "yolov9m_320 - FP16",
63
+ "enum": [
64
+ "yolo3-tinyu - INT8",
65
+ "yolo3-tinyu_320 - INT8",
66
+ "yolo3-tinyu - FP16",
67
+ "yolo3-tinyu_320 - FP16",
68
+ "yolov5nu - INT8",
69
+ "yolov5nu_320 - INT8",
70
+ "yolov5mu - INT8",
71
+ "yolov5mu_320 - INT8"
72
+ ]
73
+ }
74
+ },
75
+ "buttons": [
76
+ {
77
+ "label": "Remove",
78
+ "onSubmit": "onRemove"
79
+ }
80
+ ]
81
+ }
82
+ }
83
+ }
84
+ ```
85
+
86
+ ## Bundle Plugin
87
+
88
+ To create a production bundle of your plugin:
89
+
90
+ ```bash
91
+ npm run bundle
92
+ ```
93
+
94
+ This will:
95
+ 1. Run code quality checks (if enabled)
96
+ 2. Build the source code
97
+ 3. Copy required files
98
+ 4. Create a distributable bundle.zip
99
+
100
+ The bundled plugin will be available in the `bundle` directory.
101
+
102
+ ## Watch For Changes and Build Automatically
103
+
104
+ // TODO
105
+
106
+ ## Customize Plugin
107
+
108
+ ### JavaScript/TypeScript Plugins
109
+
110
+ The main entry point is `src/index.ts` (or `src/index.js`). Here you can define your plugin's functionality:
111
+
112
+ ```typescript
113
+ import type { BasePlugin, LoggerService, PluginAPI } from '@camera.ui/types';
114
+
115
+ export default class SamplePlugin implements BasePlugin {
116
+ constructor(logger: LoggerService, api: PluginAPI) {
117
+ ...
118
+ }
119
+ }
120
+ ```
121
+
122
+ ### Python Plugins
123
+
124
+ The main entry point is `src/main.py`. Example:
125
+
126
+ ```python
127
+ from camera_ui_python_types import (
128
+ BasePlugin,
129
+ LoggerService,
130
+ PluginAPI,
131
+ )
132
+
133
+ class SamplePlugin(BasePlugin):
134
+ def __init__(self, logger: LoggerService, api: PluginAPI):
135
+ ...
136
+
137
+ def __main__():
138
+ return SamplePlugin
139
+ ```
140
+
141
+ ## Publish Package
142
+
143
+ When your plugin is ready for release:
144
+
145
+ 1. Make sure all tests pass and the bundle builds successfully
146
+ 2. Choose the appropriate publishing command:
147
+ ```bash
148
+ # For alpha releases
149
+ npm run publish:alpha
150
+
151
+ # For beta releases
152
+ npm run publish:beta
153
+
154
+ # For stable releases
155
+ npm run publish:latest
156
+ ```
157
+
158
+ The CLI will guide you through version selection and publishing.
159
+
160
+ ## Best Practices
161
+
162
+ 1. **Version Management**
163
+ - Use semantic versioning (MAJOR.MINOR.PATCH)
164
+ - Start with alpha/beta releases for testing
165
+ - Document breaking changes
166
+
167
+ 2. **Code Quality**
168
+ - Enable and use the provided linting tools
169
+ - Write clear documentation
170
+ - Include usage examples
171
+
172
+ 3. **Configuration**
173
+ - Provide sensible defaults
174
+ - Validate user input
175
+ - Document all options
176
+
177
+ 4. **Testing**
178
+ - Test with different camera.ui versions
179
+ - Verify all configuration options
180
+ - Test error handling
181
+
182
+ 5. **Performance**
183
+ - Minimize dependencies
184
+ - Optimize resource usage
185
+ - Handle cleanup properly
186
+
187
+ ## Useful Links
188
+
189
+ - [camera.ui Documentation](https://github.com/SeydX/camera.ui/wiki)
190
+ - [Plugin Development Guide](https://github.com/SeydX/camera.ui/wiki/plugins)
191
+ - [JSON Schema Documentation](https://json-schema.org/)
192
+ - [Node.js Documentation](https://nodejs.org/docs)
193
+ - [TypeScript Documentation](https://www.typescriptlang.org/docs/)
194
+ - [Python Documentation](https://docs.python.org/)
package/bundle.zip ADDED
Binary file
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "displayName": "SMTP",
3
+ "name": "@camera.ui/camera-ui-smtp",
4
+ "version": "0.0.1",
5
+ "description": "Efficient SMTP-based motion detection system. Captures and delivers alerts through email services with customizable triggers and seamless integration for continuous monitoring.",
6
+ "type": "commonjs",
7
+ "main": "./dist/index.js",
8
+ "scripts": {
9
+ "build": "rimraf dist && tsc",
10
+ "bundle": "npm run format && npm run lint:fix && npm run build && cui bundle",
11
+ "bundle:dev": "npm run format && npm run lint:fix && npm run build && cross-env MODE=development cui bundle",
12
+ "format": "prettier --write \"src/\" --ignore-unknown --no-error-on-unmatched-pattern",
13
+ "install-updates": "npm i --save",
14
+ "lint": "eslint .",
15
+ "lint:fix": "eslint --fix .",
16
+ "prepublishOnly": "node -e \"if(!process.env.SAFE_PUBLISH){console.error('Error: Please use @camera.ui/cli to publish the plugin:\\n npm run publish:alpha\\n npm run publish:beta\\n npm run publish:latest\\n');process.exit(1)}\"",
17
+ "publish:alpha": "npm i --save && npm run bundle && cui publish --alpha",
18
+ "publish:beta": "npm i --save && npm run bundle && cui publish --beta",
19
+ "publish:latest": "npm i --save && npm run bundle && cui publish --latest",
20
+ "update": "updates --update ./"
21
+ },
22
+ "engines": {
23
+ "camera.ui": ">=0.0.50",
24
+ "node": ">=18.20.8"
25
+ },
26
+ "keywords": [
27
+ "camera-ui-plugin"
28
+ ],
29
+ "license": "MIT",
30
+ "camera.ui": {
31
+ "extensions": [
32
+ "motionDetection"
33
+ ],
34
+ "dependencies": [],
35
+ "bundled": true
36
+ }
37
+ }