@aarekaz/switchboard 0.3.5
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 +41 -0
- package/dist/discord.d.ts +1 -0
- package/dist/discord.js +4 -0
- package/dist/discord.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/slack.d.ts +1 -0
- package/dist/slack.js +4 -0
- package/dist/slack.js.map +1 -0
- package/package.json +82 -0
package/README.md
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Switchboard (v0.3.3)
|
|
2
|
+
|
|
3
|
+
**Build chat bots once, deploy everywhere.**
|
|
4
|
+
|
|
5
|
+
Switchboard is a universal SDK for chat platforms that enables developers to build bots once and deploy them seamlessly across Slack, Teams, Discord, and Google Chat.
|
|
6
|
+
|
|
7
|
+
<img width="1176" height="1042" alt="carbon" src="https://github.com/user-attachments/assets/415332a5-b66a-4522-a816-d096c6b64aa6" />
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @aarekaz/switchboard
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Quick Start
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { createBot } from '@aarekaz/switchboard';
|
|
19
|
+
import '@aarekaz/switchboard/discord';
|
|
20
|
+
|
|
21
|
+
const bot = createBot({
|
|
22
|
+
token: process.env.DISCORD_TOKEN,
|
|
23
|
+
platform: 'discord',
|
|
24
|
+
});
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Swap platforms by changing one line:
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
import '@aarekaz/switchboard/slack';
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Design Philosophy that I am drilling in this SDK
|
|
34
|
+
|
|
35
|
+
**"Pit of Success"** - Make the right thing the easiest thing.
|
|
36
|
+
|
|
37
|
+
1. **Platforms are implementation details** - Your bot logic should be platform-agnostic
|
|
38
|
+
2. **One Line Swap** - Switching platforms should require changing exactly one line
|
|
39
|
+
3. **Progressive Disclosure** - Start simple (90% use cases), add power when needed (10% use cases)
|
|
40
|
+
4. **Type Safety as a Feature** - Full TypeScript support without manual type annotations
|
|
41
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@aarekaz/switchboard-discord';
|
package/dist/discord.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/discord.ts"],"sourcesContent":["import '@aarekaz/switchboard-discord';\n\nexport * from '@aarekaz/switchboard-discord';\n"],"mappings":";AAAA,OAAO;AAEP,cAAc;","names":[]}
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from '@aarekaz/switchboard-core';\n"],"mappings":";AAAA,cAAc;","names":[]}
|
package/dist/slack.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@aarekaz/switchboard-slack';
|
package/dist/slack.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/slack.ts"],"sourcesContent":["import '@aarekaz/switchboard-slack';\n\nexport * from '@aarekaz/switchboard-slack';\n"],"mappings":";AAAA,OAAO;AAEP,cAAc;","names":[]}
|
package/package.json
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aarekaz/switchboard",
|
|
3
|
+
"version": "0.3.5",
|
|
4
|
+
"description": "Universal SDK for chat platforms - build bots once, deploy everywhere",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"chat",
|
|
7
|
+
"bot",
|
|
8
|
+
"discord",
|
|
9
|
+
"slack",
|
|
10
|
+
"teams",
|
|
11
|
+
"google-chat",
|
|
12
|
+
"sdk"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://github.com/Aarekaz/switchboard#readme",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/Aarekaz/switchboard.git"
|
|
18
|
+
},
|
|
19
|
+
"license": "MIT",
|
|
20
|
+
"author": "Anurag Dhungana",
|
|
21
|
+
"type": "module",
|
|
22
|
+
"main": "./dist/index.js",
|
|
23
|
+
"module": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./discord": {
|
|
31
|
+
"types": "./dist/discord.d.ts",
|
|
32
|
+
"import": "./dist/discord.js"
|
|
33
|
+
},
|
|
34
|
+
"./slack": {
|
|
35
|
+
"types": "./dist/slack.d.ts",
|
|
36
|
+
"import": "./dist/slack.js"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"files": [
|
|
40
|
+
"dist",
|
|
41
|
+
"README.md"
|
|
42
|
+
],
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@aarekaz/switchboard-slack": "0.3.5",
|
|
45
|
+
"@aarekaz/switchboard-core": "0.3.5",
|
|
46
|
+
"@aarekaz/switchboard-discord": "0.3.5"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@types/node": "^25.0.8",
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "^8.53.0",
|
|
51
|
+
"@typescript-eslint/parser": "^8.53.0",
|
|
52
|
+
"@vitest/ui": "^4.0.17",
|
|
53
|
+
"eslint": "^9.39.2",
|
|
54
|
+
"eslint-config-prettier": "^10.1.8",
|
|
55
|
+
"prettier": "^3.7.4",
|
|
56
|
+
"tsup": "^8.5.1",
|
|
57
|
+
"typescript": "^5.9.3",
|
|
58
|
+
"vitest": "^4.0.17"
|
|
59
|
+
},
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public"
|
|
62
|
+
},
|
|
63
|
+
"engines": {
|
|
64
|
+
"node": ">=18.0.0",
|
|
65
|
+
"pnpm": ">=8.0.0"
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "pnpm -r --filter \"./packages/**\" build && pnpm build:umbrella",
|
|
69
|
+
"build:umbrella": "tsup",
|
|
70
|
+
"dev": "pnpm -r --parallel dev",
|
|
71
|
+
"test": "vitest",
|
|
72
|
+
"test:ui": "vitest --ui",
|
|
73
|
+
"test:coverage": "vitest --coverage",
|
|
74
|
+
"lint": "eslint .",
|
|
75
|
+
"lint:fix": "eslint . --fix",
|
|
76
|
+
"format": "prettier --write \"**/*.{ts,tsx,md,json}\"",
|
|
77
|
+
"format:check": "prettier --check \"**/*.{ts,tsx,md,json}\"",
|
|
78
|
+
"release": "bash scripts/release.sh",
|
|
79
|
+
"typecheck": "pnpm -r typecheck",
|
|
80
|
+
"clean": "pnpm -r clean && rm -rf node_modules"
|
|
81
|
+
}
|
|
82
|
+
}
|