1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Changed import statements to require to reduce dependency to Babel

This commit is contained in:
Laurent Cozic 2017-11-03 00:09:34 +00:00
parent 1c144c9674
commit 7781fbad76
108 changed files with 729 additions and 730 deletions

View File

@ -1,7 +1,7 @@
import { _ } from 'lib/locale.js' const { _ } = require('lib/locale.js');
import { Logger } from 'lib/logger.js'; const { Logger } = require('lib/logger.js');
import { Resource } from 'lib/models/resource.js'; const { Resource } = require('lib/models/resource.js');
import { netUtils } from 'lib/net-utils.js' const { netUtils } = require('lib/net-utils.js');
const http = require("http"); const http = require("http");
const urlParser = require("url"); const urlParser = require("url");

View File

@ -1,13 +1,13 @@
import { Logger } from 'lib/logger.js'; const { Logger } = require('lib/logger.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Tag } from 'lib/models/tag.js'; const { Tag } = require('lib/models/tag.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Resource } from 'lib/models/resource.js'; const { Resource } = require('lib/models/resource.js');
import { cliUtils } from './cli-utils.js'; const { cliUtils } = require('./cli-utils.js');
import { reducer, defaultState } from 'lib/reducer.js'; const { reducer, defaultState } = require('lib/reducer.js');
import { reg } from 'lib/registry.js'; const { reg } = require('lib/registry.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
const chalk = require('chalk'); const chalk = require('chalk');
const tk = require('terminal-kit'); const tk = require('terminal-kit');

View File

@ -1,23 +1,23 @@
import { createStore, applyMiddleware } from 'redux'; const { createStore, applyMiddleware } = require('redux');
import { reducer, defaultState } from 'lib/reducer.js'; const { reducer, defaultState } = require('lib/reducer.js');
import { JoplinDatabase } from 'lib/joplin-database.js'; const { JoplinDatabase } = require('lib/joplin-database.js');
import { Database } from 'lib/database.js'; const { Database } = require('lib/database.js');
import { FoldersScreenUtils } from 'lib/folders-screen-utils.js'; const { FoldersScreenUtils } = require('lib/folders-screen-utils.js');
import { DatabaseDriverNode } from 'lib/database-driver-node.js'; const { DatabaseDriverNode } = require('lib/database-driver-node.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Tag } from 'lib/models/tag.js'; const { Tag } = require('lib/models/tag.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { Logger } from 'lib/logger.js'; const { Logger } = require('lib/logger.js');
import { sprintf } from 'sprintf-js'; const { sprintf } = require('sprintf-js');
import { reg } from 'lib/registry.js'; const { reg } = require('lib/registry.js');
import { fileExtension } from 'lib/path-utils.js'; const { fileExtension } = require('lib/path-utils.js');
import { _, setLocale, defaultLocale, closestSupportedLocale } from 'lib/locale.js'; const { _, setLocale, defaultLocale, closestSupportedLocale } = require('lib/locale.js');
import os from 'os'; const os = require('os');
import fs from 'fs-extra'; const fs = require('fs-extra');
import { cliUtils } from './cli-utils.js'; const { cliUtils } = require('./cli-utils.js');
const EventEmitter = require('events'); const EventEmitter = require('events');
class Application { class Application {

View File

@ -1,5 +1,5 @@
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { reg } from 'lib/registry.js'; const { reg } = require('lib/registry.js');
class BaseCommand { class BaseCommand {

View File

@ -1,10 +1,10 @@
require('source-map-support').install(); require('source-map-support').install();
require('babel-plugin-transform-runtime'); require('babel-plugin-transform-runtime');
import fs from 'fs-extra'; const fs = require('fs-extra');
import { fileExtension, basename, dirname } from 'lib/path-utils.js'; const { fileExtension, basename, dirname } = require('lib/path-utils.js');
import wrap_ from 'word-wrap'; const wrap_ = require('word-wrap');
import { _, setLocale, languageCode } from 'lib/locale.js'; const { _, setLocale, languageCode } = require('lib/locale.js');
const rootDir = dirname(dirname(__dirname)); const rootDir = dirname(dirname(__dirname));
const MAX_WIDTH = 78; const MAX_WIDTH = 78;

View File

@ -7,9 +7,9 @@ const processArgs = process.argv.splice(2, process.argv.length);
const silentLog = processArgs.indexOf('--silent') >= 0; const silentLog = processArgs.indexOf('--silent') >= 0;
import { basename, dirname } from 'lib/path-utils.js'; const { basename, dirname } = require('lib/path-utils.js');
import fs from 'fs-extra'; const fs = require('fs-extra');
import gettextParser from 'gettext-parser'; const gettextParser = require('gettext-parser');
const rootDir = dirname(dirname(__dirname)); const rootDir = dirname(dirname(__dirname));
const cliDir = rootDir + '/CliClient'; const cliDir = rootDir + '/CliClient';

View File

@ -1,10 +1,10 @@
require('source-map-support').install(); require('source-map-support').install();
require('babel-plugin-transform-runtime'); require('babel-plugin-transform-runtime');
import fs from 'fs-extra'; const fs = require('fs-extra');
import { fileExtension, basename, dirname } from 'lib/path-utils.js'; const { fileExtension, basename, dirname } = require('lib/path-utils.js');
import { _, setLocale, languageCode } from 'lib/locale.js'; const { _, setLocale, languageCode } = require('lib/locale.js');
import marked from 'lib/marked.js'; const marked = require('lib/marked.js');
const headerHtml = ` const headerHtml = `
<!doctype html> <!doctype html>

View File

@ -3,16 +3,16 @@
require('source-map-support').install(); require('source-map-support').install();
require('babel-plugin-transform-runtime'); require('babel-plugin-transform-runtime');
import fs from 'fs-extra'; const fs = require('fs-extra');
import { Logger } from 'lib/logger.js'; const { Logger } = require('lib/logger.js');
import { dirname } from 'lib/path-utils.js'; const { dirname } = require('lib/path-utils.js');
import { DatabaseDriverNode } from 'lib/database-driver-node.js'; const { DatabaseDriverNode } = require('lib/database-driver-node.js');
import { JoplinDatabase } from 'lib/joplin-database.js'; const { JoplinDatabase } = require('lib/joplin-database.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { sprintf } from 'sprintf-js'; const { sprintf } = require('sprintf-js');
const exec = require('child_process').exec const exec = require('child_process').exec
process.on('unhandledRejection', (reason, p) => { process.on('unhandledRejection', (reason, p) => {

View File

@ -1,6 +1,6 @@
import yargParser from 'yargs-parser'; const yargParser = require('yargs-parser');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
const stringPadding = require('string-padding'); const stringPadding = require('string-padding');
const cliUtils = {}; const cliUtils = {};

View File

@ -1,12 +1,12 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Resource } from 'lib/models/resource.js'; const { Resource } = require('lib/models/resource.js');
import { uuid } from 'lib/uuid.js'; const { uuid } = require('lib/uuid.js');
import { filename } from 'lib/path-utils.js'; const { filename } = require('lib/path-utils.js');
const fs = require('fs-extra'); const fs = require('fs-extra');
const mime = require('mime/lite'); const mime = require('mime/lite');

View File

@ -1,9 +1,9 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,7 +1,7 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { _, setLocale } from 'lib/locale.js'; const { _, setLocale } = require('lib/locale.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,9 +1,9 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,10 +1,10 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,9 +1,9 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Tag } from 'lib/models/tag.js'; const { Tag } = require('lib/models/tag.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,14 +1,14 @@
import fs from 'fs-extra'; const fs = require('fs-extra');
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { uuid } from 'lib/uuid.js'; const { uuid } = require('lib/uuid.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { cliUtils } from './cli-utils.js'; const { cliUtils } = require('./cli-utils.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,6 +1,6 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,11 +1,11 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { Exporter } from 'lib/services/exporter.js'; const { Exporter } = require('lib/services/exporter.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { reg } from 'lib/registry.js'; const { reg } = require('lib/registry.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import fs from 'fs-extra'; const fs = require('fs-extra');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,9 +1,9 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,11 +1,11 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { renderCommandHelp } from './help-utils.js'; const { renderCommandHelp } = require('./help-utils.js');
import { Database } from 'lib/database.js'; const { Database } = require('lib/database.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { wrap } from 'lib/string-utils.js'; const { wrap } = require('lib/string-utils.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { cliUtils } from './cli-utils.js'; const { cliUtils } = require('./cli-utils.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,10 +1,10 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { importEnex } from 'import-enex'; const { importEnex } = require('import-enex');
import { filename, basename } from 'lib/path-utils.js'; const { filename, basename } = require('lib/path-utils.js');
import { cliUtils } from './cli-utils.js'; const { cliUtils } = require('./cli-utils.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,13 +1,13 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { sprintf } from 'sprintf-js'; const { sprintf } = require('sprintf-js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import { cliUtils } from './cli-utils.js'; const { cliUtils } = require('./cli-utils.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,8 +1,8 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { reg } from 'lib/registry.js'; const { reg } = require('lib/registry.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,7 +1,7 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,7 +1,7 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,9 +1,9 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,9 +1,9 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,11 +1,11 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { cliUtils } from './cli-utils.js'; const { cliUtils } = require('./cli-utils.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,11 +1,11 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { cliUtils } from './cli-utils.js'; const { cliUtils } = require('./cli-utils.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,12 +1,12 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { sprintf } from 'sprintf-js'; const { sprintf } = require('sprintf-js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import { uuid } from 'lib/uuid.js'; const { uuid } = require('lib/uuid.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,10 +1,10 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,9 +1,9 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { Database } from 'lib/database.js'; const { Database } = require('lib/database.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { ReportService } from 'lib/services/report.js'; const { ReportService } = require('lib/services/report.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,13 +1,13 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { OneDriveApiNodeUtils } from './onedrive-api-node-utils.js'; const { OneDriveApiNodeUtils } = require('./onedrive-api-node-utils.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import { Synchronizer } from 'lib/synchronizer.js'; const { Synchronizer } = require('lib/synchronizer.js');
import { reg } from 'lib/registry.js'; const { reg } = require('lib/registry.js');
import { cliUtils } from './cli-utils.js'; const { cliUtils } = require('./cli-utils.js');
import md5 from 'md5'; const md5 = require('md5');
const locker = require('proper-lockfile'); const locker = require('proper-lockfile');
const fs = require('fs-extra'); const fs = require('fs-extra');
const osTmpdir = require('os-tmpdir'); const osTmpdir = require('os-tmpdir');

View File

@ -1,8 +1,8 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { Tag } from 'lib/models/tag.js'; const { Tag } = require('lib/models/tag.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,10 +1,10 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,10 +1,10 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
const CommandDone = require('./command-done.js'); const CommandDone = require('./command-done.js');

View File

@ -1,8 +1,8 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { app } from './app.js'; const { app } = require('./app.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -1,6 +1,6 @@
import { BaseCommand } from './base-command.js'; const { BaseCommand } = require('./base-command.js');
import { Setting } from 'lib/models/setting.js' const { Setting } = require('lib/models/setting.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
class Command extends BaseCommand { class Command extends BaseCommand {

View File

@ -3,12 +3,12 @@
require('source-map-support').install(); require('source-map-support').install();
require('babel-plugin-transform-runtime'); require('babel-plugin-transform-runtime');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import { Logger } from 'lib/logger.js'; const { Logger } = require('lib/logger.js');
import { Resource } from 'lib/models/resource.js'; const { Resource } = require('lib/models/resource.js');
import { dirname } from 'lib/path-utils.js'; const { dirname } = require('lib/path-utils.js');
import { FsDriverNode } from './fs-driver-node.js'; const { FsDriverNode } = require('./fs-driver-node.js');
import lodash from 'lodash'; const lodash = require('lodash');
const exec = require('child_process').exec const exec = require('child_process').exec
const fs = require('fs-extra'); const fs = require('fs-extra');

View File

@ -1,11 +1,11 @@
require('source-map-support').install(); require('source-map-support').install();
require('babel-plugin-transform-runtime'); require('babel-plugin-transform-runtime');
import fs from 'fs-extra'; const fs = require('fs-extra');
import { wrap } from 'lib/string-utils.js'; const { wrap } = require('lib/string-utils.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { fileExtension, basename, dirname } from 'lib/path-utils.js'; const { fileExtension, basename, dirname } = require('lib/path-utils.js');
import { _, setLocale, languageCode } from 'lib/locale.js'; const { _, setLocale, languageCode } = require('lib/locale.js');
const rootDir = dirname(dirname(__dirname)); const rootDir = dirname(dirname(__dirname));
const MAX_WIDTH = 78; const MAX_WIDTH = 78;

View File

@ -1,4 +1,4 @@
import stringPadding from 'string-padding'; const stringPadding = require('string-padding');
const BLOCK_OPEN = "[[BLOCK_OPEN]]"; const BLOCK_OPEN = "[[BLOCK_OPEN]]";
const BLOCK_CLOSE = "[[BLOCK_CLOSE]]"; const BLOCK_CLOSE = "[[BLOCK_CLOSE]]";

View File

@ -1,16 +1,16 @@
import { uuid } from 'lib/uuid.js'; const { uuid } = require('lib/uuid.js');
import moment from 'moment'; const moment = require('moment');
import { promiseChain } from 'lib/promise-utils.js'; const { promiseChain } = require('lib/promise-utils.js');
import { folderItemFilename } from 'lib/string-utils.js' const { folderItemFilename } = require('lib/string-utils.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Tag } from 'lib/models/tag.js'; const { Tag } = require('lib/models/tag.js');
import { Resource } from 'lib/models/resource.js'; const { Resource } = require('lib/models/resource.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { enexXmlToMd } from './import-enex-md-gen.js'; const { enexXmlToMd } = require('./import-enex-md-gen.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import Levenshtein from 'levenshtein'; const Levenshtein = require('levenshtein');
import jsSHA from "jssha"; const jsSHA = require("jssha");
const Promise = require('promise'); const Promise = require('promise');
const fs = require('fs-extra'); const fs = require('fs-extra');

View File

@ -5,19 +5,19 @@
require('source-map-support').install(); require('source-map-support').install();
require('babel-plugin-transform-runtime'); require('babel-plugin-transform-runtime');
import { app } from './app.js'; const { app } = require('./app.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Resource } from 'lib/models/resource.js'; const { Resource } = require('lib/models/resource.js');
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Tag } from 'lib/models/tag.js'; const { Tag } = require('lib/models/tag.js');
import { NoteTag } from 'lib/models/note-tag.js'; const { NoteTag } = require('lib/models/note-tag.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { Logger } from 'lib/logger.js'; const { Logger } = require('lib/logger.js');
import { FsDriverNode } from './fs-driver-node.js'; const { FsDriverNode } = require('./fs-driver-node.js');
import { shimInit } from 'lib/shim-init-node.js'; const { shimInit } = require('lib/shim-init-node.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
const fsDriver = new FsDriverNode(); const fsDriver = new FsDriverNode();
Logger.fsDriver_ = fsDriver; Logger.fsDriver_ = fsDriver;

View File

@ -1,5 +1,5 @@
import { _ } from 'lib/locale.js' const { _ } = require('lib/locale.js');
import { netUtils } from 'lib/net-utils.js' const { netUtils } = require('lib/net-utils.js');
const http = require("http"); const http = require("http");
const urlParser = require("url"); const urlParser = require("url");

View File

@ -1,10 +1,10 @@
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import { setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient } from 'test-utils.js'; const { setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient } = require('test-utils.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
process.on('unhandledRejection', (reason, p) => { process.on('unhandledRejection', (reason, p) => {
console.error('Unhandled promise rejection at: Promise', p, 'reason:', reason); console.error('Unhandled promise rejection at: Promise', p, 'reason:', reason);

View File

@ -1,15 +1,15 @@
require('source-map-support').install(); require('source-map-support').install();
require('babel-plugin-transform-runtime'); require('babel-plugin-transform-runtime');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import { setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId } from 'test-utils.js'; const { setupDatabase, setupDatabaseAndSynchronizer, db, synchronizer, fileApi, sleep, clearDatabase, switchClient, syncTargetId } = require('test-utils.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Tag } from 'lib/models/tag.js'; const { Tag } = require('lib/models/tag.js');
import { Database } from 'lib/database.js'; const { Database } = require('lib/database.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
process.on('unhandledRejection', (reason, p) => { process.on('unhandledRejection', (reason, p) => {
console.log('Unhandled Rejection at: Promise', p, 'reason:', reason); console.log('Unhandled Rejection at: Promise', p, 'reason:', reason);

View File

@ -1,21 +1,21 @@
import fs from 'fs-extra'; const fs = require('fs-extra');
import { JoplinDatabase } from 'lib/joplin-database.js'; const { JoplinDatabase } = require('lib/joplin-database.js');
import { DatabaseDriverNode } from 'lib/database-driver-node.js'; const { DatabaseDriverNode } = require('lib/database-driver-node.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Resource } from 'lib/models/resource.js'; const { Resource } = require('lib/models/resource.js');
import { Tag } from 'lib/models/tag.js'; const { Tag } = require('lib/models/tag.js');
import { NoteTag } from 'lib/models/note-tag.js'; const { NoteTag } = require('lib/models/note-tag.js');
import { Logger } from 'lib/logger.js'; const { Logger } = require('lib/logger.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import { Synchronizer } from 'lib/synchronizer.js'; const { Synchronizer } = require('lib/synchronizer.js');
import { FileApi } from 'lib/file-api.js'; const { FileApi } = require('lib/file-api.js');
import { FileApiDriverMemory } from 'lib/file-api-driver-memory.js'; const { FileApiDriverMemory } = require('lib/file-api-driver-memory.js');
import { FileApiDriverLocal } from 'lib/file-api-driver-local.js'; const { FileApiDriverLocal } = require('lib/file-api-driver-local.js');
import { FsDriverNode } from '../app/fs-driver-node.js'; const { FsDriverNode } = require('../app/fs-driver-node.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
let databases_ = []; let databases_ = [];
let synchronizers_ = []; let synchronizers_ = [];

View File

@ -1,3 +1,3 @@
import { main } from './main.js'; const { main } = require('./main.js');
main(); main();

View File

@ -4,7 +4,7 @@
* @flow * @flow
*/ */
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { import {
AppRegistry, AppRegistry,
StyleSheet, StyleSheet,

View File

@ -1,7 +1,7 @@
import { Log } from 'lib/log.js'; const { Log } = require('lib/log.js');
import { Database } from 'lib/database.js'; const { Database } = require('lib/database.js');
import { uuid } from 'lib/uuid.js'; const { uuid } = require('lib/uuid.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
class BaseModel { class BaseModel {

View File

@ -1,11 +1,11 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { StyleSheet, Text } from 'react-native'; const { StyleSheet, Text } = require('react-native');
import Icon from 'react-native-vector-icons/Ionicons'; const Icon = require('react-native-vector-icons/Ionicons').default;
import ReactNativeActionButton from 'react-native-action-button'; const ReactNativeActionButton = require('react-native-action-button').default;
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { globalStyle } from 'lib/components/global-style.js' const { globalStyle } = require('lib/components/global-style.js');
import { Log } from 'lib/log.js' const { Log } = require('lib/log.js');
import { _ } from 'lib/locale.js' const { _ } = require('lib/locale.js');
const styles = StyleSheet.create({ const styles = StyleSheet.create({
actionButtonIcon: { actionButtonIcon: {

View File

@ -1,10 +1,10 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { NotesScreen } from 'lib/components/screens/notes.js'; const { NotesScreen } = require('lib/components/screens/notes.js');
import { SearchScreen } from 'lib/components/screens/search.js'; const { SearchScreen } = require('lib/components/screens/search.js');
import { View } from 'react-native'; const { View } = require('react-native');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { themeStyle } from 'lib/components/global-style.js'; const { themeStyle } = require('lib/components/global-style.js');
class AppNavComponent extends Component { class AppNavComponent extends Component {

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { StyleSheet } from 'react-native'; const { StyleSheet } = require('react-native');
import { globalStyle, themeStyle } from 'lib/components/global-style.js'; const { globalStyle, themeStyle } = require('lib/components/global-style.js');
const styleObject_ = { const styleObject_ = {
screen: { screen: {

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { StyleSheet, TouchableHighlight } from 'react-native'; const { StyleSheet, TouchableHighlight } = require('react-native');
import Icon from 'react-native-vector-icons/Ionicons'; const Icon = require('react-native-vector-icons/Ionicons').default;
const styles = { const styles = {
checkboxIcon: { checkboxIcon: {

View File

@ -1,4 +1,4 @@
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
const globalStyle = { const globalStyle = {
fontSize: 16, fontSize: 16,

View File

@ -1,10 +1,10 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { WebView, View, Linking } from 'react-native'; const { WebView, View, Linking } = require('react-native');
import { globalStyle } from 'lib/components/global-style.js'; const { globalStyle } = require('lib/components/global-style.js');
import { Resource } from 'lib/models/resource.js'; const { Resource } = require('lib/models/resource.js');
import { shim } from 'lib/shim.js'; const { shim } = require('lib/shim.js');
import { reg } from 'lib/registry.js'; const { reg } = require('lib/registry.js');
import marked from 'lib/marked.js'; const marked = require('lib/marked.js');
const Entities = require('html-entities').AllHtmlEntities; const Entities = require('html-entities').AllHtmlEntities;
const htmlentities = (new Entities()).encode; const htmlentities = (new Entities()).encode;

View File

@ -1,13 +1,13 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { ListView, Text, TouchableHighlight, View, StyleSheet } from 'react-native'; const { ListView, Text, TouchableHighlight, View, StyleSheet } = require('react-native');
import { Log } from 'lib/log.js'; const { Log } = require('lib/log.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { Checkbox } from 'lib/components/checkbox.js'; const { Checkbox } = require('lib/components/checkbox.js');
import { reg } from 'lib/registry.js'; const { reg } = require('lib/registry.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import { globalStyle, themeStyle } from 'lib/components/global-style.js'; const { globalStyle, themeStyle } = require('lib/components/global-style.js');
class NoteItemComponent extends Component { class NoteItemComponent extends Component {

View File

@ -1,15 +1,15 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { ListView, Text, TouchableHighlight, Switch, View, StyleSheet } from 'react-native'; const { ListView, Text, TouchableHighlight, Switch, View, StyleSheet } = require('react-native');
import { Log } from 'lib/log.js'; const { Log } = require('lib/log.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { Checkbox } from 'lib/components/checkbox.js'; const { Checkbox } = require('lib/components/checkbox.js');
import { NoteItem } from 'lib/components/note-item.js'; const { NoteItem } = require('lib/components/note-item.js');
import { reg } from 'lib/registry.js'; const { reg } = require('lib/registry.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import { themeStyle } from 'lib/components/global-style.js'; const { themeStyle } = require('lib/components/global-style.js');
class NoteListComponent extends Component { class NoteListComponent extends Component {

View File

@ -1,16 +1,16 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { View, Text, Button, StyleSheet, TouchableOpacity, Picker, Image } from 'react-native'; const { View, Text, Button, StyleSheet, TouchableOpacity, Picker, Image } = require('react-native');
import Icon from 'react-native-vector-icons/Ionicons'; const Icon = require('react-native-vector-icons/Ionicons').default;
import { Log } from 'lib/log.js'; const { Log } = require('lib/log.js');
import { BackButtonService } from 'lib/services/back-button.js'; const { BackButtonService } = require('lib/services/back-button.js');
import { Menu, MenuOptions, MenuOption, MenuTrigger } from 'react-native-popup-menu'; const { Menu, MenuOptions, MenuOption, MenuTrigger } = require('react-native-popup-menu');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { FileApi } from 'lib/file-api.js'; const { FileApi } = require('lib/file-api.js');
import { FileApiDriverOneDrive } from 'lib/file-api-driver-onedrive.js'; const { FileApiDriverOneDrive } = require('lib/file-api-driver-onedrive.js');
import { reg } from 'lib/registry.js' const { reg } = require('lib/registry.js');
import { themeStyle } from 'lib/components/global-style.js'; const { themeStyle } = require('lib/components/global-style.js');
// Rather than applying a padding to the whole bar, it is applied to each // Rather than applying a padding to the whole bar, it is applied to each
// individual component (button, picker, etc.) so that the touchable areas // individual component (button, picker, etc.) so that the touchable areas

View File

@ -1,11 +1,11 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { View, Switch, Slider, StyleSheet, Picker, Text, Button } from 'react-native'; const { View, Switch, Slider, StyleSheet, Picker, Text, Button } = require('react-native');
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { ScreenHeader } from 'lib/components/screen-header.js'; const { ScreenHeader } = require('lib/components/screen-header.js');
import { _, setLocale } from 'lib/locale.js'; const { _, setLocale } = require('lib/locale.js');
import { BaseScreenComponent } from 'lib/components/base-screen.js'; const { BaseScreenComponent } = require('lib/components/base-screen.js');
import { themeStyle } from 'lib/components/global-style.js'; const { themeStyle } = require('lib/components/global-style.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
class ConfigScreenComponent extends BaseScreenComponent { class ConfigScreenComponent extends BaseScreenComponent {

View File

@ -1,16 +1,16 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { View, Button, TextInput, StyleSheet } from 'react-native'; const { View, Button, TextInput, StyleSheet } = require('react-native');
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { Log } from 'lib/log.js' const { Log } = require('lib/log.js');
import { ActionButton } from 'lib/components/action-button.js'; const { ActionButton } = require('lib/components/action-button.js');
import { Folder } from 'lib/models/folder.js' const { Folder } = require('lib/models/folder.js');
import { BaseModel } from 'lib/base-model.js' const { BaseModel } = require('lib/base-model.js');
import { ScreenHeader } from 'lib/components/screen-header.js'; const { ScreenHeader } = require('lib/components/screen-header.js');
import { reg } from 'lib/registry.js'; const { reg } = require('lib/registry.js');
import { BaseScreenComponent } from 'lib/components/base-screen.js'; const { BaseScreenComponent } = require('lib/components/base-screen.js');
import { dialogs } from 'lib/dialogs.js'; const { dialogs } = require('lib/dialogs.js');
import { themeStyle } from 'lib/components/global-style.js'; const { themeStyle } = require('lib/components/global-style.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
class FolderScreenComponent extends BaseScreenComponent { class FolderScreenComponent extends BaseScreenComponent {

View File

@ -1,14 +1,14 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { ListView, View, Text, Button, StyleSheet } from 'react-native'; const { ListView, View, Text, Button, StyleSheet } = require('react-native');
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { Log } from 'lib/log.js' const { Log } = require('lib/log.js');
import { reg } from 'lib/registry.js' const { reg } = require('lib/registry.js');
import { ScreenHeader } from 'lib/components/screen-header.js'; const { ScreenHeader } = require('lib/components/screen-header.js');
import { time } from 'lib/time-utils' const { time } = require('lib/time-utils');
import { themeStyle } from 'lib/components/global-style.js'; const { themeStyle } = require('lib/components/global-style.js');
import { Logger } from 'lib/logger.js'; const { Logger } = require('lib/logger.js');
import { BaseScreenComponent } from 'lib/components/base-screen.js'; const { BaseScreenComponent } = require('lib/components/base-screen.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
class LogScreenComponent extends BaseScreenComponent { class LogScreenComponent extends BaseScreenComponent {

View File

@ -1,29 +1,29 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { Keyboard, BackHandler, View, Button, TextInput, WebView, Text, StyleSheet, Linking, Image } from 'react-native'; const { Keyboard, BackHandler, View, Button, TextInput, WebView, Text, StyleSheet, Linking, Image } = require('react-native');
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { uuid } from 'lib/uuid.js'; const { uuid } = require('lib/uuid.js');
import { Log } from 'lib/log.js' const { Log } = require('lib/log.js');
import { Note } from 'lib/models/note.js' const { Note } = require('lib/models/note.js');
import { Resource } from 'lib/models/resource.js' const { Resource } = require('lib/models/resource.js');
import { Folder } from 'lib/models/folder.js' const { Folder } = require('lib/models/folder.js');
import { BackButtonService } from 'lib/services/back-button.js'; const { BackButtonService } = require('lib/services/back-button.js');
import { BaseModel } from 'lib/base-model.js' const { BaseModel } = require('lib/base-model.js');
import { ActionButton } from 'lib/components/action-button.js'; const { ActionButton } = require('lib/components/action-button.js');
import Icon from 'react-native-vector-icons/Ionicons'; const Icon = require('react-native-vector-icons/Ionicons').default;
import { ScreenHeader } from 'lib/components/screen-header.js'; const { ScreenHeader } = require('lib/components/screen-header.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import { Checkbox } from 'lib/components/checkbox.js' const { Checkbox } = require('lib/components/checkbox.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { reg } from 'lib/registry.js'; const { reg } = require('lib/registry.js');
import { shim } from 'lib/shim.js'; const { shim } = require('lib/shim.js');
import { BaseScreenComponent } from 'lib/components/base-screen.js'; const { BaseScreenComponent } = require('lib/components/base-screen.js');
import { dialogs } from 'lib/dialogs.js'; const { dialogs } = require('lib/dialogs.js');
import { globalStyle, themeStyle } from 'lib/components/global-style.js'; const { globalStyle, themeStyle } = require('lib/components/global-style.js');
import DialogBox from 'react-native-dialogbox'; const DialogBox = require('react-native-dialogbox').default;
import { NoteBodyViewer } from 'lib/components/note-body-viewer.js'; const { NoteBodyViewer } = require('lib/components/note-body-viewer.js');
import RNFetchBlob from 'react-native-fetch-blob'; const RNFetchBlob = require('react-native-fetch-blob').default;
import { DocumentPicker, DocumentPickerUtil } from 'react-native-document-picker'; const { DocumentPicker, DocumentPickerUtil } = require('react-native-document-picker');
import ImageResizer from 'react-native-image-resizer'; const ImageResizer = require('react-native-image-resizer').default;
class NoteScreenComponent extends BaseScreenComponent { class NoteScreenComponent extends BaseScreenComponent {

View File

@ -1,21 +1,21 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { View, Button, Picker } from 'react-native'; const { View, Button, Picker } = require('react-native');
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { reg } from 'lib/registry.js'; const { reg } = require('lib/registry.js');
import { Log } from 'lib/log.js' const { Log } = require('lib/log.js');
import { NoteList } from 'lib/components/note-list.js' const { NoteList } = require('lib/components/note-list.js');
import { Folder } from 'lib/models/folder.js' const { Folder } = require('lib/models/folder.js');
import { Tag } from 'lib/models/tag.js' const { Tag } = require('lib/models/tag.js');
import { Note } from 'lib/models/note.js' const { Note } = require('lib/models/note.js');
import { Setting } from 'lib/models/setting.js' const { Setting } = require('lib/models/setting.js');
import { themeStyle } from 'lib/components/global-style.js'; const { themeStyle } = require('lib/components/global-style.js');
import { ScreenHeader } from 'lib/components/screen-header.js'; const { ScreenHeader } = require('lib/components/screen-header.js');
import { MenuOption, Text } from 'react-native-popup-menu'; const { MenuOption, Text } = require('react-native-popup-menu');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { ActionButton } from 'lib/components/action-button.js'; const { ActionButton } = require('lib/components/action-button.js');
import { dialogs } from 'lib/dialogs.js'; const { dialogs } = require('lib/dialogs.js');
import DialogBox from 'react-native-dialogbox'; const DialogBox = require('react-native-dialogbox').default;
import { BaseScreenComponent } from 'lib/components/base-screen.js'; const { BaseScreenComponent } = require('lib/components/base-screen.js');
class NotesScreenComponent extends BaseScreenComponent { class NotesScreenComponent extends BaseScreenComponent {

View File

@ -1,13 +1,13 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { View } from 'react-native'; const { View } = require('react-native');
import { WebView, Button, Text } from 'react-native'; const { WebView, Button, Text } = require('react-native');
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { Log } from 'lib/log.js' const { Log } = require('lib/log.js');
import { Setting } from 'lib/models/setting.js' const { Setting } = require('lib/models/setting.js');
import { ScreenHeader } from 'lib/components/screen-header.js'; const { ScreenHeader } = require('lib/components/screen-header.js');
import { reg } from 'lib/registry.js'; const { reg } = require('lib/registry.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseScreenComponent } from 'lib/components/base-screen.js'; const { BaseScreenComponent } = require('lib/components/base-screen.js');
class OneDriveLoginScreenComponent extends BaseScreenComponent { class OneDriveLoginScreenComponent extends BaseScreenComponent {

View File

@ -1,13 +1,13 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { ListView, StyleSheet, View, TextInput, FlatList, TouchableHighlight } from 'react-native'; const { ListView, StyleSheet, View, TextInput, FlatList, TouchableHighlight } = require('react-native');
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { ScreenHeader } from 'lib/components/screen-header.js'; const { ScreenHeader } = require('lib/components/screen-header.js');
import Icon from 'react-native-vector-icons/Ionicons'; const Icon = require('react-native-vector-icons/Ionicons').default;
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { NoteItem } from 'lib/components/note-item.js'; const { NoteItem } = require('lib/components/note-item.js');
import { BaseScreenComponent } from 'lib/components/base-screen.js'; const { BaseScreenComponent } = require('lib/components/base-screen.js');
import { themeStyle } from 'lib/components/global-style.js'; const { themeStyle } = require('lib/components/global-style.js');
class SearchScreenComponent extends BaseScreenComponent { class SearchScreenComponent extends BaseScreenComponent {

View File

@ -1,19 +1,19 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { ListView, StyleSheet, View, Text, Button, FlatList } from 'react-native'; const { ListView, StyleSheet, View, Text, Button, FlatList } = require('react-native');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { Log } from 'lib/log.js' const { Log } = require('lib/log.js');
import { reg } from 'lib/registry.js' const { reg } = require('lib/registry.js');
import { ScreenHeader } from 'lib/components/screen-header.js'; const { ScreenHeader } = require('lib/components/screen-header.js');
import { time } from 'lib/time-utils' const { time } = require('lib/time-utils');
import { Logger } from 'lib/logger.js'; const { Logger } = require('lib/logger.js');
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import { Database } from 'lib/database.js'; const { Database } = require('lib/database.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { ReportService } from 'lib/services/report.js'; const { ReportService } = require('lib/services/report.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { BaseScreenComponent } from 'lib/components/base-screen.js'; const { BaseScreenComponent } = require('lib/components/base-screen.js');
import { globalStyle, themeStyle } from 'lib/components/global-style.js'; const { globalStyle, themeStyle } = require('lib/components/global-style.js');
const styles = StyleSheet.create({ const styles = StyleSheet.create({
body: { body: {

View File

@ -1,13 +1,13 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { ListView, StyleSheet, View, TextInput, FlatList, TouchableHighlight } from 'react-native'; const { ListView, StyleSheet, View, TextInput, FlatList, TouchableHighlight } = require('react-native');
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { ScreenHeader } from 'lib/components/screen-header.js'; const { ScreenHeader } = require('lib/components/screen-header.js');
import Icon from 'react-native-vector-icons/Ionicons'; const Icon = require('react-native-vector-icons/Ionicons').default;
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { NoteItem } from 'lib/components/note-item.js'; const { NoteItem } = require('lib/components/note-item.js');
import { BaseScreenComponent } from 'lib/components/base-screen.js'; const { BaseScreenComponent } = require('lib/components/base-screen.js');
import { globalStyle } from 'lib/components/global-style.js'; const { globalStyle } = require('lib/components/global-style.js');
let styles = { let styles = {
body: { body: {

View File

@ -1,12 +1,12 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { View, Text, StyleSheet } from 'react-native'; const { View, Text, StyleSheet } = require('react-native');
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { Log } from 'lib/log.js' const { Log } = require('lib/log.js');
import { ScreenHeader } from 'lib/components/screen-header.js'; const { ScreenHeader } = require('lib/components/screen-header.js');
import { ActionButton } from 'lib/components/action-button.js'; const { ActionButton } = require('lib/components/action-button.js');
import { BaseScreenComponent } from 'lib/components/base-screen.js'; const { BaseScreenComponent } = require('lib/components/base-screen.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { themeStyle } from 'lib/components/global-style.js'; const { themeStyle } = require('lib/components/global-style.js');
class WelcomeScreenComponent extends BaseScreenComponent { class WelcomeScreenComponent extends BaseScreenComponent {

View File

@ -1,16 +1,16 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { TouchableOpacity , Button, Text, Image, StyleSheet, ScrollView, View } from 'react-native'; const { TouchableOpacity , Button, Text, Image, StyleSheet, ScrollView, View } = require('react-native');
import { connect } from 'react-redux' const { connect } = require('react-redux');
import Icon from 'react-native-vector-icons/Ionicons'; const Icon = require('react-native-vector-icons/Ionicons').default;
import { Log } from 'lib/log.js'; const { Log } = require('lib/log.js');
import { Tag } from 'lib/models/tag.js'; const { Tag } = require('lib/models/tag.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { FoldersScreenUtils } from 'lib/folders-screen-utils.js' const { FoldersScreenUtils } = require('lib/folders-screen-utils.js');
import { Synchronizer } from 'lib/synchronizer.js'; const { Synchronizer } = require('lib/synchronizer.js');
import { reg } from 'lib/registry.js'; const { reg } = require('lib/registry.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { globalStyle, themeStyle } from 'lib/components/global-style.js'; const { globalStyle, themeStyle } = require('lib/components/global-style.js');
class SideMenuContentComponent extends Component { class SideMenuContentComponent extends Component {

View File

@ -1,11 +1,11 @@
import React, { Component } from 'react'; const React = require('react'); const Component = React.Component;
import { connect } from 'react-redux' const { connect } = require('react-redux');
import { Log } from 'lib/log.js'; const { Log } = require('lib/log.js');
import SideMenu_ from 'react-native-side-menu'; const SideMenu_ = require('react-native-side-menu').default;
class SideMenuComponent extends SideMenu_ {}; class SideMenuComponent extends SideMenu_ {};
const SideMenu = connect( const MySideMenu = connect(
(state) => { (state) => {
return { return {
isOpen: state.showSideMenu, isOpen: state.showSideMenu,
@ -13,4 +13,4 @@ const SideMenu = connect(
} }
)(SideMenuComponent) )(SideMenuComponent)
export { SideMenu }; module.exports = { SideMenu: MySideMenu };

View File

@ -1,4 +1,4 @@
import SQLite from 'react-native-sqlite-storage'; const SQLite = require('react-native-sqlite-storage');
class DatabaseDriverReactNative { class DatabaseDriverReactNative {

View File

@ -1,8 +1,8 @@
import { uuid } from 'lib/uuid.js'; const { uuid } = require('lib/uuid.js');
import { promiseChain } from 'lib/promise-utils.js'; const { promiseChain } = require('lib/promise-utils.js');
import { Logger } from 'lib/logger.js' const { Logger } = require('lib/logger.js');
import { time } from 'lib/time-utils.js' const { time } = require('lib/time-utils.js');
import { sprintf } from 'sprintf-js'; const { sprintf } = require('sprintf-js');
class Database { class Database {

View File

@ -1,5 +1,5 @@
import DialogBox from 'react-native-dialogbox'; const DialogBox = require('react-native-dialogbox').default;
import { Keyboard } from 'react-native'; const { Keyboard } = require('react-native');
// Add this at the bottom of the component: // Add this at the bottom of the component:
// //

View File

@ -1,8 +1,8 @@
import fs from 'fs-extra'; const fs = require('fs-extra');
import { promiseChain } from 'lib/promise-utils.js'; const { promiseChain } = require('lib/promise-utils.js');
import moment from 'moment'; const moment = require('moment');
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import { time } from 'lib/time-utils.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). // NOTE: when synchronising with the file system the time resolution is the second (unlike milliseconds for OneDrive for instance).
// What it means is that if, for example, client 1 changes a note at time t, and client 2 changes the same note within the same second, // What it means is that if, for example, client 1 changes a note at time t, and client 2 changes the same note within the same second,

View File

@ -1,4 +1,4 @@
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
class FileApiDriverMemory { class FileApiDriverMemory {

View File

@ -1,7 +1,7 @@
import moment from 'moment'; const moment = require('moment');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import { dirname, basename } from 'lib/path-utils.js'; const { dirname, basename } = require('lib/path-utils.js');
import { OneDriveApi } from 'lib/onedrive-api.js'; const { OneDriveApi } = require('lib/onedrive-api.js');
class FileApiDriverOneDrive { class FileApiDriverOneDrive {

View File

@ -1,5 +1,5 @@
import { isHidden } from 'lib/path-utils.js'; const { isHidden } = require('lib/path-utils.js');
import { Logger } from 'lib/logger.js'; const { Logger } = require('lib/logger.js');
class FileApi { class FileApi {

View File

@ -1,4 +1,4 @@
import { Folder } from 'lib/models/folder.js' const { Folder } = require('lib/models/folder.js');
class FoldersScreenUtils { class FoldersScreenUtils {

View File

@ -1,5 +1,5 @@
import { shim } from 'lib/shim.js' const { shim } = require('lib/shim.js');
import { netUtils } from 'lib/net-utils.js'; const { netUtils } = require('lib/net-utils.js');
class GeolocationNode { class GeolocationNode {

View File

@ -1,4 +1,4 @@
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
class GeolocationReact { class GeolocationReact {

View File

@ -1,7 +1,7 @@
import { uuid } from 'lib/uuid.js'; const { uuid } = require('lib/uuid.js');
import { promiseChain } from 'lib/promise-utils.js'; const { promiseChain } = require('lib/promise-utils.js');
import { time } from 'lib/time-utils.js' const { time } = require('lib/time-utils.js');
import { Database } from 'lib/database.js' const { Database } = require('lib/database.js');
const structureSql = ` const structureSql = `
CREATE TABLE folders ( CREATE TABLE folders (

View File

@ -1,4 +1,4 @@
import { sprintf } from 'sprintf-js'; const { sprintf } = require('sprintf-js');
let codeToLanguageE_ = {}; let codeToLanguageE_ = {};
codeToLanguageE_["aa"] = "Afar"; codeToLanguageE_["aa"] = "Afar";

View File

@ -1,7 +1,7 @@
import moment from 'moment'; const moment = require('moment');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import { FsDriverDummy } from 'lib/fs-driver-dummy.js'; const { FSdRiverdUmmy } = require('lib/fs-driver-dummy.js');
class Logger { class Logger {

View File

@ -1,9 +1,9 @@
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Database } from 'lib/database.js'; const { Database } = require('lib/database.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import { sprintf } from 'sprintf-js'; const { sprintf } = require('sprintf-js');
import moment from 'moment'; const moment = require('moment');
class BaseItem extends BaseModel { class BaseItem extends BaseModel {

View File

@ -1,14 +1,14 @@
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Log } from 'lib/log.js'; const { Log } = require('lib/log.js');
import { promiseChain } from 'lib/promise-utils.js'; const { promiseChain } = require('lib/promise-utils.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { Database } from 'lib/database.js'; const { Database } = require('lib/database.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
import moment from 'moment'; const moment = require('moment');
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import lodash from 'lodash'; const lodash = require('lodash');
class Folder extends BaseItem { class Folder extends BaseItem {

View File

@ -1,6 +1,6 @@
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import lodash from 'lodash'; const lodash = require('lodash');
class NoteTag extends BaseItem { class NoteTag extends BaseItem {

View File

@ -1,14 +1,13 @@
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Log } from 'lib/log.js'; const { Log } = require('lib/log.js');
import { sprintf } from 'sprintf-js'; const { sprintf } = require('sprintf-js');
import { Folder } from 'lib/models/folder.js'; const { BaseItem } = require('lib/models/base-item.js');
import { BaseItem } from 'lib/models/base-item.js'; const { Setting } = require('lib/models/setting.js');
import { Setting } from 'lib/models/setting.js'; const { shim } = require('lib/shim.js');
import { shim } from 'lib/shim.js'; const { time } = require('lib/time-utils.js');
import { time } from 'lib/time-utils.js'; const { _ } = require('lib/locale.js');
import { _ } from 'lib/locale.js'; const moment = require('moment');
import moment from 'moment'; const lodash = require('lodash');
import lodash from 'lodash';
class Note extends BaseItem { class Note extends BaseItem {
@ -188,7 +187,7 @@ class Note extends BaseItem {
if (!options.fields) options.fields = this.previewFields(); if (!options.fields) options.fields = this.previewFields();
if (!options.uncompletedTodosOnTop) options.uncompletedTodosOnTop = false; if (!options.uncompletedTodosOnTop) options.uncompletedTodosOnTop = false;
if (parentId == Folder.conflictFolderId()) { if (parentId == BaseItem.getClass('Folder').conflictFolderId()) {
options.conditions.push('is_conflict = 1'); options.conditions.push('is_conflict = 1');
} else { } else {
options.conditions.push('is_conflict = 0'); options.conditions.push('is_conflict = 0');
@ -326,7 +325,7 @@ class Note extends BaseItem {
} }
static async copyToFolder(noteId, folderId) { static async copyToFolder(noteId, folderId) {
if (folderId == Folder.conflictFolderId()) throw new Error(_('Cannot copy note to "%s" notebook', Folder.conflictFolderIdTitle())); if (folderId == this.getClass('Folder').conflictFolderId()) throw new Error(_('Cannot copy note to "%s" notebook', this.getClass('Folder').conflictFolderIdTitle()));
return Note.duplicate(noteId, { return Note.duplicate(noteId, {
changes: { changes: {
@ -337,7 +336,7 @@ class Note extends BaseItem {
} }
static async moveToFolder(noteId, folderId) { static async moveToFolder(noteId, folderId) {
if (folderId == Folder.conflictFolderId()) throw new Error(_('Cannot move note to "%s" notebook', Folder.conflictFolderIdTitle())); if (folderId == this.getClass('Folder').conflictFolderId()) throw new Error(_('Cannot move note to "%s" notebook', this.getClass('Folder').conflictFolderIdTitle()));
// When moving a note to a different folder, the user timestamp is not updated. // When moving a note to a different folder, the user timestamp is not updated.
// However updated_time is updated so that the note can be synced later on. // However updated_time is updated so that the note can be synced later on.

View File

@ -1,11 +1,11 @@
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { mime } from 'lib/mime-utils.js'; const { mime } = require('lib/mime-utils.js');
import { filename } from 'lib/path-utils.js'; const { filename } = require('lib/path-utils.js');
import { FsDriverDummy } from 'lib/fs-driver-dummy.js'; const { FsDriverDummy } = require('lib/fs-driver-dummy.js');
import { markdownUtils } from 'lib/markdown-utils.js'; const { markdownUtils } = require('lib/markdown-utils.js');
import lodash from 'lodash'; const lodash = require('lodash');
class Resource extends BaseItem { class Resource extends BaseItem {

View File

@ -1,8 +1,8 @@
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Database } from 'lib/database.js'; const { Database } = require('lib/database.js');
import { Logger } from 'lib/logger.js'; const { Logger } = require('lib/logger.js');
import { sprintf } from 'sprintf-js'; const { sprintf } = require('sprintf-js');
import { _, supportedLocalesToLanguages, defaultLocale } from 'lib/locale.js'; const { _, supportedLocalesToLanguages, defaultLocale } = require('lib/locale.js');
class Setting extends BaseModel { class Setting extends BaseModel {

View File

@ -1,9 +1,9 @@
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import { NoteTag } from 'lib/models/note-tag.js'; const { NoteTag } = require('lib/models/note-tag.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import lodash from 'lodash'; const lodash = require('lodash');
class Tag extends BaseItem { class Tag extends BaseItem {

View File

@ -1,4 +1,4 @@
import { shim } from 'lib/shim.js' const { shim } = require('lib/shim.js');
const tcpPortUsed = require('tcp-port-used'); const tcpPortUsed = require('tcp-port-used');

View File

@ -1,7 +1,7 @@
import { shim } from 'lib/shim.js'; const { shim } = require('lib/shim.js');
import { stringify } from 'query-string'; const { stringify } = require('query-string');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import { Logger } from 'lib/logger.js' const { Logger } = require('lib/logger.js');
class OneDriveApi { class OneDriveApi {

View File

@ -1,4 +1,4 @@
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
const parameters_ = {}; const parameters_ = {};

View File

@ -1,4 +1,4 @@
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
class PoorManIntervals { class PoorManIntervals {

View File

@ -1,4 +1,4 @@
import { Logger } from 'lib/logger.js'; const { Logger } = require('lib/logger.js');
class ReactLogger extends Logger { class ReactLogger extends Logger {

View File

@ -1,4 +1,4 @@
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
const defaultState = { const defaultState = {
notes: [], notes: [],

View File

@ -1,15 +1,15 @@
import { Logger } from 'lib/logger.js'; const { Logger } = require('lib/logger.js');
import { Setting } from 'lib/models/setting.js'; const { Setting } = require('lib/models/setting.js');
import { OneDriveApi } from 'lib/onedrive-api.js'; const { OneDriveApi } = require('lib/onedrive-api.js');
import { parameters } from 'lib/parameters.js'; const { parameters } = require('lib/parameters.js');
import { FileApi } from 'lib/file-api.js'; const { FileApi } = require('lib/file-api.js');
import { Database } from 'lib/database.js'; const { Database } = require('lib/database.js');
import { Synchronizer } from 'lib/synchronizer.js'; const { Synchronizer } = require('lib/synchronizer.js');
import { FileApiDriverOneDrive } from 'lib/file-api-driver-onedrive.js'; const { FileApiDriverOneDrive } = require('lib/file-api-driver-onedrive.js');
import { shim } from 'lib/shim.js'; const { shim } = require('lib/shim.js');
import { time } from 'lib/time-utils.js'; const { time } = require('lib/time-utils.js');
import { FileApiDriverMemory } from 'lib/file-api-driver-memory.js'; const { FileApiDriverMemory } = require('lib/file-api-driver-memory.js');
import { _ } from 'lib/locale.js'; const { _ } = require('lib/locale.js');
const reg = {}; const reg = {};

View File

@ -1,4 +1,4 @@
import { BackHandler } from 'react-native'; const { BackHandler } = require('react-native');
class BackButtonService { class BackButtonService {

View File

@ -1,12 +1,12 @@
import { BaseItem } from 'lib/models/base-item.js'; const { BaseItem } = require('lib/models/base-item.js');
import { BaseModel } from 'lib/base-model.js'; const { BaseModel } = require('lib/base-model.js');
import { Resource } from 'lib/models/resource.js'; const { Resource } = require('lib/models/resource.js');
import { Folder } from 'lib/models/folder.js'; const { Folder } = require('lib/models/folder.js');
import { NoteTag } from 'lib/models/note-tag.js'; const { NoteTag } = require('lib/models/note-tag.js');
import { Note } from 'lib/models/note.js'; const { Note } = require('lib/models/note.js');
import { Tag } from 'lib/models/tag.js'; const { Tag } = require('lib/models/tag.js');
import { basename } from 'lib/path-utils.js'; const { basename } = require('lib/path-utils.js');
import fs from 'fs-extra'; const fs = require('fs-extra');
class Exporter { class Exporter {

Some files were not shown because too many files have changed in this diff Show More