mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Converted models and services to TypeScript
This commit is contained in:
parent
c895f7cd4f
commit
86610e7561
@ -981,12 +981,51 @@ packages/lib/markupLanguageUtils.js.map
|
||||
packages/lib/models/Alarm.d.ts
|
||||
packages/lib/models/Alarm.js
|
||||
packages/lib/models/Alarm.js.map
|
||||
packages/lib/models/BaseItem.d.ts
|
||||
packages/lib/models/BaseItem.js
|
||||
packages/lib/models/BaseItem.js.map
|
||||
packages/lib/models/Folder.d.ts
|
||||
packages/lib/models/Folder.js
|
||||
packages/lib/models/Folder.js.map
|
||||
packages/lib/models/ItemChange.d.ts
|
||||
packages/lib/models/ItemChange.js
|
||||
packages/lib/models/ItemChange.js.map
|
||||
packages/lib/models/MasterKey.d.ts
|
||||
packages/lib/models/MasterKey.js
|
||||
packages/lib/models/MasterKey.js.map
|
||||
packages/lib/models/Migration.d.ts
|
||||
packages/lib/models/Migration.js
|
||||
packages/lib/models/Migration.js.map
|
||||
packages/lib/models/Note.d.ts
|
||||
packages/lib/models/Note.js
|
||||
packages/lib/models/Note.js.map
|
||||
packages/lib/models/NoteResource.d.ts
|
||||
packages/lib/models/NoteResource.js
|
||||
packages/lib/models/NoteResource.js.map
|
||||
packages/lib/models/NoteTag.d.ts
|
||||
packages/lib/models/NoteTag.js
|
||||
packages/lib/models/NoteTag.js.map
|
||||
packages/lib/models/Resource.d.ts
|
||||
packages/lib/models/Resource.js
|
||||
packages/lib/models/Resource.js.map
|
||||
packages/lib/models/ResourceLocalState.d.ts
|
||||
packages/lib/models/ResourceLocalState.js
|
||||
packages/lib/models/ResourceLocalState.js.map
|
||||
packages/lib/models/Revision.d.ts
|
||||
packages/lib/models/Revision.js
|
||||
packages/lib/models/Revision.js.map
|
||||
packages/lib/models/Search.d.ts
|
||||
packages/lib/models/Search.js
|
||||
packages/lib/models/Search.js.map
|
||||
packages/lib/models/Setting.d.ts
|
||||
packages/lib/models/Setting.js
|
||||
packages/lib/models/Setting.js.map
|
||||
packages/lib/models/SmartFilter.d.ts
|
||||
packages/lib/models/SmartFilter.js
|
||||
packages/lib/models/SmartFilter.js.map
|
||||
packages/lib/models/Tag.d.ts
|
||||
packages/lib/models/Tag.js
|
||||
packages/lib/models/Tag.js.map
|
||||
packages/lib/models/utils/paginatedFeed.d.ts
|
||||
packages/lib/models/utils/paginatedFeed.js
|
||||
packages/lib/models/utils/paginatedFeed.js.map
|
||||
@ -1020,9 +1059,18 @@ packages/lib/services/BaseService.js.map
|
||||
packages/lib/services/CommandService.d.ts
|
||||
packages/lib/services/CommandService.js
|
||||
packages/lib/services/CommandService.js.map
|
||||
packages/lib/services/DecryptionWorker.d.ts
|
||||
packages/lib/services/DecryptionWorker.js
|
||||
packages/lib/services/DecryptionWorker.js.map
|
||||
packages/lib/services/EncryptionService.d.ts
|
||||
packages/lib/services/EncryptionService.js
|
||||
packages/lib/services/EncryptionService.js.map
|
||||
packages/lib/services/ExternalEditWatcher.d.ts
|
||||
packages/lib/services/ExternalEditWatcher.js
|
||||
packages/lib/services/ExternalEditWatcher.js.map
|
||||
packages/lib/services/ItemChangeUtils.d.ts
|
||||
packages/lib/services/ItemChangeUtils.js
|
||||
packages/lib/services/ItemChangeUtils.js.map
|
||||
packages/lib/services/KeymapService.d.ts
|
||||
packages/lib/services/KeymapService.js
|
||||
packages/lib/services/KeymapService.js.map
|
||||
@ -1035,18 +1083,33 @@ packages/lib/services/KeymapService_keysRegExp.js.map
|
||||
packages/lib/services/KvStore.d.ts
|
||||
packages/lib/services/KvStore.js
|
||||
packages/lib/services/KvStore.js.map
|
||||
packages/lib/services/MigrationService.d.ts
|
||||
packages/lib/services/MigrationService.js
|
||||
packages/lib/services/MigrationService.js.map
|
||||
packages/lib/services/NavService.d.ts
|
||||
packages/lib/services/NavService.js
|
||||
packages/lib/services/NavService.js.map
|
||||
packages/lib/services/PostMessageService.d.ts
|
||||
packages/lib/services/PostMessageService.js
|
||||
packages/lib/services/PostMessageService.js.map
|
||||
packages/lib/services/ReportService.d.ts
|
||||
packages/lib/services/ReportService.js
|
||||
packages/lib/services/ReportService.js.map
|
||||
packages/lib/services/ResourceEditWatcher/index.d.ts
|
||||
packages/lib/services/ResourceEditWatcher/index.js
|
||||
packages/lib/services/ResourceEditWatcher/index.js.map
|
||||
packages/lib/services/ResourceEditWatcher/reducer.d.ts
|
||||
packages/lib/services/ResourceEditWatcher/reducer.js
|
||||
packages/lib/services/ResourceEditWatcher/reducer.js.map
|
||||
packages/lib/services/ResourceFetcher.d.ts
|
||||
packages/lib/services/ResourceFetcher.js
|
||||
packages/lib/services/ResourceFetcher.js.map
|
||||
packages/lib/services/ResourceService.d.ts
|
||||
packages/lib/services/ResourceService.js
|
||||
packages/lib/services/ResourceService.js.map
|
||||
packages/lib/services/RevisionService.d.ts
|
||||
packages/lib/services/RevisionService.js
|
||||
packages/lib/services/RevisionService.js.map
|
||||
packages/lib/services/SettingUtils.d.ts
|
||||
packages/lib/services/SettingUtils.js
|
||||
packages/lib/services/SettingUtils.js.map
|
||||
@ -1308,6 +1371,12 @@ packages/lib/services/rest/utils/requestFields.js.map
|
||||
packages/lib/services/rest/utils/requestPaginationOptions.d.ts
|
||||
packages/lib/services/rest/utils/requestPaginationOptions.js
|
||||
packages/lib/services/rest/utils/requestPaginationOptions.js.map
|
||||
packages/lib/services/searchengine/SearchEngine.d.ts
|
||||
packages/lib/services/searchengine/SearchEngine.js
|
||||
packages/lib/services/searchengine/SearchEngine.js.map
|
||||
packages/lib/services/searchengine/SearchEngineUtils.d.ts
|
||||
packages/lib/services/searchengine/SearchEngineUtils.js
|
||||
packages/lib/services/searchengine/SearchEngineUtils.js.map
|
||||
packages/lib/services/searchengine/filterParser.d.ts
|
||||
packages/lib/services/searchengine/filterParser.js
|
||||
packages/lib/services/searchengine/filterParser.js.map
|
||||
|
69
.gitignore
vendored
69
.gitignore
vendored
@ -969,12 +969,51 @@ packages/lib/markupLanguageUtils.js.map
|
||||
packages/lib/models/Alarm.d.ts
|
||||
packages/lib/models/Alarm.js
|
||||
packages/lib/models/Alarm.js.map
|
||||
packages/lib/models/BaseItem.d.ts
|
||||
packages/lib/models/BaseItem.js
|
||||
packages/lib/models/BaseItem.js.map
|
||||
packages/lib/models/Folder.d.ts
|
||||
packages/lib/models/Folder.js
|
||||
packages/lib/models/Folder.js.map
|
||||
packages/lib/models/ItemChange.d.ts
|
||||
packages/lib/models/ItemChange.js
|
||||
packages/lib/models/ItemChange.js.map
|
||||
packages/lib/models/MasterKey.d.ts
|
||||
packages/lib/models/MasterKey.js
|
||||
packages/lib/models/MasterKey.js.map
|
||||
packages/lib/models/Migration.d.ts
|
||||
packages/lib/models/Migration.js
|
||||
packages/lib/models/Migration.js.map
|
||||
packages/lib/models/Note.d.ts
|
||||
packages/lib/models/Note.js
|
||||
packages/lib/models/Note.js.map
|
||||
packages/lib/models/NoteResource.d.ts
|
||||
packages/lib/models/NoteResource.js
|
||||
packages/lib/models/NoteResource.js.map
|
||||
packages/lib/models/NoteTag.d.ts
|
||||
packages/lib/models/NoteTag.js
|
||||
packages/lib/models/NoteTag.js.map
|
||||
packages/lib/models/Resource.d.ts
|
||||
packages/lib/models/Resource.js
|
||||
packages/lib/models/Resource.js.map
|
||||
packages/lib/models/ResourceLocalState.d.ts
|
||||
packages/lib/models/ResourceLocalState.js
|
||||
packages/lib/models/ResourceLocalState.js.map
|
||||
packages/lib/models/Revision.d.ts
|
||||
packages/lib/models/Revision.js
|
||||
packages/lib/models/Revision.js.map
|
||||
packages/lib/models/Search.d.ts
|
||||
packages/lib/models/Search.js
|
||||
packages/lib/models/Search.js.map
|
||||
packages/lib/models/Setting.d.ts
|
||||
packages/lib/models/Setting.js
|
||||
packages/lib/models/Setting.js.map
|
||||
packages/lib/models/SmartFilter.d.ts
|
||||
packages/lib/models/SmartFilter.js
|
||||
packages/lib/models/SmartFilter.js.map
|
||||
packages/lib/models/Tag.d.ts
|
||||
packages/lib/models/Tag.js
|
||||
packages/lib/models/Tag.js.map
|
||||
packages/lib/models/utils/paginatedFeed.d.ts
|
||||
packages/lib/models/utils/paginatedFeed.js
|
||||
packages/lib/models/utils/paginatedFeed.js.map
|
||||
@ -1008,9 +1047,18 @@ packages/lib/services/BaseService.js.map
|
||||
packages/lib/services/CommandService.d.ts
|
||||
packages/lib/services/CommandService.js
|
||||
packages/lib/services/CommandService.js.map
|
||||
packages/lib/services/DecryptionWorker.d.ts
|
||||
packages/lib/services/DecryptionWorker.js
|
||||
packages/lib/services/DecryptionWorker.js.map
|
||||
packages/lib/services/EncryptionService.d.ts
|
||||
packages/lib/services/EncryptionService.js
|
||||
packages/lib/services/EncryptionService.js.map
|
||||
packages/lib/services/ExternalEditWatcher.d.ts
|
||||
packages/lib/services/ExternalEditWatcher.js
|
||||
packages/lib/services/ExternalEditWatcher.js.map
|
||||
packages/lib/services/ItemChangeUtils.d.ts
|
||||
packages/lib/services/ItemChangeUtils.js
|
||||
packages/lib/services/ItemChangeUtils.js.map
|
||||
packages/lib/services/KeymapService.d.ts
|
||||
packages/lib/services/KeymapService.js
|
||||
packages/lib/services/KeymapService.js.map
|
||||
@ -1023,18 +1071,33 @@ packages/lib/services/KeymapService_keysRegExp.js.map
|
||||
packages/lib/services/KvStore.d.ts
|
||||
packages/lib/services/KvStore.js
|
||||
packages/lib/services/KvStore.js.map
|
||||
packages/lib/services/MigrationService.d.ts
|
||||
packages/lib/services/MigrationService.js
|
||||
packages/lib/services/MigrationService.js.map
|
||||
packages/lib/services/NavService.d.ts
|
||||
packages/lib/services/NavService.js
|
||||
packages/lib/services/NavService.js.map
|
||||
packages/lib/services/PostMessageService.d.ts
|
||||
packages/lib/services/PostMessageService.js
|
||||
packages/lib/services/PostMessageService.js.map
|
||||
packages/lib/services/ReportService.d.ts
|
||||
packages/lib/services/ReportService.js
|
||||
packages/lib/services/ReportService.js.map
|
||||
packages/lib/services/ResourceEditWatcher/index.d.ts
|
||||
packages/lib/services/ResourceEditWatcher/index.js
|
||||
packages/lib/services/ResourceEditWatcher/index.js.map
|
||||
packages/lib/services/ResourceEditWatcher/reducer.d.ts
|
||||
packages/lib/services/ResourceEditWatcher/reducer.js
|
||||
packages/lib/services/ResourceEditWatcher/reducer.js.map
|
||||
packages/lib/services/ResourceFetcher.d.ts
|
||||
packages/lib/services/ResourceFetcher.js
|
||||
packages/lib/services/ResourceFetcher.js.map
|
||||
packages/lib/services/ResourceService.d.ts
|
||||
packages/lib/services/ResourceService.js
|
||||
packages/lib/services/ResourceService.js.map
|
||||
packages/lib/services/RevisionService.d.ts
|
||||
packages/lib/services/RevisionService.js
|
||||
packages/lib/services/RevisionService.js.map
|
||||
packages/lib/services/SettingUtils.d.ts
|
||||
packages/lib/services/SettingUtils.js
|
||||
packages/lib/services/SettingUtils.js.map
|
||||
@ -1296,6 +1359,12 @@ packages/lib/services/rest/utils/requestFields.js.map
|
||||
packages/lib/services/rest/utils/requestPaginationOptions.d.ts
|
||||
packages/lib/services/rest/utils/requestPaginationOptions.js
|
||||
packages/lib/services/rest/utils/requestPaginationOptions.js.map
|
||||
packages/lib/services/searchengine/SearchEngine.d.ts
|
||||
packages/lib/services/searchengine/SearchEngine.js
|
||||
packages/lib/services/searchengine/SearchEngine.js.map
|
||||
packages/lib/services/searchengine/SearchEngineUtils.d.ts
|
||||
packages/lib/services/searchengine/SearchEngineUtils.js
|
||||
packages/lib/services/searchengine/SearchEngineUtils.js.map
|
||||
packages/lib/services/searchengine/filterParser.d.ts
|
||||
packages/lib/services/searchengine/filterParser.js
|
||||
packages/lib/services/searchengine/filterParser.js.map
|
||||
|
@ -1,10 +1,10 @@
|
||||
const Logger = require('@joplin/lib/Logger').default;
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Resource = require('@joplin/lib/models/Resource.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Resource = require('@joplin/lib/models/Resource').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const reducer = require('@joplin/lib/reducer').default;
|
||||
const { defaultState } = require('@joplin/lib/reducer');
|
||||
@ -19,7 +19,7 @@ const chalk = require('chalk');
|
||||
const tk = require('terminal-kit');
|
||||
const TermWrapper = require('tkwidgets/framework/TermWrapper.js');
|
||||
const Renderer = require('tkwidgets/framework/Renderer.js');
|
||||
const DecryptionWorker = require('@joplin/lib/services/DecryptionWorker');
|
||||
const DecryptionWorker = require('@joplin/lib/services/DecryptionWorker').default;
|
||||
|
||||
const BaseWidget = require('tkwidgets/BaseWidget.js');
|
||||
const TextWidget = require('tkwidgets/TextWidget.js');
|
||||
|
@ -2,10 +2,10 @@ const BaseApplication = require('@joplin/lib/BaseApplication').default;
|
||||
const { FoldersScreenUtils } = require('@joplin/lib/folders-screen-utils.js');
|
||||
const ResourceService = require('@joplin/lib/services/ResourceService').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const { reg } = require('@joplin/lib/registry.js');
|
||||
const { fileExtension } = require('@joplin/lib/path-utils');
|
||||
@ -13,7 +13,7 @@ const { _ } = require('@joplin/lib/locale');
|
||||
const fs = require('fs-extra');
|
||||
const { cliUtils } = require('./cli-utils.js');
|
||||
const Cache = require('@joplin/lib/Cache');
|
||||
const RevisionService = require('@joplin/lib/services/RevisionService');
|
||||
const RevisionService = require('@joplin/lib/services/RevisionService').default;
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
|
||||
class Application extends BaseApplication {
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { app } = require('./app.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const { cliUtils } = require('./cli-utils.js');
|
||||
const yargParser = require('yargs-parser');
|
||||
const fs = require('fs-extra');
|
||||
|
@ -6,8 +6,8 @@ const { dirname } = require('@joplin/lib/path-utils');
|
||||
const { DatabaseDriverNode } = require('@joplin/lib/database-driver-node.js');
|
||||
const { JoplinDatabase } = require('@joplin/lib/joplin-database.js');
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const { sprintf } = require('sprintf-js');
|
||||
const exec = require('child_process').exec;
|
||||
|
@ -1,5 +1,5 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const { toTitleCase } = require('@joplin/lib/string-utils.js');
|
||||
const { reg } = require('@joplin/lib/registry.js');
|
||||
|
@ -2,8 +2,8 @@ const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
usage() {
|
||||
|
@ -2,7 +2,7 @@ const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
usage() {
|
||||
|
@ -2,7 +2,7 @@ const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const time = require('@joplin/lib/time').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
usage() {
|
||||
|
@ -1,8 +1,8 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const EncryptionService = require('@joplin/lib/services/EncryptionService');
|
||||
const DecryptionWorker = require('@joplin/lib/services/DecryptionWorker');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem');
|
||||
const EncryptionService = require('@joplin/lib/services/EncryptionService').default;
|
||||
const DecryptionWorker = require('@joplin/lib/services/DecryptionWorker').default;
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
const pathUtils = require('@joplin/lib/path-utils');
|
||||
|
@ -4,7 +4,7 @@ const { splitCommandString } = require('@joplin/lib/string-utils.js');
|
||||
const uuid = require('@joplin/lib/uuid').default;
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const { ReportService } = require('@joplin/lib/services/report.js');
|
||||
const ReportService = require('@joplin/lib/services/ReportService').default;
|
||||
const fs = require('fs-extra');
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
@ -2,7 +2,7 @@ const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
usage() {
|
||||
|
@ -2,9 +2,9 @@ const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const { sprintf } = require('sprintf-js');
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { cliUtils } = require('./cli-utils.js');
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
usage() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
usage() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
usage() {
|
||||
|
@ -2,8 +2,8 @@ const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
usage() {
|
||||
|
@ -2,8 +2,8 @@ const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
usage() {
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const uuid = require('@joplin/lib/uuid').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
@ -3,7 +3,7 @@ const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const { Database } = require('@joplin/lib/database.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
usage() {
|
||||
|
@ -2,7 +2,7 @@ const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const { ReportService } = require('@joplin/lib/services/report.js');
|
||||
const ReportService = require('@joplin/lib/services/ReportService').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
usage() {
|
||||
|
@ -3,7 +3,7 @@ const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const { OneDriveApiNodeUtils } = require('@joplin/lib/onedrive-api-node-utils.js');
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const ResourceFetcher = require('@joplin/lib/services/ResourceFetcher');
|
||||
const ResourceFetcher = require('@joplin/lib/services/ResourceFetcher').default;
|
||||
const Synchronizer = require('@joplin/lib/Synchronizer').default;
|
||||
const { reg } = require('@joplin/lib/registry.js');
|
||||
const { cliUtils } = require('./cli-utils.js');
|
||||
|
@ -1,7 +1,7 @@
|
||||
const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const time = require('@joplin/lib/time').default;
|
||||
|
||||
|
@ -2,7 +2,7 @@ const { BaseCommand } = require('./base-command.js');
|
||||
const { app } = require('./app.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const time = require('@joplin/lib/time').default;
|
||||
|
||||
class Command extends BaseCommand {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const Logger = require('@joplin/lib/Logger').default;
|
||||
const Resource = require('@joplin/lib/models/Resource.js');
|
||||
const Resource = require('@joplin/lib/models/Resource').default;
|
||||
const { dirname } = require('@joplin/lib/path-utils');
|
||||
const FsDriverNode = require('@joplin/lib/fs-driver-node').default;
|
||||
const lodash = require('lodash');
|
||||
|
@ -1,5 +1,5 @@
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const ListWidget = require('tkwidgets/ListWidget.js');
|
||||
const _ = require('@joplin/lib/locale')._;
|
||||
|
@ -1,4 +1,4 @@
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const ListWidget = require('tkwidgets/ListWidget.js');
|
||||
|
||||
class NoteListWidget extends ListWidget {
|
||||
|
@ -1,4 +1,4 @@
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const TextWidget = require('tkwidgets/TextWidget.js');
|
||||
|
||||
class NoteMetadataWidget extends TextWidget {
|
||||
|
@ -1,4 +1,4 @@
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const TextWidget = require('tkwidgets/TextWidget.js');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
|
||||
|
@ -11,15 +11,15 @@ if (compareVersion(nodeVersion, '10.0.0') < 0) {
|
||||
}
|
||||
|
||||
const { app } = require('./app.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Resource = require('@joplin/lib/models/Resource.js');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const NoteTag = require('@joplin/lib/models/NoteTag.js');
|
||||
const MasterKey = require('@joplin/lib/models/MasterKey');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Resource = require('@joplin/lib/models/Resource').default;
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const NoteTag = require('@joplin/lib/models/NoteTag').default;
|
||||
const MasterKey = require('@joplin/lib/models/MasterKey').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const Revision = require('@joplin/lib/models/Revision.js');
|
||||
const Revision = require('@joplin/lib/models/Revision').default;
|
||||
const Logger = require('@joplin/lib/Logger').default;
|
||||
const FsDriverNode = require('@joplin/lib/fs-driver-node').default;
|
||||
const sharp = require('sharp');
|
||||
@ -27,7 +27,7 @@ const { shimInit } = require('@joplin/lib/shim-init-node.js');
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const { FileApiDriverLocal } = require('@joplin/lib/file-api-driver-local.js');
|
||||
const EncryptionService = require('@joplin/lib/services/EncryptionService');
|
||||
const EncryptionService = require('@joplin/lib/services/EncryptionService').default;
|
||||
const envFromArgs = require('@joplin/lib/envFromArgs');
|
||||
|
||||
const env = envFromArgs(process.argv);
|
||||
|
@ -7,9 +7,9 @@ const { filename } = require('@joplin/lib/path-utils');
|
||||
const { setupDatabaseAndSynchronizer, switchClient, expectNotThrow } = require('./test-utils.js');
|
||||
const { enexXmlToMd } = require('@joplin/lib/import-enex-md-gen.js');
|
||||
const { importEnex } = require('@joplin/lib/import-enex');
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
const Tag = require('@joplin/lib/models/Tag');
|
||||
const Resource = require('@joplin/lib/models/Resource');
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import Tag from '@joplin/lib/models/Tag';
|
||||
import Resource from '@joplin/lib/models/Resource';
|
||||
|
||||
const enexSampleBaseDir = `${__dirname}/enex_to_md`;
|
||||
|
||||
|
@ -5,8 +5,8 @@ const os = require('os');
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { filename } = require('@joplin/lib/path-utils');
|
||||
const { fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
const HtmlToHtml = require('@joplin/renderer/HtmlToHtml').default;
|
||||
|
@ -1,5 +1,5 @@
|
||||
import InMemoryCache from '@joplin/lib/InMemoryCache';
|
||||
const time = require('@joplin/lib/time').default;
|
||||
import time from '@joplin/lib/time';
|
||||
|
||||
describe('InMemoryCache', function() {
|
||||
|
||||
|
@ -2,7 +2,7 @@ import MdToHtml from '@joplin/renderer/MdToHtml';
|
||||
const os = require('os');
|
||||
const { filename } = require('@joplin/lib/path-utils');
|
||||
const { setupDatabaseAndSynchronizer, switchClient } = require('./test-utils.js');
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
import shim from '@joplin/lib/shim';
|
||||
const { themeStyle } = require('@joplin/lib/theme');
|
||||
|
||||
function newTestMdToHtml(options: any = null) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
const mdImporterService = require('@joplin/lib/services/interop/InteropService_Importer_Md').default;
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const { setupDatabaseAndSynchronizer, switchClient } = require('./test-utils.js');
|
||||
|
||||
const importer = new mdImporterService();
|
||||
|
@ -2,9 +2,9 @@ import Setting from '@joplin/lib/models/Setting';
|
||||
import { allNotesFolders, remoteNotesAndFolders, localNotesFoldersSameAsRemote } from './test-utils-synchronizer';
|
||||
|
||||
const { syncTargetName, afterAllCleanUp, synchronizerStart, setupDatabaseAndSynchronizer, synchronizer, sleep, switchClient, syncTargetId, fileApi } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem.js');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import BaseItem from '@joplin/lib/models/BaseItem';
|
||||
const WelcomeUtils = require('@joplin/lib/WelcomeUtils');
|
||||
|
||||
describe('Synchronizer.basics', function() {
|
||||
|
@ -3,9 +3,9 @@ import Setting from '@joplin/lib/models/Setting';
|
||||
import { allNotesFolders, localNotesFoldersSameAsRemote } from './test-utils-synchronizer';
|
||||
|
||||
const { synchronizerStart, setupDatabaseAndSynchronizer, sleep, switchClient, syncTargetId, loadEncryptionMasterKey, decryptionWorker } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem.js');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import BaseItem from '@joplin/lib/models/BaseItem';
|
||||
|
||||
describe('Synchronizer.conflicts', function() {
|
||||
|
||||
|
@ -3,12 +3,12 @@ import shim from '@joplin/lib/shim';
|
||||
import Setting from '@joplin/lib/models/Setting';
|
||||
|
||||
const { synchronizerStart, allSyncTargetItemsEncrypted, kvStore, setupDatabaseAndSynchronizer, synchronizer, fileApi, switchClient, encryptionService, loadEncryptionMasterKey, decryptionWorker, checkThrowAsync } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Resource = require('@joplin/lib/models/Resource.js');
|
||||
const ResourceFetcher = require('@joplin/lib/services/ResourceFetcher');
|
||||
const MasterKey = require('@joplin/lib/models/MasterKey');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem.js');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import Resource from '@joplin/lib/models/Resource';
|
||||
import ResourceFetcher from '@joplin/lib/services/ResourceFetcher';
|
||||
import MasterKey from '@joplin/lib/models/MasterKey';
|
||||
import BaseItem from '@joplin/lib/models/BaseItem';
|
||||
|
||||
let insideBeforeEach = false;
|
||||
|
||||
|
@ -5,11 +5,11 @@ import { NoteEntity } from '@joplin/lib/services/database/types';
|
||||
import { remoteNotesFoldersResources, remoteResources } from './test-utils-synchronizer';
|
||||
|
||||
const { synchronizerStart, tempFilePath, resourceFetcher, setupDatabaseAndSynchronizer, synchronizer, fileApi, switchClient, syncTargetId, encryptionService, loadEncryptionMasterKey, fileContentEqual, checkThrowAsync } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Resource = require('@joplin/lib/models/Resource.js');
|
||||
const ResourceFetcher = require('@joplin/lib/services/ResourceFetcher');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem.js');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import Resource from '@joplin/lib/models/Resource';
|
||||
import ResourceFetcher from '@joplin/lib/services/ResourceFetcher';
|
||||
import BaseItem from '@joplin/lib/models/BaseItem';
|
||||
|
||||
let insideBeforeEach = false;
|
||||
|
||||
|
@ -2,8 +2,8 @@ import Setting from '@joplin/lib/models/Setting';
|
||||
import BaseModel from '@joplin/lib/BaseModel';
|
||||
|
||||
const { synchronizerStart, revisionService, setupDatabaseAndSynchronizer, synchronizer, switchClient, encryptionService, loadEncryptionMasterKey, decryptionWorker } = require('./test-utils.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Revision = require('@joplin/lib/models/Revision.js');
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import Revision from '@joplin/lib/models/Revision';
|
||||
|
||||
describe('Synchronizer.revisions', function() {
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import Setting from '@joplin/lib/models/Setting';
|
||||
|
||||
const { synchronizerStart, setupDatabaseAndSynchronizer, switchClient, encryptionService, loadEncryptionMasterKey } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const MasterKey = require('@joplin/lib/models/MasterKey');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import Tag from '@joplin/lib/models/Tag';
|
||||
import MasterKey from '@joplin/lib/models/MasterKey';
|
||||
|
||||
describe('Synchronizer.tags', function() {
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { sortedIds, createNTestNotes, fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const ArrayUtils = require('@joplin/lib/ArrayUtils.js');
|
||||
|
@ -1,8 +1,8 @@
|
||||
const { id, ids, createNTestFolders, sortedIds, createNTestNotes, TestApp } = require('./test-utils.js');
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const uuid = require('@joplin/lib/uuid').default;
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
|
||||
const { ALL_NOTES_FILTER_ID } = require('@joplin/lib/reserved-ids.js');
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
const { setupDatabaseAndSynchronizer, switchClient, createNTestFolders, createNTestNotes, createNTestTags, TestApp } = require('./test-utils.js');
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const time = require('@joplin/lib/time').default;
|
||||
|
||||
let testApp = null;
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
const { setupDatabaseAndSynchronizer, switchClient, id, ids, sortedIds, at, createNTestFolders, createNTestNotes, createNTestTags, TestApp } = require('./test-utils.js');
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { ALL_NOTES_FILTER_ID } = require('@joplin/lib/reserved-ids.js');
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
const { setupDatabaseAndSynchronizer, switchClient, createNTestFolders, createNTestNotes, createNTestTags, TestApp } = require('./test-utils.js');
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const time = require('@joplin/lib/time').default;
|
||||
|
||||
let testApp = null;
|
||||
|
@ -3,10 +3,10 @@
|
||||
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem.js');
|
||||
const Resource = require('@joplin/lib/models/Resource.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem').default;
|
||||
const Resource = require('@joplin/lib/models/Resource').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { FolderEntity } from '@joplin/lib/services/database/types';
|
||||
const { createNTestNotes, setupDatabaseAndSynchronizer, sleep, switchClient, checkThrowAsync } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
import { createNTestNotes, setupDatabaseAndSynchronizer, sleep, switchClient, checkThrowAsync } from './test-utils';
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
|
||||
async function allItems() {
|
||||
const folders = await Folder.all();
|
||||
@ -169,9 +169,9 @@ describe('models_Folder', function() {
|
||||
await Note.save({ title: 'note1', parent_id: f3.id });
|
||||
await Note.save({ title: 'note2', parent_id: f3.id });
|
||||
await Note.save({ title: 'note3', parent_id: f1.id });
|
||||
await Note.save({ title: 'note4', parent_id: f3.id, is_todo: true, todo_completed: 0 });
|
||||
await Note.save({ title: 'note5', parent_id: f3.id, is_todo: true, todo_completed: 999 });
|
||||
await Note.save({ title: 'note6', parent_id: f3.id, is_todo: true, todo_completed: 999 });
|
||||
await Note.save({ title: 'note4', parent_id: f3.id, is_todo: 1, todo_completed: 0 });
|
||||
await Note.save({ title: 'note5', parent_id: f3.id, is_todo: 1, todo_completed: 999 });
|
||||
await Note.save({ title: 'note6', parent_id: f3.id, is_todo: 1, todo_completed: 999 });
|
||||
|
||||
const folders = await Folder.all();
|
||||
await Folder.addNoteCounts(folders, false);
|
||||
|
@ -3,12 +3,12 @@
|
||||
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { fileContentEqual, revisionService, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('./test-utils.js');
|
||||
const SearchEngine = require('@joplin/lib/services/searchengine/SearchEngine');
|
||||
const SearchEngine = require('@joplin/lib/services/searchengine/SearchEngine').default;
|
||||
const ResourceService = require('@joplin/lib/services/ResourceService').default;
|
||||
const ItemChangeUtils = require('@joplin/lib/services/ItemChangeUtils');
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
const ItemChangeUtils = require('@joplin/lib/services/ItemChangeUtils').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const ItemChange = require('@joplin/lib/models/ItemChange');
|
||||
const ItemChange = require('@joplin/lib/models/ItemChange').default;
|
||||
|
||||
let searchEngine = null;
|
||||
|
||||
|
@ -3,8 +3,8 @@ import BaseModel from '@joplin/lib/BaseModel';
|
||||
import shim from '@joplin/lib/shim';
|
||||
import markdownUtils from '@joplin/lib/markdownUtils';
|
||||
const { sortedIds, createNTestNotes, setupDatabaseAndSynchronizer, switchClient, checkThrowAsync } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
const ArrayUtils = require('@joplin/lib/ArrayUtils.js');
|
||||
|
||||
async function allItems() {
|
||||
@ -55,7 +55,7 @@ describe('models_Note', function() {
|
||||
for (let i = 0; i < testCases.length; i++) {
|
||||
const t = testCases[i];
|
||||
|
||||
const input = t[0];
|
||||
const input = t[0] as string;
|
||||
const expected = t[1];
|
||||
const actual = Note.linkedItemIds(input);
|
||||
const contentEquals = ArrayUtils.contentEquals(actual, expected);
|
||||
@ -204,7 +204,7 @@ describe('models_Note', function() {
|
||||
const folder2 = await Folder.save({ title: Folder.conflictFolderTitle(), id: Folder.conflictFolderId() });
|
||||
const note1 = await Note.save({ title: 'note', parent_id: folder1.id });
|
||||
|
||||
const hasThrown = await checkThrowAsync(async () => await Folder.copyToFolder(note1.id, folder2.id));
|
||||
const hasThrown = await checkThrowAsync(async () => await Note.copyToFolder(note1.id, folder2.id));
|
||||
expect(hasThrown).toBe(true);
|
||||
}));
|
||||
|
||||
@ -260,7 +260,7 @@ describe('models_Note', function() {
|
||||
|
||||
for (const testCase of testCases) {
|
||||
const [useAbsolutePaths, input, expected] = testCase;
|
||||
const internalToExternal = await Note.replaceResourceInternalToExternalLinks(input, { useAbsolutePaths });
|
||||
const internalToExternal = await Note.replaceResourceInternalToExternalLinks(input as string, { useAbsolutePaths });
|
||||
expect(internalToExternal).toBe(expected);
|
||||
|
||||
const externalToInternal = await Note.replaceResourceExternalToInternalLinks(internalToExternal, { useAbsolutePaths });
|
||||
@ -280,11 +280,11 @@ describe('models_Note', function() {
|
||||
});
|
||||
expect(sortedNotes.length).toBe(0);
|
||||
|
||||
const note0 = await Note.save({ title: 'A3', parent_id: folder1.id, is_todo: false });
|
||||
const note1 = await Note.save({ title: 'A20', parent_id: folder1.id, is_todo: false });
|
||||
const note2 = await Note.save({ title: 'A100', parent_id: folder1.id, is_todo: false });
|
||||
const note3 = await Note.save({ title: 'égalité', parent_id: folder1.id, is_todo: false });
|
||||
const note4 = await Note.save({ title: 'z', parent_id: folder1.id, is_todo: false });
|
||||
const note0 = await Note.save({ title: 'A3', parent_id: folder1.id, is_todo: 0 });
|
||||
const note1 = await Note.save({ title: 'A20', parent_id: folder1.id, is_todo: 0 });
|
||||
const note2 = await Note.save({ title: 'A100', parent_id: folder1.id, is_todo: 0 });
|
||||
const note3 = await Note.save({ title: 'égalité', parent_id: folder1.id, is_todo: 0 });
|
||||
const note4 = await Note.save({ title: 'z', parent_id: folder1.id, is_todo: 0 });
|
||||
|
||||
const sortedNotes2 = await Note.previews(folder1.id, {
|
||||
fields: ['id', 'title'],
|
||||
|
@ -3,8 +3,8 @@
|
||||
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { sortedIds, createNTestNotes, fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const ArrayUtils = require('@joplin/lib/ArrayUtils.js');
|
||||
|
@ -3,9 +3,9 @@
|
||||
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Resource = require('@joplin/lib/models/Resource.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Resource = require('@joplin/lib/models/Resource').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const NoteTag = require('@joplin/lib/models/NoteTag.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Revision = require('@joplin/lib/models/Revision.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const NoteTag = require('@joplin/lib/models/NoteTag').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const Revision = require('@joplin/lib/models/Revision').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
|
||||
|
@ -3,10 +3,10 @@
|
||||
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const NoteTag = require('@joplin/lib/models/NoteTag.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const NoteTag = require('@joplin/lib/models/NoteTag').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
/* eslint-disable no-unused-vars */
|
||||
|
||||
const { setupDatabaseAndSynchronizer, switchClient, createNTestNotes, createNTestFolders, createNTestTags } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const reducer = require('@joplin/lib/reducer').default;
|
||||
const { defaultState, stateUtils, MAX_HISTORY } = require('@joplin/lib/reducer');
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Setting from '@joplin/lib/models/Setting';
|
||||
import PluginService from '@joplin/lib/services/plugins/PluginService';
|
||||
const { waitForFolderCount, newPluginService, newPluginScript, setupDatabaseAndSynchronizer, switchClient, afterEachCleanUp } = require('../../../test-utils');
|
||||
const Folder = require('@joplin/lib/models/Folder');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
|
||||
describe('JoplinSettings', () => {
|
||||
|
||||
|
@ -2,9 +2,9 @@ import Setting from '@joplin/lib/models/Setting';
|
||||
import PluginService from '@joplin/lib/services/plugins/PluginService';
|
||||
|
||||
const { newPluginService, newPluginScript, setupDatabaseAndSynchronizer, switchClient, afterEachCleanUp } = require('../../../test-utils');
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
const Folder = require('@joplin/lib/models/Folder');
|
||||
const ItemChange = require('@joplin/lib/models/ItemChange');
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import ItemChange from '@joplin/lib/models/ItemChange';
|
||||
|
||||
describe('JoplinWorkspace', () => {
|
||||
|
||||
|
@ -3,16 +3,16 @@
|
||||
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const { Database } = require('@joplin/lib/database.js');
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem.js');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const MasterKey = require('@joplin/lib/models/MasterKey');
|
||||
const MasterKey = require('@joplin/lib/models/MasterKey').default;
|
||||
const SyncTargetRegistry = require('@joplin/lib/SyncTargetRegistry.js');
|
||||
const EncryptionService = require('@joplin/lib/services/EncryptionService.js');
|
||||
const EncryptionService = require('@joplin/lib/services/EncryptionService').default;
|
||||
|
||||
let service = null;
|
||||
|
||||
|
@ -3,10 +3,10 @@ import { CustomExportContext, CustomImportContext, Module, ModuleType } from '@j
|
||||
import shim from '@joplin/lib/shim';
|
||||
|
||||
const { fileContentEqual, setupDatabaseAndSynchronizer, switchClient, checkThrowAsync, exportDir } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Resource = require('@joplin/lib/models/Resource.js');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import Tag from '@joplin/lib/models/Tag';
|
||||
import Resource from '@joplin/lib/models/Resource';
|
||||
const fs = require('fs-extra');
|
||||
const ArrayUtils = require('@joplin/lib/ArrayUtils');
|
||||
|
||||
|
@ -5,9 +5,9 @@ const fs = require('fs-extra');
|
||||
const { setupDatabaseAndSynchronizer, switchClient, exportDir } = require('./test-utils.js');
|
||||
const InteropService_Exporter_Md = require('@joplin/lib/services/interop/InteropService_Exporter_Md').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Resource = require('@joplin/lib/models/Resource.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Resource = require('@joplin/lib/models/Resource').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
|
||||
describe('services_InteropService_Exporter_Md', function() {
|
||||
|
@ -7,8 +7,8 @@ import Setting from '@joplin/lib/models/Setting';
|
||||
|
||||
const fs = require('fs-extra');
|
||||
const { expectNotThrow, setupDatabaseAndSynchronizer, switchClient, expectThrow, createTempDir } = require('./test-utils.js');
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
const Folder = require('@joplin/lib/models/Folder');
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
|
||||
const testPluginDir = `${__dirname}/../tests/support/plugins`;
|
||||
|
||||
|
@ -4,10 +4,10 @@ import ResourceService from '@joplin/lib/services/ResourceService';
|
||||
import shim from '@joplin/lib/shim';
|
||||
|
||||
const { resourceService, decryptionWorker, encryptionService, loadEncryptionMasterKey, allSyncTargetItemsEncrypted, setupDatabaseAndSynchronizer, db, synchronizer, switchClient } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Resource = require('@joplin/lib/models/Resource.js');
|
||||
const SearchEngine = require('@joplin/lib/services/searchengine/SearchEngine');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import Resource from '@joplin/lib/models/Resource';
|
||||
import SearchEngine from '@joplin/lib/services/searchengine/SearchEngine';
|
||||
|
||||
describe('services_ResourceService', function() {
|
||||
|
||||
|
@ -3,15 +3,15 @@
|
||||
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { fileContentEqual, setupDatabase, revisionService, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const NoteTag = require('@joplin/lib/models/NoteTag.js');
|
||||
const ItemChange = require('@joplin/lib/models/ItemChange.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const Revision = require('@joplin/lib/models/Revision.js');
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const NoteTag = require('@joplin/lib/models/NoteTag').default;
|
||||
const ItemChange = require('@joplin/lib/models/ItemChange').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const Revision = require('@joplin/lib/models/Revision').default;
|
||||
const BaseModel = require('@joplin/lib/BaseModel').default;
|
||||
const RevisionService = require('@joplin/lib/services/RevisionService.js');
|
||||
const RevisionService = require('@joplin/lib/services/RevisionService').default;
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
|
||||
describe('services_Revision', function() {
|
||||
|
@ -4,9 +4,9 @@
|
||||
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync, restoreDate } = require('./test-utils.js');
|
||||
const SearchEngine = require('@joplin/lib/services/searchengine/SearchEngine');
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
const ItemChange = require('@joplin/lib/models/ItemChange');
|
||||
const SearchEngine = require('@joplin/lib/services/searchengine/SearchEngine').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const ItemChange = require('@joplin/lib/models/ItemChange').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
|
||||
let engine = null;
|
||||
|
@ -4,13 +4,13 @@
|
||||
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { fileContentEqual, setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, createNTestNotes, switchClient, createNTestFolders } = require('./test-utils.js');
|
||||
const SearchEngine = require('@joplin/lib/services/searchengine/SearchEngine');
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
const Folder = require('@joplin/lib/models/Folder');
|
||||
const Tag = require('@joplin/lib/models/Tag');
|
||||
const ItemChange = require('@joplin/lib/models/ItemChange');
|
||||
const SearchEngine = require('@joplin/lib/services/searchengine/SearchEngine').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const ItemChange = require('@joplin/lib/models/ItemChange').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const Resource = require('@joplin/lib/models/Resource.js');
|
||||
const Resource = require('@joplin/lib/models/Resource').default;
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
const ResourceService = require('@joplin/lib/services/ResourceService').default;
|
||||
|
||||
|
@ -3,13 +3,13 @@ import Api, { RequestMethod } from '@joplin/lib/services/rest/Api';
|
||||
import shim from '@joplin/lib/shim';
|
||||
|
||||
const { setupDatabaseAndSynchronizer, switchClient, checkThrowAsync, db, msleep } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder');
|
||||
const Resource = require('@joplin/lib/models/Resource');
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
const Tag = require('@joplin/lib/models/Tag');
|
||||
const NoteTag = require('@joplin/lib/models/NoteTag');
|
||||
const ResourceService = require('@joplin/lib/services/ResourceService').default;
|
||||
const SearchEngine = require('@joplin/lib/services/searchengine/SearchEngine');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import Resource from '@joplin/lib/models/Resource';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import Tag from '@joplin/lib/models/Tag';
|
||||
import NoteTag from '@joplin/lib/models/NoteTag';
|
||||
import ResourceService from '@joplin/lib/services/ResourceService';
|
||||
import SearchEngine from '@joplin/lib/services/searchengine/SearchEngine';
|
||||
|
||||
const createFolderForPagination = async (num: number, time: number) => {
|
||||
await Folder.save({
|
||||
@ -422,8 +422,8 @@ describe('services_rest_Api', function() {
|
||||
const note = await Note.save({
|
||||
title: 'ma note un',
|
||||
});
|
||||
Tag.addNote(tag1.id, note.id);
|
||||
Tag.addNote(tag2.id, note.id);
|
||||
await Tag.addNote(tag1.id, note.id);
|
||||
await Tag.addNote(tag2.id, note.id);
|
||||
|
||||
const response = await api.route(RequestMethod.PUT, `notes/${note.id}`, null, JSON.stringify({
|
||||
tags: `${tag1.title},${tag3.title}`,
|
||||
@ -443,8 +443,8 @@ describe('services_rest_Api', function() {
|
||||
const note = await Note.save({
|
||||
title: 'ma note un',
|
||||
});
|
||||
Tag.addNote(tag1.id, note.id);
|
||||
Tag.addNote(tag2.id, note.id);
|
||||
await Tag.addNote(tag1.id, note.id);
|
||||
await Tag.addNote(tag2.id, note.id);
|
||||
|
||||
const response = await api.route(RequestMethod.PUT, `notes/${note.id}`, null, JSON.stringify({
|
||||
tags: `${tag1.title},${newTagTitle}`,
|
||||
@ -464,8 +464,8 @@ describe('services_rest_Api', function() {
|
||||
const note = await Note.save({
|
||||
title: 'ma note un',
|
||||
});
|
||||
Tag.addNote(tag1.id, note.id);
|
||||
Tag.addNote(tag2.id, note.id);
|
||||
await Tag.addNote(tag1.id, note.id);
|
||||
await Tag.addNote(tag2.id, note.id);
|
||||
|
||||
const response = await api.route(RequestMethod.PUT, `notes/${note.id}`, null, JSON.stringify({
|
||||
title: 'Some other title',
|
||||
@ -484,8 +484,8 @@ describe('services_rest_Api', function() {
|
||||
const note = await Note.save({
|
||||
title: 'ma note un',
|
||||
});
|
||||
Tag.addNote(tag1.id, note.id);
|
||||
Tag.addNote(tag2.id, note.id);
|
||||
await Tag.addNote(tag1.id, note.id);
|
||||
await Tag.addNote(tag2.id, note.id);
|
||||
|
||||
const response = await api.route(RequestMethod.PUT, `notes/${note.id}`, null, JSON.stringify({
|
||||
tags: '',
|
||||
|
@ -1,9 +1,9 @@
|
||||
const { syncDir, fileApi, synchronizer, createSyncTargetSnapshot, loadEncryptionMasterKey, decryptionWorker, encryptionService, setupDatabaseAndSynchronizer, switchClient, expectThrow, expectNotThrow } = require('../test-utils.js');
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const Folder = require('@joplin/lib/models/Folder');
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
const Tag = require('@joplin/lib/models/Tag');
|
||||
const Resource = require('@joplin/lib/models/Resource');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const Note = require('@joplin/lib/models/Note').default;
|
||||
const Tag = require('@joplin/lib/models/Tag').default;
|
||||
const Resource = require('@joplin/lib/models/Resource').default;
|
||||
const markdownUtils = require('@joplin/lib/markdownUtils').default;;
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
const fs = require('fs-extra');
|
||||
|
@ -10,8 +10,8 @@ import { Dirnames } from '@joplin/lib/services/synchronizer/utils/types';
|
||||
|
||||
const { setSyncTargetName, fileApi, synchronizer, decryptionWorker, encryptionService, setupDatabaseAndSynchronizer, switchClient, expectThrow, expectNotThrow } = require('./test-utils.js');
|
||||
const { deploySyncTargetSnapshot, testData, checkTestData } = require('./support/syncTargetUtils');
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const MasterKey = require('@joplin/lib/models/MasterKey');
|
||||
import Setting from '@joplin/lib/models/Setting';
|
||||
import MasterKey from '@joplin/lib/models/MasterKey';
|
||||
|
||||
const specTimeout = 60000 * 10; // Nextcloud tests can be slow
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import BaseModel from '@joplin/lib/BaseModel';
|
||||
|
||||
const { fileApi } = require('./test-utils.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem.js');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import BaseItem from '@joplin/lib/models/BaseItem';
|
||||
|
||||
export async function allNotesFolders() {
|
||||
const folders = await Folder.all();
|
||||
|
@ -22,15 +22,15 @@ import SyncTargetOneDrive from '@joplin/lib/SyncTargetOneDrive';
|
||||
const fs = require('fs-extra');
|
||||
const { JoplinDatabase } = require('@joplin/lib/joplin-database.js');
|
||||
const { DatabaseDriverNode } = require('@joplin/lib/database-driver-node.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const ItemChange = require('@joplin/lib/models/ItemChange.js');
|
||||
const Resource = require('@joplin/lib/models/Resource.js');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
const NoteTag = require('@joplin/lib/models/NoteTag.js');
|
||||
const Revision = require('@joplin/lib/models/Revision.js');
|
||||
const MasterKey = require('@joplin/lib/models/MasterKey');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem.js');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import ItemChange from '@joplin/lib/models/ItemChange';
|
||||
import Resource from '@joplin/lib/models/Resource';
|
||||
import Tag from '@joplin/lib/models/Tag';
|
||||
import NoteTag from '@joplin/lib/models/NoteTag';
|
||||
import Revision from '@joplin/lib/models/Revision';
|
||||
import MasterKey from '@joplin/lib/models/MasterKey';
|
||||
import BaseItem from '@joplin/lib/models/BaseItem';
|
||||
const { FileApi } = require('@joplin/lib/file-api.js');
|
||||
const { FileApiDriverMemory } = require('@joplin/lib/file-api-driver-memory.js');
|
||||
const { FileApiDriverLocal } = require('@joplin/lib/file-api-driver-local.js');
|
||||
@ -45,14 +45,14 @@ const SyncTargetFilesystem = require('@joplin/lib/SyncTargetFilesystem.js');
|
||||
const SyncTargetNextcloud = require('@joplin/lib/SyncTargetNextcloud.js');
|
||||
const SyncTargetDropbox = require('@joplin/lib/SyncTargetDropbox.js');
|
||||
const SyncTargetAmazonS3 = require('@joplin/lib/SyncTargetAmazonS3.js');
|
||||
const SyncTargetJoplinServer = require('@joplin/lib/SyncTargetJoplinServer').default;
|
||||
const EncryptionService = require('@joplin/lib/services/EncryptionService.js');
|
||||
const DecryptionWorker = require('@joplin/lib/services/DecryptionWorker.js');
|
||||
const RevisionService = require('@joplin/lib/services/RevisionService.js');
|
||||
const ResourceFetcher = require('@joplin/lib/services/ResourceFetcher.js');
|
||||
import SyncTargetJoplinServer from '@joplin/lib/SyncTargetJoplinServer';
|
||||
import EncryptionService from '@joplin/lib/services/EncryptionService';
|
||||
import DecryptionWorker from '@joplin/lib/services/DecryptionWorker';
|
||||
import RevisionService from '@joplin/lib/services/RevisionService';
|
||||
import ResourceFetcher from '@joplin/lib/services/ResourceFetcher';
|
||||
const WebDavApi = require('@joplin/lib/WebDavApi');
|
||||
const DropboxApi = require('@joplin/lib/DropboxApi');
|
||||
const JoplinServerApi = require('@joplin/lib/JoplinServerApi2').default;
|
||||
import JoplinServerApi from '@joplin/lib/JoplinServerApi2';
|
||||
const { loadKeychainServiceAndSettings } = require('@joplin/lib/services/SettingUtils');
|
||||
const md5 = require('md5');
|
||||
const S3 = require('aws-sdk/clients/s3');
|
||||
|
@ -6,10 +6,10 @@ import { ExportOptions, FileSystemItem, Module } from '@joplin/lib/services/inte
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import { PluginStates } from '@joplin/lib/services/plugins/reducer';
|
||||
const bridge = require('electron').remote.require('./bridge').default;
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
import Setting from '@joplin/lib/models/Setting';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
const { friendlySafeFilename } = require('@joplin/lib/path-utils');
|
||||
const time = require('@joplin/lib/time').default;
|
||||
import time from '@joplin/lib/time';
|
||||
const md5 = require('md5');
|
||||
const url = require('url');
|
||||
|
||||
|
@ -27,22 +27,22 @@ import iterateItems from './gui/ResizableLayout/utils/iterateItems';
|
||||
import validateLayout from './gui/ResizableLayout/utils/validateLayout';
|
||||
|
||||
const { FoldersScreenUtils } = require('@joplin/lib/folders-screen-utils.js');
|
||||
const MasterKey = require('@joplin/lib/models/MasterKey');
|
||||
const Folder = require('@joplin/lib/models/Folder');
|
||||
import MasterKey from '@joplin/lib/models/MasterKey';
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
const fs = require('fs-extra');
|
||||
const Tag = require('@joplin/lib/models/Tag.js');
|
||||
import Tag from '@joplin/lib/models/Tag';
|
||||
const { reg } = require('@joplin/lib/registry.js');
|
||||
const packageInfo = require('./packageInfo.js');
|
||||
const DecryptionWorker = require('@joplin/lib/services/DecryptionWorker');
|
||||
import DecryptionWorker from '@joplin/lib/services/DecryptionWorker';
|
||||
const ClipperServer = require('@joplin/lib/ClipperServer');
|
||||
const { webFrame } = require('electron');
|
||||
const Menu = bridge().Menu;
|
||||
const PluginManager = require('@joplin/lib/services/PluginManager');
|
||||
const RevisionService = require('@joplin/lib/services/RevisionService');
|
||||
const MigrationService = require('@joplin/lib/services/MigrationService');
|
||||
import RevisionService from '@joplin/lib/services/RevisionService';
|
||||
import MigrationService from '@joplin/lib/services/MigrationService';
|
||||
const TemplateUtils = require('@joplin/lib/TemplateUtils');
|
||||
const CssUtils = require('@joplin/lib/CssUtils');
|
||||
// const populateDatabase = require('@joplin/lib/services/debug/populateDatabase').default;
|
||||
// import populateDatabase from '@joplin/lib/services/debug/populateDatabase';
|
||||
|
||||
const commands = [
|
||||
require('./gui/MainScreen/commands/editAlarm'),
|
||||
@ -97,7 +97,7 @@ const globalCommands = [
|
||||
require('@joplin/lib/commands/synchronize'),
|
||||
];
|
||||
|
||||
const editorCommandDeclarations = require('./gui/NoteEditor/commands/editorCommandDeclarations').default;
|
||||
import editorCommandDeclarations from './gui/NoteEditor/commands/editorCommandDeclarations';
|
||||
|
||||
const pluginClasses = [
|
||||
require('./plugins/GotoAnything').default,
|
||||
@ -709,7 +709,7 @@ class Application extends BaseApplication {
|
||||
// might change the notifications.
|
||||
void AlarmService.updateAllNotifications();
|
||||
|
||||
DecryptionWorker.instance().scheduleStart();
|
||||
void DecryptionWorker.instance().scheduleStart();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@ import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import { stateUtils } from '@joplin/lib/reducer';
|
||||
import ExternalEditWatcher from '@joplin/lib/services/ExternalEditWatcher';
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
const bridge = require('electron').remote.require('./bridge').default;
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
|
@ -1,7 +1,7 @@
|
||||
const React = require('react');
|
||||
const { connect } = require('react-redux');
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const EncryptionService = require('@joplin/lib/services/EncryptionService');
|
||||
const EncryptionService = require('@joplin/lib/services/EncryptionService').default;
|
||||
const { themeStyle } = require('@joplin/lib/theme');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const time = require('@joplin/lib/time').default;
|
||||
|
@ -1,6 +1,6 @@
|
||||
const React = require('react');
|
||||
const { connect } = require('react-redux');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
const Folder = require('@joplin/lib/models/Folder').default;
|
||||
const { themeStyle } = require('@joplin/lib/theme');
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const { filename, basename } = require('@joplin/lib/path-utils');
|
||||
|
@ -10,7 +10,7 @@ import styles_ from './styles';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
|
||||
const bridge = require('electron').remote.require('./bridge').default;
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
import shim from '@joplin/lib/shim';
|
||||
|
||||
const keymapService = KeymapService.instance();
|
||||
|
||||
|
@ -34,7 +34,7 @@ const { connect } = require('react-redux');
|
||||
const { PromptDialog } = require('../PromptDialog.min.js');
|
||||
const NotePropertiesDialog = require('../NotePropertiesDialog.min.js');
|
||||
const PluginManager = require('@joplin/lib/services/PluginManager');
|
||||
const EncryptionService = require('@joplin/lib/services/EncryptionService');
|
||||
import EncryptionService from '@joplin/lib/services/EncryptionService';
|
||||
const ipcRenderer = require('electron').ipcRenderer;
|
||||
|
||||
interface LayerModalState {
|
||||
|
@ -2,8 +2,8 @@ import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/
|
||||
import eventManager from '@joplin/lib/eventManager';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import { stateUtils } from '@joplin/lib/reducer';
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
const time = require('@joplin/lib/time').default;
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import time from '@joplin/lib/time';
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
name: 'editAlarm',
|
||||
|
@ -2,7 +2,7 @@ import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/
|
||||
import shim from '@joplin/lib/shim';
|
||||
import InteropServiceHelper from '../../../InteropServiceHelper';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
const bridge = require('electron').remote.require('./bridge').default;
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
const Folder = require('@joplin/lib/models/Folder');
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
name: 'moveToFolder',
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { CommandContext, CommandDeclaration, CommandRuntime } from '@joplin/lib/services/CommandService';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
const Folder = require('@joplin/lib/models/Folder');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
const bridge = require('electron').remote.require('./bridge').default;
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { utils, CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
const Setting = require('@joplin/lib/models/Setting').default;
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
import Setting from '@joplin/lib/models/Setting';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
const TemplateUtils = require('@joplin/lib/TemplateUtils');
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
const Folder = require('@joplin/lib/models/Folder');
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
name: 'openNote',
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
const Folder = require('@joplin/lib/models/Folder');
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
const bridge = require('electron').remote.require('./bridge').default;
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
const Tag = require('@joplin/lib/models/Tag');
|
||||
import Tag from '@joplin/lib/models/Tag';
|
||||
const bridge = require('electron').remote.require('./bridge').default;
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
const Tag = require('@joplin/lib/models/Tag');
|
||||
import Tag from '@joplin/lib/models/Tag';
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
name: 'setTags',
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import { stateUtils } from '@joplin/lib/reducer';
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
|
||||
export const declaration: CommandDeclaration = {
|
||||
name: 'showNoteContentProperties',
|
||||
|
@ -4,7 +4,7 @@ import { _ } from '@joplin/lib/locale';
|
||||
const { themeStyle } = require('@joplin/lib/theme');
|
||||
const DialogButtonRow = require('./DialogButtonRow.min');
|
||||
const Countable = require('countable');
|
||||
const markupLanguageUtils = require('@joplin/lib/markupLanguageUtils').default;
|
||||
import markupLanguageUtils from '@joplin/lib/markupLanguageUtils';
|
||||
|
||||
interface NoteContentPropertiesDialogProps {
|
||||
themeId: number;
|
||||
|
@ -25,8 +25,7 @@ import { ThemeAppearance } from '@joplin/lib/themes/type';
|
||||
import SpellCheckerService from '@joplin/lib/services/spellChecker/SpellCheckerService';
|
||||
import dialogs from '../../../dialogs';
|
||||
import convertToScreenCoordinates from '../../../utils/convertToScreenCoordinates';
|
||||
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
import { MarkupToHtml } from '@joplin/renderer';
|
||||
const { clipboard } = require('electron');
|
||||
const shared = require('@joplin/lib/components/shared/note-screen-shared.js');
|
||||
const Menu = bridge().Menu;
|
||||
@ -301,7 +300,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
||||
element.id = script.id;
|
||||
|
||||
element.onload = () => {
|
||||
resolve();
|
||||
resolve(null);
|
||||
};
|
||||
|
||||
document.getElementsByTagName('head')[0].appendChild(element);
|
||||
@ -700,7 +699,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
||||
value={props.content}
|
||||
searchMarkers={props.searchMarkers}
|
||||
ref={editorRef}
|
||||
mode={props.contentMarkupLanguage === Note.MARKUP_LANGUAGE_HTML ? 'xml' : 'joplin-markdown'}
|
||||
mode={props.contentMarkupLanguage === MarkupToHtml.MARKUP_LANGUAGE_HTML ? 'xml' : 'joplin-markdown'}
|
||||
codeMirrorTheme={styles.editor.codeMirrorTheme}
|
||||
style={styles.editor}
|
||||
readOnly={props.visiblePanes.indexOf('editor') < 0}
|
||||
|
@ -1,4 +1,4 @@
|
||||
const { isListItem, isEmptyListItem, extractListToken, olLineNumber } = require('@joplin/lib/markdownUtils').default;
|
||||
import markdownUtils from '@joplin/lib/markdownUtils';
|
||||
|
||||
// Markdown list indentation.
|
||||
// If the current line starts with `markup.list` token,
|
||||
@ -21,22 +21,22 @@ export default function useListIdent(CodeMirror: any) {
|
||||
}
|
||||
|
||||
function newListToken(cm: any, line: number) {
|
||||
const currentToken = extractListToken(cm.getLine(line));
|
||||
const currentToken = markdownUtils.extractListToken(cm.getLine(line));
|
||||
const indentLevel = getIndentLevel(cm, line);
|
||||
|
||||
while (--line > 0) {
|
||||
const currentLine = cm.getLine(line);
|
||||
if (!isListItem(currentLine)) return currentToken;
|
||||
if (!markdownUtils.isListItem(currentLine)) return currentToken;
|
||||
|
||||
const indent = getIndentLevel(cm, line);
|
||||
|
||||
if (indent < indentLevel - 1) return currentToken;
|
||||
|
||||
if (indent === indentLevel - 1) {
|
||||
if (olLineNumber(currentLine)) {
|
||||
return `${olLineNumber(currentLine) + 1}. `;
|
||||
if (markdownUtils.olLineNumber(currentLine)) {
|
||||
return `${markdownUtils.olLineNumber(currentLine) + 1}. `;
|
||||
}
|
||||
const token = extractListToken(currentLine);
|
||||
const token = markdownUtils.extractListToken(currentLine);
|
||||
if (token.match(/x/)) {
|
||||
return '- [ ] ';
|
||||
}
|
||||
@ -50,7 +50,7 @@ export default function useListIdent(CodeMirror: any) {
|
||||
// Gets the character coordinates of the start and end of a list token
|
||||
function getListSpan(listTokens: any, line: string) {
|
||||
let start = listTokens[0].start;
|
||||
const token = extractListToken(line);
|
||||
const token = markdownUtils.extractListToken(line);
|
||||
|
||||
if (listTokens.length > 1 && listTokens[0].string.match(/^\s/)) {
|
||||
start = listTokens[1].start;
|
||||
@ -77,10 +77,10 @@ export default function useListIdent(CodeMirror: any) {
|
||||
// this is an edge case for users because there is no clear intended behavior
|
||||
// if the use multicursor with a mix of selected and not selected
|
||||
break;
|
||||
} else if (!isListItem(line) || !isEmptyListItem(line)) {
|
||||
} else if (!markdownUtils.isListItem(line) || !markdownUtils.isEmptyListItem(line)) {
|
||||
cm.replaceRange('\t', anchor, head);
|
||||
} else {
|
||||
if (olLineNumber(line)) {
|
||||
if (markdownUtils.olLineNumber(line)) {
|
||||
const tokens = cm.getLineTokens(anchor.line);
|
||||
const { start, end } = getListSpan(tokens, line);
|
||||
// Resets numbered list to 1.
|
||||
@ -111,7 +111,7 @@ export default function useListIdent(CodeMirror: any) {
|
||||
// this is an edge case for users because there is no clear intended behavior
|
||||
// if the use multicursor with a mix of selected and not selected
|
||||
break;
|
||||
} else if (!isListItem(line) || !isEmptyListItem(line)) {
|
||||
} else if (!markdownUtils.isListItem(line) || !markdownUtils.isEmptyListItem(line)) {
|
||||
cm.indentLine(anchor.line, 'subtract');
|
||||
} else {
|
||||
const newToken = newListToken(cm, anchor.line);
|
||||
@ -156,7 +156,7 @@ export default function useListIdent(CodeMirror: any) {
|
||||
if (ranges.length === 1) {
|
||||
const line = cm.getLine(anchor.line);
|
||||
|
||||
if (isEmptyListItem(line)) {
|
||||
if (markdownUtils.isEmptyListItem(line)) {
|
||||
const tokens = cm.getLineTokens(anchor.line);
|
||||
// A empty list item with an indent will have whitespace as the first token
|
||||
if (tokens.length > 1 && tokens[0].string.match(/^\s/)) {
|
||||
|
@ -17,7 +17,7 @@ import shim from '@joplin/lib/shim';
|
||||
const { MarkupToHtml } = require('@joplin/renderer');
|
||||
const taboverride = require('taboverride');
|
||||
const { reg } = require('@joplin/lib/registry.js');
|
||||
const BaseItem = require('@joplin/lib/models/BaseItem');
|
||||
import BaseItem from '@joplin/lib/models/BaseItem';
|
||||
const { themeStyle } = require('@joplin/lib/theme');
|
||||
const { clipboard } = require('electron');
|
||||
const supportedLocales = require('./supportedLocales');
|
||||
|
@ -9,7 +9,7 @@ import CommandService from '@joplin/lib/services/CommandService';
|
||||
import convertToScreenCoordinates from '../../../../utils/convertToScreenCoordinates';
|
||||
import Setting from '@joplin/lib/models/Setting';
|
||||
|
||||
const Resource = require('@joplin/lib/models/Resource');
|
||||
import Resource from '@joplin/lib/models/Resource';
|
||||
|
||||
const menuUtils = new MenuUtils(CommandService.instance());
|
||||
|
||||
|
@ -35,8 +35,8 @@ const { themeStyle } = require('@joplin/lib/theme');
|
||||
const { substrWithEllipsis } = require('@joplin/lib/string-utils');
|
||||
const NoteSearchBar = require('../NoteSearchBar.min.js');
|
||||
const { reg } = require('@joplin/lib/registry.js');
|
||||
const Note = require('@joplin/lib/models/Note.js');
|
||||
const Folder = require('@joplin/lib/models/Folder.js');
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
const bridge = require('electron').remote.require('./bridge').default;
|
||||
const NoteRevisionViewer = require('../NoteRevisionViewer.min');
|
||||
|
||||
|
@ -4,7 +4,7 @@ import { _ } from '@joplin/lib/locale';
|
||||
const bridge = require('electron').remote.require('./bridge').default;
|
||||
const Menu = bridge().Menu;
|
||||
const MenuItem = bridge().MenuItem;
|
||||
const Resource = require('@joplin/lib/models/Resource.js');
|
||||
import Resource from '@joplin/lib/models/Resource';
|
||||
const fs = require('fs-extra');
|
||||
const { clipboard } = require('electron');
|
||||
const { toSystemSlashes } = require('@joplin/lib/path-utils');
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { FormNote } from './types';
|
||||
|
||||
const HtmlToMd = require('@joplin/lib/HtmlToMd');
|
||||
const Note = require('@joplin/lib/models/Note');
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
const { MarkupToHtml } = require('@joplin/renderer');
|
||||
|
||||
export async function htmlToMarkdown(markupLanguage: number, html: string, originalCss: string): Promise<string> {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user