bridgewire 1.0.0 → 1.0.2

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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +113 -0
  3. package/package.json +55 -8
  4. package/index.js +0 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 kuznetsovlv
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,113 @@
1
+ # BridgeWire
2
+
3
+ **BridgeWire** is a transport-agnostic client for HTTP and WebSocket communication.
4
+
5
+ > ⚠️ BridgeWire is currently in early development! The public API is not stable yet.
6
+
7
+ The goal of the project is to provide a unified interface for sending requests over different transports, such as Fetch and WebSocket, with a clean and extensible architecture.
8
+
9
+ ## Features
10
+
11
+ Planned features:
12
+
13
+ - Unified API for HTTP Fetch and WebSocket
14
+ - Adapter-based architecture
15
+ - Request/response abstraction
16
+ - Error handling
17
+ - Request cancellation
18
+ - Extensible transport layer
19
+ - Optional reactive layer with RxJS in the future
20
+
21
+ ## Getting started
22
+
23
+ Install dependencies:
24
+
25
+ ```bash
26
+ npm install
27
+ ```
28
+
29
+ ## Development
30
+
31
+ Run tests in watch mode:
32
+
33
+ ```bash
34
+ npm run test:watch
35
+ ```
36
+
37
+ Run tests once:
38
+
39
+ ```bash
40
+ npm run test
41
+ ```
42
+
43
+ ## Build
44
+
45
+ Build the library:
46
+
47
+ ```bash
48
+ npm run build
49
+ ```
50
+
51
+ This will:
52
+
53
+ - clean the `dist` folder
54
+ - build ESM and CJS bundles using Vite
55
+ - generate TypeScript declaration files
56
+
57
+ ## Lint and format
58
+
59
+ Run ESLint:
60
+
61
+ ```bash
62
+ npm run lint
63
+ ```
64
+
65
+ Format code:
66
+
67
+ ```bash
68
+ npm run format
69
+ ```
70
+
71
+ Check formatting:
72
+
73
+ ```bash
74
+ npm run format:check
75
+ ```
76
+
77
+ ## Full check
78
+
79
+ Run all checks:
80
+
81
+ ```bash
82
+ npm run check
83
+ ```
84
+
85
+ Includes:
86
+
87
+ - lint
88
+ - format check
89
+ - tests
90
+ - build
91
+
92
+ ## Project structure
93
+
94
+ ```text
95
+ src/
96
+ index.ts
97
+ index.test.ts
98
+ dist/
99
+ ```
100
+
101
+ ## Architecture
102
+
103
+ BridgeWire is designed around the idea of transport abstraction:
104
+
105
+ - Fetch transport
106
+ - WebSocket transport
107
+ - Unified client interface
108
+
109
+ More details will be added as the implementation evolves.
110
+
111
+ ## License
112
+
113
+ This project is licensed under the [MIT License](./LICENSE).
package/package.json CHANGED
@@ -1,13 +1,60 @@
1
1
  {
2
2
  "name": "bridgewire",
3
- "version": "1.0.0",
4
- "description": "",
5
- "main": "index.js",
3
+ "version": "1.0.2",
4
+ "description": "Transport-agnostic client for HTTP and WebSocket communication",
5
+ "keywords": [],
6
+ "author": "Kuznetsov Leonid",
7
+ "license": "MIT",
8
+ "type": "module",
9
+ "main": "./dist/bridgewire.cjs",
10
+ "module": "./dist/bridgewire.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "types": "./dist/index.d.ts",
15
+ "import": "./dist/bridgewire.js",
16
+ "require": "./dist/bridgewire.cjs"
17
+ }
18
+ },
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "repository": {
23
+ "type": "git",
24
+ "url": "git+https://github.com/kuznetsovlv/bridgewire.git"
25
+ },
26
+ "bugs": {
27
+ "url": "https://github.com/kuznetsovlv/bridgewire/issues"
28
+ },
29
+ "homepage": "https://github.com/kuznetsovlv/bridgewire#readme",
6
30
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
31
+ "dev": "vite",
32
+ "prebuild": "npm run clean",
33
+ "build": "vite build",
34
+ "test": "vitest run",
35
+ "test:watch": "vitest",
36
+ "lint": "eslint .",
37
+ "format": "prettier . --write",
38
+ "format:check": "prettier . --check",
39
+ "check": "npm run lint && npm run format:check && npm run test && npm run build",
40
+ "clean": "node -e \"fs.rmSync('dist', { recursive: true, force: true })\"",
41
+ "changeset": "changeset",
42
+ "version-packages": "changeset version",
43
+ "release": "npm run check && changeset publish"
8
44
  },
9
- "keywords": [],
10
- "author": "",
11
- "license": "ISC",
12
- "type": "commonjs"
45
+ "devDependencies": {
46
+ "@changesets/cli": "^2.31.0",
47
+ "@eslint/js": "^10.0.1",
48
+ "@types/node": "^25.6.0",
49
+ "eslint": "^10.3.0",
50
+ "prettier": "^3.8.3",
51
+ "typescript": "^6.0.3",
52
+ "typescript-eslint": "^8.59.2",
53
+ "vite": "^8.0.10",
54
+ "vite-plugin-dts": "^5.0.0",
55
+ "vitest": "^4.1.5"
56
+ },
57
+ "publishConfig": {
58
+ "access": "public"
59
+ }
13
60
  }
package/index.js DELETED
@@ -1 +0,0 @@
1
- exports.hello = () => 'BridgeWire'