@openduo/channel-feishu 0.2.0 → 0.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openduo/channel-feishu",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -8,20 +8,20 @@
8
8
  },
9
9
  "main": "dist/plugin.js",
10
10
  "files": [
11
- "bin/duoduo-feishu",
12
11
  "config/",
13
12
  "dist/",
14
13
  "scripts/postinstall.mjs",
15
14
  "package.json"
16
15
  ],
17
16
  "bin": {
18
- "duoduo-feishu": "bin/duoduo-feishu"
17
+ "duoduo-feishu": "dist/plugin.js"
19
18
  },
20
19
  "aladuo": {
21
20
  "channel": {
22
21
  "type": "feishu",
23
22
  "bin": "dist/plugin.js",
24
23
  "envAllowlist": [
24
+ "ALADUO_WORK_DIR",
25
25
  "FEISHU_APP_ID",
26
26
  "FEISHU_APP_SECRET",
27
27
  "FEISHU_DOMAIN",
@@ -52,7 +52,7 @@
52
52
  "dependencies": {
53
53
  "@larksuiteoapi/node-sdk": "^1.58.0",
54
54
  "ws": "^8.19.0",
55
- "@openduo/protocol": "0.2.0"
55
+ "@openduo/protocol": "0.2.2"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@types/node": "^20.11.30",
@@ -64,7 +64,7 @@
64
64
  "scripts": {
65
65
  "postinstall": "node scripts/postinstall.mjs",
66
66
  "start": "tsx src/main.ts",
67
- "build:plugin": "esbuild src/main.ts --bundle --platform=node --format=esm --target=node20 --minify --legal-comments=none --log-level=info --outfile=dist/plugin.js",
67
+ "build:plugin": "esbuild src/main.ts --bundle --platform=node --format=esm --target=node20 --minify --legal-comments=none --log-level=info --banner:js='#!/usr/bin/env node' --outfile=dist/plugin.js",
68
68
  "lint:types": "tsc --noEmit",
69
69
  "test": "vitest run",
70
70
  "test:watch": "vitest",
package/bin/duoduo-feishu DELETED
@@ -1,38 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- SCRIPT_PATH="${BASH_SOURCE[0]}"
5
- while [[ -L "$SCRIPT_PATH" ]]; do
6
- SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
7
- LINK_TARGET="$(readlink "$SCRIPT_PATH")"
8
- if [[ "$LINK_TARGET" == /* ]]; then
9
- SCRIPT_PATH="$LINK_TARGET"
10
- else
11
- SCRIPT_PATH="$SCRIPT_DIR/$LINK_TARGET"
12
- fi
13
- done
14
- SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
15
- ROOT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
16
-
17
- if [[ -f "$ROOT_DIR/dist/plugin.js" ]]; then
18
- exec node "$ROOT_DIR/dist/plugin.js" "$@"
19
- fi
20
-
21
- if [[ -f "$ROOT_DIR/../../dist/release/feishu-gateway.js" ]]; then
22
- exec node "$ROOT_DIR/../../dist/release/feishu-gateway.js" "$@"
23
- fi
24
-
25
- if [[ -x "$ROOT_DIR/node_modules/.bin/tsx" ]]; then
26
- exec "$ROOT_DIR/node_modules/.bin/tsx" "$ROOT_DIR/src/main.ts" "$@"
27
- fi
28
-
29
- if command -v pnpm >/dev/null 2>&1; then
30
- exec pnpm --dir "$ROOT_DIR" exec tsx "$ROOT_DIR/src/main.ts" "$@"
31
- fi
32
-
33
- if command -v npx >/dev/null 2>&1; then
34
- exec npx tsx "$ROOT_DIR/src/main.ts" "$@"
35
- fi
36
-
37
- echo "tsx not found. Install dependencies first." >&2
38
- exit 1