@yixiaoermail/cli 3.2.24 → 3.2.26

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
@@ -1,4 +1,4 @@
1
- # @yixiaoer/cli
1
+ # @yixiaoermail/cli
2
2
 
3
3
  Packaged `yxer` CLI for global npm installation.
4
4
 
@@ -8,8 +8,6 @@ Packaged `yxer` CLI for global npm installation.
8
8
  npm install -g @yixiaoermail/cli
9
9
  ```
10
10
 
11
- The npm package installs a lightweight launcher. During install or first run it downloads the matching platform binary from the release assets.
12
-
13
11
  ## Verify
14
12
 
15
13
  ```bash
@@ -28,16 +26,18 @@ Use `yxer skill sync --global` if your host expects a global skill install.
28
26
 
29
27
  ## Release Packaging
30
28
 
31
- This package expects release assets named like:
29
+ This package expects assets in the versioned TOS directory named like:
32
30
 
33
31
  ```text
34
- yxer-cli-3.2.2-windows-amd64.zip
35
- yxer-cli-3.2.2-windows-arm64.zip
36
- yxer-cli-3.2.2-darwin-amd64.tar.gz
37
- yxer-cli-3.2.2-darwin-arm64.tar.gz
38
- yxer-cli-3.2.2-linux-amd64.tar.gz
39
- yxer-cli-3.2.2-linux-arm64.tar.gz
32
+ yxer-cli-<version>-windows-amd64.zip
33
+ yxer-cli-<version>-windows-arm64.zip
34
+ yxer-cli-<version>-darwin-amd64.tar.gz
35
+ yxer-cli-<version>-darwin-arm64.tar.gz
36
+ yxer-cli-<version>-linux-amd64.tar.gz
37
+ yxer-cli-<version>-linux-arm64.tar.gz
40
38
  checksums.txt
41
39
  ```
42
40
 
43
- If you mirror the download host, set `YXER_DOWNLOAD_BASE_URL` before installation.
41
+ To override the versioned download directory, set `YXER_DOWNLOAD_BASE_URL` before installation.
42
+
43
+ Release builds and publishing are performed from the repository owner's local machine with `scripts/publish-release.ps1`. The script previews by default; pass `-Execute` only after reviewing the TOS and npm dry-run output.
package/bin/install.js CHANGED
@@ -9,10 +9,19 @@ const { ensureExecutable } = require("./ensure-executable");
9
9
 
10
10
  const PACKAGE_NAME = "yxer";
11
11
  const ARCHIVE_PREFIX = "yxer-cli";
