diff --git a/packages/app-cli/tests/support/plugins/codemirror_content_script/api/Global.d.ts b/packages/app-cli/tests/support/plugins/codemirror_content_script/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/app-cli/tests/support/plugins/codemirror_content_script/api/Global.d.ts +++ b/packages/app-cli/tests/support/plugins/codemirror_content_script/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/app-cli/tests/support/plugins/codemirror_content_script/api/Joplin.d.ts b/packages/app-cli/tests/support/plugins/codemirror_content_script/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/app-cli/tests/support/plugins/codemirror_content_script/api/Joplin.d.ts +++ b/packages/app-cli/tests/support/plugins/codemirror_content_script/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/app-cli/tests/support/plugins/codemirror_content_script/api/JoplinPlugins.d.ts b/packages/app-cli/tests/support/plugins/codemirror_content_script/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/app-cli/tests/support/plugins/codemirror_content_script/api/JoplinPlugins.d.ts +++ b/packages/app-cli/tests/support/plugins/codemirror_content_script/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/packages/app-cli/tests/support/plugins/codemirror_content_script/package.json b/packages/app-cli/tests/support/plugins/codemirror_content_script/package.json index ebc25dcb46..a7ad2623fb 100644 --- a/packages/app-cli/tests/support/plugins/codemirror_content_script/package.json +++ b/packages/app-cli/tests/support/plugins/codemirror_content_script/package.json @@ -6,7 +6,7 @@ "dist": "webpack", "postinstall": "npm run dist" }, - "keywords": [], + "keywords": {}, "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", @@ -20,4 +20,4 @@ "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } -} +} \ No newline at end of file diff --git a/packages/app-cli/tests/support/plugins/codemirror_content_script/webpack.config.js b/packages/app-cli/tests/support/plugins/codemirror_content_script/webpack.config.js index 5c86b05c60..1f3e9a8601 100644 --- a/packages/app-cli/tests/support/plugins/codemirror_content_script/webpack.config.js +++ b/packages/app-cli/tests/support/plugins/codemirror_content_script/webpack.config.js @@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) { const distFiles = glob.sync(`${sourceDir}/**/*`) .map(f => f.substr(sourceDir.length + 1)); + if (!distFiles.length) { + // Usually means there's an error, which is going to be printed by + // webpack + console.info('Plugin archive was not created because the "dist" directory is empty'); + return; + } + fs.removeSync(destPath); tar.create( @@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`; const manifest = readManifest(manifestPath); const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`); +fs.removeSync(distDir); + module.exports = { mode: 'production', entry: './src/index.ts', diff --git a/packages/app-cli/tests/support/plugins/content_script/api/Global.d.ts b/packages/app-cli/tests/support/plugins/content_script/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/app-cli/tests/support/plugins/content_script/api/Global.d.ts +++ b/packages/app-cli/tests/support/plugins/content_script/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/app-cli/tests/support/plugins/content_script/api/Joplin.d.ts b/packages/app-cli/tests/support/plugins/content_script/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/app-cli/tests/support/plugins/content_script/api/Joplin.d.ts +++ b/packages/app-cli/tests/support/plugins/content_script/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/app-cli/tests/support/plugins/content_script/api/JoplinPlugins.d.ts b/packages/app-cli/tests/support/plugins/content_script/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/app-cli/tests/support/plugins/content_script/api/JoplinPlugins.d.ts +++ b/packages/app-cli/tests/support/plugins/content_script/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/packages/app-cli/tests/support/plugins/content_script/package.json b/packages/app-cli/tests/support/plugins/content_script/package.json index ebc25dcb46..a7ad2623fb 100644 --- a/packages/app-cli/tests/support/plugins/content_script/package.json +++ b/packages/app-cli/tests/support/plugins/content_script/package.json @@ -6,7 +6,7 @@ "dist": "webpack", "postinstall": "npm run dist" }, - "keywords": [], + "keywords": {}, "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", @@ -20,4 +20,4 @@ "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } -} +} \ No newline at end of file diff --git a/packages/app-cli/tests/support/plugins/content_script/webpack.config.js b/packages/app-cli/tests/support/plugins/content_script/webpack.config.js index 5c86b05c60..1f3e9a8601 100644 --- a/packages/app-cli/tests/support/plugins/content_script/webpack.config.js +++ b/packages/app-cli/tests/support/plugins/content_script/webpack.config.js @@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) { const distFiles = glob.sync(`${sourceDir}/**/*`) .map(f => f.substr(sourceDir.length + 1)); + if (!distFiles.length) { + // Usually means there's an error, which is going to be printed by + // webpack + console.info('Plugin archive was not created because the "dist" directory is empty'); + return; + } + fs.removeSync(destPath); tar.create( @@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`; const manifest = readManifest(manifestPath); const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`); +fs.removeSync(distDir); + module.exports = { mode: 'production', entry: './src/index.ts', diff --git a/packages/app-cli/tests/support/plugins/dialog/api/Global.d.ts b/packages/app-cli/tests/support/plugins/dialog/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/app-cli/tests/support/plugins/dialog/api/Global.d.ts +++ b/packages/app-cli/tests/support/plugins/dialog/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/app-cli/tests/support/plugins/dialog/api/Joplin.d.ts b/packages/app-cli/tests/support/plugins/dialog/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/app-cli/tests/support/plugins/dialog/api/Joplin.d.ts +++ b/packages/app-cli/tests/support/plugins/dialog/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/app-cli/tests/support/plugins/dialog/api/JoplinPlugins.d.ts b/packages/app-cli/tests/support/plugins/dialog/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/app-cli/tests/support/plugins/dialog/api/JoplinPlugins.d.ts +++ b/packages/app-cli/tests/support/plugins/dialog/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/packages/app-cli/tests/support/plugins/dialog/package.json b/packages/app-cli/tests/support/plugins/dialog/package.json index ebc25dcb46..a7ad2623fb 100644 --- a/packages/app-cli/tests/support/plugins/dialog/package.json +++ b/packages/app-cli/tests/support/plugins/dialog/package.json @@ -6,7 +6,7 @@ "dist": "webpack", "postinstall": "npm run dist" }, - "keywords": [], + "keywords": {}, "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", @@ -20,4 +20,4 @@ "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } -} +} \ No newline at end of file diff --git a/packages/app-cli/tests/support/plugins/dialog/webpack.config.js b/packages/app-cli/tests/support/plugins/dialog/webpack.config.js index 5c86b05c60..1f3e9a8601 100644 --- a/packages/app-cli/tests/support/plugins/dialog/webpack.config.js +++ b/packages/app-cli/tests/support/plugins/dialog/webpack.config.js @@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) { const distFiles = glob.sync(`${sourceDir}/**/*`) .map(f => f.substr(sourceDir.length + 1)); + if (!distFiles.length) { + // Usually means there's an error, which is going to be printed by + // webpack + console.info('Plugin archive was not created because the "dist" directory is empty'); + return; + } + fs.removeSync(destPath); tar.create( @@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`; const manifest = readManifest(manifestPath); const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`); +fs.removeSync(distDir); + module.exports = { mode: 'production', entry: './src/index.ts', diff --git a/packages/app-cli/tests/support/plugins/editor_context_menu/api/Global.d.ts b/packages/app-cli/tests/support/plugins/editor_context_menu/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/app-cli/tests/support/plugins/editor_context_menu/api/Global.d.ts +++ b/packages/app-cli/tests/support/plugins/editor_context_menu/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/app-cli/tests/support/plugins/editor_context_menu/api/Joplin.d.ts b/packages/app-cli/tests/support/plugins/editor_context_menu/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/app-cli/tests/support/plugins/editor_context_menu/api/Joplin.d.ts +++ b/packages/app-cli/tests/support/plugins/editor_context_menu/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/app-cli/tests/support/plugins/editor_context_menu/api/JoplinPlugins.d.ts b/packages/app-cli/tests/support/plugins/editor_context_menu/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/app-cli/tests/support/plugins/editor_context_menu/api/JoplinPlugins.d.ts +++ b/packages/app-cli/tests/support/plugins/editor_context_menu/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/packages/app-cli/tests/support/plugins/editor_context_menu/package.json b/packages/app-cli/tests/support/plugins/editor_context_menu/package.json index ebc25dcb46..a7ad2623fb 100644 --- a/packages/app-cli/tests/support/plugins/editor_context_menu/package.json +++ b/packages/app-cli/tests/support/plugins/editor_context_menu/package.json @@ -6,7 +6,7 @@ "dist": "webpack", "postinstall": "npm run dist" }, - "keywords": [], + "keywords": {}, "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", @@ -20,4 +20,4 @@ "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } -} +} \ No newline at end of file diff --git a/packages/app-cli/tests/support/plugins/editor_context_menu/webpack.config.js b/packages/app-cli/tests/support/plugins/editor_context_menu/webpack.config.js index 5c86b05c60..1f3e9a8601 100644 --- a/packages/app-cli/tests/support/plugins/editor_context_menu/webpack.config.js +++ b/packages/app-cli/tests/support/plugins/editor_context_menu/webpack.config.js @@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) { const distFiles = glob.sync(`${sourceDir}/**/*`) .map(f => f.substr(sourceDir.length + 1)); + if (!distFiles.length) { + // Usually means there's an error, which is going to be printed by + // webpack + console.info('Plugin archive was not created because the "dist" directory is empty'); + return; + } + fs.removeSync(destPath); tar.create( @@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`; const manifest = readManifest(manifestPath); const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`); +fs.removeSync(distDir); + module.exports = { mode: 'production', entry: './src/index.ts', diff --git a/packages/app-cli/tests/support/plugins/events/api/Global.d.ts b/packages/app-cli/tests/support/plugins/events/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/app-cli/tests/support/plugins/events/api/Global.d.ts +++ b/packages/app-cli/tests/support/plugins/events/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/app-cli/tests/support/plugins/events/api/Joplin.d.ts b/packages/app-cli/tests/support/plugins/events/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/app-cli/tests/support/plugins/events/api/Joplin.d.ts +++ b/packages/app-cli/tests/support/plugins/events/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/app-cli/tests/support/plugins/events/api/JoplinPlugins.d.ts b/packages/app-cli/tests/support/plugins/events/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/app-cli/tests/support/plugins/events/api/JoplinPlugins.d.ts +++ b/packages/app-cli/tests/support/plugins/events/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/packages/app-cli/tests/support/plugins/events/package.json b/packages/app-cli/tests/support/plugins/events/package.json index ebc25dcb46..a7ad2623fb 100644 --- a/packages/app-cli/tests/support/plugins/events/package.json +++ b/packages/app-cli/tests/support/plugins/events/package.json @@ -6,7 +6,7 @@ "dist": "webpack", "postinstall": "npm run dist" }, - "keywords": [], + "keywords": {}, "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", @@ -20,4 +20,4 @@ "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } -} +} \ No newline at end of file diff --git a/packages/app-cli/tests/support/plugins/events/webpack.config.js b/packages/app-cli/tests/support/plugins/events/webpack.config.js index 5c86b05c60..1f3e9a8601 100644 --- a/packages/app-cli/tests/support/plugins/events/webpack.config.js +++ b/packages/app-cli/tests/support/plugins/events/webpack.config.js @@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) { const distFiles = glob.sync(`${sourceDir}/**/*`) .map(f => f.substr(sourceDir.length + 1)); + if (!distFiles.length) { + // Usually means there's an error, which is going to be printed by + // webpack + console.info('Plugin archive was not created because the "dist" directory is empty'); + return; + } + fs.removeSync(destPath); tar.create( @@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`; const manifest = readManifest(manifestPath); const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`); +fs.removeSync(distDir); + module.exports = { mode: 'production', entry: './src/index.ts', diff --git a/packages/app-cli/tests/support/plugins/jpl_test/api/Global.d.ts b/packages/app-cli/tests/support/plugins/jpl_test/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/app-cli/tests/support/plugins/jpl_test/api/Global.d.ts +++ b/packages/app-cli/tests/support/plugins/jpl_test/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/app-cli/tests/support/plugins/jpl_test/api/Joplin.d.ts b/packages/app-cli/tests/support/plugins/jpl_test/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/app-cli/tests/support/plugins/jpl_test/api/Joplin.d.ts +++ b/packages/app-cli/tests/support/plugins/jpl_test/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/app-cli/tests/support/plugins/jpl_test/api/JoplinPlugins.d.ts b/packages/app-cli/tests/support/plugins/jpl_test/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/app-cli/tests/support/plugins/jpl_test/api/JoplinPlugins.d.ts +++ b/packages/app-cli/tests/support/plugins/jpl_test/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/packages/app-cli/tests/support/plugins/jpl_test/package.json b/packages/app-cli/tests/support/plugins/jpl_test/package.json index ebc25dcb46..a7ad2623fb 100644 --- a/packages/app-cli/tests/support/plugins/jpl_test/package.json +++ b/packages/app-cli/tests/support/plugins/jpl_test/package.json @@ -6,7 +6,7 @@ "dist": "webpack", "postinstall": "npm run dist" }, - "keywords": [], + "keywords": {}, "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", @@ -20,4 +20,4 @@ "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } -} +} \ No newline at end of file diff --git a/packages/app-cli/tests/support/plugins/jpl_test/webpack.config.js b/packages/app-cli/tests/support/plugins/jpl_test/webpack.config.js index 5c86b05c60..1f3e9a8601 100644 --- a/packages/app-cli/tests/support/plugins/jpl_test/webpack.config.js +++ b/packages/app-cli/tests/support/plugins/jpl_test/webpack.config.js @@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) { const distFiles = glob.sync(`${sourceDir}/**/*`) .map(f => f.substr(sourceDir.length + 1)); + if (!distFiles.length) { + // Usually means there's an error, which is going to be printed by + // webpack + console.info('Plugin archive was not created because the "dist" directory is empty'); + return; + } + fs.removeSync(destPath); tar.create( @@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`; const manifest = readManifest(manifestPath); const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`); +fs.removeSync(distDir); + module.exports = { mode: 'production', entry: './src/index.ts', diff --git a/packages/app-cli/tests/support/plugins/json_export/api/Global.d.ts b/packages/app-cli/tests/support/plugins/json_export/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/app-cli/tests/support/plugins/json_export/api/Global.d.ts +++ b/packages/app-cli/tests/support/plugins/json_export/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/app-cli/tests/support/plugins/json_export/api/Joplin.d.ts b/packages/app-cli/tests/support/plugins/json_export/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/app-cli/tests/support/plugins/json_export/api/Joplin.d.ts +++ b/packages/app-cli/tests/support/plugins/json_export/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/app-cli/tests/support/plugins/json_export/api/JoplinPlugins.d.ts b/packages/app-cli/tests/support/plugins/json_export/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/app-cli/tests/support/plugins/json_export/api/JoplinPlugins.d.ts +++ b/packages/app-cli/tests/support/plugins/json_export/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/packages/app-cli/tests/support/plugins/json_export/package.json b/packages/app-cli/tests/support/plugins/json_export/package.json index ebc25dcb46..a7ad2623fb 100644 --- a/packages/app-cli/tests/support/plugins/json_export/package.json +++ b/packages/app-cli/tests/support/plugins/json_export/package.json @@ -6,7 +6,7 @@ "dist": "webpack", "postinstall": "npm run dist" }, - "keywords": [], + "keywords": {}, "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", @@ -20,4 +20,4 @@ "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } -} +} \ No newline at end of file diff --git a/packages/app-cli/tests/support/plugins/json_export/webpack.config.js b/packages/app-cli/tests/support/plugins/json_export/webpack.config.js index 5c86b05c60..1f3e9a8601 100644 --- a/packages/app-cli/tests/support/plugins/json_export/webpack.config.js +++ b/packages/app-cli/tests/support/plugins/json_export/webpack.config.js @@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) { const distFiles = glob.sync(`${sourceDir}/**/*`) .map(f => f.substr(sourceDir.length + 1)); + if (!distFiles.length) { + // Usually means there's an error, which is going to be printed by + // webpack + console.info('Plugin archive was not created because the "dist" directory is empty'); + return; + } + fs.removeSync(destPath); tar.create( @@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`; const manifest = readManifest(manifestPath); const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`); +fs.removeSync(distDir); + module.exports = { mode: 'production', entry: './src/index.ts', diff --git a/packages/app-cli/tests/support/plugins/menu/api/Global.d.ts b/packages/app-cli/tests/support/plugins/menu/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/app-cli/tests/support/plugins/menu/api/Global.d.ts +++ b/packages/app-cli/tests/support/plugins/menu/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/app-cli/tests/support/plugins/menu/api/Joplin.d.ts b/packages/app-cli/tests/support/plugins/menu/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/app-cli/tests/support/plugins/menu/api/Joplin.d.ts +++ b/packages/app-cli/tests/support/plugins/menu/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/app-cli/tests/support/plugins/menu/api/JoplinPlugins.d.ts b/packages/app-cli/tests/support/plugins/menu/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/app-cli/tests/support/plugins/menu/api/JoplinPlugins.d.ts +++ b/packages/app-cli/tests/support/plugins/menu/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/packages/app-cli/tests/support/plugins/menu/package.json b/packages/app-cli/tests/support/plugins/menu/package.json index ebc25dcb46..a7ad2623fb 100644 --- a/packages/app-cli/tests/support/plugins/menu/package.json +++ b/packages/app-cli/tests/support/plugins/menu/package.json @@ -6,7 +6,7 @@ "dist": "webpack", "postinstall": "npm run dist" }, - "keywords": [], + "keywords": {}, "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", @@ -20,4 +20,4 @@ "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } -} +} \ No newline at end of file diff --git a/packages/app-cli/tests/support/plugins/menu/webpack.config.js b/packages/app-cli/tests/support/plugins/menu/webpack.config.js index 5c86b05c60..1f3e9a8601 100644 --- a/packages/app-cli/tests/support/plugins/menu/webpack.config.js +++ b/packages/app-cli/tests/support/plugins/menu/webpack.config.js @@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) { const distFiles = glob.sync(`${sourceDir}/**/*`) .map(f => f.substr(sourceDir.length + 1)); + if (!distFiles.length) { + // Usually means there's an error, which is going to be printed by + // webpack + console.info('Plugin archive was not created because the "dist" directory is empty'); + return; + } + fs.removeSync(destPath); tar.create( @@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`; const manifest = readManifest(manifestPath); const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`); +fs.removeSync(distDir); + module.exports = { mode: 'production', entry: './src/index.ts', diff --git a/packages/app-cli/tests/support/plugins/multi_selection/api/Global.d.ts b/packages/app-cli/tests/support/plugins/multi_selection/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/app-cli/tests/support/plugins/multi_selection/api/Global.d.ts +++ b/packages/app-cli/tests/support/plugins/multi_selection/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/app-cli/tests/support/plugins/multi_selection/api/Joplin.d.ts b/packages/app-cli/tests/support/plugins/multi_selection/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/app-cli/tests/support/plugins/multi_selection/api/Joplin.d.ts +++ b/packages/app-cli/tests/support/plugins/multi_selection/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/app-cli/tests/support/plugins/multi_selection/api/JoplinPlugins.d.ts b/packages/app-cli/tests/support/plugins/multi_selection/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/app-cli/tests/support/plugins/multi_selection/api/JoplinPlugins.d.ts +++ b/packages/app-cli/tests/support/plugins/multi_selection/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/packages/app-cli/tests/support/plugins/multi_selection/package.json b/packages/app-cli/tests/support/plugins/multi_selection/package.json index ebc25dcb46..a7ad2623fb 100644 --- a/packages/app-cli/tests/support/plugins/multi_selection/package.json +++ b/packages/app-cli/tests/support/plugins/multi_selection/package.json @@ -6,7 +6,7 @@ "dist": "webpack", "postinstall": "npm run dist" }, - "keywords": [], + "keywords": {}, "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", @@ -20,4 +20,4 @@ "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } -} +} \ No newline at end of file diff --git a/packages/app-cli/tests/support/plugins/multi_selection/webpack.config.js b/packages/app-cli/tests/support/plugins/multi_selection/webpack.config.js index 5c86b05c60..1f3e9a8601 100644 --- a/packages/app-cli/tests/support/plugins/multi_selection/webpack.config.js +++ b/packages/app-cli/tests/support/plugins/multi_selection/webpack.config.js @@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) { const distFiles = glob.sync(`${sourceDir}/**/*`) .map(f => f.substr(sourceDir.length + 1)); + if (!distFiles.length) { + // Usually means there's an error, which is going to be printed by + // webpack + console.info('Plugin archive was not created because the "dist" directory is empty'); + return; + } + fs.removeSync(destPath); tar.create( @@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`; const manifest = readManifest(manifestPath); const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`); +fs.removeSync(distDir); + module.exports = { mode: 'production', entry: './src/index.ts', diff --git a/packages/app-cli/tests/support/plugins/register_command/api/Global.d.ts b/packages/app-cli/tests/support/plugins/register_command/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/app-cli/tests/support/plugins/register_command/api/Global.d.ts +++ b/packages/app-cli/tests/support/plugins/register_command/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/app-cli/tests/support/plugins/register_command/api/Joplin.d.ts b/packages/app-cli/tests/support/plugins/register_command/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/app-cli/tests/support/plugins/register_command/api/Joplin.d.ts +++ b/packages/app-cli/tests/support/plugins/register_command/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/app-cli/tests/support/plugins/register_command/api/JoplinPlugins.d.ts b/packages/app-cli/tests/support/plugins/register_command/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/app-cli/tests/support/plugins/register_command/api/JoplinPlugins.d.ts +++ b/packages/app-cli/tests/support/plugins/register_command/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/packages/app-cli/tests/support/plugins/register_command/api/types.ts b/packages/app-cli/tests/support/plugins/register_command/api/types.ts index af2ccb25ee..f81bc10384 100644 --- a/packages/app-cli/tests/support/plugins/register_command/api/types.ts +++ b/packages/app-cli/tests/support/plugins/register_command/api/types.ts @@ -208,13 +208,6 @@ export enum MenuItemLocation { * @deprecated Do not use - same as NoteListContextMenu */ Context = 'context', - - /** - * The context menu that appears when right-clicking on the note - * list, or when multiple notes are selected. Any command triggered from - * this location will receive a `noteIds` array with the list of notes that - * were right-clicked or selected. - */ NoteListContextMenu = 'noteListContextMenu', EditorContextMenu = 'editorContextMenu', } diff --git a/packages/app-cli/tests/support/plugins/register_command/package.json b/packages/app-cli/tests/support/plugins/register_command/package.json index ebc25dcb46..a7ad2623fb 100644 --- a/packages/app-cli/tests/support/plugins/register_command/package.json +++ b/packages/app-cli/tests/support/plugins/register_command/package.json @@ -6,7 +6,7 @@ "dist": "webpack", "postinstall": "npm run dist" }, - "keywords": [], + "keywords": {}, "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", @@ -20,4 +20,4 @@ "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } -} +} \ No newline at end of file diff --git a/packages/app-cli/tests/support/plugins/register_command/webpack.config.js b/packages/app-cli/tests/support/plugins/register_command/webpack.config.js index 5c86b05c60..1f3e9a8601 100644 --- a/packages/app-cli/tests/support/plugins/register_command/webpack.config.js +++ b/packages/app-cli/tests/support/plugins/register_command/webpack.config.js @@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) { const distFiles = glob.sync(`${sourceDir}/**/*`) .map(f => f.substr(sourceDir.length + 1)); + if (!distFiles.length) { + // Usually means there's an error, which is going to be printed by + // webpack + console.info('Plugin archive was not created because the "dist" directory is empty'); + return; + } + fs.removeSync(destPath); tar.create( @@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`; const manifest = readManifest(manifestPath); const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`); +fs.removeSync(distDir); + module.exports = { mode: 'production', entry: './src/index.ts', diff --git a/packages/app-cli/tests/support/plugins/selected_text/api/Global.d.ts b/packages/app-cli/tests/support/plugins/selected_text/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/app-cli/tests/support/plugins/selected_text/api/Global.d.ts +++ b/packages/app-cli/tests/support/plugins/selected_text/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/app-cli/tests/support/plugins/selected_text/api/Joplin.d.ts b/packages/app-cli/tests/support/plugins/selected_text/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/app-cli/tests/support/plugins/selected_text/api/Joplin.d.ts +++ b/packages/app-cli/tests/support/plugins/selected_text/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/app-cli/tests/support/plugins/selected_text/api/JoplinPlugins.d.ts b/packages/app-cli/tests/support/plugins/selected_text/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/app-cli/tests/support/plugins/selected_text/api/JoplinPlugins.d.ts +++ b/packages/app-cli/tests/support/plugins/selected_text/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/packages/app-cli/tests/support/plugins/selected_text/package.json b/packages/app-cli/tests/support/plugins/selected_text/package.json index ebc25dcb46..a7ad2623fb 100644 --- a/packages/app-cli/tests/support/plugins/selected_text/package.json +++ b/packages/app-cli/tests/support/plugins/selected_text/package.json @@ -6,7 +6,7 @@ "dist": "webpack", "postinstall": "npm run dist" }, - "keywords": [], + "keywords": {}, "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", @@ -20,4 +20,4 @@ "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } -} +} \ No newline at end of file diff --git a/packages/app-cli/tests/support/plugins/selected_text/webpack.config.js b/packages/app-cli/tests/support/plugins/selected_text/webpack.config.js index 5c86b05c60..1f3e9a8601 100644 --- a/packages/app-cli/tests/support/plugins/selected_text/webpack.config.js +++ b/packages/app-cli/tests/support/plugins/selected_text/webpack.config.js @@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) { const distFiles = glob.sync(`${sourceDir}/**/*`) .map(f => f.substr(sourceDir.length + 1)); + if (!distFiles.length) { + // Usually means there's an error, which is going to be printed by + // webpack + console.info('Plugin archive was not created because the "dist" directory is empty'); + return; + } + fs.removeSync(destPath); tar.create( @@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`; const manifest = readManifest(manifestPath); const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`); +fs.removeSync(distDir); + module.exports = { mode: 'production', entry: './src/index.ts', diff --git a/packages/app-cli/tests/support/plugins/settings/api/Global.d.ts b/packages/app-cli/tests/support/plugins/settings/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/app-cli/tests/support/plugins/settings/api/Global.d.ts +++ b/packages/app-cli/tests/support/plugins/settings/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/app-cli/tests/support/plugins/settings/api/Joplin.d.ts b/packages/app-cli/tests/support/plugins/settings/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/app-cli/tests/support/plugins/settings/api/Joplin.d.ts +++ b/packages/app-cli/tests/support/plugins/settings/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/app-cli/tests/support/plugins/settings/api/JoplinPlugins.d.ts b/packages/app-cli/tests/support/plugins/settings/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/app-cli/tests/support/plugins/settings/api/JoplinPlugins.d.ts +++ b/packages/app-cli/tests/support/plugins/settings/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/packages/app-cli/tests/support/plugins/settings/package.json b/packages/app-cli/tests/support/plugins/settings/package.json index ebc25dcb46..a7ad2623fb 100644 --- a/packages/app-cli/tests/support/plugins/settings/package.json +++ b/packages/app-cli/tests/support/plugins/settings/package.json @@ -6,7 +6,7 @@ "dist": "webpack", "postinstall": "npm run dist" }, - "keywords": [], + "keywords": {}, "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", @@ -20,4 +20,4 @@ "webpack": "^4.43.0", "webpack-cli": "^3.3.11" } -} +} \ No newline at end of file diff --git a/packages/app-cli/tests/support/plugins/settings/webpack.config.js b/packages/app-cli/tests/support/plugins/settings/webpack.config.js index 5c86b05c60..1f3e9a8601 100644 --- a/packages/app-cli/tests/support/plugins/settings/webpack.config.js +++ b/packages/app-cli/tests/support/plugins/settings/webpack.config.js @@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) { const distFiles = glob.sync(`${sourceDir}/**/*`) .map(f => f.substr(sourceDir.length + 1)); + if (!distFiles.length) { + // Usually means there's an error, which is going to be printed by + // webpack + console.info('Plugin archive was not created because the "dist" directory is empty'); + return; + } + fs.removeSync(destPath); tar.create( @@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`; const manifest = readManifest(manifestPath); const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`); +fs.removeSync(distDir); + module.exports = { mode: 'production', entry: './src/index.ts', diff --git a/packages/app-cli/tests/support/plugins/toc/api/Global.d.ts b/packages/app-cli/tests/support/plugins/toc/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/app-cli/tests/support/plugins/toc/api/Global.d.ts +++ b/packages/app-cli/tests/support/plugins/toc/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/app-cli/tests/support/plugins/toc/api/Joplin.d.ts b/packages/app-cli/tests/support/plugins/toc/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/app-cli/tests/support/plugins/toc/api/Joplin.d.ts +++ b/packages/app-cli/tests/support/plugins/toc/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/app-cli/tests/support/plugins/toc/api/JoplinPlugins.d.ts b/packages/app-cli/tests/support/plugins/toc/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/app-cli/tests/support/plugins/toc/api/JoplinPlugins.d.ts +++ b/packages/app-cli/tests/support/plugins/toc/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/packages/app-cli/tests/support/plugins/toc/package.json b/packages/app-cli/tests/support/plugins/toc/package.json index 2d1bfd13fa..49adee3588 100644 --- a/packages/app-cli/tests/support/plugins/toc/package.json +++ b/packages/app-cli/tests/support/plugins/toc/package.json @@ -6,7 +6,7 @@ "dist": "webpack", "postinstall": "npm run dist" }, - "keywords": [], + "keywords": {}, "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", @@ -23,4 +23,4 @@ "dependencies": { "uslug": "^1.0.4" } -} +} \ No newline at end of file diff --git a/packages/app-cli/tests/support/plugins/toc/webpack.config.js b/packages/app-cli/tests/support/plugins/toc/webpack.config.js index 5c86b05c60..1f3e9a8601 100644 --- a/packages/app-cli/tests/support/plugins/toc/webpack.config.js +++ b/packages/app-cli/tests/support/plugins/toc/webpack.config.js @@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) { const distFiles = glob.sync(`${sourceDir}/**/*`) .map(f => f.substr(sourceDir.length + 1)); + if (!distFiles.length) { + // Usually means there's an error, which is going to be printed by + // webpack + console.info('Plugin archive was not created because the "dist" directory is empty'); + return; + } + fs.removeSync(destPath); tar.create( @@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`; const manifest = readManifest(manifestPath); const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`); +fs.removeSync(distDir); + module.exports = { mode: 'production', entry: './src/index.ts', diff --git a/packages/app-cli/tests/support/plugins/withExternalModules/api/Global.d.ts b/packages/app-cli/tests/support/plugins/withExternalModules/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/app-cli/tests/support/plugins/withExternalModules/api/Global.d.ts +++ b/packages/app-cli/tests/support/plugins/withExternalModules/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/app-cli/tests/support/plugins/withExternalModules/api/Joplin.d.ts b/packages/app-cli/tests/support/plugins/withExternalModules/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/app-cli/tests/support/plugins/withExternalModules/api/Joplin.d.ts +++ b/packages/app-cli/tests/support/plugins/withExternalModules/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/app-cli/tests/support/plugins/withExternalModules/api/JoplinPlugins.d.ts b/packages/app-cli/tests/support/plugins/withExternalModules/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/app-cli/tests/support/plugins/withExternalModules/api/JoplinPlugins.d.ts +++ b/packages/app-cli/tests/support/plugins/withExternalModules/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/packages/app-cli/tests/support/plugins/withExternalModules/package.json b/packages/app-cli/tests/support/plugins/withExternalModules/package.json index b62bc62a97..0003e5215b 100644 --- a/packages/app-cli/tests/support/plugins/withExternalModules/package.json +++ b/packages/app-cli/tests/support/plugins/withExternalModules/package.json @@ -6,7 +6,7 @@ "dist": "webpack", "postinstall": "npm run dist" }, - "keywords": [], + "keywords": {}, "license": "MIT", "devDependencies": { "@types/node": "^14.0.14", @@ -23,4 +23,4 @@ "dependencies": { "left-pad": "^1.3.0" } -} +} \ No newline at end of file diff --git a/packages/app-cli/tests/support/plugins/withExternalModules/webpack.config.js b/packages/app-cli/tests/support/plugins/withExternalModules/webpack.config.js index 5c86b05c60..1f3e9a8601 100644 --- a/packages/app-cli/tests/support/plugins/withExternalModules/webpack.config.js +++ b/packages/app-cli/tests/support/plugins/withExternalModules/webpack.config.js @@ -16,6 +16,13 @@ function createPluginArchive(sourceDir, destPath) { const distFiles = glob.sync(`${sourceDir}/**/*`) .map(f => f.substr(sourceDir.length + 1)); + if (!distFiles.length) { + // Usually means there's an error, which is going to be printed by + // webpack + console.info('Plugin archive was not created because the "dist" directory is empty'); + return; + } + fs.removeSync(destPath); tar.create( @@ -38,6 +45,8 @@ const manifestPath = `${srcDir}/manifest.json`; const manifest = readManifest(manifestPath); const archiveFilePath = path.resolve(__dirname, `${manifest.id}.jpl`); +fs.removeSync(distDir); + module.exports = { mode: 'production', entry: './src/index.ts', diff --git a/packages/app-desktop/package-lock.json b/packages/app-desktop/package-lock.json index 35cf54edf9..7246d4924b 100644 --- a/packages/app-desktop/package-lock.json +++ b/packages/app-desktop/package-lock.json @@ -1,6 +1,6 @@ { "name": "@joplin/app-desktop", - "version": "1.4.11", + "version": "1.4.12", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/packages/app-desktop/package.json b/packages/app-desktop/package.json index 1748715d58..5eb7678c8f 100644 --- a/packages/app-desktop/package.json +++ b/packages/app-desktop/package.json @@ -1,6 +1,6 @@ { "name": "@joplin/app-desktop", - "version": "1.4.11", + "version": "1.4.12", "description": "Joplin for Desktop", "main": "main.js", "private": true, diff --git a/packages/generator-joplin/generators/app/templates/api/Global.d.ts b/packages/generator-joplin/generators/app/templates/api/Global.d.ts index f6a0078fa2..1bc9783e76 100644 --- a/packages/generator-joplin/generators/app/templates/api/Global.d.ts +++ b/packages/generator-joplin/generators/app/templates/api/Global.d.ts @@ -1,13 +1,12 @@ import Plugin from '../Plugin'; import Joplin from './Joplin'; -import Logger from '../../../Logger'; /** * @ignore */ export default class Global { private joplin_; private requireWhiteList_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get joplin(): Joplin; private requireWhiteList; require(filePath: string): any; diff --git a/packages/generator-joplin/generators/app/templates/api/Joplin.d.ts b/packages/generator-joplin/generators/app/templates/api/Joplin.d.ts index 74494aea09..fc09aeeaa4 100644 --- a/packages/generator-joplin/generators/app/templates/api/Joplin.d.ts +++ b/packages/generator-joplin/generators/app/templates/api/Joplin.d.ts @@ -7,7 +7,6 @@ import JoplinCommands from './JoplinCommands'; import JoplinViews from './JoplinViews'; import JoplinInterop from './JoplinInterop'; import JoplinSettings from './JoplinSettings'; -import Logger from '../../../Logger'; /** * This is the main entry point to the Joplin API. You can access various services using the provided accessors. * @@ -32,7 +31,7 @@ export default class Joplin { private views_; private interop_; private settings_; - constructor(logger: Logger, implementation: any, plugin: Plugin, store: any); + constructor(implementation: any, plugin: Plugin, store: any); get data(): JoplinData; get plugins(): JoplinPlugins; get workspace(): JoplinWorkspace; diff --git a/packages/generator-joplin/generators/app/templates/api/JoplinPlugins.d.ts b/packages/generator-joplin/generators/app/templates/api/JoplinPlugins.d.ts index 2a2bfd93a4..458445a660 100644 --- a/packages/generator-joplin/generators/app/templates/api/JoplinPlugins.d.ts +++ b/packages/generator-joplin/generators/app/templates/api/JoplinPlugins.d.ts @@ -1,13 +1,11 @@ import Plugin from '../Plugin'; -import Logger from '../../../Logger'; import { ContentScriptType, Script } from './types'; /** * This class provides access to plugin-related features. */ export default class JoplinPlugins { - private logger; private plugin; - constructor(logger: Logger, plugin: Plugin); + constructor(plugin: Plugin); /** * Registers a new plugin. This is the entry point when creating a plugin. You should pass a simple object with an `onStart` method to it. * That `onStart` method will be executed as soon as the plugin is loaded. diff --git a/readme/donate.md b/readme/donate.md index 60b10e23e8..bccba1bf42 100644 --- a/readme/donate.md +++ b/readme/donate.md @@ -2,28 +2,19 @@ Donations to Joplin support the development of the project. Developing quality applications mostly takes time, but there are also some expenses, such as digital certificates to sign the applications, app store fees, hosting, etc. Most of all, your donation will make it possible to keep up the current development standards. -## PayPal +## Donations -To donate via PayPal, please follow this link: - -[![Donate on PayPal](https://joplinapp.org/images/badges/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=E8JMYD2LQ8MMA&lc=GB&item_name=Joplin+Development¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) - -## GitHub Sponsor - -Or follow this link to become a GitHub Sponsor: - -[![Sponsor on GitHub](https://joplinapp.org/images/badges/GitHub-Badge.svg)](https://github.com/sponsors/laurent22/) - -## Patreon - -Alternatively you may support the project on Patreon: - -[![Become a patron](https://joplinapp.org/images/badges/Patreon-Badge.svg)](https://www.patreon.com/joplin) +Platform | Link +--- | --- +Paypal | [![Donate on PayPal](https://joplinapp.org/images/badges/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=E8JMYD2LQ8MMA&lc=GB&item_name=Joplin+Development¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) | +GitHub Sponsor | [![Sponsor on GitHub](https://joplinapp.org/images/badges/GitHub-Badge.svg)](https://github.com/sponsors/laurent22/) +Patreon | [![Become a patron](https://joplinapp.org/images/badges/Patreon-Badge.svg)](https://www.patreon.com/joplin) +Bank Transfer | **IBAN:** FR76 4061 8803 5200 0400 7415 938
**BIC/SWIFT:** BOUS FRPP XXX ## Other way to support the development Finally, there are other ways to support the development of Joplin: - Consider rating the app on [Google Play](https://play.google.com/store/apps/details?id=net.cozic.joplin&utm_source=GitHub&utm_campaign=README&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1) or [App Store](https://itunes.apple.com/us/app/joplin/id1315599797). -- [Create or update a translation](https://joplinapp.org/#localisation). - Vote for or review the app on [alternativeTo](https://alternativeto.net/software/joplin/) or [Product Hunt](https://www.producthunt.com/posts/joplin). +- [Create or update a translation](https://joplinapp.org/#localisation).