@web-auto/camo 0.1.13 → 0.1.14

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": "@web-auto/camo",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Camoufox Browser CLI - Cross-platform browser automation",
5
5
  "type": "module",
6
6
  "bin": {
@@ -31,12 +31,15 @@ function splitCsv(value) {
31
31
  .filter(Boolean);
32
32
  }
33
33
 
34
- function pickCloseDependency(options) {
35
- if (options.doReply || options.doLikes) return 'comment_match_gate';
36
- if (options.matchGateEnabled) return 'comment_match_gate';
37
- if (options.commentsHarvestEnabled) return 'comments_harvest';
38
- if (options.detailHarvestEnabled) return 'detail_harvest';
39
- return 'open_first_detail';
34
+ function pickCloseDependencies(options) {
35
+ const deps = [];
36
+ if (options.doLikes) deps.push('comment_like');
37
+ if (options.doReply) deps.push('comment_reply');
38
+ if (deps.length > 0) return deps;
39
+ if (options.matchGateEnabled) return ['comment_match_gate'];
40
+ if (options.commentsHarvestEnabled) return ['comments_harvest'];
41
+ if (options.detailHarvestEnabled) return ['detail_harvest'];
42
+ return ['open_first_detail'];
40
43
  }
41
44
 
42
45
  function buildOpenFirstDetailScript(maxNotes, keyword) {
@@ -486,7 +489,7 @@ export function buildXhsUnifiedAutoscript(rawOptions = {}) {
486
489
  const detailHarvestEnabled = doHomepage || doImages || doComments || doLikes || doReply || doOcr;
487
490
  const commentsHarvestEnabled = doComments || doLikes || doReply;
488
491
  const matchGateEnabled = doLikes || doReply;
489
- const closeDependsOn = pickCloseDependency({
492
+ const closeDependsOn = pickCloseDependencies({
490
493
  doReply,
491
494
  doLikes,
492
495
  matchGateEnabled,
@@ -793,7 +796,7 @@ export function buildXhsUnifiedAutoscript(rawOptions = {}) {
793
796
  action: 'xhs_close_detail',
794
797
  params: {},
795
798
  trigger: 'detail_modal.exist',
796
- dependsOn: [closeDependsOn],
799
+ dependsOn: closeDependsOn,
797
800
  once: false,
798
801
  oncePerAppear: true,
799
802
  pacing: { operationMinIntervalMs: 2500, eventCooldownMs: 1300, jitterMs: 180 },