Skip to content

Commit

Permalink
chore: sync repo v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Aug 1, 2023
1 parent 7be5fe4 commit d1815cd
Show file tree
Hide file tree
Showing 12 changed files with 86 additions and 16 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# Changelog

## [1.1.1](https://github.com/terwer/siyuan-plugin-publisher/compare/v1.1.0...v1.1.1) (2023-08-01)
## [1.1.2](https://github.com/terwer/siyuan-plugin-publisher/compare/v1.1.1...v1.1.2) (2023-08-01)
### Bug Fixes
* 修复插件包缺失问题 ([41b5686](https://github.com/terwer/siyuan-plugin-publisher/commit/41b5686891af330d38a31d124e3f48028da8be63))
* 修复语雀客户端报错问题 ([1d72fff](https://github.com/terwer/siyuan-plugin-publisher/commit/1d72fff05cc93d5e66ec2da714e6a1f7fe2eb9d2))
### Miscellaneous
* 新增 vercel 和 nginx 构建支持 ([6fda465](https://github.com/terwer/siyuan-plugin-publisher/commit/6fda465a9c1e1200c598ff3ba6f237424c24c623))
## [1.1.1](https://github.com/terwer/siyuan-plugin-publisher/compare/v1.1.0...v1.1.1) (2023-08-01)
* 修改构建错误 ([0681ebd](https://github.com/terwer/siyuan-plugin-publisher/commit/0681ebd97572f2b6651a37c60e67669b8f9c563b))
## [1.1.0](https://github.com/terwer/siyuan-plugin-publisher/compare/v1.0.0...v1.1.0) (2023-08-01)
### Features
Expand All @@ -17,7 +22,6 @@
* 修复语雀编辑文章可能出错的问题 ([44261c9](https://github.com/terwer/siyuan-plugin-publisher/commit/44261c93fe776836ffa936b32725ae9748527f19))
* 修复语雀预览链接错误问题 ([b9620cb](https://github.com/terwer/siyuan-plugin-publisher/commit/b9620cb10b12d1a39d24cc47d06ed81f232f2013))
* 还原 cross-fetch ([7b26de0](https://github.com/terwer/siyuan-plugin-publisher/commit/7b26de09487866843a1cbca3c9695183cb22e7a9))
### Miscellaneous
* 优化代码构建 ([123a2d2](https://github.com/terwer/siyuan-plugin-publisher/commit/123a2d2013adb19fbfe7a24fbf42893e8fc361f7))
## [1.0.0](https://github.com/terwer/siyuan-plugin-publisher/compare/v0.8.0...v1.0.0) (2023-07-31)
### ⚠ BREAKING CHANGES
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ This plugin promises that the basic functions will be free forever, and the foll
- Added extended menu
- Warehouse synchronization
- Plug-in widget source code merging
- Fixed missing plugin package
- Fixed the error issue of the Wordbird client
- Added Vercel and NGINX build support

## Core Features

Expand Down
3 changes: 3 additions & 0 deletions README_zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
- 新增扩展菜单
- 仓库同步
- 插件挂件源码合并
- 修复插件包缺失问题
- 修复语雀客户端报错问题
- 新增 Vercel 和 Nginx 构建支持

## 核心特色

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "siyuan-plugin-publisher",
"version": "1.1.1",
"version": "1.1.2",
"description": "Publishing articles from siyuan-note to platforms such as Yuque, Cnblogs, WordPress, Typecho, Hexo, Hugo and more",
"repository": "terwer/siyuan-plugin-publisher",
"homepage": "https://github.com/terwer/siyuan-plugin-publisher",
Expand Down Expand Up @@ -62,7 +62,7 @@
"zhi-blog-api": "^1.20.1",
"zhi-common": "^1.11.5",
"zhi-device": "^2.3.0",
"zhi-fetch-middleware": "^0.1.20",
"zhi-fetch-middleware": "^0.2.5",
"zhi-github-middleware": "^0.1.2",
"zhi-lib-base": "^0.4.2",
"zhi-siyuan-api": "^1.29.0",
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "siyuan-plugin-publisher",
"author": "terwer",
"url": "https://github.com/terwer/siyuan-plugin-publisher",
"version": "1.1.1",
"version": "1.1.2",
"minAppVersion": "2.9.0",
"backends": [
"windows",
Expand Down
15 changes: 10 additions & 5 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 54 additions & 0 deletions scripts/build.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Copyright (c) 2023, Terwer . All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation. Terwer designates this
# particular file as subject to the "Classpath" exception as provided
# by Terwer in the LICENSE file that accompanied this code.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Terwer, Shenzhen, Guangdong, China, youweics@163.com
# or visit www.terwer.space if you need additional information or have any
# questions.

import os

import scriptutils

if __name__ == "__main__":
# Switch to the working directory.
scriptutils.switch_workdir()

# Get the current working directory.
cwd = scriptutils.get_workdir()

# 获取当前工作目录
print(os.getcwd())

os.system("pnpm pluginBuild && pnpm siyuanBuild")
dist_folder = "./dist"
data = scriptutils.read_json_file(cwd + "package.json")
v = data["version"]

src_folder = dist_folder
tmp_folder_name = "./siyuan-plugin-publisher"
build_zip_path = "./build"
build_zip_name = "siyuan-plugin-publisher-" + v + ".zip"

try:
# 压缩dist为zip
scriptutils.zip_folder(src_folder, tmp_folder_name, build_zip_path, build_zip_name)
scriptutils.cp_file(os.path.join(build_zip_path, build_zip_name), os.path.join(build_zip_path, "package.zip"))
except Exception as e:
print(f"打包错误,{str(e)}")
print("插件打包完毕.")
3 changes: 2 additions & 1 deletion src/adaptors/api/yuque/adaptor/yuqueApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import { CommonFetchClient } from "zhi-fetch-middleware"
import { createAppLogger } from "~/src/utils/appLogger.ts"
import { ObjectUtil } from "zhi-common"
import { isDev } from "~/src/utils/constants.ts"

/**
* 语雀API
Expand All @@ -50,7 +51,7 @@ export class YuqueApi {
middlewareUrl?: string
) {
this.logger = createAppLogger("yuque-api")
this.commonFetchClient = new CommonFetchClient(appInstance, baseUrl)
this.commonFetchClient = new CommonFetchClient(appInstance, baseUrl, middlewareUrl, isDev)
this.baseUrl = baseUrl
this.blogid = blogid
this.username = username
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "思源笔记发布辅助工具",
"version": "1.1.1",
"version": "1.1.2",
"manifest_version": 3,
"author": "terwer",
"icons": {
Expand Down
2 changes: 1 addition & 1 deletion src/extensions/mv2/manifest-v2-for-firefox.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "开发版 - 思源笔记发布辅助工具",
"version": "1.1.1",
"version": "1.1.2",
"manifest_version": 2,
"author": "terwer",
"icons": {
Expand Down
4 changes: 2 additions & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ const args = minimist(process.argv.slice(2))
const debugMode = false
const isServe = process.env.IS_SERVE
const isWatch = args.watch || args.w || false
// const isDev = isServe || isWatch || debugMode
const isDev = false
const isDev = isServe || isWatch || debugMode
// const isDev = false
const isWindows = process.platform === "win32"
let devDistDir = "/Users/terwer/Documents/mydocs/SiYuanWorkspace/test/data/plugins/siyuan-plugin-publisher"
// let devDistDir = "/Users/terwer/Documents/mydocs/SiYuanWorkspace/public/data/plugins/siyuan-plugin-publisher"
Expand Down
2 changes: 1 addition & 1 deletion widget.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "sy-post-publisher",
"author": "terwer",
"url": "https://github.com/terwer/sy-post-publisher",
"version": "1.1.1",
"version": "1.1.2",
"minAppVersion": "2.9.0",
"backends": [
"windows",
Expand Down

0 comments on commit d1815cd

Please sign in to comment.