@stacksjs/chat 0.57.4 โ†’ 0.58.19

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 CHANGED
@@ -9,7 +9,7 @@ Stacks Chat is driver system for sending messages through chat apps.
9
9
  ## ๐Ÿค– Usage
10
10
 
11
11
  ```bash
12
- pnpm i -D @stacksjs/chat
12
+ bun install -d @stacksjs/chat
13
13
  ```
14
14
 
15
15
  You may now use it in your project:
@@ -47,7 +47,7 @@ SLACK_SECRET_KEY=SSK123
47
47
  ## ๐Ÿงช Testing
48
48
 
49
49
  ```bash
50
- pnpm test
50
+ bun test
51
51
  ```
52
52
 
53
53
  ## ๐Ÿ“ˆ Changelog
@@ -66,7 +66,7 @@ For help, discussion about best practices, or any other conversation that would
66
66
 
67
67
  For casual chit-chat with others using this package:
68
68
 
69
- [Join the Stacks Discord Server](https://discord.ow3.org)
69
+ [Join the Stacks Discord Server](https://discord.gg/stacksjs)
70
70
 
71
71
  ## ๐Ÿ™๐Ÿผ Credits
72
72
 
@@ -80,4 +80,4 @@ Many thanks to the following core technologies & people who have contributed to
80
80
 
81
81
  The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
82
82
 
83
- Made with โค๏ธ
83
+ Made with ๐Ÿ’™
package/dist/index.js ADDED
@@ -0,0 +1,42 @@
1
+ // @bun
2
+ var __defProp = Object.defineProperty;
3
+ var __export = (target, all) => {
4
+ for (var name in all)
5
+ __defProp(target, name, {
6
+ get: all[name],
7
+ enumerable: true,
8
+ configurable: true,
9
+ set: (newValue) => all[name] = () => newValue
10
+ });
11
+ };
12
+
13
+ // src/drivers/discord.ts
14
+ var exports_discord = {};
15
+ __export(exports_discord, {
16
+ send: () => {
17
+ {
18
+ return send;
19
+ }
20
+ },
21
+ Send: () => {
22
+ {
23
+ return send;
24
+ }
25
+ }
26
+ });
27
+ import {DiscordProvider} from "@novu/discord";
28
+ import {italic} from "@stacksjs/cli";
29
+ import {ResultAsync} from "@stacksjs/error-handling";
30
+ var send = function(options) {
31
+ return ResultAsync.fromPromise(provider.sendMessage(options), () => new Error(`Failed to send message using provider: ${italic("Discord")}`));
32
+ };
33
+ var provider = new DiscordProvider({});
34
+ // src/drivers/teams.ts
35
+ var exports_teams = {};
36
+ // src/drivers/slack.ts
37
+ var exports_slack = {};
38
+ export {
39
+ exports_teams as teams,
40
+ exports_slack as slack,
41
+ exports_discord as discord
42
+ };
package/package.json CHANGED
@@ -1,17 +1,16 @@
1
1
  {
2
2
  "name": "@stacksjs/chat",
3
3
  "type": "module",
4
- "version": "0.57.4",
5
- "packageManager": "pnpm@8.6.6",
6
- "description": "The Stacks Chat Integration. Easy sending of messages for chat services",
4
+ "version": "0.58.19",
5
+ "description": "Easily interact with chat APIs.",
7
6
  "author": "Chris Breuer",
8
7
  "license": "MIT",
9
8
  "funding": "https://github.com/sponsors/chrisbbreuer",
10
- "homepage": "https://github.com/stacksjs/stacks/tree/main/.stacks/core/chat#readme",
9
+ "homepage": "https://github.com/stacksjs/stacks/tree/main/storage/framework/core/src/chat#readme",
11
10
  "repository": {
12
11
  "type": "git",
13
12
  "url": "git+https://github.com/stacksjs/stacks.git",
14
- "directory": "./.stacks/core/chat"
13
+ "directory": "./storage/framework/core/src/chat"
15
14
  },
16
15
  "bugs": {
17
16
  "url": "https://github.com/stacksjs/stacks/issues"
@@ -20,40 +19,55 @@
20
19
  "chat",
21
20
  "stacks",
22
21
  "discord",
22
+ "microsoft teams",
23
23
  "slack"
24
24
  ],
25
25
  "exports": {
26
26
  ".": {
27
- "types": "./dist/index.d.ts",
28
- "import": "./dist/index.mjs"
27
+ "bun": "./src/index.ts",
28
+ "import": "./dist/index.js"
29
+ },
30
+ "./*": {
31
+ "bun": "./src/*",
32
+ "import": "./dist/*"
29
33
  }
30
34
  },
31
- "module": "dist/index.mjs",
35
+ "module": "dist/index.js",
32
36
  "types": "dist/index.d.ts",
33
37
  "contributors": [
34
- "Chris Breuer <chris@ow3.org>"
38
+ "Chris Breuer <chris@stacksjs.org>"
35
39
  ],
36
40
  "files": [
37
- "dist",
38
- "README.md"
41
+ "README.md",
42
+ "dist"
39
43
  ],
44
+ "scripts": {
45
+ "build": "bun --bun build.ts",
46
+ "typecheck": "bun --bun tsc --noEmit",
47
+ "prepublishOnly": "bun --bun run build"
48
+ },
40
49
  "peerDependencies": {
41
- "@novu/discord": "^0.16.2",
42
- "@novu/ms-teams": "^0.16.1",
43
- "@novu/node": "^0.16.2",
44
- "@novu/slack": "^0.16.2",
45
- "@novu/stateless": "^0.16.2",
46
- "@stacksjs/cli": "0.57.4",
47
- "@stacksjs/config": "0.57.4",
48
- "@stacksjs/error-handling": "0.57.4",
49
- "@stacksjs/types": "0.57.4"
50
+ "@novu/stateless": "^0.22.0",
51
+ "@stacksjs/cli": "workspace:*",
52
+ "@stacksjs/config": "workspace:*",
53
+ "@stacksjs/error-handling": "workspace:*",
54
+ "@stacksjs/types": "workspace:*"
50
55
  },
51
- "devDependencies": {
52
- "@stacksjs/development": "0.57.4"
56
+ "dependencies": {
57
+ "@novu/stateless": "^0.22.0",
58
+ "@stacksjs/cli": "workspace:*",
59
+ "@stacksjs/config": "workspace:*",
60
+ "@stacksjs/error-handling": "workspace:*",
61
+ "@stacksjs/types": "workspace:*"
53
62
  },
54
- "scripts": {
55
- "build": "unbuild",
56
- "dev": "unbuild --stub",
57
- "typecheck": "tsc --noEmit"
63
+ "optionalDependencies": {
64
+ "@novu/discord": "^0.22.0",
65
+ "@novu/ms-teams": "^0.22.0",
66
+ "@novu/node": "^0.22.0",
67
+ "@novu/slack": "^0.22.0",
68
+ "@novu/stateless": "^0.22.0"
69
+ },
70
+ "devDependencies": {
71
+ "@stacksjs/development": "workspace:*"
58
72
  }
59
- }
73
+ }
package/LICENSE.md DELETED
@@ -1,21 +0,0 @@
1
- # MIT License
2
-
3
- Copyright (c) 2022 Open Web Foundation
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.
@@ -1,3 +0,0 @@
1
- import type { ChatOptions } from '@stacksjs/types';
2
- declare function send(options: ChatOptions): any;
3
- export { send as Send, send };
@@ -1,11 +0,0 @@
1
- import { DiscordProvider } from "@novu/discord";
2
- import { italic } from "@stacksjs/cli";
3
- import { ResultAsync } from "@stacksjs/error-handling";
4
- const provider = new DiscordProvider({});
5
- function send(options) {
6
- return ResultAsync.fromPromise(
7
- provider.sendMessage(options),
8
- () => new Error(`Failed to send message using provider: ${italic("Discord")}`)
9
- );
10
- }
11
- export { send as Send, send };
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
package/dist/index.d.ts DELETED
@@ -1,3 +0,0 @@
1
- export * as discord from './drivers/discord';
2
- export * as teams from './drivers/teams';
3
- export * as slack from './drivers/slack';
package/dist/index.mjs DELETED
@@ -1,3 +0,0 @@
1
- export * as discord from "./drivers/discord.mjs";
2
- export * as teams from "./drivers/teams.mjs";
3
- export * as slack from "./drivers/slack.mjs";