Skip to content

Commit 76d2762

Browse files
authored
Merge pull request #92 from terwer/dev
chore: sync repo v1.1.2
2 parents ac6f440 + d1815cd commit 76d2762

File tree

13 files changed

+89
-38
lines changed

13 files changed

+89
-38
lines changed

CHANGELOG.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
# Changelog
22

3-
## [0.10.0](https://github.com/terwer/sy-post-publisher/compare/v0.9.0...v0.10.0) (2023-08-01)
4-
### Features
5-
* 插件挂件源码合并 https://github.com/terwer/sy-post-publisher/issues/89 https://github.com/terwer/siyuan-plugin-publisher/issues/522 ([c18023f](https://github.com/terwer/siyuan-plugin-publisher/commit/c18023f3c9c9a649e1d08a84d89673d29b2a29db))
3+
## [1.1.2](https://github.com/terwer/siyuan-plugin-publisher/compare/v1.1.1...v1.1.2) (2023-08-01)
64
### Bug Fixes
7-
* [#83](https://github.com/terwer/siyuan-plugin-publisher/issues/83) 多平台分发需要考虑同步更新思源笔记 ([103203d](https://github.com/terwer/siyuan-plugin-publisher/commit/103203d3ad867991f0d86909fcb82bcc2f0cd7ad))
8-
* 修复发布更新状态判断错误的问题 ([cbc271e](https://github.com/terwer/sy-post-publisher/commit/cbc271ee793bb2bfd052ec6971b07b71abd9876f))
9-
* 修改构建错误 ([0681ebd](https://github.com/terwer/siyuan-plugin-publisher/commit/0681ebd97572f2b6651a37c60e67669b8f9c563b))
5+
* 修复插件包缺失问题 ([41b5686](https://github.com/terwer/siyuan-plugin-publisher/commit/41b5686891af330d38a31d124e3f48028da8be63))
6+
* 修复语雀客户端报错问题 ([1d72fff](https://github.com/terwer/siyuan-plugin-publisher/commit/1d72fff05cc93d5e66ec2da714e6a1f7fe2eb9d2))
107
### Miscellaneous
11-
* sync repo v1.1.1 ([23b0c85](https://github.com/terwer/sy-post-publisher/commit/23b0c852aae9e7981b8d3cd3ec53b061c975064f))
8+
* 新增 vercel 和 nginx 构建支持 ([6fda465](https://github.com/terwer/siyuan-plugin-publisher/commit/6fda465a9c1e1200c598ff3ba6f237424c24c623))
129
## [1.1.1](https://github.com/terwer/siyuan-plugin-publisher/compare/v1.1.0...v1.1.1) (2023-08-01)
10+
* 修改构建错误 ([0681ebd](https://github.com/terwer/siyuan-plugin-publisher/commit/0681ebd97572f2b6651a37c60e67669b8f9c563b))
1311
## [1.1.0](https://github.com/terwer/siyuan-plugin-publisher/compare/v1.0.0...v1.1.0) (2023-08-01)
12+
### Features
13+
* [#83](https://github.com/terwer/siyuan-plugin-publisher/issues/83) 多平台分发需要考虑同步更新思源笔记 ([103203d](https://github.com/terwer/siyuan-plugin-publisher/commit/103203d3ad867991f0d86909fcb82bcc2f0cd7ad))
1414
* 仓库同步 ([7960387](https://github.com/terwer/siyuan-plugin-publisher/commit/7960387d1d11216d5bd072db4d26735cf277f048))
15+
* 插件挂件源码合并 https://github.com/terwer/sy-post-publisher/issues/89 https://github.com/terwer/siyuan-plugin-publisher/issues/522 ([c18023f](https://github.com/terwer/siyuan-plugin-publisher/commit/c18023f3c9c9a649e1d08a84d89673d29b2a29db))
1516
* 整合挂件功能 ([61c83c7](https://github.com/terwer/siyuan-plugin-publisher/commit/61c83c756c965235eed576a3c6f4e75cee3972f9))
1617
* 新增扩展菜单 ([6fb007d](https://github.com/terwer/siyuan-plugin-publisher/commit/6fb007df7b04ee212065eb2135903e01a2ab5637))
1718
* 修复 cross-fetch 版本问题,必须使用 cross-fetch 3 ([69b33dc](https://github.com/terwer/siyuan-plugin-publisher/commit/69b33dca0f04da05113dab530e03b23d1082c2b8))

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ This plugin promises that the basic functions will be free forever, and the foll
2424
- Added extended menu
2525
- Warehouse synchronization
2626
- Plug-in widget source code merging
27+
- Fixed missing plugin package
28+
- Fixed the error issue of the Wordbird client
29+
- Added Vercel and NGINX build support
2730

2831
## Core Features
2932

README_zh_CN.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@
2222
- 新增扩展菜单
2323
- 仓库同步
2424
- 插件挂件源码合并
25+
- 修复插件包缺失问题
26+
- 修复语雀客户端报错问题
27+
- 新增 Vercel 和 Nginx 构建支持
2528

2629
## 核心特色
2730

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "siyuan-plugin-publisher",
3-
"version": "0.10.0",
3+
"version": "1.1.2",
44
"description": "Publishing articles from siyuan-note to platforms such as Yuque, Cnblogs, WordPress, Typecho, Hexo, Hugo and more",
55
"repository": "terwer/siyuan-plugin-publisher",
66
"homepage": "https://github.com/terwer/siyuan-plugin-publisher",
@@ -9,7 +9,7 @@
99
"scripts": {
1010
"serve": "python scripts/serve.py",
1111
"dev": "python scripts/dev.py",
12-
"build": "pnpm pluginBuild && pnpm siyuanBuild",
12+
"build": "python scripts/build.py",
1313
"pluginBuild": "python scripts/plugin_build.py",
1414
"siyuanBuild": "python scripts/siyuan_build.py",
1515
"vercelBuild": "python3 scripts/vercel_build.py",
@@ -62,7 +62,7 @@
6262
"zhi-blog-api": "^1.20.1",
6363
"zhi-common": "^1.11.5",
6464
"zhi-device": "^2.3.0",
65-
"zhi-fetch-middleware": "^0.1.20",
65+
"zhi-fetch-middleware": "^0.2.5",
6666
"zhi-github-middleware": "^0.1.2",
6767
"zhi-lib-base": "^0.4.2",
6868
"zhi-siyuan-api": "^1.29.0",

plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "siyuan-plugin-publisher",
33
"author": "terwer",
44
"url": "https://github.com/terwer/siyuan-plugin-publisher",
5-
"version": "0.10.0",
5+
"version": "1.1.2",
66
"minAppVersion": "2.9.0",
77
"backends": [
88
"windows",

pnpm-lock.yaml

Lines changed: 10 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/build.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright (c) 2023, Terwer . All rights reserved.
2+
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3+
#
4+
# This code is free software; you can redistribute it and/or modify it
5+
# under the terms of the GNU General Public License version 2 only, as
6+
# published by the Free Software Foundation. Terwer designates this
7+
# particular file as subject to the "Classpath" exception as provided
8+
# by Terwer in the LICENSE file that accompanied this code.
9+
#
10+
# This code is distributed in the hope that it will be useful, but WITHOUT
11+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12+
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13+
# version 2 for more details (a copy is included in the LICENSE file that
14+
# accompanied this code).
15+
#
16+
# You should have received a copy of the GNU General Public License version
17+
# 2 along with this work; if not, write to the Free Software Foundation,
18+
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
19+
#
20+
# Please contact Terwer, Shenzhen, Guangdong, China, [email protected]
21+
# or visit www.terwer.space if you need additional information or have any
22+
# questions.
23+
24+
import os
25+
26+
import scriptutils
27+
28+
if __name__ == "__main__":
29+
# Switch to the working directory.
30+
scriptutils.switch_workdir()
31+
32+
# Get the current working directory.
33+
cwd = scriptutils.get_workdir()
34+
35+
# 获取当前工作目录
36+
print(os.getcwd())
37+
38+
os.system("pnpm pluginBuild && pnpm siyuanBuild")
39+
dist_folder = "./dist"
40+
data = scriptutils.read_json_file(cwd + "package.json")
41+
v = data["version"]
42+
43+
src_folder = dist_folder
44+
tmp_folder_name = "./siyuan-plugin-publisher"
45+
build_zip_path = "./build"
46+
build_zip_name = "siyuan-plugin-publisher-" + v + ".zip"
47+
48+
try:
49+
# 压缩dist为zip
50+
scriptutils.zip_folder(src_folder, tmp_folder_name, build_zip_path, build_zip_name)
51+
scriptutils.cp_file(os.path.join(build_zip_path, build_zip_name), os.path.join(build_zip_path, "package.zip"))
52+
except Exception as e:
53+
print(f"打包错误,{str(e)}")
54+
print("插件打包完毕.")

scripts/plugin_build.py

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,3 @@
3636
print(os.getcwd())
3737

3838
os.system("zhi-build --production")
39-
dist_folder = "./dist"
40-
data = scriptutils.read_json_file(cwd + "package.json")
41-
v = data["version"]
42-
43-
src_folder = dist_folder
44-
tmp_folder_name = "./siyuan-plugin-publisher"
45-
build_zip_path = "./build"
46-
build_zip_name = "siyuan-plugin-publisher-" + v + ".zip"
47-
48-
try:
49-
# 压缩dist为zip
50-
scriptutils.zip_folder(src_folder, tmp_folder_name, build_zip_path, build_zip_name)
51-
scriptutils.cp_file(os.path.join(build_zip_path, build_zip_name), os.path.join(build_zip_path, "package.zip"))
52-
except Exception as e:
53-
print(f"打包错误,{str(e)}")
54-
print("插件打包完毕.")

src/adaptors/api/yuque/adaptor/yuqueApi.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import { CommonFetchClient } from "zhi-fetch-middleware"
2727
import { createAppLogger } from "~/src/utils/appLogger.ts"
2828
import { ObjectUtil } from "zhi-common"
29+
import { isDev } from "~/src/utils/constants.ts"
2930

3031
/**
3132
* 语雀API
@@ -50,7 +51,7 @@ export class YuqueApi {
5051
middlewareUrl?: string
5152
) {
5253
this.logger = createAppLogger("yuque-api")
53-
this.commonFetchClient = new CommonFetchClient(appInstance, baseUrl)
54+
this.commonFetchClient = new CommonFetchClient(appInstance, baseUrl, middlewareUrl, isDev)
5455
this.baseUrl = baseUrl
5556
this.blogid = blogid
5657
this.username = username

src/extensions/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "思源笔记发布辅助工具",
3-
"version": "0.10.0",
3+
"version": "1.1.2",
44
"manifest_version": 3,
55
"author": "terwer",
66
"icons": {

0 commit comments

Comments
 (0)