@skrillex1224/chrome-article-publish-extension 1.0.8 → 1.0.9

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
@@ -42,13 +42,13 @@ The UI uses Chrome Side Panel as the primary entry. Article creation happens in
42
42
  | id | Platform | Notes |
43
43
  |---|---|---|
44
44
  | `bilibili` | Bilibili Opus | Supports cover and structured Opus payload. Tables degrade to readable text. |
45
- | `weixin` | WeChat Official Account | Supports cover, body images, summary, and security QR events. |
45
+ | `weixin` | WeChat Official Account | Supports cover, body images, description, and security QR events. |
46
46
  | `douyin` | Douyin | Requires exactly one of `article.images` URL list for image-text notes or `article.video.url` for video posts. |
47
47
  | `cnblogs` | Cnblogs | Supports article publish, tags, cover metadata. |
48
48
  | `juejin` | Juejin | Supports cover and real tag ids when the account is eligible. |
49
49
  | `baijiahao` | Baijiahao | Resolves public URLs from official page data after management status says published. |
50
50
  | `csdn` | CSDN | Supports cover/tags; account daily quota can block publish. |
51
- | `51cto` | 51CTO | Supports cover/tags/category mapping. |
51
+ | `51cto` | 51CTO | Supports cover and tags. |
52
52
  | `sohu` | Sohu | Publish/status works; platform policy can reject content. |
53
53
  | `netease` | Netease | Publish/status works; muted accounts cannot pass live publish. |
54
54
  | `toutiao` | Toutiao | Uses current creator management feed for status. |
