dsh-qianchuan-toolkit 1.0.0 → 1.0.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # 更新日志
2
2
 
3
+ ## 1.0.1
4
+
5
+ - 修复:埋点写入失败(例如数据目录无写权限)会抛出异常并中断 `--watch` 巡航,现在只告警、不打断本轮与后续轮次。
6
+
3
7
  ## 1.0.0
4
8
 
5
9
  首次以 `dsh-qianchuan-toolkit` 发布:把原先的两个独立插件合成一个包,注册两个技能。
File without changes
@@ -124,8 +124,13 @@ export function groupByAccount(cfg) {
124
124
  }
125
125
 
126
126
  export function appendJsonl(file, obj) {
127
- fs.mkdirSync(path.dirname(file), { recursive: true })
128
- fs.appendFileSync(file, JSON.stringify(obj) + '\n')
127
+ // 埋点写失败不能打断巡航:只告警,不抛出
128
+ try {
129
+ fs.mkdirSync(path.dirname(file), { recursive: true })
130
+ fs.appendFileSync(file, JSON.stringify(obj) + '\n')
131
+ } catch (e) {
132
+ console.error('埋点写入失败(已忽略):' + file + ' — ' + e.message)
133
+ }
129
134
  }
130
135
 
131
136
  /** 判定:一个抖音号当前小时的聚合 */
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-qianchuan-toolkit",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "description": "DSH skill bundle for 巨量千川: 直播盯盘自动控量 (qianchuan-live-control) + 乘方计划复制 (qianchuan-plan-copy).",
6
6
  "license": "MIT",