You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-12-08 23:07:32 +02:00
Compare commits
42 Commits
masterkey-
...
remove-pdf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3dc78cad61 | ||
|
|
f7d14c7afb | ||
|
|
4ff78b9b57 | ||
|
|
c442abd65f | ||
|
|
0e2e867140 | ||
|
|
b83165f9e5 | ||
|
|
7706f9058b | ||
|
|
03222ba1b2 | ||
|
|
d4f49db342 | ||
|
|
40e1b0559e | ||
|
|
738f1decbb | ||
|
|
e5a364d052 | ||
|
|
357a3e2e7b | ||
|
|
af91fd99cc | ||
|
|
3855f60a0d | ||
|
|
079b379e7a | ||
|
|
476906849b | ||
|
|
e23e036677 | ||
|
|
8fd54d41cb | ||
|
|
b824ff5457 | ||
|
|
3669a1b5d6 | ||
|
|
b93f9aaf01 | ||
|
|
8679290206 | ||
|
|
4acec5c6c7 | ||
|
|
f1b03453a4 | ||
|
|
7972dd5556 | ||
|
|
4842500f0a | ||
|
|
84c7f28ec5 | ||
|
|
f3eea43d24 | ||
|
|
8babaddbcb | ||
|
|
13cdaabb17 | ||
|
|
a94aa21088 | ||
|
|
6116bed4e3 | ||
|
|
fabd0b4dda | ||
|
|
6b72f86e7b | ||
|
|
02cf546124 | ||
|
|
eecb012d64 | ||
|
|
04e9b40769 | ||
|
|
efdbaeb397 | ||
|
|
46425b920c | ||
|
|
f5be43c2ac | ||
|
|
080541a2fe |
@@ -396,6 +396,7 @@ packages/app-mobile/components/NoteEditor/NoteEditor.js
|
||||
packages/app-mobile/components/NoteEditor/SearchPanel.js
|
||||
packages/app-mobile/components/NoteEditor/SelectionFormatting.js
|
||||
packages/app-mobile/components/NoteEditor/types.js
|
||||
packages/app-mobile/components/NoteList.js
|
||||
packages/app-mobile/components/ProfileSwitcher/ProfileEditor.js
|
||||
packages/app-mobile/components/ProfileSwitcher/ProfileSwitcher.js
|
||||
packages/app-mobile/components/ProfileSwitcher/useProfileConfig.js
|
||||
@@ -405,6 +406,7 @@ packages/app-mobile/components/SideMenu.js
|
||||
packages/app-mobile/components/TextInput.js
|
||||
packages/app-mobile/components/app-nav.js
|
||||
packages/app-mobile/components/biometrics/BiometricPopup.js
|
||||
packages/app-mobile/components/biometrics/biometricAuthenticate.js
|
||||
packages/app-mobile/components/biometrics/sensorInfo.js
|
||||
packages/app-mobile/components/getResponsiveValue.js
|
||||
packages/app-mobile/components/getResponsiveValue.test.js
|
||||
@@ -710,6 +712,7 @@ packages/lib/services/searchengine/SearchFilter.test.js
|
||||
packages/lib/services/searchengine/filterParser.js
|
||||
packages/lib/services/searchengine/filterParser.test.js
|
||||
packages/lib/services/searchengine/gotoAnythingStyleQuery.js
|
||||
packages/lib/services/searchengine/gotoAnythingStyleQuery.test.js
|
||||
packages/lib/services/searchengine/queryBuilder.js
|
||||
packages/lib/services/share/ShareService.js
|
||||
packages/lib/services/share/ShareService.test.js
|
||||
@@ -871,6 +874,8 @@ packages/tools/website/updateDownloadPage.js
|
||||
packages/tools/website/updateNews.js
|
||||
packages/tools/website/utils/applyTranslations.js
|
||||
packages/tools/website/utils/applyTranslations.test.js
|
||||
packages/tools/website/utils/convertLinksToLocale.js
|
||||
packages/tools/website/utils/convertLinksToLocale.test.js
|
||||
packages/tools/website/utils/frontMatter.js
|
||||
packages/tools/website/utils/news.js
|
||||
packages/tools/website/utils/openGraph.js
|
||||
|
||||
4
.github/workflows/github-actions-main.yml
vendored
4
.github/workflows/github-actions-main.yml
vendored
@@ -71,7 +71,9 @@ jobs:
|
||||
- uses: olegtarasov/get-tag@v2.1
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '18'
|
||||
# We need to pin the version to 18.15, because 18.16+ fails with this error:
|
||||
# https://github.com/facebook/react-native/issues/36440
|
||||
node-version: '18.15.0'
|
||||
|
||||
- name: Install Yarn
|
||||
run: |
|
||||
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -383,6 +383,7 @@ packages/app-mobile/components/NoteEditor/NoteEditor.js
|
||||
packages/app-mobile/components/NoteEditor/SearchPanel.js
|
||||
packages/app-mobile/components/NoteEditor/SelectionFormatting.js
|
||||
packages/app-mobile/components/NoteEditor/types.js
|
||||
packages/app-mobile/components/NoteList.js
|
||||
packages/app-mobile/components/ProfileSwitcher/ProfileEditor.js
|
||||
packages/app-mobile/components/ProfileSwitcher/ProfileSwitcher.js
|
||||
packages/app-mobile/components/ProfileSwitcher/useProfileConfig.js
|
||||
@@ -392,6 +393,7 @@ packages/app-mobile/components/SideMenu.js
|
||||
packages/app-mobile/components/TextInput.js
|
||||
packages/app-mobile/components/app-nav.js
|
||||
packages/app-mobile/components/biometrics/BiometricPopup.js
|
||||
packages/app-mobile/components/biometrics/biometricAuthenticate.js
|
||||
packages/app-mobile/components/biometrics/sensorInfo.js
|
||||
packages/app-mobile/components/getResponsiveValue.js
|
||||
packages/app-mobile/components/getResponsiveValue.test.js
|
||||
@@ -697,6 +699,7 @@ packages/lib/services/searchengine/SearchFilter.test.js
|
||||
packages/lib/services/searchengine/filterParser.js
|
||||
packages/lib/services/searchengine/filterParser.test.js
|
||||
packages/lib/services/searchengine/gotoAnythingStyleQuery.js
|
||||
packages/lib/services/searchengine/gotoAnythingStyleQuery.test.js
|
||||
packages/lib/services/searchengine/queryBuilder.js
|
||||
packages/lib/services/share/ShareService.js
|
||||
packages/lib/services/share/ShareService.test.js
|
||||
@@ -858,6 +861,8 @@ packages/tools/website/updateDownloadPage.js
|
||||
packages/tools/website/updateNews.js
|
||||
packages/tools/website/utils/applyTranslations.js
|
||||
packages/tools/website/utils/applyTranslations.test.js
|
||||
packages/tools/website/utils/convertLinksToLocale.js
|
||||
packages/tools/website/utils/convertLinksToLocale.test.js
|
||||
packages/tools/website/utils/frontMatter.js
|
||||
packages/tools/website/utils/news.js
|
||||
packages/tools/website/utils/openGraph.js
|
||||
|
||||
30
.yarn/patches/rn-fetch-blob-npm-0.12.0-cf02e3c544.patch
Normal file
30
.yarn/patches/rn-fetch-blob-npm-0.12.0-cf02e3c544.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
diff --git a/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java b/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java
|
||||
index a8abd71833879201e3438b2fa51d712a311c4551..ffe9c2c6dfa5c703ba76b65d94d5dd6784102c19 100644
|
||||
--- a/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java
|
||||
+++ b/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java
|
||||
@@ -591,7 +591,7 @@ public class RNFetchBlobReq extends BroadcastReceiver implements Runnable {
|
||||
// ignored.printStackTrace();
|
||||
}
|
||||
|
||||
- RNFetchBlobFileResp rnFetchBlobFileResp = (RNFetchBlobFileResp) responseBody;
|
||||
+ RNFetchBlobFileResp rnFetchBlobFileResp = new RNFetchBlobFileResp(responseBody);
|
||||
|
||||
if(rnFetchBlobFileResp != null && !rnFetchBlobFileResp.isDownloadComplete()){
|
||||
callback.invoke("Download interrupted.", null);
|
||||
diff --git a/android/src/main/java/com/RNFetchBlob/Response/RNFetchBlobFileResp.java b/android/src/main/java/com/RNFetchBlob/Response/RNFetchBlobFileResp.java
|
||||
index 2470eef612308c15a89dfea5a1f16937469be29f..965f8becc195965907699182c764ec9e51811450 100644
|
||||
--- a/android/src/main/java/com/RNFetchBlob/Response/RNFetchBlobFileResp.java
|
||||
+++ b/android/src/main/java/com/RNFetchBlob/Response/RNFetchBlobFileResp.java
|
||||
@@ -35,6 +35,12 @@ public class RNFetchBlobFileResp extends ResponseBody {
|
||||
FileOutputStream ofStream;
|
||||
boolean isEndMarkerReceived;
|
||||
|
||||
+ // ref: https://github.com/joltup/rn-fetch-blob/issues/490#issuecomment-990899440
|
||||
+ public RNFetchBlobFileResp(ResponseBody body) {
|
||||
+ super();
|
||||
+ this.originalBody = body;
|
||||
+ }
|
||||
+
|
||||
public RNFetchBlobFileResp(ReactApplicationContext ctx, String taskId, ResponseBody body, String path, boolean overwrite) throws IOException {
|
||||
super();
|
||||
this.rctContext = ctx;
|
||||
@@ -657,6 +657,16 @@ footer .bottom-links-row p {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
.language-switcher {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
.language-switcher > button {
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
color: #0557ba;
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
WHAT'S NEW PAGE
|
||||
*****************************************************************/
|
||||
|
||||
7
Assets/WebsiteAssets/js/bootstrap5.0.2.bundle.min.js
vendored
Normal file
7
Assets/WebsiteAssets/js/bootstrap5.0.2.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
5016
Assets/WebsiteAssets/js/bootstrap5.0.2.js
vendored
5016
Assets/WebsiteAssets/js/bootstrap5.0.2.js
vendored
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -421,7 +421,7 @@
|
||||
</div>
|
||||
|
||||
<script
|
||||
src="{{jsBaseUrl}}/bootstrap5.0.2.min.js"
|
||||
src="{{jsBaseUrl}}/bootstrap5.0.2.bundle.min.js"
|
||||
rel="preload"
|
||||
as="script"
|
||||
></script>
|
||||
|
||||
@@ -85,6 +85,11 @@ https://github.com/laurent22/joplin/blob/dev/{{{sourceMarkdownFile}}}
|
||||
{{> footer}}
|
||||
</div>
|
||||
|
||||
<script
|
||||
src="{{jsBaseUrl}}/bootstrap5.0.2.bundle.min.js"
|
||||
rel="preload"
|
||||
as="script"
|
||||
></script>
|
||||
<script src="{{{assetUrls.js.script}}}"></script>
|
||||
|
||||
{{> analytics}}
|
||||
|
||||
@@ -17,6 +17,21 @@
|
||||
<a href="{{baseUrl}}/help/" class="fw500">Help</a>
|
||||
<a href="{{forumUrl}}" class="fw500">Forum</a>
|
||||
<a href="{{baseUrl}}/cn/" class="fw500">中文</a>
|
||||
|
||||
<!--
|
||||
<div class="dropdown language-switcher">
|
||||
<button class="fw500" type="button" id="dropdownMenuButton1" data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Language
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="dropdownMenuButton1">
|
||||
<li><a class="dropdown-item" href="#">Action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Another action</a></li>
|
||||
<li><a class="dropdown-item" href="#">Something else here</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
-->
|
||||
|
||||
|
||||
{{#showJoplinCloudLinks}}
|
||||
{{> joplinCloudButton}}
|
||||
{{/showJoplinCloudLinks}}
|
||||
|
||||
@@ -126,6 +126,7 @@ A community maintained list of these distributions can be found here: [Unofficia
|
||||
- [Writing a technical spec](https://github.com/laurent22/joplin/blob/dev/readme/technical_spec.md)
|
||||
- [Desktop application styling](https://github.com/laurent22/joplin/blob/dev/readme/spec/desktop_styling.md)
|
||||
- [Note History spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/history.md)
|
||||
- [Synchronisation spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/sync.md)
|
||||
- [Sync Lock spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/sync_lock.md)
|
||||
- [Synchronous Scroll spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/sync_scroll.md)
|
||||
- [Plugin Architecture spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/plugins.md)
|
||||
|
||||
7
bootstrap.bundle.min.js
vendored
Normal file
7
bootstrap.bundle.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@@ -95,6 +95,7 @@
|
||||
},
|
||||
"packageManager": "yarn@3.3.1",
|
||||
"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-camera@4.2.1": "patch:react-native-camera@npm%3A4.2.1#./.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch",
|
||||
"rn-fetch-blob@0.12.0": "patch:rn-fetch-blob@npm%3A0.12.0#./.yarn/patches/rn-fetch-blob-npm-0.12.0-cf02e3c544.patch"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -641,8 +641,8 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
||||
resourceInfos: props.resourceInfos,
|
||||
contentMaxWidth: props.contentMaxWidth,
|
||||
mapsToLine: true,
|
||||
// Always using useCustomPdfViewer for now, we can add a new setting for it in future if we need to.
|
||||
useCustomPdfViewer: props.useCustomPdfViewer,
|
||||
// turning off custom pdf viewer; ref: https://github.com/laurent22/joplin/issues/8028
|
||||
useCustomPdfViewer: false,
|
||||
noteId: props.noteId,
|
||||
vendorDir: bridge().vendorDir(),
|
||||
}));
|
||||
|
||||
@@ -7,6 +7,8 @@ import { ContextMenuItemType, ContextMenuOptions } from './NoteEditor/utils/cont
|
||||
import CommandService from '@joplin/lib/services/CommandService';
|
||||
import styled from 'styled-components';
|
||||
import { themeStyle } from '@joplin/lib/theme';
|
||||
const Entities = require('html-entities').AllHtmlEntities;
|
||||
const htmlentities = new Entities().encode;
|
||||
|
||||
const Window = styled.div`
|
||||
height: 100%;
|
||||
@@ -19,12 +21,6 @@ const Window = styled.div`
|
||||
color: ${(props: any) => props.theme.color};
|
||||
`;
|
||||
|
||||
const IFrame = styled.iframe`
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
border: none;
|
||||
`;
|
||||
|
||||
interface Props {
|
||||
themeId: number;
|
||||
dispatch: Function;
|
||||
@@ -93,13 +89,12 @@ export default function PdfViewer(props: Props) {
|
||||
|
||||
const theme = themeStyle(props.themeId);
|
||||
|
||||
const escapedResourcePath = htmlentities(Resource.fullPath(props.resource));
|
||||
const escapedMime = htmlentities('application/pdf');
|
||||
|
||||
return (
|
||||
<Window theme={theme}>
|
||||
<IFrame src="./vendor/lib/@joplin/pdf-viewer/index.html" x-url={Resource.fullPath(props.resource)}
|
||||
x-appearance={theme.appearance} ref={iframeRef}
|
||||
x-title={props.resource.title}
|
||||
x-anchorpage={props.pageNo}
|
||||
x-type="full"></IFrame>
|
||||
<object data={escapedResourcePath} className="media-player media-pdf" type={escapedMime}></object>;
|
||||
</Window>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
},
|
||||
"build": {
|
||||
"appId": "net.cozic.joplin-desktop",
|
||||
"compression": "maximum",
|
||||
"productName": "Joplin",
|
||||
"npmRebuild": false,
|
||||
"afterSign": "./tools/notarizeMacApp.js",
|
||||
@@ -137,7 +138,6 @@
|
||||
"@fortawesome/fontawesome-free": "5.15.4",
|
||||
"@joeattardi/emoji-button": "4.6.4",
|
||||
"@joplin/lib": "~2.11",
|
||||
"@joplin/pdf-viewer": "~2.11",
|
||||
"@joplin/renderer": "~2.11",
|
||||
"async-mutex": "0.4.0",
|
||||
"codemirror": "5.65.9",
|
||||
@@ -149,6 +149,7 @@
|
||||
"formatcoords": "1.1.3",
|
||||
"fs-extra": "11.1.1",
|
||||
"highlight.js": "11.7.0",
|
||||
"html-entities": "1.4.0",
|
||||
"immer": "7.0.15",
|
||||
"keytar": "7.9.0",
|
||||
"mark.js": "8.11.1",
|
||||
|
||||
@@ -72,10 +72,6 @@ async function main() {
|
||||
src: langSourceDir,
|
||||
dest: `${buildLibDir}/tinymce/langs`,
|
||||
},
|
||||
{
|
||||
src: resolve(__dirname, '../../pdf-viewer/dist'),
|
||||
dest: `${buildLibDir}/@joplin/pdf-viewer`,
|
||||
},
|
||||
];
|
||||
|
||||
const files = [
|
||||
@@ -93,10 +89,6 @@ async function main() {
|
||||
src: resolve(__dirname, '../../lib/services/plugins/sandboxProxy.js'),
|
||||
dest: `${buildLibDir}/@joplin/lib/services/plugins/sandboxProxy.js`,
|
||||
},
|
||||
{
|
||||
src: resolve(__dirname, '../../pdf-viewer/index.html'),
|
||||
dest: `${buildLibDir}/@joplin/pdf-viewer/index.html`,
|
||||
},
|
||||
];
|
||||
|
||||
// First we delete all the destination directories, then we copy the files.
|
||||
|
||||
@@ -150,8 +150,8 @@ android {
|
||||
applicationId "net.cozic.joplin"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 2097685
|
||||
versionName "2.11.0"
|
||||
versionCode 2097687
|
||||
versionName "2.11.2"
|
||||
// ndk {
|
||||
// abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
|
||||
// }
|
||||
|
||||
@@ -3,62 +3,57 @@
|
||||
*/
|
||||
|
||||
|
||||
import { EditorSettings } from '../types';
|
||||
import { initCodeMirror } from './CodeMirror';
|
||||
import { themeStyle } from '@joplin/lib/theme';
|
||||
import Setting from '@joplin/lib/models/Setting';
|
||||
import { forceParsing } from '@codemirror/language';
|
||||
import loadLangauges from './testUtil/loadLanguages';
|
||||
|
||||
// Randomly fails on:
|
||||
//
|
||||
// > 42 | expect(headerLineContent.textContent).toBe(headerLineText);
|
||||
//
|
||||
import { expect, describe, it } from '@jest/globals';
|
||||
|
||||
|
||||
const createEditorSettings = (themeId: number) => {
|
||||
const themeData = themeStyle(themeId);
|
||||
const editorSettings: EditorSettings = {
|
||||
katexEnabled: true,
|
||||
spellcheckEnabled: true,
|
||||
themeId,
|
||||
themeData,
|
||||
};
|
||||
|
||||
return editorSettings;
|
||||
};
|
||||
|
||||
describe('CodeMirror', () => {
|
||||
it('should succeed', async () => {
|
||||
expect(1).toBe(1);
|
||||
// This checks for a regression -- occasionally, when updating packages,
|
||||
// syntax highlighting in the CodeMirror editor stops working. This is usually
|
||||
// fixed by
|
||||
// 1. removing all `@codemirror/` and `@lezer/` dependencies from yarn.lock,
|
||||
// 2. upgrading all CodeMirror packages to the latest versions in package.json, and
|
||||
// 3. re-running `yarn install`.
|
||||
//
|
||||
// See https://github.com/laurent22/joplin/issues/7253
|
||||
it('should give headings a different style', async () => {
|
||||
const headerLineText = '# Testing...';
|
||||
const initialText = `${headerLineText}\nThis is a test.`;
|
||||
const editorSettings = createEditorSettings(Setting.THEME_LIGHT);
|
||||
|
||||
await loadLangauges();
|
||||
const editor = initCodeMirror(document.body, initialText, editorSettings);
|
||||
|
||||
// Force the generation of the syntax tree now.
|
||||
forceParsing(editor.editor);
|
||||
|
||||
// CodeMirror nests the tag that styles the header within .cm-headerLine:
|
||||
// <div class='cm-headerLine'><span class='someclass'>Testing...</span></div>
|
||||
const headerLineContent = document.body.querySelector('.cm-headerLine > span')!;
|
||||
|
||||
|
||||
expect(headerLineContent.textContent).toBe(headerLineText);
|
||||
|
||||
const style = getComputedStyle(headerLineContent);
|
||||
expect(style.borderBottom).not.toBe('');
|
||||
expect(style.fontSize).toBe('1.6em');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
// import { EditorSettings } from '../types';
|
||||
// import { initCodeMirror } from './CodeMirror';
|
||||
// import { themeStyle } from '@joplin/lib/theme';
|
||||
// import Setting from '@joplin/lib/models/Setting';
|
||||
// import { forceParsing } from '@codemirror/language';
|
||||
// import loadLangauges from './testUtil/loadLanguages';
|
||||
|
||||
|
||||
// const createEditorSettings = (themeId: number) => {
|
||||
// const themeData = themeStyle(themeId);
|
||||
// const editorSettings: EditorSettings = {
|
||||
// katexEnabled: true,
|
||||
// spellcheckEnabled: true,
|
||||
// themeId,
|
||||
// themeData,
|
||||
// };
|
||||
|
||||
// return editorSettings;
|
||||
// };
|
||||
|
||||
// describe('CodeMirror', () => {
|
||||
// it('should give headings a different style', async () => {
|
||||
// const headerLineText = '# Testing...';
|
||||
// const initialText = `${headerLineText}\nThis is a test.`;
|
||||
// const editorSettings = createEditorSettings(Setting.THEME_LIGHT);
|
||||
|
||||
// await loadLangauges();
|
||||
// const editor = initCodeMirror(document.body, initialText, editorSettings);
|
||||
|
||||
// // Force the generation of the syntax tree now.
|
||||
// forceParsing(editor.editor);
|
||||
|
||||
// // CodeMirror nests the tag that styles the header within .cm-headerLine:
|
||||
// // <div class='cm-headerLine'><span class='someclass'>Testing...</span></div>
|
||||
// const headerLineContent = document.body.querySelector('.cm-headerLine > span')!;
|
||||
|
||||
|
||||
// expect(headerLineContent.textContent).toBe(headerLineText);
|
||||
|
||||
// const style = getComputedStyle(headerLineContent);
|
||||
// expect(style.borderBottom).not.toBe('');
|
||||
// expect(style.fontSize).toBe('1.6em');
|
||||
// });
|
||||
// });
|
||||
|
||||
@@ -1,15 +1,32 @@
|
||||
const React = require('react');
|
||||
const Component = React.Component;
|
||||
const { connect } = require('react-redux');
|
||||
const { FlatList, Text, StyleSheet, Button, View } = require('react-native');
|
||||
|
||||
import { Component } from 'react';
|
||||
|
||||
import { connect } from 'react-redux';
|
||||
import { FlatList, Text, StyleSheet, Button, View } from 'react-native';
|
||||
import { FolderEntity, NoteEntity } from '@joplin/lib/services/database/types';
|
||||
import { AppState } from '../utils/types';
|
||||
|
||||
const { _ } = require('@joplin/lib/locale');
|
||||
const { NoteItem } = require('./note-item.js');
|
||||
const time = require('@joplin/lib/time').default;
|
||||
const { themeStyle } = require('./global-style.js');
|
||||
|
||||
class NoteListComponent extends Component {
|
||||
constructor() {
|
||||
super();
|
||||
interface NoteListProps {
|
||||
themeId: string;
|
||||
dispatch: (action: any)=> void;
|
||||
notesSource: string;
|
||||
items: NoteEntity[];
|
||||
folders: FolderEntity[];
|
||||
noteSelectionEnabled?: boolean;
|
||||
selectedFolderId?: string;
|
||||
}
|
||||
|
||||
class NoteListComponent extends Component<NoteListProps> {
|
||||
private rootRef_: FlatList;
|
||||
private styles_: Record<string, StyleSheet.NamedStyles<any>>;
|
||||
|
||||
public constructor(props: NoteListProps) {
|
||||
super(props);
|
||||
|
||||
this.state = {
|
||||
items: [],
|
||||
@@ -21,7 +38,7 @@ class NoteListComponent extends Component {
|
||||
this.createNotebookButton_click = this.createNotebookButton_click.bind(this);
|
||||
}
|
||||
|
||||
styles() {
|
||||
private styles() {
|
||||
const themeId = this.props.themeId;
|
||||
const theme = themeStyle(themeId);
|
||||
|
||||
@@ -47,7 +64,7 @@ class NoteListComponent extends Component {
|
||||
return this.styles_[themeId];
|
||||
}
|
||||
|
||||
createNotebookButton_click() {
|
||||
private createNotebookButton_click() {
|
||||
this.props.dispatch({
|
||||
type: 'NAV_GO',
|
||||
routeName: 'Folder',
|
||||
@@ -55,34 +72,14 @@ class NoteListComponent extends Component {
|
||||
});
|
||||
}
|
||||
|
||||
filterNotes(notes) {
|
||||
const todoFilter = 'all'; // Setting.value('todoFilter');
|
||||
if (todoFilter === 'all') return notes;
|
||||
|
||||
const now = time.unixMs();
|
||||
const maxInterval = 1000 * 60 * 60 * 24;
|
||||
const notRecentTime = now - maxInterval;
|
||||
|
||||
const output = [];
|
||||
for (let i = 0; i < notes.length; i++) {
|
||||
const note = notes[i];
|
||||
if (note.is_todo) {
|
||||
if (todoFilter === 'recent' && note.user_updated_time < notRecentTime && !!note.todo_completed) continue;
|
||||
if (todoFilter === 'nonCompleted' && !!note.todo_completed) continue;
|
||||
}
|
||||
output.push(note);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
UNSAFE_componentWillReceiveProps(newProps) {
|
||||
public UNSAFE_componentWillReceiveProps(newProps: NoteListProps) {
|
||||
// Make sure scroll position is reset when switching from one folder to another or to a tag list.
|
||||
if (this.rootRef_ && newProps.notesSource !== this.props.notesSource) {
|
||||
this.rootRef_.scrollToOffset({ offset: 0, animated: false });
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
public render() {
|
||||
// `enableEmptySections` is to fix this warning: https://github.com/FaridSafi/react-native-gifted-listview/issues/39
|
||||
|
||||
if (this.props.items.length) {
|
||||
@@ -109,7 +106,7 @@ class NoteListComponent extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
const NoteList = connect(state => {
|
||||
const NoteList = connect((state: AppState) => {
|
||||
return {
|
||||
items: state.notes,
|
||||
folders: state.folders,
|
||||
@@ -119,4 +116,4 @@ const NoteList = connect(state => {
|
||||
};
|
||||
})(NoteListComponent);
|
||||
|
||||
module.exports = { NoteList };
|
||||
export default NoteList;
|
||||
@@ -2,9 +2,12 @@ const React = require('react');
|
||||
import Setting from '@joplin/lib/models/Setting';
|
||||
import { useEffect, useMemo, useState } from 'react';
|
||||
import { View, Dimensions, Alert, Button } from 'react-native';
|
||||
import FingerprintScanner from 'react-native-fingerprint-scanner';
|
||||
import { SensorInfo } from './sensorInfo';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import Logger from '@joplin/lib/Logger';
|
||||
import biometricAuthenticate from './biometricAuthenticate';
|
||||
|
||||
const logger = Logger.create('BiometricPopup');
|
||||
|
||||
interface Props {
|
||||
themeId: number;
|
||||
@@ -18,23 +21,31 @@ export default (props: Props) => {
|
||||
// doesn't work properly, we disable it. We only want the user to enable the
|
||||
// feature after they've read the description in the config screen.
|
||||
const [initialPromptDone, setInitialPromptDone] = useState(true); // useState(Setting.value('security.biometricsInitialPromptDone'));
|
||||
const [display, setDisplay] = useState(!!props.sensorInfo.supportedSensors && (props.sensorInfo.enabled || !initialPromptDone));
|
||||
const [display, setDisplay] = useState(props.sensorInfo.enabled || !initialPromptDone);
|
||||
const [tryBiometricsCheck, setTryBiometricsCheck] = useState(initialPromptDone);
|
||||
|
||||
logger.info('Render start');
|
||||
logger.info('initialPromptDone', initialPromptDone);
|
||||
logger.info('display', display);
|
||||
logger.info('tryBiometricsCheck', tryBiometricsCheck);
|
||||
logger.info('props.sensorInfo', props.sensorInfo);
|
||||
|
||||
useEffect(() => {
|
||||
if (!display || !tryBiometricsCheck) return;
|
||||
|
||||
const biometricsCheck = async () => {
|
||||
logger.info('biometricsCheck: start');
|
||||
|
||||
try {
|
||||
await FingerprintScanner.authenticate({ description: _('Verify your identity') });
|
||||
setTryBiometricsCheck(false);
|
||||
await biometricAuthenticate();
|
||||
setDisplay(false);
|
||||
} catch (error) {
|
||||
Alert.alert(_('Could not verify your identify'), error.message);
|
||||
setTryBiometricsCheck(false);
|
||||
} finally {
|
||||
FingerprintScanner.release();
|
||||
Alert.alert(error.message);
|
||||
}
|
||||
|
||||
setTryBiometricsCheck(false);
|
||||
|
||||
logger.info('biometricsCheck: end');
|
||||
};
|
||||
|
||||
void biometricsCheck();
|
||||
@@ -45,6 +56,9 @@ export default (props: Props) => {
|
||||
if (!display) return;
|
||||
|
||||
const complete = (enableBiometrics: boolean) => {
|
||||
logger.info('complete: start');
|
||||
logger.info('complete: enableBiometrics:', enableBiometrics);
|
||||
|
||||
setInitialPromptDone(true);
|
||||
Setting.setValue('security.biometricsInitialPromptDone', true);
|
||||
Setting.setValue('security.biometricsEnabled', enableBiometrics);
|
||||
@@ -59,6 +73,8 @@ export default (props: Props) => {
|
||||
type: 'BIOMETRICS_DONE_SET',
|
||||
value: true,
|
||||
});
|
||||
|
||||
logger.info('complete: end');
|
||||
};
|
||||
|
||||
Alert.alert(
|
||||
@@ -77,7 +93,7 @@ export default (props: Props) => {
|
||||
},
|
||||
]
|
||||
);
|
||||
}, [initialPromptDone, props.sensorInfo.supportedSensors, display, props.dispatch]);
|
||||
}, [initialPromptDone, display, props.dispatch]);
|
||||
|
||||
const windowSize = useMemo(() => {
|
||||
return {
|
||||
@@ -87,12 +103,18 @@ export default (props: Props) => {
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
logger.info('effect 1: start');
|
||||
|
||||
if (!display) {
|
||||
logger.info('effect 1: display', display);
|
||||
|
||||
props.dispatch({
|
||||
type: 'BIOMETRICS_DONE_SET',
|
||||
value: true,
|
||||
});
|
||||
}
|
||||
|
||||
logger.info('effect 1: end');
|
||||
}, [display, props.dispatch]);
|
||||
|
||||
const renderTryAgainButton = () => {
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
import Logger from '@joplin/lib/Logger';
|
||||
import FingerprintScanner, { Errors } from 'react-native-fingerprint-scanner';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
|
||||
const logger = Logger.create('biometricAuthenticate');
|
||||
|
||||
export default async () => {
|
||||
try {
|
||||
logger.info('Authenticate...');
|
||||
await FingerprintScanner.authenticate({ description: _('Verify your identity') });
|
||||
logger.info('Authenticate done');
|
||||
} catch (error) {
|
||||
const errorName = (error as Errors).name;
|
||||
|
||||
let errorMessage = error.message;
|
||||
if (errorName === 'FingerprintScannerNotEnrolled' || errorName === 'FingerprintScannerNotAvailable') {
|
||||
errorMessage = _('Biometric unlock is not setup on the device. Please set it up in order to unlock Joplin. If the device is on lockout, consider switching it off and on to reset biometrics scanning.');
|
||||
}
|
||||
|
||||
error.message = _('Could not verify your identify: %s', errorMessage);
|
||||
|
||||
logger.warn(error);
|
||||
|
||||
throw error;
|
||||
} finally {
|
||||
FingerprintScanner.release();
|
||||
}
|
||||
};
|
||||
@@ -1,5 +1,7 @@
|
||||
import Logger from '@joplin/lib/Logger';
|
||||
import Setting from '@joplin/lib/models/Setting';
|
||||
import FingerprintScanner from 'react-native-fingerprint-scanner';
|
||||
const logger = Logger.create('sensorInfo');
|
||||
|
||||
export interface SensorInfo {
|
||||
enabled: boolean;
|
||||
@@ -12,6 +14,9 @@ export default async (): Promise<SensorInfo> => {
|
||||
// FingerprintScanner scanner calls, since it seems they can fail and freeze
|
||||
// the app.
|
||||
|
||||
logger.info('Start');
|
||||
logger.info('security.biometricsEnabled', Setting.value('security.biometricsEnabled'));
|
||||
|
||||
if (!Setting.value('security.biometricsEnabled')) {
|
||||
return {
|
||||
enabled: false,
|
||||
@@ -24,7 +29,21 @@ export default async (): Promise<SensorInfo> => {
|
||||
let supportedSensors = '';
|
||||
|
||||
try {
|
||||
logger.info('Getting isSensorAvailable...');
|
||||
|
||||
// Note: If `isSensorAvailable()` doesn't return anything, it seems we
|
||||
// could assume that biometrics are not setup on the device, and thus we
|
||||
// can unlock the app. However that's not always correct - on some
|
||||
// devices (eg Galaxy S22), `isSensorAvailable()` will return nothing if
|
||||
// the device is on lockout - i.e. if the user gave the wrong
|
||||
// fingerprint multiple times.
|
||||
//
|
||||
// So we definitely can't unlock the app in that case, and it means
|
||||
// `isSensorAvailable()` is pretty much useless. Instead we ask for
|
||||
// fingerprint when the user turns on the feature and at that point we
|
||||
// know if the device supports biometrics or not.
|
||||
const result = await FingerprintScanner.isSensorAvailable();
|
||||
logger.info('isSensorAvailable result', result);
|
||||
supportedSensors = result;
|
||||
|
||||
if (result) {
|
||||
@@ -34,7 +53,7 @@ export default async (): Promise<SensorInfo> => {
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.warn('Could not check for biometrics sensor:', error);
|
||||
logger.warn('Could not check for biometrics sensor:', error);
|
||||
Setting.setValue('security.biometricsSupportedSensors', '');
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ const { themeStyle } = require('../global-style.js');
|
||||
const shared = require('@joplin/lib/components/shared/config-shared.js');
|
||||
import SyncTargetRegistry from '@joplin/lib/SyncTargetRegistry';
|
||||
import { openDocumentTree } from '@joplin/react-native-saf-x';
|
||||
import biometricAuthenticate from '../biometrics/biometricAuthenticate';
|
||||
|
||||
class ConfigScreenComponent extends BaseScreenComponent {
|
||||
public static navigationOptions(): any {
|
||||
@@ -463,7 +464,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
||||
<Text key="label" style={this.styles().switchSettingText}>
|
||||
{label}
|
||||
</Text>
|
||||
<Switch key="control" style={this.styles().switchSettingControl} trackColor={{ false: theme.dividerColor }} value={value} onValueChange={(value: any) => updateSettingValue(key, value)} />
|
||||
<Switch key="control" style={this.styles().switchSettingControl} trackColor={{ false: theme.dividerColor }} value={value} onValueChange={(value: any) => void updateSettingValue(key, value)} />
|
||||
</View>
|
||||
{descriptionComp}
|
||||
</View>
|
||||
@@ -474,13 +475,39 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
||||
return !hasDescription ? this.styles().settingContainer : this.styles().settingContainerNoBottomBorder;
|
||||
}
|
||||
|
||||
private async handleSetting(key: string, value: any): Promise<boolean> {
|
||||
// When the user tries to enable biometrics unlock, we ask for the
|
||||
// fingerprint or Face ID, and if it's correct we save immediately. If
|
||||
// it's not, we don't turn on the setting.
|
||||
if (key === 'security.biometricsEnabled' && !!value) {
|
||||
try {
|
||||
await biometricAuthenticate();
|
||||
shared.updateSettingValue(this, key, value);
|
||||
await this.saveButton_press();
|
||||
} catch (error) {
|
||||
shared.updateSettingValue(this, key, false);
|
||||
Alert.alert(error.message);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if (key === 'security.biometricsEnabled' && !value) {
|
||||
shared.updateSettingValue(this, key, value);
|
||||
await this.saveButton_press();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public settingToComponent(key: string, value: any) {
|
||||
const themeId = this.props.themeId;
|
||||
const theme = themeStyle(themeId);
|
||||
const output: any = null;
|
||||
|
||||
const updateSettingValue = (key: string, value: any) => {
|
||||
return shared.updateSettingValue(this, key, value);
|
||||
const updateSettingValue = async (key: string, value: any) => {
|
||||
const handled = await this.handleSetting(key, value);
|
||||
if (!handled) shared.updateSettingValue(this, key, value);
|
||||
};
|
||||
|
||||
const md = Setting.settingMetadata(key);
|
||||
@@ -517,7 +544,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
||||
fontSize: theme.fontSize,
|
||||
}}
|
||||
onValueChange={(itemValue: string) => {
|
||||
updateSettingValue(key, itemValue);
|
||||
void updateSettingValue(key, itemValue);
|
||||
}}
|
||||
/>
|
||||
</View>
|
||||
@@ -553,7 +580,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
||||
</Text>
|
||||
<View style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', flex: 1 }}>
|
||||
<Text style={this.styles().sliderUnits}>{unitLabel}</Text>
|
||||
<Slider key="control" style={{ flex: 1 }} step={md.step} minimumValue={minimum} maximumValue={maximum} value={value} onValueChange={value => updateSettingValue(key, value)} />
|
||||
<Slider key="control" style={{ flex: 1 }} step={md.step} minimumValue={minimum} maximumValue={maximum} value={value} onValueChange={value => void updateSettingValue(key, value)} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
@@ -577,7 +604,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
||||
<Text key="label" style={this.styles().settingText}>
|
||||
{md.label()}
|
||||
</Text>
|
||||
<TextInput autoCorrect={false} autoComplete="off" selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} autoCapitalize="none" key="control" style={this.styles().settingControl} value={value} onChangeText={(value: any) => updateSettingValue(key, value)} secureTextEntry={!!md.secure} />
|
||||
<TextInput autoCorrect={false} autoComplete="off" selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} autoCapitalize="none" key="control" style={this.styles().settingControl} value={value} onChangeText={(value: any) => void updateSettingValue(key, value)} secureTextEntry={!!md.secure} />
|
||||
</View>
|
||||
);
|
||||
} else {
|
||||
|
||||
@@ -2,7 +2,7 @@ const React = require('react');
|
||||
import { AppState as RNAppState, View, StyleSheet, NativeEventSubscription } from 'react-native';
|
||||
import { stateUtils } from '@joplin/lib/reducer';
|
||||
import { connect } from 'react-redux';
|
||||
const { NoteList } = require('../note-list.js');
|
||||
import NoteList from '../NoteList';
|
||||
import Folder from '@joplin/lib/models/Folder';
|
||||
import Tag from '@joplin/lib/models/Tag';
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
@@ -254,7 +254,7 @@ class NotesScreenComponent extends BaseScreenComponent<any> {
|
||||
return (
|
||||
<View style={rootStyle}>
|
||||
<ScreenHeader title={iconString + title} showBackButton={false} parentComponent={thisComp} sortButton_press={this.sortButton_press} folderPickerOptions={this.folderPickerOptions()} showSearchButton={true} showSideMenuButton={true} />
|
||||
<NoteList style={this.styles().noteList} />
|
||||
<NoteList />
|
||||
{actionButtonComp}
|
||||
<DialogBox
|
||||
ref={(dialogbox: any) => {
|
||||
|
||||
@@ -328,7 +328,7 @@ PODS:
|
||||
- React-Core
|
||||
- react-native-image-resizer (1.4.5):
|
||||
- React-Core
|
||||
- react-native-netinfo (9.3.7):
|
||||
- react-native-netinfo (9.3.8):
|
||||
- React-Core
|
||||
- react-native-rsa-native (2.0.5):
|
||||
- React
|
||||
@@ -722,7 +722,7 @@ SPEC CHECKSUMS:
|
||||
react-native-get-random-values: a6ea6a8a65dc93e96e24a11105b1a9c8cfe1d72a
|
||||
react-native-image-picker: ec9b713e248760bfa0f879f0715391de4651a7cb
|
||||
react-native-image-resizer: d9fb629a867335bdc13230ac2a58702bb8c8828f
|
||||
react-native-netinfo: 2517ad504b3d303e90d7a431b0fcaef76d207983
|
||||
react-native-netinfo: fbc23bc2fe217155d85f2f7e0644b1654df8029b
|
||||
react-native-rsa-native: 12132eb627797529fdb1f0d22fd0f8f9678df64a
|
||||
react-native-saf-x: 9bd5238d3b43d76bbec64aa82c173ac20a4bce9f
|
||||
react-native-safe-area-context: 39c2d8be3328df5d437ac1700f4f3a4f75716acc
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"@react-native-community/clipboard": "1.5.1",
|
||||
"@react-native-community/datetimepicker": "6.7.5",
|
||||
"@react-native-community/geolocation": "2.1.0",
|
||||
"@react-native-community/netinfo": "9.3.7",
|
||||
"@react-native-community/netinfo": "9.3.8",
|
||||
"@react-native-community/push-notification-ios": "1.10.1",
|
||||
"@react-native-community/slider": "4.4.2",
|
||||
"assert-browserify": "2.0.0",
|
||||
@@ -54,7 +54,7 @@
|
||||
"react-native-image-picker": "5.3.1",
|
||||
"react-native-image-resizer": "1.4.5",
|
||||
"react-native-modal-datetime-picker": "14.0.1",
|
||||
"react-native-paper": "5.4.1",
|
||||
"react-native-paper": "5.5.2",
|
||||
"react-native-popup-menu": "0.16.1",
|
||||
"react-native-quick-actions": "0.3.13",
|
||||
"react-native-rsa-native": "2.0.5",
|
||||
@@ -79,19 +79,19 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.16.0",
|
||||
"@babel/runtime": "7.16.3",
|
||||
"@codemirror/commands": "6.1.2",
|
||||
"@codemirror/commands": "6.2.2",
|
||||
"@codemirror/lang-cpp": "6.0.2",
|
||||
"@codemirror/lang-html": "6.4.0",
|
||||
"@codemirror/lang-html": "6.4.3",
|
||||
"@codemirror/lang-java": "6.0.1",
|
||||
"@codemirror/lang-javascript": "6.1.1",
|
||||
"@codemirror/lang-markdown": "6.0.5",
|
||||
"@codemirror/lang-javascript": "6.1.5",
|
||||
"@codemirror/lang-markdown": "6.1.0",
|
||||
"@codemirror/lang-php": "6.0.1",
|
||||
"@codemirror/lang-rust": "6.0.1",
|
||||
"@codemirror/language": "6.3.2",
|
||||
"@codemirror/legacy-modes": "6.3.1",
|
||||
"@codemirror/search": "6.2.3",
|
||||
"@codemirror/state": "6.1.4",
|
||||
"@codemirror/view": "6.7.1",
|
||||
"@codemirror/language": "6.6.0",
|
||||
"@codemirror/legacy-modes": "6.3.2",
|
||||
"@codemirror/search": "6.3.0",
|
||||
"@codemirror/state": "6.2.0",
|
||||
"@codemirror/view": "6.9.3",
|
||||
"@joplin/tools": "~2.11",
|
||||
"@lezer/highlight": "1.1.4",
|
||||
"@types/fs-extra": "9.0.13",
|
||||
|
||||
@@ -501,7 +501,7 @@ async function initialize(dispatch: Function) {
|
||||
if (Setting.value('env') === 'prod') {
|
||||
await db.open({ name: getDatabaseName(currentProfile, isSubProfile) });
|
||||
} else {
|
||||
await db.open({ name: getDatabaseName(currentProfile, isSubProfile, '-1') });
|
||||
await db.open({ name: getDatabaseName(currentProfile, isSubProfile, '-3') });
|
||||
|
||||
// await db.clearForTesting();
|
||||
}
|
||||
@@ -984,6 +984,10 @@ class AppComponent extends React.Component {
|
||||
const biometricIsEnabled = !!this.state.sensorInfo && this.state.sensorInfo.enabled;
|
||||
const shouldShowMainContent = !biometricIsEnabled || this.props.biometricsDone;
|
||||
|
||||
logger.info('root.biometrics: biometricIsEnabled', biometricIsEnabled);
|
||||
logger.info('root.biometrics: shouldShowMainContent', shouldShowMainContent);
|
||||
logger.info('root.biometrics: this.state.sensorInfo', this.state.sensorInfo);
|
||||
|
||||
const mainContent = (
|
||||
<View style={{ flex: 1, backgroundColor: theme.backgroundColor }}>
|
||||
<SideMenu
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"chalk": "2.4.2",
|
||||
"slugify": "1.6.5",
|
||||
"slugify": "1.6.6",
|
||||
"yeoman-generator": "5.8.0",
|
||||
"yosay": "2.0.2"
|
||||
},
|
||||
|
||||
@@ -1395,7 +1395,7 @@ class Setting extends BaseModel {
|
||||
useCustomPdfViewer: {
|
||||
value: false,
|
||||
type: SettingItemType.Bool,
|
||||
public: true,
|
||||
public: false,
|
||||
advanced: true,
|
||||
appTypes: [AppType.Desktop],
|
||||
label: () => 'Use custom PDF viewer (Beta)',
|
||||
|
||||
@@ -110,6 +110,8 @@ export default class ReportService {
|
||||
let syncedCount = 0;
|
||||
for (let i = 0; i < BaseItem.syncItemDefinitions_.length; i++) {
|
||||
const d = BaseItem.syncItemDefinitions_[i];
|
||||
// ref: https://github.com/laurent22/joplin/issues/7940#issuecomment-1473709148
|
||||
if (d.className === 'MasterKey') continue;
|
||||
const ItemClass = BaseItem.getClass(d.className);
|
||||
const o = {
|
||||
total: await ItemClass.count(),
|
||||
|
||||
@@ -431,6 +431,7 @@ describe('services_SearchEngine', () => {
|
||||
['title:abcd efgh', { _: ['efgh'], title: ['abcd'] }],
|
||||
['title:abcd', { title: ['abcd'] }],
|
||||
['"abcd efgh"', { _: ['abcd efgh'] }],
|
||||
['"abcd efgh" ijkl', { _: ['abcd efgh', 'ijkl'] }],
|
||||
['title:abcd title:efgh', { title: ['abcd', 'efgh'] }],
|
||||
];
|
||||
|
||||
|
||||
@@ -5,20 +5,31 @@ import Note from '../../models/Note';
|
||||
import BaseModel from '../../BaseModel';
|
||||
import ItemChangeUtils from '../ItemChangeUtils';
|
||||
import shim from '../../shim';
|
||||
import filterParser from './filterParser';
|
||||
import filterParser, { Term } from './filterParser';
|
||||
import queryBuilder from './queryBuilder';
|
||||
import { ItemChangeEntity, NoteEntity } from '../database/types';
|
||||
const { sprintf } = require('sprintf-js');
|
||||
const { pregQuote, scriptType, removeDiacritics } = require('../../string-utils.js');
|
||||
|
||||
enum SearchType {
|
||||
Auto = 'auto',
|
||||
Basic = 'basic',
|
||||
Nonlatin = 'nonlatin',
|
||||
Fts = 'fts',
|
||||
}
|
||||
|
||||
interface SearchOptions {
|
||||
searchType: SearchType;
|
||||
}
|
||||
|
||||
export default class SearchEngine {
|
||||
|
||||
public static instance_: SearchEngine = null;
|
||||
public static relevantFields = 'id, title, body, user_created_time, user_updated_time, is_todo, todo_completed, todo_due, parent_id, latitude, longitude, altitude, source_url';
|
||||
public static SEARCH_TYPE_AUTO = 'auto';
|
||||
public static SEARCH_TYPE_BASIC = 'basic';
|
||||
public static SEARCH_TYPE_NONLATIN_SCRIPT = 'nonlatin';
|
||||
public static SEARCH_TYPE_FTS = 'fts';
|
||||
public static SEARCH_TYPE_AUTO = SearchType.Auto;
|
||||
public static SEARCH_TYPE_BASIC = SearchType.Basic;
|
||||
public static SEARCH_TYPE_NONLATIN_SCRIPT = SearchType.Nonlatin;
|
||||
public static SEARCH_TYPE_FTS = SearchType.Fts;
|
||||
|
||||
public dispatch: Function = (_o: any) => {};
|
||||
private logger_ = new Logger();
|
||||
@@ -417,7 +428,7 @@ export default class SearchEngine {
|
||||
|
||||
const trimQuotes = (str: string) => str.startsWith('"') ? str.substr(1, str.length - 2) : str;
|
||||
|
||||
let allTerms: any[] = [];
|
||||
let allTerms: Term[] = [];
|
||||
|
||||
try {
|
||||
allTerms = filterParser(query);
|
||||
@@ -429,7 +440,20 @@ export default class SearchEngine {
|
||||
const titleTerms = allTerms.filter(x => x.name === 'title' && !x.negated).map(x => trimQuotes(x.value));
|
||||
const bodyTerms = allTerms.filter(x => x.name === 'body' && !x.negated).map(x => trimQuotes(x.value));
|
||||
|
||||
const terms: any = { _: textTerms, 'title': titleTerms, 'body': bodyTerms };
|
||||
interface ComplexTerm {
|
||||
type: 'regex' | 'text';
|
||||
value: string;
|
||||
scriptType: any;
|
||||
valueRegex?: RegExp;
|
||||
}
|
||||
|
||||
interface Terms {
|
||||
_: (string | ComplexTerm)[];
|
||||
title: (string | ComplexTerm)[];
|
||||
body: (string | ComplexTerm)[];
|
||||
}
|
||||
|
||||
const terms: Terms = { _: textTerms, 'title': titleTerms, 'body': bodyTerms };
|
||||
|
||||
// Filter terms:
|
||||
// - Convert wildcards to regex
|
||||
@@ -438,7 +462,9 @@ export default class SearchEngine {
|
||||
|
||||
let termCount = 0;
|
||||
const keys = [];
|
||||
for (const col in terms) {
|
||||
for (const col2 in terms) {
|
||||
const col = col2 as '_' | 'title' | 'body';
|
||||
|
||||
if (!terms.hasOwnProperty(col)) continue;
|
||||
|
||||
if (!terms[col].length) {
|
||||
@@ -447,7 +473,7 @@ export default class SearchEngine {
|
||||
}
|
||||
|
||||
for (let i = terms[col].length - 1; i >= 0; i--) {
|
||||
const term = terms[col][i];
|
||||
const term = terms[col][i] as string;
|
||||
|
||||
// SQlLite FTS doesn't allow "*" queries and neither shall we
|
||||
if (term === '*') {
|
||||
@@ -468,12 +494,16 @@ export default class SearchEngine {
|
||||
}
|
||||
|
||||
//
|
||||
// The object "allTerms" is used for query construction purposes (this contains all the filter terms)
|
||||
// Since this is used for the FTS match query, we need to normalize text, title and body terms.
|
||||
// Note, we're not normalizing terms like tag because these are matched using SQL LIKE operator and so we must preserve their diacritics.
|
||||
// The object "allTerms" is used for query construction purposes (this
|
||||
// contains all the filter terms) Since this is used for the FTS match
|
||||
// query, we need to normalize text, title and body terms. Note, we're
|
||||
// not normalizing terms like tag because these are matched using SQL
|
||||
// LIKE operator and so we must preserve their diacritics.
|
||||
//
|
||||
// The object "terms" only include text, title, body terms and is used for highlighting.
|
||||
// By not normalizing the text, title, body in "terms", highlighting still works correctly for words with diacritics.
|
||||
// The object "terms" only include text, title, body terms and is used
|
||||
// for highlighting. By not normalizing the text, title, body in
|
||||
// "terms", highlighting still works correctly for words with
|
||||
// diacritics.
|
||||
//
|
||||
|
||||
allTerms = allTerms.map(x => {
|
||||
@@ -521,9 +551,9 @@ export default class SearchEngine {
|
||||
const searchOptions: any = {};
|
||||
|
||||
for (const key of parsedQuery.keys) {
|
||||
if (parsedQuery.terms[key].length === 0) continue;
|
||||
if ((parsedQuery.terms as any)[key].length === 0) continue;
|
||||
|
||||
const term = parsedQuery.terms[key].map((x: any) => x.value).join(' ');
|
||||
const term = (parsedQuery.terms as any)[key].map((x: Term) => x.value).join(' ');
|
||||
if (key === '_') searchOptions.anywherePattern = `*${term}*`;
|
||||
if (key === 'title') searchOptions.titlePattern = `*${term}*`;
|
||||
if (key === 'body') searchOptions.bodyPattern = `*${term}*`;
|
||||
@@ -561,12 +591,13 @@ export default class SearchEngine {
|
||||
return SearchEngine.SEARCH_TYPE_FTS;
|
||||
}
|
||||
|
||||
public async search(searchString: string, options: any = null) {
|
||||
public async search(searchString: string, options: SearchOptions = null) {
|
||||
if (!searchString) return [];
|
||||
|
||||
options = Object.assign({}, {
|
||||
options = {
|
||||
searchType: SearchEngine.SEARCH_TYPE_AUTO,
|
||||
}, options);
|
||||
...options,
|
||||
};
|
||||
|
||||
const searchType = this.determineSearchType_(searchString, options.searchType);
|
||||
const parsedQuery = await this.parseQuery(searchString);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
interface Term {
|
||||
export interface Term {
|
||||
name: string;
|
||||
value: string;
|
||||
negated: boolean;
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import gotoAnythingStyleQuery from './gotoAnythingStyleQuery';
|
||||
|
||||
describe('searchengine/gotoAnythingStyleQuery', () => {
|
||||
|
||||
it('should prepare queries', () => {
|
||||
const testCases: [string, string][] = [
|
||||
['hello', 'hello*'],
|
||||
['hello welc', 'hello* welc*'],
|
||||
];
|
||||
|
||||
for (const [input, expected] of testCases) {
|
||||
const actual = gotoAnythingStyleQuery(input);
|
||||
expect(actual).toBe(expected);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
@@ -19,7 +19,7 @@ function resourceUrl(resourceFullPath: string): string {
|
||||
return `file://${toForwardSlashes(resourceFullPath)}`;
|
||||
}
|
||||
|
||||
export default function(link: Link, options: Options, linkIndexes: LinkIndexes) {
|
||||
export default function(link: Link, options: Options, _linkIndexes: LinkIndexes) {
|
||||
const resource = link.resource;
|
||||
|
||||
if (!link.resourceReady || !resource || !resource.mime) return '';
|
||||
@@ -47,32 +47,6 @@ export default function(link: Link, options: Options, linkIndexes: LinkIndexes)
|
||||
}
|
||||
|
||||
if (options.pdfViewerEnabled && resource.mime === 'application/pdf') {
|
||||
|
||||
if (options.useCustomPdfViewer) {
|
||||
const resourceId = resource.id;
|
||||
let anchorPageNo = null;
|
||||
|
||||
let id = `${options.noteId}.${resourceId}`;
|
||||
if (linkIndexes && linkIndexes[resourceId]) {
|
||||
linkIndexes[resourceId]++;
|
||||
} else {
|
||||
linkIndexes[resourceId] = 1;
|
||||
}
|
||||
id += `.${linkIndexes[resourceId]}`;
|
||||
|
||||
if (link.href.indexOf('#') > 0) {
|
||||
anchorPageNo = Number(link.href.split('#').pop());
|
||||
if (anchorPageNo < 1) anchorPageNo = null;
|
||||
}
|
||||
|
||||
const src = `${options.vendorDir}/lib/@joplin/pdf-viewer/index.html`;
|
||||
|
||||
return `<iframe src="${src}" x-url="${escapedResourcePath}"
|
||||
x-appearance="${options.theme.appearance}" ${anchorPageNo ? `x-anchorPage="${anchorPageNo}"` : ''} id="${id}"
|
||||
x-type="mini" x-resourceid="${resourceId}"
|
||||
class="media-player media-pdf"></iframe>`;
|
||||
}
|
||||
|
||||
return `<object data="${escapedResourcePath}" class="media-player media-pdf" type="${escapedMime}"></object>`;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
import { readFileSync, readFile, mkdirpSync, writeFileSync, remove, copy, pathExistsSync } from 'fs-extra';
|
||||
import { readFileSync, readFile, mkdirpSync, writeFileSync, remove, copy, pathExistsSync, pathExists } from 'fs-extra';
|
||||
import { rootDir } from '../tool-utils';
|
||||
import { pressCarouselItems } from './utils/pressCarousel';
|
||||
import { getMarkdownIt, loadMustachePartials, markdownToPageHtml, renderMustache } from './utils/render';
|
||||
import { AssetUrls, Env, Partials, PlanPageParams, TemplateParams } from './utils/types';
|
||||
import { AssetUrls, Env, Locale, Partials, PlanPageParams, TemplateParams } from './utils/types';
|
||||
import { createFeatureTableMd, getPlans, loadStripeConfig } from '@joplin/lib/utils/joplinCloud';
|
||||
import { stripOffFrontMatter } from './utils/frontMatter';
|
||||
import { dirname, basename } from 'path';
|
||||
import { readmeFileTitle, replaceGitHubByWebsiteLinks } from './utils/parser';
|
||||
import { extractOpenGraphTags } from './utils/openGraph';
|
||||
import { extractOpenGraphTags, OpenGraphTags } from './utils/openGraph';
|
||||
import { readCredentialFileJson } from '@joplin/lib/utils/credentialFiles';
|
||||
import { getNewsDateString } from './utils/news';
|
||||
import { parsePoFile, parseTranslations, Translations } from '../utils/translation';
|
||||
import { countryCodeOnly, setLocale } from '@joplin/lib/locale';
|
||||
import { setLocale } from '@joplin/lib/locale';
|
||||
import applyTranslations from './utils/applyTranslations';
|
||||
import { loadSponsors } from '../utils/loadSponsors';
|
||||
import convertLinksToLocale from './utils/convertLinksToLocale';
|
||||
|
||||
interface BuildConfig {
|
||||
env: Env;
|
||||
@@ -23,6 +24,12 @@ const buildConfig = readCredentialFileJson<BuildConfig>('website-build.json', {
|
||||
env: Env.Prod,
|
||||
});
|
||||
|
||||
const enGbLocale: Locale = {
|
||||
htmlTranslations: {},
|
||||
lang: 'en-gb',
|
||||
pathPrefix: '',
|
||||
};
|
||||
|
||||
const glob = require('glob');
|
||||
const path = require('path');
|
||||
const md5File = require('md5-file');
|
||||
@@ -41,7 +48,7 @@ const partialDir = `${websiteAssetDir}/templates/partials`;
|
||||
const discussLink = 'https://discourse.joplinapp.org/c/news/9';
|
||||
|
||||
let tocMd_: string = null;
|
||||
let tocHtml_: string = null;
|
||||
const tocHtml_: Record<string, string> = {};
|
||||
const tocRegex_ = /<!-- TOC -->([^]*)<!-- TOC -->/;
|
||||
function tocMd() {
|
||||
if (tocMd_) return tocMd_;
|
||||
@@ -61,15 +68,17 @@ async function getDonateLinks() {
|
||||
return `<div class="donate-links">\n\n${matches[1].trim()}\n\n</div>`;
|
||||
}
|
||||
|
||||
function tocHtml() {
|
||||
if (tocHtml_) return tocHtml_;
|
||||
function tocHtml(locale: Locale) {
|
||||
if (tocHtml_[locale.lang]) return tocHtml_[locale.lang];
|
||||
const markdownIt = getMarkdownIt();
|
||||
let md = tocMd();
|
||||
md = md.replace(/# Table of contents/, '');
|
||||
md = replaceGitHubByWebsiteLinks(md);
|
||||
tocHtml_ = markdownIt.render(md);
|
||||
tocHtml_ = `<div>${tocHtml_}</div>`;
|
||||
return tocHtml_;
|
||||
md = convertLinksToLocale(md, locale);
|
||||
let output = markdownIt.render(md);
|
||||
output = `<div>${output}</div>`;
|
||||
tocHtml_[locale.lang] = output;
|
||||
return output;
|
||||
}
|
||||
|
||||
const baseUrl = '';
|
||||
@@ -90,14 +99,16 @@ async function getAssetUrls(): Promise<AssetUrls> {
|
||||
};
|
||||
}
|
||||
|
||||
function defaultTemplateParams(assetUrls: AssetUrls): TemplateParams {
|
||||
function defaultTemplateParams(assetUrls: AssetUrls, locale: Locale = null): TemplateParams {
|
||||
if (!locale) locale = enGbLocale;
|
||||
|
||||
return {
|
||||
env: buildConfig.env,
|
||||
baseUrl,
|
||||
imageBaseUrl: `${baseUrl}/images`,
|
||||
cssBaseUrl,
|
||||
jsBaseUrl,
|
||||
tocHtml: tocHtml(),
|
||||
tocHtml: tocHtml(locale),
|
||||
yyyy: (new Date()).getFullYear().toString(),
|
||||
templateHtml: mainTemplateHtml,
|
||||
forumUrl: 'https://discourse.joplinapp.org/',
|
||||
@@ -109,6 +120,7 @@ function defaultTemplateParams(assetUrls: AssetUrls): TemplateParams {
|
||||
},
|
||||
assetUrls,
|
||||
openGraph: null,
|
||||
locale,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -117,7 +129,7 @@ function renderPageToHtml(md: string, targetPath: string, templateParams: Templa
|
||||
md = md.replace(/# Joplin\n/, '');
|
||||
|
||||
templateParams = {
|
||||
...defaultTemplateParams(templateParams.assetUrls),
|
||||
...defaultTemplateParams(templateParams.assetUrls, templateParams.locale),
|
||||
...templateParams,
|
||||
};
|
||||
|
||||
@@ -133,6 +145,7 @@ function renderPageToHtml(md: string, targetPath: string, templateParams: Templa
|
||||
}
|
||||
|
||||
md = replaceGitHubByWebsiteLinks(md);
|
||||
md = convertLinksToLocale(md, templateParams.locale);
|
||||
|
||||
if (templateParams.donateLinksMd) {
|
||||
md = `${templateParams.donateLinksMd}\n\n${md}`;
|
||||
@@ -161,8 +174,8 @@ function renderFileToHtml(sourcePath: string, targetPath: string, templateParams
|
||||
}
|
||||
}
|
||||
|
||||
function makeHomePageMd() {
|
||||
let md = readFileSync(`${rootDir}/README.md`, 'utf8');
|
||||
function makeHomePageMd(readmePath: string) {
|
||||
let md = readFileSync(readmePath, 'utf8');
|
||||
md = md.replace(tocRegex_, '');
|
||||
|
||||
// HACK: GitHub needs the \| or the inline code won't be displayed correctly inside the table,
|
||||
@@ -216,15 +229,20 @@ const updatePageLanguage = (html: string, lang: string): string => {
|
||||
return html.replace('<html lang="en-gb">', `<html lang="${lang}">`);
|
||||
};
|
||||
|
||||
// TODO: Add function that process links and add prefix.
|
||||
|
||||
async function main() {
|
||||
const supportedLocales = {
|
||||
'en_GB': {
|
||||
htmlTranslations: {},
|
||||
lang: 'en-gb',
|
||||
},
|
||||
const supportedLocales: Record<string, Locale> = {
|
||||
'en_GB': enGbLocale,
|
||||
'zh_CN': {
|
||||
htmlTranslations: parseTranslations(await parsePoFile(`${websiteAssetDir}/locales/zh_CN.po`)),
|
||||
lang: 'zh-cn',
|
||||
pathPrefix: 'cn',
|
||||
},
|
||||
'fr_FR': {
|
||||
htmlTranslations: {},
|
||||
lang: 'fr-fr',
|
||||
pathPrefix: 'fr',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -237,34 +255,53 @@ async function main() {
|
||||
const partials = await loadMustachePartials(partialDir);
|
||||
const assetUrls = await getAssetUrls();
|
||||
|
||||
const readmeMd = makeHomePageMd();
|
||||
const donateLinksMd = await getDonateLinks();
|
||||
|
||||
// =============================================================
|
||||
// HELP PAGE
|
||||
// =============================================================
|
||||
|
||||
renderPageToHtml(readmeMd, `${docDir}/help/index.html`, {
|
||||
sourceMarkdownFile: 'README.md',
|
||||
donateLinksMd,
|
||||
partials,
|
||||
sponsors,
|
||||
assetUrls,
|
||||
openGraph: {
|
||||
title: 'Joplin documentation',
|
||||
description: '',
|
||||
url: 'https://joplinapp.org/help/',
|
||||
},
|
||||
});
|
||||
|
||||
// =============================================================
|
||||
// FRONT PAGE
|
||||
// =============================================================
|
||||
|
||||
for (const [localeName, locale] of Object.entries(supportedLocales)) {
|
||||
setLocale(localeName);
|
||||
|
||||
const pathPrefix = localeName !== 'en_GB' ? `/${countryCodeOnly(localeName).toLowerCase()}` : '';
|
||||
const pathPrefix = localeName !== 'en_GB' ? `/${locale.pathPrefix}` : '';
|
||||
|
||||
// =============================================================
|
||||
// HELP PAGE
|
||||
// =============================================================
|
||||
|
||||
let readmePath = `${rootDir}/README.md`;
|
||||
|
||||
let sourceMarkdownFile = 'README.md';
|
||||
let targetDocDir = docDir;
|
||||
|
||||
if (localeName !== 'en_GB') {
|
||||
const possibleSource = `${rootDir}/readme/_i18n/${localeName}/README.md`;
|
||||
if (await pathExists(possibleSource)) {
|
||||
sourceMarkdownFile = possibleSource;
|
||||
readmePath = possibleSource;
|
||||
} else {
|
||||
console.warn(`Cannot find source file: ${possibleSource}`);
|
||||
}
|
||||
|
||||
targetDocDir = `${docDir}/${locale.pathPrefix}`;
|
||||
}
|
||||
|
||||
const readmeMd = makeHomePageMd(readmePath);
|
||||
|
||||
renderPageToHtml(readmeMd, `${targetDocDir}/help/index.html`, {
|
||||
sourceMarkdownFile,
|
||||
donateLinksMd,
|
||||
partials,
|
||||
sponsors,
|
||||
assetUrls,
|
||||
openGraph: {
|
||||
title: 'Joplin documentation',
|
||||
description: '',
|
||||
url: 'https://joplinapp.org/help/',
|
||||
},
|
||||
locale,
|
||||
});
|
||||
|
||||
// =============================================================
|
||||
// FRONT PAGE
|
||||
// =============================================================
|
||||
|
||||
let templateHtml = updatePageLanguage(applyTranslations(frontTemplateHtml, localeName, locale.htmlTranslations), locale.lang);
|
||||
if (localeName === 'zh_CN') templateHtml = templateHtml.replace(/\/plans/g, '/cn/plans');
|
||||
@@ -292,22 +329,16 @@ async function main() {
|
||||
url: 'https://joplinapp.org',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
setLocale('en_GB');
|
||||
|
||||
// =============================================================
|
||||
// PLANS PAGE
|
||||
// =============================================================
|
||||
|
||||
for (const [localeName, locale] of Object.entries(supportedLocales)) {
|
||||
setLocale(localeName);
|
||||
// =============================================================
|
||||
// PLANS PAGE
|
||||
// =============================================================
|
||||
|
||||
const planPageFaqMd = await readFile(`${readmeDir}/faq_joplin_cloud.md`, 'utf8');
|
||||
const planPageFaqHtml = getMarkdownIt().render(planPageFaqMd, {});
|
||||
|
||||
const planPageParams: PlanPageParams = {
|
||||
...defaultTemplateParams(assetUrls),
|
||||
...defaultTemplateParams(assetUrls, locale),
|
||||
partials: translatePartials(partials, localeName, locale.htmlTranslations),
|
||||
templateHtml: applyTranslations(plansTemplateHtml, localeName, locale.htmlTranslations),
|
||||
plans: getPlans(stripeConfig),
|
||||
@@ -318,10 +349,8 @@ async function main() {
|
||||
|
||||
const planPageContentHtml = renderMustache('', planPageParams);
|
||||
|
||||
const pathPrefix = localeName !== 'en_GB' ? `/${countryCodeOnly(localeName).toLowerCase()}` : '';
|
||||
|
||||
const templateParams = {
|
||||
...defaultTemplateParams(assetUrls),
|
||||
...defaultTemplateParams(assetUrls, locale),
|
||||
pageName: 'plans',
|
||||
partials,
|
||||
showToc: false,
|
||||
@@ -342,10 +371,20 @@ async function main() {
|
||||
// Markdown files under /readme
|
||||
// =============================================================
|
||||
|
||||
const mdFiles = glob.sync(`${readmeDir}/**/*.md`).map((f: string) => f.substr(rootDir.length + 1));
|
||||
const sources = [];
|
||||
interface SourceInfo {
|
||||
title: string;
|
||||
donateLinksMd: string;
|
||||
showToc: boolean;
|
||||
openGraph: OpenGraphTags;
|
||||
sourceMarkdownName?: string;
|
||||
sourceMarkdownFile?: string;
|
||||
locale: Locale;
|
||||
}
|
||||
|
||||
const makeTargetBasename = (input: string): string => {
|
||||
const mdFiles: string[] = glob.sync(`${readmeDir}/**/*.md`).map((f: string) => f.substr(rootDir.length + 1));
|
||||
const sources: [string, string, SourceInfo][] = [];
|
||||
|
||||
const makeTargetBasename = (input: string, pathPrefix: string): string => {
|
||||
if (isNewsFile(input)) {
|
||||
const filenameNoExt = basename(input, '.md');
|
||||
return `news/${filenameNoExt}/index.html`;
|
||||
@@ -364,34 +403,49 @@ async function main() {
|
||||
|
||||
s = s.replace(/readme\//, '');
|
||||
|
||||
if (pathPrefix) s = `${pathPrefix}/${s}`;
|
||||
|
||||
return s;
|
||||
}
|
||||
};
|
||||
|
||||
const makeTargetFilePath = (input: string): string => {
|
||||
return `${docDir}/${makeTargetBasename(input)}`;
|
||||
const makeTargetFilePath = (input: string, pathPrefix: string): string => {
|
||||
return `${docDir}/${makeTargetBasename(input, pathPrefix)}`;
|
||||
};
|
||||
|
||||
const makeTargetUrl = (input: string) => {
|
||||
return `https://joplinapp.org/${makeTargetBasename(input)}`;
|
||||
const makeTargetUrl = (input: string, pathPrefix: string) => {
|
||||
return `https://joplinapp.org/${makeTargetBasename(input, pathPrefix)}`;
|
||||
};
|
||||
|
||||
const newsFilePaths: string[] = [];
|
||||
|
||||
for (const mdFile of mdFiles) {
|
||||
const title = await readmeFileTitle(`${rootDir}/${mdFile}`);
|
||||
const targetFilePath = makeTargetFilePath(mdFile);
|
||||
const openGraph = await extractOpenGraphTags(mdFile, makeTargetUrl(mdFile));
|
||||
if (mdFile.startsWith('readme/_i18n')) continue;
|
||||
|
||||
const isNews = isNewsFile(mdFile);
|
||||
if (isNews) newsFilePaths.push(mdFile);
|
||||
for (const [localeName, locale] of Object.entries(supportedLocales)) {
|
||||
const title = await readmeFileTitle(`${rootDir}/${mdFile}`);
|
||||
const targetFilePath = makeTargetFilePath(mdFile, locale.pathPrefix);
|
||||
const openGraph = await extractOpenGraphTags(mdFile, makeTargetUrl(mdFile, locale.pathPrefix));
|
||||
|
||||
sources.push([mdFile, targetFilePath, {
|
||||
title: title,
|
||||
donateLinksMd: mdFile === 'readme/donate.md' ? '' : donateLinksMd,
|
||||
showToc: mdFile !== 'readme/download.md' && !isNews,
|
||||
openGraph,
|
||||
}]);
|
||||
const isNews = isNewsFile(mdFile);
|
||||
if (isNews) newsFilePaths.push(mdFile);
|
||||
|
||||
let sourceFile = mdFile;
|
||||
|
||||
if (localeName !== 'en_GB') {
|
||||
let temp = mdFile.replace(/readme\//, '');
|
||||
temp = `readme/_i18n/${localeName}/${temp}`;
|
||||
if (await pathExists(temp)) sourceFile = temp;
|
||||
}
|
||||
|
||||
sources.push([sourceFile, targetFilePath, {
|
||||
title: title,
|
||||
donateLinksMd: mdFile === 'readme/donate.md' ? '' : donateLinksMd,
|
||||
showToc: mdFile !== 'readme/download.md' && !isNews,
|
||||
openGraph,
|
||||
locale,
|
||||
}]);
|
||||
}
|
||||
}
|
||||
|
||||
for (const source of sources) {
|
||||
@@ -418,7 +472,7 @@ async function main() {
|
||||
});
|
||||
|
||||
await makeNewsFrontPage(newsFilePaths, `${docDir}/news/index.html`, {
|
||||
...defaultTemplateParams(assetUrls),
|
||||
...defaultTemplateParams(assetUrls, null),
|
||||
title: 'What\'s new',
|
||||
pageName: 'news',
|
||||
partials,
|
||||
|
||||
25
packages/tools/website/utils/convertLinksToLocale.test.ts
Normal file
25
packages/tools/website/utils/convertLinksToLocale.test.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import convertLinksToLocale from './convertLinksToLocale';
|
||||
|
||||
describe('convertLinksToLocale', () => {
|
||||
|
||||
it('should convert links', async () => {
|
||||
const tests: [string, any, string][] = [
|
||||
[
|
||||
'test [link](/help/link)',
|
||||
{ pathPrefix: 'fr' },
|
||||
'test [link](/fr/help/link)',
|
||||
],
|
||||
[
|
||||
'test [link](/help/link) [link2](/link2)',
|
||||
{ pathPrefix: 'fr' },
|
||||
'test [link](/fr/help/link) [link2](/fr/link2)',
|
||||
],
|
||||
];
|
||||
|
||||
for (const [input, locale, expected] of tests) {
|
||||
const actual = convertLinksToLocale(input, locale);
|
||||
expect(actual).toBe(expected);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
9
packages/tools/website/utils/convertLinksToLocale.ts
Normal file
9
packages/tools/website/utils/convertLinksToLocale.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Locale } from './types';
|
||||
|
||||
export default (md: string, locale: Locale) => {
|
||||
if (locale.lang === 'en-gb') return md;
|
||||
|
||||
md = md.replace(/\(\//g, `(/${locale.pathPrefix}/`);
|
||||
|
||||
return md;
|
||||
};
|
||||
@@ -7,6 +7,12 @@ export enum Env {
|
||||
Prod = 'prod',
|
||||
}
|
||||
|
||||
export interface Locale {
|
||||
htmlTranslations: Record<string, string>;
|
||||
lang: string;
|
||||
pathPrefix: string;
|
||||
}
|
||||
|
||||
export interface GithubUser {
|
||||
id: string;
|
||||
}
|
||||
@@ -62,6 +68,7 @@ export interface TemplateParams {
|
||||
showBottomLinks?: boolean;
|
||||
openGraph: OpenGraphTags;
|
||||
isNews?: boolean;
|
||||
locale?: Locale;
|
||||
}
|
||||
|
||||
export interface PlanPageParams extends TemplateParams {
|
||||
|
||||
74
readme/_i18n/fr_FR/README.md
Normal file
74
readme/_i18n/fr_FR/README.md
Normal file
@@ -0,0 +1,74 @@
|
||||
<!-- DONATELINKS -->
|
||||
[! [Faire un don via PayPal] (https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/badges/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=E8JMYD2LQ8MMA&lc=GB&item_name=Joplin+Development¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) [! [Sponsor sur GitHub] (https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/badges/GitHub-Badge.svg)](https://github.com/sponsors/laurent22/) [! [Devenez mécène] (https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/badges/Patreon-Badge.svg)](https://www.patreon.com/joplin) [! [Faire un don en utilisant un IBAN] (https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/badges/Donate-IBAN.svg)](https://joplinapp.org/donate/#donations)
|
||||
<!-- DONATELINKS -->
|
||||
|
||||
* * *
|
||||
**TEST ONLY**
|
||||
* * *
|
||||
|
||||
[test link](/spec/e2ee)
|
||||
|
||||
<img width="64" src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/LinuxIcons/256x256.png" align="left" />**Joplin** est une application gratuite et open source de prise de notes et de tâches, qui peut gérer un grand nombre de notes organisées dans des carnets de notes. Les notes sont consultables, peuvent être copiées, balisées et modifiées directement depuis les applications ou depuis votre propre éditeur de texte. Les notes sont au format [Markdown] (#markdown).
|
||||
|
||||
Les notes exportées depuis Evernote [peuvent être importées] (#importing) dans Joplin, y compris le contenu formaté (qui est converti en Markdown), les ressources (images, pièces jointes, etc.) et les métadonnées complètes (géolocalisation, heure de mise à jour, heure de création, etc.). Les fichiers Markdown simples peuvent également être importés.
|
||||
|
||||
Les notes peuvent être [synchronisées] (#synchronisation) en toute sécurité à l'aide du [chiffrement de bout en bout] (#encryption) avec divers services cloud, notamment Nextcloud, Dropbox, OneDrive et [Joplin Cloud] (https://joplinapp.org/plans/).
|
||||
|
||||
La recherche en texte intégral est disponible sur toutes les plateformes pour trouver rapidement les informations dont vous avez besoin. L'application peut être personnalisée à l'aide de plugins et de thèmes, et vous pouvez également créer facilement le vôtre.
|
||||
|
||||
L'application est disponible pour Windows, Linux, macOS, Android et iOS. Un [Web Clipper] (https://github.com/laurent22/joplin/blob/dev/readme/clipper.md), qui permet d'enregistrer des pages Web et des captures d'écran depuis votre navigateur, est également disponible pour [Firefox] (https://addons.mozilla.org/firefox/addon/joplin-web-clipper/) et [Chrome] (https://chrome.google.com/webstore/detail/joplin-web-clipper/alofnhikmmkdbbbgpnglcpdollgjjfek?hl=en-GB).
|
||||
|
||||
<div class="top-screenshot"></div><img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/home-top-img.png" style="max-width: 100%; max-height: 35em;">
|
||||
|
||||
# Installation
|
||||
|
||||
Trois types d'applications sont disponibles : pour **bureau** (Windows, macOS et Linux), pour **mobile** (Android et iOS) et pour **terminal** (Windows, macOS, Linux et FreeBSD). Toutes les applications disposent d'interfaces utilisateur similaires et peuvent se synchroniser entre elles.
|
||||
|
||||
## Applications de bureau
|
||||
|
||||
Système d'exploitation | Télécharger
|
||||
---|---
|
||||
Windows (32 et 64 bits) | <a href='https://github.com/laurent22/joplin/releases/download/v2.9.17/Joplin-Setup-2.9.17.exe'><img alt='Get it on Windows' width="134px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeWindows.png'/></a>
|
||||
MacOS | <a href='https://github.com/laurent22/joplin/releases/download/v2.9.17/Joplin-2.9.17.dmg'><img alt='Get it on macOS' width="134px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeMacOS.png'/></a>
|
||||
Linux | <a href='https://github.com/laurent22/joplin/releases/download/v2.9.17/Joplin-2.9.17.AppImage'><img alt='Get it on Linux' width="134px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeLinux.png'/></a>
|
||||
|
||||
<a href='https://github.com/laurent22/joplin/releases/download/v2.9.17/JoplinPortable.exe'>**Sous Windows**, vous pouvez également utiliser la version portable.</a> L' [application portable] (https://en.wikipedia.org/wiki/Portable_application) permet d'installer le logiciel sur un appareil portable tel qu'une clé USB. Copiez simplement le fichier JoplinPortable.exe dans n'importe quel répertoire de cette clé USB ; l'application créera alors un répertoire appelé « JoplinProfile » à côté du fichier exécutable.
|
||||
|
||||
**Sous Linux**, la méthode recommandée est d'utiliser le script d'installation suivant car il gérera également l'icône du bureau :
|
||||
|
||||
<pre><code style="word-break: break-all">wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash</code></pre>
|
||||
|
||||
## Applications mobiles
|
||||
|
||||
Système d'exploitation | Télécharger | Alt. Télécharger
|
||||
---|---|---
|
||||
Android | <a href='https://play.google.com/store/apps/details?id=net.cozic.joplin&utm_source=GitHub&utm_campaign=README&pcampaignid=MKT-Other-global-all-co-prtnr-py-PartBadge-Mar2515-1'><img alt='Get it on Google Play' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeAndroid.png'/></a>| ou téléchargez le fichier APK : [64 bits] (https://github.com/laurent22/joplin-android/releases/download/android-v2.9.8/joplin-v2.9.8.apk) [32 bits] ( https://github.com/laurent22/joplin-android/releases/download/android-v2.9.8/joplin-v2.9.8-32bit.apk)
|
||||
iOS | <a href='https://itunes.apple.com/us/app/joplin/id1315599797'><img alt='Get it on the App Store' height="40px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeIOS.png'/></a>| -
|
||||
|
||||
## Application du terminal
|
||||
|
||||
Système d'exploitation | Méthode
|
||||
-----------------|----------------
|
||||
macOS, Linux ou Windows (via [WSL] (https://msdn.microsoft.com/en-us/commandline/wsl/faq?f=255&MSPPError=-2147217396)) | **Important :** Tout d'abord, [installez Node 12+] (https://nodejs.org/en/download/package-manager/). <br/><br/><br><br>`NPM_CONFIG_PREFIX=~/.joplin-bin npm install -g joplin` `sudo ln -s ~/.joplin-bin/bin/joplin /usr/bin/joplin `Par défaut, le binaire de l'application sera installé sous <br/> `~/.joplin-bin`. Vous pouvez modifier ce répertoire si nécessaire. Sinon, si vos autorisations npm sont configurées comme décrit [ici] (https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-2-change-npms-default-directory-to-another-directory) (Option 2), il suffit d'exécuter `npm -g install joplin`.
|
||||
|
||||
Pour le démarrer, tapez `joplin`.
|
||||
|
||||
Pour des informations d'utilisation, veuillez consulter la [Documentation complète de l'application Joplin Terminal] (https://joplinapp.org/terminal/).
|
||||
|
||||
## Web Clipper
|
||||
|
||||
Le Web Clipper est une extension de navigateur qui vous permet d'enregistrer des pages Web et des captures d'écran à partir de votre navigateur. Pour plus d'informations sur son installation et son utilisation, consultez la [Page d'aide de Web Clipper] (https://github.com/laurent22/joplin/blob/dev/readme/clipper.md).
|
||||
|
||||
## Distributions alternatives non officielles
|
||||
|
||||
Il existe un certain nombre de distributions alternatives non officielles de Joplin. Si vous ne voulez pas ou ne pouvez pas utiliser appimages ou l'une des autres versions officiellement prises en charge, vous pouvez envisager de les utiliser.
|
||||
|
||||
Cependant, ils sont assortis d'une mise en garde dans la mesure où ils ne sont pas officiellement pris en charge, de sorte que certains problèmes peuvent ne pas être pris en charge par le projet principal. Les demandes d'assistance, les rapports de bogues et les conseils généraux devraient plutôt être adressés aux responsables de ces distributions.
|
||||
|
||||
Une liste de ces distributions gérée par la communauté est disponible ici : [Distributions Joplin non officielles] (https://discourse.joplinapp.org/t/unofficial-alternative-joplin-distributions/23703)
|
||||
|
||||
# Sponsors
|
||||
|
||||
<!-- SPONSORS-ORG -->
|
||||
</a><a href="https://seirei.ne.jp"><img title="Serei Network" width="256" src="https://joplinapp.org/images/sponsors/SeireiNetwork.png"/><a href="https://www.hosting.de/nextcloud/?mtm_campaign=managed-nextcloud&mtm_kwd=joplinapp&mtm_source=joplinapp-webseite&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>
|
||||
<!-- SPONSORS-ORG -->
|
||||
5
readme/_i18n/fr_FR/desktop.md
Normal file
5
readme/_i18n/fr_FR/desktop.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# Application de bureau
|
||||
|
||||
<img src="https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/DemoDesktop.png" style="width: 100%">
|
||||
|
||||
Pour des informations générales relatives à toutes les applications, voir aussi [la page de garde](https://joplinapp.org).
|
||||
@@ -1,5 +1,20 @@
|
||||
# Joplin Android app changelog
|
||||
|
||||
## [android-v2.11.2](https://github.com/laurent22/joplin/releases/tag/android-v2.11.2) (Pre-release) - 2023-04-09T12:04:06Z
|
||||
|
||||
- Improved: Resolve #8022: Editor syntax highlighting was broken (#8023) (#8022 by Henry Heino)
|
||||
- Improved: Updated packages @react-native-community/netinfo (v9.3.8)
|
||||
- Fixed: Removed `MasterKey` from Sync Status report (#8026) (#7940 by Arun Kumar)
|
||||
- Security: Prevent bypassing fingerprint lock on certain devices (6b72f86)
|
||||
|
||||
## [android-v2.11.1](https://github.com/laurent22/joplin/releases/tag/android-v2.11.1) (Pre-release) - 2023-04-08T08:49:19Z
|
||||
|
||||
- New: Add log info for biometrics feature (efdbaeb)
|
||||
- New: Add setting to enable/disable the markdown toolbar (#7929 by Henry Heino)
|
||||
- Fixed: Encode the non-ASCII characters in OneDrive URI (#7868) (#7851 by Self Not Found)
|
||||
- Fixed: Fix OneDrive sync attempting to call method on `null` variable (#7987) (#7986 by Henry Heino)
|
||||
- Updated packages @lezer/highlight (v1.1.4), fs-extra (v11.1.1), jsdom (v21.1.1), markdown-it-multimd-table (v4.2.1), nanoid (v3.3.6), node-persist (v3.1.3), nodemon (v2.0.22), react-native-document-picker (v8.1.4), react-native-image-picker (v5.3.1), react-native-paper (v5.4.1), react-native-share (v8.2.1), sass (v1.59.3), sqlite3 (v5.1.6), turndown (v7.1.2), yargs (v17.7.1)
|
||||
|
||||
## [android-v2.10.9](https://github.com/laurent22/joplin/releases/tag/android-v2.10.9) (Pre-release) - 2023-03-22T18:40:57Z
|
||||
|
||||
- Improved: Mark biometrics feature as beta and ensure no call is made if it is not enabled (e44a934)
|
||||
|
||||
@@ -423,6 +423,46 @@
|
||||
"created_at": "2023-04-06T21:46:22Z",
|
||||
"repoId": 79162682,
|
||||
"pullRequestNo": 8024
|
||||
},
|
||||
{
|
||||
"name": "Letty",
|
||||
"id": 465678,
|
||||
"comment_id": 1500142614,
|
||||
"created_at": "2023-04-07T10:04:51Z",
|
||||
"repoId": 79162682,
|
||||
"pullRequestNo": 8029
|
||||
},
|
||||
{
|
||||
"name": "tbjers",
|
||||
"id": 1117052,
|
||||
"comment_id": 1501316440,
|
||||
"created_at": "2023-04-10T02:33:42Z",
|
||||
"repoId": 79162682,
|
||||
"pullRequestNo": 8036
|
||||
},
|
||||
{
|
||||
"name": "simonla",
|
||||
"id": 14934570,
|
||||
"comment_id": 1503950257,
|
||||
"created_at": "2023-04-11T19:02:23Z",
|
||||
"repoId": 79162682,
|
||||
"pullRequestNo": 8042
|
||||
},
|
||||
{
|
||||
"name": "Wladefant",
|
||||
"id": 79611093,
|
||||
"comment_id": 1514649134,
|
||||
"created_at": "2023-04-19T12:28:22Z",
|
||||
"repoId": 79162682,
|
||||
"pullRequestNo": 8069
|
||||
},
|
||||
{
|
||||
"name": "DeeJayLSP",
|
||||
"id": 60024671,
|
||||
"comment_id": 1519381301,
|
||||
"created_at": "2023-04-24T04:56:51Z",
|
||||
"repoId": 79162682,
|
||||
"pullRequestNo": 8077
|
||||
}
|
||||
]
|
||||
}
|
||||
19
readme/spec/server_items.md
Normal file
19
readme/spec/server_items.md
Normal file
@@ -0,0 +1,19 @@
|
||||
# Joplin Server items
|
||||
|
||||
To upload an item to Joplin Server:
|
||||
|
||||
- Call `PUT /api/items` with the serialized Joplin item. Examples of serialized items are described in `packages/app-cli/tests/support/syncTargetSnapshots`
|
||||
|
||||
- That route is in `packages/server/src/routes/api/items.ts`. In there it's going to do some basic processing on the item, and eventually will call `models.item().saveFromRawContent`
|
||||
|
||||
- This `saveFromRawContent` is where most of the job is done - it's going to detect what the item is, whether it's a note, notebook, etc. (this is the serialised content, as described above), or a binary file (resource).
|
||||
|
||||
- If it's a resource, the content is going to be saved as-is in the database
|
||||
|
||||
- If it's an item, it's going to deserialise it because we want to save certain properties separately in the database, such as the parent ID, the type (whether it's a note, notebook, etc.). We save these properties separately purely for performance reasons. Once the properties have been extracted, the rest of the object is serialised back to JSON and saved to the database.
|
||||
|
||||
- In the end, the content is saved to the `items` table. The JSON item or the resource binary content will be saved to the `content` field. Other Joplin items properties will be saved to the `jop_*` fields. For example, the ID, the parent ID, whether encryption is enabled, etc.
|
||||
|
||||
- `items.jop_id` is the ID as it was generated on the client. `items.id` is the server-side ID. We need two different IDs because we have no way to guarantee that `items.jop_id` is globally unique since it's generated client-side.
|
||||
|
||||
- In `ItemModel` there are various utility functions to deal with the content. This is because it may be saved in different places depending on configuration. It can be saved to the `items.content` field in the database, or it can be saved to S3, or to the filesystem. This is why any code that deals with item content must used these utility functions.
|
||||
39
readme/spec/sync.md
Normal file
39
readme/spec/sync.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# Joplin synchronisation
|
||||
|
||||
The Joplin applications are offline first - it means that data is saved locally on the device. In order to have the same data on all the user's devices, we use a synchronisation process. In a nutshell, each device uploads its notes, notebooks, tags, etc. to the server, and also downloads any notes they do not have, or any recent changes. If a note is deleted, it is also deleted from the server, and eventually deleted from each device too.
|
||||
|
||||
## Vocabulary
|
||||
|
||||
### Clients
|
||||
|
||||
The sync clients are the Joplin applications - the desktop, mobile and terminal applications.
|
||||
|
||||
### Sync targets
|
||||
|
||||
The sync target is the location where the data is going to be saved. It can be for example Joplin Server, a Nextcloud instance, or a WebDAV server.
|
||||
|
||||
### Items
|
||||
|
||||
The "items" are the notes, notebooks, tags and resources that need to be synced.
|
||||
|
||||
## General process
|
||||
|
||||
Whenever the user makes a change to an item, it is uploaded to the sync target within a few seconds. Uploading items as soon as possible helps limit conflicts. Because that way, any client that connects to the sync target is more likely to get the latest version of the item.
|
||||
|
||||
Additionally, every few minutes, the client is going to poll the server and download the latest changes, and apply them to the local note collection.
|
||||
|
||||
## Code architecture
|
||||
|
||||
- `packages/lib/Synchronizer.ts`: This file is responsible for the main synchronisation process. It download changes, upload them, and apply any deletion. The class is relatively generic and receive a `SyncTarget` object that handles sync target-specific operations. The synchroniser is also going encrypt and decrypt items if E2EE is enabled.
|
||||
|
||||
- `packages/lib/SyncTarget*.ts`: These files are the entry points for the various sync targets. They expose some metadata such as name, description, what options they support, etc. Some may also implement a function to test whether the configuration is working (used from the configuration screen). Finally, the main role of this class is to initialise an instance of a `FileApi`.
|
||||
|
||||
- `packages/lib/file-api-driver-*.ts`: Those are the file APIs. They must implement generic file-like operations to create, update, delete or list files. This API is in turn used by the synchroniser to created, update or delete items.
|
||||
|
||||
- `packages/lib/*Api.ts`: The `file-api-driver` will call some low-level API to perform its operations. For example `file-api-driver-local` will use the `fs` package to read/write files, `file-api-driver-amazon-s3` will use the AWS API to work with S3. In some cases however such a low-level API is not available - in that case, we usually create an `*Api.ts` file, which is used by the file API driver to perform its operations. For example, there is a `JoplinServerApi.ts`, which is used to connect to Joplin Server.
|
||||
|
||||
## See also
|
||||
|
||||
- [Synchronisation lock](https://github.com/laurent22/joplin/blob/dev/readme/spec/sync_lock.md)
|
||||
- [E2EE: Technical spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/e2ee.md)
|
||||
- [E2EE: Workflow](https://github.com/laurent22/joplin/blob/dev/readme/spec/e2ee/workflow.md)
|
||||
@@ -741,7 +741,7 @@ The following commands are available in [command-line mode](#command-line-mode):
|
||||
|
||||
# License
|
||||
|
||||
Copyright (c) 2016-2021 Laurent Cozic
|
||||
Copyright (c) 2016-2023 Laurent Cozic
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
"config:base"
|
||||
],
|
||||
"major": {
|
||||
"stabilityDays": 30,
|
||||
"stabilityDays": 80,
|
||||
},
|
||||
"minor": {
|
||||
"stabilityDays": 20,
|
||||
"stabilityDays": 40,
|
||||
},
|
||||
"patch": {
|
||||
"stabilityDays": 10,
|
||||
"stabilityDays": 20,
|
||||
},
|
||||
"prConcurrentLimit": 5,
|
||||
"prHourlyLimit": 0,
|
||||
@@ -38,6 +38,7 @@
|
||||
"@codemirror/search",
|
||||
"@codemirror/state",
|
||||
"@codemirror/view",
|
||||
"@lezer/highlight",
|
||||
"@fortawesome/fontawesome-svg-core",
|
||||
"@fortawesome/free-solid-svg-icons",
|
||||
"@svgr/webpack",
|
||||
|
||||
313
yarn.lock
313
yarn.lock
@@ -3191,8 +3191,8 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@codemirror/autocomplete@npm:^6.0.0":
|
||||
version: 6.4.0
|
||||
resolution: "@codemirror/autocomplete@npm:6.4.0"
|
||||
version: 6.4.2
|
||||
resolution: "@codemirror/autocomplete@npm:6.4.2"
|
||||
dependencies:
|
||||
"@codemirror/language": ^6.0.0
|
||||
"@codemirror/state": ^6.0.0
|
||||
@@ -3203,19 +3203,19 @@ __metadata:
|
||||
"@codemirror/state": ^6.0.0
|
||||
"@codemirror/view": ^6.0.0
|
||||
"@lezer/common": ^1.0.0
|
||||
checksum: 3470fee01da60d3d71b8b4f8728629c0f0441e704b8b828592f98c000d75fdb2c9077727e82685626cf45b95cadbc0c1a03968261df2f0cfb4162418b5f4dd1f
|
||||
checksum: c6cc4edb1c412153e6f6f27926674d7f1d386d1f30d6d4f60c5b52bfa0105870b0c70449b69891937bcf082340d8b0fa6d1f9f28f5eb60adc2974ed4c73aadc1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@codemirror/commands@npm:6.1.2":
|
||||
version: 6.1.2
|
||||
resolution: "@codemirror/commands@npm:6.1.2"
|
||||
"@codemirror/commands@npm:6.2.2":
|
||||
version: 6.2.2
|
||||
resolution: "@codemirror/commands@npm:6.2.2"
|
||||
dependencies:
|
||||
"@codemirror/language": ^6.0.0
|
||||
"@codemirror/state": ^6.0.0
|
||||
"@codemirror/state": ^6.2.0
|
||||
"@codemirror/view": ^6.0.0
|
||||
"@lezer/common": ^1.0.0
|
||||
checksum: 3e00b02ea12a5bb8a07162aea006e13e6dcbf9be8535e2fd645dd75634f39d8de2d18bb6ccf302fd22bd0956e38490ccf0bafc60d44945df19e449876b09a0df
|
||||
checksum: d3aa1ca8cbd7b9434eedba6b6d783411670796bf6ab61990afc4fd0c04645189fe4dd55bb95e23b943e9089f9739bc7e92aa4b2ac3eac09cfa2b91a45f608d3e
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -3230,31 +3230,31 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@codemirror/lang-css@npm:^6.0.0":
|
||||
version: 6.0.1
|
||||
resolution: "@codemirror/lang-css@npm:6.0.1"
|
||||
version: 6.1.1
|
||||
resolution: "@codemirror/lang-css@npm:6.1.1"
|
||||
dependencies:
|
||||
"@codemirror/autocomplete": ^6.0.0
|
||||
"@codemirror/language": ^6.0.0
|
||||
"@codemirror/state": ^6.0.0
|
||||
"@lezer/css": ^1.0.0
|
||||
checksum: c459baeeb912f424167cf8308df9fe20aaba3f6a65e5ce7b128e2d4d0ceda7474e3bf94b7b4b87ead7d10f79edfbf9807b2058a2354318adacf906eba4f6eb76
|
||||
checksum: 9b0bf7c7544fb604b67325689d783981e4099560f577bc1f10c52cb18e9d275ebdbdbd3f335a1dbb9c4910c36320f74ca015fc92ef99f930ecb9d481a2bf3511
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@codemirror/lang-html@npm:6.4.0, @codemirror/lang-html@npm:^6.0.0":
|
||||
version: 6.4.0
|
||||
resolution: "@codemirror/lang-html@npm:6.4.0"
|
||||
"@codemirror/lang-html@npm:6.4.3, @codemirror/lang-html@npm:^6.0.0":
|
||||
version: 6.4.3
|
||||
resolution: "@codemirror/lang-html@npm:6.4.3"
|
||||
dependencies:
|
||||
"@codemirror/autocomplete": ^6.0.0
|
||||
"@codemirror/lang-css": ^6.0.0
|
||||
"@codemirror/lang-javascript": ^6.0.0
|
||||
"@codemirror/language": ^6.0.0
|
||||
"@codemirror/language": ^6.4.0
|
||||
"@codemirror/state": ^6.0.0
|
||||
"@codemirror/view": ^6.2.2
|
||||
"@lezer/common": ^1.0.0
|
||||
"@lezer/css": ^1.1.0
|
||||
"@lezer/html": ^1.1.0
|
||||
checksum: 78fd811c6b2d2a355e1e41eaf599a9623dd03b8fd0ade603220dc443744520b06749125c85e5be64b09ca0aaea71de6268cf3518006ad17823522ef97aefab59
|
||||
"@lezer/html": ^1.3.0
|
||||
checksum: 6177d19147580964ecd6910ae951201929a96e63f4f0e624c3138e2805fa87ec6d6d952a3a888c5a52af78b6dd6d04d7d8c76c6a9cd65b1921dc467b5dbaea72
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -3268,39 +3268,24 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@codemirror/lang-javascript@npm:6.1.1":
|
||||
version: 6.1.1
|
||||
resolution: "@codemirror/lang-javascript@npm:6.1.1"
|
||||
"@codemirror/lang-javascript@npm:6.1.5, @codemirror/lang-javascript@npm:^6.0.0":
|
||||
version: 6.1.5
|
||||
resolution: "@codemirror/lang-javascript@npm:6.1.5"
|
||||
dependencies:
|
||||
"@codemirror/autocomplete": ^6.0.0
|
||||
"@codemirror/language": ^6.0.0
|
||||
"@codemirror/language": ^6.6.0
|
||||
"@codemirror/lint": ^6.0.0
|
||||
"@codemirror/state": ^6.0.0
|
||||
"@codemirror/view": ^6.0.0
|
||||
"@lezer/common": ^1.0.0
|
||||
"@lezer/javascript": ^1.0.0
|
||||
checksum: 9a1d082edf3d835e18f2e9e0aa603c92a3e8e86f95a5662635f5a9d1ee6b87bbfe3bac3f56bd2c8cd46bafb87bcf90e0955c5efcda334a224c5d9c2d0524d351
|
||||
checksum: f0355f9577fac03437137356b5c8826ec073480d9b0efc62289eac483172d47dafe569f31bf788e4228e8b789197e50a0768cf10b0cde5f600e89b6b469f52cc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@codemirror/lang-javascript@npm:^6.0.0":
|
||||
version: 6.1.2
|
||||
resolution: "@codemirror/lang-javascript@npm:6.1.2"
|
||||
dependencies:
|
||||
"@codemirror/autocomplete": ^6.0.0
|
||||
"@codemirror/language": ^6.0.0
|
||||
"@codemirror/lint": ^6.0.0
|
||||
"@codemirror/state": ^6.0.0
|
||||
"@codemirror/view": ^6.0.0
|
||||
"@lezer/common": ^1.0.0
|
||||
"@lezer/javascript": ^1.0.0
|
||||
checksum: f4336b7efd44e4158b9979f0c23918184c897d0fe3e40b5414bd9243a9899ecdba4dfe13970fe5024a1894579af80cb4c5dd574c6c2b7bd7ff06d8c8cb88616b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@codemirror/lang-markdown@npm:6.0.5":
|
||||
version: 6.0.5
|
||||
resolution: "@codemirror/lang-markdown@npm:6.0.5"
|
||||
"@codemirror/lang-markdown@npm:6.1.0":
|
||||
version: 6.1.0
|
||||
resolution: "@codemirror/lang-markdown@npm:6.1.0"
|
||||
dependencies:
|
||||
"@codemirror/lang-html": ^6.0.0
|
||||
"@codemirror/language": ^6.3.0
|
||||
@@ -3308,7 +3293,7 @@ __metadata:
|
||||
"@codemirror/view": ^6.0.0
|
||||
"@lezer/common": ^1.0.0
|
||||
"@lezer/markdown": ^1.0.0
|
||||
checksum: d69148ea3f954aaae98cb22ef2ae790a1d51ad9a22344b2cf3e8b7cdb0e953c342f736257a88fb71b4b74f0fd4338480091fdb047e266b4c6665e4a83f552d4c
|
||||
checksum: faee880c5e695391fc5b92788d1500bed3f0cc3766c987077cdc1643cf38b97eb1774a29491a7a75064089478b895e7c8fe5a4f08ac93c9614ccbbe188f10b47
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -3335,9 +3320,9 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@codemirror/language@npm:6.3.2, @codemirror/language@npm:^6.0.0, @codemirror/language@npm:^6.3.0":
|
||||
version: 6.3.2
|
||||
resolution: "@codemirror/language@npm:6.3.2"
|
||||
"@codemirror/language@npm:6.6.0, @codemirror/language@npm:^6.0.0, @codemirror/language@npm:^6.3.0, @codemirror/language@npm:^6.4.0, @codemirror/language@npm:^6.6.0":
|
||||
version: 6.6.0
|
||||
resolution: "@codemirror/language@npm:6.6.0"
|
||||
dependencies:
|
||||
"@codemirror/state": ^6.0.0
|
||||
"@codemirror/view": ^6.0.0
|
||||
@@ -3345,56 +3330,56 @@ __metadata:
|
||||
"@lezer/highlight": ^1.0.0
|
||||
"@lezer/lr": ^1.0.0
|
||||
style-mod: ^4.0.0
|
||||
checksum: b70ed9b85d0bea79181c86e88a1f5c0bada30680ee1fe6a68efc01bc037c3d14f94a83602fc46cc4b4393589605ef7e986ed5174443502f3365dd61f883894fa
|
||||
checksum: bb9411620e2f231653a3f0c4429e0d19a3843bff5dbc117df4649d7bf783ec4ad809c0add8bc0887a4ec3f48b4f8f941621168e47d76101d5383f0d670af1722
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@codemirror/legacy-modes@npm:6.3.1":
|
||||
version: 6.3.1
|
||||
resolution: "@codemirror/legacy-modes@npm:6.3.1"
|
||||
"@codemirror/legacy-modes@npm:6.3.2":
|
||||
version: 6.3.2
|
||||
resolution: "@codemirror/legacy-modes@npm:6.3.2"
|
||||
dependencies:
|
||||
"@codemirror/language": ^6.0.0
|
||||
checksum: 9065e521bf14e33856e9d3ea114d7b352adf341a8b8d4fb94b4c866189336a32b5ed42ffc20f5d2fa3c839f1bdf29a868bbf9b74c105ed83fa9fd6080e0429e9
|
||||
checksum: fa5f5477fb9e19267251e2ecd3de8c1a4c2512813555bb60111dce3951f2c3f6080a2985a573b7542534ba1d2c34115f7e39ee23fdf8f6f81db6f8ce447c1efc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@codemirror/lint@npm:^6.0.0":
|
||||
version: 6.1.0
|
||||
resolution: "@codemirror/lint@npm:6.1.0"
|
||||
version: 6.2.0
|
||||
resolution: "@codemirror/lint@npm:6.2.0"
|
||||
dependencies:
|
||||
"@codemirror/state": ^6.0.0
|
||||
"@codemirror/view": ^6.0.0
|
||||
crelt: ^1.0.5
|
||||
checksum: 1b5179c2c18e0eb96c68b47cd6832053a6aab80d6126cc250876fa848418c537417f0656cd6f442a0e5858830546fdef6bdcbb7b9773d92989795b52c7646011
|
||||
checksum: b97e55a07bca9f7e357e495853ba189ae0ff7dfe7e7ae445d7a0d6c6926ec792c7f5c6b6c13a1f137fd9fedf44a6624e9d500f76d0d46a3c3e9d19c2cda9d28a
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@codemirror/search@npm:6.2.3":
|
||||
version: 6.2.3
|
||||
resolution: "@codemirror/search@npm:6.2.3"
|
||||
"@codemirror/search@npm:6.3.0":
|
||||
version: 6.3.0
|
||||
resolution: "@codemirror/search@npm:6.3.0"
|
||||
dependencies:
|
||||
"@codemirror/state": ^6.0.0
|
||||
"@codemirror/view": ^6.0.0
|
||||
crelt: ^1.0.5
|
||||
checksum: 7ab0ffab7992f5c6260313e06ec8935f55807b95ca86f0327154ea1ae0ab984cd22c2fc1a812bd6cace1db131785353689fbfd080d2e12c660e3db0295dec355
|
||||
checksum: b757eebbb541c9d74fe36ccfdd03bc3e4e7aebb08b491e207d5898f24aaa612558c393ba49de5bf375972f5774de817fcfbad1ac551dda1a34badb41cf130d36
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@codemirror/state@npm:6.1.4, @codemirror/state@npm:^6.0.0, @codemirror/state@npm:^6.1.4":
|
||||
version: 6.1.4
|
||||
resolution: "@codemirror/state@npm:6.1.4"
|
||||
checksum: ef6bc495d3b89d2f0202b6b1c0fc3e3610f8d815f4ca91f86153d6093c9b93ddbe2cfb787802d07514a7114f0b200cf2eeb54c1cd34d7e00eff774ecea97d845
|
||||
"@codemirror/state@npm:6.2.0, @codemirror/state@npm:^6.0.0, @codemirror/state@npm:^6.1.4, @codemirror/state@npm:^6.2.0":
|
||||
version: 6.2.0
|
||||
resolution: "@codemirror/state@npm:6.2.0"
|
||||
checksum: fdc99c773dc09c700dd02bf918f06132aa8d3069c262cc4eb6ca5c810ce24ae2d7e90719ae7630a8158fd263018de6d40bd78f312e6bfba754e737b64e6c6b3d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@codemirror/view@npm:6.7.1, @codemirror/view@npm:^6.0.0, @codemirror/view@npm:^6.2.2, @codemirror/view@npm:^6.6.0":
|
||||
version: 6.7.1
|
||||
resolution: "@codemirror/view@npm:6.7.1"
|
||||
"@codemirror/view@npm:6.9.3, @codemirror/view@npm:^6.0.0, @codemirror/view@npm:^6.2.2, @codemirror/view@npm:^6.6.0":
|
||||
version: 6.9.3
|
||||
resolution: "@codemirror/view@npm:6.9.3"
|
||||
dependencies:
|
||||
"@codemirror/state": ^6.1.4
|
||||
style-mod: ^4.0.0
|
||||
w3c-keyname: ^2.2.4
|
||||
checksum: 75a5846d61e63027e9bf1dfd0b507932934cb7650b7959c1191e68b161eb1756e9773f964c4331970b51864aef8f7954bc5cc8fdb51b0f6533de6c20568833ed
|
||||
checksum: 718ecbb021ca75eb89003f73c846a07d36a708dcfec8345f0f0dbcfc0d0df5ea6f114918694b2730a6d49e5e50502bcce79ce7ff94ce55748e068e5a35073755
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -4854,7 +4839,6 @@ __metadata:
|
||||
"@fortawesome/fontawesome-free": 5.15.4
|
||||
"@joeattardi/emoji-button": 4.6.4
|
||||
"@joplin/lib": ~2.11
|
||||
"@joplin/pdf-viewer": ~2.11
|
||||
"@joplin/renderer": ~2.11
|
||||
"@joplin/tools": ~2.11
|
||||
"@testing-library/react-hooks": 8.0.1
|
||||
@@ -4879,6 +4863,7 @@ __metadata:
|
||||
glob: 8.1.0
|
||||
gulp: 4.0.2
|
||||
highlight.js: 11.7.0
|
||||
html-entities: 1.4.0
|
||||
immer: 7.0.15
|
||||
jest: 29.4.3
|
||||
jest-environment-jsdom: 29.4.3
|
||||
@@ -4927,19 +4912,19 @@ __metadata:
|
||||
dependencies:
|
||||
"@babel/core": 7.16.0
|
||||
"@babel/runtime": 7.16.3
|
||||
"@codemirror/commands": 6.1.2
|
||||
"@codemirror/commands": 6.2.2
|
||||
"@codemirror/lang-cpp": 6.0.2
|
||||
"@codemirror/lang-html": 6.4.0
|
||||
"@codemirror/lang-html": 6.4.3
|
||||
"@codemirror/lang-java": 6.0.1
|
||||
"@codemirror/lang-javascript": 6.1.1
|
||||
"@codemirror/lang-markdown": 6.0.5
|
||||
"@codemirror/lang-javascript": 6.1.5
|
||||
"@codemirror/lang-markdown": 6.1.0
|
||||
"@codemirror/lang-php": 6.0.1
|
||||
"@codemirror/lang-rust": 6.0.1
|
||||
"@codemirror/language": 6.3.2
|
||||
"@codemirror/legacy-modes": 6.3.1
|
||||
"@codemirror/search": 6.2.3
|
||||
"@codemirror/state": 6.1.4
|
||||
"@codemirror/view": 6.7.1
|
||||
"@codemirror/language": 6.6.0
|
||||
"@codemirror/legacy-modes": 6.3.2
|
||||
"@codemirror/search": 6.3.0
|
||||
"@codemirror/state": 6.2.0
|
||||
"@codemirror/view": 6.9.3
|
||||
"@joplin/lib": ~2.11
|
||||
"@joplin/react-native-alarm-notification": ~2.11
|
||||
"@joplin/react-native-saf-x": ~2.11
|
||||
@@ -4949,7 +4934,7 @@ __metadata:
|
||||
"@react-native-community/clipboard": 1.5.1
|
||||
"@react-native-community/datetimepicker": 6.7.5
|
||||
"@react-native-community/geolocation": 2.1.0
|
||||
"@react-native-community/netinfo": 9.3.7
|
||||
"@react-native-community/netinfo": 9.3.8
|
||||
"@react-native-community/push-notification-ios": 1.10.1
|
||||
"@react-native-community/slider": 4.4.2
|
||||
"@types/fs-extra": 9.0.13
|
||||
@@ -4993,7 +4978,7 @@ __metadata:
|
||||
react-native-image-picker: 5.3.1
|
||||
react-native-image-resizer: 1.4.5
|
||||
react-native-modal-datetime-picker: 14.0.1
|
||||
react-native-paper: 5.4.1
|
||||
react-native-paper: 5.5.2
|
||||
react-native-popup-menu: 0.16.1
|
||||
react-native-quick-actions: 0.3.13
|
||||
react-native-rsa-native: 2.0.5
|
||||
@@ -5159,7 +5144,7 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@joplin/pdf-viewer@workspace:packages/pdf-viewer, @joplin/pdf-viewer@~2.11":
|
||||
"@joplin/pdf-viewer@workspace:packages/pdf-viewer":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@joplin/pdf-viewer@workspace:packages/pdf-viewer"
|
||||
dependencies:
|
||||
@@ -6320,12 +6305,12 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@lezer/cpp@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "@lezer/cpp@npm:1.0.0"
|
||||
version: 1.1.0
|
||||
resolution: "@lezer/cpp@npm:1.1.0"
|
||||
dependencies:
|
||||
"@lezer/highlight": ^1.0.0
|
||||
"@lezer/lr": ^1.0.0
|
||||
checksum: 6829550db06ea9ce149fbcd50db3c8988e69bb8e2ce557ecde8f711222b902c5c64453fa77c502c6ab13381d041f5f8e8d3cb80049b2e9e963d76294533e5e83
|
||||
checksum: 9b25c881fc9b64fd2b019a077a85b0ba7cfda0bbdd92dbb0ff43300c9ba1ec4360128fe912bfe0f06a1c1bb5a564c5ace375c8aad254d07a717768a8f268695d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -6339,7 +6324,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@lezer/highlight@npm:1.1.4":
|
||||
"@lezer/highlight@npm:1.1.4, @lezer/highlight@npm:^1.0.0, @lezer/highlight@npm:^1.1.3":
|
||||
version: 1.1.4
|
||||
resolution: "@lezer/highlight@npm:1.1.4"
|
||||
dependencies:
|
||||
@@ -6348,52 +6333,43 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@lezer/highlight@npm:^1.0.0":
|
||||
version: 1.1.3
|
||||
resolution: "@lezer/highlight@npm:1.1.3"
|
||||
dependencies:
|
||||
"@lezer/common": ^1.0.0
|
||||
checksum: 90ec143ce46b32f6779c3b245f1b5a540d66686939816d3daed8318821acc4bc719466dc222336cfd483bf04a8de4fdc6f279e904cf114d4d9f786f9feccbbd8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@lezer/html@npm:^1.1.0":
|
||||
version: 1.3.0
|
||||
resolution: "@lezer/html@npm:1.3.0"
|
||||
"@lezer/html@npm:^1.3.0":
|
||||
version: 1.3.4
|
||||
resolution: "@lezer/html@npm:1.3.4"
|
||||
dependencies:
|
||||
"@lezer/common": ^1.0.0
|
||||
"@lezer/highlight": ^1.0.0
|
||||
"@lezer/lr": ^1.0.0
|
||||
checksum: e6efde94614a5b7ebf2713b244a110ef9025369561c7bf42fe6dd8f5877d2ee0c71f894b8b43d1284d23bf429fd3688ec3b6b0c2b8702df366c2b5e5cedc4c19
|
||||
checksum: 81dd134ac094edf7c40bae4c3b7126d336ce4c3c87756344bf604eff64d89b06fcb55f91618a4622eb0dae6d6015722f5bab58e2252d86e81fca8c3ced1a0c4d
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@lezer/java@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "@lezer/java@npm:1.0.0"
|
||||
version: 1.0.3
|
||||
resolution: "@lezer/java@npm:1.0.3"
|
||||
dependencies:
|
||||
"@lezer/highlight": ^1.0.0
|
||||
"@lezer/lr": ^1.0.0
|
||||
checksum: 0dcd3ea2aa431bc352ed1ca1e92c61a1d60e10d1c0e730200ef1f1dda4b42421e67d56e7808e2102f16b6ffd534f246b82249922998663e9099bd52c141ef1d9
|
||||
checksum: 2fffea6627d130413ffad4e61040267974cca3167d98881b9e5b5e2455530de74a82c234d93603e92a4972fad314671453c49c0a76b0f4547c4617d671fd7b99
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@lezer/javascript@npm:^1.0.0":
|
||||
version: 1.4.0
|
||||
resolution: "@lezer/javascript@npm:1.4.0"
|
||||
version: 1.4.2
|
||||
resolution: "@lezer/javascript@npm:1.4.2"
|
||||
dependencies:
|
||||
"@lezer/highlight": ^1.0.0
|
||||
"@lezer/lr": ^1.0.0
|
||||
checksum: 36c64e8530feef9b937cf75f8833aa8c0f5c8c0812c55c53a133d1af5deb491dd80084397d5773e873db90ff717aede25b45fa827eead66400cb81b097567c42
|
||||
"@lezer/highlight": ^1.1.3
|
||||
"@lezer/lr": ^1.3.0
|
||||
checksum: 542261c297709babfe450de1233c13fe2f5b111678d280cb0f8304f12bcdae294cb43c0ac64bbd647e5039de3286f6f0715d120fb132bd5af778363d1f612a1f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@lezer/lr@npm:^1.0.0":
|
||||
version: 1.2.5
|
||||
resolution: "@lezer/lr@npm:1.2.5"
|
||||
"@lezer/lr@npm:^1.0.0, @lezer/lr@npm:^1.1.0, @lezer/lr@npm:^1.3.0":
|
||||
version: 1.3.3
|
||||
resolution: "@lezer/lr@npm:1.3.3"
|
||||
dependencies:
|
||||
"@lezer/common": ^1.0.0
|
||||
checksum: 9a2fb2663dba5608c0f8a7d51b4c1beeb37d391da972fb3569fe51b637167ac4889b055ceb0c5267b8612a0aa5dfd517cbbd1349975cd662d1ca7fea374916b1
|
||||
checksum: 1804074c794005a31c54d80ab72127f19ae5be29bb627c52bc001a57b1af97a9e62732ff13e3aeb7bc53b330202b6bd3747272c64d87f257dbba533e75a183a3
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -6408,12 +6384,12 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"@lezer/php@npm:^1.0.0":
|
||||
version: 1.0.0
|
||||
resolution: "@lezer/php@npm:1.0.0"
|
||||
version: 1.0.1
|
||||
resolution: "@lezer/php@npm:1.0.1"
|
||||
dependencies:
|
||||
"@lezer/highlight": ^1.0.0
|
||||
"@lezer/lr": ^1.0.0
|
||||
checksum: 06d20c423011119363ccd4dd30d0bdec56ddbdddda05888a6b5890fc090a6338740a310a77d367d3d69a958925fad73e0c7f9b62953eb3f189ec513bd71d9f59
|
||||
"@lezer/lr": ^1.1.0
|
||||
checksum: a847c255c030b4d38913ddf1d5bd7324d83be7ef8d1d244542870be03b9bf7dc71283afeb2415c40dfd188cb99f0cc44bad760b5f3b7c35c3b8e5e00253848fc
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -7014,12 +6990,12 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@react-native-community/netinfo@npm:9.3.7":
|
||||
version: 9.3.7
|
||||
resolution: "@react-native-community/netinfo@npm:9.3.7"
|
||||
"@react-native-community/netinfo@npm:9.3.8":
|
||||
version: 9.3.8
|
||||
resolution: "@react-native-community/netinfo@npm:9.3.8"
|
||||
peerDependencies:
|
||||
react-native: ">=0.59"
|
||||
checksum: 556e47312be4b3d74c4c8fa7ab0b526a9d8395745c4d94d813cd8f08284d2a16ba274d8a8fdc38d5a273c913ebbc356bc15e65a8c8ab4506f7612a08e43da83d
|
||||
checksum: 1b41c2960211716189da94bf9a8070d28c34935dc914d1094d5a9de7b7137af093bd0e71f82fc158b973d9b5b13a7685ecca6430ad23d110b23129157907e102
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -11258,6 +11234,18 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"canvas@npm:^2.11.0":
|
||||
version: 2.11.2
|
||||
resolution: "canvas@npm:2.11.2"
|
||||
dependencies:
|
||||
"@mapbox/node-pre-gyp": ^1.0.0
|
||||
nan: ^2.17.0
|
||||
node-gyp: latest
|
||||
simple-get: ^3.0.3
|
||||
checksum: 61e554aef80022841dc836964534082ec21435928498032562089dfb7736215f039c7d99ee546b0cf10780232d9bf310950f8b4d489dc394e0fb6f6adfc97994
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"capital-case@npm:^1.0.4":
|
||||
version: 1.0.4
|
||||
resolution: "capital-case@npm:1.0.4"
|
||||
@@ -13848,6 +13836,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"decompress-response@npm:^4.2.0":
|
||||
version: 4.2.1
|
||||
resolution: "decompress-response@npm:4.2.1"
|
||||
dependencies:
|
||||
mimic-response: ^2.0.0
|
||||
checksum: 4e783ca4dfe9417354d61349750fe05236f565a4415a6ca20983a311be2371debaedd9104c0b0e7b36e5f167aeaae04f84f1a0b3f8be4162f1d7d15598b8fdba
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"decompress-response@npm:^6.0.0":
|
||||
version: 6.0.0
|
||||
resolution: "decompress-response@npm:6.0.0"
|
||||
@@ -14625,7 +14622,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"dommatrix@npm:^1.0.1, dommatrix@npm:^1.0.3":
|
||||
"dommatrix@npm:^1.0.3":
|
||||
version: 1.0.3
|
||||
resolution: "dommatrix@npm:1.0.3"
|
||||
checksum: 8ac727c1a14cf8de30a5b49a3bd6b2622a661b391fe1ac54e855eaa14a857ed86d63492150b5f70f912acc24fa3acc31d750259c47e9b5801de237624b0a319f
|
||||
@@ -17172,7 +17169,7 @@ __metadata:
|
||||
dependencies:
|
||||
chalk: 2.4.2
|
||||
jest: 29.4.3
|
||||
slugify: 1.6.5
|
||||
slugify: 1.6.6
|
||||
yeoman-generator: 5.8.0
|
||||
yosay: 2.0.2
|
||||
languageName: unknown
|
||||
@@ -23551,6 +23548,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"mimic-response@npm:^2.0.0":
|
||||
version: 2.1.0
|
||||
resolution: "mimic-response@npm:2.1.0"
|
||||
checksum: 014fad6ab936657e5f2f48bd87af62a8e928ebe84472aaf9e14fec4fcb31257a5edff77324d8ac13ddc6685ba5135cf16e381efac324e5f174fb4ddbf902bf07
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"mimic-response@npm:^3.1.0":
|
||||
version: 3.1.0
|
||||
resolution: "mimic-response@npm:3.1.0"
|
||||
@@ -24058,7 +24062,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"nan@npm:2.17.0":
|
||||
"nan@npm:2.17.0, nan@npm:^2.17.0":
|
||||
version: 2.17.0
|
||||
resolution: "nan@npm:2.17.0"
|
||||
dependencies:
|
||||
@@ -24092,7 +24096,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"nanoid@npm:3.3.6":
|
||||
"nanoid@npm:3.3.6, nanoid@npm:^3.3.6":
|
||||
version: 3.3.6
|
||||
resolution: "nanoid@npm:3.3.6"
|
||||
bin:
|
||||
@@ -26041,6 +26045,13 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"path2d-polyfill@npm:^2.0.1":
|
||||
version: 2.0.1
|
||||
resolution: "path2d-polyfill@npm:2.0.1"
|
||||
checksum: e38a4f920be3550e8334b899cc56f4fca0a976ca69404ee10d656a45d422996b7e27e294e2cf0aac2e410ce59d6977cde9f95586e62a24e6c904716695e059f8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"pbkdf2@npm:^3.0.3":
|
||||
version: 3.1.2
|
||||
resolution: "pbkdf2@npm:3.1.2"
|
||||
@@ -26062,17 +26073,16 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"pdfjs-dist@npm:*":
|
||||
version: 2.14.305
|
||||
resolution: "pdfjs-dist@npm:2.14.305"
|
||||
version: 3.5.141
|
||||
resolution: "pdfjs-dist@npm:3.5.141"
|
||||
dependencies:
|
||||
dommatrix: ^1.0.1
|
||||
canvas: ^2.11.0
|
||||
path2d-polyfill: ^2.0.1
|
||||
web-streams-polyfill: ^3.2.1
|
||||
peerDependencies:
|
||||
worker-loader: ^3.0.8
|
||||
peerDependenciesMeta:
|
||||
worker-loader:
|
||||
dependenciesMeta:
|
||||
canvas:
|
||||
optional: true
|
||||
checksum: b75443f81e500856e3a7b61303d1f621f81e82b19fc6216f74d33a70d1ef392bb8b2ca4cfa39f11e7c0a877e6d6d74b474768988dcf3299d5d8a1d996d48f856
|
||||
checksum: b58e801b92a0d7b58b3799c0cf48f35deb45e140ef488744251a3e3dd148acef7aef4edfb8c7622b342c7068e8b7c01b754546ed0e60897e48665fa45af9d845
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -26421,12 +26431,12 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"postcss-selector-parser@npm:^6.0.2, postcss-selector-parser@npm:^6.0.4":
|
||||
version: 6.0.10
|
||||
resolution: "postcss-selector-parser@npm:6.0.10"
|
||||
version: 6.0.11
|
||||
resolution: "postcss-selector-parser@npm:6.0.11"
|
||||
dependencies:
|
||||
cssesc: ^3.0.0
|
||||
util-deprecate: ^1.0.2
|
||||
checksum: 46afaa60e3d1998bd7adf6caa374baf857cc58d3ff944e29459c9a9e4680a7fe41597bd5b755fc81d7c388357e9bf67c0251d047c640a09f148e13606b8a8608
|
||||
checksum: 0b01aa9c2d2c8dbeb51e9b204796b678284be9823abc8d6d40a8b16d4149514e922c264a8ed4deb4d6dbced564b9be390f5942c058582d8656351516d6c49cde
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -26484,13 +26494,13 @@ __metadata:
|
||||
linkType: hard
|
||||
|
||||
"postcss@npm:^8.4.19":
|
||||
version: 8.4.20
|
||||
resolution: "postcss@npm:8.4.20"
|
||||
version: 8.4.23
|
||||
resolution: "postcss@npm:8.4.23"
|
||||
dependencies:
|
||||
nanoid: ^3.3.4
|
||||
nanoid: ^3.3.6
|
||||
picocolors: ^1.0.0
|
||||
source-map-js: ^1.0.2
|
||||
checksum: 1a5609ea1c1b204f9c2974a0019ae9eef2d99bf645c2c9aac675166c4cb1005be7b5e2ba196160bc771f5d9ac896ed883f236f888c891e835e59d28fff6651aa
|
||||
checksum: 8bb9d1b2ea6e694f8987d4f18c94617971b2b8d141602725fedcc2222fdc413b776a6e1b969a25d627d7b2681ca5aabb56f59e727ef94072e1b6ac8412105a2f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -27465,9 +27475,9 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"react-native-paper@npm:5.4.1":
|
||||
version: 5.4.1
|
||||
resolution: "react-native-paper@npm:5.4.1"
|
||||
"react-native-paper@npm:5.5.2":
|
||||
version: 5.5.2
|
||||
resolution: "react-native-paper@npm:5.5.2"
|
||||
dependencies:
|
||||
"@callstack/react-theme-provider": ^3.0.8
|
||||
color: ^3.1.2
|
||||
@@ -27477,7 +27487,7 @@ __metadata:
|
||||
react-native: "*"
|
||||
react-native-safe-area-context: "*"
|
||||
react-native-vector-icons: "*"
|
||||
checksum: b6bca70b935ca3b69ba4d2bc16717b938b4219d0a1fc17b1e0c7b87df753ba3cd8f52e8f17cf09ca862c7e6be243fb52092054fc176a4b284fa3143cf32d0672
|
||||
checksum: fd87b64409e51a2a8c64019710c79c17d6dd016ea3744d869e9aa6a891093418ca6a2326f8ab063ef460d781459b8ed676952a030e64acf8312bc4d05a4c50eb
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -28814,6 +28824,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"rn-fetch-blob@patch:rn-fetch-blob@npm%3A0.12.0#./.yarn/patches/rn-fetch-blob-npm-0.12.0-cf02e3c544.patch::locator=root%40workspace%3A.":
|
||||
version: 0.12.0
|
||||
resolution: "rn-fetch-blob@patch:rn-fetch-blob@npm%3A0.12.0#./.yarn/patches/rn-fetch-blob-npm-0.12.0-cf02e3c544.patch::version=0.12.0&hash=9431c2&locator=root%40workspace%3A."
|
||||
dependencies:
|
||||
base-64: 0.1.0
|
||||
glob: 7.0.6
|
||||
checksum: 6535ee347b3e76733a10c3873c14622b35613caa86242536b68f130b75a3379d9bb060ad5c8832d78e639c88869e321c288e5c8e89373cdb0c14f23253c31c50
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"roarr@npm:^2.15.3":
|
||||
version: 2.15.4
|
||||
resolution: "roarr@npm:2.15.4"
|
||||
@@ -29596,6 +29616,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"simple-get@npm:^3.0.3":
|
||||
version: 3.1.1
|
||||
resolution: "simple-get@npm:3.1.1"
|
||||
dependencies:
|
||||
decompress-response: ^4.2.0
|
||||
once: ^1.3.1
|
||||
simple-concat: ^1.0.0
|
||||
checksum: 80195e70bf171486e75c31e28e5485468195cc42f85940f8b45c4a68472160144d223eb4d07bc82ef80cb974b7c401db021a540deb2d34ac4b3b8883da2d6401
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"simple-get@npm:^4.0.0":
|
||||
version: 4.0.0
|
||||
resolution: "simple-get@npm:4.0.0"
|
||||
@@ -29716,10 +29747,10 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"slugify@npm:1.6.5":
|
||||
version: 1.6.5
|
||||
resolution: "slugify@npm:1.6.5"
|
||||
checksum: a955a1b600201030f4c1daa9bb74a17d4402a0693fc40978bbd17e44e64fd72dad3bac4037422aa8aed55b5170edd57f3f4cd8f59ba331f5cf0f10f1a7795609
|
||||
"slugify@npm:1.6.6":
|
||||
version: 1.6.6
|
||||
resolution: "slugify@npm:1.6.6"
|
||||
checksum: 04773c2d3b7aea8d2a61fa47cc7e5d29ce04e1a96cbaec409da57139df906acb3a449fac30b167d203212c806e73690abd4ff94fbad0a9a7b7ea109a2a638ae9
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user