@jeik/dingtalk-connector 0.8.21-fix1 → 0.8.21-fix2

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.
@@ -306,7 +306,7 @@ function getInstallSpec() {
306
306
  return PKG_NAME;
307
307
  }
308
308
 
309
- function installPlugin() {
309
+ function installPlugin(force = false) {
310
310
  const spec = getInstallSpec();
311
311
  console.log('\n' + cyan(`📦 Installing ${spec}...`) + '\n');
312
312
 
@@ -363,7 +363,9 @@ function installPlugin() {
363
363
  Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, BACKOFF[attempt] * 1000);
364
364
  }
365
365
  try {
366
- execFileSync('openclaw', ['plugins', 'install', spec], { stdio: 'inherit' });
366
+ const installArgs = ['plugins', 'install', spec];
367
+ if (force) installArgs.push('--force');
368
+ execFileSync('openclaw', installArgs, { stdio: 'inherit' });
367
369
  // Always restore channels & plugins.entries from pre-install backup.
368
370
  // Both our cleaning logic AND `openclaw plugins install` can strip or simplify
369
371
  // these entries (e.g. dropping accounts sub-object). Backup takes precedence.
@@ -701,6 +703,7 @@ async function main() {
701
703
  const isLocal = argv.includes('--local') || argv.includes('-l');
702
704
  const skipDws = argv.includes('--skip-dws');
703
705
  const manual = argv.includes('--manual') || argv.includes('-m');
706
+ const force = argv.includes('--force') || argv.includes('-f');
704
707
 
705
708
  if (!command || command === '--help' || command === '-h') {
706
709
  console.log(`
@@ -711,11 +714,13 @@ Usage:
711
714
  npx -y ${PKG_NAME} install --manual Enter clientId/clientSecret manually (skip QR)
712
715
  npx -y ${PKG_NAME} install --local QR auth only (skip plugin install)
713
716
  npx -y ${PKG_NAME} install --skip-dws Skip dws CLI installation
717
+ npx -y ${PKG_NAME} install --force Force reinstall even if plugin already exists
714
718
 
715
719
  Options:
716
720
  --manual, -m Enter existing clientId/clientSecret manually instead of QR scan
717
721
  --local, -l Skip plugin install (for local development)
718
722
  --skip-dws Skip dws CLI auto-installation
723
+ --force, -f Force reinstall (passes --force to openclaw plugins install)
719
724
  --help, -h Show this help
720
725
  `);
721
726
  return;
@@ -729,7 +734,7 @@ Options:
729
734
  // Step 1: Install connector plugin (unless --local)
730
735
  let pluginInstalled = true;
731
736
  if (!isLocal) {
732
- pluginInstalled = installPlugin();
737
+ pluginInstalled = installPlugin(force);
733
738
  } else {
734
739
  console.log('\n' + dim('📦 --local mode: skipping plugin install') + '\n');
735
740
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jeik/dingtalk-connector",
3
- "version": "0.8.21-fix1",
3
+ "version": "0.8.21-fix2",
4
4
  "description": "OpenClaw DingTalk channel plugin (fork) | 钉钉 OpenClaw 渠道插件(fork 自官方,含标记/卡片渲染修复)",
5
5
  "type": "module",
6
6
  "exports": {