@@ -106,7 +106,7 @@ const result = await publish({
106
106
  article: {
107
107
  title: 'My article',
108
108
  markdown: '# Heading\n\nArticle body.',
109
- summary: 'Short summary',
109
+ description: 'Short description',
110
110
  cover: 'https://example.com/cover.jpg',
111
111
  tags: ['tag-a', 'tag-b'],
112
112
  },
@@ -1,6 +1,6 @@
1
- import { P as PlatformAdapter, a as PublishOptions, A as AdapterRegistryEntry } from '../types-CwD2heJM.js';
2
- export { C as Category, D as Draft, I as ImageProgressCallback } from '../types-CwD2heJM.js';
3
- import { P as PlatformMeta, R as RuntimeInterface, A as AuthResult, a as Article, S as SyncResult, c as PublishStatusRef, d as PublishStatusResult, H as HeaderRule } from '../interface-D94XUord.js';
1
+ import { P as PlatformAdapter, a as PublishOptions, A as AdapterRegistryEntry } from '../types-DnVXM8BH.js';
2
+ export { C as Category, D as Draft, I as ImageProgressCallback } from '../types-DnVXM8BH.js';
3
+ import { P as PlatformMeta, R as RuntimeInterface, A as AuthResult, a as Article, S as SyncResult, c as PublishStatusRef, d as PublishStatusResult, H as HeaderRule } from '../interface-DsLdKJ51.js';
4
4
 
5
5
  /**
6
6
  * 适配器基类
@@ -15,7 +15,7 @@ import {
15
15
  createLogger,
16
16
  markdownToHtml,
17
17
  parseMarkdownImages
18
- } from "../chunk-CWVD3IOG.js";
18
+ } from "../chunk-23PL36OY.js";
19
19
 
20
20
  // src/adapters/base.ts
21
21
  var BaseAdapter = class {
@@ -574,7 +574,7 @@ var BaijiahaoAdapter = class extends CodeAdapter {
574
574
  original_status: "0",
575
575
  original_handler_status: "1",
576
576
  isBeautify: "false",
577
- subtitle: article.summary || "",
577
+ subtitle: article.description || "",
578
578
  bjhtopic_id: "",
579
579
  bjhtopic_info: "",
580
580
  type: "news"
@@ -2025,7 +2025,7 @@ var CnblogsAdapter = class extends CodeAdapter {
2025
2025
  isOnlyForRegisterUser: false,
2026
2026
  isUpdateDateAdded: false,
2027
2027
  entryName: null,
2028
- description: article.summary || null,
2028
+ description: article.description || null,
2029
2029
  featuredImage: cover,
2030
2030
  tags: this.resolveTags(article),
2031
2031
  password: null,
@@ -2469,7 +2469,7 @@ var CSDNAdapter = class extends CodeAdapter {
2469
2469
  type: "original",
2470
2470
  original_link: "",
2471
2471
  authorized_status: false,
2472
- Description: article.summary || "",
2472
+ Description: article.description || "",
2473
2473
  resource_url: "",
2474
2474
  not_auto_saved: "1",
2475
2475
  source: "pc_mdeditor",
@@ -2876,7 +2876,7 @@ var Cto51Adapter = class extends CodeAdapter {
2876
2876
  cate_id: category.cateId,
2877
2877
  custom_id: "0",
2878
2878
  tag: this.resolveTags(article),
2879
- abstract: article.summary || "",
2879
+ abstract: article.description || "",
2880
2880
  banner_type: coverUrls.length ? "1" : "0",
2881
2881
  blog_type: "1",
2882
2882
  copy_code: "1",
@@ -3320,8 +3320,8 @@ function buildPublishItem(images, textPayload) {
3320
3320
  };
3321
3321
  }
3322
3322
  function extractCaptionText(article, context) {
3323
- const summary = article.summary?.trim();
3324
- const source = summary || context.extractBodyText(article);
3323
+ const description = article.description?.trim();
3324
+ const source = description || context.extractBodyText(article);
3325
3325
  return context.normalizeText(source).replace(/\n+/g, " ").trim();
3326
3326
  }
3327
3327
  async function resolveArticleTags(article, context) {
@@ -3605,8 +3605,8 @@ async function buildVideoTextPayload(article, context) {
3605
3605
  };
3606
3606
  }
3607
3607
  function extractVideoCaptionText(article, context) {
3608
- const summary = article.summary?.trim();
3609
- const source = summary || context.extractBodyText(article);
3608
+ const description = article.description?.trim();
3609
+ const source = description || context.extractBodyText(article);
3610
3610
  return context.normalizeText(source).replace(/\n+/g, " ").trim();
3611
3611
  }
3612
3612
 
@@ -4576,7 +4576,7 @@ var JuejinAdapter = class extends CodeAdapter {
4576
4576
  const tagIds = await this.resolveTagIds(categoryId, article.tags);
4577
4577
  const coverImage = article.cover ? (await this.uploadImageByUrl(article.cover)).url : "";
4578
4578
  const draftPayload = {
4579
- brief_content: article.summary || "",
4579
+ brief_content: article.description || "",
4580
4580
  category_id: categoryId,
4581
4581
  cover_image: coverImage,
4582
4582
  edit_type: 10,
@@ -5527,7 +5527,7 @@ var SohuAdapter = class extends CodeAdapter {
5527
5527
  const cover = article.cover ? (await this.uploadImageByUrl(article.cover)).url : "";
5528
5528
  const postData = {
5529
5529
  title: article.title,
5530
- brief: article.summary || "",
5530
+ brief: article.description || "",
5531
5531
  content,
5532
5532
  channelId: 24,
5533
5533
  categoryId: -1,
@@ -5793,13 +5793,13 @@ var TencentAdapter = class extends CodeAdapter {
5793
5793
  }
5794
5794
  const prepared = await this.prepareArticleContent(article, options);
5795
5795
  const cover = article.cover ? await this.uploadCoverByUrl(article.cover) : null;
5796
- const summary = article.summary || prepared.pureText;
5796
+ const abstractText = article.description || prepared.pureText;
5797
5797
  const payload = {
5798
5798
  title: article.title,
5799
5799
  title2: "",
5800
5800
  type: "0",
5801
5801
  content: prepared.content,
5802
- abstract: summary,
5802
+ abstract: abstractText,
5803
5803
  tag: (article.tags || []).join(","),
5804
5804
  video: "",
5805
5805
  cover_type: cover ? 1 : 0,
@@ -6134,7 +6134,7 @@ var ToutiaoAdapter = class extends CodeAdapter {
6134
6134
  article_type: "0",
6135
6135
  content,
6136
6136
  title: article.title,
6137
- search_creation_info: JSON.stringify({ searchTopOne: 0, abstract: article.summary || "", clue_id: "" }),
6137
+ search_creation_info: JSON.stringify({ searchTopOne: 0, abstract: article.description || "", clue_id: "" }),
6138
6138
  title_id: titleId,
6139
6139
  mp_editor_stat: "{}",
6140
6140
  is_refute_rumor: "0",
@@ -6665,8 +6665,8 @@ var WeixinAdapter = class extends CodeAdapter {
6665
6665
  author0: "",
6666
6666
  writerid0: "0",
6667
6667
  fileid0: cover.fileId || "",
6668
- digest0: article.summary || "",
6669
- auto_gen_digest0: article.summary ? "0" : "1",
6668
+ digest0: article.description || "",
6669
+ auto_gen_digest0: article.description ? "0" : "1",
6670
6670
  content0: content,
6671
6671
  sourceurl0: "",
6672
6672
  need_open_comment0: "1",
@@ -7467,4 +7467,4 @@ export {
7467
7467
  ToutiaoAdapter,
7468
7468
  WeixinAdapter
7469
7469
  };
7470
- //# sourceMappingURL=chunk-CWVD3IOG.js.map
7470
+ //# sourceMappingURL=chunk-23PL36OY.js.map