@u-devtools/core 0.1.5 → 0.1.6
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/README.md +77 -0
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# @u-devtools/core
|
|
2
|
+
|
|
3
|
+
Core types and interfaces for Universal DevTools Kit. This package provides the foundational TypeScript types, interfaces, and utilities used throughout the DevTools ecosystem.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @u-devtools/core
|
|
9
|
+
# or
|
|
10
|
+
pnpm add @u-devtools/core
|
|
11
|
+
# or
|
|
12
|
+
yarn add @u-devtools/core
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## What's Included
|
|
16
|
+
|
|
17
|
+
### Type Definitions
|
|
18
|
+
|
|
19
|
+
- **RPC Interfaces** - Types for client-server communication
|
|
20
|
+
- **Plugin Interfaces** - Types for creating DevTools plugins
|
|
21
|
+
- **API Interfaces** - Types for ClientApi, StorageApi, SettingsApi, etc.
|
|
22
|
+
- **Utility Types** - Common types used across the ecosystem
|
|
23
|
+
|
|
24
|
+
### Core Classes
|
|
25
|
+
|
|
26
|
+
- **AppBridge** - Communication bridge between App context and Client context
|
|
27
|
+
- **Control** - DevTools control utilities
|
|
28
|
+
|
|
29
|
+
### Vite Configuration
|
|
30
|
+
|
|
31
|
+
- **vite.config.base** - Base Vite configuration for building DevTools packages
|
|
32
|
+
- **clean-timestamp-plugin** - Vite plugin for cleaning timestamp files
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
### Importing Types
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
import type {
|
|
40
|
+
DevToolsPlugin,
|
|
41
|
+
PluginClientInstance,
|
|
42
|
+
ClientApi,
|
|
43
|
+
RpcServerInterface,
|
|
44
|
+
ServerContext,
|
|
45
|
+
} from '@u-devtools/core';
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Using AppBridge
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
import { AppBridge } from '@u-devtools/core';
|
|
52
|
+
|
|
53
|
+
const bridge = new AppBridge('my-plugin');
|
|
54
|
+
bridge.send('event-name', data);
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Using Vite Config Base
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
import { createViteConfig } from '@u-devtools/core/vite.config.base';
|
|
61
|
+
|
|
62
|
+
export default createViteConfig({
|
|
63
|
+
name: 'MyPackage',
|
|
64
|
+
entry: 'src/index.ts',
|
|
65
|
+
dir: __dirname,
|
|
66
|
+
// ... other options
|
|
67
|
+
});
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Documentation
|
|
71
|
+
|
|
72
|
+
For complete documentation, see the [main README](https://github.com/s00d/u-devtools).
|
|
73
|
+
|
|
74
|
+
## License
|
|
75
|
+
|
|
76
|
+
MIT
|
|
77
|
+
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@u-devtools/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6",
|
|
4
4
|
"description": "Core types and interfaces for Universal DevTools",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"devtools",
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
"files": [
|
|
26
26
|
"dist",
|
|
27
27
|
"src",
|
|
28
|
-
"vite"
|
|
28
|
+
"vite",
|
|
29
|
+
"README.md"
|
|
29
30
|
],
|
|
30
31
|
"devDependencies": {
|
|
31
32
|
"@types/node": "^20.19.27",
|