@mulmobridge/client 0.1.3 → 0.1.4
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 +36 -6
- package/dist/options.d.ts +9 -0
- package/dist/options.js +10 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -49,13 +49,43 @@ client.onPush((ev) => {
|
|
|
49
49
|
|
|
50
50
|
## Ecosystem
|
|
51
51
|
|
|
52
|
-
Part of the `@mulmobridge/*` package family
|
|
52
|
+
Part of the [`@mulmobridge/*`](https://www.npmjs.com/~mulmobridge) package family.
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
54
|
+
**Shared libraries:**
|
|
55
|
+
|
|
56
|
+
- [`@mulmobridge/client`](https://www.npmjs.com/package/@mulmobridge/client) — socket.io client library used by every bridge below ← **this package**
|
|
57
|
+
- [`@mulmobridge/protocol`](https://www.npmjs.com/package/@mulmobridge/protocol) — wire types and constants
|
|
58
|
+
- [`@mulmobridge/chat-service`](https://www.npmjs.com/package/@mulmobridge/chat-service) — server-side relay + session store
|
|
59
|
+
- [`@mulmobridge/relay`](https://www.npmjs.com/package/@mulmobridge/relay) — Cloudflare Workers webhook proxy
|
|
60
|
+
- [`@mulmobridge/mock-server`](https://www.npmjs.com/package/@mulmobridge/mock-server) — mock server for local bridge development
|
|
61
|
+
|
|
62
|
+
**Bridges** (one npm package per platform):
|
|
63
|
+
|
|
64
|
+
- [`@mulmobridge/bluesky`](https://www.npmjs.com/package/@mulmobridge/bluesky) — Bluesky DMs over atproto
|
|
65
|
+
- [`@mulmobridge/chatwork`](https://www.npmjs.com/package/@mulmobridge/chatwork) — Chatwork (Japanese business chat)
|
|
66
|
+
- [`@mulmobridge/cli`](https://www.npmjs.com/package/@mulmobridge/cli) — interactive terminal bridge
|
|
67
|
+
- [`@mulmobridge/discord`](https://www.npmjs.com/package/@mulmobridge/discord) — Discord bot via Gateway
|
|
68
|
+
- [`@mulmobridge/email`](https://www.npmjs.com/package/@mulmobridge/email) — IMAP poll + SMTP reply, threading preserved
|
|
69
|
+
- [`@mulmobridge/google-chat`](https://www.npmjs.com/package/@mulmobridge/google-chat) — Google Chat via MulmoBridge relay
|
|
70
|
+
- [`@mulmobridge/irc`](https://www.npmjs.com/package/@mulmobridge/irc) — IRC (Libera, Freenode, custom)
|
|
71
|
+
- [`@mulmobridge/line`](https://www.npmjs.com/package/@mulmobridge/line) — LINE Messaging API via MulmoBridge relay
|
|
72
|
+
- [`@mulmobridge/line-works`](https://www.npmjs.com/package/@mulmobridge/line-works) — LINE Works (enterprise LINE)
|
|
73
|
+
- [`@mulmobridge/mastodon`](https://www.npmjs.com/package/@mulmobridge/mastodon) — Mastodon DMs + mentions
|
|
74
|
+
- [`@mulmobridge/matrix`](https://www.npmjs.com/package/@mulmobridge/matrix) — Matrix / Element
|
|
75
|
+
- [`@mulmobridge/mattermost`](https://www.npmjs.com/package/@mulmobridge/mattermost) — Mattermost
|
|
76
|
+
- [`@mulmobridge/messenger`](https://www.npmjs.com/package/@mulmobridge/messenger) — Facebook Messenger via MulmoBridge relay
|
|
77
|
+
- [`@mulmobridge/nostr`](https://www.npmjs.com/package/@mulmobridge/nostr) — Nostr NIP-04 encrypted DMs
|
|
78
|
+
- [`@mulmobridge/rocketchat`](https://www.npmjs.com/package/@mulmobridge/rocketchat) — Rocket.Chat
|
|
79
|
+
- [`@mulmobridge/signal`](https://www.npmjs.com/package/@mulmobridge/signal) — Signal via signal-cli-rest-api
|
|
80
|
+
- [`@mulmobridge/slack`](https://www.npmjs.com/package/@mulmobridge/slack) — Slack Socket Mode
|
|
81
|
+
- [`@mulmobridge/teams`](https://www.npmjs.com/package/@mulmobridge/teams) — Microsoft Teams via Bot Framework
|
|
82
|
+
- [`@mulmobridge/telegram`](https://www.npmjs.com/package/@mulmobridge/telegram) — Telegram bot
|
|
83
|
+
- [`@mulmobridge/twilio-sms`](https://www.npmjs.com/package/@mulmobridge/twilio-sms) — SMS via Twilio Programmable Messaging
|
|
84
|
+
- [`@mulmobridge/viber`](https://www.npmjs.com/package/@mulmobridge/viber) — Viber Public Account bots
|
|
85
|
+
- [`@mulmobridge/webhook`](https://www.npmjs.com/package/@mulmobridge/webhook) — generic HTTP webhook bridge
|
|
86
|
+
- [`@mulmobridge/whatsapp`](https://www.npmjs.com/package/@mulmobridge/whatsapp) — WhatsApp Cloud API via MulmoBridge relay
|
|
87
|
+
- [`@mulmobridge/xmpp`](https://www.npmjs.com/package/@mulmobridge/xmpp) — XMPP / Jabber
|
|
88
|
+
- [`@mulmobridge/zulip`](https://www.npmjs.com/package/@mulmobridge/zulip) — Zulip
|
|
59
89
|
|
|
60
90
|
## License
|
|
61
91
|
|
package/dist/options.d.ts
CHANGED
|
@@ -5,9 +5,18 @@
|
|
|
5
5
|
* Precedence when the same key resolves from both forms:
|
|
6
6
|
* transport-specific wins over shared.
|
|
7
7
|
*
|
|
8
|
+
* Transport ids with dashes (`google-chat`, `line-works`,
|
|
9
|
+
* `twilio-sms`, …) are normalised to underscores when building the
|
|
10
|
+
* env prefix: `google-chat` → `GOOGLE_CHAT_BRIDGE_*`. Dashes in env
|
|
11
|
+
* var names break shells, so `_` is the portable convention.
|
|
12
|
+
*
|
|
8
13
|
* Example:
|
|
9
14
|
* SLACK_BRIDGE_DEFAULT_ROLE=slack
|
|
10
15
|
* BRIDGE_DEFAULT_ROLE=general
|
|
11
16
|
* → `{ defaultRole: "slack" }`
|
|
17
|
+
*
|
|
18
|
+
* GOOGLE_CHAT_BRIDGE_DEFAULT_ROLE=support
|
|
19
|
+
* (with transportId="google-chat")
|
|
20
|
+
* → `{ defaultRole: "support" }`
|
|
12
21
|
*/
|
|
13
22
|
export declare function readBridgeEnvOptions(transportId: string, env: Readonly<Record<string, string | undefined>>): Record<string, string>;
|
package/dist/options.js
CHANGED
|
@@ -48,13 +48,22 @@ function matchBridgePrefix(name, transportPrefix) {
|
|
|
48
48
|
* Precedence when the same key resolves from both forms:
|
|
49
49
|
* transport-specific wins over shared.
|
|
50
50
|
*
|
|
51
|
+
* Transport ids with dashes (`google-chat`, `line-works`,
|
|
52
|
+
* `twilio-sms`, …) are normalised to underscores when building the
|
|
53
|
+
* env prefix: `google-chat` → `GOOGLE_CHAT_BRIDGE_*`. Dashes in env
|
|
54
|
+
* var names break shells, so `_` is the portable convention.
|
|
55
|
+
*
|
|
51
56
|
* Example:
|
|
52
57
|
* SLACK_BRIDGE_DEFAULT_ROLE=slack
|
|
53
58
|
* BRIDGE_DEFAULT_ROLE=general
|
|
54
59
|
* → `{ defaultRole: "slack" }`
|
|
60
|
+
*
|
|
61
|
+
* GOOGLE_CHAT_BRIDGE_DEFAULT_ROLE=support
|
|
62
|
+
* (with transportId="google-chat")
|
|
63
|
+
* → `{ defaultRole: "support" }`
|
|
55
64
|
*/
|
|
56
65
|
export function readBridgeEnvOptions(transportId, env) {
|
|
57
|
-
const transportPrefix = `${transportId.toUpperCase()}_BRIDGE_`;
|
|
66
|
+
const transportPrefix = `${transportId.toUpperCase().replace(/-/g, "_")}_BRIDGE_`;
|
|
58
67
|
const shared = {};
|
|
59
68
|
const specific = {};
|
|
60
69
|
for (const [name, value] of Object.entries(env)) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mulmobridge/client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "Socket.io client library for MulmoBridge — shared by all bridge implementations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"license": "MIT",
|
|
46
46
|
"author": "Receptron Team",
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@mulmobridge/protocol": "^0.1.
|
|
48
|
+
"@mulmobridge/protocol": "^0.1.4",
|
|
49
49
|
"socket.io-client": "^4.0.0"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|