diff --git a/.travis.yml b/.travis.yml index 9920f0ee1..41a1490f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,6 +44,6 @@ before_install: script: - | cd ElectronClient/app - rsync -aP ../../ReactNativeClient/lib/ lib/ + rsync -aP --delete ../../ReactNativeClient/lib/ lib/ npm install yarn dist diff --git a/BUILD.md b/BUILD.md index 0cf232fed..97567e833 100644 --- a/BUILD.md +++ b/BUILD.md @@ -21,7 +21,7 @@ If you get a node-gyp related error you might need to manually install it: `npm ``` cd ElectronClient/app -rsync -a ../../ReactNativeClient/lib/ lib/ +rsync --delete -a ../../ReactNativeClient/lib/ lib/ npm install yarn dist ``` @@ -41,5 +41,5 @@ From `/ReactNativeClient`, run `npm install`, then `react-native run-ios` or `re From `/CliClient`: - Run `npm install` - Then `build.sh` -- Copy the translations to the build directory: `rsync -aP ../ReactNativeClient/locales/ build/locales/` +- Copy the translations to the build directory: `rsync --delete -aP ../ReactNativeClient/locales/ build/locales/` - Run `run.sh` to start the application for testing. diff --git a/CliClient/app/ResourceServer.js b/CliClient/app/ResourceServer.js index cdeecc617..c7425d039 100644 --- a/CliClient/app/ResourceServer.js +++ b/CliClient/app/ResourceServer.js @@ -1,6 +1,6 @@ const { _ } = require('lib/locale.js'); const { Logger } = require('lib/logger.js'); -const { Resource } = require('lib/models/resource.js'); +const Resource = require('lib/models/Resource.js'); const { netUtils } = require('lib/net-utils.js'); const http = require("http"); diff --git a/CliClient/app/app-gui.js b/CliClient/app/app-gui.js index 19eecda08..24edfee3d 100644 --- a/CliClient/app/app-gui.js +++ b/CliClient/app/app-gui.js @@ -1,9 +1,9 @@ const { Logger } = require('lib/logger.js'); -const { Folder } = require('lib/models/folder.js'); -const { Tag } = require('lib/models/tag.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Note } = require('lib/models/note.js'); -const { Resource } = require('lib/models/resource.js'); +const Folder = require('lib/models/Folder.js'); +const Tag = require('lib/models/Tag.js'); +const BaseModel = require('lib/BaseModel.js'); +const Note = require('lib/models/Note.js'); +const Resource = require('lib/models/Resource.js'); const { cliUtils } = require('./cli-utils.js'); const { reducer, defaultState } = require('lib/reducer.js'); const { splitCommandString } = require('lib/string-utils.js'); diff --git a/CliClient/app/app.js b/CliClient/app/app.js index e46b82b43..4873af882 100644 --- a/CliClient/app/app.js +++ b/CliClient/app/app.js @@ -5,12 +5,12 @@ const { JoplinDatabase } = require('lib/joplin-database.js'); const { Database } = require('lib/database.js'); const { FoldersScreenUtils } = require('lib/folders-screen-utils.js'); const { DatabaseDriverNode } = require('lib/database-driver-node.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { BaseItem } = require('lib/models/base-item.js'); -const { Note } = require('lib/models/note.js'); -const { Tag } = require('lib/models/tag.js'); -const { Setting } = require('lib/models/setting.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const Note = require('lib/models/Note.js'); +const Tag = require('lib/models/Tag.js'); +const Setting = require('lib/models/Setting.js'); const { Logger } = require('lib/logger.js'); const { sprintf } = require('sprintf-js'); const { reg } = require('lib/registry.js'); diff --git a/CliClient/app/cli-integration-tests.js b/CliClient/app/cli-integration-tests.js index a445cce17..b38510af0 100644 --- a/CliClient/app/cli-integration-tests.js +++ b/CliClient/app/cli-integration-tests.js @@ -5,10 +5,10 @@ const { Logger } = require('lib/logger.js'); const { dirname } = require('lib/path-utils.js'); const { DatabaseDriverNode } = require('lib/database-driver-node.js'); const { JoplinDatabase } = require('lib/joplin-database.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); -const { Setting } = require('lib/models/setting.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); +const Setting = require('lib/models/Setting.js'); const { sprintf } = require('sprintf-js'); const exec = require('child_process').exec diff --git a/CliClient/app/command-attach.js b/CliClient/app/command-attach.js index ab7431710..02367e1c7 100644 --- a/CliClient/app/command-attach.js +++ b/CliClient/app/command-attach.js @@ -1,7 +1,7 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseModel } = require('lib/base-model.js'); +const BaseModel = require('lib/BaseModel.js'); const { shim } = require('lib/shim.js'); const fs = require('fs-extra'); diff --git a/CliClient/app/command-cat.js b/CliClient/app/command-cat.js index 15db03fe0..fe585a8ad 100644 --- a/CliClient/app/command-cat.js +++ b/CliClient/app/command-cat.js @@ -1,9 +1,9 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-config.js b/CliClient/app/command-config.js index c72967548..15a3d484a 100644 --- a/CliClient/app/command-config.js +++ b/CliClient/app/command-config.js @@ -1,7 +1,7 @@ const { BaseCommand } = require('./base-command.js'); const { _, setLocale } = require('lib/locale.js'); const { app } = require('./app.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-cp.js b/CliClient/app/command-cp.js index 9bef2918b..05d2938e0 100644 --- a/CliClient/app/command-cp.js +++ b/CliClient/app/command-cp.js @@ -1,9 +1,9 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-done.js b/CliClient/app/command-done.js index 616cf77f9..435662e76 100644 --- a/CliClient/app/command-done.js +++ b/CliClient/app/command-done.js @@ -1,9 +1,9 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); const { time } = require('lib/time-utils.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-dump.js b/CliClient/app/command-dump.js index 61ec789b2..0672c2632 100644 --- a/CliClient/app/command-dump.js +++ b/CliClient/app/command-dump.js @@ -1,9 +1,9 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); -const { Tag } = require('lib/models/tag.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); +const Tag = require('lib/models/Tag.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-edit.js b/CliClient/app/command-edit.js index 9fc7fec7e..0971dbb4b 100644 --- a/CliClient/app/command-edit.js +++ b/CliClient/app/command-edit.js @@ -3,10 +3,10 @@ const { BaseCommand } = require('./base-command.js'); const { uuid } = require('lib/uuid.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); -const { Setting } = require('lib/models/setting.js'); -const { BaseModel } = require('lib/base-model.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); +const Setting = require('lib/models/Setting.js'); +const BaseModel = require('lib/BaseModel.js'); const { cliUtils } = require('./cli-utils.js'); const { time } = require('lib/time-utils.js'); diff --git a/CliClient/app/command-encrypt-config.js b/CliClient/app/command-encrypt-config.js index fa5f97ddc..8dd29fe1c 100644 --- a/CliClient/app/command-encrypt-config.js +++ b/CliClient/app/command-encrypt-config.js @@ -3,7 +3,7 @@ const { _ } = require('lib/locale.js'); const { cliUtils } = require('./cli-utils.js'); const EncryptionService = require('lib/services/EncryptionService'); const MasterKey = require('lib/models/MasterKey'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-export-sync-status.js b/CliClient/app/command-export-sync-status.js index c8ecd7328..5b900c414 100644 --- a/CliClient/app/command-export-sync-status.js +++ b/CliClient/app/command-export-sync-status.js @@ -1,7 +1,7 @@ const { BaseCommand } = require('./base-command.js'); const { Database } = require('lib/database.js'); const { app } = require('./app.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { _ } = require('lib/locale.js'); const { ReportService } = require('lib/services/report.js'); const fs = require('fs-extra'); diff --git a/CliClient/app/command-export.js b/CliClient/app/command-export.js index 798e3dc0c..ce6d70334 100644 --- a/CliClient/app/command-export.js +++ b/CliClient/app/command-export.js @@ -1,7 +1,7 @@ const { BaseCommand } = require('./base-command.js'); const { Exporter } = require('lib/services/exporter.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Note } = require('lib/models/note.js'); +const BaseModel = require('lib/BaseModel.js'); +const Note = require('lib/models/Note.js'); const { reg } = require('lib/registry.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); diff --git a/CliClient/app/command-geoloc.js b/CliClient/app/command-geoloc.js index 32aa9078f..eddb3bf69 100644 --- a/CliClient/app/command-geoloc.js +++ b/CliClient/app/command-geoloc.js @@ -1,9 +1,9 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-help.js b/CliClient/app/command-help.js index a8fe5c957..17f72ab27 100644 --- a/CliClient/app/command-help.js +++ b/CliClient/app/command-help.js @@ -2,7 +2,7 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { renderCommandHelp } = require('./help-utils.js'); const { Database } = require('lib/database.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { wrap } = require('lib/string-utils.js'); const { _ } = require('lib/locale.js'); const { cliUtils } = require('./cli-utils.js'); diff --git a/CliClient/app/command-import-enex.js b/CliClient/app/command-import-enex.js index c32d9828b..a1f4dfc80 100644 --- a/CliClient/app/command-import-enex.js +++ b/CliClient/app/command-import-enex.js @@ -1,7 +1,7 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { Folder } = require('lib/models/folder.js'); +const Folder = require('lib/models/Folder.js'); const { importEnex } = require('lib/import-enex'); const { filename, basename } = require('lib/path-utils.js'); const { cliUtils } = require('./cli-utils.js'); diff --git a/CliClient/app/command-ls.js b/CliClient/app/command-ls.js index 5429ba689..0f6525915 100644 --- a/CliClient/app/command-ls.js +++ b/CliClient/app/command-ls.js @@ -1,10 +1,10 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { Setting } = require('lib/models/setting.js'); -const { Note } = require('lib/models/note.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const Setting = require('lib/models/Setting.js'); +const Note = require('lib/models/Note.js'); const { sprintf } = require('sprintf-js'); const { time } = require('lib/time-utils.js'); const { cliUtils } = require('./cli-utils.js'); diff --git a/CliClient/app/command-mkbook.js b/CliClient/app/command-mkbook.js index 68e5df875..831ff4a0f 100644 --- a/CliClient/app/command-mkbook.js +++ b/CliClient/app/command-mkbook.js @@ -1,7 +1,7 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { Folder } = require('lib/models/folder.js'); +const Folder = require('lib/models/Folder.js'); const { reg } = require('lib/registry.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-mknote.js b/CliClient/app/command-mknote.js index a4d93b3ef..79f4c19a7 100644 --- a/CliClient/app/command-mknote.js +++ b/CliClient/app/command-mknote.js @@ -1,7 +1,7 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { Note } = require('lib/models/note.js'); +const Note = require('lib/models/Note.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-mktodo.js b/CliClient/app/command-mktodo.js index 6163928ee..d96fb5275 100644 --- a/CliClient/app/command-mktodo.js +++ b/CliClient/app/command-mktodo.js @@ -1,7 +1,7 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { Note } = require('lib/models/note.js'); +const Note = require('lib/models/Note.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-mv.js b/CliClient/app/command-mv.js index 9bf37a5c8..729bab96e 100644 --- a/CliClient/app/command-mv.js +++ b/CliClient/app/command-mv.js @@ -1,9 +1,9 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-ren.js b/CliClient/app/command-ren.js index 2e09a5438..f8b4a5dd2 100644 --- a/CliClient/app/command-ren.js +++ b/CliClient/app/command-ren.js @@ -1,9 +1,9 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-rmbook.js b/CliClient/app/command-rmbook.js index c5dc34597..894ccdf32 100644 --- a/CliClient/app/command-rmbook.js +++ b/CliClient/app/command-rmbook.js @@ -1,10 +1,10 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseItem } = require('lib/models/base-item.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); -const { BaseModel } = require('lib/base-model.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); +const BaseModel = require('lib/BaseModel.js'); const { cliUtils } = require('./cli-utils.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-rmnote.js b/CliClient/app/command-rmnote.js index 8ad657763..8e1ecea2f 100644 --- a/CliClient/app/command-rmnote.js +++ b/CliClient/app/command-rmnote.js @@ -1,10 +1,10 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseItem } = require('lib/models/base-item.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); -const { BaseModel } = require('lib/base-model.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); +const BaseModel = require('lib/BaseModel.js'); const { cliUtils } = require('./cli-utils.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-search.js b/CliClient/app/command-search.js index 24031aee4..3ae14ea2c 100644 --- a/CliClient/app/command-search.js +++ b/CliClient/app/command-search.js @@ -1,9 +1,9 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); const { sprintf } = require('sprintf-js'); const { time } = require('lib/time-utils.js'); const { uuid } = require('lib/uuid.js'); diff --git a/CliClient/app/command-set.js b/CliClient/app/command-set.js index 391887523..d6762353b 100644 --- a/CliClient/app/command-set.js +++ b/CliClient/app/command-set.js @@ -1,11 +1,11 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseModel } = require('lib/base-model.js'); +const BaseModel = require('lib/BaseModel.js'); const { Database } = require('lib/database.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); -const { BaseItem } = require('lib/models/base-item.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); +const BaseItem = require('lib/models/BaseItem.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-status.js b/CliClient/app/command-status.js index 1b252e66f..0bda410bf 100644 --- a/CliClient/app/command-status.js +++ b/CliClient/app/command-status.js @@ -1,7 +1,7 @@ const { BaseCommand } = require('./base-command.js'); const { Database } = require('lib/database.js'); const { app } = require('./app.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { _ } = require('lib/locale.js'); const { ReportService } = require('lib/services/report.js'); diff --git a/CliClient/app/command-sync.js b/CliClient/app/command-sync.js index 3df132722..88a3cb6f7 100644 --- a/CliClient/app/command-sync.js +++ b/CliClient/app/command-sync.js @@ -2,8 +2,8 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); const { OneDriveApiNodeUtils } = require('./onedrive-api-node-utils.js'); -const { Setting } = require('lib/models/setting.js'); -const { BaseItem } = require('lib/models/base-item.js'); +const Setting = require('lib/models/Setting.js'); +const BaseItem = require('lib/models/BaseItem.js'); const { Synchronizer } = require('lib/synchronizer.js'); const { reg } = require('lib/registry.js'); const { cliUtils } = require('./cli-utils.js'); diff --git a/CliClient/app/command-tag.js b/CliClient/app/command-tag.js index e31bf2330..f2a38943c 100644 --- a/CliClient/app/command-tag.js +++ b/CliClient/app/command-tag.js @@ -1,8 +1,8 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { Tag } = require('lib/models/tag.js'); -const { BaseModel } = require('lib/base-model.js'); +const Tag = require('lib/models/Tag.js'); +const BaseModel = require('lib/BaseModel.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-todo.js b/CliClient/app/command-todo.js index d31b7faeb..601b92d2d 100644 --- a/CliClient/app/command-todo.js +++ b/CliClient/app/command-todo.js @@ -1,9 +1,9 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); const { time } = require('lib/time-utils.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-undone.js b/CliClient/app/command-undone.js index 282a25dd5..51d2fe77e 100644 --- a/CliClient/app/command-undone.js +++ b/CliClient/app/command-undone.js @@ -1,9 +1,9 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); const { time } = require('lib/time-utils.js'); const CommandDone = require('./command-done.js'); diff --git a/CliClient/app/command-use.js b/CliClient/app/command-use.js index ea27bc861..c25a635c2 100644 --- a/CliClient/app/command-use.js +++ b/CliClient/app/command-use.js @@ -1,8 +1,8 @@ const { BaseCommand } = require('./base-command.js'); const { app } = require('./app.js'); const { _ } = require('lib/locale.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); class Command extends BaseCommand { diff --git a/CliClient/app/command-version.js b/CliClient/app/command-version.js index cfb9bc11a..9a3603b24 100644 --- a/CliClient/app/command-version.js +++ b/CliClient/app/command-version.js @@ -1,5 +1,5 @@ const { BaseCommand } = require('./base-command.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { _ } = require('lib/locale.js'); class Command extends BaseCommand { diff --git a/CliClient/app/fuzzing.js b/CliClient/app/fuzzing.js index 261678760..f28fb0c06 100644 --- a/CliClient/app/fuzzing.js +++ b/CliClient/app/fuzzing.js @@ -2,7 +2,7 @@ const { time } = require('lib/time-utils.js'); const { Logger } = require('lib/logger.js'); -const { Resource } = require('lib/models/resource.js'); +const Resource = require('lib/models/Resource.js'); const { dirname } = require('lib/path-utils.js'); const { FsDriverNode } = require('./fs-driver-node.js'); const lodash = require('lodash'); diff --git a/CliClient/app/help-utils.js b/CliClient/app/help-utils.js index b45d4d0d1..5e9a76f95 100644 --- a/CliClient/app/help-utils.js +++ b/CliClient/app/help-utils.js @@ -1,6 +1,6 @@ const fs = require('fs-extra'); const { wrap } = require('lib/string-utils.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { fileExtension, basename, dirname } = require('lib/path-utils.js'); const { _, setLocale, languageCode } = require('lib/locale.js'); diff --git a/CliClient/app/main.js b/CliClient/app/main.js index 6a6fe36f5..accf86072 100644 --- a/CliClient/app/main.js +++ b/CliClient/app/main.js @@ -4,14 +4,14 @@ require('app-module-path').addPath(__dirname); const { app } = require('./app.js'); -const { Folder } = require('lib/models/folder.js'); -const { Resource } = require('lib/models/resource.js'); -const { BaseItem } = require('lib/models/base-item.js'); -const { Note } = require('lib/models/note.js'); -const { Tag } = require('lib/models/tag.js'); -const { NoteTag } = require('lib/models/note-tag.js'); +const Folder = require('lib/models/Folder.js'); +const Resource = require('lib/models/Resource.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const Note = require('lib/models/Note.js'); +const Tag = require('lib/models/Tag.js'); +const NoteTag = require('lib/models/NoteTag.js'); const MasterKey = require('lib/models/MasterKey'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { Logger } = require('lib/logger.js'); const { FsDriverNode } = require('lib/fs-driver-node.js'); const { shimInit } = require('lib/shim-init-node.js'); diff --git a/CliClient/build.sh b/CliClient/build.sh index bf2394366..2f587e0f0 100755 --- a/CliClient/build.sh +++ b/CliClient/build.sh @@ -4,6 +4,6 @@ ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" BUILD_DIR="$ROOT_DIR/build" rsync -a --exclude "node_modules/" "$ROOT_DIR/app/" "$BUILD_DIR/" -rsync -a "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/" +rsync -a --delete "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/" cp "$ROOT_DIR/package.json" "$BUILD_DIR" chmod 755 "$BUILD_DIR/main.js" \ No newline at end of file diff --git a/CliClient/tests/encryption.js b/CliClient/tests/encryption.js index 7f941bb14..897a6bb40 100644 --- a/CliClient/tests/encryption.js +++ b/CliClient/tests/encryption.js @@ -2,13 +2,13 @@ require('app-module-path').addPath(__dirname); const { time } = require('lib/time-utils.js'); const { setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, objectsEqual, checkThrowAsync } = require('test-utils.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); -const { Tag } = require('lib/models/tag.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); +const Tag = require('lib/models/Tag.js'); const { Database } = require('lib/database.js'); -const { Setting } = require('lib/models/setting.js'); -const { BaseItem } = require('lib/models/base-item.js'); -const { BaseModel } = require('lib/base-model.js'); +const Setting = require('lib/models/Setting.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const BaseModel = require('lib/BaseModel.js'); const MasterKey = require('lib/models/MasterKey'); const SyncTargetRegistry = require('lib/SyncTargetRegistry.js'); const EncryptionService = require('lib/services/EncryptionService.js'); diff --git a/CliClient/tests/synchronizer.js b/CliClient/tests/synchronizer.js index 5466c35be..4ce52e0bb 100644 --- a/CliClient/tests/synchronizer.js +++ b/CliClient/tests/synchronizer.js @@ -2,14 +2,14 @@ require('app-module-path').addPath(__dirname); const { time } = require('lib/time-utils.js'); const { setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId, encryptionService, loadEncryptionMasterKey } = require('test-utils.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); -const { Tag } = require('lib/models/tag.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); +const Tag = require('lib/models/Tag.js'); const { Database } = require('lib/database.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const MasterKey = require('lib/models/MasterKey'); -const { BaseItem } = require('lib/models/base-item.js'); -const { BaseModel } = require('lib/base-model.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const BaseModel = require('lib/BaseModel.js'); const SyncTargetRegistry = require('lib/SyncTargetRegistry.js'); process.on('unhandledRejection', (reason, p) => { diff --git a/CliClient/tests/test-utils.js b/CliClient/tests/test-utils.js index f5d510840..e840c0d0c 100644 --- a/CliClient/tests/test-utils.js +++ b/CliClient/tests/test-utils.js @@ -1,16 +1,16 @@ const fs = require('fs-extra'); const { JoplinDatabase } = require('lib/joplin-database.js'); const { DatabaseDriverNode } = require('lib/database-driver-node.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); -const { Resource } = require('lib/models/resource.js'); -const { Tag } = require('lib/models/tag.js'); -const { NoteTag } = require('lib/models/note-tag.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); +const Resource = require('lib/models/Resource.js'); +const Tag = require('lib/models/Tag.js'); +const NoteTag = require('lib/models/NoteTag.js'); const { Logger } = require('lib/logger.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const MasterKey = require('lib/models/MasterKey'); -const { BaseItem } = require('lib/models/base-item.js'); +const BaseItem = require('lib/models/BaseItem.js'); const { Synchronizer } = require('lib/synchronizer.js'); const { FileApi } = require('lib/file-api.js'); const { FileApiDriverMemory } = require('lib/file-api-driver-memory.js'); diff --git a/ElectronClient/app/app.js b/ElectronClient/app/app.js index 3d9577014..605623450 100644 --- a/ElectronClient/app/app.js +++ b/ElectronClient/app/app.js @@ -2,14 +2,14 @@ require('app-module-path').addPath(__dirname); const { BaseApplication } = require('lib/BaseApplication'); const { FoldersScreenUtils } = require('lib/folders-screen-utils.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { shim } = require('lib/shim.js'); -const { BaseModel } = require('lib/base-model.js'); +const BaseModel = require('lib/BaseModel.js'); const MasterKey = require('lib/models/MasterKey'); const { _, setLocale } = require('lib/locale.js'); const os = require('os'); const fs = require('fs-extra'); -const { Tag } = require('lib/models/tag.js'); +const Tag = require('lib/models/Tag.js'); const { reg } = require('lib/registry.js'); const { sprintf } = require('sprintf-js'); const { JoplinDatabase } = require('lib/joplin-database.js'); diff --git a/ElectronClient/app/gui/ConfigScreen.jsx b/ElectronClient/app/gui/ConfigScreen.jsx index 6a3055464..bcbf6925d 100644 --- a/ElectronClient/app/gui/ConfigScreen.jsx +++ b/ElectronClient/app/gui/ConfigScreen.jsx @@ -1,7 +1,7 @@ const React = require('react'); const { connect } = require('react-redux'); const { reg } = require('lib/registry.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { bridge } = require('electron').remote.require('./bridge'); const { Header } = require('./Header.min.js'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/ImportScreen.jsx b/ElectronClient/app/gui/ImportScreen.jsx index 4cb82bd44..573b4c5a0 100644 --- a/ElectronClient/app/gui/ImportScreen.jsx +++ b/ElectronClient/app/gui/ImportScreen.jsx @@ -1,7 +1,7 @@ const React = require('react'); const { connect } = require('react-redux'); const { reg } = require('lib/registry.js'); -const { Folder } = require('lib/models/folder.js'); +const Folder = require('lib/models/Folder.js'); const { bridge } = require('electron').remote.require('./bridge'); const { Header } = require('./Header.min.js'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/gui/MainScreen.jsx b/ElectronClient/app/gui/MainScreen.jsx index 56efddfd4..b0c361b54 100644 --- a/ElectronClient/app/gui/MainScreen.jsx +++ b/ElectronClient/app/gui/MainScreen.jsx @@ -5,12 +5,12 @@ const { SideBar } = require('./SideBar.min.js'); const { NoteList } = require('./NoteList.min.js'); const { NoteText } = require('./NoteText.min.js'); const { PromptDialog } = require('./PromptDialog.min.js'); -const { Setting } = require('lib/models/setting.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Tag } = require('lib/models/tag.js'); -const { Note } = require('lib/models/note.js'); +const Setting = require('lib/models/Setting.js'); +const BaseModel = require('lib/BaseModel.js'); +const Tag = require('lib/models/Tag.js'); +const Note = require('lib/models/Note.js'); const { uuid } = require('lib/uuid.js'); -const { Folder } = require('lib/models/folder.js'); +const Folder = require('lib/models/Folder.js'); const { themeStyle } = require('../theme.js'); const { _ } = require('lib/locale.js'); const layoutUtils = require('lib/layout-utils.js'); diff --git a/ElectronClient/app/gui/NoteText.jsx b/ElectronClient/app/gui/NoteText.jsx index 885f487ed..6267319b9 100644 --- a/ElectronClient/app/gui/NoteText.jsx +++ b/ElectronClient/app/gui/NoteText.jsx @@ -1,7 +1,7 @@ const React = require('react'); -const { Note } = require('lib/models/note.js'); +const Note = require('lib/models/Note.js'); const { time } = require('lib/time-utils.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { IconButton } = require('./IconButton.min.js'); const Toolbar = require('./Toolbar.min.js'); const { connect } = require('react-redux'); diff --git a/ElectronClient/app/gui/Root.jsx b/ElectronClient/app/gui/Root.jsx index f09c57fc5..8d87ed6a0 100644 --- a/ElectronClient/app/gui/Root.jsx +++ b/ElectronClient/app/gui/Root.jsx @@ -4,7 +4,7 @@ const { createStore } = require('redux'); const { connect, Provider } = require('react-redux'); const { _ } = require('lib/locale.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { MainScreen } = require('./MainScreen.min.js'); const { OneDriveLoginScreen } = require('./OneDriveLoginScreen.min.js'); diff --git a/ElectronClient/app/gui/SideBar.jsx b/ElectronClient/app/gui/SideBar.jsx index d72f079c6..0be2ee6a0 100644 --- a/ElectronClient/app/gui/SideBar.jsx +++ b/ElectronClient/app/gui/SideBar.jsx @@ -2,10 +2,10 @@ const React = require('react'); const { connect } = require('react-redux'); const shared = require('lib/components/shared/side-menu-shared.js'); const { Synchronizer } = require('lib/synchronizer.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); -const { Tag } = require('lib/models/tag.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); +const Tag = require('lib/models/Tag.js'); const { _ } = require('lib/locale.js'); const { themeStyle } = require('../theme.js'); const { bridge } = require('electron').remote.require('./bridge'); diff --git a/ElectronClient/app/gui/StatusScreen.jsx b/ElectronClient/app/gui/StatusScreen.jsx index 5717ac280..a07a53269 100644 --- a/ElectronClient/app/gui/StatusScreen.jsx +++ b/ElectronClient/app/gui/StatusScreen.jsx @@ -1,7 +1,7 @@ const React = require('react'); const { connect } = require('react-redux'); const { reg } = require('lib/registry.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { bridge } = require('electron').remote.require('./bridge'); const { Header } = require('./Header.min.js'); const { themeStyle } = require('../theme.js'); diff --git a/ElectronClient/app/main-html.js b/ElectronClient/app/main-html.js index cc27066e7..bc9560215 100644 --- a/ElectronClient/app/main-html.js +++ b/ElectronClient/app/main-html.js @@ -4,14 +4,14 @@ require('app-module-path').addPath(__dirname); const { app } = require('./app.js'); -const { Folder } = require('lib/models/folder.js'); -const { Resource } = require('lib/models/resource.js'); -const { BaseItem } = require('lib/models/base-item.js'); -const { Note } = require('lib/models/note.js'); -const { Tag } = require('lib/models/tag.js'); -const { NoteTag } = require('lib/models/note-tag.js'); +const Folder = require('lib/models/Folder.js'); +const Resource = require('lib/models/Resource.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const Note = require('lib/models/Note.js'); +const Tag = require('lib/models/Tag.js'); +const NoteTag = require('lib/models/NoteTag.js'); const MasterKey = require('lib/models/MasterKey'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { Logger } = require('lib/logger.js'); const { FsDriverNode } = require('lib/fs-driver-node.js'); const { shimInit } = require('lib/shim-init-node.js'); diff --git a/ElectronClient/app/theme.js b/ElectronClient/app/theme.js index 1fe56dc2c..968f35842 100644 --- a/ElectronClient/app/theme.js +++ b/ElectronClient/app/theme.js @@ -1,4 +1,4 @@ -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const globalStyle = { fontSize: 12, diff --git a/ElectronClient/build.sh b/ElectronClient/build.sh index e8b98e524..1abb7a66f 100755 --- a/ElectronClient/build.sh +++ b/ElectronClient/build.sh @@ -3,7 +3,7 @@ ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" BUILD_DIR="$ROOT_DIR/app" -rsync -a "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/" +rsync -a --delete "$ROOT_DIR/../ReactNativeClient/lib/" "$BUILD_DIR/lib/" cd "$BUILD_DIR" npm run compile diff --git a/ReactNativeClient/lib/BaseApplication.js b/ReactNativeClient/lib/BaseApplication.js index c5fb517db..f48dcf39f 100644 --- a/ReactNativeClient/lib/BaseApplication.js +++ b/ReactNativeClient/lib/BaseApplication.js @@ -4,12 +4,12 @@ const { JoplinDatabase } = require('lib/joplin-database.js'); const { Database } = require('lib/database.js'); const { FoldersScreenUtils } = require('lib/folders-screen-utils.js'); const { DatabaseDriverNode } = require('lib/database-driver-node.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Folder } = require('lib/models/folder.js'); -const { BaseItem } = require('lib/models/base-item.js'); -const { Note } = require('lib/models/note.js'); -const { Tag } = require('lib/models/tag.js'); -const { Setting } = require('lib/models/setting.js'); +const BaseModel = require('lib/BaseModel.js'); +const Folder = require('lib/models/Folder.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const Note = require('lib/models/Note.js'); +const Tag = require('lib/models/Tag.js'); +const Setting = require('lib/models/Setting.js'); const { Logger } = require('lib/logger.js'); const { splitCommandString } = require('lib/string-utils.js'); const { sprintf } = require('sprintf-js'); diff --git a/ReactNativeClient/lib/base-model.js b/ReactNativeClient/lib/BaseModel.js similarity index 99% rename from ReactNativeClient/lib/base-model.js rename to ReactNativeClient/lib/BaseModel.js index c7beca81a..fd20ea62e 100644 --- a/ReactNativeClient/lib/base-model.js +++ b/ReactNativeClient/lib/BaseModel.js @@ -406,4 +406,4 @@ BaseModel.TYPE_MASTER_KEY = 9; BaseModel.db_ = null; BaseModel.dispatch = function(o) {}; -module.exports = { BaseModel }; \ No newline at end of file +module.exports = BaseModel; \ No newline at end of file diff --git a/ReactNativeClient/lib/MdToHtml.js b/ReactNativeClient/lib/MdToHtml.js index c181d5612..24558e346 100644 --- a/ReactNativeClient/lib/MdToHtml.js +++ b/ReactNativeClient/lib/MdToHtml.js @@ -1,7 +1,7 @@ const MarkdownIt = require('markdown-it'); const Entities = require('html-entities').AllHtmlEntities; const htmlentities = (new Entities()).encode; -const { Resource } = require('lib/models/resource.js'); +const Resource = require('lib/models/Resource.js'); const ModelCache = require('lib/ModelCache'); const { shim } = require('lib/shim.js'); const md5 = require('md5'); diff --git a/ReactNativeClient/lib/SyncTargetFilesystem.js b/ReactNativeClient/lib/SyncTargetFilesystem.js index 31e6254c3..cf472a55e 100644 --- a/ReactNativeClient/lib/SyncTargetFilesystem.js +++ b/ReactNativeClient/lib/SyncTargetFilesystem.js @@ -1,6 +1,6 @@ const BaseSyncTarget = require('lib/BaseSyncTarget.js'); const { _ } = require('lib/locale.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { FileApi } = require('lib/file-api.js'); const { FileApiDriverLocal } = require('lib/file-api-driver-local.js'); const { Synchronizer } = require('lib/synchronizer.js'); diff --git a/ReactNativeClient/lib/SyncTargetMemory.js b/ReactNativeClient/lib/SyncTargetMemory.js index d47fedfa5..d0ac33461 100644 --- a/ReactNativeClient/lib/SyncTargetMemory.js +++ b/ReactNativeClient/lib/SyncTargetMemory.js @@ -1,6 +1,6 @@ const BaseSyncTarget = require('lib/BaseSyncTarget.js'); const { _ } = require('lib/locale.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { FileApi } = require('lib/file-api.js'); const { FileApiDriverMemory } = require('lib/file-api-driver-memory.js'); const { Synchronizer } = require('lib/synchronizer.js'); diff --git a/ReactNativeClient/lib/SyncTargetOneDrive.js b/ReactNativeClient/lib/SyncTargetOneDrive.js index be71041bb..03d0c62dc 100644 --- a/ReactNativeClient/lib/SyncTargetOneDrive.js +++ b/ReactNativeClient/lib/SyncTargetOneDrive.js @@ -1,7 +1,7 @@ const BaseSyncTarget = require('lib/BaseSyncTarget.js'); const { _ } = require('lib/locale.js'); const { OneDriveApi } = require('lib/onedrive-api.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { parameters } = require('lib/parameters.js'); const { FileApi } = require('lib/file-api.js'); const { Synchronizer } = require('lib/synchronizer.js'); diff --git a/ReactNativeClient/lib/SyncTargetOneDriveDev.js b/ReactNativeClient/lib/SyncTargetOneDriveDev.js index aa3ed7231..f60f430d3 100644 --- a/ReactNativeClient/lib/SyncTargetOneDriveDev.js +++ b/ReactNativeClient/lib/SyncTargetOneDriveDev.js @@ -2,7 +2,7 @@ const BaseSyncTarget = require('lib/BaseSyncTarget.js'); const SyncTargetOneDrive = require('lib/SyncTargetOneDrive.js'); const { _ } = require('lib/locale.js'); const { OneDriveApi } = require('lib/onedrive-api.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { parameters } = require('lib/parameters.js'); const { FileApi } = require('lib/file-api.js'); const { Synchronizer } = require('lib/synchronizer.js'); diff --git a/ReactNativeClient/lib/components/global-style.js b/ReactNativeClient/lib/components/global-style.js index 8eeebb594..c98bf8677 100644 --- a/ReactNativeClient/lib/components/global-style.js +++ b/ReactNativeClient/lib/components/global-style.js @@ -1,4 +1,4 @@ -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const globalStyle = { fontSize: 16, diff --git a/ReactNativeClient/lib/components/note-body-viewer.js b/ReactNativeClient/lib/components/note-body-viewer.js index d305fe6f1..b4f025261 100644 --- a/ReactNativeClient/lib/components/note-body-viewer.js +++ b/ReactNativeClient/lib/components/note-body-viewer.js @@ -1,8 +1,8 @@ const React = require('react'); const Component = React.Component; const { Platform, WebView, View, Linking } = require('react-native'); const { globalStyle } = require('lib/components/global-style.js'); -const { Resource } = require('lib/models/resource.js'); -const { Setting } = require('lib/models/setting.js'); +const Resource = require('lib/models/Resource.js'); +const Setting = require('lib/models/Setting.js'); const { reg } = require('lib/registry.js'); const MdToHtml = require('lib/MdToHtml.js'); diff --git a/ReactNativeClient/lib/components/note-item.js b/ReactNativeClient/lib/components/note-item.js index 506fb35f4..078d406e7 100644 --- a/ReactNativeClient/lib/components/note-item.js +++ b/ReactNativeClient/lib/components/note-item.js @@ -5,7 +5,7 @@ const { Log } = require('lib/log.js'); const { _ } = require('lib/locale.js'); const { Checkbox } = require('lib/components/checkbox.js'); const { reg } = require('lib/registry.js'); -const { Note } = require('lib/models/note.js'); +const Note = require('lib/models/Note.js'); const { time } = require('lib/time-utils.js'); const { globalStyle, themeStyle } = require('lib/components/global-style.js'); diff --git a/ReactNativeClient/lib/components/note-list.js b/ReactNativeClient/lib/components/note-list.js index a8eec9ed2..1f668e9f3 100644 --- a/ReactNativeClient/lib/components/note-list.js +++ b/ReactNativeClient/lib/components/note-list.js @@ -6,8 +6,8 @@ const { _ } = require('lib/locale.js'); const { Checkbox } = require('lib/components/checkbox.js'); const { NoteItem } = require('lib/components/note-item.js'); const { reg } = require('lib/registry.js'); -const { Note } = require('lib/models/note.js'); -const { Setting } = require('lib/models/setting.js'); +const Note = require('lib/models/Note.js'); +const Setting = require('lib/models/Setting.js'); const { time } = require('lib/time-utils.js'); const { themeStyle } = require('lib/components/global-style.js'); diff --git a/ReactNativeClient/lib/components/screen-header.js b/ReactNativeClient/lib/components/screen-header.js index f746b376b..66f4f1acd 100644 --- a/ReactNativeClient/lib/components/screen-header.js +++ b/ReactNativeClient/lib/components/screen-header.js @@ -7,9 +7,9 @@ const { BackButtonService } = require('lib/services/back-button.js'); const { ReportService } = require('lib/services/report.js'); const { Menu, MenuOptions, MenuOption, MenuTrigger } = require('react-native-popup-menu'); const { _ } = require('lib/locale.js'); -const { Setting } = require('lib/models/setting.js'); -const { Note } = require('lib/models/note.js'); -const { Folder } = require('lib/models/folder.js'); +const Setting = require('lib/models/Setting.js'); +const Note = require('lib/models/Note.js'); +const Folder = require('lib/models/Folder.js'); const { FileApi } = require('lib/file-api.js'); const { FileApiDriverOneDrive } = require('lib/file-api-driver-onedrive.js'); const { reg } = require('lib/registry.js'); diff --git a/ReactNativeClient/lib/components/screens/config.js b/ReactNativeClient/lib/components/screens/config.js index bdaf9c2cf..b685b8f5f 100644 --- a/ReactNativeClient/lib/components/screens/config.js +++ b/ReactNativeClient/lib/components/screens/config.js @@ -6,7 +6,7 @@ const { _, setLocale } = require('lib/locale.js'); const { BaseScreenComponent } = require('lib/components/base-screen.js'); const { Dropdown } = require('lib/components/Dropdown.js'); const { themeStyle } = require('lib/components/global-style.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); class ConfigScreenComponent extends BaseScreenComponent { diff --git a/ReactNativeClient/lib/components/screens/folder.js b/ReactNativeClient/lib/components/screens/folder.js index c9c779786..288f4f4a9 100644 --- a/ReactNativeClient/lib/components/screens/folder.js +++ b/ReactNativeClient/lib/components/screens/folder.js @@ -3,8 +3,8 @@ const { View, Button, TextInput, StyleSheet } = require('react-native'); const { connect } = require('react-redux'); const { Log } = require('lib/log.js'); const { ActionButton } = require('lib/components/action-button.js'); -const { Folder } = require('lib/models/folder.js'); -const { BaseModel } = require('lib/base-model.js'); +const Folder = require('lib/models/Folder.js'); +const BaseModel = require('lib/BaseModel.js'); const { ScreenHeader } = require('lib/components/screen-header.js'); const { reg } = require('lib/registry.js'); const { BaseScreenComponent } = require('lib/components/base-screen.js'); diff --git a/ReactNativeClient/lib/components/screens/note.js b/ReactNativeClient/lib/components/screens/note.js index 8e7eb42dd..5c1be73de 100644 --- a/ReactNativeClient/lib/components/screens/note.js +++ b/ReactNativeClient/lib/components/screens/note.js @@ -4,12 +4,12 @@ const { connect } = require('react-redux'); const { uuid } = require('lib/uuid.js'); const { Log } = require('lib/log.js'); const RNFS = require('react-native-fs'); -const { Note } = require('lib/models/note.js'); -const { Setting } = require('lib/models/setting.js'); -const { Resource } = require('lib/models/resource.js'); -const { Folder } = require('lib/models/folder.js'); +const Note = require('lib/models/Note.js'); +const Setting = require('lib/models/Setting.js'); +const Resource = require('lib/models/Resource.js'); +const Folder = require('lib/models/Folder.js'); const { BackButtonService } = require('lib/services/back-button.js'); -const { BaseModel } = require('lib/base-model.js'); +const BaseModel = require('lib/BaseModel.js'); const { ActionButton } = require('lib/components/action-button.js'); const Icon = require('react-native-vector-icons/Ionicons').default; const { fileExtension, basename, safeFileExtension } = require('lib/path-utils.js'); diff --git a/ReactNativeClient/lib/components/screens/notes.js b/ReactNativeClient/lib/components/screens/notes.js index 66402ed23..55012d6b0 100644 --- a/ReactNativeClient/lib/components/screens/notes.js +++ b/ReactNativeClient/lib/components/screens/notes.js @@ -4,10 +4,10 @@ const { connect } = require('react-redux'); const { reg } = require('lib/registry.js'); const { Log } = require('lib/log.js'); const { NoteList } = require('lib/components/note-list.js'); -const { Folder } = require('lib/models/folder.js'); -const { Tag } = require('lib/models/tag.js'); -const { Note } = require('lib/models/note.js'); -const { Setting } = require('lib/models/setting.js'); +const Folder = require('lib/models/Folder.js'); +const Tag = require('lib/models/Tag.js'); +const Note = require('lib/models/Note.js'); +const Setting = require('lib/models/Setting.js'); const { themeStyle } = require('lib/components/global-style.js'); const { ScreenHeader } = require('lib/components/screen-header.js'); const { MenuOption, Text } = require('react-native-popup-menu'); diff --git a/ReactNativeClient/lib/components/screens/onedrive-login.js b/ReactNativeClient/lib/components/screens/onedrive-login.js index 5706a40be..65e525d34 100644 --- a/ReactNativeClient/lib/components/screens/onedrive-login.js +++ b/ReactNativeClient/lib/components/screens/onedrive-login.js @@ -3,7 +3,7 @@ const { View } = require('react-native'); const { WebView, Button, Text } = require('react-native'); const { connect } = require('react-redux'); const { Log } = require('lib/log.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { ScreenHeader } = require('lib/components/screen-header.js'); const { reg } = require('lib/registry.js'); const { _ } = require('lib/locale.js'); diff --git a/ReactNativeClient/lib/components/screens/search.js b/ReactNativeClient/lib/components/screens/search.js index 3ef5b6096..6ace75715 100644 --- a/ReactNativeClient/lib/components/screens/search.js +++ b/ReactNativeClient/lib/components/screens/search.js @@ -4,7 +4,7 @@ const { connect } = require('react-redux'); const { ScreenHeader } = require('lib/components/screen-header.js'); const Icon = require('react-native-vector-icons/Ionicons').default; const { _ } = require('lib/locale.js'); -const { Note } = require('lib/models/note.js'); +const Note = require('lib/models/Note.js'); const { NoteItem } = require('lib/components/note-item.js'); const { BaseScreenComponent } = require('lib/components/base-screen.js'); const { themeStyle } = require('lib/components/global-style.js'); diff --git a/ReactNativeClient/lib/components/screens/status.js b/ReactNativeClient/lib/components/screens/status.js index abb3cd9d7..8ce07e0b9 100644 --- a/ReactNativeClient/lib/components/screens/status.js +++ b/ReactNativeClient/lib/components/screens/status.js @@ -1,15 +1,15 @@ const React = require('react'); const Component = React.Component; const { ListView, StyleSheet, View, Text, Button, FlatList } = require('react-native'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { connect } = require('react-redux'); const { Log } = require('lib/log.js'); const { reg } = require('lib/registry.js'); const { ScreenHeader } = require('lib/components/screen-header.js'); const { time } = require('lib/time-utils'); const { Logger } = require('lib/logger.js'); -const { BaseItem } = require('lib/models/base-item.js'); +const BaseItem = require('lib/models/BaseItem.js'); const { Database } = require('lib/database.js'); -const { Folder } = require('lib/models/folder.js'); +const Folder = require('lib/models/Folder.js'); const { ReportService } = require('lib/services/report.js'); const { _ } = require('lib/locale.js'); const { BaseScreenComponent } = require('lib/components/base-screen.js'); diff --git a/ReactNativeClient/lib/components/screens/tag.js b/ReactNativeClient/lib/components/screens/tag.js index 150672f1e..df3bdba2f 100644 --- a/ReactNativeClient/lib/components/screens/tag.js +++ b/ReactNativeClient/lib/components/screens/tag.js @@ -4,7 +4,7 @@ const { connect } = require('react-redux'); const { ScreenHeader } = require('lib/components/screen-header.js'); const Icon = require('react-native-vector-icons/Ionicons').default; const { _ } = require('lib/locale.js'); -const { Note } = require('lib/models/note.js'); +const Note = require('lib/models/Note.js'); const { NoteItem } = require('lib/components/note-item.js'); const { BaseScreenComponent } = require('lib/components/base-screen.js'); const { globalStyle } = require('lib/components/global-style.js'); diff --git a/ReactNativeClient/lib/components/shared/note-screen-shared.js b/ReactNativeClient/lib/components/shared/note-screen-shared.js index 3e1328f4f..2c2a3851e 100644 --- a/ReactNativeClient/lib/components/shared/note-screen-shared.js +++ b/ReactNativeClient/lib/components/shared/note-screen-shared.js @@ -1,7 +1,7 @@ const { reg } = require('lib/registry.js'); -const { Folder } = require('lib/models/folder.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Note } = require('lib/models/note.js'); +const Folder = require('lib/models/Folder.js'); +const BaseModel = require('lib/BaseModel.js'); +const Note = require('lib/models/Note.js'); const shared = {}; diff --git a/ReactNativeClient/lib/components/shared/side-menu-shared.js b/ReactNativeClient/lib/components/shared/side-menu-shared.js index 3accd3533..8cedc59c0 100644 --- a/ReactNativeClient/lib/components/shared/side-menu-shared.js +++ b/ReactNativeClient/lib/components/shared/side-menu-shared.js @@ -31,7 +31,7 @@ shared.renderSearches = function(props, renderItem) { } shared.synchronize_press = async function(comp) { - const { Setting } = require('lib/models/setting.js'); + const Setting = require('lib/models/Setting.js'); const { reg } = require('lib/registry.js'); const action = comp.props.syncStarted ? 'cancel' : 'start'; diff --git a/ReactNativeClient/lib/components/side-menu-content.js b/ReactNativeClient/lib/components/side-menu-content.js index d4abbcca9..ac33fde64 100644 --- a/ReactNativeClient/lib/components/side-menu-content.js +++ b/ReactNativeClient/lib/components/side-menu-content.js @@ -3,9 +3,9 @@ const { TouchableOpacity , Button, Text, Image, StyleSheet, ScrollView, View } = const { connect } = require('react-redux'); const Icon = require('react-native-vector-icons/Ionicons').default; const { Log } = require('lib/log.js'); -const { Tag } = require('lib/models/tag.js'); -const { Note } = require('lib/models/note.js'); -const { Setting } = require('lib/models/setting.js'); +const Tag = require('lib/models/Tag.js'); +const Note = require('lib/models/Note.js'); +const Setting = require('lib/models/Setting.js'); const { FoldersScreenUtils } = require('lib/folders-screen-utils.js'); const { Synchronizer } = require('lib/synchronizer.js'); const { reg } = require('lib/registry.js'); diff --git a/ReactNativeClient/lib/file-api-driver-local.js b/ReactNativeClient/lib/file-api-driver-local.js index 3c6b605a7..2ffc22f72 100644 --- a/ReactNativeClient/lib/file-api-driver-local.js +++ b/ReactNativeClient/lib/file-api-driver-local.js @@ -1,7 +1,7 @@ const fs = require('fs-extra'); const { promiseChain } = require('lib/promise-utils.js'); const moment = require('moment'); -const { BaseItem } = require('lib/models/base-item.js'); +const BaseItem = require('lib/models/BaseItem.js'); const { time } = require('lib/time-utils.js'); // NOTE: when synchronising with the file system the time resolution is the second (unlike milliseconds for OneDrive for instance). diff --git a/ReactNativeClient/lib/folders-screen-utils.js b/ReactNativeClient/lib/folders-screen-utils.js index 93c5a1a57..1a6971da4 100644 --- a/ReactNativeClient/lib/folders-screen-utils.js +++ b/ReactNativeClient/lib/folders-screen-utils.js @@ -1,4 +1,4 @@ -const { Folder } = require('lib/models/folder.js'); +const Folder = require('lib/models/Folder.js'); class FoldersScreenUtils { diff --git a/ReactNativeClient/lib/geolocation-react.js b/ReactNativeClient/lib/geolocation-react.js index f06f8861f..dbb2ca1f5 100644 --- a/ReactNativeClient/lib/geolocation-react.js +++ b/ReactNativeClient/lib/geolocation-react.js @@ -1,4 +1,4 @@ -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); class GeolocationReact { diff --git a/ReactNativeClient/lib/import-enex.js b/ReactNativeClient/lib/import-enex.js index 5fa08ed2f..8ebada188 100644 --- a/ReactNativeClient/lib/import-enex.js +++ b/ReactNativeClient/lib/import-enex.js @@ -2,11 +2,11 @@ const { uuid } = require('lib/uuid.js'); const moment = require('moment'); const { promiseChain } = require('lib/promise-utils.js'); const { folderItemFilename } = require('lib/string-utils.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Note } = require('lib/models/note.js'); -const { Tag } = require('lib/models/tag.js'); -const { Resource } = require('lib/models/resource.js'); -const { Folder } = require('lib/models/folder.js'); +const BaseModel = require('lib/BaseModel.js'); +const Note = require('lib/models/Note.js'); +const Tag = require('lib/models/Tag.js'); +const Resource = require('lib/models/Resource.js'); +const Folder = require('lib/models/Folder.js'); const { enexXmlToMd } = require('./import-enex-md-gen.js'); const { time } = require('lib/time-utils.js'); const Levenshtein = require('levenshtein'); diff --git a/ReactNativeClient/lib/models/Alarm.js b/ReactNativeClient/lib/models/Alarm.js index b7095c288..30e0fdc0a 100644 --- a/ReactNativeClient/lib/models/Alarm.js +++ b/ReactNativeClient/lib/models/Alarm.js @@ -1,5 +1,5 @@ -const { BaseModel } = require('lib/base-model.js'); -const { Note } = require('lib/models/note.js'); +const BaseModel = require('lib/BaseModel.js'); +const Note = require('lib/models/Note.js'); class Alarm extends BaseModel { diff --git a/ReactNativeClient/lib/models/base-item.js b/ReactNativeClient/lib/models/BaseItem.js similarity index 99% rename from ReactNativeClient/lib/models/base-item.js rename to ReactNativeClient/lib/models/BaseItem.js index 551a1d645..01e2f77d1 100644 --- a/ReactNativeClient/lib/models/base-item.js +++ b/ReactNativeClient/lib/models/BaseItem.js @@ -1,6 +1,6 @@ -const { BaseModel } = require('lib/base-model.js'); +const BaseModel = require('lib/BaseModel.js'); const { Database } = require('lib/database.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { time } = require('lib/time-utils.js'); const { sprintf } = require('sprintf-js'); const moment = require('moment'); @@ -511,4 +511,4 @@ BaseItem.syncItemDefinitions_ = [ { type: BaseModel.TYPE_MASTER_KEY, className: 'MasterKey' }, ]; -module.exports = { BaseItem }; \ No newline at end of file +module.exports = BaseItem; \ No newline at end of file diff --git a/ReactNativeClient/lib/models/folder.js b/ReactNativeClient/lib/models/Folder.js similarity index 95% rename from ReactNativeClient/lib/models/folder.js rename to ReactNativeClient/lib/models/Folder.js index 55f332132..1e06c1367 100644 --- a/ReactNativeClient/lib/models/folder.js +++ b/ReactNativeClient/lib/models/Folder.js @@ -1,13 +1,13 @@ -const { BaseModel } = require('lib/base-model.js'); +const BaseModel = require('lib/BaseModel.js'); const { Log } = require('lib/log.js'); const { promiseChain } = require('lib/promise-utils.js'); const { time } = require('lib/time-utils.js'); -const { Note } = require('lib/models/note.js'); -const { Setting } = require('lib/models/setting.js'); +const Note = require('lib/models/Note.js'); +const Setting = require('lib/models/Setting.js'); const { Database } = require('lib/database.js'); const { _ } = require('lib/locale.js'); const moment = require('moment'); -const { BaseItem } = require('lib/models/base-item.js'); +const BaseItem = require('lib/models/BaseItem.js'); const lodash = require('lodash'); class Folder extends BaseItem { @@ -165,4 +165,4 @@ class Folder extends BaseItem { } -module.exports = { Folder }; \ No newline at end of file +module.exports = Folder; \ No newline at end of file diff --git a/ReactNativeClient/lib/models/MasterKey.js b/ReactNativeClient/lib/models/MasterKey.js index b40fb9fc4..37a1a5e1e 100644 --- a/ReactNativeClient/lib/models/MasterKey.js +++ b/ReactNativeClient/lib/models/MasterKey.js @@ -1,5 +1,5 @@ -const { BaseModel } = require('lib/base-model.js'); -const { BaseItem } = require('lib/models/base-item.js'); +const BaseModel = require('lib/BaseModel.js'); +const BaseItem = require('lib/models/BaseItem.js'); class MasterKey extends BaseItem { diff --git a/ReactNativeClient/lib/models/note.js b/ReactNativeClient/lib/models/Note.js similarity index 98% rename from ReactNativeClient/lib/models/note.js rename to ReactNativeClient/lib/models/Note.js index 144dbd886..c510b55a1 100644 --- a/ReactNativeClient/lib/models/note.js +++ b/ReactNativeClient/lib/models/Note.js @@ -1,8 +1,8 @@ -const { BaseModel } = require('lib/base-model.js'); +const BaseModel = require('lib/BaseModel.js'); const { Log } = require('lib/log.js'); const { sprintf } = require('sprintf-js'); -const { BaseItem } = require('lib/models/base-item.js'); -const { Setting } = require('lib/models/setting.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const Setting = require('lib/models/Setting.js'); const { shim } = require('lib/shim.js'); const { time } = require('lib/time-utils.js'); const { _ } = require('lib/locale.js'); @@ -453,4 +453,4 @@ class Note extends BaseItem { Note.updateGeolocationEnabled_ = true; Note.geolocationUpdating_ = false; -module.exports = { Note }; \ No newline at end of file +module.exports = Note; \ No newline at end of file diff --git a/ReactNativeClient/lib/models/note-tag.js b/ReactNativeClient/lib/models/NoteTag.js similarity index 84% rename from ReactNativeClient/lib/models/note-tag.js rename to ReactNativeClient/lib/models/NoteTag.js index b7808e531..b2de61265 100644 --- a/ReactNativeClient/lib/models/note-tag.js +++ b/ReactNativeClient/lib/models/NoteTag.js @@ -1,5 +1,5 @@ -const { BaseItem } = require('lib/models/base-item.js'); -const { BaseModel } = require('lib/base-model.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const BaseModel = require('lib/BaseModel.js'); class NoteTag extends BaseItem { @@ -33,4 +33,4 @@ class NoteTag extends BaseItem { } -module.exports = { NoteTag }; \ No newline at end of file +module.exports = NoteTag; \ No newline at end of file diff --git a/ReactNativeClient/lib/models/resource.js b/ReactNativeClient/lib/models/Resource.js similarity index 92% rename from ReactNativeClient/lib/models/resource.js rename to ReactNativeClient/lib/models/Resource.js index ccd91bb84..e44678cad 100644 --- a/ReactNativeClient/lib/models/resource.js +++ b/ReactNativeClient/lib/models/Resource.js @@ -1,6 +1,6 @@ -const { BaseModel } = require('lib/base-model.js'); -const { BaseItem } = require('lib/models/base-item.js'); -const { Setting } = require('lib/models/setting.js'); +const BaseModel = require('lib/BaseModel.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const Setting = require('lib/models/Setting.js'); const { mime } = require('lib/mime-utils.js'); const { filename } = require('lib/path-utils.js'); const { FsDriverDummy } = require('lib/fs-driver-dummy.js'); @@ -84,4 +84,4 @@ class Resource extends BaseItem { Resource.IMAGE_MAX_DIMENSION = 1920; -module.exports = { Resource }; \ No newline at end of file +module.exports = Resource; \ No newline at end of file diff --git a/ReactNativeClient/lib/models/setting.js b/ReactNativeClient/lib/models/Setting.js similarity index 99% rename from ReactNativeClient/lib/models/setting.js rename to ReactNativeClient/lib/models/Setting.js index 03de34f08..6c9e9d9c0 100644 --- a/ReactNativeClient/lib/models/setting.js +++ b/ReactNativeClient/lib/models/Setting.js @@ -1,4 +1,4 @@ -const { BaseModel } = require('lib/base-model.js'); +const BaseModel = require('lib/BaseModel.js'); const { Database } = require('lib/database.js'); const { Logger } = require('lib/logger.js'); const SyncTargetRegistry = require('lib/SyncTargetRegistry.js'); @@ -442,4 +442,4 @@ Setting.constants_ = { openDevTools: false, } -module.exports = { Setting }; \ No newline at end of file +module.exports = Setting; \ No newline at end of file diff --git a/ReactNativeClient/lib/models/tag.js b/ReactNativeClient/lib/models/Tag.js similarity index 93% rename from ReactNativeClient/lib/models/tag.js rename to ReactNativeClient/lib/models/Tag.js index 3a2cc7106..806ae302d 100644 --- a/ReactNativeClient/lib/models/tag.js +++ b/ReactNativeClient/lib/models/Tag.js @@ -1,7 +1,7 @@ -const { BaseModel } = require('lib/base-model.js'); -const { BaseItem } = require('lib/models/base-item.js'); -const { NoteTag } = require('lib/models/note-tag.js'); -const { Note } = require('lib/models/note.js'); +const BaseModel = require('lib/BaseModel.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const NoteTag = require('lib/models/NoteTag.js'); +const Note = require('lib/models/Note.js'); const { time } = require('lib/time-utils.js'); class Tag extends BaseItem { @@ -140,4 +140,4 @@ class Tag extends BaseItem { } -module.exports = { Tag }; \ No newline at end of file +module.exports = Tag; \ No newline at end of file diff --git a/ReactNativeClient/lib/parameters.js b/ReactNativeClient/lib/parameters.js index 91fd46684..53002131d 100644 --- a/ReactNativeClient/lib/parameters.js +++ b/ReactNativeClient/lib/parameters.js @@ -1,4 +1,4 @@ -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const parameters_ = {}; diff --git a/ReactNativeClient/lib/reducer.js b/ReactNativeClient/lib/reducer.js index c7de674e0..4fda8d1c5 100644 --- a/ReactNativeClient/lib/reducer.js +++ b/ReactNativeClient/lib/reducer.js @@ -1,5 +1,5 @@ -const { Note } = require('lib/models/note.js'); -const { Folder } = require('lib/models/folder.js'); +const Note = require('lib/models/Note.js'); +const Folder = require('lib/models/Folder.js'); const ArrayUtils = require('lib/ArrayUtils.js'); const defaultState = { diff --git a/ReactNativeClient/lib/registry.js b/ReactNativeClient/lib/registry.js index fd624946e..ad4f7833b 100644 --- a/ReactNativeClient/lib/registry.js +++ b/ReactNativeClient/lib/registry.js @@ -1,5 +1,5 @@ const { Logger } = require('lib/logger.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { shim } = require('lib/shim.js'); const SyncTargetRegistry = require('lib/SyncTargetRegistry.js'); const { _ } = require('lib/locale.js'); diff --git a/ReactNativeClient/lib/services/AlarmService.js b/ReactNativeClient/lib/services/AlarmService.js index 4817239ca..84349a547 100644 --- a/ReactNativeClient/lib/services/AlarmService.js +++ b/ReactNativeClient/lib/services/AlarmService.js @@ -1,4 +1,4 @@ -const { Note } = require('lib/models/note.js'); +const Note = require('lib/models/Note.js'); const Alarm = require('lib/models/Alarm.js'); class AlarmService { diff --git a/ReactNativeClient/lib/services/EncryptionService.js b/ReactNativeClient/lib/services/EncryptionService.js index 94e868ac1..b079c3482 100644 --- a/ReactNativeClient/lib/services/EncryptionService.js +++ b/ReactNativeClient/lib/services/EncryptionService.js @@ -1,6 +1,6 @@ const { padLeft } = require('lib/string-utils.js'); const { shim } = require('lib/shim.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const MasterKey = require('lib/models/MasterKey'); function hexPad(s, length) { diff --git a/ReactNativeClient/lib/services/exporter.js b/ReactNativeClient/lib/services/exporter.js index fc33b1d59..65044be5a 100644 --- a/ReactNativeClient/lib/services/exporter.js +++ b/ReactNativeClient/lib/services/exporter.js @@ -1,10 +1,10 @@ -const { BaseItem } = require('lib/models/base-item.js'); -const { BaseModel } = require('lib/base-model.js'); -const { Resource } = require('lib/models/resource.js'); -const { Folder } = require('lib/models/folder.js'); -const { NoteTag } = require('lib/models/note-tag.js'); -const { Note } = require('lib/models/note.js'); -const { Tag } = require('lib/models/tag.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const BaseModel = require('lib/BaseModel.js'); +const Resource = require('lib/models/Resource.js'); +const Folder = require('lib/models/Folder.js'); +const NoteTag = require('lib/models/NoteTag.js'); +const Note = require('lib/models/Note.js'); +const Tag = require('lib/models/Tag.js'); const { basename } = require('lib/path-utils.js'); const fs = require('fs-extra'); diff --git a/ReactNativeClient/lib/services/report.js b/ReactNativeClient/lib/services/report.js index 815ec2129..568d46472 100644 --- a/ReactNativeClient/lib/services/report.js +++ b/ReactNativeClient/lib/services/report.js @@ -1,8 +1,8 @@ const { time } = require('lib/time-utils'); -const { BaseItem } = require('lib/models/base-item.js'); +const BaseItem = require('lib/models/BaseItem.js'); const Alarm = require('lib/models/Alarm'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); const { _ } = require('lib/locale.js'); class ReportService { diff --git a/ReactNativeClient/lib/shim-init-node.js b/ReactNativeClient/lib/shim-init-node.js index 046a7c7ab..b73336cdc 100644 --- a/ReactNativeClient/lib/shim-init-node.js +++ b/ReactNativeClient/lib/shim-init-node.js @@ -30,7 +30,7 @@ function shimInit() { const resizeImage_ = async function(filePath, targetPath) { const sharp = require('sharp'); - const { Resource } = require('lib/models/resource.js'); + const Resource = require('lib/models/Resource.js'); return new Promise((resolve, reject) => { sharp(filePath) @@ -48,11 +48,11 @@ function shimInit() { } shim.attachFileToNote = async function(note, filePath) { - const { Resource } = require('lib/models/resource.js'); + const Resource = require('lib/models/Resource.js'); const { uuid } = require('lib/uuid.js'); const { basename, fileExtension, safeFileExtension } = require('lib/path-utils.js'); const mime = require('mime/lite'); - const { Note } = require('lib/models/note.js'); + const Note = require('lib/models/Note.js'); if (!(await fs.pathExists(filePath))) throw new Error(_('Cannot access %s', filePath)); diff --git a/ReactNativeClient/lib/synchronizer.js b/ReactNativeClient/lib/synchronizer.js index 2d5cbae56..d16701e96 100644 --- a/ReactNativeClient/lib/synchronizer.js +++ b/ReactNativeClient/lib/synchronizer.js @@ -1,8 +1,8 @@ -const { BaseItem } = require('lib/models/base-item.js'); -const { Folder } = require('lib/models/folder.js'); -const { Note } = require('lib/models/note.js'); -const { Resource } = require('lib/models/resource.js'); -const { BaseModel } = require('lib/base-model.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const Folder = require('lib/models/Folder.js'); +const Note = require('lib/models/Note.js'); +const Resource = require('lib/models/Resource.js'); +const BaseModel = require('lib/BaseModel.js'); const { sprintf } = require('sprintf-js'); const { time } = require('lib/time-utils.js'); const { Logger } = require('lib/logger.js'); diff --git a/ReactNativeClient/root.js b/ReactNativeClient/root.js index 916286f39..f8e67e122 100644 --- a/ReactNativeClient/root.js +++ b/ReactNativeClient/root.js @@ -12,15 +12,15 @@ const { Log } = require('lib/log.js'); const { time } = require('lib/time-utils.js'); const { AppNav } = require('lib/components/app-nav.js'); const { Logger } = require('lib/logger.js'); -const { Note } = require('lib/models/note.js'); -const { Folder } = require('lib/models/folder.js'); +const Note = require('lib/models/Note.js'); +const Folder = require('lib/models/Folder.js'); const BaseSyncTarget = require('lib/BaseSyncTarget.js'); const { FoldersScreenUtils } = require('lib/folders-screen-utils.js'); -const { Resource } = require('lib/models/resource.js'); -const { Tag } = require('lib/models/tag.js'); -const { NoteTag } = require('lib/models/note-tag.js'); -const { BaseItem } = require('lib/models/base-item.js'); -const { BaseModel } = require('lib/base-model.js'); +const Resource = require('lib/models/Resource.js'); +const Tag = require('lib/models/Tag.js'); +const NoteTag = require('lib/models/NoteTag.js'); +const BaseItem = require('lib/models/BaseItem.js'); +const BaseModel = require('lib/BaseModel.js'); const { JoplinDatabase } = require('lib/joplin-database.js'); const { Database } = require('lib/database.js'); const { NotesScreen } = require('lib/components/screens/notes.js'); @@ -32,7 +32,7 @@ const { StatusScreen } = require('lib/components/screens/status.js'); const { WelcomeScreen } = require('lib/components/screens/welcome.js'); const { SearchScreen } = require('lib/components/screens/search.js'); const { OneDriveLoginScreen } = require('lib/components/screens/onedrive-login.js'); -const { Setting } = require('lib/models/setting.js'); +const Setting = require('lib/models/Setting.js'); const { MenuContext } = require('react-native-popup-menu'); const { SideMenu } = require('lib/components/side-menu.js'); const { SideMenuContent } = require('lib/components/side-menu-content.js');