- Thinning of this repository through the creation of a library of universal functions
This commit is contained in:
vorotamoroz
2024-07-01 06:12:23 +01:00
parent 5c86966d89
commit a23fc866c0
6 changed files with 29 additions and 7 deletions
+21
View File
@@ -18,6 +18,7 @@
"fflate": "^0.8.2",
"idb": "^8.0.0",
"minimatch": "^9.0.3",
"octagonal-wheels": "^0.1.10",
"xxhash-wasm": "0.4.2",
"xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2"
},
@@ -4859,6 +4860,16 @@
"@codemirror/view": "^6.0.0"
}
},
"node_modules/octagonal-wheels": {
"version": "0.1.10",
"resolved": "https://registry.npmjs.org/octagonal-wheels/-/octagonal-wheels-0.1.10.tgz",
"integrity": "sha512-mqcKwPALIJv2Zlu6WQiaGZMgVdAXYm7Dw47th9px1T3B9/W//IbygqBvIQry/A77P4nIlHBbYJrzy4Tp1X7JRA==",
"dependencies": {
"idb": "^8.0.0",
"xxhash-wasm": "0.4.2",
"xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2"
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@@ -9995,6 +10006,16 @@
"moment": "2.29.4"
}
},
"octagonal-wheels": {
"version": "0.1.10",
"resolved": "https://registry.npmjs.org/octagonal-wheels/-/octagonal-wheels-0.1.10.tgz",
"integrity": "sha512-mqcKwPALIJv2Zlu6WQiaGZMgVdAXYm7Dw47th9px1T3B9/W//IbygqBvIQry/A77P4nIlHBbYJrzy4Tp1X7JRA==",
"requires": {
"idb": "^8.0.0",
"xxhash-wasm": "0.4.2",
"xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2"
}
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+1
View File
@@ -64,6 +64,7 @@
"fflate": "^0.8.2",
"idb": "^8.0.0",
"minimatch": "^9.0.3",
"octagonal-wheels": "^0.1.10",
"xxhash-wasm": "0.4.2",
"xxhash-wasm-102": "npm:xxhash-wasm@^1.0.2"
}
+1 -1
Submodule src/lib updated: acad314d1a...41f1a0c737
+1 -1
View File
@@ -2,7 +2,7 @@ const isDebug = false;
import { type Diff, DIFF_DELETE, DIFF_EQUAL, DIFF_INSERT, diff_match_patch, stringifyYaml, parseYaml } from "./deps";
import { Notice, Plugin, TFile, addIcon, TFolder, normalizePath, TAbstractFile, Editor, MarkdownView, type RequestUrlParam, type RequestUrlResponse, requestUrl, type MarkdownFileInfo } from "./deps";
import { type EntryDoc, type LoadedEntry, type ObsidianLiveSyncSettings, type diff_check_result, type diff_result_leaf, type EntryBody, LOG_LEVEL, VER, DEFAULT_SETTINGS, type diff_result, FLAGMD_REDFLAG, SYNCINFO_ID, SALT_OF_PASSPHRASE, type ConfigPassphraseStore, type CouchDBConnection, FLAGMD_REDFLAG2, FLAGMD_REDFLAG3, PREFIXMD_LOGFILE, type DatabaseConnectingStatus, type EntryHasPath, type DocumentID, type FilePathWithPrefix, type FilePath, type AnyEntry, LOG_LEVEL_DEBUG, LOG_LEVEL_INFO, LOG_LEVEL_NOTICE, LOG_LEVEL_URGENT, LOG_LEVEL_VERBOSE, type SavingEntry, MISSING_OR_ERROR, NOT_CONFLICTED, AUTO_MERGED, CANCELLED, LEAVE_TO_SUBSEQUENT, FLAGMD_REDFLAG2_HR, FLAGMD_REDFLAG3_HR, REMOTE_MINIO, REMOTE_COUCHDB, type BucketSyncSetting, TweakValuesShouldMatchedTemplate, confName, type TweakValues, } from "./lib/src/common/types.ts";
import { type EntryDoc, type LoadedEntry, type ObsidianLiveSyncSettings, type diff_check_result, type diff_result_leaf, type EntryBody, type LOG_LEVEL, VER, DEFAULT_SETTINGS, type diff_result, FLAGMD_REDFLAG, SYNCINFO_ID, SALT_OF_PASSPHRASE, type ConfigPassphraseStore, type CouchDBConnection, FLAGMD_REDFLAG2, FLAGMD_REDFLAG3, PREFIXMD_LOGFILE, type DatabaseConnectingStatus, type EntryHasPath, type DocumentID, type FilePathWithPrefix, type FilePath, type AnyEntry, LOG_LEVEL_DEBUG, LOG_LEVEL_INFO, LOG_LEVEL_NOTICE, LOG_LEVEL_URGENT, LOG_LEVEL_VERBOSE, type SavingEntry, MISSING_OR_ERROR, NOT_CONFLICTED, AUTO_MERGED, CANCELLED, LEAVE_TO_SUBSEQUENT, FLAGMD_REDFLAG2_HR, FLAGMD_REDFLAG3_HR, REMOTE_MINIO, REMOTE_COUCHDB, type BucketSyncSetting, TweakValuesShouldMatchedTemplate, confName, type TweakValues, } from "./lib/src/common/types.ts";
import { type InternalFileInfo, type CacheData, type FileEventItem } from "./common/types.ts";
import { arrayToChunkedArray, createBlob, determineTypeFromBlob, escapeMarkdownValue, extractObject, fireAndForget, getDocData, isAnyNote, isDocContentSame, isObjectDifferent, readContent, sendValue, throttle, type SimpleStore } from "./lib/src/common/utils.ts";
import { Logger, setGlobalLogFunction } from "./lib/src/common/logger.ts";
+1 -1
View File
@@ -43,7 +43,7 @@ export class JsonResolveModal extends Modal {
nameA: this.nameA,
nameB: this.nameB,
defaultSelect: this.defaultSelect,
callback: (keepRev, mergedStr) => this.UICallback(keepRev, mergedStr),
callback: (keepRev: string | undefined, mergedStr: string | undefined) => this.UICallback(keepRev, mergedStr),
},
});
}
+4 -4
View File
@@ -1702,7 +1702,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
{
target: patSetting.controlEl,
props: {
patterns: pat, originals: [...pat], apply: async (newPatterns) => {
patterns: pat, originals: [...pat], apply: async (newPatterns: string[]) => {
this.editingSettings.syncInternalFilesIgnorePatterns = newPatterns.map(e => e.trim()).filter(e => e != "").join(", ");
await this.saveAllDirtySettings();
this.display();
@@ -1785,8 +1785,8 @@ However, your report is needed to stabilise this. I appreciate you for your grea
props: {
patterns: this.editingSettings.syncOnlyRegEx.split("|[]|"),
originals: [...this.editingSettings.syncOnlyRegEx.split("|[]|")],
apply: async (newPatterns) => {
this.editingSettings.syncOnlyRegEx = newPatterns.map(e => e.trim()).filter(e => e != "").join("|[]|");
apply: async (newPatterns: string[]) => {
this.editingSettings.syncOnlyRegEx = newPatterns.map((e: string) => e.trim()).filter(e => e != "").join("|[]|");
await this.saveAllDirtySettings();
this.display();
}
@@ -1805,7 +1805,7 @@ However, your report is needed to stabilise this. I appreciate you for your grea
props: {
patterns: this.editingSettings.syncIgnoreRegEx.split("|[]|"),
originals: [...this.editingSettings.syncIgnoreRegEx.split("|[]|")],
apply: async (newPatterns) => {
apply: async (newPatterns: string[]) => {
this.editingSettings.syncIgnoreRegEx = newPatterns.map(e => e.trim()).filter(e => e != "").join("|[]|");
await this.saveAllDirtySettings();
this.display();