12
- const VERSION = require("../package.json").version.replace(/-.*$/, "");
13
- const DEFAULT_REPO = "yixiaoer888/yixiaoer-skill";
14
- const DEFAULT_BASE_URL = `https://github.com/${DEFAULT_REPO}/releases/download/v${VERSION}`;
12
+ const packageInfo = require("../package.json");
13
+ const VERSION = packageInfo.version.replace(/-.*$/, "");
14
+ if (!packageInfo.yxerDownloadRootUrl) {
15
+ throw new Error("Missing yxerDownloadRootUrl in package.json");
16
+ }
17
+
18
+ function buildVersionBaseUrl(rootUrl, version) {
19
+ return `${rootUrl.replace(/\/+$/, "")}/v${version}`;
20
+ }
21
+
22
+ const DEFAULT_BASE_URL = buildVersionBaseUrl(packageInfo.yxerDownloadRootUrl, VERSION);
15
23
  const ALLOWED_HOSTS = new Set([
24
+ new URL(DEFAULT_BASE_URL).hostname,
16
25
  "github.com",
17
26
  "objects.githubusercontent.com",
18
27
  "release-assets.githubusercontent.com",
@@ -286,6 +295,7 @@ if (require.main === module) {
286
295
  module.exports = {
287
296
  ALLOWED_HOSTS,
288
297
  buildDownloadUrl,
298
+ buildVersionBaseUrl,
289
299
  download,
290
300
  downloadWithCurl,
291
301
  downloadWithPowerShell,
@@ -296,5 +306,6 @@ module.exports = {
296
306
  install,
297
307
  isSupportedPlatform,
298
308
  parseChecksums,
309
+ resolveBaseUrl,
299
310
  verifyChecksum
300
311
  };
package/checksums.txt CHANGED
@@ -1,6 +1,6 @@
1
- c3d4aca431b5e45035818501dc95ffffc1ccccc866063cf029ff8bba84cfa758 yxer-cli-3.2.24-windows-amd64.zip
2
- 4eed82fb6aaba49bb8fea04eed6ee2310e83dcacff0f4274a950bcd52f3c2abe yxer-cli-3.2.24-windows-arm64.zip
3
- 795f3d99c2ca8b60ef37b6bf1a677cd11f3611387f531028bf1794a6c9efc00d yxer-cli-3.2.24-darwin-amd64.tar.gz
4
- ec88d470ea50716b7cd3625f9de15168caed04e348a4b8462e5ab62a5aba124e yxer-cli-3.2.24-darwin-arm64.tar.gz
5
- 847f6ded0344f8d7218a3519259273202e48fbe13397908a950e5b75b862af81 yxer-cli-3.2.24-linux-amd64.tar.gz
6
- 5916307914b8d260fcf73394e7136be7d5f365ae800edfd00cb94f6419c0b467 yxer-cli-3.2.24-linux-arm64.tar.gz
1
+ a665ae99d9934cff6f7bedbb9bb0bfd11d1c3b567c9bd4f8eaf2792d62f1ef69 yxer-cli-3.2.26-windows-amd64.zip
2
+ 1781de4190d0ee8af38ce388020b405be5c00a5b2451856f2d02d14d551c3e86 yxer-cli-3.2.26-windows-arm64.zip
3
+ da26afc4c6f09e9ab51a70d168306e111eeb3b9916ecef87129e54641b6eca79 yxer-cli-3.2.26-darwin-amd64.tar.gz
4
+ 14290697ea16d70518996dd05c42c2ac7ce222831c1afcf0464acc426855d36b yxer-cli-3.2.26-darwin-arm64.tar.gz
5
+ 7635fbb8607943fbc65bfdccb7a1f49b5ae5788dd971c3852e73aa39e3b23c8e yxer-cli-3.2.26-linux-amd64.tar.gz
6
+ eab790466851e9423cdc86f74b6bef7bac66ba84c9727bbcfb783e196be15822 yxer-cli-3.2.26-linux-arm64.tar.gz
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@yixiaoermail/cli",
3
- "version": "3.2.24",
3
+ "version": "3.2.26",
4
+ "yxerDownloadRootUrl": "https://yixiaoer-lite-asserts.tos-cn-shanghai.volces.com/yxer/releases",
4
5
  "description": "Yixiaoer CLI packaged for npm global installation",
5
6
  "bin": {
6
7
  "yxer": "bin/yxer.js"
@@ -31,9 +31,11 @@
31
31
  | `location` | `Object` | 否 | 位置对象 (`PlatformDataItem`) | - |
32
32
  | `scheduledTime` | `number` | 否 | 定时发布时间 (13 位 Unix 时间戳,单位: 毫秒) | - |
33
33
  | `advertisement` | `number` | 否 | 广告投放收益: 2-无收益, 3-投放广告赚收益 | `3` |
34
- | `declaration`| `number` | 否 | 创作类型 1:自行拍摄 2:取自站外 3:AI生成 6:虚构演绎 7:投资观点 8:健康医疗 | - |
34
+ | `declaration` | `number` | 否 | 创作声明:`0`-不声明,`1`-取材网络,`2`-个人观点,仅供参考,`3`-引用 AI,`6`-虚构演绎/故事经历,`7`-投资观点,仅供参考,`8`-健康医疗分享,仅供参考;`9`-独家精选(需 `right_exclusive_selection`),`10`-首发精选(需 `right_first_selection`) | `0` |
35
35
  | `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | 1 |
36
36
 
37
+ 普通声明值 `0/1/2/3/6/7/8` 不受精选权益影响;`9/10` 只有账号信息返回对应权益时才填写,否则使用 `0` 或省略。CLI 接收 `declaration` 数字,并会在 `validate`、`publish`(含 `--dry-run`)前查询 `/platform-accounts/{id}/account-info`,拒绝无对应权益的值;服务端会将其转换为 `statement.type` 透传给头条号。`isFirst=true` 表示“头条首发”,与 `declaration=10` 的“首发精选”是两个独立字段。
38
+
37
39
  ## 2. Payload 完整示例
38
40
 
39
41
  ```json
@@ -25,9 +25,11 @@
25
25
  | `formType` | `string` | **是** | 固定值: `task` | `task` |
26
26
  | `description` | `string` | **是** | 图文描述,支持 HTML 和话题标签 (`<topic>`)。最多 1000 字符。 | - |
27
27
  | `images` | `Array` | **是** | 图片数组 (`OldImage[]`) | - |
28
- | `declaration` | `number` | 否 | 创作类型 1:自行拍摄 2:取自站外 3:AI生成 6:虚构演绎,故事经历 7:投资观点,仅供参考 8:健康医疗分享,仅供参考 | - |
28
+ | `declaration` | `number` | 否 | 创作声明:`0`-不声明,`1`-取材网络,`2`-个人观点,仅供参考,`3`-引用 AI,`6`-虚构演绎/故事经历,`7`-投资观点,仅供参考,`8`-健康医疗分享,仅供参考;`9`-独家精选(需 `right_exclusive_selection`),`10`-首发精选(需 `right_first_selection`) | `0` |
29
29
  | `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | - |
30
30
 
31
+ 普通声明值 `0/1/2/3/6/7/8` 不受精选权益影响;`9/10` 只有账号信息返回对应权益时才填写,否则使用 `0` 或省略。CLI 接收 `declaration` 数字,并会在 `validate`、`publish`(含 `--dry-run`)前查询 `/platform-accounts/{id}/account-info`,拒绝无对应权益的值;服务端会将其转换为 `statement.type` 透传给头条号。
32
+
31
33
  ## 2. 复杂对象结构说明
32
34
 
33
35
  ### 复杂对象:OldImage
@@ -27,11 +27,13 @@
27
27
  | `title` | `string` | **是** | 视频标题 (1-30 字符) | - |
28
28
  | `description` | `string` | **是** | 视频描述 (1-400 字符) | - |
29
29
  | `tags` | `string[]` | **是** | 视频标签 (1-5 个,字符串数组) | - |
30
- | `declaration` | `number` | 否 | 创作者申明:1-自行拍摄, 2-取自站外, 3-AI生成, 6-虚构演绎故事经历, 7-投资观点仅供参考, 8-健康医疗分享仅供参考 | - |
30
+ | `declaration` | `number` | 否 | 创作声明:`0`-无需声明,`2`-取自站外,`1`-自行拍摄,`3`-AI 生成,`6`-虚构演绎/故事经历,`7`-投资观点,仅供参考,`8`-健康医疗分享,仅供参考;`9`-独家精选(需 `right_exclusive_selection`),`10`-首发精选(需 `right_first_selection`) | `0` |
31
31
  | `scheduledTime` | `number` | 否 | 定时发布时间戳(13 位 Unix 时间戳,单位:毫秒) | - |
32
32
  | `visibleType` | `number` | **是** | 可见性: 0-公开, 1-私密 | 0 |
33
33
  | `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | 1 |
34
34
 
35
+ 普通声明值 `0/1/2/3/6/7/8` 不受精选权益影响;`9/10` 只有账号信息返回对应权益时才填写,否则使用 `0` 或省略。CLI 接收 `declaration` 数字,并会在 `validate`、`publish`(含 `--dry-run`)前查询 `/platform-accounts/{id}/account-info`,拒绝无对应权益的值;服务端会将其转换为 `statement.type` 透传给头条号。
36
+
35
37
  ## 2. Payload 完整示例
36
38
 
37
39
  ```json
@@ -1,6 +1,6 @@
1
1
  # 图文发布工作流
2
2
 
3
- > 适用范围:抖音图文、小红书笔记、知乎想法、快手图文、微博图文、微信视频号图文、微信公众号图文等。
3
+ > 适用范围:抖音图文、小红书笔记、知乎想法、快手图文、微博图文、微信视频号图文、微信公众号图文等。
4
4
  > 阅读本文档前,请先阅读 [common-rules.md](./common-rules.md)。
5
5
 
6
6
  ---
@@ -32,8 +32,8 @@ yxer schema get <platform> imageText
32
32
  6. 根据前置数据、schema 和字段来源纪律填写 `payload.json`
33
33
  7. 查阅对应平台文档:`../platforms/imageText/`
34
34
  8. 执行校验:`yxer validate <platform> imageText <payload.json>`
35
- 9. 先执行发布 dry-run:`yxer publish imageText <platform> <payload.json> --dry-run`
36
- 10. 确认请求体后再执行正式发布:`yxer publish imageText <platform> <payload.json>`
35
+ 9. 先执行发布 dry-run:`yxer publish imageText <platform> <payload.json> --dry-run`
36
+ 10. 确认请求体后再执行正式发布:`yxer publish imageText <platform> <payload.json>`
37
37
 
38
38
  ## 关键规则
39
39
 
@@ -62,6 +62,6 @@ yxer publish imageText 抖音 .\payload.json --publish-channel local --client-id
62
62
  ## 平台文档入口
63
63
 
64
64
  - 索引:`../platforms/imageText/index.md`
65
- - 平台细节:`../platforms/imageText/*.md`
66
-
67
- 微信公众号图文的专属字段和默认值见 [`../platforms/imageText/weixingongzhonghao.md`](../platforms/imageText/weixingongzhonghao.md)。微信公众号文章仍走 `publish article` 的独立工作流。
65
+ - 平台细节:`../platforms/imageText/*.md`
66
+
67
+ 微信公众号图文的专属字段和默认值见 [`../platforms/imageText/weixingongzhonghao.md`](../platforms/imageText/weixingongzhonghao.md)。微信公众号文章仍走 `publish article` 的独立工作流。
@@ -141,21 +141,17 @@
141
141
  "declaration": {
142
142
  "type": "number",
143
143
  "enum": [
144
+ 0,
144
145
  1,
145
146
  2,
146
147
  3,
147
148
  6,
148
149
  7,
149
- 8
150
- ]
151
- },
152
- "statement": {
153
- "type": "number",
154
- "enum": [
155
- 1,
156
- 2,
157
- 3
158
- ]
150
+ 8,
151
+ 9,
152
+ 10
153
+ ],
154
+ "default": 0
159
155
  },
160
156
  "publishTime": {
161
157
  "type": "string",
@@ -68,8 +68,11 @@
68
68
  3,
69
69
  6,
70
70
  7,
71
- 8
72
- ]
71
+ 8,
72
+ 9,
73
+ 10
74
+ ],
75
+ "default": 0
73
76
  },
74
77
  "pubType": {
75
78
  "type": "number",
@@ -54,13 +54,16 @@
54
54
  "type": "number",
55
55
  "enum": [
56
56
  0,
57
- 1,
58
57
  2,
58
+ 1,
59
59
  3,
60
60
  6,
61
61
  7,
62
- 8
63
- ]
62
+ 8,
63
+ 9,
64
+ 10
65
+ ],
66
+ "default": 0
64
67
  },
65
68
  "scheduledTime": {
66
69
  "type": "number",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: yixiaoer
3
- version: 3.2.24
3
+ version: 3.2.26
4
4
  description: "通过 yxer CLI 操作蚁小二多平台内容分发:账号查询、资源上传、发布前准备、payload 校验、云发布/本机发布、草稿保存、素材登记、发布记录排查与技能同步。"
5
5
  metadata:
6
6
  category: "productivity"
@@ -31,9 +31,11 @@
31
31
  | `location` | `Object` | 否 | 位置对象 (`PlatformDataItem`) | - |
32
32
  | `scheduledTime` | `number` | 否 | 定时发布时间 (13 位 Unix 时间戳,单位: 毫秒) | - |
33
33
  | `advertisement` | `number` | 否 | 广告投放收益: 2-无收益, 3-投放广告赚收益 | `3` |
34
- | `declaration`| `number` | 否 | 创作类型 1:自行拍摄 2:取自站外 3:AI生成 6:虚构演绎 7:投资观点 8:健康医疗 | - |
34
+ | `declaration` | `number` | 否 | 创作声明:`0`-不声明,`1`-取材网络,`2`-个人观点,仅供参考,`3`-引用 AI,`6`-虚构演绎/故事经历,`7`-投资观点,仅供参考,`8`-健康医疗分享,仅供参考;`9`-独家精选(需 `right_exclusive_selection`),`10`-首发精选(需 `right_first_selection`) | `0` |
35
35
  | `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | 1 |
36
36
 
37
+ 普通声明值 `0/1/2/3/6/7/8` 不受精选权益影响;`9/10` 只有账号信息返回对应权益时才填写,否则使用 `0` 或省略。CLI 接收 `declaration` 数字,并会在 `validate`、`publish`(含 `--dry-run`)前查询 `/platform-accounts/{id}/account-info`,拒绝无对应权益的值;服务端会将其转换为 `statement.type` 透传给头条号。`isFirst=true` 表示“头条首发”,与 `declaration=10` 的“首发精选”是两个独立字段。
38
+
37
39
  ## 2. Payload 完整示例
38
40
 
39
41
  ```json
@@ -25,9 +25,11 @@
25
25
  | `formType` | `string` | **是** | 固定值: `task` | `task` |
26
26
  | `description` | `string` | **是** | 图文描述,支持 HTML 和话题标签 (`<topic>`)。最多 1000 字符。 | - |
27
27
  | `images` | `Array` | **是** | 图片数组 (`OldImage[]`) | - |
28
- | `declaration` | `number` | 否 | 创作类型 1:自行拍摄 2:取自站外 3:AI生成 6:虚构演绎,故事经历 7:投资观点,仅供参考 8:健康医疗分享,仅供参考 | - |
28
+ | `declaration` | `number` | 否 | 创作声明:`0`-不声明,`1`-取材网络,`2`-个人观点,仅供参考,`3`-引用 AI,`6`-虚构演绎/故事经历,`7`-投资观点,仅供参考,`8`-健康医疗分享,仅供参考;`9`-独家精选(需 `right_exclusive_selection`),`10`-首发精选(需 `right_first_selection`) | `0` |
29
29
  | `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | - |
30
30
 
31
+ 普通声明值 `0/1/2/3/6/7/8` 不受精选权益影响;`9/10` 只有账号信息返回对应权益时才填写,否则使用 `0` 或省略。CLI 接收 `declaration` 数字,并会在 `validate`、`publish`(含 `--dry-run`)前查询 `/platform-accounts/{id}/account-info`,拒绝无对应权益的值;服务端会将其转换为 `statement.type` 透传给头条号。
32
+
31
33
  ## 2. 复杂对象结构说明
32
34
 
33
35
  ### 复杂对象:OldImage
@@ -27,11 +27,13 @@
27
27
  | `title` | `string` | **是** | 视频标题 (1-30 字符) | - |
28
28
  | `description` | `string` | **是** | 视频描述 (1-400 字符) | - |
29
29
  | `tags` | `string[]` | **是** | 视频标签 (1-5 个,字符串数组) | - |
30
- | `declaration` | `number` | 否 | 创作者申明:1-自行拍摄, 2-取自站外, 3-AI生成, 6-虚构演绎故事经历, 7-投资观点仅供参考, 8-健康医疗分享仅供参考 | - |
30
+ | `declaration` | `number` | 否 | 创作声明:`0`-无需声明,`2`-取自站外,`1`-自行拍摄,`3`-AI 生成,`6`-虚构演绎/故事经历,`7`-投资观点,仅供参考,`8`-健康医疗分享,仅供参考;`9`-独家精选(需 `right_exclusive_selection`),`10`-首发精选(需 `right_first_selection`) | `0` |
31
31
  | `scheduledTime` | `number` | 否 | 定时发布时间戳(13 位 Unix 时间戳,单位:毫秒) | - |
32
32
  | `visibleType` | `number` | **是** | 可见性: 0-公开, 1-私密 | 0 |
33
33
  | `pubType` | `number` | **是** | 发布类型: 0-草稿, 1-直接发布 | 1 |
34
34
 
35
+ 普通声明值 `0/1/2/3/6/7/8` 不受精选权益影响;`9/10` 只有账号信息返回对应权益时才填写,否则使用 `0` 或省略。CLI 接收 `declaration` 数字,并会在 `validate`、`publish`(含 `--dry-run`)前查询 `/platform-accounts/{id}/account-info`,拒绝无对应权益的值;服务端会将其转换为 `statement.type` 透传给头条号。
36
+
35
37
  ## 2. Payload 完整示例
36
38
 
37
39
  ```json
@@ -1,6 +1,6 @@
1
1
  # 图文发布工作流
2
2
 
3
- > 适用范围:抖音图文、小红书笔记、知乎想法、快手图文、微博图文、微信视频号图文、微信公众号图文等。
3
+ > 适用范围:抖音图文、小红书笔记、知乎想法、快手图文、微博图文、微信视频号图文、微信公众号图文等。
4
4
  > 阅读本文档前,请先阅读 [common-rules.md](./common-rules.md)。
5
5
 
6
6
  ---
@@ -32,8 +32,8 @@ yxer schema get <platform> imageText
32
32
  6. 根据前置数据、schema 和字段来源纪律填写 `payload.json`
33
33
  7. 查阅对应平台文档:`../platforms/imageText/`
34
34
  8. 执行校验:`yxer validate <platform> imageText <payload.json>`
35
- 9. 先执行发布 dry-run:`yxer publish imageText <platform> <payload.json> --dry-run`
36
- 10. 确认请求体后再执行正式发布:`yxer publish imageText <platform> <payload.json>`
35
+ 9. 先执行发布 dry-run:`yxer publish imageText <platform> <payload.json> --dry-run`
36
+ 10. 确认请求体后再执行正式发布:`yxer publish imageText <platform> <payload.json>`
37
37
 
38
38
  ## 关键规则
39
39
 
@@ -62,6 +62,6 @@ yxer publish imageText 抖音 .\payload.json --publish-channel local --client-id
62
62
  ## 平台文档入口
63
63
 
64
64
  - 索引:`../platforms/imageText/index.md`
65
- - 平台细节:`../platforms/imageText/*.md`
66
-
67
- 微信公众号图文的专属字段和默认值见 [`../platforms/imageText/weixingongzhonghao.md`](../platforms/imageText/weixingongzhonghao.md)。微信公众号文章仍走 `publish article` 的独立工作流。
65
+ - 平台细节:`../platforms/imageText/*.md`
66
+
67
+ 微信公众号图文的专属字段和默认值见 [`../platforms/imageText/weixingongzhonghao.md`](../platforms/imageText/weixingongzhonghao.md)。微信公众号文章仍走 `publish article` 的独立工作流。