@camera.ui/camera-ui-smtp 0.0.1 → 0.0.3

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.
Files changed (3) hide show
  1. package/README.md +1 -194
  2. package/bundle.zip +0 -0
  3. package/package.json +19 -11
package/README.md CHANGED
@@ -1,194 +1 @@
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/)
1
+ # @camera.ui/camera-ui-smtp
package/bundle.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "displayName": "SMTP",
3
3
  "name": "@camera.ui/camera-ui-smtp",
4
- "version": "0.0.1",
4
+ "version": "0.0.3",
5
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",
6
+ "author": "seydx (https://github.com/cameraui/plugins)",
7
7
  "main": "./dist/index.js",
8
+ "type": "commonjs",
8
9
  "scripts": {
9
10
  "build": "rimraf dist && tsc",
10
11
  "bundle": "npm run format && npm run lint:fix && npm run build && cui bundle",
@@ -19,19 +20,26 @@
19
20
  "publish:latest": "npm i --save && npm run bundle && cui publish --latest",
20
21
  "update": "updates --update ./"
21
22
  },
23
+ "bugs": {
24
+ "url": "https://github.com/cameraui/plugins/issues"
25
+ },
22
26
  "engines": {
23
27
  "camera.ui": ">=0.0.50",
24
- "node": ">=18.20.8"
28
+ "node": ">=22.0.0"
25
29
  },
30
+ "homepage": "https://github.com/cameraui/plugins/tree/main/camera-ui-smtp#readme",
26
31
  "keywords": [
27
- "camera-ui-plugin"
32
+ "camera-ui-plugin",
33
+ "smtp"
28
34
  ],
29
35
  "license": "MIT",
30
- "camera.ui": {
31
- "extensions": [
32
- "motionDetection"
33
- ],
34
- "dependencies": [],
35
- "bundled": true
36
- }
36
+ "repository": {
37
+ "type": "git",
38
+ "url": "git+https://github.com/cameraui/plugins.git",
39
+ "directory": "camera-ui-smtp"
40
+ },
41
+ "files": [
42
+ "bundle.zip",
43
+ "CHANGELOG.md"
44
+ ]
37
45
  }