Skip to content

Commit f972ead

Browse files
committed
feat(settings): Remove unused dependency and settings config.
1 parent f5e0943 commit f972ead

File tree

10 files changed

+28
-579
lines changed

10 files changed

+28
-579
lines changed

.github/workflows/auto-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
with:
3939
node-version: ${{ matrix.node-version }}
4040
- run: npm install
41-
- run: npm run build2
41+
- run: npm run build
4242
- uses: actions/upload-artifact@v2
4343
with:
4444
name: my-dist

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
with:
4242
node-version: ${{ matrix.node-version }}
4343
- run: npm install
44-
- run: npm run build2
44+
- run: npm run build
4545
- name: Create Release
4646
id: create_release
4747
uses: actions/create-release@v1

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "invio",
33
"name": "Invio",
4-
"version": "0.1.3",
4+
"version": "0.1.4",
55
"minAppVersion": "0.13.21",
66
"description": "Invio is a plugin for Obsidian which lets you export docs as HTML websites / webpages. It is similar to publish, but you get the .html files to your own COS and then you can do whatever you want with. Its goal is to support as many features of obsidian possible including themes, dataview, graph view, and more.",
77
"author": "frontend-engineering",

package.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@
33
"version": "0.1.3",
44
"description": "Publish your obsidian docs to COS.",
55
"scripts": {
6-
"dev2": "node esbuild.config.mjs",
7-
"build2": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
8-
"build": "webpack --mode production",
9-
"dev": "webpack --mode development --watch",
6+
"dev": "node esbuild.config.mjs",
7+
"build": "tsc -noEmit -skipLibCheck && node esbuild.config.mjs production",
108
"format": "npx prettier --write .",
119
"clean": "npx rimraf main.js",
1210
"test": "cross-env TS_NODE_COMPILER_OPTIONS={\\\"module\\\":\\\"commonjs\\\"} mocha -r ts-node/register 'tests/**/*.ts'"
@@ -51,9 +49,7 @@
5149
"ts-node": "^10.7.0",
5250
"tslib": "2.4.0",
5351
"typescript": "4.7.4",
54-
"webdav-server": "^2.6.2",
55-
"webpack": "^5.72.0",
56-
"webpack-cli": "^4.9.2"
52+
"webdav-server": "^2.6.2"
5753
},
5854
"dependencies": {
5955
"@aws-sdk/client-s3": "^3.81.0",

pnpm-lock.yaml

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

src/langs/en.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,10 @@
264264
"settings_outputbasepathvaultid": "Output Vault Base Path And Randomly Assigned ID",
265265
"settings_outputbasepathvaultid_desc": "For debugging purposes.",
266266
"settings_outputbasepathvaultid_button": "Output",
267-
"settings_resetcache": "Reset Local Internal Cache/Databases",
268-
"settings_resetcache_desc": "Reset local internal caches/databases (for debugging purposes). You would want to reload the plugin after resetting this. This option will not empty the {s3, password...} settings.",
267+
"settings_resetcache": "Reset Local Syncing Cache",
268+
"settings_resetcache_desc": "Reset local syncing caches data (if syncing went wrong or debug). This option will not delete your local settings like password or other COS config.",
269269
"settings_resetcache_button": "Reset",
270-
"settings_resetcache_notice": "Local internal cache/databases deleted. Please manually reload the plugin.",
270+
"settings_resetcache_notice": "Local syncing cache deleted. Please manually reload the plugin.",
271271

272272
"syncalgov2_title": "Invio has a better sync algorithm",
273273
"syncalgov2_texts": "Welcome to Invio!\nIn addition to your notes, it also requires uploading additional files with metadata (_invio-metadata-on-remote.{json,bin}) to your cloud service COS. By reading this information, another device can determine which files or folders have been deleted on the first device.\nIf you agree with this policy, please click the 'Agree' button and start enjoying this plugin! Please note that before using the plugin, it's important to back up your vault.\nIf you do not agree with this policy, you should stop using this version and any future versions of Invio. After clicking 'Disagree', the plugin will automatically stop running (unload), and you will need to manually disable it in Obsidian settings.\nPlease let me know if there is anything else I can assist you with!",

src/langs/zh_cn.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,10 @@
263263
"settings_outputbasepathvaultid": "输出资料库对应的位置和随机分配的 ID",
264264
"settings_outputbasepathvaultid_desc": "用于调试。",
265265
"settings_outputbasepathvaultid_button": "输出",
266-
"settings_resetcache": "重设本地缓存和数据库",
267-
"settings_resetcache_desc": "(出于调试原因)重设本地缓存和数据库。您需要在重设之后重新载入此插件。本重设不会删除 s3,密码……等设定。",
266+
"settings_resetcache": "清空本地同步缓存数据",
267+
"settings_resetcache_desc": "清除本地同步产生的缓存数据,遇到同步问题或者调试时使用。(不会清除密码等本地配置)",
268268
"settings_resetcache_button": "重设",
269-
"settings_resetcache_notice": "本地同步缓存和数据库已被删除。请手动重新载入此插件",
269+
"settings_resetcache_notice": "本地同步缓存数据已删除。请手动重新加载插件",
270270

271271
"syncalgov2_title": "Invio 的同步算法",
272272
"syncalgov2_texts": "欢迎使用 Invio!\n 除了您的笔记之外,它还需要上传额外的带有元信息的文件 _invio-metadata-on-remote.{json,bin} 到您的云服务COS上。\n通过读取这些信息,另一台设备可以知道什么文件或文件夹在第一台设备上被删除了。\n如果您同意此策略,请点击按钮 \"同意\",然后开始享用此插件!且特别要注意:使用插件之前,请首先备份好您的库(Vault)!\n如果您不同意此策略,您应该停止使用此版本和之后版本的 Invio。点击 \"不同意\" 之后,插件会自动停止运行(unload),然后您需要 Obsidian 设置里手动停用(disable)此插件。",

src/langs/zh_tw.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,10 @@
263263
"settings_outputbasepathvaultid": "輸出資料庫對應的位置和隨機分配的 ID",
264264
"settings_outputbasepathvaultid_desc": "用於除錯。",
265265
"settings_outputbasepathvaultid_button": "輸出",
266-
"settings_resetcache": "重設本地快取和資料庫",
267-
"settings_resetcache_desc": "(出於除錯原因)重設本地快取和資料庫。您需要在重設之後重新載入此外掛。本重設不會刪除 s3,密碼……等設定。",
266+
"settings_resetcache": "清空本地同步缓存数据",
267+
"settings_resetcache_desc": "清除本地同步产生的缓存数据,遇到同步问题或者调试时使用。(不会清除密码等本地配置)",
268268
"settings_resetcache_button": "重設",
269-
"settings_resetcache_notice": "本地同步快取和資料庫已被刪除。請手動重新載入此外掛",
269+
"settings_resetcache_notice": "本地同步数据已刪除。請手動重新載入外掛",
270270

271271
"syncalgov2_title": "Invio 的同步算法",
272272
"syncalgov2_texts": "歡迎使用 Invio!除了您的筆記之外,它還需要上傳額外帶有元資訊的檔案 _invio-metadata-on-remote.{json,bin} 到您的雲服務 COS 上。通過讀取這些資訊,另一台設備可以知道在第一台設備上被刪除了哪些檔案或資料夾。如果您同意此策略,請點擊按鈕 \"同意\",然後開始享用此插件!特別要注意:在使用插件之前,請先好好備份您的庫(Vault)!如果您不同意此策略,您應該停止使用此版本和之後的 Invio。點擊 \"不同意\" 之後,插件會自動停止運行(unload),然後您需要在 Obsidian 設定中手動停用(disable)此插件。",

src/settings.ts

Lines changed: 0 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -894,151 +894,6 @@ export class InvioSettingTab extends PluginSettingTab {
894894
const debugDiv = containerEl.createEl("div");
895895
debugDiv.createEl("h2", { text: t("settings_debug") });
896896

897-
new Setting(debugDiv)
898-
.setName(t("settings_debuglevel"))
899-
.setDesc(t("settings_debuglevel_desc"))
900-
.addDropdown(async (dropdown) => {
901-
dropdown.addOption("info", "info");
902-
dropdown.addOption("debug", "debug");
903-
dropdown
904-
.setValue(this.plugin.settings.currLogLevel)
905-
.onChange(async (val: string) => {
906-
this.plugin.settings.currLogLevel = val;
907-
log.setLevel(val as any);
908-
await this.plugin.saveSettings();
909-
log.info(`the log level is changed to ${val}`);
910-
});
911-
});
912-
913-
new Setting(debugDiv)
914-
.setName(t("settings_outputsettingsconsole"))
915-
.setDesc(t("settings_outputsettingsconsole_desc"))
916-
.addButton(async (button) => {
917-
button.setButtonText(t("settings_outputsettingsconsole_button"));
918-
button.onClick(async () => {
919-
const c = messyConfigToNormal(await this.plugin.loadData());
920-
log.info(c);
921-
new Notice(t("settings_outputsettingsconsole_notice"));
922-
});
923-
});
924-
925-
new Setting(debugDiv)
926-
.setName(t("settings_syncplans"))
927-
.setDesc(t("settings_syncplans_desc"))
928-
.addButton(async (button) => {
929-
button.setButtonText(t("settings_syncplans_button_json"));
930-
button.onClick(async () => {
931-
await exportVaultSyncPlansToFiles(
932-
this.plugin.db,
933-
this.app.vault,
934-
this.plugin.vaultRandomID,
935-
"json"
936-
);
937-
new Notice(t("settings_syncplans_notice"));
938-
});
939-
})
940-
.addButton(async (button) => {
941-
button.setButtonText(t("settings_syncplans_button_table"));
942-
button.onClick(async () => {
943-
await exportVaultSyncPlansToFiles(
944-
this.plugin.db,
945-
this.app.vault,
946-
this.plugin.vaultRandomID,
947-
"table"
948-
);
949-
new Notice(t("settings_syncplans_notice"));
950-
});
951-
});
952-
new Setting(debugDiv)
953-
.setName(t("settings_delsyncplans"))
954-
.setDesc(t("settings_delsyncplans_desc"))
955-
.addButton(async (button) => {
956-
button.setButtonText(t("settings_delsyncplans_button"));
957-
button.onClick(async () => {
958-
await clearAllSyncPlanRecords(this.plugin.db);
959-
new Notice(t("settings_delsyncplans_notice"));
960-
});
961-
});
962-
963-
new Setting(debugDiv)
964-
.setName(t("settings_logtodb"))
965-
.setDesc(t("settings_logtodb_desc"))
966-
.addDropdown(async (dropdown) => {
967-
dropdown.addOption("enable", t("enable"));
968-
dropdown.addOption("disable", t("disable"));
969-
dropdown
970-
.setValue(this.plugin.settings.logToDB ? "enable" : "disable")
971-
.onChange(async (val: string) => {
972-
const logToDB = val === "enable";
973-
if (logToDB) {
974-
applyLogWriterInplace((...msg: any[]) => {
975-
insertLoggerOutputByVault(
976-
this.plugin.db,
977-
this.plugin.vaultRandomID,
978-
...msg
979-
);
980-
});
981-
} else {
982-
restoreLogWritterInplace();
983-
}
984-
clearExpiredLoggerOutputRecords(this.plugin.db);
985-
this.plugin.settings.logToDB = logToDB;
986-
await this.plugin.saveSettings();
987-
});
988-
});
989-
990-
new Setting(debugDiv)
991-
.setName(t("settings_logtodbexport"))
992-
.setDesc(
993-
t("settings_logtodbexport_desc", {
994-
debugFolder: DEFAULT_DEBUG_FOLDER,
995-
})
996-
)
997-
.addButton(async (button) => {
998-
button.setButtonText(t("settings_logtodbexport_button"));
999-
button.onClick(async () => {
1000-
await exportVaultLoggerOutputToFiles(
1001-
this.plugin.db,
1002-
this.app.vault,
1003-
this.plugin.vaultRandomID
1004-
);
1005-
new Notice(t("settings_logtodbexport_notice"));
1006-
});
1007-
});
1008-
1009-
new Setting(debugDiv)
1010-
.setName(t("settings_logtodbclear"))
1011-
.setDesc(t("settings_logtodbclear_desc"))
1012-
.addButton(async (button) => {
1013-
button.setButtonText(t("settings_logtodbclear_button"));
1014-
button.onClick(async () => {
1015-
await clearAllLoggerOutputRecords(this.plugin.db);
1016-
new Notice(t("settings_logtodbclear_notice"));
1017-
});
1018-
});
1019-
1020-
new Setting(debugDiv)
1021-
.setName(t("settings_delsyncmap"))
1022-
.setDesc(t("settings_delsyncmap_desc"))
1023-
.addButton(async (button) => {
1024-
button.setButtonText(t("settings_delsyncmap_button"));
1025-
button.onClick(async () => {
1026-
await clearAllSyncMetaMapping(this.plugin.db);
1027-
new Notice(t("settings_delsyncmap_notice"));
1028-
});
1029-
});
1030-
1031-
new Setting(debugDiv)
1032-
.setName(t("settings_outputbasepathvaultid"))
1033-
.setDesc(t("settings_outputbasepathvaultid_desc"))
1034-
.addButton(async (button) => {
1035-
button.setButtonText(t("settings_outputbasepathvaultid_button"));
1036-
button.onClick(async () => {
1037-
new Notice(this.plugin.getVaultBasePath());
1038-
new Notice(this.plugin.vaultRandomID);
1039-
});
1040-
});
1041-
1042897
new Setting(debugDiv)
1043898
.setName(t("settings_resetcache"))
1044899
.setDesc(t("settings_resetcache_desc"))

webpack.config.js

Lines changed: 0 additions & 88 deletions
This file was deleted.

0 commit comments

Comments
 (0)