1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-24 20:19:10 +02:00

Compare commits

...

413 Commits

Author SHA1 Message Date
Laurent Cozic
3c210a012a Android 2.14.3 2024-01-06 12:45:54 +00:00
Laurent Cozic
92667bafc1 Desktop release v2.14.6 2024-01-06 12:19:13 +00:00
Henry Heino
fc7d053521 Chore: Webclipper: Migrate build system to Webpack 5 (#9670) 2024-01-06 12:15:10 +00:00
Henry Heino
47072b3813 Chore: Migrate from css to @adobe/css-tools (#9660)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2024-01-06 12:13:23 +00:00
Henry Heino
7a13003af5 Chore: Mobile: Allow debugging iOS WebViews when running in dev mode (#9659)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2024-01-06 12:13:00 +00:00
charles
723b708d89 All: Translation: Update zh_TW.po (#9650) 2024-01-05 20:36:46 -05:00
Laurent Cozic
36a24a5ed8 Chore: Add more tests for tags 2024-01-05 18:21:24 +00:00
Laurent Cozic
091bf4a3d7 Fix tests 2024-01-05 18:16:09 +00:00
Laurent Cozic
ce8e5e61be Chore: Convert tag tests to TypeScript 2024-01-05 16:40:58 +00:00
Laurent Cozic
b8462c4754 Fixed rename 2024-01-05 15:03:23 +00:00
Laurent Cozic
73ad7e0572 Chore: Added test for OCR search 2024-01-05 14:43:24 +00:00
Laurent Cozic
2bf4f39ca1 Chore: Moved search files from "searchengine" namespace to just "search" 2024-01-05 14:15:47 +00:00
Laurent Cozic
29b8fcd5bb Chore: Converted search engine tests to TypeScript 2024-01-05 14:06:33 +00:00
renovate[bot]
2a96012577 Update dependency deprecated-react-native-prop-types to v5 (#9666)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-05 11:56:56 +00:00
Laurent Cozic
474e8c95a0 Chore: Make buildScriptIndexes generates code that passes linter 2024-01-05 09:46:53 +00:00
Laurent Cozic
906b7c3a33 Chore: Allow saving multiple note changes in one transaction 2024-01-05 09:38:22 +00:00
renovate[bot]
0a2afdb010 Update dependency react-native-paper to v5.11.4 (#9639)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-05 02:43:42 +00:00
Laurent Cozic
a281163353 Chore: Automatically build migration index 2024-01-04 17:18:57 +00:00
Laurent Cozic
9aa7240d5e Doc: Added documentation for OCR 2024-01-04 16:25:58 +00:00
Laurent Cozic
9cf63168da Doc: Added documentation for OCR 2024-01-04 16:18:03 +00:00
Henry Heino
430f73c47a Desktop,Mobile: Resolves #9594: Fix table-of-contents links to headings with duplicate content (#9610) 2024-01-04 15:14:52 +00:00
Henry Heino
7e8c87e908 Desktop: Resolves #9468: Add support for changing text colors in rich text editor (#9578) 2024-01-04 13:51:26 +00:00
Henry Heino
4e09b6f2a4 Desktop,Mobile: Resolves #3201: Render mermaid diagrams in dark mode when Joplin is in dark mode (#9631) 2024-01-04 13:45:06 +00:00
github-actions[bot]
d02058d337 @charles7668 has signed the CLA in laurent22/joplin#9650 2024-01-04 00:29:12 +00:00
Laurent Cozic
f95ee689fd Mobile: Improve sync by reducing how often note list is sorted 2024-01-03 18:02:05 +00:00
ERYpTION
164e53ee7d All: Translation: Update da_DK.po (#9640) 2024-01-01 08:05:00 -05:00
Joplin Bot
cb1322f01e Doc: Auto-update documentation
Auto-updated using release-website.sh
2024-01-01 00:42:45 +00:00
Joplin Bot
cc22d71408 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-31 18:15:57 +00:00
Laurent Cozic
ff7c13ac85 Android 2.14.2 2023-12-31 16:41:40 +00:00
Laurent Cozic
302bc4dcc7 Desktop release v2.14.5 2023-12-31 16:06:59 +00:00
Laurent Cozic
ebfc5da0fe Chore: Fix sync issue with Joplin Server when DELTA_INCLUDES_ITEMS is disabled 2023-12-31 16:06:02 +00:00
Laurent Cozic
00eee19077 Desktop, Cli: Fix importing certain ENEX notes that include invalid tables 2023-12-31 15:07:12 +00:00
Laurent Cozic
4048d83dd7 Tools: Exclude some packages from git-changelog 2023-12-31 00:24:30 +00:00
renovate[bot]
48b8fae625 Update dependency ts-node to v10.9.2 (#9622)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2023-12-31 00:16:08 +00:00
Laurent Cozic
60fbc6e022 Update renovate.json5 2023-12-31 00:15:39 +00:00
renovate[bot]
ae73b5b87c Update dependency react-native-get-random-values to v1.10.0 (#9635)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-31 00:14:39 +00:00
renovate[bot]
6bc2ef9869 Update dependency rate-limiter-flexible to v3.0.6 (#9633)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-30 20:17:43 +00:00
renovate[bot]
206d4ab56d Update dependency @types/react to v18.2.43 (#9632)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-30 20:12:59 +00:00
Helmut K. C. Tessarek
96456aa851 Update translations 2023-12-30 21:12:31 +01:00
rnbastos
adf0ccee2f All: Translation: Update pt_BR.po (#9627) 2023-12-30 15:02:10 -05:00
Mr.X
01394e43d9 All: Translation: Update zh_CN.po (#9609) 2023-12-30 15:00:11 -05:00
Laurent Cozic
39c19db69c Desktop release v2.14.4 2023-12-30 19:21:43 +00:00
Laurent Cozic
105e408dca Chore: Fixed OCR error handling 2023-12-30 19:20:50 +00:00
Laurent Cozic
37dbea1613 Chore: Add more types to synchronizer and improved sync conflict log 2023-12-30 19:05:41 +00:00
Laurent Cozic
2512adebd2 Desktop release v2.14.3 2023-12-30 16:55:06 +00:00
Laurent Cozic
28538de028 Chore: Desktop: Trying to fix OCR 2023-12-30 16:54:51 +00:00
Laurent Cozic
a0b4f5acac iOS 12.14.1 2023-12-29 23:10:40 +00:00
Laurent Cozic
30a5bda5b9 lock file 2023-12-29 22:23:26 +00:00
Laurent Cozic
c5865b3bf5 Android 2.14.1 2023-12-29 22:21:20 +00:00
Laurent Cozic
a9f6b38120 Desktop release v2.14.2 2023-12-29 21:13:28 +00:00
Laurent Cozic
75447f7267 Chore: Trying to fix macOS notarization 2023-12-29 21:13:15 +00:00
Laurent Cozic
ca703adf6a Desktop release v2.14.1 2023-12-29 18:49:15 +00:00
Laurent Cozic
f38abc5718 Server: Display correct date and time on published notes 2023-12-29 18:42:34 +00:00
Henry Heino
d733a7f5ae Chore: Fix flaky mermaid/KaTeX rendering test (#9628) 2023-12-29 17:58:07 +00:00
rnbastos
0f388b13c7 Update index.md (#9626) 2023-12-29 16:50:59 +00:00
Laurent Cozic
754ca39926 Desktop: Fixes #9511: HTML notes are not readable in dark mode 2023-12-29 16:08:09 +00:00
github-actions[bot]
8a05baa97f @rnbastos has signed the CLA in laurent22/joplin#9626 2023-12-29 13:19:28 +00:00
renovate[bot]
1df00a1e5a Update dependency @react-native-community/slider to v4.4.4 (#9620)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-29 05:57:20 +00:00
renovate[bot]
5e63b623ca Update dependency @playwright/test to v1.40.1 (#9621)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-29 05:56:46 +00:00
renovate[bot]
f8a25cb275 Update dependency @types/react-redux to v7.1.32 (#9616)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-28 15:06:24 +00:00
renovate[bot]
1e866ead3e Update dependency @playwright/test to v1.40.0 (#9618)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-28 14:52:45 +00:00
renovate[bot]
3970b0876d Update dependency knex to v3 (#9619)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-28 14:52:14 +00:00
renovate[bot]
6b711f655d Update dependency @types/react to v18.2.42 (#9615)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-28 12:00:35 +00:00
Laurent Cozic
65d3ed0c67 Update renovate.json5 2023-12-28 11:29:33 +00:00
renovate[bot]
512e37b46a Update dependency tesseract.js to v5.0.3 (#9600)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-28 09:12:06 +00:00
renovate[bot]
ed15b5e5da Update dependency nodemon to v3.0.2 (#9599)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-28 09:07:56 +00:00
github-actions[bot]
f9d1157266 @ZhReimu has signed the CLA in laurent22/joplin#9609 2023-12-27 14:14:54 +00:00
Naoki Kawamukai
cda0538681 All: Translation: Update ja_JP.po (#9604) 2023-12-26 18:56:46 -05:00
Laurent Cozic
3342b138b4 Update renovate.json5 2023-12-26 12:53:54 +00:00
Laurent Cozic
9285bb7a88 Update renovate.json5 2023-12-26 12:53:24 +00:00
Laurent Cozic
590769b1ae Desktop, Cli: Resolves #9596: Restore note links after importing an ENEX file 2023-12-26 11:59:26 +00:00
Joplin Bot
0873b1900b Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-25 18:15:47 +00:00
Joplin Bot
5df499e6c7 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-25 12:18:47 +00:00
github-actions[bot]
d89c686555 @tinyoverflow has signed the CLA in laurent22/joplin#9603 2023-12-25 01:41:09 +00:00
Joplin Bot
d81497f7b8 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-25 00:39:52 +00:00
renovate[bot]
8cd377013e Update dependency @types/react to v18.2.41 (#9598)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-24 19:12:56 +00:00
Henry Heino
c623d98bda Desktop: Fixes #9586: Fix code blocks with blank lines break tables in the rich text editor (#9587) 2023-12-24 14:56:08 +00:00
Henry Heino
02232c0ca3 Mobile: Fixes #9502: Fix note editor crash when trying to edit text quickly after opening a note (#9581) 2023-12-24 14:54:24 +00:00
Henry Heino
8ae3210378 Chore: Desktop: Add Playwright test for mermaid and KaTeX rendering (#9583) 2023-12-24 14:50:22 +00:00
Laurent Cozic
bf907f21c4 Desktop, Cli: Fixes #9548: Import ENEX archives that contain files with invalid names 2023-12-24 11:24:48 +00:00
Laurent Cozic
cec5f1f3ba Desktop: Resolves #9261: Mention in sync wizard that Dropbox and OneDrive are slow on first sync 2023-12-24 11:06:28 +00:00
Laurent Cozic
b4928eb7e5 Chore: Mobile: Fixed regression that would prevent the app from running on Android 7 2023-12-23 22:38:02 +00:00
Laurent Cozic
3dcbb2ed51 Chore: Refactor BaseModel queries 2023-12-23 22:38:01 +00:00
Joplin Bot
e744cf0171 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-23 15:14:47 +00:00
Laurent Cozic
1ffafdcefc Doc: Added news item "Faster synchronisation in upcoming Joplin version" 2023-12-23 15:05:23 +00:00
Joplin Bot
e48303aeb7 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-23 14:44:45 +00:00
Laurent Cozic
fb13e0ca80 Doc: Added news item "Faster synchronisation in upcoming Joplin version" 2023-12-23 14:33:10 +00:00
Laurent Cozic
7345cd4678 Chore: Refactor sync target code to allow labels and descriptions to be translated 2023-12-23 14:19:06 +00:00
Laurent Cozic
5341501d53 Desktop, Cli, Mobile, Server: Optimise synchronisation by making delta call return whole items 2023-12-23 13:13:50 +00:00
renovate[bot]
1fcfa9c591 Update dependency tesseract.js to v5 (#9575)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2023-12-22 21:20:29 +00:00
Joplin Bot
1cd2d9254f Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-22 18:16:15 +00:00
Henry Heino
ee18271f9b Desktop: Resolves #7934: Don't create an extra copy of default plugins (load directly from the app bundle) (#9508) 2023-12-22 11:31:57 +00:00
Laurent Cozic
bf59b23efe Merge branch 'release-2.13' into dev 2023-12-22 09:40:28 +00:00
Laurent Cozic
973193623a Desktop release v2.13.10 2023-12-22 09:30:38 +00:00
Laurent Cozic
495f088320 Desktop, Cli: Remove unnecessary warning when importing ENEX file 2023-12-22 09:30:17 +00:00
Laurent Cozic
d264bdd14d Desktop, Cli: Fixed importing invalid tables from ENEX files 2023-12-22 09:29:53 +00:00
Henry Heino
144ec1eea2 Desktop: Fixes #9543: Fix nested tables not preserved in rich text editor (#9579) 2023-12-22 09:27:20 +00:00
Joplin Bot
7d60bfc192 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-21 18:15:00 +00:00
renovate[bot]
b5428ddc2a Update dependency style-to-js to v1.1.10 (#9574)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-21 15:14:25 +00:00
renovate[bot]
2075626d42 Update dependency @types/tar-stream to v3.1.3 (#9573)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-21 15:14:13 +00:00
Joplin Bot
4b9307015e Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-21 12:19:02 +00:00
Laurent Cozic
9c88cb2151 Merge pull request #9559 from personalizedrefrigerator/pr/merge-release-2-13
Chore: Merge release 2.13
2023-12-20 19:14:21 +00:00
renovate[bot]
45dcca865d Update dependency @types/tar-stream to v3 (#9568)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-20 19:11:22 +00:00
renovate[bot]
c421a5a732 Update dependency react-select to v5.8.0 (#9567)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-20 19:11:01 +00:00
renovate[bot]
f7158f5e27 Update dependency react-native-paper to v5.11.3 (#9566)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-20 19:10:45 +00:00
renovate[bot]
780c269e14 Update dependency ldapts to v7.0.7 (#9565)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-20 19:10:38 +00:00
Henry Heino
5eb0cda8b9 Desktop,Mobile: Resolves #9562: CodeMirror 6 markdown editor: Support highlighting more languages (#9563) 2023-12-20 19:10:20 +00:00
Henry Heino
3b4eb16110 Desktop: Fixes #9045: Ubuntu: Fix window sometimes doesn't appear on startup (#9561) 2023-12-20 19:09:28 +00:00
Henry Heino
674bbf9667 Chore: Website: Use only one commit per website update (#9558) 2023-12-20 19:08:57 +00:00
Henry Heino
f7e64e9681 Chore: iOS: Remove now-unnecessary scrolling non-root element (#9554) 2023-12-20 19:08:28 +00:00
Henry Heino
4ec2fb216e Chore: Cli: Migrate most commands to TypeScript (#9552) 2023-12-20 19:08:07 +00:00
pedr
ddebeb68b2 Chore: Add function exports to lib/uuid module (#9560) 2023-12-20 19:05:59 +00:00
renovate[bot]
8b09d71d5b Update react monorepo (#9538)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-20 19:05:35 +00:00
renovate[bot]
3df499714b Update dependency @types/node to v18.18.14 (#9564)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-20 16:34:53 +00:00
Henry Heino
6e9ff89dda Merge remote-tracking branch 'upstream/release-2.13' into pr/merge-release-2-13 2023-12-19 10:23:05 -08:00
github-actions[bot]
880215acc4 @NavyStack has signed the CLA in laurent22/joplin#9550 2023-12-18 01:29:40 +00:00
Henry Heino
d4157e14fe Mobile: Fixes #9532: Fix cursor location on opening the editor and attachments inserted in wrong location (#9536) 2023-12-17 20:58:22 +00:00
Henry Heino
b237a92e02 Mobile: Fixes #9322: Fix editor scrollbar on iOS (#9531) 2023-12-17 20:57:40 +00:00
Henry Heino
0bd164642e Desktop: Fixes #9528: Fix maximum width setting not respected by beta editor (#9529) 2023-12-17 20:57:12 +00:00
Henry Heino
872fadf454 Desktop,Mobile: Resolves #9526: Make backspace delete auto-matching brackets (#9527) 2023-12-17 20:57:00 +00:00
Henry Heino
404e86cef4 Desktop,Mobile: Fixes #9524: Fix Beta Editor diff highlighting (#9525) 2023-12-17 20:56:46 +00:00
Henry Heino
5f6b2f1a63 Mobile,Desktop: Fixes #9522: Fix code block borders in headers of Beta Markdown editor (#9523) 2023-12-17 20:55:54 +00:00
Henry Heino
858205a72b Chore: Fix plugin website build (#9516) 2023-12-17 20:54:56 +00:00
ERYpTION
dc8ea620a6 All: Translation: Update da_DK.po (#9542) 2023-12-17 13:40:15 -05:00
github-actions[bot]
28527541f5 @ERYpTION has signed the CLA in laurent22/joplin#9542 2023-12-17 16:34:01 +00:00
Mr-Kanister
b1051a3144 All: Translation: Update de_DE.po (#9535) 2023-12-17 10:38:17 -05:00
Laurent Cozic
06639eb399 Server v2.14.1 2023-12-17 15:08:27 +00:00
Laurent Cozic
5e3c12aeb8 Chore: Setup new release 2.14 2023-12-17 15:07:31 +00:00
Laurent Cozic
7e50b117ed Desktop, Cli: Remove unnecessary warning when importing ENEX file 2023-12-17 12:00:05 +00:00
Laurent Cozic
bb47c59414 Chore: Remove warning from test 2023-12-17 11:59:11 +00:00
Laurent Cozic
26459ea9dc Chore: Improve app testing script 2023-12-17 11:29:47 +00:00
Laurent Cozic
67a68709e3 Server: Support including items with delta call to optimise sync 2023-12-17 11:12:26 +00:00
renovate[bot]
d13a3fc5c8 Update dependency npm-package-json-lint to v7.1.0 (#9541)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-17 09:53:14 +00:00
renovate[bot]
27b5f59d7c Update dependency @react-native-community/netinfo to v9.5.0 (#9540)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-17 09:53:00 +00:00
Laurent Cozic
6b7c11d694 Update renovate.json5 2023-12-17 09:52:16 +00:00
renovate[bot]
1bf38eff32 Update dependency tesseract.js to v4.1.4 (#9537)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-16 22:27:15 +00:00
Laurent Cozic
c93f22d84b Update renovate.json5 2023-12-16 20:11:33 +00:00
Laurent Cozic
17c25b72f0 Desktop: Include more information when auto-generating import error report 2023-12-16 13:12:00 +00:00
Laurent Cozic
a2ded180cb Desktop, Cli: Fixed importing invalid tables from ENEX files 2023-12-16 12:52:42 +00:00
Laurent Cozic
d6c7902390 Chore: Change Renovate rebase logic 2023-12-16 12:52:41 +00:00
renovate[bot]
167892e383 Update dependency react-native-webview to v13.6.3 (#9519)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-16 09:36:50 +00:00
renovate[bot]
62dd4b9926 Update dependency react-native-paper to v5.11.2 (#9518)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-16 09:36:42 +00:00
renovate[bot]
b19a0761fd Update dependency react-native-image-picker to v7.0.3 (#9517)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-16 09:36:33 +00:00
Laurent Cozic
e47ac1de6a Chore: Disable Jest console wrapper in tests 2023-12-15 18:34:21 +00:00
Laurent Cozic
d2fe33183b Chore: Add more types to export modules 2023-12-15 18:18:11 +00:00
Laurent Cozic
02658370a6 Desktop, Cli: Fixes #9486: When importing a Markdown file that contains a link to an invalid image, import fails 2023-12-15 13:28:09 +00:00
Laurent Cozic
46ed6411c1 Desktop, Cli: Fixes #9485: When importing MarkdownD+FrontMatter files that contain images with a data URL source, the import fails 2023-12-15 12:47:03 +00:00
Laurent Cozic
c333e9c802 Desktop, Cli: Fixes #9483: Markdown-FrontMatter exporter generates invalid file when note starts with a dash in title 2023-12-15 11:54:39 +00:00
renovate[bot]
73617bf019 Update dependency @react-native-community/datetimepicker to v7.6.2 (#9515)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-15 06:55:36 +00:00
renovate[bot]
f3038c9cf9 Update dependency @types/node to v18.18.13 (#9510)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-15 02:53:43 +00:00
Henry Heino
0f81b08f89 Chore: Fix plugin website build (#9514) 2023-12-14 20:09:27 +00:00
Joplin Bot
0c34497c78 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-14 18:17:10 +00:00
Laurent Cozic
f244f44c7b Desktop, Cli: Fixes #9484: Fixes issue with resources having no associated files when the RAW import process is interrupted 2023-12-14 17:17:21 +00:00
Laurent Cozic
b11006c3a7 Build artifacts 2023-12-14 16:42:57 +00:00
pedr
d63b84ee1f Chore: Add function to generate secure random values (#9409)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2023-12-14 15:28:41 +00:00
Joplin Bot
e761b97944 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-14 12:18:26 +00:00
Henry Heino
49cf4d9965 Chore: Website: Include the plugin discovery website on joplinapp.org/ (#9469) 2023-12-14 10:21:36 +00:00
renovate[bot]
3732d3e360 Update dependency @types/node to v18.18.12 (#9493)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-14 10:14:31 +00:00
Joplin Bot
62a64ed575 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-14 00:37:22 +00:00
Laurent Cozic
20cb03ab69 Ingore renovate ackage 2023-12-13 20:00:38 +00:00
Laurent Cozic
995423cadf Chore: Wait when Discourse update fails 2023-12-13 20:00:19 +00:00
Henry Heino
a730d349e4 Mobile,Desktop: Fixes #9200: Fix list renumbering and enable multiple selections (#9506) 2023-12-13 19:48:06 +00:00
pedr
6d6f9b3c3b Mobile: Fixes #9500: Fix font for the inbox email address not using the theme color (#9503) 2023-12-13 19:47:26 +00:00
Henry Heino
09b5ef6713 Chore: Desktop: Increase Playwright test timeout by 20s in CI (#9497) 2023-12-13 19:45:58 +00:00
renovate[bot]
e0cc8da884 Update dependency @types/yargs to v17.0.32 (#9495)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-13 19:45:42 +00:00
Henry Heino
d17e36d038 Desktop: Resolves #9480: Cancel showing unresponsive dialog when receiving "responsive" event (#9487) 2023-12-13 19:45:29 +00:00
Henry Heino
815a0a5db4 Mobile: Fixes #9477: Fix inline code at beginning of line in table breaks formatting (#9478) 2023-12-13 19:45:17 +00:00
Henry Heino
19b68102b2 Plugins: Resolves #9473: Expose common CodeMirror 6 packages to plugins (#9474) 2023-12-13 19:45:02 +00:00
pedr
04e0274055 Chore: Server: Remove direct dependecy from nanoid library (#9501) 2023-12-13 19:25:52 +00:00
Laurent Cozic
bce94f1775 Desktop: Add support for OCR (#8975) 2023-12-13 19:24:58 +00:00
renovate[bot]
0e847685ff Update dependency @types/react-redux to v7.1.31 (#9494)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-13 16:48:27 +00:00
renovate[bot]
c008b58712 Update dependency @types/markdown-it to v13.0.7 (#9492)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-12 12:11:16 +00:00
Laurent Cozic
de67ec4684 Doc: Add sponsor 2023-12-11 16:53:40 +00:00
renovate[bot]
06bf6b85fe Update dependency @types/koa to v2.13.12 (#9491)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-11 16:26:34 +00:00
Arda Kılıçdağı
0d1529f1ad All: Translation: Update tr_TR.po (#9479) 2023-12-11 09:47:16 -05:00
Henry Heino
4fc786cf0b Desktop: Resolves #7934: Add Simple Backup as a default plugin (#9360) 2023-12-11 13:58:45 +00:00
Laurent Cozic
6306a0f371 Doc: Fixed plugin API doc for note list 2023-12-11 12:08:41 +00:00
Laurent Cozic
45c483263e Chore: Improve note list plugins 2023-12-11 11:28:33 +00:00
renovate[bot]
d50e347f35 Update dependency @types/jsdom to v21.1.6 (#9490)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-11 10:32:50 +00:00
Laurent Cozic
913e650bb3 Merge branch 'release-2.13' into dev 2023-12-09 16:51:22 +00:00
Joplin Bot
5e537db538 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-09 12:16:18 +00:00
renovate[bot]
706e7e07d1 Update dependency @types/node to v18.18.10 (#9472)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-09 11:08:27 +00:00
Joplin Bot
dc9f732ded Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-09 06:14:45 +00:00
Joplin Bot
cedf84698e Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-09 00:35:59 +00:00
renovate[bot]
9915a59bce Update dependency @rmp135/sql-ts to v1.18.1 (#9470)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-08 21:15:48 +00:00
Laurent Cozic
1bbec445d5 Desktop release v2.13.9 2023-12-08 10:15:26 +00:00
Henry Heino
27a0959f30 Chore: Refactor Note.tsx and note-screen-shared.tsx to improve type safety (#9467) 2023-12-08 10:12:23 +00:00
Joplin Bot
b70589ef56 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-08 06:15:32 +00:00
Joplin Bot
b6039e739a Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-08 00:37:39 +00:00
Henry Heino
7558c2e9fe Plugin Repo: Prevent plugin authors from marking their own plugins as recommended (#9462) 2023-12-07 12:43:38 +00:00
Henry Heino
d63fc524bf Chore: Change the return type of shim.fsDriver() from any to FsDriverBase (#9460) 2023-12-06 19:24:00 +00:00
Henry Heino
48ea014ee0 Chore: Release script: Fix editor package version not updated (#9458) 2023-12-06 19:23:23 +00:00
Henry Heino
fd5a4dcbbf Desktop,Mobile: Fixes #9455: Fix KaTeX rendering (#9456) 2023-12-06 19:23:08 +00:00
Henry Heino
92a0964a8d Desktop: Fixes #9304: Fix HTML resource links lost when editing notes in the rich text editor (#9435) 2023-12-06 19:17:16 +00:00
Laurent Cozic
c0c32a7ac1 Update BUG_REPORT.yml 2023-12-06 19:12:23 +00:00
Laurent Cozic
5cfe945c4e Update BUG_REPORT.yml 2023-12-06 19:11:30 +00:00
dimitristsilis
51f96eb9dd All: Translation: Update el_GR.po (#9454) 2023-12-06 11:42:51 -05:00
github-actions[bot]
f6121bae2b @Harshiths1 has signed the CLA in laurent22/joplin#9457 2023-12-06 16:26:37 +00:00
renovate[bot]
3c40854a8c Update docker/login-action action to v3 (#9428)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-06 10:16:15 +00:00
Henry Heino
b271e54828 Chore: Fixes #9449: Mobile: Fix "useNativeDriver" warning (#9448)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2023-12-06 10:15:33 +00:00
Laurent Cozic
2c0f8d5c6b Chore: Trying to improve flaky test 2023-12-05 18:53:32 +00:00
Joplin Bot
474365188d Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-05 18:14:45 +00:00
renovate[bot]
80c2a87da2 Update dependency ts-loader to v9.5.1 (#9447)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-05 06:27:24 +00:00
renovate[bot]
a8f0f01826 Update dependency mermaid to v10.6.1 (#9444)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-04 21:30:00 +00:00
renovate[bot]
4bb06cb4a0 Update dependency mermaid to v10.6.0 (#9440)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-04 18:00:10 +00:00
Joplin Bot
9d0a862798 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-04 00:37:09 +00:00
renovate[bot]
583c6da970 Update dependency @testing-library/react-native to v12.3.3 (#9437)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-03 21:25:45 +00:00
Laurent Cozic
9a7c737f15 Doc: Minor fix 2023-12-03 20:05:12 +01:00
Joplin Bot
08805f01e7 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-03 18:13:32 +00:00
Laurent Cozic
01cc550adf Doc: Add release 2.13 2023-12-03 14:23:59 +01:00
Joplin Bot
1a250639ca Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-03 12:16:10 +00:00
Laurent Cozic
d610036692 Doc: Add release 2.13 2023-12-03 11:50:12 +01:00
Laurent Cozic
f05307d69f Chore: Improve sharing tests 2023-12-03 11:50:11 +01:00
Laurent Cozic
cc99ec3edf Merge branch 'release-2.13' into dev 2023-12-03 11:37:27 +01:00
Laurent Cozic
604dcbc35b Desktop release v2.13.8 2023-12-03 11:36:37 +01:00
Laurent Cozic
b459ba7224 Desktop: Fixed images not being visible on encrypted published notes 2023-12-03 11:35:46 +01:00
Helmut K. C. Tessarek
aaa1dc853d All: Translation: Update pl_PL.po (thanks Manius71) 2023-12-02 16:46:42 +01:00
github-actions[bot]
cadc974999 @dimitristsilis has signed the CLA in laurent22/joplin#9430 2023-12-01 17:50:43 +00:00
Laurent Cozic
d812cf273f Merge branch 'release-2.13' into dev 2023-12-01 14:50:02 +01:00
Laurent Cozic
0d0398312f iOS 12.13.10 2023-12-01 13:08:37 +01:00
Laurent Cozic
39c8fc812d Android 2.13.10 2023-12-01 13:07:42 +01:00
renovate[bot]
9e89357e64 Update dependency electron-builder to v24.8.0 (#9425)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-01 10:22:34 +00:00
Henry Heino
0638d711d7 Mobile: Resolves #9427: Drawing: Revert recent changes to input system (#9426) 2023-12-01 11:11:14 +01:00
renovate[bot]
dad91594c8 Update eslint (#9424)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-01 07:33:29 +00:00
Joplin Bot
fb77c75520 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-12-01 00:39:52 +00:00
renovate[bot]
00adf2aced Update dependency react-native-localize to v3.0.4 (#9413)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-30 20:04:05 +01:00
renovate[bot]
aaddc58416 Update dependency @types/styled-components to v5.1.32 (#9412)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-30 20:03:49 +01:00
Laurent Cozic
5092e21067 CLI v2.13.2 2023-11-30 20:02:41 +01:00
Laurent Cozic
388000ded3 Lock file 2023-11-30 20:02:37 +01:00
Laurent Cozic
567c513d83 Releasing sub-packages 2023-11-30 20:01:45 +01:00
Laurent Cozic
1e14dffab0 iOS 12.13.9 2023-11-30 20:01:45 +01:00
Laurent Cozic
ed02a0a900 Android 2.13.9 2023-11-30 20:01:45 +01:00
Henry Heino
f989698998 Mobile: Fixes #9374: Fix tooltips don't disappear on some devices (upgrade to js-draw 1.13.2) (#9401) 2023-11-30 20:01:44 +01:00
Henry Heino
0a75480a32 Mobile: Resolves #9377: Don't attach empty drawings when a user exits without saving (#9386) 2023-11-30 20:01:43 +01:00
renovate[bot]
86b470359d Update dependency rate-limiter-flexible to v3.0.4 (#9422)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-30 18:35:12 +00:00
Laurent Cozic
9bad668cc5 CLI v2.13.2 2023-11-30 19:12:07 +01:00
Laurent Cozic
c18c31ab7f Lock file 2023-11-30 19:10:57 +01:00
Laurent Cozic
7c24a2f4be Releasing sub-packages 2023-11-30 19:10:02 +01:00
Laurent Cozic
56438ea644 iOS 12.13.9 2023-11-30 18:56:49 +01:00
Laurent Cozic
7f9bc1e15c Android 2.13.9 2023-11-30 18:56:17 +01:00
renovate[bot]
6ddae5b654 Update dependency yeoman-generator to v5.10.0 (#9420)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-30 14:49:06 +01:00
pedr
3ee8da0cae Server: Fixes #9367: Redirect user from login to home if already logged (#9415) 2023-11-30 14:39:49 +01:00
renovate[bot]
2fd985b9ac Update react monorepo (#9418)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-30 04:39:07 +00:00
renovate[bot]
3cc87e6acd Update dependency react-native-image-picker to v7.0.2 (#9419)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-30 01:09:53 +00:00
renovate[bot]
ac6c6e9996 Update dependency react-native-image-picker to v7 (#9382)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2023-11-30 00:12:34 +01:00
renovate[bot]
7c6db44cc7 Update dependency react-native-vector-icons to v10.0.2 (#9417)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-29 21:23:59 +00:00
renovate[bot]
fb7f524415 Update dependency node-cron to v3.0.3 (#9416)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-29 19:07:58 +00:00
pedr
fd4f70f62b Chore: Add enums for ApplicationPlatform and ApplicationType (#9410) 2023-11-29 16:31:49 +01:00
renovate[bot]
afd653ba4d Update dependency @types/zxcvbn to v4.4.4 (#9414)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-29 16:30:49 +01:00
renovate[bot]
9827788176 Update dependency @types/uuid to v9.0.7 (#9411)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-29 16:30:26 +01:00
Henry Heino
b1c8cb5632 Mobile: Fixes #9374: Fix tooltips don't disappear on some devices (upgrade to js-draw 1.13.2) (#9401) 2023-11-29 15:17:29 +01:00
Laurent Cozic
2924bb5437 Chore: Upgrade to sharp 0.33.0 to fix random CI failures 2023-11-29 15:14:09 +01:00
renovate[bot]
7ce954da30 Update dependency @types/react-redux to v7.1.30 (#9407)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-29 00:55:54 +00:00
renovate[bot]
84e8f8b0dc Update dependency react-native-localize to v3.0.3 (#9399)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-28 19:47:24 +01:00
renovate[bot]
0a2bcf7342 Update dependency @types/styled-components to v5.1.30 (#9408)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-28 19:43:39 +01:00
renovate[bot]
ddd8b99637 Update dependency @types/yargs to v17.0.31 (#9389)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-28 19:43:22 +01:00
renovate[bot]
705565e4bf Update dependency @types/nodemailer to v6.4.14 (#9406)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-28 16:16:38 +00:00
renovate[bot]
92d446e0a3 Update dependency @types/node to v18.18.9 (#9405)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-28 12:20:07 +00:00
renovate[bot]
345c602e07 Update dependency @types/js-yaml to v4.0.9 (#9404)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-28 11:37:12 +00:00
renovate[bot]
852991f429 Update dependency @types/fs-extra to v11.0.4 (#9403)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-28 07:47:02 +00:00
renovate[bot]
e2f9e87cdf Update dependency @types/node-rsa to v1.1.4 (#9398)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-28 03:17:59 +00:00
renovate[bot]
7f0d86a1e5 Update dependency @types/formidable to v3.4.5 (#9400)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-28 01:23:53 +00:00
renovate[bot]
a97cb65bbc Update dependency @types/node-fetch to v2.6.9 (#9397)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 21:42:03 +00:00
renovate[bot]
61d32926e7 Update dependency @types/mustache to v4.2.5 (#9395)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 19:14:28 +00:00
Henry Heino
f0a1b41794 Mobile: Resolves #9377: Don't attach empty drawings when a user exits without saving (#9386) 2023-11-27 20:14:04 +01:00
renovate[bot]
6f902201a9 Update dependency @types/markdown-it to v13.0.6 (#9394)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 18:03:40 +00:00
renovate[bot]
e5ffe3af0f Update dependency @types/koa to v2.13.11 (#9393)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 15:45:18 +00:00
renovate[bot]
54cc4898a4 Update dependency @types/jsdom to v21.1.5 (#9392)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 13:09:57 +00:00
renovate[bot]
414e60aa48 Update dependency @types/react-redux to v7.1.29 (#9388)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 06:38:40 +00:00
renovate[bot]
8869c7b6c2 Update dependency @types/bcryptjs to v2.4.6 (#9390)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-27 04:02:32 +00:00
Laurent Cozic
74f7801f25 Doc: Fixed plugin doc and removed redundant CI check 2023-11-26 23:00:23 +01:00
Laurent Cozic
3c8a8619f9 Doc: Fixes #9384, Fixes #9347, Fixes #9295, Fixes #9362: Redirect old links to new ones 2023-11-26 19:52:21 +01:00
Laurent Cozic
35849b1d34 iOS 12.13.8 2023-11-26 16:45:17 +01:00
Laurent Cozic
306b043b30 Android 2.13.8 2023-11-26 16:45:15 +01:00
Laurent Cozic
0117f23ee4 Desktop release v2.13.7 2023-11-26 16:45:13 +01:00
Laurent Cozic
8c5eaaf65c Mobile: Fixes #9376: Sidebar is not dismissed when creating a note 2023-11-26 16:45:11 +01:00
pedr
529140cf87 Mobile: #9361: Fix to-dos options toggle don't toggle a rerender in (#9364) 2023-11-26 16:45:08 +01:00
Henry Heino
d11bdf586a Mobile: Fixes #9328: Fix new note/to-do buttons not visible on app startup in some cases (#9329) 2023-11-26 16:45:06 +01:00
Laurent Cozic
02982464a6 iOS 12.13.8 2023-11-26 13:55:26 +01:00
renovate[bot]
c103bbce14 Update dependency @types/react to v18.2.36 (#9383)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-26 12:52:14 +00:00
Laurent Cozic
62e317db05 lock file 2023-11-26 13:49:00 +01:00
Laurent Cozic
e0795748a9 Android 2.13.8 2023-11-26 13:40:59 +01:00
renovate[bot]
7936e789c0 Update dependency nanoid to v3.3.7 (#9380)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-26 11:49:55 +00:00
Laurent Cozic
67070ed3d5 Desktop release v2.13.7 2023-11-26 12:38:28 +01:00
Laurent Cozic
fec8c6131c Mobile: Fixes #9376: Sidebar is not dismissed when creating a note 2023-11-26 12:37:45 +01:00
Laurent Cozic
f267d8853b All: Handle Dropbox payload_too_large error 2023-11-26 10:45:43 +01:00
renovate[bot]
46ce792ef2 Update dependency react-native-paper to v5.11.1 (#9372)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-25 21:23:54 +00:00
renovate[bot]
074261862d Update dependency @types/react to v18.2.35 (#9370)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-25 18:40:53 +00:00
renovate[bot]
069c7a6b34 Update dependency react-native-paper to v5.11.0 (#9371)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-25 18:09:06 +01:00
Jia
7272ad771b Translation: Update zh_TW.po (#9369)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2023-11-25 17:12:50 +01:00
github-actions[bot]
74d66a9f1a @Jia35 has signed the CLA in laurent22/joplin#9369 2023-11-25 06:47:52 +00:00
Laurent Cozic
6244999899 Doc: Document how to build and translate the help pages 2023-11-24 20:02:46 +01:00
Laurent Cozic
9930359210 CI: Fix PR title script (#9366) 2023-11-24 17:03:12 +01:00
Laurent Cozic
84cc1576a8 CI: Add a comment when a pull request fails 2023-11-24 16:12:02 +01:00
Laurent Cozic
29b42b3b37 CI: Add a comment when a pull request fail 2023-11-24 16:10:23 +01:00
Laurent Cozic
3b15834e8d Tools: Check pull request titles 2023-11-24 14:56:05 +01:00
pedr
24ed5bda63 Mobile: #9361: Fix to-dos options toggle don't toggle a rerender in (#9364) 2023-11-24 14:48:41 +01:00
renovate[bot]
2b9bf6deba Update dependency @codemirror/autocomplete to v6.10.2 (#9352)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-24 14:47:21 +01:00
Joplin Bot
0abaeef05e Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-11-23 00:36:31 +00:00
renovate[bot]
b2e86d2f8a Update dependency @playwright/test to v1.39.0 (#9356)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-22 20:13:25 +01:00
Joplin Bot
52a3a59623 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-11-22 18:14:21 +00:00
renovate[bot]
c78afc46c9 Update dependency style-to-js to v1.1.9 (#9359)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-22 14:06:07 +00:00
renovate[bot]
9b89f4ecfb Update dependency @types/react to v18.2.34 (#9358)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-22 01:34:11 +00:00
renovate[bot]
99be29707f Update dependency @react-native-community/netinfo to v9.4.2 (#9357)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-21 18:29:01 +00:00
Henry Heino
2a62bbdbd3 Chore: Fixes #9353: CI: Run tests on pull requests from other branches of the main repository (#9354) 2023-11-21 16:10:37 +01:00
renovate[bot]
c5e15e93f4 Update dependency @types/node to v18.18.8 (#9351)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-20 14:11:58 +00:00
renovate[bot]
719e0e6104 Update dependency @types/node-fetch to v2.6.8 (#9349)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-20 01:51:54 +00:00
renovate[bot]
1eea2400cb Update dependency punycode to v2.3.1 (#9348)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-19 22:39:39 +00:00
renovate[bot]
83efd67ff8 Update dependency @testing-library/react-native to v12.3.2 (#9346)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-19 19:48:33 +00:00
renovate[bot]
8ef682dcf9 Update dependency rate-limiter-flexible to v3.0.3 (#9345)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-19 15:17:46 +00:00
Laurent Cozic
401d551daa Api: Search for partial matches by default, unless the query is surrounded by quotes 2023-11-19 11:44:34 +00:00
Laurent Cozic
8a533b2003 Desktop: Resolves #9343: Search for partial matches by default, unless the query is surrounded by quotes 2023-11-19 11:40:13 +00:00
Laurent Cozic
27f888d0c4 lock file 2023-11-19 11:22:36 +00:00
pedr
4aeb2fafb2 Clipper: add options to make fetchBlob exit faster, if needed (#9252)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2023-11-19 10:44:27 +00:00
Henry Heino
dbb354ad10 Mobile: Fixes #9328: Fix new note/to-do buttons not visible on app startup in some cases (#9329) 2023-11-19 10:43:57 +00:00
Henry Heino
dc20402f5b Chore: Mobile: Fix warning in image editor test (#9338) 2023-11-19 10:43:22 +00:00
renovate[bot]
9b078de9d8 Update dependency rate-limiter-flexible to v3 (#9339)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-19 10:42:19 +00:00
Laurent Cozic
214f9916d9 Server v2.13.5 2023-11-19 09:34:30 +00:00
Laurent Cozic
87aeffa160 Server: Fixed issue with sync not immediately returning all items in certain cases 2023-11-19 09:24:20 +00:00
Henry Heino
14a2d2d795 Chore: Mobile: Don't build twice on postinstall (#9340) 2023-11-19 08:55:52 +00:00
Joplin Bot
3560bc62a2 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-11-18 18:13:50 +00:00
Joplin Bot
0729d1db27 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-11-18 12:16:13 +00:00
renovate[bot]
5f27d425bf Update dependency highlight.js to v11.9.0 (#9341)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-18 10:53:36 +00:00
Joplin Bot
e2956c391d Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-11-18 06:14:34 +00:00
Joplin Bot
bdc8f30705 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-11-17 18:14:34 +00:00
Laurent Cozic
2c9bf9f03a Desktop: Fixed copying and pasting an image from Chrome in RTE 2023-11-17 18:11:17 +00:00
Henry Heino
60c2964acd Chore: Tests: Fix vscode doesn't recognize Jest types in some test files (#9337) 2023-11-17 16:04:36 +00:00
Joplin Bot
97248035b1 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-11-17 12:17:33 +00:00
Laurent Cozic
35c79a2cfb Doc: Fixes #9323: Fixed donation link 2023-11-17 12:01:45 +00:00
Henry Heino
9b9762f940 Chore: Mobile: Fix "MenuContext is deprecated" warning (#9330) 2023-11-17 11:43:01 +00:00
renovate[bot]
e186fe8936 Update dependency ts-loader to v9.5.0 (#9327)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-17 08:23:55 +00:00
renovate[bot]
213cd419f0 Update dependency node-gyp to v9.4.1 (#9333)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-17 02:20:51 +00:00
renovate[bot]
b89b5fef65 Update dependency ldapts to v7.0.6 (#9332)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-16 22:06:40 +00:00
Laurent Cozic
92dccbe98d Merge branch 'release-2.13' into dev 2023-11-16 15:11:39 +00:00
Laurent Cozic
9b775d77f6 iOS 12.13.7 2023-11-16 13:37:15 +00:00
Laurent Cozic
4fd6937d05 lock file 2023-11-16 13:36:45 +00:00
Laurent Cozic
7230f0e698 iOS 12.13.6 2023-11-16 13:28:27 +00:00
Laurent Cozic
ada82538ee Android 2.13.7 2023-11-16 13:26:58 +00:00
Laurent Cozic
e7dd981db6 Desktop release v2.13.6 2023-11-16 13:02:07 +00:00
Laurent Cozic
767bf9f002 Server: Increase number of items that are returned during sync 2023-11-16 12:20:07 +00:00
Laurent Cozic
f698068587 Server: Fix severe performance issue for certain delta calls 2023-11-16 12:20:06 +00:00
Henry Heino
d0955b4ca2 Mobile: Fixes #9321: Restore scroll position when returning to the note viewer from the editor or camera (#9324) 2023-11-16 12:19:48 +00:00
Henry Heino
18e86a7ba3 Mobile: Resolves #9294: Implement settings search (#9320) 2023-11-16 12:17:03 +00:00
renovate[bot]
f9a1ab4d40 Update dependency react-native-vector-icons to v10.0.1 (#9316)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-16 01:02:28 +00:00
renovate[bot]
062d0898a0 Update dependency sass to v1.69.5 (#9317)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-15 23:23:22 +00:00
pedr
3b51b4fd72 Tools: Resolves #9265: Add no-constant-binary-expression to eslint rules (#9319) 2023-11-15 20:18:31 +00:00
Helmut K. C. Tessarek
1a78ff4398 All: Translation: Update it_IT.po (thanks Pietro Campanella) 2023-11-15 18:56:00 +01:00
Laurent Cozic
544af8d118 Server v2.13.4 2023-11-15 15:31:09 +00:00
pedr
2616c377a9 Tools: Create vscode launch option for debugging lib project (#9318) 2023-11-15 15:29:45 +00:00
Henry Heino
4a63331306 Plugin Repo: Resolves #9280: Allow marking specific NPM packages as superseded (#9302) 2023-11-15 13:44:09 +00:00
renovate[bot]
48621443ec Update dependency sass to v1.69.0 (#9310)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-15 13:38:48 +00:00
pedr
79fd66b94c All: Fixes #9151: Import of inter-linked md files has incorrect notebook structure (#9269) 2023-11-15 13:33:20 +00:00
Henry Heino
6a6c8c1d83 Mobile: Fixes #9312: Fix settings save confirmation not shown when navigating to encryption/profile/log screens (#9313) 2023-11-15 13:31:36 +00:00
Henry Heino
cf19dacbaf Mobile: Fixes #9308: Disable notebook list side menu in config screen (#9311) 2023-11-15 13:31:26 +00:00
renovate[bot]
50925abc40 Update dependency @types/react to v18.2.33 (#9306)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-15 10:54:33 +00:00
renovate[bot]
c80cbaa32f Update dependency react-native-safe-area-context to v4.7.4 (#9307)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-15 00:45:41 +00:00
Henry Heino
f7cb1aef4b iOS: Fixes #9271: Allow showing dropdowns in landscape mode (#9309) 2023-11-15 00:42:27 +00:00
Joplin Bot
96d5d1dfab Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-11-15 00:35:50 +00:00
renovate[bot]
98d608fec5 Update dependency @types/node to v18.18.7 (#9305)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-14 22:21:00 +00:00
Laurent Cozic
1af46b0246 Update translations 2023-11-14 19:00:52 +00:00
Henry Heino
1e530b74d4 Chore: Plugins: Allow absolute paths and URLs in screenshot srcs (#9254) 2023-11-14 18:49:45 +00:00
Henry Heino
e61c4acce5 Desktop: Resolves #9136: Install script: Work around unprivlidged user namespace restrictions by adding the --no-sandbox flag to the launcher (#9137) 2023-11-14 18:49:25 +00:00
Mohammad Ashouri
184499711d Full translation support for Farsi/Persian (#9244) 2023-11-14 18:48:32 +00:00
Henry Heino
2c0181d097 Desktop, Cli: Fixes #8788: Work around WebDAV sync issues over ipv6 (#9286) 2023-11-14 18:47:52 +00:00
Laurent Cozic
06ea12adb3 Doc: Update sponsors 2023-11-14 18:06:56 +00:00
Laurent Cozic
9923e5c821 Desktop: Resolves #9293: Preserve nested tables in RTE 2023-11-14 11:45:38 +00:00
renovate[bot]
9a06e59cfe Update dependency @testing-library/react-native to v12.3.1 (#9298)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-13 21:54:42 +00:00
renovate[bot]
80a2cd91f4 Update dependency @types/markdown-it to v13.0.5 (#9290)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-13 18:36:02 +00:00
Laurent Cozic
df9ed3e487 Update BUG_REPORT.yml 2023-11-13 14:01:49 +00:00
Laurent Cozic
368d0130f6 Update BUG_REPORT.yml 2023-11-13 14:00:44 +00:00
Laurent Cozic
824e1b44dd Update BUG_REPORT.yml 2023-11-13 13:56:45 +00:00
Laurent Cozic
ccf1c8ee31 Desktop: Improve toolbar button wrapping on RTE 2023-11-13 13:52:37 +00:00
Laurent Cozic
d5f6d83f6d Update BUG_REPORT.yml 2023-11-13 11:58:52 +00:00
Laurent Cozic
5d422f85c8 lock file 2023-11-12 18:12:53 +00:00
renovate[bot]
78aeb46d56 Update dependency nodemailer to v6.9.7 (#9277)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-12 17:28:00 +00:00
renovate[bot]
091bf45149 Update postgres Docker tag to v16 (#9289)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-12 16:16:04 +00:00
Laurent Cozic
8d9d24740b Doc: Suggest installing yo@4.3.1 2023-11-12 15:52:01 +00:00
Laurent Cozic
21e5f88cb2 Plugin Generator release v2.13.2 2023-11-12 15:40:37 +00:00
Laurent Cozic
5d4259d064 Lock file 2023-11-12 15:39:36 +00:00
Laurent Cozic
9ac03ec33a Releasing sub-packages 2023-11-12 15:38:06 +00:00
Laurent Cozic
e760276341 Chore: Fixes #9282: Plugin generator fails when updating plugin 2023-11-12 15:32:39 +00:00
Henry Heino
206f35ffe5 Mobile: Resolves #9258: Add more space between settings title and description (#9270) 2023-11-12 15:08:52 +00:00
Henry Heino
ddf716479d Chore: Partially resolves #9262: Mobile build: Convert bundle tasks to proper gulp tasks and increase output verbosity (#9266) 2023-11-12 15:07:30 +00:00
Henry Heino
ec7f94df25 Chore: Resolves #9274: Desktop: Fix end-to-end tests when the first window is the devtools window (#9275) 2023-11-12 15:06:32 +00:00
Henry Heino
bcbba0973f Mobile: Improve image editor load performance (#9281) 2023-11-12 15:06:16 +00:00
Henry Heino
bd1ddb8522 Mobile: Resolves #9195: Update js-draw to version 1.11.2 (#9120) 2023-11-12 15:04:55 +00:00
Laurent Cozic
fb47398554 lock files 2023-11-12 15:02:44 +00:00
Henry Heino
10356f4009 Chore: Fixes #9284: Desktop: Fix warning on opening settings screen (#9287) 2023-11-12 15:01:14 +00:00
renovate[bot]
ba83fca47a Update dependency mermaid to v10.5.1 (#9279)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-12 12:57:00 +00:00
Laurent Cozic
b01295f0fd Update BUG_REPORT.yml 2023-11-12 12:51:49 +00:00
renovate[bot]
b928e614cc Update dependency mermaid to v10.5.0 (#9278)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-11 18:22:46 +00:00
Laurent Cozic
973b9c354c Delete .github/ISSUE_TEMPLATE/bug_report.md 2023-11-11 18:20:48 +00:00
Wladimir Kirianov
c12444d6e8 Doc: Improved github issue template, added direct links to support and feature requests (#8974)
Co-authored-by: Henry Heino <46334387+personalizedrefrigerator@users.noreply.github.com>
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2023-11-11 18:18:59 +00:00
Joplin Bot
1401d28f82 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-11-11 18:13:30 +00:00
Laurent Cozic
335269f92d Tools: Fail more cleanly when docker-compose randomly fails to load Postgres 2023-11-11 17:50:15 +00:00
Laurent Cozic
6211606a22 Desktop: Fixed import error report 2023-11-11 17:41:08 +00:00
Laurent Cozic
5f7d438ac1 Doc: Update sponsors 2023-11-11 17:41:07 +00:00
Daeraxa
ee2df96cfb Docs: Fix BUILD.md in contributing instructions (#9273) 2023-11-11 17:17:46 +00:00
Henry Heino
692e925997 Mobile: Fixes #9259: Config screen: Fix section list scroll (#9267) 2023-11-11 17:09:34 +00:00
Henry Heino
39803f53a0 Mobile: Resolves #9260: Fade settings screen icons (#9268) 2023-11-11 17:08:58 +00:00
renovate[bot]
b3591808b7 Update dependency @types/zxcvbn to v4.4.3 (#9247)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-11 17:01:00 +00:00
github-actions[bot]
2427677fd5 @Daeraxa has signed the CLA in laurent22/joplin#9273 2023-11-11 16:18:11 +00:00
Laurent Cozic
9a051effcd Update bug_report.md 2023-11-11 13:24:00 +00:00
Henry Heino
e6e9f92e01 Mobile: Fixes #9123: Fix encryption when a resource doesn't have an associated file (#9222)
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2023-11-10 14:22:26 +00:00
Laurent Cozic
ca6762c891 iOS 12.13.5 2023-11-10 14:13:43 +00:00
Laurent Cozic
76d07beb27 lock file 2023-11-10 14:13:42 +00:00
Henry Heino
f3daa7f0e4 Desktop: Resolves #9250: Make settings tabs focusable by keyboard (#9253) 2023-11-10 14:00:59 +00:00
Laurent Cozic
041ad22443 Update bug_report.md 2023-11-10 13:42:06 +00:00
Laurent Cozic
6cd0938ee4 iOS 12.13.5 2023-11-10 13:21:02 +00:00
Laurent Cozic
c3dc30ee5d lock file 2023-11-10 13:19:52 +00:00
renovate[bot]
37c925dcf2 Update dependency react-native-safe-area-context to v4.7.3 (#9248)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-10 12:05:54 +00:00
renovate[bot]
05bd51f85c Update dependency @types/yargs to v17.0.29 (#9246)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-10 12:05:41 +00:00
Joplin Bot
cfbc37df8d Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-11-10 00:41:46 +00:00
597 changed files with 68315 additions and 76820 deletions

View File

@@ -59,6 +59,8 @@ packages/app-mobile/locales
packages/app-mobile/node_modules
packages/app-mobile/pluginAssets/
packages/fork-*
packages/default-plugins/plugin-base-repo/
packages/default-plugins/plugin-sources/
packages/htmlpack/dist/
packages/lib/assets/
packages/lib/lib/lib.js
@@ -85,13 +87,35 @@ packages/lib/countable/Countable.js
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
packages/app-cli/app/LinkSelector.js
packages/app-cli/app/base-command.js
packages/app-cli/app/command-apidoc.js
packages/app-cli/app/command-attach.js
packages/app-cli/app/command-cat.js
packages/app-cli/app/command-config.js
packages/app-cli/app/command-cp.js
packages/app-cli/app/command-done.test.js
packages/app-cli/app/command-done.js
packages/app-cli/app/command-dump.js
packages/app-cli/app/command-e2ee.js
packages/app-cli/app/command-edit.js
packages/app-cli/app/command-exit.js
packages/app-cli/app/command-export-sync-status.js
packages/app-cli/app/command-export.js
packages/app-cli/app/command-geoloc.js
packages/app-cli/app/command-help.js
packages/app-cli/app/command-import.js
packages/app-cli/app/command-ls.js
packages/app-cli/app/command-mkbook.test.js
packages/app-cli/app/command-mkbook.js
packages/app-cli/app/command-mv.js
packages/app-cli/app/command-ren.js
packages/app-cli/app/command-rmbook.js
packages/app-cli/app/command-rmnote.js
packages/app-cli/app/command-set.js
packages/app-cli/app/command-settingschema.js
packages/app-cli/app/command-sync.js
packages/app-cli/app/command-testing.js
packages/app-cli/app/command-use.js
packages/app-cli/app/command-version.js
packages/app-cli/app/gui/StatusBarWidget.js
packages/app-cli/app/services/plugins/PluginRunner.js
packages/app-cli/app/setupCommand.js
@@ -249,6 +273,8 @@ packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/styles/index.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/joplinCommandToTinyMceCommands.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/openEditDialog.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/setupToolbarButtons.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/shouldPasteResources.test.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/shouldPasteResources.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/types.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useContextMenu.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useScroll.js
@@ -378,11 +404,16 @@ packages/app-desktop/gui/style/StyledTextInput.js
packages/app-desktop/gui/utils/NoteListUtils.js
packages/app-desktop/gui/utils/convertToScreenCoordinates.js
packages/app-desktop/gui/utils/loadScript.js
packages/app-desktop/gulpfile.js
packages/app-desktop/integration-tests/main.spec.js
packages/app-desktop/integration-tests/models/MainScreen.js
packages/app-desktop/integration-tests/models/NoteEditorScreen.js
packages/app-desktop/integration-tests/models/SettingsScreen.js
packages/app-desktop/integration-tests/simpleBackup.spec.js
packages/app-desktop/integration-tests/util/activateMainMenuItem.js
packages/app-desktop/integration-tests/util/createStartupArgs.js
packages/app-desktop/integration-tests/util/firstNonDevToolsWindow.js
packages/app-desktop/integration-tests/util/setFilePickerResponse.js
packages/app-desktop/integration-tests/util/test.js
packages/app-desktop/playwright.config.js
packages/app-desktop/plugins/GotoAnything.js
@@ -410,6 +441,7 @@ packages/app-desktop/services/sortOrder/PerFolderSortOrderService.js
packages/app-desktop/services/sortOrder/notesSortOrderUtils.test.js
packages/app-desktop/services/sortOrder/notesSortOrderUtils.js
packages/app-desktop/services/spellChecker/SpellCheckerServiceDriverNative.js
packages/app-desktop/tools/copy7Zip.js
packages/app-desktop/tools/notarizeMacApp.js
packages/app-desktop/tools/renameReleaseAssets.js
packages/app-desktop/utils/checkForUpdatesUtils.test.js
@@ -508,7 +540,10 @@ packages/app-mobile/services/profiles/index.js
packages/app-mobile/services/voiceTyping/vosk.android.js
packages/app-mobile/services/voiceTyping/vosk.ios.js
packages/app-mobile/setupQuickActions.js
packages/app-mobile/tools/buildInjectedJs.js
packages/app-mobile/tools/buildInjectedJs/BundledFile.js
packages/app-mobile/tools/buildInjectedJs/constants.js
packages/app-mobile/tools/buildInjectedJs/copyJs.js
packages/app-mobile/tools/buildInjectedJs/gulpTasks.js
packages/app-mobile/utils/ShareExtension.js
packages/app-mobile/utils/ShareUtils.test.js
packages/app-mobile/utils/ShareUtils.js
@@ -522,12 +557,18 @@ packages/app-mobile/utils/fs-driver/runOnDeviceTests.js
packages/app-mobile/utils/setupNotifications.js
packages/app-mobile/utils/shareHandler.js
packages/app-mobile/utils/types.js
packages/default-plugins/build.js
packages/default-plugins/buildDefaultPlugins.js
packages/default-plugins/commands/buildAll.js
packages/default-plugins/commands/editPatch.js
packages/default-plugins/utils/getPathToPatchFileFor.js
packages/default-plugins/utils/readRepositoryJson.js
packages/default-plugins/utils/waitForCliInput.js
packages/editor/CodeMirror/CodeMirror5Emulation/CodeMirror5Emulation.test.js
packages/editor/CodeMirror/CodeMirror5Emulation/CodeMirror5Emulation.js
packages/editor/CodeMirror/CodeMirror5Emulation/Decorator.js
packages/editor/CodeMirror/CodeMirrorControl.test.js
packages/editor/CodeMirror/CodeMirrorControl.js
packages/editor/CodeMirror/PluginLoader.js
packages/editor/CodeMirror/configFromSettings.js
packages/editor/CodeMirror/createEditor.test.js
packages/editor/CodeMirror/createEditor.js
@@ -537,6 +578,7 @@ packages/editor/CodeMirror/editorCommands/swapLine.js
packages/editor/CodeMirror/getScrollFraction.js
packages/editor/CodeMirror/markdown/computeSelectionFormatting.test.js
packages/editor/CodeMirror/markdown/computeSelectionFormatting.js
packages/editor/CodeMirror/markdown/decoratorExtension.test.js
packages/editor/CodeMirror/markdown/decoratorExtension.js
packages/editor/CodeMirror/markdown/markdownCommands.bulletedVsChecklist.test.js
packages/editor/CodeMirror/markdown/markdownCommands.test.js
@@ -547,6 +589,8 @@ packages/editor/CodeMirror/markdown/markdownMathParser.js
packages/editor/CodeMirror/markdown/markdownReformatter.test.js
packages/editor/CodeMirror/markdown/markdownReformatter.js
packages/editor/CodeMirror/markdown/syntaxHighlightingLanguages.js
packages/editor/CodeMirror/pluginApi/PluginLoader.js
packages/editor/CodeMirror/pluginApi/codeMirrorRequire.js
packages/editor/CodeMirror/testUtil/createEditorSettings.js
packages/editor/CodeMirror/testUtil/createTestEditor.js
packages/editor/CodeMirror/testUtil/forceFullParse.js
@@ -628,6 +672,7 @@ packages/lib/eventManager.js
packages/lib/file-api-driver-joplinServer.js
packages/lib/file-api-driver-memory.js
packages/lib/file-api-driver.test.js
packages/lib/file-api.test.js
packages/lib/file-api.js
packages/lib/fs-driver-base.js
packages/lib/fs-driver-node.js
@@ -645,6 +690,7 @@ packages/lib/import-enex.js
packages/lib/initLib.js
packages/lib/locale.test.js
packages/lib/locale.js
packages/lib/makeDiscourseDebugUrl.test.js
packages/lib/makeDiscourseDebugUrl.js
packages/lib/markdownUtils.test.js
packages/lib/markdownUtils.js
@@ -675,6 +721,7 @@ packages/lib/models/Search.js
packages/lib/models/Setting.test.js
packages/lib/models/Setting.js
packages/lib/models/SmartFilter.js
packages/lib/models/Tag.test.js
packages/lib/models/Tag.js
packages/lib/models/dateTimeFormats.test.js
packages/lib/models/settings/FileHandler.js
@@ -730,9 +777,13 @@ packages/lib/services/commands/propsHaveChanged.js
packages/lib/services/commands/stateToWhenClauseContext.js
packages/lib/services/contextkey/contextkey.js
packages/lib/services/database/addMigrationFile.js
packages/lib/services/database/isSqliteSyntaxError.js
packages/lib/services/database/migrations/42.js
packages/lib/services/database/migrations/43.js
packages/lib/services/database/migrations/44.js
packages/lib/services/database/migrations/45.js
packages/lib/services/database/migrations/index.js
packages/lib/services/database/sqlStringToLines.js
packages/lib/services/database/types.js
packages/lib/services/debug/populateDatabase.js
packages/lib/services/e2ee/EncryptionService.test.js
@@ -779,6 +830,13 @@ packages/lib/services/keychain/KeychainServiceDriverBase.js
packages/lib/services/noteList/defaultLeftToRightListRenderer.js
packages/lib/services/noteList/defaultListRenderer.js
packages/lib/services/noteList/renderers.js
packages/lib/services/ocr/OcrDriverBase.js
packages/lib/services/ocr/OcrService.test.js
packages/lib/services/ocr/OcrService.js
packages/lib/services/ocr/drivers/OcrDriverTesseract.js
packages/lib/services/ocr/utils/filterOcrText.test.js
packages/lib/services/ocr/utils/filterOcrText.js
packages/lib/services/ocr/utils/types.js
packages/lib/services/plugins/BasePlatformImplementation.js
packages/lib/services/plugins/BasePluginRunner.js
packages/lib/services/plugins/MenuController.js
@@ -856,15 +914,17 @@ packages/lib/services/rest/utils/paginatedResults.js
packages/lib/services/rest/utils/readonlyProperties.js
packages/lib/services/rest/utils/requestFields.js
packages/lib/services/rest/utils/requestPaginationOptions.js
packages/lib/services/searchengine/SearchEngine.js
packages/lib/services/searchengine/SearchEngineUtils.test.js
packages/lib/services/searchengine/SearchEngineUtils.js
packages/lib/services/searchengine/SearchFilter.test.js
packages/lib/services/searchengine/filterParser.test.js
packages/lib/services/searchengine/filterParser.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.test.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.js
packages/lib/services/searchengine/queryBuilder.js
packages/lib/services/search/SearchEngine.resources.test.js
packages/lib/services/search/SearchEngine.test.js
packages/lib/services/search/SearchEngine.js
packages/lib/services/search/SearchEngineUtils.test.js
packages/lib/services/search/SearchEngineUtils.js
packages/lib/services/search/SearchFilter.test.js
packages/lib/services/search/filterParser.test.js
packages/lib/services/search/filterParser.js
packages/lib/services/search/gotoAnythingStyleQuery.test.js
packages/lib/services/search/gotoAnythingStyleQuery.js
packages/lib/services/search/queryBuilder.js
packages/lib/services/share/ShareService.test.js
packages/lib/services/share/ShareService.js
packages/lib/services/share/reducer.js
@@ -903,6 +963,7 @@ packages/lib/services/synchronizer/utils/handleSyncStartupOperation.js
packages/lib/services/synchronizer/utils/resourceRemotePath.js
packages/lib/services/synchronizer/utils/syncDeleteStep.js
packages/lib/services/synchronizer/utils/types.js
packages/lib/shim-init-node.js
packages/lib/shim.js
packages/lib/testing/syncTargetUtils.js
packages/lib/testing/test-utils-synchronizer.js
@@ -918,6 +979,7 @@ packages/lib/themes/solarizedDark.js
packages/lib/themes/solarizedLight.js
packages/lib/themes/type.js
packages/lib/time.js
packages/lib/types.js
packages/lib/utils/credentialFiles.js
packages/lib/utils/joplinCloud.js
packages/lib/utils/processStartFlags.js
@@ -959,6 +1021,8 @@ packages/plugin-repo-cli/lib/types.js
packages/plugin-repo-cli/lib/updateReadme.test.js
packages/plugin-repo-cli/lib/updateReadme.js
packages/plugin-repo-cli/lib/utils.js
packages/plugin-repo-cli/lib/validateUntrustedManifest.test.js
packages/plugin-repo-cli/lib/validateUntrustedManifest.js
packages/plugins/ToggleSidebars/api/index.js
packages/plugins/ToggleSidebars/api/types.js
packages/plugins/ToggleSidebars/src/index.js
@@ -1002,8 +1066,6 @@ packages/tools/build-translation.js
packages/tools/build-welcome.js
packages/tools/buildServerDocker.test.js
packages/tools/buildServerDocker.js
packages/tools/bundleDefaultPlugins.test.js
packages/tools/bundleDefaultPlugins.js
packages/tools/checkIgnoredFiles.js
packages/tools/checkLibPaths.test.js
packages/tools/checkLibPaths.js

View File

@@ -157,6 +157,8 @@ module.exports = {
// In user-facing text, it should be "notebook".
'id-denylist': ['error', 'err', 'notebook', 'notebooks'],
'prefer-arrow-callback': ['error'],
'no-constant-binary-expression': ['error'],
},
'plugins': [
'react',

62
.github/ISSUE_TEMPLATE/BUG_REPORT.yml vendored Normal file
View File

@@ -0,0 +1,62 @@
name: Bug Report
description: Report a reproducible bug or regression in Joplin.
labels: ['bug']
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
- type: dropdown
id: os
attributes:
label: "Operating system"
multiple: false
options:
- "Windows"
- "macOS"
- "Linux"
- "Android"
- "iOS"
validations:
required: true
- type: input
id: version
attributes:
label: "Joplin version"
placeholder: "For example 1.0.5"
description: Please note that we will close the issue if the exact version is not provided, as we cannot help without this.
validations:
required: true
- type: textarea
id: desktop-about-content
attributes:
label: "Desktop version info"
description: "If this issue is about the **desktop app**, please open the \"About\" dialog under the \"Help\" or \"Joplin\" menu and copy its content here."
placeholder: "Joplin 2.13.5 (dev, darwin)\n\nClient ID: ..."
- type: textarea
id: current
attributes:
label: Current behaviour
description: What did Joplin do? Include screenshots and video recordings for UI problems if needed. If you are reporting a clipper bug, please include an example URL that shows the issue.
placeholder: |
1. This
2. Then that
3. Then this
4. Etc.
- type: textarea
id: expected
attributes:
label: Expected behaviour
description: What did you expect Joplin to do?
- type: textarea
id: logs
attributes:
label: Logs
description: "If relevant, please provide a log file as described here: https://joplinapp.org/help/apps/debugging"

View File

@@ -1,52 +0,0 @@
---
name: "\U0001F41B Bug Report"
about: Report a reproducible bug or regression in Joplin.
title: ''
labels: bug
assignees: ''
---
<!--
Please provide a clear and concise description of what the bug is. (In the section Steps To Reproduce.)
Include screenshots for UI problems if needed.
DO NOT create screenshots of text !!! Copy and paste the text into a code block.
Please test using the latest Joplin release to make sure your issue has not already been fixed.
-->
<!--
IMPORTANT: If you are reporting a clipper bug, please include an example URL that shows the issue.
Without the URL the issue is likely to be closed.
-->
## Environment
Joplin version:
Platform:
OS specifics:
<!--
Platform can be one of: macOS, Linux, Windows, Android, iOS, terminal (or a combination)
OS specifics: e.g. OS version, Linux distribution, Android/iOS version...
-->
## Steps to reproduce
1.
2.
3.
<!--
Issues without reproduction steps are likely to stall.
-->
## Describe what you expected to happen
## Logfile
<!--
Please attach a debug log. Issues without a debug log are likely to stall.
For information on how to collect a log file: https://joplinapp.org/help/apps/debugging/
-->

View File

@@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: "\U0001F914 Feature requests and support"
url: https://discourse.joplinapp.org/
about: I have a question or feature request …
- name: Feature Requests
url: https://discourse.joplinapp.org/c/features/
about: Discuss ideas for new features or changes
- name: Support
url: https://discourse.joplinapp.org/c/support/
about: Please ask for help here

View File

@@ -8,16 +8,23 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
ROOT_DIR="$SCRIPT_DIR/../.."
IS_PULL_REQUEST=0
IS_DEV_BRANCH=0
IS_DESKTOP_RELEASE=0
IS_SERVER_RELEASE=0
IS_LINUX=0
IS_MACOS=0
# If pull requests are coming from a branch of the main repository,
# IS_PULL_REQUEST will be zero.
if [ "$GITHUB_EVENT_NAME" == "pull_request" ]; then
IS_PULL_REQUEST=1
fi
if [ "$GITHUB_REF" == "refs/heads/dev" ]; then
IS_DEV_BRANCH=1
if [[ $GIT_TAG_NAME = $SERVER_TAG_PREFIX-* ]]; then
IS_SERVER_RELEASE=1
fi
if [[ $GIT_TAG_NAME = v* ]]; then
IS_DESKTOP_RELEASE=1
fi
if [ "$RUNNER_OS" == "Linux" ]; then
@@ -28,6 +35,14 @@ else
IS_MACOS=1
fi
# Tests can randomly fail in some cases, so only run them when not publishing
# a release
RUN_TESTS=0
if [ "$IS_SERVER_RELEASE" = 0 ] && [ "$IS_DESKTOP_RELEASE" = 0 ]; then
RUN_TESTS=1
fi
# =============================================================================
# Print environment
# =============================================================================
@@ -43,7 +58,9 @@ echo "SERVER_TAG_PREFIX=$SERVER_TAG_PREFIX"
echo "IS_CONTINUOUS_INTEGRATION=$IS_CONTINUOUS_INTEGRATION"
echo "IS_PULL_REQUEST=$IS_PULL_REQUEST"
echo "IS_DEV_BRANCH=$IS_DEV_BRANCH"
echo "IS_DESKTOP_RELEASE=$IS_DESKTOP_RELEASE"
echo "IS_SERVER_RELEASE=$IS_SERVER_RELEASE"
echo "RUN_TESTS=$RUN_TESTS"
echo "IS_LINUX=$IS_LINUX"
echo "IS_MACOS=$IS_MACOS"
@@ -64,17 +81,20 @@ if [ $testResult -ne 0 ]; then
fi
# =============================================================================
# Run test units. Only do it for pull requests and dev branch because we don't
# want it to randomly fail when trying to create a desktop release.
# Run test units
# =============================================================================
if [ "$IS_PULL_REQUEST" == "1" ] || [ "$IS_DEV_BRANCH" = "1" ]; then
if [ "$RUN_TESTS" == "1" ]; then
echo "Step: Running tests..."
# On Linux, we run the Joplin Server tests using PostgreSQL
if [ "$IS_LINUX" == "1" ]; then
echo "Running Joplin Server tests using PostgreSQL..."
sudo docker-compose --file docker-compose.db-dev.yml up -d
cmdResult=$?
if [ $cmdResult -ne 0 ]; then
exit $cmdResult
fi
export JOPLIN_TESTS_SERVER_DB=pg
else
echo "Running Joplin Server tests using SQLite..."
@@ -94,23 +114,12 @@ if [ "$IS_PULL_REQUEST" == "1" ] || [ "$IS_DEV_BRANCH" = "1" ]; then
fi
fi
# =============================================================================
# Check that the website builder can run without errors
# =============================================================================
if [ "$IS_PULL_REQUEST" == "1" ] || [ "$IS_DEV_BRANCH" = "1" ]; then
if [ "$IS_LINUX" == "1" ]; then
echo "Step: Running website builder..."
node packages/tools/website/processDocs.js --env dev
fi
fi
# =============================================================================
# Run linter for pull requests only. We also don't want this to make the desktop
# release randomly fail.
# =============================================================================
if [ "$IS_PULL_REQUEST" == "1" ] || [ "$IS_DEV_BRANCH" = "1" ]; then
if [ "$RUN_TESTS" == "1" ]; then
echo "Step: Running linter..."
yarn run linter-ci ./
@@ -150,7 +159,7 @@ fi
# what commit may have broken translation building.
# =============================================================================
if [ "$IS_PULL_REQUEST" == "1" ] || [ "$IS_DEV_BRANCH" = "1" ]; then
if [ "$RUN_TESTS" == "1" ]; then
if [ "$IS_LINUX" == "1" ]; then
echo "Step: Checking for lost translation strings..."
@@ -186,10 +195,11 @@ fi
# Check that the website still builds
# =============================================================================
if [ "$IS_PULL_REQUEST" == "1" ] || [ "$IS_DEV_BRANCH" = "1" ]; then
if [ "$RUN_TESTS" == "1" ]; then
echo "Step: Check that the website still builds..."
mkdir -p ../joplin-website/docs
ll ../joplin-website/docs/api/references/plugin_api
SKIP_SPONSOR_PROCESSING=1 yarn run buildWebsite
testResult=$?
if [ $testResult -ne 0 ]; then
@@ -222,7 +232,7 @@ fi
cd "$ROOT_DIR/packages/app-desktop"
if [[ $GIT_TAG_NAME = v* ]]; then
if [ "$IS_DESKTOP_RELEASE" == "1" ]; then
echo "Step: Building and publishing desktop application..."
# cd "$ROOT_DIR/packages/tools"
# node bundleDefaultPlugins.js
@@ -247,7 +257,7 @@ if [[ $GIT_TAG_NAME = v* ]]; then
else
USE_HARD_LINKS=false yarn run dist
fi
elif [[ $IS_LINUX = 1 ]] && [[ $GIT_TAG_NAME = $SERVER_TAG_PREFIX-* ]]; then
elif [[ $IS_LINUX = 1 ]] && [ "$IS_SERVER_RELEASE" == "1" ]; then
echo "Step: Building Docker Image..."
cd "$ROOT_DIR"
yarn run buildServerDocker --tag-name $GIT_TAG_NAME --push-images --repository $SERVER_REPOSITORY

View File

@@ -33,6 +33,12 @@ jobs:
# https://yarnpkg.com/getting-started/install
corepack enable
- name: Install macOs dependencies
if: runner.os == 'macOS'
run: |
# Required for building the canvas package
brew install pango
# See github-action-main.yml for explanation
- uses: actions/setup-python@v4
with:

9
.github/workflows/check-pr-title.yml vendored Normal file
View File

@@ -0,0 +1,9 @@
name: Check pull request title
on: [pull_request]
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: Slashgear/action-check-pr-title@v4.3.0
with:
regexp: "(Desktop|Mobile|All|Cli|Tools|Chore|Clipper|Server|Android|iOS|Plugins|CI|Plugin Repo|Doc): (Fixes|Resolves) #[0-9]+: .+"

View File

@@ -0,0 +1,14 @@
name: comment-on-failure
on:
workflow_run:
workflows:
- Joplin Continuous Integration
- react-native-android-build-apk
- Build macOS M1
types: [ completed ]
jobs:
comment-failure:
runs-on: ubuntu-latest
steps:
- uses: quipper/comment-failure-action@v0.1.1

View File

@@ -59,6 +59,12 @@ jobs:
# testing.
sudo apt-get install -y xvfb
- name: Install macOs dependencies
if: runner.os == 'macOS'
run: |
# Required for building the canvas package
brew install pango
- name: Install Docker Engine
# if: runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/server-v')
if: runner.os == 'Linux'
@@ -92,7 +98,7 @@ jobs:
# Login to Docker only if we're on a server release tag. If we run this on
# a pull request it will fail because the PR doesn't have access to
# secrets
- uses: docker/login-action@v2
- uses: docker/login-action@v3
if: runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/server-v')
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}

86
.gitignore vendored
View File

@@ -67,13 +67,35 @@ docs/**/*.mustache
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
packages/app-cli/app/LinkSelector.js
packages/app-cli/app/base-command.js
packages/app-cli/app/command-apidoc.js
packages/app-cli/app/command-attach.js
packages/app-cli/app/command-cat.js
packages/app-cli/app/command-config.js
packages/app-cli/app/command-cp.js
packages/app-cli/app/command-done.test.js
packages/app-cli/app/command-done.js
packages/app-cli/app/command-dump.js
packages/app-cli/app/command-e2ee.js
packages/app-cli/app/command-edit.js
packages/app-cli/app/command-exit.js
packages/app-cli/app/command-export-sync-status.js
packages/app-cli/app/command-export.js
packages/app-cli/app/command-geoloc.js
packages/app-cli/app/command-help.js
packages/app-cli/app/command-import.js
packages/app-cli/app/command-ls.js
packages/app-cli/app/command-mkbook.test.js
packages/app-cli/app/command-mkbook.js
packages/app-cli/app/command-mv.js
packages/app-cli/app/command-ren.js
packages/app-cli/app/command-rmbook.js
packages/app-cli/app/command-rmnote.js
packages/app-cli/app/command-set.js
packages/app-cli/app/command-settingschema.js
packages/app-cli/app/command-sync.js
packages/app-cli/app/command-testing.js
packages/app-cli/app/command-use.js
packages/app-cli/app/command-version.js
packages/app-cli/app/gui/StatusBarWidget.js
packages/app-cli/app/services/plugins/PluginRunner.js
packages/app-cli/app/setupCommand.js
@@ -231,6 +253,8 @@ packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/styles/index.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/joplinCommandToTinyMceCommands.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/openEditDialog.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/setupToolbarButtons.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/shouldPasteResources.test.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/shouldPasteResources.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/types.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useContextMenu.js
packages/app-desktop/gui/NoteEditor/NoteBody/TinyMCE/utils/useScroll.js
@@ -360,11 +384,16 @@ packages/app-desktop/gui/style/StyledTextInput.js
packages/app-desktop/gui/utils/NoteListUtils.js
packages/app-desktop/gui/utils/convertToScreenCoordinates.js
packages/app-desktop/gui/utils/loadScript.js
packages/app-desktop/gulpfile.js
packages/app-desktop/integration-tests/main.spec.js
packages/app-desktop/integration-tests/models/MainScreen.js
packages/app-desktop/integration-tests/models/NoteEditorScreen.js
packages/app-desktop/integration-tests/models/SettingsScreen.js
packages/app-desktop/integration-tests/simpleBackup.spec.js
packages/app-desktop/integration-tests/util/activateMainMenuItem.js
packages/app-desktop/integration-tests/util/createStartupArgs.js
packages/app-desktop/integration-tests/util/firstNonDevToolsWindow.js
packages/app-desktop/integration-tests/util/setFilePickerResponse.js
packages/app-desktop/integration-tests/util/test.js
packages/app-desktop/playwright.config.js
packages/app-desktop/plugins/GotoAnything.js
@@ -392,6 +421,7 @@ packages/app-desktop/services/sortOrder/PerFolderSortOrderService.js
packages/app-desktop/services/sortOrder/notesSortOrderUtils.test.js
packages/app-desktop/services/sortOrder/notesSortOrderUtils.js
packages/app-desktop/services/spellChecker/SpellCheckerServiceDriverNative.js
packages/app-desktop/tools/copy7Zip.js
packages/app-desktop/tools/notarizeMacApp.js
packages/app-desktop/tools/renameReleaseAssets.js
packages/app-desktop/utils/checkForUpdatesUtils.test.js
@@ -490,7 +520,10 @@ packages/app-mobile/services/profiles/index.js
packages/app-mobile/services/voiceTyping/vosk.android.js
packages/app-mobile/services/voiceTyping/vosk.ios.js
packages/app-mobile/setupQuickActions.js
packages/app-mobile/tools/buildInjectedJs.js
packages/app-mobile/tools/buildInjectedJs/BundledFile.js
packages/app-mobile/tools/buildInjectedJs/constants.js
packages/app-mobile/tools/buildInjectedJs/copyJs.js
packages/app-mobile/tools/buildInjectedJs/gulpTasks.js
packages/app-mobile/utils/ShareExtension.js
packages/app-mobile/utils/ShareUtils.test.js
packages/app-mobile/utils/ShareUtils.js
@@ -504,12 +537,18 @@ packages/app-mobile/utils/fs-driver/runOnDeviceTests.js
packages/app-mobile/utils/setupNotifications.js
packages/app-mobile/utils/shareHandler.js
packages/app-mobile/utils/types.js
packages/default-plugins/build.js
packages/default-plugins/buildDefaultPlugins.js
packages/default-plugins/commands/buildAll.js
packages/default-plugins/commands/editPatch.js
packages/default-plugins/utils/getPathToPatchFileFor.js
packages/default-plugins/utils/readRepositoryJson.js
packages/default-plugins/utils/waitForCliInput.js
packages/editor/CodeMirror/CodeMirror5Emulation/CodeMirror5Emulation.test.js
packages/editor/CodeMirror/CodeMirror5Emulation/CodeMirror5Emulation.js
packages/editor/CodeMirror/CodeMirror5Emulation/Decorator.js
packages/editor/CodeMirror/CodeMirrorControl.test.js
packages/editor/CodeMirror/CodeMirrorControl.js
packages/editor/CodeMirror/PluginLoader.js
packages/editor/CodeMirror/configFromSettings.js
packages/editor/CodeMirror/createEditor.test.js
packages/editor/CodeMirror/createEditor.js
@@ -519,6 +558,7 @@ packages/editor/CodeMirror/editorCommands/swapLine.js
packages/editor/CodeMirror/getScrollFraction.js
packages/editor/CodeMirror/markdown/computeSelectionFormatting.test.js
packages/editor/CodeMirror/markdown/computeSelectionFormatting.js
packages/editor/CodeMirror/markdown/decoratorExtension.test.js
packages/editor/CodeMirror/markdown/decoratorExtension.js
packages/editor/CodeMirror/markdown/markdownCommands.bulletedVsChecklist.test.js
packages/editor/CodeMirror/markdown/markdownCommands.test.js
@@ -529,6 +569,8 @@ packages/editor/CodeMirror/markdown/markdownMathParser.js
packages/editor/CodeMirror/markdown/markdownReformatter.test.js
packages/editor/CodeMirror/markdown/markdownReformatter.js
packages/editor/CodeMirror/markdown/syntaxHighlightingLanguages.js
packages/editor/CodeMirror/pluginApi/PluginLoader.js
packages/editor/CodeMirror/pluginApi/codeMirrorRequire.js
packages/editor/CodeMirror/testUtil/createEditorSettings.js
packages/editor/CodeMirror/testUtil/createTestEditor.js
packages/editor/CodeMirror/testUtil/forceFullParse.js
@@ -610,6 +652,7 @@ packages/lib/eventManager.js
packages/lib/file-api-driver-joplinServer.js
packages/lib/file-api-driver-memory.js
packages/lib/file-api-driver.test.js
packages/lib/file-api.test.js
packages/lib/file-api.js
packages/lib/fs-driver-base.js
packages/lib/fs-driver-node.js
@@ -627,6 +670,7 @@ packages/lib/import-enex.js
packages/lib/initLib.js
packages/lib/locale.test.js
packages/lib/locale.js
packages/lib/makeDiscourseDebugUrl.test.js
packages/lib/makeDiscourseDebugUrl.js
packages/lib/markdownUtils.test.js
packages/lib/markdownUtils.js
@@ -657,6 +701,7 @@ packages/lib/models/Search.js
packages/lib/models/Setting.test.js
packages/lib/models/Setting.js
packages/lib/models/SmartFilter.js
packages/lib/models/Tag.test.js
packages/lib/models/Tag.js
packages/lib/models/dateTimeFormats.test.js
packages/lib/models/settings/FileHandler.js
@@ -712,9 +757,13 @@ packages/lib/services/commands/propsHaveChanged.js
packages/lib/services/commands/stateToWhenClauseContext.js
packages/lib/services/contextkey/contextkey.js
packages/lib/services/database/addMigrationFile.js
packages/lib/services/database/isSqliteSyntaxError.js
packages/lib/services/database/migrations/42.js
packages/lib/services/database/migrations/43.js
packages/lib/services/database/migrations/44.js
packages/lib/services/database/migrations/45.js
packages/lib/services/database/migrations/index.js
packages/lib/services/database/sqlStringToLines.js
packages/lib/services/database/types.js
packages/lib/services/debug/populateDatabase.js
packages/lib/services/e2ee/EncryptionService.test.js
@@ -761,6 +810,13 @@ packages/lib/services/keychain/KeychainServiceDriverBase.js
packages/lib/services/noteList/defaultLeftToRightListRenderer.js
packages/lib/services/noteList/defaultListRenderer.js
packages/lib/services/noteList/renderers.js
packages/lib/services/ocr/OcrDriverBase.js
packages/lib/services/ocr/OcrService.test.js
packages/lib/services/ocr/OcrService.js
packages/lib/services/ocr/drivers/OcrDriverTesseract.js
packages/lib/services/ocr/utils/filterOcrText.test.js
packages/lib/services/ocr/utils/filterOcrText.js
packages/lib/services/ocr/utils/types.js
packages/lib/services/plugins/BasePlatformImplementation.js
packages/lib/services/plugins/BasePluginRunner.js
packages/lib/services/plugins/MenuController.js
@@ -838,15 +894,17 @@ packages/lib/services/rest/utils/paginatedResults.js
packages/lib/services/rest/utils/readonlyProperties.js
packages/lib/services/rest/utils/requestFields.js
packages/lib/services/rest/utils/requestPaginationOptions.js
packages/lib/services/searchengine/SearchEngine.js
packages/lib/services/searchengine/SearchEngineUtils.test.js
packages/lib/services/searchengine/SearchEngineUtils.js
packages/lib/services/searchengine/SearchFilter.test.js
packages/lib/services/searchengine/filterParser.test.js
packages/lib/services/searchengine/filterParser.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.test.js
packages/lib/services/searchengine/gotoAnythingStyleQuery.js
packages/lib/services/searchengine/queryBuilder.js
packages/lib/services/search/SearchEngine.resources.test.js
packages/lib/services/search/SearchEngine.test.js
packages/lib/services/search/SearchEngine.js
packages/lib/services/search/SearchEngineUtils.test.js
packages/lib/services/search/SearchEngineUtils.js
packages/lib/services/search/SearchFilter.test.js
packages/lib/services/search/filterParser.test.js
packages/lib/services/search/filterParser.js
packages/lib/services/search/gotoAnythingStyleQuery.test.js
packages/lib/services/search/gotoAnythingStyleQuery.js
packages/lib/services/search/queryBuilder.js
packages/lib/services/share/ShareService.test.js
packages/lib/services/share/ShareService.js
packages/lib/services/share/reducer.js
@@ -885,6 +943,7 @@ packages/lib/services/synchronizer/utils/handleSyncStartupOperation.js
packages/lib/services/synchronizer/utils/resourceRemotePath.js
packages/lib/services/synchronizer/utils/syncDeleteStep.js
packages/lib/services/synchronizer/utils/types.js
packages/lib/shim-init-node.js
packages/lib/shim.js
packages/lib/testing/syncTargetUtils.js
packages/lib/testing/test-utils-synchronizer.js
@@ -900,6 +959,7 @@ packages/lib/themes/solarizedDark.js
packages/lib/themes/solarizedLight.js
packages/lib/themes/type.js
packages/lib/time.js
packages/lib/types.js
packages/lib/utils/credentialFiles.js
packages/lib/utils/joplinCloud.js
packages/lib/utils/processStartFlags.js
@@ -941,6 +1001,8 @@ packages/plugin-repo-cli/lib/types.js
packages/plugin-repo-cli/lib/updateReadme.test.js
packages/plugin-repo-cli/lib/updateReadme.js
packages/plugin-repo-cli/lib/utils.js
packages/plugin-repo-cli/lib/validateUntrustedManifest.test.js
packages/plugin-repo-cli/lib/validateUntrustedManifest.js
packages/plugins/ToggleSidebars/api/index.js
packages/plugins/ToggleSidebars/api/types.js
packages/plugins/ToggleSidebars/src/index.js
@@ -984,8 +1046,6 @@ packages/tools/build-translation.js
packages/tools/build-welcome.js
packages/tools/buildServerDocker.test.js
packages/tools/buildServerDocker.js
packages/tools/bundleDefaultPlugins.test.js
packages/tools/bundleDefaultPlugins.js
packages/tools/checkIgnoredFiles.js
packages/tools/checkLibPaths.test.js
packages/tools/checkLibPaths.js

View File

@@ -1,3 +1,5 @@
packages/app-clipper/popup/
packages/app-cli/tests/support/plugins/
packages/doc-builder/
packages/doc-builder/
packages/default-plugins/plugin-base-repo/
packages/default-plugins/plugin-sources/

View File

@@ -0,0 +1,12 @@
diff --git a/package.json b/package.json
index 4f24d9658ca167733dbe9c3fb3bcfc3f4e6d20c8..15062cc4eb3bc8e14b54b07a9c873e5a5c4b6ab8 100644
--- a/package.json
+++ b/package.json
@@ -35,7 +35,6 @@
"module": "index.js",
"exports": {
".": {
- "browser": "./index.browser.js",
"require": {
"types": "./index.d.cts",
"default": "./index.cjs"

View File

@@ -0,0 +1,15 @@
# We remove the `canvas` optional dependency because electron-rebuild fails to build it, and
# the `canvas` API is already part of Electron
diff --git a/package.json b/package.json
index 105811f53d508486e08a60dc1b6e437cd24d7427..dea6a4e6612c4a4006cc482e46ff5270dcfda1e5 100644
--- a/package.json
+++ b/package.json
@@ -13,7 +13,6 @@
"bugs": "https://github.com/mozilla/pdf.js/issues",
"license": "Apache-2.0",
"optionalDependencies": {
- "canvas": "^2.11.2",
"path2d-polyfill": "^2.0.1"
},
"browser": {

View File

@@ -23,6 +23,7 @@ module.exports = {
return `joplin.${camelCaseToDots(p)
.replace(/menu\.items/, 'menuItems')
.replace(/toolbar\.buttons/, 'toolbarButtons')
.replace(/note\.list/, 'noteList')
.replace(/content\.scripts/, 'contentScripts')}`;
},

Binary file not shown.

After

Width:  |  Height:  |  Size: 973 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@@ -1,4 +1,62 @@
<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Joplin]]></title><description><![CDATA[Joplin, the open source note-taking application]]></description><link>https://joplinapp.org</link><generator>RSS for Node</generator><lastBuildDate>Mon, 23 Oct 2023 00:00:00 GMT</lastBuildDate><atom:link href="https://joplinapp.org/rss.xml" rel="self" type="application/rss+xml"/><pubDate>Mon, 23 Oct 2023 00:00:00 GMT</pubDate><item><title><![CDATA[Working in the shadows with white-hat hackers]]></title><description><![CDATA[<p>The majority of Joplin's development is carried out in the public domain. This includes the discussion of issues on GitHub, as well as the submission of pull requests and related discussions. The transparency of these processes allows for collaborative problem-solving and shared insights.</p>
<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Joplin]]></title><description><![CDATA[Joplin, the open source note-taking application]]></description><link>https://joplinapp.org</link><generator>RSS for Node</generator><lastBuildDate>Sat, 23 Dec 2023 00:00:00 GMT</lastBuildDate><atom:link href="https://joplinapp.org/rss.xml" rel="self" type="application/rss+xml"/><pubDate>Sat, 23 Dec 2023 00:00:00 GMT</pubDate><item><title><![CDATA[Faster synchronisation in upcoming Joplin version!]]></title><description><![CDATA[<p>The next version of Joplin Cloud (and Joplin Server) will include a change that will make synchronisation, in particular when synchronising a new device for the first time, significantly faster. This is achieved by bundling more data with the calls that retrieve notes and other data, thus reducing the number of unnecessary requests.</p>
<p>This change will be applied soon to Joplin Cloud (and Server), and the Joplin mobile, desktop and CLI applications will be able to use it from version 2.14.</p>
<p>In my tests with about 26,000 items, synchronisation was more than twice as fast on Joplin Cloud (22.5 minutes vs 9.5 minutes):</p>
<h2>Before<a name="before" href="#before" class="heading-anchor">🔗</a></h2>
<p>Created local items: 21814. Fetched items: 26591/26591. Completed: 23/12/2023 10:38 (<strong>1346s</strong>)</p>
<p><strong>real 22m35.810s</strong><br/><br>
user 3m19.182s<br/><br>
sys 1m24.207s</p>
<h2>Optimised<a name="optimised" href="#optimised" class="heading-anchor">🔗</a></h2>
<p>Created local items: 21822. Fetched items: 26600/26600. Completed: 23/12/2023 11:48 (<strong>571s</strong>)</p>
<p><strong>real 9m38.932s</strong><br/><br>
user 1m10.119s<br/><br>
sys 0m38.013s</p>
]]></description><link>https://joplinapp.org/news/20231223-faster-sync</link><guid isPermaLink="false">20231223-faster-sync</guid><pubDate>Sat, 23 Dec 2023 00:00:00 GMT</pubDate><twitter-text>Faster synchronisation in upcoming Joplin version!</twitter-text></item><item><title><![CDATA[What's new in Joplin 2.13]]></title><description><![CDATA[<h2>Desktop<a name="desktop" href="#desktop" class="heading-anchor">🔗</a></h2>
<h3>Rich Text Editor improvements<a name="rich-text-editor-improvements" href="#rich-text-editor-improvements" class="heading-anchor">🔗</a></h3>
<p>In this update, significant enhancements have been implemented in the Rich Text Editor to enhance user experience. One notable improvement is the ability to seamlessly embed various content within tables, including lists and other tables, which was a frequently requested feature:</p>
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20231203-rte-table.png" alt=""></p>
<p>The interoperability with other text editors such as Word and Excel has also been improved, in particular when copying and pasting content between these tools and Joplin.</p>
<h3>Improved ENEX import<a name="improved-enex-import" href="#improved-enex-import" class="heading-anchor">🔗</a></h3>
<p>The Evernote Export format, known as ENEX, has always been challenging to support. This is because Evernote frequently changes it, breaking importers, and may also occasionally introduce bugs. At times, their own application struggles to import back files that it has exported, highlighting the volatility of the ENEX format.</p>
<p>After undergoing continuous improvements for seven years, the importer has achieved a relatively stable state. The majority of issues encountered now stem from invalid files generated by Evernote, a result of bugs introduced in recent versions. Despite these challenges, we strive to enhance the import process by employing various heuristics to process the invalid data as effectively as possible.</p>
<p>The list of bug fixes is below:</p>
<ul>
<li>Apply correct size to images imported from ENEX files</li>
<li>ENEX files that contain resources with invalid mime types are imported correctly</li>
<li>Ensure that ENEX resources with invalid filenames are imported correctly</li>
<li>Prevent application from being stuck when importing an invalid ENEX file</li>
</ul>
<h3>New plugins APIs<a name="new-plugins-apis" href="#new-plugins-apis" class="heading-anchor">🔗</a></h3>
<h4>Note list<a name="note-list" href="#note-list" class="heading-anchor">🔗</a></h4>
<p>We are continuously improving the plugin API to make it as easy as possible to customize the application.</p>
<p>One of the main addition is support note list plugins - it allows any plugins to customise what the list should display each note.</p>
<p>See the <a href="https://joplinapp.org/api/references/plugin_api/classes/joplinviewsnotelist.html">Joplin Plugin Note List API</a> and the <a href="https://github.com/laurent22/joplin/blob/dev/packages/app-cli/tests/support/plugins/note_list_renderer/src/index.ts">Note List Demo</a> for more information.</p>
<p>The demo includes three examples of note lists: a fundamental &quot;top to bottom&quot; version, a sophisticated &quot;left to right&quot; variant that additionally displays a note thumbnail, and a demonstration of an interactive note list, allowing direct modification of the note title from the list.</p>
<p>This API was developed based on the feedback we got and we hope it will be useful. We remain open to further input from users and plugin developers regarding any potential missing features and areas for improvement!</p>
<h4>Imaging API<a name="imaging-api" href="#imaging-api" class="heading-anchor">🔗</a></h4>
<p>The imaging API was created to allow plugin developers to easily load and manipulate images. For now it is possible to load PNG and JPG files, and to resize and crop them.</p>
<p><a href="https://joplinapp.org/api/references/plugin_api/classes/joplinimaging.html">https://joplinapp.org/api/references/plugin_api/classes/joplinimaging.html</a></p>
<h4>And more<a name="and-more" href="#and-more" class="heading-anchor">🔗</a></h4>
<p>A few more APIs have been added such as one to <a href="https://joplinapp.org/api/references/plugin_api/classes/joplinviewsdialogs.html#showopendialog">open dialog to select a file or folder</a> and a way to <a href="https://joplinapp.org/api/references/plugin_api/enums/contentscripttype.html#getting-the-settings-from-the-renderer">access the plugin settings from a renderer script</a>.</p>
<h3>New beta Markdown editor<a name="new-beta-markdown-editor" href="#new-beta-markdown-editor" class="heading-anchor">🔗</a></h3>
<p>This version also features a new Markdown editor based on <a href="https://codemirror.net/">CodeMirror 6</a>. This change means that we'll be able to use the same editor on both the desktop and mobile application (which already uses CodeMirror 6), which will allow a more consistent user experience across devices.</p>
<p>Another benefit is that, in a future version, it will allow us to support plugins on the mobile application. There are several other advantages that Henry <a href="https://discourse.joplinapp.org/t/pre-release-v2-13-is-now-available-updated-18-11-2023/32697/12?u=laurent">listed in this forum post</a>.</p>
<h2>Mobile<a name="mobile" href="#mobile" class="heading-anchor">🔗</a></h2>
<h3>Drawing option<a name="drawing-option" href="#drawing-option" class="heading-anchor">🔗</a></h3>
<p>In this new version, Henry integrated the js-draw editor to the mobile app. Js-draw is a powerful freehand drawing library which allows you to draw using a pen, touch screen or mouse.</p>
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20231203-drawing.png" alt=""></p>
<p>The editor is integrated to the mobile application. On desktop application, you can use the same library and edit your drawings using the <a href="https://github.com/personalizedrefrigerator/joplin-plugin-freehand-drawing">Freehand Drawing plugin</a>. We will make this plugin available by default in a future desktop release.</p>
<h3>Setting screen<a name="setting-screen" href="#setting-screen" class="heading-anchor">🔗</a></h3>
<p>The mobile version also features a redesigned configuration screen. It is now divided into multiple sections with clear titles, and you can also search for settings using the built-in search option.</p>
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20231203-settings.png" alt=""></p>
<h1>Full changelog<a name="full-changelog" href="#full-changelog" class="heading-anchor">🔗</a></h1>
<p>This is just an overview of the main features. The full changelog is available there:</p>
<ul>
<li>Desktop: <a href="https://joplinapp.org/help/about/changelog/desktop">https://joplinapp.org/help/about/changelog/desktop</a></li>
<li>Android: <a href="https://joplinapp.org/help/about/changelog/android/">https://joplinapp.org/help/about/changelog/android/</a></li>
<li>iOS: <a href="https://joplinapp.org/help/about/changelog/ios/">https://joplinapp.org/help/about/changelog/ios/</a></li>
</ul>
]]></description><link>https://joplinapp.org/news/20231204-release-2-13</link><guid isPermaLink="false">20231204-release-2-13</guid><pubDate>Mon, 04 Dec 2023 00:00:00 GMT</pubDate><twitter-text>What&apos;s new in Joplin 2.13</twitter-text></item><item><title><![CDATA[Working in the shadows with white-hat hackers]]></title><description><![CDATA[<p>The majority of Joplin's development is carried out in the public domain. This includes the discussion of issues on GitHub, as well as the submission of pull requests and related discussions. The transparency of these processes allows for collaborative problem-solving and shared insights.</p>
<p>However, there is one aspect that operates behind closed doors, and for good reason: addressing cybersecurity vulnerabilities. It is imperative that these issues remain undisclosed until they have been resolved. Once a solution is implemented, it is usually accompanied by discreet commits and a message in the changelog to signify the progress made.</p>
<p>Typically, the process begins with an email from a security researcher. They provide valuable insights, such as a specially crafted note that triggers a bug, or an API call, along with an explanation of how the application's security can be circumvented. We examine the vulnerability, create a fix, and create automated test units to prevent any accidental reintroduction of the vulnerability in future code updates. An example of such a commit is: <a href="https://github.com/laurent22/joplin/commit/9e90d9016daf79b5414646a93fd369aedb035071">9e90d9016daf79b5414646a93fd369aedb035071</a></p>
<p>We then share our fix with the researcher for validation. Additionally, we often apply the fix to previous versions of Joplin, depending on the severity of the vulnerability.</p>
@@ -306,38 +364,4 @@
<h2>Plugin API improvements<a name="plugin-api-improvements" href="#plugin-api-improvements" class="heading-anchor">🔗</a></h2>
<p>This version also includes a number of improvements to the plugin API, in particular it is now easier to customise the editor context menu from a plugin and dynamically add items to it depending on the context. For example, with the Rich Markdown plugin it will be possible to right-click on an image and open it, or copy it to the clipboard.</p>
<p>A few additional functions have also been added to make plugin development simpler - in particular a command to open any item, whether it's a notebook, note, tag or attachement; and functions to work with attachements, in particular to reveal an attachement in the system file explorer, and to track changes to an attachement.</p>
]]></description><link>https://joplinapp.org/news/20220224-release-2-7</link><guid isPermaLink="false">20220224-release-2-7</guid><pubDate>Thu, 24 Feb 2022 00:00:00 GMT</pubDate><twitter-text></twitter-text></item><item><title><![CDATA[Automatic deletion of disabled accounts on Joplin Cloud]]></title><description><![CDATA[<p>As of 15 Feb 2022, disabled accounts on Joplin Cloud will be automatically deleted after 90 days. A disabled account is one where the Stripe subscription has been cancelled either by the user or automatically (eg for unpaid invoices).</p>
<p>Although it is an automated system, I will manually verify each account that's queued for deletion over the next few days for additional safety (for now everything's working as expected).</p>
<p>When an account is queued for deletion, all notes, notebooks, tags, etc are removed from the system within 2 days, and permanently deleted within 7 days. User information, in particular email and full name will be removed from the system within 2 days, but archived for an additional 90 days for legal reasons, after which they will be deleted too.</p>
]]></description><link>https://joplinapp.org/news/20220215-142000</link><guid isPermaLink="false">20220215-142000</guid><pubDate>Tue, 15 Feb 2022 00:00:00 GMT</pubDate><twitter-text></twitter-text></item><item><title><![CDATA[Joplin 2.6 is available!]]></title><description><![CDATA[<p>Many changes in this new release, available on mobile, desktop and CLI:</p>
<p><strong>Per-notebook sort order and sort buttons</strong></p>
<p>This new feature adds a number of changes to the way notes are sorted. The most visible one is the addition of a sort button above the note list - it allows sorting by modification date, creation date, title or by custom order, in either ascending or descending order:</p>
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20211217-120324_0.png" alt=""></p>
<p>By default, this sort order is going to apply to all notebooks, however you can now also assign a per-notebook sort order. In this case, any sort order will be apply to that notebook only. To enable this behaviour, simply right-click on a notebook and select &quot;Toggle own sort order&quot;:</p>
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20211217-120324_1.png" alt=""></p>
<p>Thanks to Kenichi Kobayashi for developing this feature!</p>
<p><strong>Support for notebook icons</strong></p>
<p>It is now possible to associate icons with notebooks no both the desktop and mobile applications. To do so, right-click on a notebook and selected &quot;Edit&quot;.</p>
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20211217-120324_2.png" alt=""></p>
<p>This will open the new notebook dialog from which can change the title and assign an icon. For now the icons are emojis but perhaps custom icons could be supported later on.</p>
<p><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/news/20211217-120324_3.png" alt=""></p>
<p><strong>Allow collaborating on encrypted notebooks using Joplin Cloud</strong></p>
<p>Thanks to the encryption improvements in the previous Joplin versions it is now possible to share and collaborated on encrypted notebooks, when synchronising with Joplin Cloud (or Joplin Server).</p>
<p>To get this working, you and the recipient will need to have Joplin 2.6 and the person who shares will need to have encryption enabled. After that most of the process is handled automatically by the apps - in particular it will automatically generate and share the required encryption keys for each users.</p>
<p><strong>Improved synchronisation startup speed</strong></p>
<p>Synchronisation is also a bit faster in this release due to an optimisation on the startup process. When syncing, the app needs to acquire a lock, which may be time consuming since it requires making multiple requests. This has now been optimised so that less requests are necessary and also each request consumes less resources. This will have a postive impact on Joplin Cloud in particular, but you should also see improvements with Joplin Server and smaller improvements with the other sync targets.</p>
<p><strong>Improved Markdown editor split view scrolling</strong></p>
<p>Kenichi Kobayashi made some great improvements to the Markdown editor scrolling in this release. The issue before was that the editor on the left and the viewer on the right would often not be in sync, in particular if the note contains several images and other media.</p>
<p>With Kenichi's change the editor and viewer stay nicely in sync, regardless of the note content. In fact it looks a bit like magic when you scroll through large notes - notice in particular how each side appear to wait for the other or speed up in order to make sure both sides are aligned as well possible. Kenichi provides a nice technical documentation about the feature <a href="https://github.com/laurent22/joplin/pull/5512#issuecomment-931277022">here</a>.</p>
<p><a href="https://www.youtube.com/watch?v=Wbs5XZR0oeU">https://www.youtube.com/watch?v=Wbs5XZR0oeU</a></p>
<p><strong>Improved and optimised S3 synchronisation</strong></p>
<p>Thanks to the efforts of Lee Matos, synchronisation with S3 is now more reliable and errors are also better handled. The underlying S3 SDK has also been upgraded from v2 to v3 which results in a smaller executable size (about 3-5 MB depending on the operating system)</p>
<p><strong>Export notes as self-contained HTML files</strong></p>
<p>Exporting a single note as HTML is now more user friendly as all images, scripts, styles and other attachments are all packed into a single HTML file (Previously it would create multiples files and directories). This makes it easier to share the complete note with someone who doesn't have Joplin.</p>
<p><strong>Other changes and bug fixes</strong></p>
<p>This release includes a total of 19 new features and improvements and 16 bug fixes. See the 2.6.x changelogs for more details:</p>
<p><a href="https://joplinapp.org/help/about/changelog/desktop">https://joplinapp.org/help/about/changelog/desktop</a></p>
<p><a href="https://joplinapp.org/help/about/changelog/android/">https://joplinapp.org/help/about/changelog/android/</a></p>
<p><a href="https://joplinapp.org/help/about/changelog/ios/">https://joplinapp.org/help/about/changelog/ios/</a></p>
<p><a href="https://joplinapp.org/help/about/changelog/cli/">https://joplinapp.org/help/about/changelog/cli/</a></p>
]]></description><link>https://joplinapp.org/news/20211217-120324</link><guid isPermaLink="false">20211217-120324</guid><pubDate>Fri, 17 Dec 2021 12:03:24 GMT</pubDate><twitter-text></twitter-text></item></channel></rss>
]]></description><link>https://joplinapp.org/news/20220224-release-2-7</link><guid isPermaLink="false">20220224-release-2-7</guid><pubDate>Thu, 24 Feb 2022 00:00:00 GMT</pubDate><twitter-text></twitter-text></item></channel></rss>

View File

@@ -205,9 +205,16 @@ if command -v lsb_release &> /dev/null; then
# Check for "The SUID sandbox helper binary was found, but is not configured correctly" problem.
# It is present in Debian 1X. A (temporary) patch will be applied at .desktop file
# Linux Mint 4 Debbie is based on Debian 10 and requires the same param handling.
if [[ $DISTVER =~ Debian1. ]] || [ "$DISTVER" = "Linuxmint4" ] && [ "$DISTCODENAME" = "debbie" ] || [ "$DISTVER" = "CentOS" ] && [[ "$DISTMAJOR" =~ 6|7 ]]
#
# This also works around Ubuntu 23.10+'s restrictions on unprivileged user namespaces. Electron
# uses these to sandbox processes. Unfortunately, it doesn't look like we can get around this
# without writing the AppImage to a non-user-writable location (without invalidating other security
# controls). See https://discourse.joplinapp.org/t/possible-future-requirement-for-no-sandbox-flag-for-ubuntu-23-10/.
if [[ $DISTVER = "Ubuntu23.10" || $DISTVER =~ Debian1. || ( "$DISTVER" = "Linuxmint4" && "$DISTCODENAME" = "debbie" ) || ( "$DISTVER" = "CentOS" && "$DISTMAJOR" =~ 6|7 ) ]]
then
SANDBOXPARAM="--no-sandbox"
print "${COLOR_YELLOW}WARNING${COLOR_RESET} Electron sandboxing disabled."
print " See https://discourse.joplinapp.org/t/32160/5 for details."
fi
fi

View File

@@ -26,12 +26,12 @@ For more information about the applications, see the [full Joplin documentation]
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 standard.
Please see the [donation page](https://github.com/laurent22/joplin/blob/dev/readme/about/donate.md) for information on how to support the development of Joplin.
Please see the [donation page](https://github.com/laurent22/joplin/blob/dev/readme/donate.md) for information on how to support the development of Joplin.
# Sponsors
<!-- SPONSORS-ORG -->
<a href="https://seirei.ne.jp"><img title="Serei Network" width="256" src="https://joplinapp.org/images/sponsors/SeireiNetwork.png"/></a> <a href="https://www.hosting.de/nextcloud/?mtm_campaign=managed-nextcloud&amp;mtm_kwd=joplinapp&amp;mtm_source=joplinapp-webseite&amp;mtm_medium=banner"><img title="Hosting.de" width="256" src="https://joplinapp.org/images/sponsors/HostingDe.png"/></a> <a href="https://residence-greece.com/"><img title="Greece Golden Visa" width="256" src="https://joplinapp.org/images/sponsors/ResidenceGreece.jpg"/></a> <a href="https://grundstueckspreise.info/"><img title="SP Software GmbH" width="256" src="https://joplinapp.org/images/sponsors/Grundstueckspreise.png"/></a> <a href="https://tranio.com/spain/"><img title="Property for sale in Spain" width="256" src="https://joplinapp.org/images/sponsors/TranioOverseasProperty.jpg"/></a> <a href="https://citricsheep.com"><img title="Citric Sheep" width="256" src="https://joplinapp.org/images/sponsors/CitricSheep.png"/></a>
<a href="https://seirei.ne.jp"><img title="Serei Network" width="256" src="https://joplinapp.org/images/sponsors/SeireiNetwork.png"/></a> <a href="https://www.hosting.de/nextcloud/?mtm_campaign=managed-nextcloud&amp;mtm_kwd=joplinapp&amp;mtm_source=joplinapp-webseite&amp;mtm_medium=banner"><img title="Hosting.de" width="256" src="https://joplinapp.org/images/sponsors/HostingDe.png"/></a> <a href="https://residence-greece.com/"><img title="Greece Golden Visa" width="256" src="https://joplinapp.org/images/sponsors/ResidenceGreece.jpg"/></a> <a href="https://grundstueckspreise.info/"><img title="SP Software GmbH" width="256" src="https://joplinapp.org/images/sponsors/Grundstueckspreise.png"/></a> <a href="https://tranio.com/spain/"><img title="Property for sale in Spain" width="256" src="https://joplinapp.org/images/sponsors/TranioOverseasProperty.jpg"/></a> <a href="https://citricsheep.com"><img title="Citric Sheep" width="256" src="https://joplinapp.org/images/sponsors/CitricSheep.png"/></a> <a href="https://sorted.travel/?utm_source=joplinapp "><img title="Sorted Travel" width="256" src="https://joplinapp.org/images/sponsors/SortedTravel.png"/></a>
<!-- SPONSORS-ORG -->
* * *
@@ -42,8 +42,8 @@ Please see the [donation page](https://github.com/laurent22/joplin/blob/dev/read
| <img width="50" src="https://avatars2.githubusercontent.com/u/215668?s=96&v=4"/></br>[avanderberg](https://github.com/avanderberg) | <img width="50" src="https://avatars2.githubusercontent.com/u/67130?s=96&v=4"/></br>[chr15m](https://github.com/chr15m) | <img width="50" src="https://avatars2.githubusercontent.com/u/2793530?s=96&v=4"/></br>[CyberXZT](https://github.com/CyberXZT) | <img width="50" src="https://avatars2.githubusercontent.com/u/1307332?s=96&v=4"/></br>[dbrandonjohnson](https://github.com/dbrandonjohnson) |
| <img width="50" src="https://avatars2.githubusercontent.com/u/14873877?s=96&v=4"/></br>[dchecks](https://github.com/dchecks) | <img width="50" src="https://avatars2.githubusercontent.com/u/56287?s=96&v=4"/></br>[fats](https://github.com/fats) | <img width="50" src="https://avatars2.githubusercontent.com/u/8030470?s=96&v=4"/></br>[Galliver7](https://github.com/Galliver7) | <img width="50" src="https://avatars2.githubusercontent.com/u/64712218?s=96&v=4"/></br>[Hegghammer](https://github.com/Hegghammer) |
| <img width="50" src="https://avatars2.githubusercontent.com/u/1310474?s=96&v=4"/></br>[jknowles](https://github.com/jknowles) | <img width="50" src="https://avatars2.githubusercontent.com/u/11947658?s=96&v=4"/></br>[KentBrockman](https://github.com/KentBrockman) | <img width="50" src="https://avatars2.githubusercontent.com/u/24908652?s=96&v=4"/></br>[konishi-t](https://github.com/konishi-t) | <img width="50" src="https://avatars2.githubusercontent.com/u/42319182?s=96&v=4"/></br>[marcdw1289](https://github.com/marcdw1289) |
| <img width="50" src="https://avatars2.githubusercontent.com/u/126279083?s=96&v=4"/></br>[matmoly](https://github.com/matmoly) | <img width="50" src="https://avatars2.githubusercontent.com/u/1788010?s=96&v=4"/></br>[maxtruxa](https://github.com/maxtruxa) | <img width="50" src="https://avatars2.githubusercontent.com/u/31054972?s=96&v=4"/></br>[saarantras](https://github.com/saarantras) | <img width="50" src="https://avatars2.githubusercontent.com/u/327998?s=96&v=4"/></br>[sif](https://github.com/sif) |
| <img width="50" src="https://avatars2.githubusercontent.com/u/765564?s=96&v=4"/></br>[taskcruncher](https://github.com/taskcruncher) | <img width="50" src="https://avatars2.githubusercontent.com/u/333944?s=96&v=4"/></br>[tateisu](https://github.com/tateisu) | | |
| <img width="50" src="https://avatars2.githubusercontent.com/u/126279083?s=96&v=4"/></br>[matmoly](https://github.com/matmoly) | <img width="50" src="https://avatars2.githubusercontent.com/u/1788010?s=96&v=4"/></br>[maxtruxa](https://github.com/maxtruxa) | <img width="50" src="https://avatars2.githubusercontent.com/u/4560672?s=96&v=4"/></br>[mu88](https://github.com/mu88) | <img width="50" src="https://avatars2.githubusercontent.com/u/31054972?s=96&v=4"/></br>[saarantras](https://github.com/saarantras) |
| <img width="50" src="https://avatars2.githubusercontent.com/u/327998?s=96&v=4"/></br>[sif](https://github.com/sif) | <img width="50" src="https://avatars2.githubusercontent.com/u/765564?s=96&v=4"/></br>[taskcruncher](https://github.com/taskcruncher) | <img width="50" src="https://avatars2.githubusercontent.com/u/333944?s=96&v=4"/></br>[tateisu](https://github.com/tateisu) | |
<!-- SPONSORS-GITHUB -->
# Community

View File

@@ -6,7 +6,7 @@ version: '3'
services:
db:
image: postgres:15
image: postgres:16
command: postgres -c work_mem=100000
ports:
- "5432:5432"

View File

@@ -18,7 +18,7 @@ services:
- POSTGRES_PORT=5432
- POSTGRES_HOST=localhost
db:
image: postgres:15
image: postgres:16
ports:
- "5432:5432"
environment:

View File

@@ -19,7 +19,7 @@ version: '3'
services:
db:
image: postgres:15
image: postgres:16
volumes:
- ./data/postgres:/var/lib/postgresql/data
ports:

16
jest.base-setup.js Normal file
View File

@@ -0,0 +1,16 @@
/* eslint-disable jest/require-top-level-describe */
module.exports = () => {
// Disable the additional information that Jest adds to each console
// statement. It's rarely needed and if it is it can be commented out here.
const jestConsole = console;
beforeEach(() => {
global.console = require('console');
});
afterEach(() => {
global.console = jestConsole;
});
};

View File

@@ -367,6 +367,12 @@
"type": "shell",
"command": "cd ${workspaceFolder}/packages/server && yarn tsc",
"group": "build",
},
{
"label": "transpile-lib",
"type": "shell",
"command": "cd ${workspaceFolder}/packages/lib && yarn tsc",
"group": "build",
}
]
},
@@ -395,6 +401,19 @@
"APP_BASE_URL": "http://joplincloud.local:22300",
"API_BASE_URL": "http://api.joplincloud.local:22300",
}
},
{
"type": "node",
"request": "launch",
"name": "lib: debug test file",
"preLaunchTask": "transpile-lib",
"program": "${workspaceFolder}/packages/lib/node_modules/.bin/jest",
"args": [
"${fileBasenameNoExtension}",
"--config",
"packages/lib/jest.config.js",
],
"console": "integratedTerminal",
}
]
}

View File

@@ -13,7 +13,7 @@
},
"scripts": {
"buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md",
"buildCommandIndex": "node packages/tools/gulp/tasks/buildCommandIndexRun.js",
"buildScriptIndexes": "node packages/tools/gulp/tasks/buildScriptIndexesRun.js",
"buildParallel": "yarn workspaces foreach --verbose --interlaced --parallel --jobs 2 --topological run build && yarn run tsc",
"buildPluginDoc": "cd packages/generate-plugin-doc && yarn run buildPluginDoc_",
"buildSequential": "yarn workspaces foreach --verbose --interlaced --topological run build && yarn run tsc",
@@ -31,7 +31,7 @@
"crowdinUpload": "crowdin upload",
"cspell": "cspell",
"dependencyTree": "madge",
"generateDatabaseTypes": "node packages/tools/generate-database-types",
"generateTypes": "node packages/tools/generate-database-types",
"linkChecker": "linkchecker https://joplinapp.org/ && linkchecker --check-extern https://joplinapp.org/api/references/plugin_api/classes/joplin.html",
"linter-ci": "eslint --resolve-plugins-relative-to . --quiet --ext .js --ext .jsx --ext .ts --ext .tsx",
"linter-interactive": "eslint-interactive --resolve-plugins-relative-to . --fix --quiet --ext .js --ext .jsx --ext .ts --ext .tsx",
@@ -72,13 +72,13 @@
"@crowdin/cli": "3",
"@joplin/utils": "~2.12",
"@seiyab/eslint-plugin-react-hooks": "4.5.1-beta.0",
"@typescript-eslint/eslint-plugin": "6.7.2",
"@typescript-eslint/parser": "6.7.2",
"@typescript-eslint/eslint-plugin": "6.8.0",
"@typescript-eslint/parser": "6.8.0",
"cspell": "5.21.2",
"eslint": "8.49.0",
"eslint": "8.52.0",
"eslint-interactive": "10.8.0",
"eslint-plugin-import": "2.28.1",
"eslint-plugin-jest": "27.4.0",
"eslint-plugin-jest": "27.4.3",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-react": "7.33.2",
"execa": "5.1.1",
@@ -89,22 +89,24 @@
"lerna": "3.22.1",
"lint-staged": "14.0.1",
"madge": "6.1.0",
"npm-package-json-lint": "7.0.0",
"npm-package-json-lint": "7.1.0",
"typescript": "5.2.2"
},
"dependencies": {
"@types/fs-extra": "11.0.3",
"eslint-plugin-github": "4.10.0",
"@types/fs-extra": "11.0.4",
"eslint-plugin-github": "4.10.1",
"http-server": "14.1.1",
"node-gyp": "9.4.0",
"nodemon": "3.0.1"
"node-gyp": "9.4.1",
"nodemon": "3.0.2"
},
"packageManager": "yarn@3.6.4",
"resolutions": {
"react-native-camera@4.2.1": "patch:react-native-camera@npm%3A4.2.1#./.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch",
"react-native-vosk@0.1.12": "patch:react-native-vosk@npm%3A0.1.12#./.yarn/patches/react-native-vosk-npm-0.1.12-76b1caaae8.patch",
"eslint": "patch:eslint@8.49.0#./.yarn/patches/eslint-npm-8.39.0-d92bace04d.patch",
"eslint": "patch:eslint@8.52.0#./.yarn/patches/eslint-npm-8.39.0-d92bace04d.patch",
"app-builder-lib@24.4.0": "patch:app-builder-lib@npm%3A24.4.0#./.yarn/patches/app-builder-lib-npm-24.4.0-05322ff057.patch",
"react-native@0.71.10": "patch:react-native@npm%3A0.71.10#./.yarn/patches/react-native-animation-fix/react-native-npm-0.71.10-f9c32562d8.patch"
"react-native@0.71.10": "patch:react-native@npm%3A0.71.10#./.yarn/patches/react-native-animation-fix/react-native-npm-0.71.10-f9c32562d8.patch",
"nanoid": "patch:nanoid@npm%3A3.3.7#./.yarn/patches/nanoid-npm-3.3.7-98824ba130.patch",
"pdfjs-dist": "patch:pdfjs-dist@npm%3A3.11.174#./.yarn/patches/pdfjs-dist-npm-3.11.174-67f2fee6d6.patch"
}
}

View File

@@ -1,33 +1,34 @@
const BaseCommand = require('./base-command').default;
const BaseItem = require('@joplin/lib/models/BaseItem').default;
const BaseModel = require('@joplin/lib/BaseModel').default;
import BaseCommand from './base-command';
import BaseItem from '@joplin/lib/models/BaseItem';
import BaseModel from '@joplin/lib/BaseModel';
const { toTitleCase } = require('@joplin/lib/string-utils.js');
const { reg } = require('@joplin/lib/registry.js');
const markdownUtils = require('@joplin/lib/markdownUtils').default;
const Database = require('@joplin/lib/database').default;
const shim = require('@joplin/lib/shim').default;
import { reg } from '@joplin/lib/registry.js';
import markdownUtils, { MarkdownTableRow } from '@joplin/lib/markdownUtils';
import Database from '@joplin/lib/database';
import shim from '@joplin/lib/shim';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'apidoc <file>';
}
description() {
public override description() {
return 'Build the API doc';
}
enabled() {
public override enabled() {
return false;
}
createPropertiesTable(tableFields) {
private createPropertiesTable(tableFields: MarkdownTableRow[]) {
const headers = [
{ name: 'name', label: 'Name' },
{
name: 'type',
label: 'Type',
filter: value => {
return Database.enumName('fieldType', value);
filter: (value: string|number) => {
const valueAsNumber = typeof value === 'number' ? value : parseInt(value, 10);
return Database.enumName('fieldType', valueAsNumber);
},
},
{ name: 'description', label: 'Description' },
@@ -36,7 +37,7 @@ class Command extends BaseCommand {
return markdownUtils.createMarkdownTable(headers, tableFields);
}
async action(args) {
public override async action(args: any) {
const models = [
{
type: BaseModel.TYPE_NOTE,

View File

@@ -1,19 +1,19 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
const BaseModel = require('@joplin/lib/BaseModel').default;
const shim = require('@joplin/lib/shim').default;
import { _ } from '@joplin/lib/locale';
import BaseModel from '@joplin/lib/BaseModel';
import shim from '@joplin/lib/shim';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'attach <note> <file>';
}
description() {
public override description() {
return _('Attaches the given file to the note.');
}
async action(args) {
public override async action(args: any) {
const title = args['note'];
const note = await app().loadItem(BaseModel.TYPE_NOTE, title, { parent: app().currentFolder() });

View File

@@ -1,24 +1,24 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
const BaseModel = require('@joplin/lib/BaseModel').default;
const BaseItem = require('@joplin/lib/models/BaseItem').default;
const Note = require('@joplin/lib/models/Note').default;
import { _ } from '@joplin/lib/locale';
import BaseModel from '@joplin/lib/BaseModel';
import BaseItem from '@joplin/lib/models/BaseItem';
import Note from '@joplin/lib/models/Note';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'cat <note>';
}
description() {
public override description() {
return _('Displays the given note.');
}
options() {
public override options() {
return [['-v, --verbose', _('Displays the complete information about note.')]];
}
async action(args) {
public override async action(args: any) {
const title = args['note'];
const item = await app().loadItem(BaseModel.TYPE_NOTE, title, { parent: app().currentFolder() });

View File

@@ -1,19 +1,20 @@
const BaseCommand = require('./base-command').default;
const { _, setLocale } = require('@joplin/lib/locale');
import BaseCommand from './base-command';
import { _, setLocale } from '@joplin/lib/locale';
const { app } = require('./app.js');
const fs = require('fs-extra');
const Setting = require('@joplin/lib/models/Setting').default;
import * as fs from 'fs-extra';
import Setting, { AppType } from '@joplin/lib/models/Setting';
import { ReadStream } from 'tty';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'config [name] [value]';
}
description() {
public override description() {
return _('Gets or sets a config value. If [value] is not provided, it will show the value of [name]. If neither [name] nor [value] is provided, it will list the current configuration.');
}
options() {
public override options() {
return [
['-v, --verbose', _('Also displays unset and hidden config variables.')],
['--export', 'Writes all settings to STDOUT as JSON including secure variables.'],
@@ -21,11 +22,12 @@ class Command extends BaseCommand {
['--import-file <file>', 'Reads in settings from <file>. <file> must contain valid JSON.'],
];
}
async __importSettings(inputStream) {
return new Promise((resolve, reject) => {
private async __importSettings(inputStream: ReadStream|fs.ReadStream) {
return new Promise<void>((resolve, reject) => {
// being defensive and not attempting to settle twice
let isSettled = false;
const chunks = [];
const chunks: any = [];
inputStream.on('readable', () => {
let chunk;
@@ -64,13 +66,14 @@ class Command extends BaseCommand {
});
});
}
async action(args) {
public override async action(args: any) {
const verbose = args.options.verbose;
const isExport = args.options.export;
const isImport = args.options.import || args.options.importFile;
const importFile = args.options.importFile;
const renderKeyValue = name => {
const renderKeyValue = (name: string) => {
const md = Setting.settingMetadata(name);
let value = Setting.value(name);
if (typeof value === 'object' || Array.isArray(value)) value = JSON.stringify(value);
@@ -84,11 +87,11 @@ class Command extends BaseCommand {
};
if (isExport || (!isImport && !args.value)) {
const keys = Setting.keys(!verbose, 'cli');
const keys = Setting.keys(!verbose, AppType.Cli);
keys.sort();
if (isExport) {
const resultObj = keys.reduce((acc, key) => {
const resultObj = keys.reduce<Record<string, any>>((acc, key) => {
const value = Setting.value(key);
if (!verbose && !value) return acc;
acc[key] = value;
@@ -113,7 +116,7 @@ class Command extends BaseCommand {
}
if (isImport) {
let fileStream = process.stdin;
let fileStream: ReadStream|fs.ReadStream = process.stdin;
if (importFile) {
fileStream = fs.createReadStream(importFile, { autoClose: true });
}

View File

@@ -1,19 +1,19 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
const BaseModel = require('@joplin/lib/BaseModel').default;
const Note = require('@joplin/lib/models/Note').default;
import { _ } from '@joplin/lib/locale';
import BaseModel from '@joplin/lib/BaseModel';
import Note from '@joplin/lib/models/Note';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'cp <note> [notebook]';
}
description() {
public override description() {
return _('Duplicates the notes matching <note> to [notebook]. If no notebook is specified the note is duplicated in the current notebook.');
}
async action(args) {
public override async action(args: any) {
let folder = null;
if (args['notebook']) {
folder = await app().loadItem(BaseModel.TYPE_FOLDER, args['notebook']);
@@ -28,7 +28,7 @@ class Command extends BaseCommand {
for (let i = 0; i < notes.length; i++) {
const newNote = await Note.copyToFolder(notes[i].id, folder.id);
Note.updateGeolocation(newNote.id);
void Note.updateGeolocation(newNote.id);
}
}
}

View File

@@ -1,20 +1,20 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
const BaseModel = require('@joplin/lib/BaseModel').default;
const Note = require('@joplin/lib/models/Note').default;
const time = require('@joplin/lib/time').default;
import { _ } from '@joplin/lib/locale';
import BaseModel from '@joplin/lib/BaseModel';
import Note from '@joplin/lib/models/Note';
import time from '@joplin/lib/time';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'done <note>';
}
description() {
public override description() {
return _('Marks a to-do as done.');
}
static async handleAction(commandInstance, args, isCompleted) {
public static async handleAction(commandInstance: BaseCommand, args: any, isCompleted: boolean) {
const note = await app().loadItem(BaseModel.TYPE_NOTE, args.note);
commandInstance.encryptionCheck(note);
if (!note) throw new Error(_('Cannot find "%s".', args.note));
@@ -30,7 +30,7 @@ class Command extends BaseCommand {
});
}
async action(args) {
public override async action(args: any) {
await Command.handleAction(this, args, true);
}
}

View File

@@ -1,22 +1,22 @@
const BaseCommand = require('./base-command').default;
const Folder = require('@joplin/lib/models/Folder').default;
const Note = require('@joplin/lib/models/Note').default;
const Tag = require('@joplin/lib/models/Tag').default;
import BaseCommand from './base-command';
import Folder from '@joplin/lib/models/Folder';
import Note from '@joplin/lib/models/Note';
import Tag from '@joplin/lib/models/Tag';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'dump';
}
description() {
public override description() {
return 'Dumps the complete database as JSON.';
}
hidden() {
public override hidden() {
return true;
}
async action() {
public override async action() {
let items = [];
const folders = await Folder.all();
for (let i = 0; i < folders.length; i++) {

View File

@@ -1,24 +1,24 @@
const fs = require('fs-extra');
const BaseCommand = require('./base-command').default;
const { splitCommandString } = require('@joplin/utils');
const uuid = require('@joplin/lib/uuid').default;
import * as fs from 'fs-extra';
import BaseCommand from './base-command';
import { splitCommandString } from '@joplin/utils';
import uuid from '@joplin/lib/uuid';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
const Note = require('@joplin/lib/models/Note').default;
const Setting = require('@joplin/lib/models/Setting').default;
const BaseModel = require('@joplin/lib/BaseModel').default;
import { _ } from '@joplin/lib/locale';
import Note from '@joplin/lib/models/Note';
import Setting from '@joplin/lib/models/Setting';
import BaseModel from '@joplin/lib/BaseModel';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'edit <note>';
}
description() {
public override description() {
return _('Edit note.');
}
async action(args) {
let tempFilePath = null;
public override async action(args: any) {
let tempFilePath: string|null = null;
const onFinishedEditing = async () => {
if (tempFilePath) fs.removeSync(tempFilePath);

View File

@@ -1,21 +1,21 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
import { _ } from '@joplin/lib/locale';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'exit';
}
description() {
public override description() {
return _('Exits the application.');
}
compatibleUis() {
public override compatibleUis() {
return ['gui'];
}
async action() {
public override async action() {
await app().exit();
}
}

View File

@@ -1,25 +1,25 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const Setting = require('@joplin/lib/models/Setting').default;
const ReportService = require('@joplin/lib/services/ReportService').default;
const fs = require('fs-extra');
import Setting from '@joplin/lib/models/Setting';
import ReportService from '@joplin/lib/services/ReportService';
import * as fs from 'fs-extra';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'export-sync-status';
}
description() {
public override description() {
return 'Export sync status';
}
hidden() {
public override hidden() {
return true;
}
async action() {
public override async action() {
const service = new ReportService();
const csv = await service.basicItemList({ format: 'csv' });
const csv = await service.basicItemList({ format: 'csv' }) as string;
const filePath = `${Setting.value('profileDir')}/syncReport-${new Date().getTime()}.csv`;
await fs.writeFileSync(filePath, csv);
this.stdout(`Sync status exported to ${filePath}`);

View File

@@ -1,19 +1,20 @@
const BaseCommand = require('./base-command').default;
const InteropService = require('@joplin/lib/services/interop/InteropService').default;
const BaseModel = require('@joplin/lib/BaseModel').default;
import BaseCommand from './base-command';
import InteropService from '@joplin/lib/services/interop/InteropService';
import BaseModel from '@joplin/lib/BaseModel';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
import { _ } from '@joplin/lib/locale';
import { ExportOptions } from '@joplin/lib/services/interop/types';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'export <path>';
}
description() {
public override description() {
return _('Exports Joplin data to the given path. By default, it will export the complete database including notebooks, notes, tags and resources.');
}
options() {
public override options() {
const service = InteropService.instance();
const formats = service
.modules()
@@ -23,8 +24,8 @@ class Command extends BaseCommand {
return [['--format <format>', _('Destination format: %s', formats.join(', '))], ['--note <note>', _('Exports only the given note.')], ['--notebook <notebook>', _('Exports only the given notebook.')]];
}
async action(args) {
const exportOptions = {};
public override async action(args: any) {
const exportOptions: ExportOptions = {};
exportOptions.path = args.path;
exportOptions.format = args.options.format ? args.options.format : 'jex';
@@ -34,11 +35,11 @@ class Command extends BaseCommand {
if (args.options.note) {
const notes = await app().loadItems(BaseModel.TYPE_NOTE, args.options.note, { parent: app().currentFolder() });
if (!notes.length) throw new Error(_('Cannot find "%s".', args.options.note));
exportOptions.sourceNoteIds = notes.map(n => n.id);
exportOptions.sourceNoteIds = notes.map((n: any) => n.id);
} else if (args.options.notebook) {
const folders = await app().loadItems(BaseModel.TYPE_FOLDER, args.options.notebook);
if (!folders.length) throw new Error(_('Cannot find "%s".', args.options.notebook));
exportOptions.sourceFolderIds = folders.map(n => n.id);
exportOptions.sourceFolderIds = folders.map((n: any) => n.id);
}
const service = InteropService.instance();

View File

@@ -1,19 +1,19 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
const BaseModel = require('@joplin/lib/BaseModel').default;
const Note = require('@joplin/lib/models/Note').default;
import { _ } from '@joplin/lib/locale';
import BaseModel from '@joplin/lib/BaseModel';
import Note from '@joplin/lib/models/Note';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'geoloc <note>';
}
description() {
public override description() {
return _('Displays a geolocation URL for the note.');
}
async action(args) {
public override async action(args: any) {
const title = args['note'];
const item = await app().loadItem(BaseModel.TYPE_NOTE, title, { parent: app().currentFolder() });

View File

@@ -1,19 +1,19 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const { renderCommandHelp } = require('./help-utils.js');
const { _ } = require('@joplin/lib/locale');
import { _ } from '@joplin/lib/locale';
const { cliUtils } = require('./cli-utils.js');
class Command extends BaseCommand {
usage() {
public override usage() {
return 'help [command]';
}
description() {
public override description() {
return _('Displays usage information.');
}
allCommands() {
private allCommands() {
const commands = app().commands(app().uiType());
const output = [];
for (const n in commands) {
@@ -29,7 +29,7 @@ class Command extends BaseCommand {
return output;
}
async action(args) {
public override async action(args: any) {
const stdoutWidth = app().commandStdoutMaxWidth();
if (args.command === 'shortcuts' || args.command === 'keymap') {
@@ -52,7 +52,7 @@ class Command extends BaseCommand {
for (let i = 0; i < keymap.length; i++) {
const item = keymap[i];
const keys = item.keys.map(k => (k === ' ' ? '(SPACE)' : k));
const keys = item.keys.map((k: string) => (k === ' ' ? '(SPACE)' : k));
rows.push([keys.join(', '), item.command]);
}

View File

@@ -1,20 +1,21 @@
const BaseCommand = require('./base-command').default;
const InteropService = require('@joplin/lib/services/interop/InteropService').default;
const BaseModel = require('@joplin/lib/BaseModel').default;
import BaseCommand from './base-command';
import InteropService from '@joplin/lib/services/interop/InteropService';
import BaseModel from '@joplin/lib/BaseModel';
const { cliUtils } = require('./cli-utils.js');
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
import { _ } from '@joplin/lib/locale';
import { ImportOptions } from '@joplin/lib/services/interop/types';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'import <path> [notebook]';
}
description() {
public override description() {
return _('Imports data into Joplin.');
}
options() {
public override options() {
const service = InteropService.instance();
const formats = service
.modules()
@@ -28,12 +29,12 @@ class Command extends BaseCommand {
];
}
async action(args) {
public override async action(args: any) {
const folder = await app().loadItem(BaseModel.TYPE_FOLDER, args.notebook);
if (args.notebook && !folder) throw new Error(_('Cannot find "%s".', args.notebook));
const importOptions = {};
const importOptions: ImportOptions = {};
importOptions.path = args.path;
importOptions.format = args.options.format ? args.options.format : 'auto';
importOptions.destinationFolderId = folder ? folder.id : null;

View File

@@ -1,28 +1,28 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
const BaseModel = require('@joplin/lib/BaseModel').default;
const Folder = require('@joplin/lib/models/Folder').default;
const Setting = require('@joplin/lib/models/Setting').default;
const Note = require('@joplin/lib/models/Note').default;
import { _ } from '@joplin/lib/locale';
import BaseModel from '@joplin/lib/BaseModel';
import Folder from '@joplin/lib/models/Folder';
import Setting from '@joplin/lib/models/Setting';
import Note from '@joplin/lib/models/Note';
const { sprintf } = require('sprintf-js');
const time = require('@joplin/lib/time').default;
import time from '@joplin/lib/time';
const { cliUtils } = require('./cli-utils.js');
class Command extends BaseCommand {
usage() {
public override usage() {
return 'ls [note-pattern]';
}
description() {
public override description() {
return _('Displays the notes in the current notebook. Use `ls /` to display the list of notebooks.');
}
enabled() {
public override enabled() {
return true;
}
options() {
public override options() {
return [
['-n, --limit <num>', _('Displays only the first top <num> notes.')],
['-s, --sort <field>', _('Sorts the item by <field> (eg. title, updated_time, created_time).')],
@@ -33,12 +33,12 @@ class Command extends BaseCommand {
];
}
async action(args) {
public override async action(args: any) {
const pattern = args['note-pattern'];
let items = [];
const options = args.options;
const queryOptions = {};
const queryOptions: any = {};
if (options.limit) queryOptions.limit = options.limit;
if (options.sort) {
queryOptions.orderBy = options.sort;

View File

@@ -1,20 +1,20 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
const BaseModel = require('@joplin/lib/BaseModel').default;
const Folder = require('@joplin/lib/models/Folder').default;
const Note = require('@joplin/lib/models/Note').default;
import { _ } from '@joplin/lib/locale';
import BaseModel from '@joplin/lib/BaseModel';
import Folder from '@joplin/lib/models/Folder';
import Note from '@joplin/lib/models/Note';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'mv <item> [notebook]';
}
description() {
public override description() {
return _('Moves the given <item> to [notebook]');
}
async action(args) {
public override async action(args: any) {
const pattern = args['item'];
const destination = args['notebook'];
let folder = null;

View File

@@ -1,20 +1,20 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
const BaseModel = require('@joplin/lib/BaseModel').default;
const Folder = require('@joplin/lib/models/Folder').default;
const Note = require('@joplin/lib/models/Note').default;
import { _ } from '@joplin/lib/locale';
import BaseModel from '@joplin/lib/BaseModel';
import Folder from '@joplin/lib/models/Folder';
import Note from '@joplin/lib/models/Note';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'ren <item> <name>';
}
description() {
public override description() {
return _('Renames the given <item> (note or notebook) to <name>.');
}
async action(args) {
public override async action(args: any) {
const pattern = args['item'];
const name = args['name'];

View File

@@ -1,23 +1,23 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
const Folder = require('@joplin/lib/models/Folder').default;
const BaseModel = require('@joplin/lib/BaseModel').default;
import { _ } from '@joplin/lib/locale';
import Folder from '@joplin/lib/models/Folder';
import BaseModel from '@joplin/lib/BaseModel';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'rmbook <notebook>';
}
description() {
public override description() {
return _('Deletes the given notebook.');
}
options() {
public override options() {
return [['-f, --force', _('Deletes the notebook without asking for confirmation.')]];
}
async action(args) {
public override async action(args: any) {
const pattern = args['notebook'];
const force = args.options && args.options.force === true;

View File

@@ -1,23 +1,23 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
const Note = require('@joplin/lib/models/Note').default;
const BaseModel = require('@joplin/lib/BaseModel').default;
import { _ } from '@joplin/lib/locale';
import Note from '@joplin/lib/models/Note';
import BaseModel from '@joplin/lib/BaseModel';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'rmnote <note-pattern>';
}
description() {
public override description() {
return _('Deletes the notes matching <note-pattern>.');
}
options() {
public override options() {
return [['-f, --force', _('Deletes the notes without asking for confirmation.')]];
}
async action(args) {
public override async action(args: any) {
const pattern = args['note-pattern'];
const force = args.options && args.options.force === true;
@@ -26,7 +26,7 @@ class Command extends BaseCommand {
const ok = force ? true : await this.prompt(notes.length > 1 ? _('%d notes match this pattern. Delete them?', notes.length) : _('Delete note?'), { booleanAnswerDefault: 'n' });
if (!ok) return;
const ids = notes.map(n => n.id);
const ids = notes.map((n: any) => n.id);
await Note.batchDelete(ids);
}
}

View File

@@ -1,16 +1,16 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
const BaseModel = require('@joplin/lib/BaseModel').default;
const Database = require('@joplin/lib/database').default;
const Note = require('@joplin/lib/models/Note').default;
import { _ } from '@joplin/lib/locale';
import BaseModel from '@joplin/lib/BaseModel';
import Database from '@joplin/lib/database';
import Note from '@joplin/lib/models/Note';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'set <note> <name> [value]';
}
description() {
public override description() {
const fields = Note.fields();
const s = [];
for (let i = 0; i < fields.length; i++) {
@@ -22,7 +22,7 @@ class Command extends BaseCommand {
return _('Sets the property <name> of the given <note> to the given [value]. Possible properties are:\n\n%s', s.join(', '));
}
async action(args) {
public override async action(args: any) {
const title = args['note'];
const propName = args['name'];
let propValue = args['value'];
@@ -36,7 +36,7 @@ class Command extends BaseCommand {
const timestamp = Date.now();
const newNote = {
const newNote: any = {
id: notes[i].id,
type_: notes[i].type_,
updated_time: timestamp,

View File

@@ -1,22 +1,22 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { app } = require('./app.js');
const { _ } = require('@joplin/lib/locale');
const BaseModel = require('@joplin/lib/BaseModel').default;
import { _ } from '@joplin/lib/locale';
import BaseModel from '@joplin/lib/BaseModel';
class Command extends BaseCommand {
usage() {
public override usage() {
return 'use <notebook>';
}
description() {
public override description() {
return _('Switches to [notebook] - all further operations will happen within this notebook.');
}
compatibleUis() {
public override compatibleUis() {
return ['cli'];
}
async action(args) {
public override async action(args: any) {
const folder = await app().loadItem(BaseModel.TYPE_FOLDER, args['notebook']);
if (!folder) throw new Error(_('Cannot find "%s".', args['notebook']));
app().switchCurrentFolder(folder);

View File

@@ -1,17 +1,17 @@
const BaseCommand = require('./base-command').default;
import BaseCommand from './base-command';
const { _ } = require('@joplin/lib/locale');
const versionInfo = require('@joplin/lib/versionInfo').default;
class Command extends BaseCommand {
usage() {
public override usage() {
return 'version';
}
description() {
public override description() {
return _('Displays version information');
}
async action() {
public override async action() {
this.stdout(versionInfo(require('./package.json'), {}).message);
}
}

View File

@@ -3,6 +3,7 @@ const { shimInit } = require('@joplin/lib/shim-init-node.js');
const shim = require('@joplin/lib/shim').default;
const sharp = require('sharp');
const nodeSqlite = require('sqlite3');
require('../../jest.base-setup.js')();
let keytar;
try {

View File

@@ -35,15 +35,15 @@
],
"owner": "Laurent Cozic"
},
"version": "2.13.1",
"version": "2.14.0",
"bin": "./main.js",
"engines": {
"node": ">=10.0.0"
},
"dependencies": {
"@joplin/lib": "~2.13",
"@joplin/renderer": "~2.13",
"@joplin/utils": "~2.13",
"@joplin/lib": "~2.14",
"@joplin/renderer": "~2.14",
"@joplin/utils": "~2.14",
"aws-sdk": "2.1340.0",
"chalk": "4.1.2",
"compare-version": "0.1.2",
@@ -57,7 +57,7 @@
"proper-lockfile": "4.1.2",
"read-chunk": "2.1.0",
"server-destroy": "1.0.1",
"sharp": "0.32.6",
"sharp": "0.33.0",
"sprintf-js": "1.1.3",
"sqlite3": "5.1.6",
"string-padding": "1.0.2",
@@ -70,10 +70,10 @@
"yargs-parser": "21.1.1"
},
"devDependencies": {
"@joplin/tools": "~2.13",
"@types/fs-extra": "11.0.3",
"@types/jest": "29.5.5",
"@types/node": "18.18.6",
"@joplin/tools": "~2.14",
"@types/fs-extra": "11.0.4",
"@types/jest": "29.5.8",
"@types/node": "18.18.14",
"@types/proper-lockfile": "^4.1.2",
"gulp": "4.0.2",
"jest": "29.7.0",

View File

@@ -36,6 +36,14 @@ describe('HtmlToMd', () => {
htmlToMdOptions.preserveImageTagsWithSize = true;
}
if (htmlFilename.indexOf('preserve_nested_tables') === 0) {
htmlToMdOptions.preserveNestedTables = true;
}
if (htmlFilename.indexOf('text_color') === 0) {
htmlToMdOptions.preserveColorStyles = true;
}
const html = await readFile(htmlPath, 'utf8');
let expectedMd = await readFile(mdPath, 'utf8');

View File

@@ -291,4 +291,29 @@ describe('MdToHtml', () => {
expect(html.html).toContain(opening + trimmedTex + closing);
}
});
it('should render inline KaTeX after a numbered equation', async () => {
const mdToHtml = newTestMdToHtml();
// This test is intended to verify that inline KaTeX renders correctly
// after creating a numbered equation with \begin{align}...\end{align}.
//
// See https://github.com/laurent22/joplin/issues/9455 for details.
const markdown = [
'$$',
'\\begin{align}\\text{Block}\\end{align}',
'$$',
'',
'$\\text{Inline}$',
].join('\n');
const { html } = await mdToHtml.render(markdown, null, { bodyOnly: true });
// Because we don't control the output of KaTeX, this test should be as general as
// possible while still verifying that rendering (without an error) occurs.
// Should have rendered the inline and block content without errors
expect(html).toContain('Inline</span>');
expect(html).toContain('Block</span>');
});
});

View File

@@ -7,7 +7,7 @@
<en-note><div>Plain note</div></en-note>]]></content><created>20201223T163948Z</created><updated>20201223T163953Z</updated><note-attributes><author>laurent22777@gmail.com</author><source>desktop.win</source><source-application>evernote.win32</source-application></note-attributes></note><note><title>Note 2</title><content><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">
<en-note><div><div><br/></div><table style="border-collapse: collapse; min-width: 100%;"><colgroup><col style="width: 130px;"/><col style="width: 130px;"/><col style="width: 130px;"/></colgroup><tbody><tr<td style="width: 130px; padding: 8px; border: 1px solid;"><div>test</div></td><td style="width: 130px; padding: 8px; border: 1px solid;"><div>test</div></td><td style="width: 130px; padding: 8px; border: 1px solid;"><div><br/></div></td></tr><tr><td style="width: 130px; padding: 8px; border: 1px solid;"><div>bl</div></td><td style="width: 130px; padding: 8px; border: 1px solid;"><div>bla</div></td><td style="width: 130px; padding: 8px; border: 1px solid;"><div>bla</div></td></tr></tbody></table><div><br/></div></div><div><br/></div></en-note>]]></content><created>20201223T164010Z</created><updated>20201223T164023Z</updated><note-attributes><author>laurent22777@gmail.com</author><source>desktop.win</source><source-application>evernote.win32</source-application></note-attributes></note><note><title>plain note 2</title><content><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<en-note><div><div><br/></div><table style="border-collapse: collapse; min-width: 100%;"><colgroup><col style="width: 130px;"/><col style="width: 130px;"/><col style="width: 130px;"/></colgroup><tbody><tr<td style="width: 130px; padding: 8px; border: 1px solid;"><div>test</div></td><td style="width: 130px; padding: 8px; border: 1px solid;"><div>test</div></td><td style="width: 130px; padding: 8px; border: 1px solid;"><div><br/></div></td></tr><tr><td style="width: 130px; padding: 8px; border: 1px solid;"><div>bl</div></t><td style="width: 130px; padding: 8px; border: 1px solid;"><div>bla</div></td><td style="width: 130px; padding: 8px; border: 1px solid;"><div>bla</div></td></tr></tbody></table><div><br/></div></div><div><br/></div></en-note>]]></content><created>20201223T164010Z</created><updated>20201223T164023Z</updated><note-attributes><author>laurent22777@gmail.com</author><source>desktop.win</source><source-application>evernote.win32</source-application></note-attributes></note><note><title>plain note 2</title><content><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">
<en-note><div><br/></div></en-note>]]></content><created>20201223T164236Z</created><note-attributes><author>laurent22777@gmail.com</author><source>desktop.win</source><source-application>evernote.win32</source-application></note-attributes></note></en-export>

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export4.dtd">
<en-export export-date="20231224T151504Z" application="Evernote" version="10.68.2">
<note>
<title>Note 1</title>
<created>20160730T164129Z</created>
<updated>20231224T151443Z</updated>
<content>
<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><div><a href="evernote:///view/5223870/s49/9cd5e810-fa03-429a-8194-ab847f2f1ab2/c99d9e01-ca35-4c75-ba63-f0c0ef97787d/" rel="noopener noreferrer" rev="en_rl_none">Note 2</a><a href="evernote:///view/5223870/s49/9cd5e810-fa03-429a-8194-ab847f2f1ab2/c99d9e01-ca35-4c75-ba63-f0c0ef97787d/" rel="noopener noreferrer" rev="en_rl_none">Note 3</a></div></en-note> ]]>
</content>
</note>
<note>
<title>Note 2</title>
<created>20160730T111759Z</created>
<updated>20160730T111807Z</updated>
<content>
<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><div>Testing</div></en-note> ]]>
</content>
</note>
<note>
<title>Note 3</title>
<created>20160730T111759Z</created>
<updated>20160730T111807Z</updated>
<content>
<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><div><a href="evernote:///view/5223870/s49/9cd5e810-fa03-429a-8194-ab847f2f1ab2/c99d9e01-ca35-4c75-ba63-f0c0ef97787d/" rel="noopener noreferrer" rev="en_rl_none">Ambiguous note</a></div></en-note> ]]>
</content>
</note>
<note>
<title>Ambiguous note</title>
<created>20160730T111759Z</created>
<updated>20160730T111807Z</updated>
<content>
<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><div>Testing</div></en-note> ]]>
</content>
</note>
<note>
<title>Ambiguous note</title>
<created>20160730T111759Z</created>
<updated>20160730T111807Z</updated>
<content>
<![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><div>Testing</div></en-note> ]]>
</content>
</note>
</en-export>

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,12 @@
<table>
<div></div> <!-- INVALID! -->
<tr>
<td>one</td>
<td>two</td>
</tr>
<tr>
<div></div> <!-- INVALID! -->
<td>three</td>
<td>four</td>
</tr>
</table>

View File

@@ -0,0 +1,4 @@
| | |
| --- | --- |
| one | two |
| three | four |

View File

@@ -0,0 +1,19 @@
<body>
<table>
<tr>
<td>Left side of the main table</td>
<td>
<table>
<b>Nested Table</b>
<tr>
<td>nested table C1</td>
<td>nested table C2</td>
</tr>
<tr>
<td>nested table</td>
<td>nested table</td>
</tr>
</table>
</td>
</tr>
</table>

View File

@@ -0,0 +1 @@
<table><tbody><tr><td>Left side of the main table</td><td><b>Nested Table</b><table><tbody><tr><td>nested table C1</td><td>nested table C2</td></tr><tr><td>nested table</td><td>nested table</td></tr></tbody></table></td></tr></tbody></table>

View File

@@ -0,0 +1,31 @@
<div id="rendered-md">
<table class="jop-noMdConv">
<thead class="jop-noMdConv">
<tr class="jop-noMdConv">
<th class="jop-noMdConv">Code</th>
<th class="jop-noMdConv">Description</th>
</tr>
<tr class="jop-noMdConv">
<td class="jop-noMdConv">
<pre class="jop-noMdConv"><code class="jop-noMdConv">const test = "hello";
// Another line
console.log('Test...');
// Blank lines
// Should not break things.</code></pre>
</td>
<td class="jop-noMdConv">abcda</td>
</tr>
<tr class="jop-noMdConv">
<td class="jop-noMdConv">
<pre class="jop-noMdConv"><code class="jop-noMdConv">const test = "hello";</code></pre>
</td>
<td class="jop-noMdConv">abcd</td>
</tr>
</thead>
</table>
</div>

View File

@@ -0,0 +1,10 @@
<table class="jop-noMdConv"><thead class="jop-noMdConv"><tr class="jop-noMdConv"><th class="jop-noMdConv">Code</th><th class="jop-noMdConv">Description</th></tr><tr class="jop-noMdConv"><td class="jop-noMdConv"><pre class="jop-noMdConv"><code class="">const test = "hello";
<!-- -->
// Another line
console.log('Test...');
<!-- -->
// Blank lines
<!-- -->
<!-- -->
<!-- -->
// Should not break things.</code></pre></td><td class="jop-noMdConv">abcda</td></tr><tr class="jop-noMdConv"><td class="jop-noMdConv"><pre class="jop-noMdConv"><code class="">const test = "hello";</code></pre></td><td class="jop-noMdConv">abcd</td></tr></thead></table>

View File

@@ -0,0 +1 @@
<p>Text <span style="color: #fff000;">Text</span></p>

View File

@@ -0,0 +1 @@
Text <span style="color: #fff000;">Text</span>

View File

@@ -0,0 +1,3 @@
<nav class="table-of-contents"><ul><li><a href="#test">test</a></li><li><a href="#test-2">test</a></li><li><a href="#test2">test2</a></li></ul></nav><h1 id="test">test</h1>
<h1 id="test-2">test</h1>
<h1 id="test2">test2</h1>

View File

@@ -0,0 +1,5 @@
[toc]
# test
# test
# test2

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

View File

@@ -1,11 +1,9 @@
import { installDefaultPlugins, getDefaultPluginsInstallState, setSettingsForDefaultPlugins, checkPreInstalledDefaultPlugins } from '@joplin/lib/services/plugins/defaultPlugins/defaultPluginsUtils';
import { afterDefaultPluginsLoaded, getDefaultPluginPathsAndSettings } from '@joplin/lib/services/plugins/defaultPlugins/defaultPluginsUtils';
import PluginRunner from '../../../app/services/plugins/PluginRunner';
import { pathExists } from 'fs-extra';
import { checkThrow, setupDatabaseAndSynchronizer, supportDir, switchClient } from '@joplin/lib/testing/test-utils';
import PluginService, { defaultPluginSetting, DefaultPluginsInfo, PluginSettings } from '@joplin/lib/services/plugins/PluginService';
import PluginService, { defaultPluginSetting, DefaultPluginsInfo } from '@joplin/lib/services/plugins/PluginService';
import Setting from '@joplin/lib/models/Setting';
const testPluginDir = `${supportDir}/plugins`;
function newPluginService(appVersion = '1.4') {
const runner = new PluginRunner();
@@ -27,13 +25,17 @@ function newPluginService(appVersion = '1.4') {
describe('defaultPluginsUtils', () => {
const pluginsId = ['joplin.plugin.ambrt.backlinksToNote', 'org.joplinapp.plugins.ToggleSidebars'];
const defaultPluginsInfo = {
'joplin.plugin.ambrt.backlinksToNote': {},
'org.joplinapp.plugins.ToggleSidebars': {},
};
beforeEach(async () => {
await setupDatabaseAndSynchronizer(1);
await switchClient(1);
});
it('should install default plugins with no previous default plugins installed', (async () => {
it('should load default plugins when nor previously installed', (async () => {
const testPluginDir = `${supportDir}/pluginRepo/plugins`;
Setting.setValue('installedDefaultPlugins', []);
@@ -41,218 +43,150 @@ describe('defaultPluginsUtils', () => {
const pluginSettings = service.unserializePluginSettings(Setting.value('plugins.states'));
const newPluginsSettings = await installDefaultPlugins(service, testPluginDir, pluginsId, pluginSettings);
for (const pluginId of pluginsId) {
expect(pluginSettings[pluginId]).toBeFalsy();
}
const installedPluginPath1 = `${Setting.value('pluginDir')}/${pluginsId[0]}.jpl`;
const installedPluginPath2 = `${Setting.value('pluginDir')}/${pluginsId[1]}.jpl`;
expect(await pathExists(installedPluginPath1)).toBe(true);
expect(await pathExists(installedPluginPath2)).toBe(true);
expect(newPluginsSettings[pluginsId[0]]).toMatchObject(defaultPluginSetting());
expect(newPluginsSettings[pluginsId[1]]).toMatchObject(defaultPluginSetting());
const pluginPathsAndNewSettings = await getDefaultPluginPathsAndSettings(testPluginDir, defaultPluginsInfo, pluginSettings);
for (const pluginId of pluginsId) {
expect(
pluginPathsAndNewSettings.pluginSettings[pluginId],
).toMatchObject(defaultPluginSetting());
}
}));
it('should install default plugins with previous default plugins installed', (async () => {
it('should keep already created default plugins disabled with previous default plugins installed', (async () => {
const testPluginDir = `${supportDir}/pluginRepo/plugins`;
Setting.setValue('installedDefaultPlugins', ['org.joplinapp.plugins.ToggleSidebars']);
Setting.setValue('plugins.states', {
'org.joplinapp.plugins.ToggleSidebars': { ...defaultPluginSetting(), enabled: false },
});
const service = newPluginService('2.1');
const pluginSettings = service.unserializePluginSettings(Setting.value('plugins.states'));
const pluginPathsAndNewSettings = await getDefaultPluginPathsAndSettings(testPluginDir, defaultPluginsInfo, pluginSettings);
const newPluginsSettings = await installDefaultPlugins(service, testPluginDir, pluginsId, pluginSettings);
const installedPluginPath1 = `${Setting.value('pluginDir')}/${pluginsId[0]}.jpl`;
const installedPluginPath2 = `${Setting.value('pluginDir')}/${pluginsId[1]}.jpl`;
expect(await pathExists(installedPluginPath1)).toBe(true);
expect(await pathExists(installedPluginPath2)).toBe(false);
expect(newPluginsSettings[pluginsId[0]]).toMatchObject(defaultPluginSetting());
expect(newPluginsSettings[pluginsId[1]]).toBeUndefined();
// Should still be disabled
expect(
pluginPathsAndNewSettings.pluginSettings['org.joplinapp.plugins.ToggleSidebars'].enabled,
).toBe(false);
}));
it('should get default plugins install state', (async () => {
const testCases = [
{
'installedDefaultPlugins': [''],
'loadingPlugins': [`${testPluginDir}/simple`, `${testPluginDir}/jpl_test/org.joplinapp.FirstJplPlugin.jpl`],
'plugin1DefaultState': defaultPluginSetting(),
'plugin2DefaultState': defaultPluginSetting(),
'installedDefaultPlugins1': true,
'installedDefaultPlugins2': true,
},
{
'installedDefaultPlugins': [''],
'loadingPlugins': [`${testPluginDir}/simple`],
'plugin1DefaultState': defaultPluginSetting(),
'plugin2DefaultState': undefined,
'installedDefaultPlugins1': true,
'installedDefaultPlugins2': false,
},
{
'installedDefaultPlugins': ['org.joplinapp.plugins.Simple'],
'loadingPlugins': [`${testPluginDir}/simple`, `${testPluginDir}/jpl_test/org.joplinapp.FirstJplPlugin.jpl`],
'plugin1DefaultState': undefined,
'plugin2DefaultState': defaultPluginSetting(),
'installedDefaultPlugins1': true,
'installedDefaultPlugins2': true,
},
{
'installedDefaultPlugins': ['org.joplinapp.plugins.Simple'],
'loadingPlugins': [`${testPluginDir}/simple`],
'plugin1DefaultState': undefined,
'plugin2DefaultState': undefined,
'installedDefaultPlugins1': true,
'installedDefaultPlugins2': false,
},
];
for (const testCase of testCases) {
const service = newPluginService();
const pluginsId = ['org.joplinapp.plugins.Simple', 'org.joplinapp.FirstJplPlugin'];
Setting.setValue('installedDefaultPlugins', testCase.installedDefaultPlugins);
await service.loadAndRunPlugins(testCase.loadingPlugins, {});
// setting installedDefaultPlugins state
const defaultInstallStates: PluginSettings = getDefaultPluginsInstallState(service, pluginsId);
expect(defaultInstallStates[pluginsId[0]]).toStrictEqual(testCase.plugin1DefaultState);
expect(defaultInstallStates[pluginsId[1]]).toStrictEqual(testCase.plugin2DefaultState);
const installedDefaultPlugins = Setting.value('installedDefaultPlugins');
expect(installedDefaultPlugins.includes(pluginsId[0])).toBe(testCase.installedDefaultPlugins1);
expect(installedDefaultPlugins.includes(pluginsId[1])).toBe(testCase.installedDefaultPlugins2);
}
}));
it('should check pre-installed default plugins', (async () => {
// with previous pre-installed default plugins
Setting.setValue('installedDefaultPlugins', ['']);
let pluginSettings, installedDefaultPlugins;
pluginSettings = { [pluginsId[0]]: defaultPluginSetting() };
checkPreInstalledDefaultPlugins(pluginsId, pluginSettings);
installedDefaultPlugins = Setting.value('installedDefaultPlugins');
expect(installedDefaultPlugins.includes(pluginsId[0])).toBe(true);
expect(installedDefaultPlugins.includes(pluginsId[1])).toBe(false);
// with no previous pre-installed default plugins
Setting.setValue('installedDefaultPlugins', ['not-a-default-plugin']);
pluginSettings = {};
checkPreInstalledDefaultPlugins(pluginsId, pluginSettings);
installedDefaultPlugins = Setting.value('installedDefaultPlugins');
expect(installedDefaultPlugins.includes(pluginsId[0])).toBe(false);
expect(installedDefaultPlugins.includes(pluginsId[1])).toBe(false);
}));
const sampleJsBundlePlugin = `
/* joplin-manifest:
{
"id": "io.github.jackgruber.backup",
"manifest_version": 1,
"app_min_version": "1.4",
"name": "JS Bundle test",
"version": "1.0.0"
}
*/
joplin.plugins.register({
onStart: async function() {
await joplin.settings.registerSettings({
path: {
value: "initial-path",
type: 2,
section: "backupSection",
public: true,
label: "Backup path",
},
})
},
});`;
it('should set initial settings for default plugins', async () => {
const service = newPluginService();
const pluginScript = `
/* joplin-manifest:
{
"id": "io.github.jackgruber.backup",
"manifest_version": 1,
"app_min_version": "1.4",
"name": "JS Bundle test",
"version": "1.0.0"
}
*/
joplin.plugins.register({
onStart: async function() {
await joplin.settings.registerSettings({
path: {
value: "initial-path",
type: 2,
section: "backupSection",
public: true,
label: "Backup path",
},
})
},
});`;
const plugin = await service.loadPluginFromJsBundle('', pluginScript);
const plugin = await service.loadPluginFromJsBundle('', sampleJsBundlePlugin);
plugin.builtIn = true;
await service.runPlugin(plugin);
const runningPlugins = { 'io.github.jackgruber.backup': plugin };
const defaultPluginsInfo: DefaultPluginsInfo = {
'io.github.jackgruber.backup': {
version: '1.0.2',
settings: {
'path': `${Setting.value('profileDir')}`,
},
},
'plugin.calebjohn.rich-markdown': {
version: '0.8.3',
},
};
// with pre-installed default plugin
Setting.setValue('installedDefaultPlugins', ['io.github.jackgruber.backup']);
setSettingsForDefaultPlugins(defaultPluginsInfo);
const pluginSettings = { 'io.github.jackgruber.backup': defaultPluginSetting() };
await afterDefaultPluginsLoaded(
runningPlugins,
defaultPluginsInfo,
pluginSettings,
);
expect(Setting.value('plugin-io.github.jackgruber.backup.path')).toBe('initial-path');
await service.destroy();
// with no pre-installed default plugin
Setting.setValue('installedDefaultPlugins', ['']);
setSettingsForDefaultPlugins(defaultPluginsInfo);
await afterDefaultPluginsLoaded(
runningPlugins,
defaultPluginsInfo,
pluginSettings,
);
expect(Setting.value('plugin-io.github.jackgruber.backup.path')).toBe(`${Setting.value('profileDir')}`);
await service.destroy();
});
it('should not overwrite existing settings for a user-installed version of a built-in plugin', async () => {
const service = newPluginService();
const plugin = await service.loadPluginFromJsBundle('', sampleJsBundlePlugin);
plugin.builtIn = false;
await service.runPlugin(plugin);
const defaultPluginsInfo: DefaultPluginsInfo = {
'io.github.jackgruber.backup': {
settings: {
'path': 'overwrite?',
},
},
};
// No pre-installed default plugins
Setting.setValue('installedDefaultPlugins', []);
// The plugin is running and enabled
const runningPlugins = { 'io.github.jackgruber.backup': plugin };
const pluginSettings = { 'io.github.jackgruber.backup': defaultPluginSetting() };
await afterDefaultPluginsLoaded(
runningPlugins,
defaultPluginsInfo,
pluginSettings,
);
// Should not overwrite
expect(Setting.value('plugin-io.github.jackgruber.backup.path')).toBe('initial-path');
});
it('should not throw error on missing setting key', async () => {
const service = newPluginService();
const pluginScript = `
/* joplin-manifest:
{
"id": "io.github.jackgruber.backup",
"manifest_version": 1,
"app_min_version": "1.4",
"name": "JS Bundle test",
"version": "1.0.0"
}
*/
joplin.plugins.register({
onStart: async function() {
await joplin.settings.registerSettings({
path: {
value: "initial-path",
type: 2,
section: "backupSection",
public: true,
label: "Backup path",
},
})
},
});`;
const plugin = await service.loadPluginFromJsBundle('', pluginScript);
const plugin = await service.loadPluginFromJsBundle('', sampleJsBundlePlugin);
plugin.builtIn = true;
await service.runPlugin(plugin);
const defaultPluginsInfo: DefaultPluginsInfo = {
'io.github.jackgruber.backup': {
version: '1.0.2',
settings: {
'path': `${Setting.value('profileDir')}`,
'missing-key1': 'someValue',
},
},
'plugin.calebjohn.rich-markdown': {
version: '0.8.3',
settings: {
'missing-key2': 'someValue',
},
@@ -260,7 +194,10 @@ describe('defaultPluginsUtils', () => {
};
Setting.setValue('installedDefaultPlugins', ['']);
expect(checkThrow(() => setSettingsForDefaultPlugins(defaultPluginsInfo))).toBe(false);
const pluginSettings = { 'io.github.jackgruber.backup': defaultPluginSetting() };
const runningPlugins = { 'io.github.jackgruber.backup': plugin };
expect(checkThrow(() => afterDefaultPluginsLoaded(runningPlugins, defaultPluginsInfo, pluginSettings))).toBe(false);
expect(Setting.value('plugin-io.github.jackgruber.backup.path')).toBe(`${Setting.value('profileDir')}`);
await service.destroy();
});

View File

@@ -0,0 +1,3 @@
dist/
node_modules/
publish/

View File

@@ -0,0 +1,8 @@
*.md
!README.md
/*.jpl
/api
/src
/dist
tsconfig.json
webpack.config.js

View File

@@ -0,0 +1,78 @@
# Plugin development
This documentation describes how to create a plugin, and how to work with the plugin builder framework and API.
## Installation
First, install [Yeoman](http://yeoman.io) and generator-joplin using [npm](https://www.npmjs.com/) (we assume you have pre-installed [node.js](https://nodejs.org/)).
```bash
npm install -g yo
npm install -g generator-joplin
```
Then generate your new project:
```bash
yo --node-package-manager npm joplin
```
## Structure
The main two files you will want to look at are:
- `/src/index.ts`, which contains the entry point for the plugin source code.
- `/src/manifest.json`, which is the plugin manifest. It contains information such as the plugin a name, version, etc.
The file `/plugin.config.json` could also be useful if you intend to use [external scripts](#external-script-files), such as content scripts or webview scripts.
## Building the plugin
The plugin is built using Webpack, which creates the compiled code in `/dist`. A JPL archive will also be created at the root, which can use to distribute the plugin.
To build the plugin, simply run `npm run dist`.
The project is setup to use TypeScript, although you can change the configuration to use plain JavaScript.
## Updating the manifest version number
You can run `npm run updateVersion` to bump the patch part of the version number, so for example 1.0.3 will become 1.0.4. This script will update both the package.json and manifest.json version numbers so as to keep them in sync.
## Publishing the plugin
To publish the plugin, add it to npmjs.com by running `npm publish`. Later on, a script will pick up your plugin and add it automatically to the Joplin plugin repository as long as the package satisfies these conditions:
- In `package.json`, the name starts with "joplin-plugin-". For example, "joplin-plugin-toc".
- In `package.json`, the keywords include "joplin-plugin".
- In the `publish/` directory, there should be a .jpl and .json file (which are built by `npm run dist`)
In general all this is done automatically by the plugin generator, which will set the name and keywords of package.json, and will put the right files in the "publish" directory. But if something doesn't work and your plugin doesn't appear in the repository, double-check the above conditions.
## Updating the plugin framework
To update the plugin framework, run `npm run update`.
In general this command tries to do the right thing - in particular it's going to merge the changes in package.json and .gitignore instead of overwriting. It will also leave "/src" as well as README.md untouched.
The file that may cause problem is "webpack.config.js" because it's going to be overwritten. For that reason, if you want to change it, consider creating a separate JavaScript file and include it in webpack.config.js. That way, when you update, you only have to restore the line that include your file.
## External script files
By default, the compiler (webpack) is going to compile `src/index.ts` only (as well as any file it imports), and any other file will simply be copied to the plugin package. In some cases this is sufficient, however if you have [content scripts](https://joplinapp.org/api/references/plugin_api/classes/joplincontentscripts.html) or [webview scripts](https://joplinapp.org/api/references/plugin_api/classes/joplinviewspanels.html#addscript) you might want to compile them too, in particular in these two cases:
- The script is a TypeScript file - in which case it has to be compiled to JavaScript.
- The script requires modules you've added to package.json. In that case, the script, whether JS or TS, must be compiled so that the dependencies are bundled with the JPL file.
To get such an external script file to compile, you need to add it to the `extraScripts` array in `plugin.config.json`. The path you add should be relative to /src. For example, if you have a file in "/src/webviews/index.ts", the path should be set to "webviews/index.ts". Once compiled, the file will always be named with a .js extension. So you will get "webviews/index.js" in the plugin package, and that's the path you should use to reference the file.
## More information
- [Joplin Plugin API](https://joplinapp.org/api/references/plugin_api/classes/joplin.html)
- [Joplin Data API](https://joplinapp.org/help/api/references/rest_api)
- [Joplin Plugin Manifest](https://joplinapp.org/api/references/plugin_manifest/)
- Ask for help on the [forum](https://discourse.joplinapp.org/) or our [Discord channel](https://discord.gg/VSj7AFHvpq)
## License
MIT © Laurent Cozic

View File

@@ -0,0 +1,9 @@
# CodeMirror 6 sample plugin
This plugin demonstrates how to use the CodeMirror 6 plugin API. See `src/contentScript.ts`.
> [!NOTE]
>
> At the time of this writing, the CodeMirror 6 editor is in beta and must be enabled
> in settings.
>

View File

@@ -0,0 +1,14 @@
import Plugin from '../Plugin';
import Joplin from './Joplin';
/**
* @ignore
*/
/**
* @ignore
*/
export default class Global {
private joplin_;
constructor(implementation: any, plugin: Plugin, store: any);
get joplin(): Joplin;
get process(): any;
}

View File

@@ -0,0 +1,74 @@
import Plugin from '../Plugin';
import JoplinData from './JoplinData';
import JoplinPlugins from './JoplinPlugins';
import JoplinWorkspace from './JoplinWorkspace';
import JoplinFilters from './JoplinFilters';
import JoplinCommands from './JoplinCommands';
import JoplinViews from './JoplinViews';
import JoplinInterop from './JoplinInterop';
import JoplinSettings from './JoplinSettings';
import JoplinContentScripts from './JoplinContentScripts';
import JoplinClipboard from './JoplinClipboard';
import JoplinWindow from './JoplinWindow';
import BasePlatformImplementation from '../BasePlatformImplementation';
import JoplinImaging from './JoplinImaging';
/**
* This is the main entry point to the Joplin API. You can access various services using the provided accessors.
*
* The API is now relatively stable and in general maintaining backward compatibility is a top priority, so you shouldn't except much breakages.
*
* If a breaking change ever becomes needed, best effort will be done to:
*
* - Deprecate features instead of removing them, so as to give you time to fix the issue;
* - Document breaking changes in the changelog;
*
* So if you are developing a plugin, please keep an eye on the changelog as everything will be in there with information about how to update your code.
*/
export default class Joplin {
private data_;
private plugins_;
private imaging_;
private workspace_;
private filters_;
private commands_;
private views_;
private interop_;
private settings_;
private contentScripts_;
private clipboard_;
private window_;
private implementation_;
constructor(implementation: BasePlatformImplementation, plugin: Plugin, store: any);
get data(): JoplinData;
get clipboard(): JoplinClipboard;
get imaging(): JoplinImaging;
get window(): JoplinWindow;
get plugins(): JoplinPlugins;
get workspace(): JoplinWorkspace;
get contentScripts(): JoplinContentScripts;
/**
* @ignore
*
* Not sure if it's the best way to hook into the app
* so for now disable filters.
*/
get filters(): JoplinFilters;
get commands(): JoplinCommands;
get views(): JoplinViews;
get interop(): JoplinInterop;
get settings(): JoplinSettings;
/**
* It is not possible to bundle native packages with a plugin, because they
* need to work cross-platforms. Instead access to certain useful native
* packages is provided using this function.
*
* Currently these packages are available:
*
* - [sqlite3](https://www.npmjs.com/package/sqlite3)
* - [fs-extra](https://www.npmjs.com/package/fs-extra)
*
* [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/nativeModule)
*/
require(_path: string): any;
versionInfo(): Promise<import("./types").VersionInfo>;
}

View File

@@ -0,0 +1,23 @@
export default class JoplinClipboard {
private electronClipboard_;
private electronNativeImage_;
constructor(electronClipboard: any, electronNativeImage: any);
readText(): Promise<string>;
writeText(text: string): Promise<void>;
readHtml(): Promise<string>;
writeHtml(html: string): Promise<void>;
/**
* Returns the image in [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) format.
*/
readImage(): Promise<string>;
/**
* Takes an image in [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) format.
*/
writeImage(dataUrl: string): Promise<void>;
/**
* Returns the list available formats (mime types).
*
* For example [ 'text/plain', 'text/html' ]
*/
availableFormats(): Promise<string[]>;
}

View File

@@ -0,0 +1,89 @@
import { Command } from './types';
/**
* This class allows executing or registering new Joplin commands. Commands
* can be executed or associated with
* {@link JoplinViewsToolbarButtons | toolbar buttons} or
* {@link JoplinViewsMenuItems | menu items}.
*
* [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/register_command)
*
* ## Executing Joplin's internal commands
*
* It is also possible to execute internal Joplin's commands which, as of
* now, are not well documented. You can find the list directly on GitHub
* though at the following locations:
*
* * [Main screen commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/MainScreen/commands)
* * [Global commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/commands)
* * [Editor commands](https://github.com/laurent22/joplin/tree/dev/packages/app-desktop/gui/NoteEditor/editorCommandDeclarations.ts)
*
* To view what arguments are supported, you can open any of these files
* and look at the `execute()` command.
*
* ## Executing editor commands
*
* There might be a situation where you want to invoke editor commands
* without using a {@link JoplinContentScripts | contentScript}. For this
* reason Joplin provides the built in `editor.execCommand` command.
*
* `editor.execCommand` should work with any core command in both the
* [CodeMirror](https://codemirror.net/doc/manual.html#execCommand) and
* [TinyMCE](https://www.tiny.cloud/docs/api/tinymce/tinymce.editorcommands/#execcommand) editors,
* as well as most functions calls directly on a CodeMirror editor object (extensions).
*
* * [CodeMirror commands](https://codemirror.net/doc/manual.html#commands)
* * [TinyMCE core editor commands](https://www.tiny.cloud/docs/advanced/editor-command-identifiers/#coreeditorcommands)
*
* `editor.execCommand` supports adding arguments for the commands.
*
* ```typescript
* await joplin.commands.execute('editor.execCommand', {
* name: 'madeUpCommand', // CodeMirror and TinyMCE
* args: [], // CodeMirror and TinyMCE
* ui: false, // TinyMCE only
* value: '', // TinyMCE only
* });
* ```
*
* [View the example using the CodeMirror editor](https://github.com/laurent22/joplin/blob/dev/packages/app-cli/tests/support/plugins/codemirror_content_script/src/index.ts)
*
*/
export default class JoplinCommands {
/**
* <span class="platform-desktop">desktop</span> Executes the given
* command.
*
* The command can take any number of arguments, and the supported
* arguments will vary based on the command. For custom commands, this
* is the `args` passed to the `execute()` function. For built-in
* commands, you can find the supported arguments by checking the links
* above.
*
* ```typescript
* // Create a new note in the current notebook:
* await joplin.commands.execute('newNote');
*
* // Create a new sub-notebook under the provided notebook
* // Note: internally, notebooks are called "folders".
* await joplin.commands.execute('newFolder', "SOME_FOLDER_ID");
* ```
*/
execute(commandName: string, ...args: any[]): Promise<any | void>;
/**
* <span class="platform-desktop">desktop</span> Registers a new command.
*
* ```typescript
* // Register a new commmand called "testCommand1"
*
* await joplin.commands.register({
* name: 'testCommand1',
* label: 'My Test Command 1',
* iconName: 'fas fa-music',
* execute: () => {
* alert('Testing plugin command 1');
* },
* });
* ```
*/
register(command: Command): Promise<void>;
}

View File

@@ -0,0 +1,40 @@
import Plugin from '../Plugin';
import { ContentScriptType } from './types';
export default class JoplinContentScripts {
private plugin;
constructor(plugin: Plugin);
/**
* Registers a new content script. Unlike regular plugin code, which runs in
* a separate process, content scripts run within the main process code and
* thus allow improved performances and more customisations in specific
* cases. It can be used for example to load a Markdown or editor plugin.
*
* Note that registering a content script in itself will do nothing - it
* will only be loaded in specific cases by the relevant app modules (eg.
* the Markdown renderer or the code editor). So it is not a way to inject
* and run arbitrary code in the app, which for safety and performance
* reasons is not supported.
*
* The plugin generator provides a way to build any content script you might
* want to package as well as its dependencies. See the [Plugin Generator
* doc](https://github.com/laurent22/joplin/blob/dev/packages/generator-joplin/README.md)
* for more information.
*
* * [View the renderer demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/content_script)
* * [View the editor demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/codemirror_content_script)
*
* See also the [postMessage demo](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/post_messages)
*
* @param type Defines how the script will be used. See the type definition for more information about each supported type.
* @param id A unique ID for the content script.
* @param scriptPath Must be a path relative to the plugin main script. For example, if your file content_script.js is next to your index.ts file, you would set `scriptPath` to `"./content_script.js`.
*/
register(type: ContentScriptType, id: string, scriptPath: string): Promise<void>;
/**
* Listens to a messages sent from the content script using postMessage().
* See {@link ContentScriptType} for more information as well as the
* [postMessage
* demo](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/post_messages)
*/
onMessage(contentScriptId: string, callback: any): Promise<void>;
}

View File

@@ -0,0 +1,73 @@
import { ModelType } from '../../../BaseModel';
import Plugin from '../Plugin';
import { Path } from './types';
/**
* This module provides access to the Joplin data API: https://joplinapp.org/help/api/references/rest_api
* This is the main way to retrieve data, such as notes, notebooks, tags, etc.
* or to update them or delete them.
*
* This is also what you would use to search notes, via the `search` endpoint.
*
* [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/simple)
*
* In general you would use the methods in this class as if you were using a REST API. There are four methods that map to GET, POST, PUT and DELETE calls.
* And each method takes these parameters:
*
* * `path`: This is an array that represents the path to the resource in the form `["resouceName", "resourceId", "resourceLink"]` (eg. ["tags", ":id", "notes"]). The "resources" segment is the name of the resources you want to access (eg. "notes", "folders", etc.). If not followed by anything, it will refer to all the resources in that collection. The optional "resourceId" points to a particular resources within the collection. Finally, an optional "link" can be present, which links the resource to a collection of resources. This can be used in the API for example to retrieve all the notes associated with a tag.
* * `query`: (Optional) The query parameters. In a URL, this is the part after the question mark "?". In this case, it should be an object with key/value pairs.
* * `data`: (Optional) Applies to PUT and POST calls only. The request body contains the data you want to create or modify, for example the content of a note or folder.
* * `files`: (Optional) Used to create new resources and associate them with files.
*
* Please refer to the [Joplin API documentation](https://joplinapp.org/help/api/references/rest_api) for complete details about each call. As the plugin runs within the Joplin application **you do not need an authorisation token** to use this API.
*
* For example:
*
* ```typescript
* // Get a note ID, title and body
* const noteId = 'some_note_id';
* const note = await joplin.data.get(['notes', noteId], { fields: ['id', 'title', 'body'] });
*
* // Get all folders
* const folders = await joplin.data.get(['folders']);
*
* // Set the note body
* await joplin.data.put(['notes', noteId], null, { body: "New note body" });
*
* // Create a new note under one of the folders
* await joplin.data.post(['notes'], null, { body: "my new note", title: "some title", parent_id: folders[0].id });
* ```
*/
export default class JoplinData {
private api_;
private pathSegmentRegex_;
private plugin;
constructor(plugin: Plugin);
private serializeApiBody;
private pathToString;
get(path: Path, query?: any): Promise<any>;
post(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
put(path: Path, query?: any, body?: any, files?: any[]): Promise<any>;
delete(path: Path, query?: any): Promise<any>;
itemType(itemId: string): Promise<ModelType>;
resourcePath(resourceId: string): Promise<string>;
/**
* Gets an item user data. User data are key/value pairs. The `key` can be any
* arbitrary string, while the `value` can be of any type supported by
* [JSON.stringify](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description)
*
* User data is synchronised across devices, and each value wil be merged based on their timestamp:
*
* - If value is modified by client 1, then modified by client 2, it will take the value from client 2
* - If value is modified by client 1, then deleted by client 2, the value will be deleted after merge
* - If value is deleted by client 1, then updated by client 2, the value will be restored and set to the value from client 2 after merge
*/
userDataGet<T>(itemType: ModelType, itemId: string, key: string): Promise<T>;
/**
* Sets a note user data. See {@link JoplinData.userDataGet} for more details.
*/
userDataSet<T>(itemType: ModelType, itemId: string, key: string, value: T): Promise<void>;
/**
* Deletes a note user data. See {@link JoplinData.userDataGet} for more details.
*/
userDataDelete(itemType: ModelType, itemId: string, key: string): Promise<void>;
}

View File

@@ -0,0 +1,10 @@
/**
* @ignore
*
* Not sure if it's the best way to hook into the app
* so for now disable filters.
*/
export default class JoplinFilters {
on(name: string, callback: Function): Promise<void>;
off(name: string, callback: Function): Promise<void>;
}

View File

@@ -0,0 +1,61 @@
import { Rectangle } from './types';
export interface Implementation {
nativeImage: any;
}
export interface CreateFromBufferOptions {
width?: number;
height?: number;
scaleFactor?: number;
}
export interface ResizeOptions {
width?: number;
height?: number;
quality?: 'good' | 'better' | 'best';
}
export type Handle = string;
/**
* Provides imaging functions to resize or process images. You create an image
* using one of the `createFrom` functions, then use the other functions to
* process the image.
*
* Images are associated with a handle which is what will be available to the
* plugin. Once you are done with an image, free it using the `free()` function.
*
* [View the
* example](https://github.com/laurent22/joplin/blob/dev/packages/app-cli/tests/support/plugins/imaging/src/index.ts)
*
*/
export default class JoplinImaging {
private implementation_;
private images_;
constructor(implementation: Implementation);
private createImageHandle;
private imageByHandle;
private cacheImage;
createFromPath(filePath: string): Promise<Handle>;
createFromResource(resourceId: string): Promise<Handle>;
getSize(handle: Handle): Promise<any>;
resize(handle: Handle, options?: ResizeOptions): Promise<string>;
crop(handle: Handle, rectange: Rectangle): Promise<string>;
toPngFile(handle: Handle, filePath: string): Promise<void>;
/**
* Quality is between 0 and 100
*/
toJpgFile(handle: Handle, filePath: string, quality?: number): Promise<void>;
private tempFilePath;
/**
* Creates a new Joplin resource from the image data. The image will be
* first converted to a JPEG.
*/
toJpgResource(handle: Handle, resourceProps: any, quality?: number): Promise<import("../../database/types").ResourceEntity>;
/**
* Creates a new Joplin resource from the image data. The image will be
* first converted to a PNG.
*/
toPngResource(handle: Handle, resourceProps: any): Promise<import("../../database/types").ResourceEntity>;
/**
* Image data is not automatically deleted by Joplin so make sure you call
* this method on the handle once you are done.
*/
free(handle: Handle): Promise<void>;
}

View File

@@ -0,0 +1,17 @@
import { ExportModule, ImportModule } from './types';
/**
* Provides a way to create modules to import external data into Joplin or to export notes into any arbitrary format.
*
* [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/json_export)
*
* To implement an import or export module, you would simply define an object with various event handlers that are called
* by the application during the import/export process.
*
* See the documentation of the [[ExportModule]] and [[ImportModule]] for more information.
*
* You may also want to refer to the Joplin API documentation to see the list of properties for each item (note, notebook, etc.) - https://joplinapp.org/help/api/references/rest_api
*/
export default class JoplinInterop {
registerExportModule(module: ExportModule): Promise<void>;
registerImportModule(module: ImportModule): Promise<void>;
}

View File

@@ -0,0 +1,43 @@
import Plugin from '../Plugin';
import { ContentScriptType, Script } from './types';
/**
* This class provides access to plugin-related features.
*/
export default class JoplinPlugins {
private 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.
*
* ```typescript
* joplin.plugins.register({
* onStart: async function() {
* // Run your plugin code here
* }
* });
* ```
*/
register(script: Script): Promise<void>;
/**
* @deprecated Use joplin.contentScripts.register()
*/
registerContentScript(type: ContentScriptType, id: string, scriptPath: string): Promise<void>;
/**
* Gets the plugin own data directory path. Use this to store any
* plugin-related data. Unlike [[installationDir]], any data stored here
* will be persisted.
*/
dataDir(): Promise<string>;
/**
* Gets the plugin installation directory. This can be used to access any
* asset that was packaged with the plugin. This directory should be
* considered read-only because any data you store here might be deleted or
* re-created at any time. To store new persistent data, use [[dataDir]].
*/
installationDir(): Promise<string>;
/**
* @deprecated Use joplin.require()
*/
require(_path: string): any;
}

View File

@@ -0,0 +1,63 @@
import Plugin from '../Plugin';
import { SettingItem, SettingSection } from './types';
export interface ChangeEvent {
/**
* Setting keys that have been changed
*/
keys: string[];
}
export type ChangeHandler = (event: ChangeEvent) => void;
export declare const namespacedKey: (pluginId: string, key: string) => string;
/**
* This API allows registering new settings and setting sections, as well as getting and setting settings. Once a setting has been registered it will appear in the config screen and be editable by the user.
*
* Settings are essentially key/value pairs.
*
* Note: Currently this API does **not** provide access to Joplin's built-in settings. This is by design as plugins that modify user settings could give unexpected results
*
* [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/settings)
*/
export default class JoplinSettings {
private plugin_;
constructor(plugin: Plugin);
/**
* Registers new settings.
* Note that registering a setting item is dynamic and will be gone next time Joplin starts.
* What it means is that you need to register the setting every time the plugin starts (for example in the onStart event).
* The setting value however will be preserved from one launch to the next so there is no risk that it will be lost even if for some
* reason the plugin fails to start at some point.
*/
registerSettings(settings: Record<string, SettingItem>): Promise<void>;
/**
* @deprecated Use joplin.settings.registerSettings()
*
* Registers a new setting.
*/
registerSetting(key: string, settingItem: SettingItem): Promise<void>;
/**
* Registers a new setting section. Like for registerSetting, it is dynamic and needs to be done every time the plugin starts.
*/
registerSection(name: string, section: SettingSection): Promise<void>;
/**
* Gets a setting value (only applies to setting you registered from your plugin)
*/
value(key: string): Promise<any>;
/**
* Sets a setting value (only applies to setting you registered from your plugin)
*/
setValue(key: string, value: any): Promise<void>;
/**
* Gets a global setting value, including app-specific settings and those set by other plugins.
*
* The list of available settings is not documented yet, but can be found by looking at the source code:
*
* https://github.com/laurent22/joplin/blob/dev/packages/lib/models/Setting.ts#L142
*/
globalValue(key: string): Promise<any>;
/**
* Called when one or multiple settings of your plugin have been changed.
* - For performance reasons, this event is triggered with a delay.
* - You will only get events for your own plugin settings.
*/
onChange(handler: ChangeHandler): Promise<void>;
}

View File

@@ -0,0 +1,31 @@
import Plugin from '../Plugin';
import JoplinViewsDialogs from './JoplinViewsDialogs';
import JoplinViewsMenuItems from './JoplinViewsMenuItems';
import JoplinViewsMenus from './JoplinViewsMenus';
import JoplinViewsToolbarButtons from './JoplinViewsToolbarButtons';
import JoplinViewsPanels from './JoplinViewsPanels';
import JoplinViewsNoteList from './JoplinViewsNoteList';
/**
* This namespace provides access to view-related services.
*
* All view services provide a `create()` method which you would use to create the view object, whether it's a dialog, a toolbar button or a menu item.
* In some cases, the `create()` method will return a [[ViewHandle]], which you would use to act on the view, for example to set certain properties or call some methods.
*/
export default class JoplinViews {
private store;
private plugin;
private panels_;
private menuItems_;
private menus_;
private toolbarButtons_;
private dialogs_;
private noteList_;
private implementation_;
constructor(implementation: any, plugin: Plugin, store: any);
get dialogs(): JoplinViewsDialogs;
get panels(): JoplinViewsPanels;
get menuItems(): JoplinViewsMenuItems;
get menus(): JoplinViewsMenus;
get toolbarButtons(): JoplinViewsToolbarButtons;
get noteList(): JoplinViewsNoteList;
}

View File

@@ -0,0 +1,74 @@
import Plugin from '../Plugin';
import { ButtonSpec, ViewHandle, DialogResult } from './types';
/**
* Allows creating and managing dialogs. A dialog is modal window that
* contains a webview and a row of buttons. You can update the
* webview using the `setHtml` method. Dialogs are hidden by default and
* you need to call `open()` to open them. Once the user clicks on a
* button, the `open` call will return an object indicating what button was
* clicked on.
*
* ## Retrieving form values
*
* If your HTML content included one or more forms, a `formData` object
* will also be included with the key/value for each form.
*
* ## Special button IDs
*
* The following buttons IDs have a special meaning:
*
* - `ok`, `yes`, `submit`, `confirm`: They are considered "submit" buttons
* - `cancel`, `no`, `reject`: They are considered "dismiss" buttons
*
* This information is used by the application to determine what action
* should be done when the user presses "Enter" or "Escape" within the
* dialog. If they press "Enter", the first "submit" button will be
* automatically clicked. If they press "Escape" the first "dismiss" button
* will be automatically clicked.
*
* [View the demo
* plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/dialog)
*/
export default class JoplinViewsDialogs {
private store;
private plugin;
private implementation_;
constructor(implementation: any, plugin: Plugin, store: any);
private controller;
/**
* Creates a new dialog
*/
create(id: string): Promise<ViewHandle>;
/**
* Displays a message box with OK/Cancel buttons. Returns the button index that was clicked - "0" for OK and "1" for "Cancel"
*/
showMessageBox(message: string): Promise<number>;
/**
* Displays a dialog to select a file or a directory. Same options and
* output as
* https://www.electronjs.org/docs/latest/api/dialog#dialogshowopendialogbrowserwindow-options
*/
showOpenDialog(options: any): Promise<any>;
/**
* Sets the dialog HTML content
*/
setHtml(handle: ViewHandle, html: string): Promise<string>;
/**
* Adds and loads a new JS or CSS files into the dialog.
*/
addScript(handle: ViewHandle, scriptPath: string): Promise<void>;
/**
* Sets the dialog buttons.
*/
setButtons(handle: ViewHandle, buttons: ButtonSpec[]): Promise<ButtonSpec[]>;
/**
* Opens the dialog
*/
open(handle: ViewHandle): Promise<DialogResult>;
/**
* Toggle on whether to fit the dialog size to the content or not.
* When set to false, the dialog is set to 90vw and 80vh
* @default true
*/
setFitToContent(handle: ViewHandle, status: boolean): Promise<boolean>;
}

View File

@@ -0,0 +1,16 @@
import { CreateMenuItemOptions, MenuItemLocation } from './types';
import Plugin from '../Plugin';
/**
* Allows creating and managing menu items.
*
* [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/register_command)
*/
export default class JoplinViewsMenuItems {
private store;
private plugin;
constructor(plugin: Plugin, store: any);
/**
* Creates a new menu item and associate it with the given command. You can specify under which menu the item should appear using the `location` parameter.
*/
create(id: string, commandName: string, location?: MenuItemLocation, options?: CreateMenuItemOptions): Promise<void>;
}

View File

@@ -0,0 +1,18 @@
import { MenuItem, MenuItemLocation } from './types';
import Plugin from '../Plugin';
/**
* Allows creating menus.
*
* [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/menu)
*/
export default class JoplinViewsMenus {
private store;
private plugin;
constructor(plugin: Plugin, store: any);
private registerCommandAccelerators;
/**
* Creates a new menu from the provided menu items and place it at the given location. As of now, it is only possible to place the
* menu as a sub-menu of the application build-in menus.
*/
create(id: string, label: string, menuItems: MenuItem[], location?: MenuItemLocation): Promise<void>;
}

View File

@@ -0,0 +1,24 @@
import { Store } from 'redux';
import Plugin from '../Plugin';
import { ListRenderer } from './noteListType';
/**
* This API allows you to customise how each note in the note list is rendered.
* The renderer you implement follows a unidirectional data flow.
*
* The app provides the required dependencies whenever a note is updated - you
* process these dependencies, and return some props, which are then passed to
* your template and rendered. See [[[ListRenderer]]] for a detailed description
* of each property of the renderer.
*
* [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/note_list_renderer)
*
* The default list renderer is implemented using the same API, so it worth checking it too:
*
* [Default list renderer](https://github.com/laurent22/joplin/tree/dev/packages/lib/services/noteList/defaultListRenderer.ts)
*/
export default class JoplinViewsNoteList {
private plugin_;
private store_;
constructor(plugin: Plugin, store: Store);
registerRenderer(renderer: ListRenderer): Promise<void>;
}

View File

@@ -0,0 +1,78 @@
import Plugin from '../Plugin';
import { ViewHandle } from './types';
/**
* Allows creating and managing view panels. View panels currently are
* displayed at the right of the sidebar and allows displaying any HTML
* content (within a webview) and update it in real-time. For example it
* could be used to display a table of content for the active note, or
* display various metadata or graph.
*
* [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/toc)
*/
export default class JoplinViewsPanels {
private store;
private plugin;
constructor(plugin: Plugin, store: any);
private controller;
/**
* Creates a new panel
*/
create(id: string): Promise<ViewHandle>;
/**
* Sets the panel webview HTML
*/
setHtml(handle: ViewHandle, html: string): Promise<string>;
/**
* Adds and loads a new JS or CSS files into the panel.
*/
addScript(handle: ViewHandle, scriptPath: string): Promise<void>;
/**
* Called when a message is sent from the webview (using postMessage).
*
* To post a message from the webview to the plugin use:
*
* ```javascript
* const response = await webviewApi.postMessage(message);
* ```
*
* - `message` can be any JavaScript object, string or number
* - `response` is whatever was returned by the `onMessage` handler
*
* Using this mechanism, you can have two-way communication between the
* plugin and webview.
*
* See the [postMessage
* demo](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/post_messages) for more details.
*
*/
onMessage(handle: ViewHandle, callback: Function): Promise<void>;
/**
* Sends a message to the webview.
*
* The webview must have registered a message handler prior, otherwise the message is ignored. Use;
*
* ```javascript
* webviewApi.onMessage((message) => { ... });
* ```
*
* - `message` can be any JavaScript object, string or number
*
* The view API may have only one onMessage handler defined.
* This method is fire and forget so no response is returned.
*
* It is particularly useful when the webview needs to react to events emitted by the plugin or the joplin api.
*/
postMessage(handle: ViewHandle, message: any): void;
/**
* Shows the panel
*/
show(handle: ViewHandle, show?: boolean): Promise<void>;
/**
* Hides the panel
*/
hide(handle: ViewHandle): Promise<void>;
/**
* Tells whether the panel is visible or not
*/
visible(handle: ViewHandle): Promise<boolean>;
}

View File

@@ -0,0 +1,16 @@
import { ToolbarButtonLocation } from './types';
import Plugin from '../Plugin';
/**
* Allows creating and managing toolbar buttons.
*
* [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/register_command)
*/
export default class JoplinViewsToolbarButtons {
private store;
private plugin;
constructor(plugin: Plugin, store: any);
/**
* Creates a new toolbar button and associate it with the given command.
*/
create(id: string, commandName: string, location: ToolbarButtonLocation): Promise<void>;
}

View File

@@ -0,0 +1,24 @@
import Plugin from '../Plugin';
export interface Implementation {
injectCustomStyles(elementId: string, cssFilePath: string): Promise<void>;
}
export default class JoplinWindow {
private plugin_;
private store_;
private implementation_;
constructor(implementation: Implementation, plugin: Plugin, store: any);
/**
* Loads a chrome CSS file. It will apply to the window UI elements, except
* for the note viewer. It is the same as the "Custom stylesheet for
* Joplin-wide app styles" setting. See the [Load CSS Demo](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/load_css)
* for an example.
*/
loadChromeCssFile(filePath: string): Promise<void>;
/**
* Loads a note CSS file. It will apply to the note viewer, as well as any
* exported or printed note. It is the same as the "Custom stylesheet for
* rendered Markdown" setting. See the [Load CSS Demo](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/load_css)
* for an example.
*/
loadNoteCssFile(filePath: string): Promise<void>;
}

View File

@@ -0,0 +1,87 @@
import { FolderEntity } from '../../database/types';
import { Disposable, MenuItem } from './types';
export interface EditContextMenuFilterObject {
items: MenuItem[];
}
type FilterHandler<T> = (object: T) => Promise<void>;
declare enum ItemChangeEventType {
Create = 1,
Update = 2,
Delete = 3
}
interface ItemChangeEvent {
id: string;
event: ItemChangeEventType;
}
interface SyncStartEvent {
withErrors: boolean;
}
interface ResourceChangeEvent {
id: string;
}
type ItemChangeHandler = (event: ItemChangeEvent) => void;
type SyncStartHandler = (event: SyncStartEvent) => void;
type ResourceChangeHandler = (event: ResourceChangeEvent) => void;
/**
* The workspace service provides access to all the parts of Joplin that
* are being worked on - i.e. the currently selected notes or notebooks as
* well as various related events, such as when a new note is selected, or
* when the note content changes.
*
* [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins)
*/
export default class JoplinWorkspace {
private store;
constructor(store: any);
/**
* Called when a new note or notes are selected.
*/
onNoteSelectionChange(callback: Function): Promise<Disposable>;
/**
* Called when the content of a note changes.
* @deprecated Use `onNoteChange()` instead, which is reliably triggered whenever the note content, or any note property changes.
*/
onNoteContentChange(callback: Function): Promise<void>;
/**
* Called when the content of the current note changes.
*/
onNoteChange(handler: ItemChangeHandler): Promise<Disposable>;
/**
* Called when a resource is changed. Currently this handled will not be
* called when a resource is added or deleted.
*/
onResourceChange(handler: ResourceChangeHandler): Promise<void>;
/**
* Called when an alarm associated with a to-do is triggered.
*/
onNoteAlarmTrigger(handler: Function): Promise<Disposable>;
/**
* Called when the synchronisation process is starting.
*/
onSyncStart(handler: SyncStartHandler): Promise<Disposable>;
/**
* Called when the synchronisation process has finished.
*/
onSyncComplete(callback: Function): Promise<Disposable>;
/**
* Called just before the editor context menu is about to open. Allows
* adding items to it.
*/
filterEditorContextMenu(handler: FilterHandler<EditContextMenuFilterObject>): void;
/**
* Gets the currently selected note
*/
selectedNote(): Promise<any>;
/**
* Gets the currently selected folder. In some cases, for example during
* search or when viewing a tag, no folder is actually selected in the user
* interface. In that case, that function would return the last selected
* folder.
*/
selectedFolder(): Promise<FolderEntity>;
/**
* Gets the IDs of the selected notes (can be zero, one, or many). Use the data API to retrieve information about these notes.
*/
selectedNoteIds(): Promise<string[]>;
}
export {};

View File

@@ -0,0 +1,5 @@
import type Joplin from './Joplin';
declare const joplin: Joplin;
export default joplin;

View File

@@ -0,0 +1,156 @@
import { Size } from './types';
type ListRendererDatabaseDependency = 'folder.created_time' | 'folder.encryption_applied' | 'folder.encryption_cipher_text' | 'folder.icon' | 'folder.id' | 'folder.is_shared' | 'folder.master_key_id' | 'folder.parent_id' | 'folder.share_id' | 'folder.title' | 'folder.updated_time' | 'folder.user_created_time' | 'folder.user_data' | 'folder.user_updated_time' | 'folder.type_' | 'note.altitude' | 'note.application_data' | 'note.author' | 'note.body' | 'note.conflict_original_id' | 'note.created_time' | 'note.encryption_applied' | 'note.encryption_cipher_text' | 'note.id' | 'note.is_conflict' | 'note.is_shared' | 'note.is_todo' | 'note.latitude' | 'note.longitude' | 'note.markup_language' | 'note.master_key_id' | 'note.order' | 'note.parent_id' | 'note.share_id' | 'note.source' | 'note.source_application' | 'note.source_url' | 'note.title' | 'note.todo_completed' | 'note.todo_due' | 'note.updated_time' | 'note.user_created_time' | 'note.user_data' | 'note.user_updated_time' | 'note.type_';
export declare enum ItemFlow {
TopToBottom = "topToBottom",
LeftToRight = "leftToRight"
}
export type RenderNoteView = Record<string, any>;
export interface OnChangeEvent {
elementId: string;
value: any;
noteId: string;
}
export type OnRenderNoteHandler = (props: any) => Promise<RenderNoteView>;
export type OnChangeHandler = (event: OnChangeEvent) => Promise<void>;
/**
* Most of these are the built-in note properties, such as `note.title`,
* `note.todo_completed`, etc.
*
* Additionally, the `item.*` properties are specific to the rendered item. The
* most important being `item.selected`, which you can use to display the
* selected note in a different way.
*
* Finally some special properties are provided to make it easier to render
* notes. In particular, if possible prefer `note.titleHtml` to `note.title`
* since some important processing has already been done on the string, such as
* handling the search highlighter and escaping. Since it's HTML and already
* escaped you would insert it using `{{{titleHtml}}}` (triple-mustache syntax,
* which disables escaping).
*
* `notes.tag` gives you the list of tags associated with the note.
*
* `note.isWatched` tells you if the note is currently opened in an external
* editor. In which case you would generally display some indicator.
*/
export type ListRendererDepependency = ListRendererDatabaseDependency | 'item.size.width' | 'item.size.height' | 'item.selected' | 'note.titleHtml' | 'note.isWatched' | 'note.tags';
export interface ListRenderer {
/**
* It must be unique to your plugin.
*/
id: string;
/**
* Can be top to bottom or left to right. Left to right gives you more
* option to set the size of the items since you set both its width and
* height.
*/
flow: ItemFlow;
/**
* The size of each item must be specified in advance for performance
* reasons, and cannot be changed afterwards. If the item flow is top to
* bottom, you only need to specificy the item height (the width will be
* ignored).
*/
itemSize: Size;
/**
* The CSS is relative to the list item container. What will appear in the
* page is essentially `.note-list-item { YOUR_CSS; }`. It means you can use
* child combinator with guarantee it will only apply to your own items. In
* this example, the styling will apply to `.note-list-item > .content`:
*
* ```css
* > .content {
* padding: 10px;
* }
* ```
*
* In order to get syntax highlighting working here, it's recommended
* installing an editor extension such as [es6-string-html VSCode
* extension](https://marketplace.visualstudio.com/items?itemName=Tobermory.es6-string-html)
*/
itemCss?: string;
/**
* List the dependencies that your plugin needs to render the note list
* items. Only these will be passed to your `onRenderNote` handler. Ensure
* that you do not add more than what you need since there is a performance
* penalty for each property.
*/
dependencies: ListRendererDepependency[];
/**
* This is the HTML template that will be used to render the note list item.
* This is a [Mustache template](https://github.com/janl/mustache.js) and it
* will receive the variable you return from `onRenderNote` as tags. For
* example, if you return a property named `formattedDate` from
* `onRenderNote`, you can insert it in the template using `Created date:
* {{formattedDate}}`.
*
* In order to get syntax highlighting working here, it's recommended
* installing an editor extension such as [es6-string-html VSCode
* extension](https://marketplace.visualstudio.com/items?itemName=Tobermory.es6-string-html)
*/
itemTemplate: string;
/**
* This user-facing text is used for example in the View menu, so that your
* renderer can be selected.
*/
label: () => Promise<string>;
/**
* This is where most of the real-time processing will happen. When a note
* is rendered for the first time and every time it changes, this handler
* receives the properties specified in the `dependencies` property. You can
* then process them, load any additional data you need, and once done you
* need to return the properties that are needed in the `itemTemplate` HTML.
* Again, to use the formatted date example, you could have such a renderer:
*
* ```typescript
* dependencies: [
* 'note.title',
* 'note.created_time',
* ],
*
* itemTemplate: // html
* `
* <div>
* Title: {{note.title}}<br/>
* Date: {{formattedDate}}
* </div>
* `,
*
* onRenderNote: async (props: any) => {
* const formattedDate = dayjs(props.note.created_time).format();
* return {
* // Also return the props, so that note.title is available from the
* // template
* ...props,
* formattedDate,
* }
* },
* ```
*/
onRenderNote: OnRenderNoteHandler;
/**
* This handler allows adding some interacivity to the note renderer -
* whenever an input element within the item is changed (for example, when a
* checkbox is clicked, or a text input is changed), this `onChange` handler
* is going to be called.
*
* You can inspect `event.elementId` to know which element had some changes,
* and `event.value` to know the new value. `event.noteId` also tells you
* what note is affected, so that you can potentially apply changes to it.
*
* You specify the element ID, by setting a `data-id` attribute on the
* input.
*
* For example, if you have such a template:
*
* ```html
* <div>
* <input type="text" value="{{note.title}}" data-id="noteTitleInput"/>
* </div>
* ```
*
* The event handler will receive an event with `elementId` set to
* `noteTitleInput`.
*/
onChange?: OnChangeHandler;
}
export {};

View File

@@ -0,0 +1,181 @@
/* eslint-disable multiline-comment-style */
import { Size } from './types';
// AUTO-GENERATED by generate-database-type
type ListRendererDatabaseDependency = 'folder.created_time' | 'folder.encryption_applied' | 'folder.encryption_cipher_text' | 'folder.icon' | 'folder.id' | 'folder.is_shared' | 'folder.master_key_id' | 'folder.parent_id' | 'folder.share_id' | 'folder.title' | 'folder.updated_time' | 'folder.user_created_time' | 'folder.user_data' | 'folder.user_updated_time' | 'folder.type_' | 'note.altitude' | 'note.application_data' | 'note.author' | 'note.body' | 'note.conflict_original_id' | 'note.created_time' | 'note.encryption_applied' | 'note.encryption_cipher_text' | 'note.id' | 'note.is_conflict' | 'note.is_shared' | 'note.is_todo' | 'note.latitude' | 'note.longitude' | 'note.markup_language' | 'note.master_key_id' | 'note.order' | 'note.parent_id' | 'note.share_id' | 'note.source' | 'note.source_application' | 'note.source_url' | 'note.title' | 'note.todo_completed' | 'note.todo_due' | 'note.updated_time' | 'note.user_created_time' | 'note.user_data' | 'note.user_updated_time' | 'note.type_';
// AUTO-GENERATED by generate-database-type
export enum ItemFlow {
TopToBottom = 'topToBottom',
LeftToRight = 'leftToRight',
}
export type RenderNoteView = Record<string, any>;
export interface OnChangeEvent {
elementId: string;
value: any;
noteId: string;
}
export type OnRenderNoteHandler = (props: any)=> Promise<RenderNoteView>;
export type OnChangeHandler = (event: OnChangeEvent)=> Promise<void>;
/**
* Most of these are the built-in note properties, such as `note.title`,
* `note.todo_completed`, etc.
*
* Additionally, the `item.*` properties are specific to the rendered item. The
* most important being `item.selected`, which you can use to display the
* selected note in a different way.
*
* Finally some special properties are provided to make it easier to render
* notes. In particular, if possible prefer `note.titleHtml` to `note.title`
* since some important processing has already been done on the string, such as
* handling the search highlighter and escaping. Since it's HTML and already
* escaped you would insert it using `{{{titleHtml}}}` (triple-mustache syntax,
* which disables escaping).
*
* `notes.tag` gives you the list of tags associated with the note.
*
* `note.isWatched` tells you if the note is currently opened in an external
* editor. In which case you would generally display some indicator.
*/
export type ListRendererDepependency =
ListRendererDatabaseDependency |
'item.size.width' |
'item.size.height' |
'item.selected' |
'note.titleHtml' |
'note.isWatched' |
'note.tags';
export interface ListRenderer {
/**
* It must be unique to your plugin.
*/
id: string;
/**
* Can be top to bottom or left to right. Left to right gives you more
* option to set the size of the items since you set both its width and
* height.
*/
flow: ItemFlow;
/**
* The size of each item must be specified in advance for performance
* reasons, and cannot be changed afterwards. If the item flow is top to
* bottom, you only need to specificy the item height (the width will be
* ignored).
*/
itemSize: Size;
/**
* The CSS is relative to the list item container. What will appear in the
* page is essentially `.note-list-item { YOUR_CSS; }`. It means you can use
* child combinator with guarantee it will only apply to your own items. In
* this example, the styling will apply to `.note-list-item > .content`:
*
* ```css
* > .content {
* padding: 10px;
* }
* ```
*
* In order to get syntax highlighting working here, it's recommended
* installing an editor extension such as [es6-string-html VSCode
* extension](https://marketplace.visualstudio.com/items?itemName=Tobermory.es6-string-html)
*/
itemCss?: string;
/**
* List the dependencies that your plugin needs to render the note list
* items. Only these will be passed to your `onRenderNote` handler. Ensure
* that you do not add more than what you need since there is a performance
* penalty for each property.
*/
dependencies: ListRendererDepependency[];
/**
* This is the HTML template that will be used to render the note list item.
* This is a [Mustache template](https://github.com/janl/mustache.js) and it
* will receive the variable you return from `onRenderNote` as tags. For
* example, if you return a property named `formattedDate` from
* `onRenderNote`, you can insert it in the template using `Created date:
* {{formattedDate}}`.
*
* In order to get syntax highlighting working here, it's recommended
* installing an editor extension such as [es6-string-html VSCode
* extension](https://marketplace.visualstudio.com/items?itemName=Tobermory.es6-string-html)
*/
itemTemplate: string;
/**
* This user-facing text is used for example in the View menu, so that your
* renderer can be selected.
*/
label: ()=> Promise<string>;
/**
* This is where most of the real-time processing will happen. When a note
* is rendered for the first time and every time it changes, this handler
* receives the properties specified in the `dependencies` property. You can
* then process them, load any additional data you need, and once done you
* need to return the properties that are needed in the `itemTemplate` HTML.
* Again, to use the formatted date example, you could have such a renderer:
*
* ```typescript
* dependencies: [
* 'note.title',
* 'note.created_time',
* ],
*
* itemTemplate: // html
* `
* <div>
* Title: {{note.title}}<br/>
* Date: {{formattedDate}}
* </div>
* `,
*
* onRenderNote: async (props: any) => {
* const formattedDate = dayjs(props.note.created_time).format();
* return {
* // Also return the props, so that note.title is available from the
* // template
* ...props,
* formattedDate,
* }
* },
* ```
*/
onRenderNote: OnRenderNoteHandler;
/**
* This handler allows adding some interacivity to the note renderer -
* whenever an input element within the item is changed (for example, when a
* checkbox is clicked, or a text input is changed), this `onChange` handler
* is going to be called.
*
* You can inspect `event.elementId` to know which element had some changes,
* and `event.value` to know the new value. `event.noteId` also tells you
* what note is affected, so that you can potentially apply changes to it.
*
* You specify the element ID, by setting a `data-id` attribute on the
* input.
*
* For example, if you have such a template:
*
* ```html
* <div>
* <input type="text" value="{{note.title}}" data-id="noteTitleInput"/>
* </div>
* ```
*
* The event handler will receive an event with `elementId` set to
* `noteTitleInput`.
*/
onChange?: OnChangeHandler;
}

View File

@@ -0,0 +1,711 @@
/* eslint-disable multiline-comment-style */
// =================================================================
// Command API types
// =================================================================
export interface Command {
/**
* Name of command - must be globally unique
*/
name: string;
/**
* Label to be displayed on menu items or keyboard shortcut editor for example.
* If it is missing, it's assumed it's a private command, to be called programmatically only.
* In that case the command will not appear in the shortcut editor or command panel, and logically
* should not be used as a menu item.
*/
label?: string;
/**
* Icon to be used on toolbar buttons for example
*/
iconName?: string;
/**
* Code to be ran when the command is executed. It may return a result.
*/
execute(...args: any[]): Promise<any | void>;
/**
* Defines whether the command should be enabled or disabled, which in turns
* affects the enabled state of any associated button or menu item.
*
* The condition should be expressed as a "when-clause" (as in Visual Studio
* Code). It's a simple boolean expression that evaluates to `true` or
* `false`. It supports the following operators:
*
* Operator | Symbol | Example
* -- | -- | --
* Equality | == | "editorType == markdown"
* Inequality | != | "currentScreen != config"
* Or | \|\| | "noteIsTodo \|\| noteTodoCompleted"
* And | && | "oneNoteSelected && !inConflictFolder"
*
* Joplin, unlike VSCode, also supports parenthesis, which allows creating
* more complex expressions such as `cond1 || (cond2 && cond3)`. Only one
* level of parenthesis is possible (nested ones aren't supported).
*
* Currently the supported context variables aren't documented, but you can
* find the list below:
*
* - [Global When Clauses](https://github.com/laurent22/joplin/blob/dev/packages/lib/services/commands/stateToWhenClauseContext.ts)
* - [Desktop app When Clauses](https://github.com/laurent22/joplin/blob/dev/packages/app-desktop/services/commands/stateToWhenClauseContext.ts)
*
* Note: Commands are enabled by default unless you use this property.
*/
enabledCondition?: string;
}
// =================================================================
// Interop API types
// =================================================================
export enum FileSystemItem {
File = 'file',
Directory = 'directory',
}
export enum ImportModuleOutputFormat {
Markdown = 'md',
Html = 'html',
}
/**
* Used to implement a module to export data from Joplin. [View the demo plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/json_export) for an example.
*
* In general, all the event handlers you'll need to implement take a `context` object as a first argument. This object will contain the export or import path as well as various optional properties, such as which notes or notebooks need to be exported.
*
* To get a better sense of what it will contain it can be useful to print it using `console.info(context)`.
*/
export interface ExportModule {
/**
* The format to be exported, eg "enex", "jex", "json", etc.
*/
format: string;
/**
* The description that will appear in the UI, for example in the menu item.
*/
description: string;
/**
* Whether the module will export a single file or multiple files in a directory. It affects the open dialog that will be presented to the user when using your exporter.
*/
target: FileSystemItem;
/**
* Only applies to single file exporters or importers
* It tells whether the format can package multiple notes into one file.
* For example JEX or ENEX can, but HTML cannot.
*/
isNoteArchive: boolean;
/**
* The extensions of the files exported by your module. For example, it is `["htm", "html"]` for the HTML module, and just `["jex"]` for the JEX module.
*/
fileExtensions?: string[];
/**
* Called when the export process starts.
*/
onInit(context: ExportContext): Promise<void>;
/**
* Called when an item needs to be processed. An "item" can be any Joplin object, such as a note, a folder, a notebook, etc.
*/
onProcessItem(context: ExportContext, itemType: number, item: any): Promise<void>;
/**
* Called when a resource file needs to be exported.
*/
onProcessResource(context: ExportContext, resource: any, filePath: string): Promise<void>;
/**
* Called when the export process is done.
*/
onClose(context: ExportContext): Promise<void>;
}
export interface ImportModule {
/**
* The format to be exported, eg "enex", "jex", "json", etc.
*/
format: string;
/**
* The description that will appear in the UI, for example in the menu item.
*/
description: string;
/**
* Only applies to single file exporters or importers
* It tells whether the format can package multiple notes into one file.
* For example JEX or ENEX can, but HTML cannot.
*/
isNoteArchive: boolean;
/**
* The type of sources that are supported by the module. Tells whether the module can import files or directories or both.
*/
sources: FileSystemItem[];
/**
* Tells the file extensions of the exported files.
*/
fileExtensions?: string[];
/**
* Tells the type of notes that will be generated, either HTML or Markdown (default).
*/
outputFormat?: ImportModuleOutputFormat;
/**
* Called when the import process starts. There is only one event handler within which you should import the complete data.
*/
onExec(context: ImportContext): Promise<void>;
}
export interface ExportOptions {
format?: string;
path?: string;
sourceFolderIds?: string[];
sourceNoteIds?: string[];
// modulePath?: string;
target?: FileSystemItem;
}
export interface ExportContext {
destPath: string;
options: ExportOptions;
/**
* You can attach your own custom data using this propery - it will then be passed to each event handler, allowing you to keep state from one event to the next.
*/
userData?: any;
}
export interface ImportContext {
sourcePath: string;
options: any;
warnings: string[];
}
// =================================================================
// Misc types
// =================================================================
export interface Script {
onStart?(event: any): Promise<void>;
}
export interface Disposable {
// dispose():void;
}
export enum ModelType {
Note = 1,
Folder = 2,
Setting = 3,
Resource = 4,
Tag = 5,
NoteTag = 6,
Search = 7,
Alarm = 8,
MasterKey = 9,
ItemChange = 10,
NoteResource = 11,
ResourceLocalState = 12,
Revision = 13,
Migration = 14,
SmartFilter = 15,
Command = 16,
}
export interface VersionInfo {
version: string;
profileVersion: number;
syncVersion: number;
}
// =================================================================
// Menu types
// =================================================================
export interface CreateMenuItemOptions {
accelerator: string;
}
export enum MenuItemLocation {
File = 'file',
Edit = 'edit',
View = 'view',
Note = 'note',
Tools = 'tools',
Help = 'help',
/**
* @deprecated Do not use - same as NoteListContextMenu
*/
Context = 'context',
// If adding an item here, don't forget to update isContextMenuItemLocation()
/**
* When a command is called from the note list context menu, the
* command will receive the following arguments:
*
* - `noteIds:string[]`: IDs of the notes that were right-clicked on.
*/
NoteListContextMenu = 'noteListContextMenu',
EditorContextMenu = 'editorContextMenu',
/**
* When a command is called from a folder context menu, the
* command will receive the following arguments:
*
* - `folderId:string`: ID of the folder that was right-clicked on
*/
FolderContextMenu = 'folderContextMenu',
/**
* When a command is called from a tag context menu, the
* command will receive the following arguments:
*
* - `tagId:string`: ID of the tag that was right-clicked on
*/
TagContextMenu = 'tagContextMenu',
}
export function isContextMenuItemLocation(location: MenuItemLocation): boolean {
return [
MenuItemLocation.Context,
MenuItemLocation.NoteListContextMenu,
MenuItemLocation.EditorContextMenu,
MenuItemLocation.FolderContextMenu,
MenuItemLocation.TagContextMenu,
].includes(location);
}
export interface MenuItem {
/**
* Command that should be associated with the menu item. All menu item should
* have a command associated with them unless they are a sub-menu.
*/
commandName?: string;
/**
* Arguments that should be passed to the command. They will be as rest
* parameters.
*/
commandArgs?: any[];
/**
* Set to "separator" to create a divider line
*/
type?: ('normal' | 'separator' | 'submenu' | 'checkbox' | 'radio');
/**
* Accelerator associated with the menu item
*/
accelerator?: string;
/**
* Menu items that should appear below this menu item. Allows creating a menu tree.
*/
submenu?: MenuItem[];
/**
* Menu item label. If not specified, the command label will be used instead.
*/
label?: string;
}
// =================================================================
// View API types
// =================================================================
export interface ButtonSpec {
id: ButtonId;
title?: string;
onClick?(): void;
}
export type ButtonId = string;
export enum ToolbarButtonLocation {
/**
* This toolbar in the top right corner of the application. It applies to the note as a whole, including its metadata.
*/
NoteToolbar = 'noteToolbar',
/**
* This toolbar is right above the text editor. It applies to the note body only.
*/
EditorToolbar = 'editorToolbar',
}
export type ViewHandle = string;
export interface EditorCommand {
name: string;
value?: any;
}
export interface DialogResult {
id: ButtonId;
formData?: any;
}
export interface Size {
width?: number;
height?: number;
}
export interface Rectangle {
x?: number;
y?: number;
width?: number;
height?: number;
}
// =================================================================
// Settings types
// =================================================================
export enum SettingItemType {
Int = 1,
String = 2,
Bool = 3,
Array = 4,
Object = 5,
Button = 6,
}
export enum SettingItemSubType {
FilePathAndArgs = 'file_path_and_args',
FilePath = 'file_path', // Not supported on mobile!
DirectoryPath = 'directory_path', // Not supported on mobile!
}
export enum AppType {
Desktop = 'desktop',
Mobile = 'mobile',
Cli = 'cli',
}
export enum SettingStorage {
Database = 1,
File = 2,
}
// Redefine a simplified interface to mask internal details
// and to remove function calls as they would have to be async.
export interface SettingItem {
value: any;
type: SettingItemType;
/**
* Currently only used to display a file or directory selector. Always set
* `type` to `SettingItemType.String` when using this property.
*/
subType?: SettingItemSubType;
label: string;
description?: string;
/**
* A public setting will appear in the Configuration screen and will be
* modifiable by the user. A private setting however will not appear there,
* and can only be changed programmatically. You may use this to store some
* values that you do not want to directly expose.
*/
public: boolean;
/**
* You would usually set this to a section you would have created
* specifically for the plugin.
*/
section?: string;
/**
* To create a setting with multiple options, set this property to `true`.
* That setting will render as a dropdown list in the configuration screen.
*/
isEnum?: boolean;
/**
* This property is required when `isEnum` is `true`. In which case, it
* should contain a map of value => label.
*/
options?: Record<any, any>;
/**
* Reserved property. Not used at the moment.
*/
appTypes?: AppType[];
/**
* Set this to `true` to store secure data, such as passwords. Any such
* setting will be stored in the system keychain if one is available.
*/
secure?: boolean;
/**
* An advanced setting will be moved under the "Advanced" button in the
* config screen.
*/
advanced?: boolean;
/**
* Set the min, max and step values if you want to restrict an int setting
* to a particular range.
*/
minimum?: number;
maximum?: number;
step?: number;
/**
* Either store the setting in the database or in settings.json. Defaults to database.
*/
storage?: SettingStorage;
}
export interface SettingSection {
label: string;
iconName?: string;
description?: string;
name?: string;
}
// =================================================================
// Data API types
// =================================================================
/**
* An array of at least one element and at most three elements.
*
* - **[0]**: Resource name (eg. "notes", "folders", "tags", etc.)
* - **[1]**: (Optional) Resource ID.
* - **[2]**: (Optional) Resource link.
*/
export type Path = string[];
// =================================================================
// Content Script types
// =================================================================
export type PostMessageHandler = (message: any)=> Promise<any>;
/**
* When a content script is initialised, it receives a `context` object.
*/
export interface ContentScriptContext {
/**
* The plugin ID that registered this content script
*/
pluginId: string;
/**
* The content script ID, which may be necessary to post messages
*/
contentScriptId: string;
/**
* Can be used by CodeMirror content scripts to post a message to the plugin
*/
postMessage: PostMessageHandler;
}
export interface ContentScriptModuleLoadedEvent {
userData?: any;
}
export interface ContentScriptModule {
onLoaded?: (event: ContentScriptModuleLoadedEvent)=> void;
plugin: ()=> any;
assets?: ()=> void;
}
export interface MarkdownItContentScriptModule extends Omit<ContentScriptModule, 'plugin'> {
plugin: (markdownIt: any, options: any)=> any;
}
export enum ContentScriptType {
/**
* Registers a new Markdown-It plugin, which should follow the template
* below.
*
* ```javascript
* module.exports = {
* default: function(context) {
* return {
* plugin: function(markdownIt, pluginOptions) {
* // ...
* },
* assets: {
* // ...
* },
* }
* }
* }
* ```
*
* See [the
* demo](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/content_script)
* for a simple Markdown-it plugin example.
*
* ## Exported members
*
* - The `context` argument is currently unused but could be used later on
* to provide access to your own plugin so that the content script and
* plugin can communicate.
*
* - The **required** `plugin` key is the actual Markdown-It plugin - check
* the [official doc](https://github.com/markdown-it/markdown-it) for more
* information.
*
* - Using the **optional** `assets` key you may specify assets such as JS
* or CSS that should be loaded in the rendered HTML document. Check for
* example the Joplin [Mermaid
* plugin](https://github.com/laurent22/joplin/blob/dev/packages/renderer/MdToHtml/rules/mermaid.ts)
* to see how the data should be structured.
*
* ## Getting the settings from the renderer
*
* You can access your plugin settings from the renderer by calling
* `pluginOptions.settingValue("your-setting-key')`.
*
* ## Posting messages from the content script to your plugin
*
* The application provides the following function to allow executing
* commands from the rendered HTML code:
*
* ```javascript
* const response = await webviewApi.postMessage(contentScriptId, message);
* ```
*
* - `contentScriptId` is the ID you've defined when you registered the
* content script. You can retrieve it from the
* {@link ContentScriptContext | context}.
* - `message` can be any basic JavaScript type (number, string, plain
* object), but it cannot be a function or class instance.
*
* When you post a message, the plugin can send back a `response` thus
* allowing two-way communication:
*
* ```javascript
* await joplin.contentScripts.onMessage(contentScriptId, (message) => {
* // Process message
* return response; // Can be any object, string or number
* });
* ```
*
* See {@link JoplinContentScripts.onMessage} for more details, as well as
* the [postMessage
* demo](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/post_messages).
*
* ## Registering an existing Markdown-it plugin
*
* To include a regular Markdown-It plugin, that doesn't make use of any
* Joplin-specific features, you would simply create a file such as this:
*
* ```javascript
* module.exports = {
* default: function(context) {
* return {
* plugin: require('markdown-it-toc-done-right');
* }
* }
* }
* ```
*/
MarkdownItPlugin = 'markdownItPlugin',
/**
* Registers a new CodeMirror plugin, which should follow the template
* below.
*
* ```javascript
* module.exports = {
* default: function(context) {
* return {
* plugin: function(CodeMirror) {
* // ...
* },
* codeMirrorResources: [],
* codeMirrorOptions: {
* // ...
* },
* assets: {
* // ...
* },
* }
* }
* }
* ```
*
* - The `context` argument is currently unused but could be used later on
* to provide access to your own plugin so that the content script and
* plugin can communicate.
*
* - The `plugin` key is your CodeMirror plugin. This is where you can
* register new commands with CodeMirror or interact with the CodeMirror
* instance as needed.
*
* - The `codeMirrorResources` key is an array of CodeMirror resources that
* will be loaded and attached to the CodeMirror module. These are made up
* of addons, keymaps, and modes. For example, for a plugin that want's to
* enable clojure highlighting in code blocks. `codeMirrorResources` would
* be set to `['mode/clojure/clojure']`.
*
* - The `codeMirrorOptions` key contains all the
* [CodeMirror](https://codemirror.net/doc/manual.html#config) options
* that will be set or changed by this plugin. New options can alse be
* declared via
* [`CodeMirror.defineOption`](https://codemirror.net/doc/manual.html#defineOption),
* and then have their value set here. For example, a plugin that enables
* line numbers would set `codeMirrorOptions` to `{'lineNumbers': true}`.
*
* - Using the **optional** `assets` key you may specify **only** CSS assets
* that should be loaded in the rendered HTML document. Check for example
* the Joplin [Mermaid
* plugin](https://github.com/laurent22/joplin/blob/dev/packages/renderer/MdToHtml/rules/mermaid.ts)
* to see how the data should be structured.
*
* One of the `plugin`, `codeMirrorResources`, or `codeMirrorOptions` keys
* must be provided for the plugin to be valid. Having multiple or all
* provided is also okay.
*
* See also the [demo
* plugin](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/codemirror_content_script)
* for an example of all these keys being used in one plugin.
*
* ## Posting messages from the content script to your plugin
*
* In order to post messages to the plugin, you can use the postMessage
* function passed to the {@link ContentScriptContext | context}.
*
* ```javascript
* const response = await context.postMessage('messageFromCodeMirrorContentScript');
* ```
*
* When you post a message, the plugin can send back a `response` thus
* allowing two-way communication:
*
* ```javascript
* await joplin.contentScripts.onMessage(contentScriptId, (message) => {
* // Process message
* return response; // Can be any object, string or number
* });
* ```
*
* See {@link JoplinContentScripts.onMessage} for more details, as well as
* the [postMessage
* demo](https://github.com/laurent22/joplin/tree/dev/packages/app-cli/tests/support/plugins/post_messages).
*
*/
CodeMirrorPlugin = 'codeMirrorPlugin',
}

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