You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-30 20:39:46 +02:00
Compare commits
9 Commits
plugin-rep
...
external-w
Author | SHA1 | Date | |
---|---|---|---|
|
560b14b968 | ||
|
a1fd1df00b | ||
|
57d826ba09 | ||
|
0f8276e642 | ||
|
6e735ce32a | ||
|
9c31a967b3 | ||
|
33188e056b | ||
|
284c75fcf5 | ||
|
0cdefcc61a |
@@ -5,7 +5,6 @@ _releases/
|
||||
*.min.js
|
||||
**/commands/index.ts
|
||||
**/node_modules/
|
||||
.yarn/
|
||||
Assets/
|
||||
docs/
|
||||
highlight.pack.js
|
||||
@@ -13,8 +12,6 @@ Modules/TinyMCE/IconPack/postinstall.js
|
||||
Modules/TinyMCE/JoplinLists/
|
||||
Modules/TinyMCE/langs/
|
||||
node_modules/
|
||||
packages/app-desktop/build/
|
||||
packages/app-cli/tests/test data/
|
||||
packages/app-cli/build
|
||||
packages/app-cli/build/
|
||||
packages/app-cli/locales
|
||||
@@ -1512,6 +1509,9 @@ packages/lib/services/plugins/api/types.js.map
|
||||
packages/lib/services/plugins/reducer.d.ts
|
||||
packages/lib/services/plugins/reducer.js
|
||||
packages/lib/services/plugins/reducer.js.map
|
||||
packages/lib/services/plugins/sandboxProxy.d.ts
|
||||
packages/lib/services/plugins/sandboxProxy.js
|
||||
packages/lib/services/plugins/sandboxProxy.js.map
|
||||
packages/lib/services/plugins/utils/createViewHandle.d.ts
|
||||
packages/lib/services/plugins/utils/createViewHandle.js
|
||||
packages/lib/services/plugins/utils/createViewHandle.js.map
|
||||
@@ -1539,12 +1539,6 @@ packages/lib/services/plugins/utils/validatePluginId.js.map
|
||||
packages/lib/services/plugins/utils/validatePluginId.test.d.ts
|
||||
packages/lib/services/plugins/utils/validatePluginId.test.js
|
||||
packages/lib/services/plugins/utils/validatePluginId.test.js.map
|
||||
packages/lib/services/plugins/utils/validatePluginVersion.d.ts
|
||||
packages/lib/services/plugins/utils/validatePluginVersion.js
|
||||
packages/lib/services/plugins/utils/validatePluginVersion.js.map
|
||||
packages/lib/services/plugins/utils/validatePluginVersion.test.d.ts
|
||||
packages/lib/services/plugins/utils/validatePluginVersion.test.js
|
||||
packages/lib/services/plugins/utils/validatePluginVersion.test.js.map
|
||||
packages/lib/services/rest/Api.d.ts
|
||||
packages/lib/services/rest/Api.js
|
||||
packages/lib/services/rest/Api.js.map
|
||||
@@ -1947,6 +1941,9 @@ packages/tools/generate-images.js.map
|
||||
packages/tools/git-changelog.d.ts
|
||||
packages/tools/git-changelog.js
|
||||
packages/tools/git-changelog.js.map
|
||||
packages/tools/lerna-add.d.ts
|
||||
packages/tools/lerna-add.js
|
||||
packages/tools/lerna-add.js.map
|
||||
packages/tools/release-android.d.ts
|
||||
packages/tools/release-android.js
|
||||
packages/tools/release-android.js.map
|
||||
@@ -1959,9 +1956,6 @@ packages/tools/release-electron.js.map
|
||||
packages/tools/release-ios.d.ts
|
||||
packages/tools/release-ios.js
|
||||
packages/tools/release-ios.js.map
|
||||
packages/tools/release-plugin-repo-cli.d.ts
|
||||
packages/tools/release-plugin-repo-cli.js
|
||||
packages/tools/release-plugin-repo-cli.js.map
|
||||
packages/tools/release-server.d.ts
|
||||
packages/tools/release-server.js
|
||||
packages/tools/release-server.js.map
|
||||
|
13
.github/scripts/run_ci.sh
vendored
13
.github/scripts/run_ci.sh
vendored
@@ -46,14 +46,13 @@ echo "IS_MACOS=$IS_MACOS"
|
||||
|
||||
echo "Node $( node -v )"
|
||||
echo "Npm $( npm -v )"
|
||||
echo "Yarn $( yarn -v )"
|
||||
|
||||
# =============================================================================
|
||||
# Install packages
|
||||
# =============================================================================
|
||||
|
||||
cd "$ROOT_DIR"
|
||||
yarn install
|
||||
npm install
|
||||
|
||||
# =============================================================================
|
||||
# Run test units. Only do it for pull requests and dev branch because we don't
|
||||
@@ -79,7 +78,7 @@ if [ "$IS_PULL_REQUEST" == "1" ] || [ "$IS_DEV_BRANCH" = "1" ]; then
|
||||
#
|
||||
# https://stackoverflow.com/questions/38558989
|
||||
export NODE_OPTIONS="--max-old-space-size=4096"
|
||||
yarn run test-ci
|
||||
npm run test-ci
|
||||
testResult=$?
|
||||
if [ $testResult -ne 0 ]; then
|
||||
exit $testResult
|
||||
@@ -94,7 +93,7 @@ fi
|
||||
if [ "$IS_PULL_REQUEST" == "1" ] || [ "$IS_DEV_BRANCH" = "1" ]; then
|
||||
echo "Step: Running linter..."
|
||||
|
||||
yarn run linter-ci ./
|
||||
npm run linter-ci ./
|
||||
testResult=$?
|
||||
if [ $testResult -ne 0 ]; then
|
||||
exit $testResult
|
||||
@@ -167,12 +166,12 @@ cd "$ROOT_DIR/packages/app-desktop"
|
||||
|
||||
if [[ $GIT_TAG_NAME = v* ]]; then
|
||||
echo "Step: Building and publishing desktop application..."
|
||||
USE_HARD_LINKS=false yarn run dist
|
||||
USE_HARD_LINKS=false npm run dist
|
||||
elif [[ $GIT_TAG_NAME = server-v* ]] && [[ $IS_LINUX = 1 ]]; then
|
||||
echo "Step: Building Docker Image..."
|
||||
cd "$ROOT_DIR"
|
||||
yarn run buildServerDocker --tag-name $GIT_TAG_NAME --push-images
|
||||
npm run buildServerDocker -- --tag-name $GIT_TAG_NAME --push-images
|
||||
else
|
||||
echo "Step: Building but *not* publishing desktop application..."
|
||||
USE_HARD_LINKS=false yarn run dist --publish=never
|
||||
USE_HARD_LINKS=false npm run dist -- --publish=never
|
||||
fi
|
||||
|
47
.github/workflows/github-actions-main.yml
vendored
47
.github/workflows/github-actions-main.yml
vendored
@@ -49,11 +49,6 @@ jobs:
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
|
||||
- name: Install Yarn
|
||||
run: |
|
||||
# https://yarnpkg.com/getting-started/install
|
||||
corepack enable
|
||||
|
||||
# Login to Docker only if we're on a server release tag. If we run this on
|
||||
# a pull request it will fail because the PR doesn't have access to
|
||||
@@ -85,44 +80,6 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
IS_CONTINUOUS_INTEGRATION: 1
|
||||
run: |
|
||||
yarn install
|
||||
npm install
|
||||
cd packages/app-desktop
|
||||
yarn run dist
|
||||
|
||||
ServerDockerImage:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest]
|
||||
steps:
|
||||
|
||||
- name: Install Docker Engine
|
||||
run: |
|
||||
sudo apt-get install -y apt-transport-https
|
||||
sudo apt-get install -y ca-certificates
|
||||
sudo apt-get install -y curl
|
||||
sudo apt-get install -y gnupg
|
||||
sudo apt-get install -y lsb-release
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
||||
echo \
|
||||
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
|
||||
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
sudo apt-get update || true
|
||||
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
|
||||
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '16'
|
||||
|
||||
- name: Install Yarn
|
||||
run: |
|
||||
# https://yarnpkg.com/getting-started/install
|
||||
corepack enable
|
||||
|
||||
- name: Build Docker Image
|
||||
run: |
|
||||
yarn install
|
||||
yarn run buildServerDocker --tag-name server-v0.0.0
|
||||
|
||||
npm run dist
|
26
.gitignore
vendored
26
.gitignore
vendored
@@ -51,17 +51,6 @@ lerna-debug.log
|
||||
.env
|
||||
docs/**/*.mustache
|
||||
|
||||
# Yarn stuff
|
||||
# https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored
|
||||
|
||||
.pnp.*
|
||||
.yarn/*
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
|
||||
# AUTO-GENERATED - EXCLUDED TYPESCRIPT BUILD
|
||||
packages/app-cli/app/LinkSelector.d.ts
|
||||
packages/app-cli/app/LinkSelector.js
|
||||
@@ -1503,6 +1492,9 @@ packages/lib/services/plugins/api/types.js.map
|
||||
packages/lib/services/plugins/reducer.d.ts
|
||||
packages/lib/services/plugins/reducer.js
|
||||
packages/lib/services/plugins/reducer.js.map
|
||||
packages/lib/services/plugins/sandboxProxy.d.ts
|
||||
packages/lib/services/plugins/sandboxProxy.js
|
||||
packages/lib/services/plugins/sandboxProxy.js.map
|
||||
packages/lib/services/plugins/utils/createViewHandle.d.ts
|
||||
packages/lib/services/plugins/utils/createViewHandle.js
|
||||
packages/lib/services/plugins/utils/createViewHandle.js.map
|
||||
@@ -1530,12 +1522,6 @@ packages/lib/services/plugins/utils/validatePluginId.js.map
|
||||
packages/lib/services/plugins/utils/validatePluginId.test.d.ts
|
||||
packages/lib/services/plugins/utils/validatePluginId.test.js
|
||||
packages/lib/services/plugins/utils/validatePluginId.test.js.map
|
||||
packages/lib/services/plugins/utils/validatePluginVersion.d.ts
|
||||
packages/lib/services/plugins/utils/validatePluginVersion.js
|
||||
packages/lib/services/plugins/utils/validatePluginVersion.js.map
|
||||
packages/lib/services/plugins/utils/validatePluginVersion.test.d.ts
|
||||
packages/lib/services/plugins/utils/validatePluginVersion.test.js
|
||||
packages/lib/services/plugins/utils/validatePluginVersion.test.js.map
|
||||
packages/lib/services/rest/Api.d.ts
|
||||
packages/lib/services/rest/Api.js
|
||||
packages/lib/services/rest/Api.js.map
|
||||
@@ -1938,6 +1924,9 @@ packages/tools/generate-images.js.map
|
||||
packages/tools/git-changelog.d.ts
|
||||
packages/tools/git-changelog.js
|
||||
packages/tools/git-changelog.js.map
|
||||
packages/tools/lerna-add.d.ts
|
||||
packages/tools/lerna-add.js
|
||||
packages/tools/lerna-add.js.map
|
||||
packages/tools/release-android.d.ts
|
||||
packages/tools/release-android.js
|
||||
packages/tools/release-android.js.map
|
||||
@@ -1950,9 +1939,6 @@ packages/tools/release-electron.js.map
|
||||
packages/tools/release-ios.d.ts
|
||||
packages/tools/release-ios.js
|
||||
packages/tools/release-ios.js.map
|
||||
packages/tools/release-plugin-repo-cli.d.ts
|
||||
packages/tools/release-plugin-repo-cli.js
|
||||
packages/tools/release-plugin-repo-cli.js.map
|
||||
packages/tools/release-server.d.ts
|
||||
packages/tools/release-server.js
|
||||
packages/tools/release-server.js.map
|
||||
|
File diff suppressed because one or more lines are too long
768
.yarn/releases/yarn-3.1.1.cjs
vendored
768
.yarn/releases/yarn-3.1.1.cjs
vendored
File diff suppressed because one or more lines are too long
@@ -1,9 +0,0 @@
|
||||
nmHoistingLimits: workspaces
|
||||
|
||||
nodeLinker: node-modules
|
||||
|
||||
plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
|
||||
spec: "@yarnpkg/plugin-workspace-tools"
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.1.1.cjs
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB |
Binary file not shown.
Before Width: | Height: | Size: 8.0 KiB |
Binary file not shown.
Before Width: | Height: | Size: 23 KiB |
Binary file not shown.
Before Width: | Height: | Size: 53 KiB |
Binary file not shown.
Before Width: | Height: | Size: 53 KiB |
38
BUILD.md
38
BUILD.md
@@ -1,6 +1,6 @@
|
||||
# Building the applications
|
||||
|
||||
The Joplin source code is hosted on a [monorepo](https://en.wikipedia.org/wiki/Monorepo) and is managed using Yarn workspaces (as well as Lerna for publishing the packages).
|
||||
The Joplin source code is hosted on a [monorepo](https://en.wikipedia.org/wiki/Monorepo) managed by Lerna. The usage of Lerna is mostly transparent as the needed commands have been moved to the root package.json and thus are invoked for example when running `npm install` or `npm run watch`. The main thing to know about Lerna is that it links the packages in the monorepo using `npm link`, so if you check the node_modules directory you will see links instead of actual directories for certain packages. This is something to keep in mind as these links can cause issues in some cases.
|
||||
|
||||
The list of the main sub-packages is below:
|
||||
|
||||
@@ -18,30 +18,30 @@ There are also a few forks of existing packages under the "fork-*" name.
|
||||
|
||||
## Required dependencies
|
||||
|
||||
- Install node 16+ - https://nodejs.org/en/
|
||||
- Install node 14+ - https://nodejs.org/en/
|
||||
- macOS: Install Cocoapods - `brew install cocoapods`
|
||||
- Windows: Install Windows Build Tools - `yarn install -g windows-build-tools --vs2015`
|
||||
- Windows: Install Windows Build Tools - `npm install -g windows-build-tools --vs2015`
|
||||
- Linux: Install dependencies - `sudo apt install build-essential libnss3 libsecret-1-dev python rsync`
|
||||
|
||||
## Building
|
||||
|
||||
Before doing anything else, from the root of the project, run:
|
||||
|
||||
yarn install
|
||||
npm install
|
||||
|
||||
Then you can test the various applications:
|
||||
|
||||
## Testing the desktop application
|
||||
|
||||
cd packages/app-desktop
|
||||
yarn start
|
||||
npm start
|
||||
|
||||
You can also run it under WSL 2. To do so, [follow these instructions](https://www.beekeeperstudio.io/blog/building-electron-windows-ubuntu-wsl2) to setup your environment.
|
||||
|
||||
## Testing the Terminal application
|
||||
|
||||
cd packages/app-cli
|
||||
yarn start
|
||||
npm start
|
||||
|
||||
## Testing the Mobile application
|
||||
|
||||
@@ -54,12 +54,12 @@ Then, for **Android**:
|
||||
|
||||
On **iOS**, open the file `ios/Joplin.xcworkspace` on XCode and run the app from there.
|
||||
|
||||
Normally the **bundler** should start automatically with the application. If it doesn't, run `yarn start` from `packages/app-mobile`.
|
||||
Normally the **bundler** should start automatically with the application. If it doesn't, run `npm start` from `packages/app-mobile`.
|
||||
|
||||
## Building the clipper
|
||||
|
||||
cd packages/app-clipper/popup
|
||||
yarn run watch # To watch for changes
|
||||
npm run watch # To watch for changes
|
||||
|
||||
To test the extension please refer to the relevant pages for each browser: [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension#Trying_it_out) / [Chrome](https://developer.chrome.com/docs/extensions/mv3/getstarted/). Please note that the extension in dev mode will only connect to a dev instance of the desktop app (and vice-versa).
|
||||
|
||||
@@ -67,15 +67,23 @@ To test the extension please refer to the relevant pages for each browser: [Fire
|
||||
|
||||
To make changes to the application, you'll need to rebuild any TypeScript file you've changed. The simplest way to do this is to watch for changes from the root of the project. Simply run this command, and it should take care of the rest:
|
||||
|
||||
yarn run watch
|
||||
npm run watch
|
||||
|
||||
Running `yarn run tsc` would have the same effect, but without watching.
|
||||
Running `npm run tsc` would have the same effect, but without watching.
|
||||
|
||||
## Running an application with additional parameters
|
||||
|
||||
You can specify additional parameters when running the desktop or CLI application. To do so, add `--` to the `yarn start` command, followed by your flags. For example:
|
||||
You can specify additional parameters when running the desktop or CLI application. To do so, add `--` to the `npm start` command, followed by your flags. For example:
|
||||
|
||||
yarn start --debug
|
||||
npm start -- --debug
|
||||
|
||||
## Adding a new dependency
|
||||
|
||||
Since Joplin uses Lerna, adding a new dependency should not be done using `npm i -s ...`. Instead you should use the `lerna add` command, which will take care of adding the package while handling the linked packages correctly. For example, to add the package "leftpad" to the "app-desktop" sub-package, you would run:
|
||||
|
||||
npx lerna add leftpad --scope=@joplin/app-desktop
|
||||
|
||||
Note that you should most likely always specify a scope because otherwise it will add the package to all the sub-packages.
|
||||
|
||||
## TypeScript
|
||||
|
||||
@@ -87,14 +95,14 @@ If you'd like to auto-reload the desktop app on changes rather than having to qu
|
||||
|
||||
```sh
|
||||
cd packages/app-desktop
|
||||
watchman-make -p '**/*.js' '**/*.jsx' --run "yarn start"
|
||||
watchman-make -p '**/*.js' '**/*.jsx' --run "npm start"
|
||||
```
|
||||
|
||||
It still requires you to quit the application each time you want it to rebuild, but at least you don't have to re-run `"yarn start"` each time. Here's what the workflow loop looks like in practice:
|
||||
It still requires you to quit the application each time you want it to rebuild, but at least you don't have to re-run `"npm start"` each time. Here's what the workflow loop looks like in practice:
|
||||
|
||||
1. Edit and save files in your text editor.
|
||||
2. Switch to the Electron app and <kbd>cmd</kbd>+<kbd>Q</kbd> to quit it.
|
||||
3. `watchman` immediately restarts the app for you (whereas usually you'd have to switch back to the terminal, type `"yarn start"`, and hit enter).
|
||||
3. `watchman` immediately restarts the app for you (whereas usually you'd have to switch back to the terminal, type `"npm start"`, and hit enter).
|
||||
|
||||
# Troubleshooting
|
||||
|
||||
|
@@ -44,7 +44,7 @@ Building the apps is relatively easy - please [see the build instructions](https
|
||||
|
||||
## Coding style
|
||||
|
||||
Coding style is enforced by a pre-commit hook that runs eslint. This hook is installed whenever running `yarn install` on any of the application directory. If for some reason the pre-commit hook didn't get installed, you can manually install it by running `yarn install` at the root of the repository.
|
||||
Coding style is enforced by a pre-commit hook that runs eslint. This hook is installed whenever running `npm install` on any of the application directory. If for some reason the pre-commit hook didn't get installed, you can manually install it by running `npm install` at the root of the repository.
|
||||
|
||||
For new React components, please use [React Hooks](https://reactjs.org/docs/hooks-intro.html). For new code in general, please use TypeScript. Even if you are modifying a file that was originally in JavaScript you should ideally convert it first to TypeScript before modifying it. Doing so is relatively easy and it helps maintain code quality.
|
||||
|
||||
@@ -61,26 +61,26 @@ When submitting a pull request for a new feature or a bug fix, please add automa
|
||||
The tests are under packages/app-cli/tests. To get them running, you first need to build the CLI app:
|
||||
|
||||
```sh
|
||||
yarn install
|
||||
npm install
|
||||
cd packages/app-cli
|
||||
```
|
||||
|
||||
To run all the test units:
|
||||
|
||||
```sh
|
||||
yarn test
|
||||
npm test
|
||||
```
|
||||
|
||||
To run just one particular file:
|
||||
|
||||
```sh
|
||||
yarn test --filter=markdownUtils # Don't add the .js extension
|
||||
npm test -- --filter=markdownUtils # Don't add the .js extension
|
||||
```
|
||||
|
||||
To filter tests. For example, to run all the test units that contain "should handle conflict" in their description:
|
||||
|
||||
```sh
|
||||
yarn test --filter="should handle conflict"
|
||||
npm test -- --filter="should handle conflict"
|
||||
```
|
||||
|
||||
## About abandoned pull requests
|
||||
|
20
DEPLOY.md
20
DEPLOY.md
@@ -6,7 +6,7 @@ Various scripts are provided to deploy the Joplin applications, scripts and tool
|
||||
|
||||
Before new releases are created, all version numbers must be updated. This is done using the `setupNewRelease` script and passing it the new major.minor version number. For example:
|
||||
|
||||
yarn run setupNewRelease -- 1.8
|
||||
npm run setupNewRelease -- 1.8
|
||||
|
||||
Patch numbers are going to be incremented automatically when releasing each individual package.
|
||||
|
||||
@@ -14,13 +14,13 @@ Patch numbers are going to be incremented automatically when releasing each indi
|
||||
|
||||
The desktop application is built for Windows, macOS and Linux via continuous integration, by pushing a version tag to GitHub. The process is automated using:
|
||||
|
||||
yarn run releaseDesktop
|
||||
npm run releaseDesktop
|
||||
|
||||
## Android application
|
||||
|
||||
The app is built and upload to GitHub using:
|
||||
|
||||
yarn run releaseAndroid --type=prerelease
|
||||
npm run releaseAndroid -- --type=prerelease
|
||||
|
||||
The "type" parameter can be either "release" or "prerelease"
|
||||
|
||||
@@ -32,7 +32,7 @@ It must be built and released manually using XCode.
|
||||
|
||||
Unlike the mobile or desktop application, the CLI app doesn't bundle its dependencies and is always installed from source. For that reason, all its `@joplin` dependencies must be deployed publicly first. This is done using:
|
||||
|
||||
yarn run publishAll
|
||||
npm run publishAll
|
||||
|
||||
This is going to publish all the Joplin libraries, such as `@joplin/lib`, `@joplin/tools`, etc.
|
||||
|
||||
@@ -52,28 +52,26 @@ Then in `app-cli/package.json`, all `@joplin` dependencies and devdependencies m
|
||||
|
||||
Finally, to release the actual app, run:
|
||||
|
||||
yarn run releaseCli
|
||||
npm run releaseCli
|
||||
|
||||
## Joplin Server
|
||||
|
||||
Run:
|
||||
|
||||
yarn run releaseServer
|
||||
npm run releaseServer
|
||||
|
||||
## Web clipper
|
||||
|
||||
Run:
|
||||
|
||||
yarn run releaseClipper
|
||||
npm run releaseClipper
|
||||
|
||||
## Plugin generator
|
||||
|
||||
First the types should generally be updated, using `./updateTypes.sh`. Then run:
|
||||
|
||||
yarn run releasePluginGenerator
|
||||
npm run releasePluginGenerator
|
||||
|
||||
## Plugin Repo Cli
|
||||
|
||||
This tool is packaged using Webpack so it can be released with a single command:
|
||||
|
||||
yarn run releasePluginRepoCli
|
||||
Since it has dependencies to the `@joplin` packages, it is released when running `npm run publishAll`
|
||||
|
@@ -1,3 +1,5 @@
|
||||
# https://versatile.nl/blog/deploying-lerna-web-apps-with-docker
|
||||
|
||||
FROM node:16-bullseye
|
||||
|
||||
RUN apt-get update \
|
||||
@@ -5,12 +7,8 @@ RUN apt-get update \
|
||||
python \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Enables Yarn
|
||||
RUN corepack enable
|
||||
|
||||
RUN echo "Node: $(node --version)"
|
||||
RUN echo "Npm: $(npm --version)"
|
||||
RUN echo "Yarn: $(yarn --version)"
|
||||
|
||||
ARG user=joplin
|
||||
|
||||
@@ -28,11 +26,7 @@ RUN mkdir /home/$user/logs
|
||||
# this point)
|
||||
|
||||
COPY --chown=$user:$user package*.json ./
|
||||
COPY --chown=$user:$user .yarn ./.yarn
|
||||
COPY --chown=$user:$user .yarnrc.yml .
|
||||
COPY --chown=$user:$user yarn.lock .
|
||||
|
||||
RUN yarn install --inline-builds --mode=skip-build
|
||||
RUN npm install --ignore-scripts
|
||||
|
||||
# To take advantage of the Docker cache, we first copy all the package.json
|
||||
# and package-lock.json files, as they rarely change, and then bootstrap
|
||||
@@ -46,11 +40,11 @@ RUN yarn install --inline-builds --mode=skip-build
|
||||
# prevent certain sub-packages, such as sqlite3, from being built
|
||||
|
||||
COPY --chown=$user:$user packages/fork-sax/package*.json ./packages/fork-sax/
|
||||
COPY --chown=$user:$user packages/fork-uslug/package*.json ./packages/fork-uslug/
|
||||
COPY --chown=$user:$user packages/htmlpack/package*.json ./packages/htmlpack/
|
||||
COPY --chown=$user:$user packages/renderer/package*.json ./packages/renderer/
|
||||
COPY --chown=$user:$user packages/tools/package*.json ./packages/tools/
|
||||
COPY --chown=$user:$user packages/lib/package*.json ./packages/lib/
|
||||
COPY --chown=$user:$user lerna.json .
|
||||
COPY --chown=$user:$user tsconfig.json .
|
||||
|
||||
# The following have postinstall scripts so we need to copy all the files.
|
||||
@@ -59,16 +53,20 @@ COPY --chown=$user:$user tsconfig.json .
|
||||
COPY --chown=$user:$user packages/turndown ./packages/turndown
|
||||
COPY --chown=$user:$user packages/turndown-plugin-gfm ./packages/turndown-plugin-gfm
|
||||
COPY --chown=$user:$user packages/fork-htmlparser2 ./packages/fork-htmlparser2
|
||||
COPY --chown=$user:$user packages/server/package*.json ./packages/server/
|
||||
|
||||
# Then bootstrap only, without compiling the TypeScript files
|
||||
|
||||
RUN yarn install --inline-builds --mode=skip-build
|
||||
RUN npm run bootstrap
|
||||
|
||||
# We have a separate step for the server files because they are more likely to
|
||||
# change.
|
||||
|
||||
COPY --chown=$user:$user packages/server/package*.json ./packages/server/
|
||||
RUN npm run bootstrapServerOnly
|
||||
|
||||
# Now copy the source files. Put lib and server last as they are more likely to change.
|
||||
|
||||
COPY --chown=$user:$user packages/fork-sax ./packages/fork-sax
|
||||
COPY --chown=$user:$user packages/fork-uslug ./packages/fork-uslug
|
||||
COPY --chown=$user:$user packages/htmlpack ./packages/htmlpack
|
||||
COPY --chown=$user:$user packages/renderer ./packages/renderer
|
||||
COPY --chown=$user:$user packages/tools ./packages/tools
|
||||
@@ -77,12 +75,12 @@ COPY --chown=$user:$user packages/server ./packages/server
|
||||
|
||||
# Finally build everything, in particular the TypeScript files.
|
||||
|
||||
RUN yarn run build
|
||||
RUN npm run build
|
||||
|
||||
ENV RUNNING_IN_DOCKER=1
|
||||
EXPOSE ${APP_PORT}
|
||||
|
||||
CMD [ "yarn", "--prefix", "packages/server", "start" ]
|
||||
CMD [ "npm", "--prefix", "packages/server", "start" ]
|
||||
|
||||
# Build-time metadata
|
||||
# https://github.com/opencontainers/image-spec/blob/master/annotations.md
|
||||
|
15
README.md
15
README.md
@@ -22,11 +22,11 @@ Three types of applications are available: for **desktop** (Windows, macOS and L
|
||||
|
||||
Operating System | Download
|
||||
---|---
|
||||
Windows (32 and 64-bit) | <a href='https://github.com/laurent22/joplin/releases/download/v2.6.10/Joplin-Setup-2.6.10.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.6.10/Joplin-2.6.10.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.6.10/Joplin-2.6.10.AppImage'><img alt='Get it on Linux' width="134px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeLinux.png'/></a>
|
||||
Windows (32 and 64-bit) | <a href='https://github.com/laurent22/joplin/releases/download/v2.6.9/Joplin-Setup-2.6.9.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.6.9/Joplin-2.6.9.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.6.9/Joplin-2.6.9.AppImage'><img alt='Get it on Linux' width="134px" src='https://raw.githubusercontent.com/laurent22/joplin/dev/Assets/WebsiteAssets/images/BadgeLinux.png'/></a>
|
||||
|
||||
**On Windows**, you may also use the <a href='https://github.com/laurent22/joplin/releases/download/v2.6.10/JoplinPortable.exe'>Portable version</a>. The [portable application](https://en.wikipedia.org/wiki/Portable_application) allows installing the software on a portable device such as a USB key. Simply copy the file JoplinPortable.exe in any directory on that USB key ; the application will then create a directory called "JoplinProfile" next to the executable file.
|
||||
**On Windows**, you may also use the <a href='https://github.com/laurent22/joplin/releases/download/v2.6.9/JoplinPortable.exe'>Portable version</a>. The [portable application](https://en.wikipedia.org/wiki/Portable_application) allows installing the software on a portable device such as a USB key. Simply copy the file JoplinPortable.exe in any directory on that USB key ; the application will then create a directory called "JoplinProfile" next to the executable file.
|
||||
|
||||
**On Linux**, the recommended way is to use the following installation script as it will handle the desktop icon too:
|
||||
|
||||
@@ -36,7 +36,7 @@ Linux | <a href='https://github.com/laurent22/joplin/releases/download/v2.6.10/J
|
||||
|
||||
Operating System | Download | Alt. Download
|
||||
---|---|---
|
||||
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> | or download the APK file: [64-bit](https://github.com/laurent22/joplin-android/releases/download/android-v2.6.9/joplin-v2.6.9.apk) [32-bit](https://github.com/laurent22/joplin-android/releases/download/android-v2.6.9/joplin-v2.6.9-32bit.apk)
|
||||
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> | or download the APK file: [64-bit](https://github.com/laurent22/joplin-android/releases/download/android-v2.6.8/joplin-v2.6.8.apk) [32-bit](https://github.com/laurent22/joplin-android/releases/download/android-v2.6.8/joplin-v2.6.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> | -
|
||||
|
||||
## Terminal application
|
||||
@@ -127,7 +127,6 @@ The Web Clipper is a browser extension that allows you to save web pages and scr
|
||||
- [End-to-end encryption spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/e2ee.md)
|
||||
- [Note History spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/history.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)
|
||||
- [Search Sorting spec](https://github.com/laurent22/joplin/blob/dev/readme/spec/search_sorting.md)
|
||||
- [Server: File URL Format](https://github.com/laurent22/joplin/blob/dev/readme/spec/server_file_url_format.md)
|
||||
@@ -537,11 +536,11 @@ Current translations:
|
||||
<img src="https://joplinapp.org/images/flags/country-4x3/hr.png" width="16px"/> | Croatian (Hrvatska) | [hr_HR](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/hr_HR.po) | [Milo Ivir](mailto:mail@milotype.de) | 97%
|
||||
<img src="https://joplinapp.org/images/flags/country-4x3/cz.png" width="16px"/> | Czech (Česká republika) | [cs_CZ](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/cs_CZ.po) | [Michal Stanke](mailto:michal@stanke.cz) | 89%
|
||||
<img src="https://joplinapp.org/images/flags/country-4x3/dk.png" width="16px"/> | Dansk (Danmark) | [da_DK](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/da_DK.po) | ERYpTION | 97%
|
||||
<img src="https://joplinapp.org/images/flags/country-4x3/de.png" width="16px"/> | Deutsch (Deutschland) | [de_DE](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/de_DE.po) | [MrKanister](mailto:s.robin@tutanota.de) | 99%
|
||||
<img src="https://joplinapp.org/images/flags/country-4x3/de.png" width="16px"/> | Deutsch (Deutschland) | [de_DE](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/de_DE.po) | [MrKanister](mailto:s.robin@tutanota.de) | 97%
|
||||
<img src="https://joplinapp.org/images/flags/country-4x3/ee.png" width="16px"/> | Eesti Keel (Eesti) | [et_EE](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/et_EE.po) | | 51%
|
||||
<img src="https://joplinapp.org/images/flags/country-4x3/gb.png" width="16px"/> | English (United Kingdom) | [en_GB](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/en_GB.po) | | 100%
|
||||
<img src="https://joplinapp.org/images/flags/country-4x3/us.png" width="16px"/> | English (United States of America) | [en_US](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/en_US.po) | | 100%
|
||||
<img src="https://joplinapp.org/images/flags/country-4x3/es.png" width="16px"/> | Español (España) | [es_ES](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/es_ES.po) | [Francisco Mora](mailto:francisco.m.collao@gmail.com) | 99%
|
||||
<img src="https://joplinapp.org/images/flags/country-4x3/es.png" width="16px"/> | Español (España) | [es_ES](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/es_ES.po) | [Francisco Mora](mailto:francisco.m.collao@gmail.com) | 93%
|
||||
<img src="https://joplinapp.org/images/flags/esperanto.png" width="16px"/> | Esperanto | [eo](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/eo.po) | Marton Paulo | 30%
|
||||
<img src="https://joplinapp.org/images/flags/country-4x3/fi.png" width="16px"/> | Finnish (Suomi) | [fi_FI](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/fi_FI.po) | mrkaato | 93%
|
||||
<img src="https://joplinapp.org/images/flags/country-4x3/fr.png" width="16px"/> | Français (France) | [fr_FR](https://github.com/laurent22/joplin/blob/dev/packages/tools/locales/fr_FR.po) | Laurent Cozic | 100%
|
||||
|
@@ -1,5 +1,5 @@
|
||||
# For development this compose file starts the database only. The app can then
|
||||
# be started using `yarn run start-dev`, which is useful for development, because
|
||||
# be started using `npm run start-dev`, which is useful for development, because
|
||||
# it means the app Docker file doesn't have to be rebuilt on each change.
|
||||
|
||||
version: '3'
|
||||
|
@@ -1 +1 @@
|
||||
testing.joplinapp.org
|
||||
joplinapp.org
|
@@ -6,7 +6,6 @@
|
||||
],
|
||||
"settings": {
|
||||
"files.exclude": {
|
||||
".yarn": true,
|
||||
"lerna-debug.log": true,
|
||||
"_mydocs/mdtest/": true,
|
||||
"./packages/lib/plugin_types": true,
|
||||
|
@@ -11,7 +11,7 @@ module.exports = {
|
||||
//
|
||||
// '**/*.ts?(x)': () => 'npm run tsc',
|
||||
'*.{js,jsx,ts,tsx}': [
|
||||
'yarn run linter-precommit',
|
||||
'npm run linter-precommit',
|
||||
'git add',
|
||||
],
|
||||
};
|
||||
|
33138
package-lock.json
generated
Normal file
33138
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
49
package.json
49
package.json
@@ -1,54 +1,52 @@
|
||||
{
|
||||
"name": "root",
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/laurent22/joplin.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn workspaces foreach --verbose --interlaced --parallel run build && yarn run tsc",
|
||||
"buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md",
|
||||
"audit": "lerna-audit",
|
||||
"bootstrap": "lerna bootstrap --force-local --no-ci",
|
||||
"bootstrapServerOnly": "lerna bootstrap --force-local --no-ci --include-dependents --include-dependencies --scope @joplin/server",
|
||||
"build": "lerna run build && npm run tsc",
|
||||
"buildApiDoc": "npm start --prefix=packages/app-cli -- apidoc ../../readme/api/references/rest_api.md",
|
||||
"buildCommandIndex": "gulp buildCommandIndex",
|
||||
"buildPluginDoc": "typedoc --name 'Joplin Plugin API Documentation' --mode file -theme './Assets/PluginDocTheme/' --readme './Assets/PluginDocTheme/index.md' --excludeNotExported --excludeExternals --excludePrivate --excludeProtected --out ../joplin-website/docs/api/references/plugin_api packages/lib/services/plugins/api/",
|
||||
"updateMarkdownDoc": "node ./packages/tools/updateMarkdownDoc",
|
||||
"buildSettingJsonSchema": "yarn workspace joplin start settingschema ../../../joplin-website/docs/schema/settings.json",
|
||||
"buildTranslations": "node packages/tools/build-translation.js",
|
||||
"buildWebsite": "node ./packages/tools/website/build.js && yarn run buildPluginDoc && yarn run buildSettingJsonSchema",
|
||||
"buildPluginDoc": "typedoc --name 'Joplin Plugin API Documentation' --mode file -theme './Assets/PluginDocTheme/' --readme './Assets/PluginDocTheme/index.md' --excludeNotExported --excludeExternals --excludePrivate --excludeProtected --out ../joplin-website/docs/api/references/plugin_api packages/lib/services/plugins/api/",
|
||||
"buildSettingJsonSchema": "npm start --prefix=packages/app-cli -- settingschema ../../../joplin-website/docs/schema/settings.json",
|
||||
"buildTranslations": "npm run tsc && node packages/tools/build-translation.js",
|
||||
"buildTranslationsNoTsc": "node packages/tools/build-translation.js",
|
||||
"buildWebsite": "node ./packages/tools/website/build.js && npm run buildPluginDoc && npm run buildSettingJsonSchema",
|
||||
"circularDependencyCheck": "madge --warning --circular --extensions js ./",
|
||||
"clean": "npm run clean --workspaces --if-present && node packages/tools/clean && yarn cache clean",
|
||||
"clean": "lerna clean -y && lerna run clean",
|
||||
"dependencyTree": "madge",
|
||||
"generateDatabaseTypes": "node packages/tools/generate-database-types",
|
||||
"linkChecker": "linkchecker https://joplinapp.org",
|
||||
"linter-ci": "eslint --resolve-plugins-relative-to . --quiet --ext .js --ext .jsx --ext .ts --ext .tsx",
|
||||
"linter-precommit": "eslint --resolve-plugins-relative-to . --fix --ext .js --ext .jsx --ext .ts --ext .tsx",
|
||||
"linter": "eslint --resolve-plugins-relative-to . --fix --quiet --ext .js --ext .jsx --ext .ts --ext .tsx",
|
||||
"postinstall": "yarn run build",
|
||||
"publishAll": "git pull && yarn run build && lerna version --yes --no-private --no-git-tag-version && gulp completePublishAll",
|
||||
"releaseAndroid": "yarn run build && export PATH=\"/usr/local/opt/openjdk@11/bin:$PATH\" && node packages/tools/release-android.js",
|
||||
"postinstall": "npm run bootstrap --no-ci && npm run build",
|
||||
"publishAll": "git pull && npm run build && lerna version --yes --no-private --no-git-tag-version && gulp completePublishAll",
|
||||
"releaseAndroid": "npm run build && export PATH=\"/usr/local/opt/openjdk@11/bin:$PATH\" && node packages/tools/release-android.js",
|
||||
"releaseAndroidClean": "node packages/tools/release-android.js",
|
||||
"releaseCli": "node packages/tools/release-cli.js",
|
||||
"releaseClipper": "node packages/tools/release-clipper.js",
|
||||
"releaseDesktop": "node packages/tools/release-electron.js",
|
||||
"releaseIOS": "node packages/tools/release-ios.js",
|
||||
"releasePluginGenerator": "node packages/tools/release-plugin-generator.js",
|
||||
"releasePluginRepoCli": "node packages/tools/release-plugin-repo-cli.js",
|
||||
"releaseServer": "node packages/tools/release-server.js",
|
||||
"tagServerLatest": "node packages/tools/tagServerLatest.js",
|
||||
"buildServerDocker": "node packages/tools/buildServerDocker.js",
|
||||
"setupNewRelease": "node ./packages/tools/setupNewRelease",
|
||||
"test-ci": "yarn workspaces foreach --parallel --verbose --interlaced --jobs 2 run test-ci",
|
||||
"test": "yarn workspaces foreach --parallel --verbose --interlaced --jobs 2 run test",
|
||||
"tsc": "yarn workspaces foreach --parallel --verbose --interlaced run tsc",
|
||||
"test-ci": "lerna run test-ci --stream",
|
||||
"test": "lerna run test --stream",
|
||||
"tsc": "lerna run tsc --stream --parallel",
|
||||
"updateIgnored": "gulp updateIgnoredTypeScriptBuild",
|
||||
"updatePluginTypes": "./packages/generator-joplin/updateTypes.sh",
|
||||
"watch": "yarn workspaces foreach --parallel --verbose --interlaced --jobs 999 run watch",
|
||||
"watchWebsite": "nodemon --verbose --watch Assets/WebsiteAssets --watch packages/tools/website/build.js --ext md,ts,js,mustache,css,tsx,gif,png,svg --exec \"node packages/tools/website/build.js && http-server --port 8077 ../joplin-website/docs -a localhost\""
|
||||
"watch": "lerna run watch --stream --parallel",
|
||||
"watchWebsite": "nodemon --verbose --watch Assets/WebsiteAssets --watch packages/tools/website/build.js --ext md,ts,js,mustache,css,tsx,gif,png,svg --exec \"node packages/tools/website/build.js && http-server --port 8077 ../joplin-website/docs -a localhost\"",
|
||||
"i": "node packages/tools/lernaInstall"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
@@ -67,15 +65,14 @@
|
||||
"gulp": "^4.0.2",
|
||||
"husky": "^3.0.2",
|
||||
"lerna": "^3.22.1",
|
||||
"lerna-audit": "^1.3.2",
|
||||
"lint-staged": "^9.2.1",
|
||||
"madge": "^4.0.2",
|
||||
"typedoc": "^0.17.8",
|
||||
"typescript": "4.0.5"
|
||||
"typescript": "^4.0.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"http-server": "^0.12.3",
|
||||
"node-gyp": "^8.4.1",
|
||||
"nodemon": "^2.0.9"
|
||||
},
|
||||
"packageManager": "yarn@3.1.1"
|
||||
}
|
||||
}
|
||||
|
@@ -418,8 +418,6 @@ class Application extends BaseApplication {
|
||||
return this.stdout(object);
|
||||
});
|
||||
|
||||
this.initRedux();
|
||||
|
||||
// If we have some arguments left at this point, it's a command
|
||||
// so execute it.
|
||||
if (argv.length) {
|
||||
@@ -450,6 +448,8 @@ class Application extends BaseApplication {
|
||||
process.exit(0);
|
||||
} else {
|
||||
// Otherwise open the GUI
|
||||
this.initRedux();
|
||||
|
||||
const keymap = await this.loadKeymaps();
|
||||
|
||||
const AppGui = require('./app-gui.js');
|
||||
|
@@ -1,11 +1,11 @@
|
||||
import * as vm from 'vm';
|
||||
import Plugin from '@joplin/lib/services/plugins/Plugin';
|
||||
import sandboxProxy from '@joplin/lib/services/plugins/sandboxProxy';
|
||||
import BasePluginRunner from '@joplin/lib/services/plugins/BasePluginRunner';
|
||||
import executeSandboxCall from '@joplin/lib/services/plugins/utils/executeSandboxCall';
|
||||
import Global from '@joplin/lib/services/plugins/api/Global';
|
||||
import mapEventHandlersToIds, { EventHandlers } from '@joplin/lib/services/plugins/utils/mapEventHandlersToIds';
|
||||
import uuid from '@joplin/lib/uuid';
|
||||
const sandboxProxy = require('@joplin/lib/services/plugins/sandboxProxy');
|
||||
|
||||
function createConsoleWrapper(pluginId: string) {
|
||||
const wrapper: any = {};
|
||||
|
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
yarn run build && NODE_PATH=build node build/build-doc.js
|
||||
npm run build && NODE_PATH=build node build/build-doc.js
|
@@ -1,3 +1,3 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
yarn run build && NODE_PATH="build/" node build/cli-integration-tests.js
|
||||
npm run build && NODE_PATH="build/" node build/cli-integration-tests.js
|
@@ -2,7 +2,7 @@
|
||||
|
||||
# Start the server with:
|
||||
#
|
||||
# JOPLIN_IS_TESTING=1 yarn run start-dev
|
||||
# JOPLIN_IS_TESTING=1 npm run start-dev
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
|
||||
|
||||
@@ -48,5 +48,5 @@ while [ "$NUM" -lt 400 ]; do
|
||||
echo "config sync.10.password hunter1hunter2hunter3" >> "$CMD_FILE"
|
||||
echo "sync" >> "$CMD_FILE"
|
||||
|
||||
yarn start --profile "$PROFILE_DIR" batch "$CMD_FILE"
|
||||
npm start -- --profile "$PROFILE_DIR" batch "$CMD_FILE"
|
||||
done
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
set -e
|
||||
yarn run build && NODE_PATH="build/" node build/fuzzing.js
|
||||
npm run build && NODE_PATH="build/" node build/fuzzing.js
|
@@ -14,7 +14,7 @@ tasks.prepareBuild = {
|
||||
await utils.copyFile(`${__dirname}/package.json`, `${buildDir}/package.json`);
|
||||
await utils.setPackagePrivateField(`${buildDir}/package.json`, false);
|
||||
|
||||
// await utils.copyFile(`${__dirname}/package-lock.json`, `${buildDir}/package-lock.json`);
|
||||
await utils.copyFile(`${__dirname}/package-lock.json`, `${buildDir}/package-lock.json`);
|
||||
await utils.copyFile(`${__dirname}/gulpfile.js`, `${buildDir}/gulpfile.js`);
|
||||
|
||||
fs.chmodSync(`${buildDir}/main.js`, 0o755);
|
||||
|
18867
packages/app-cli/package-lock.json
generated
Normal file
18867
packages/app-cli/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -11,8 +11,8 @@
|
||||
"build": "gulp build",
|
||||
"start": "gulp build -L && node \"build/main.js\" --stack-trace-enabled --log-level debug --env dev",
|
||||
"start-no-build": "node \"build/main.js\" --stack-trace-enabled --log-level debug --env dev",
|
||||
"tsc": "tsc --project tsconfig.json",
|
||||
"watch": "tsc --watch --preserveWatchOutput --project tsconfig.json"
|
||||
"tsc": "node node_modules/typescript/bin/tsc --project tsconfig.json",
|
||||
"watch": "node node_modules/typescript/bin/tsc --watch --project tsconfig.json"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/laurent22/joplin/issues"
|
||||
@@ -34,7 +34,9 @@
|
||||
"owner": "Laurent Cozic"
|
||||
},
|
||||
"version": "2.6.2",
|
||||
"bin": "./main.js",
|
||||
"bin": {
|
||||
"joplin": "./main.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
@@ -59,9 +61,9 @@
|
||||
"sqlite3": "^5.0.2",
|
||||
"string-padding": "^1.0.2",
|
||||
"strip-ansi": "^4.0.0",
|
||||
"tcp-port-used": "^1.0.2",
|
||||
"tcp-port-used": "^0.1.2",
|
||||
"terminal-kit": "^1.30.0",
|
||||
"tkwidgets": "0.5.27",
|
||||
"tkwidgets": "^0.5.26",
|
||||
"url-parse": "^1.4.7",
|
||||
"word-wrap": "^1.2.3",
|
||||
"yargs-parser": "^7.0.0"
|
||||
|
@@ -1,4 +1,4 @@
|
||||
const sandboxProxy = require('@joplin/lib/services/plugins/sandboxProxy');
|
||||
import sandboxProxy, { Target } from '@joplin/lib/services/plugins/sandboxProxy';
|
||||
import { setupDatabaseAndSynchronizer, switchClient } from '@joplin/lib/testing/test-utils';
|
||||
|
||||
describe('services_plugins_sandboxProxy', function() {
|
||||
@@ -17,7 +17,7 @@ describe('services_plugins_sandboxProxy', function() {
|
||||
|
||||
const results: Result[] = [];
|
||||
|
||||
const target: any = (path: string, args: any[]) => {
|
||||
const target: Target = (path: string, args: any[]) => {
|
||||
results.push({ path, args });
|
||||
};
|
||||
|
||||
@@ -40,7 +40,7 @@ describe('services_plugins_sandboxProxy', function() {
|
||||
|
||||
const results: Result[] = [];
|
||||
|
||||
const target: any = (path: string, args: any[]) => {
|
||||
const target: Target = (path: string, args: any[]) => {
|
||||
results.push({ path, args });
|
||||
};
|
||||
|
||||
|
@@ -4,4 +4,4 @@
|
||||
# - Run the below command
|
||||
# - Then the file /manifests.json also needs to be updated with the new manifest file
|
||||
|
||||
yarn run dist && cp publish/org.joplinapp.plugins.RegisterCommandDemo.jpl ~/src/joplin-plugins-test/plugins/org.joplinapp.plugins.RegisterCommandDemo/plugin.jpl && cp publish/org.joplinapp.plugins.RegisterCommandDemo.json ~/src/joplin-plugins-test/plugins/org.joplinapp.plugins.RegisterCommandDemo/plugin.json
|
||||
npm run dist && cp publish/org.joplinapp.plugins.RegisterCommandDemo.jpl ~/src/joplin-plugins-test/plugins/org.joplinapp.plugins.RegisterCommandDemo/plugin.jpl && cp publish/org.joplinapp.plugins.RegisterCommandDemo.json ~/src/joplin-plugins-test/plugins/org.joplinapp.plugins.RegisterCommandDemo/plugin.json
|
@@ -1,7 +1,7 @@
|
||||
import joplin from 'api';
|
||||
import { ToolbarButtonLocation } from 'api/types';
|
||||
|
||||
const uslug = require('@joplin/fork-uslug');
|
||||
const uslug = require('uslug');
|
||||
|
||||
// From https://stackoverflow.com/a/6234804/561309
|
||||
function escapeHtml(unsafe:string) {
|
||||
|
@@ -52,7 +52,7 @@ do
|
||||
done
|
||||
|
||||
cd "$ROOT_DIR/packages/app-cli"
|
||||
yarn start --profile "$PROFILE_DIR" batch "$CMD_FILE"
|
||||
yarn start --profile "$PROFILE_DIR" import ~/Desktop/Joplin_17_06_2021.jex
|
||||
# yarn start --profile "$PROFILE_DIR" import ~/Desktop/Tout_18_06_2021.jex
|
||||
yarn start --profile "$PROFILE_DIR" sync --use-lock 1
|
||||
npm start -- --profile "$PROFILE_DIR" batch "$CMD_FILE"
|
||||
npm start -- --profile "$PROFILE_DIR" import ~/Desktop/Joplin_17_06_2021.jex
|
||||
# npm start -- --profile "$PROFILE_DIR" import ~/Desktop/Tout_18_06_2021.jex
|
||||
npm start -- --profile "$PROFILE_DIR" sync --use-lock 1
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// - Run the Postgres database -- `sudo docker-compose --file docker-compose.db-dev.yml up`
|
||||
// - Update the DB parameters in ~/joplin-credentials/server.env to use the dev
|
||||
// database
|
||||
// - Run the server - `JOPLIN_IS_TESTING=1 yarn run start-dev`
|
||||
// - Run the server - `JOPLIN_IS_TESTING=1 npm run start-dev`
|
||||
// - Then run this script - `node populateDatabase.js`
|
||||
//
|
||||
// Currently it doesn't actually create the users, so that should be done using:
|
||||
@@ -64,7 +64,7 @@ const processUser = async (userNum: number) => {
|
||||
|
||||
await chdir(cliDir);
|
||||
|
||||
await execCommand2(['yarn', 'run', 'start-no-build', '--', '--profile', profileDir, 'batch', commandFile]);
|
||||
await execCommand2(['npm', 'run', 'start-no-build', '--', '--profile', profileDir, 'batch', commandFile]);
|
||||
} catch (error) {
|
||||
console.error(`Could not process user ${userNum}:`, error);
|
||||
} finally {
|
||||
@@ -88,7 +88,7 @@ const main = async () => {
|
||||
|
||||
// Build the app once before starting, because we'll use start-no-build to
|
||||
// run the scripts (faster)
|
||||
await execCommand2(['yarn', 'run', 'build']);
|
||||
await execCommand2(['npm', 'run', 'build']);
|
||||
|
||||
const focusUserNum = 0;
|
||||
|
||||
|
5
packages/app-clipper/package-lock.json
generated
Normal file
5
packages/app-clipper/package-lock.json
generated
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "joplin-webclipper",
|
||||
"version": "1.0.8",
|
||||
"lockfileVersion": 1
|
||||
}
|
1
packages/app-desktop/.gitignore
vendored
1
packages/app-desktop/.gitignore
vendored
@@ -11,4 +11,3 @@ gui/NoteEditor/NoteBody/TinyMCE/supportedLocales.js
|
||||
runForSharingCommands-*
|
||||
runForTestingCommands-*
|
||||
style.min.css
|
||||
build/lib/
|
@@ -1 +0,0 @@
|
||||
nodeLinker: node-modules
|
@@ -97,7 +97,7 @@ class ConfigScreenComponent extends React.Component<any, any> {
|
||||
}
|
||||
|
||||
screenFromName(screenName: string) {
|
||||
if (screenName === 'encryption') return <EncryptionConfigScreen/>;
|
||||
if (screenName === 'encryption') return <EncryptionConfigScreen themeId={this.props.themeId}/>;
|
||||
if (screenName === 'server') return <ClipperConfigScreen themeId={this.props.themeId}/>;
|
||||
if (screenName === 'keymap') return <KeymapConfigScreen themeId={this.props.themeId}/>;
|
||||
|
||||
|
@@ -55,7 +55,7 @@ export interface PluginItem {
|
||||
hasBeenUpdated: boolean;
|
||||
}
|
||||
|
||||
const CellRoot = styled.div<{isCompatible: boolean}>`
|
||||
const CellRoot = styled.div`
|
||||
display: flex;
|
||||
box-sizing: border-box;
|
||||
background-color: ${props => props.theme.backgroundColor};
|
||||
@@ -104,7 +104,7 @@ const DevModeLabel = styled.div`
|
||||
color: ${props => props.theme.color};
|
||||
`;
|
||||
|
||||
const StyledNameAndVersion = styled.div<{mb: any}>`
|
||||
const StyledNameAndVersion = styled.div`
|
||||
font-family: ${props => props.theme.fontFamily};
|
||||
color: ${props => props.theme.color};
|
||||
font-size: ${props => props.theme.fontSize}px;
|
||||
|
@@ -27,7 +27,7 @@ const Root = styled.div`
|
||||
flex-direction: column;
|
||||
`;
|
||||
|
||||
const UserPluginsRoot = styled.div<any>`
|
||||
const UserPluginsRoot = styled.div`
|
||||
${space}
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
@@ -37,7 +37,7 @@ const ToolsButton = styled(Button)`
|
||||
margin-right: 6px;
|
||||
`;
|
||||
|
||||
const RepoApiErrorMessage = styled(StyledMessage)<any>`
|
||||
const RepoApiErrorMessage = styled(StyledMessage)`
|
||||
max-width: ${props => props.maxWidth}px;
|
||||
margin-bottom: 10px;
|
||||
`;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import styled from 'styled-components';
|
||||
|
||||
const Root = styled.div<any>`
|
||||
const Root = styled.div`
|
||||
display: flex;
|
||||
justify-content: ${props => props.justifyContent ? props.justifyContent : 'center'};
|
||||
font-family: ${props => props.theme.fontFamily};
|
||||
|
@@ -29,7 +29,7 @@ export const IconSelector = (props: Props) => {
|
||||
|
||||
await loadScript({
|
||||
id: 'emoji-button-lib',
|
||||
src: 'build/lib/@joeattardi/emoji-button/dist/index.js',
|
||||
src: 'node_modules/@joeattardi/emoji-button/dist/index.js',
|
||||
attrs: {
|
||||
type: 'module',
|
||||
},
|
||||
|
@@ -1,2 +1,2 @@
|
||||
import { EmojiButton } from '../../build/lib/@joeattardi/emoji-button/dist/index.js';
|
||||
import { EmojiButton } from '../../node_modules/@joeattardi/emoji-button/dist/index.js';
|
||||
window.EmojiButton = EmojiButton;
|
||||
|
@@ -832,9 +832,7 @@ class MainScreenComponent extends React.Component<Props, State> {
|
||||
{this.renderPluginDialogs()}
|
||||
{noteContentPropertiesDialogOptions.visible && <NoteContentPropertiesDialog markupLanguage={noteContentPropertiesDialogOptions.markupLanguage} themeId={this.props.themeId} onClose={this.noteContentPropertiesDialog_close} text={noteContentPropertiesDialogOptions.text}/>}
|
||||
{notePropertiesDialogOptions.visible && <NotePropertiesDialog themeId={this.props.themeId} noteId={notePropertiesDialogOptions.noteId} onClose={this.notePropertiesDialog_close} onRevisionLinkClick={notePropertiesDialogOptions.onRevisionLinkClick} />}
|
||||
{/* @ts-ignore */}
|
||||
{shareNoteDialogOptions.visible && <ShareNoteDialog themeId={this.props.themeId} noteIds={shareNoteDialogOptions.noteIds} onClose={this.shareNoteDialog_close} />}
|
||||
{/* @ts-ignore */}
|
||||
{shareFolderDialogOptions.visible && <ShareFolderDialog themeId={this.props.themeId} folderId={shareFolderDialogOptions.folderId} onClose={this.shareFolderDialog_close} />}
|
||||
|
||||
<PromptDialog autocomplete={promptOptions && 'autocomplete' in promptOptions ? promptOptions.autocomplete : null} defaultValue={promptOptions && promptOptions.value ? promptOptions.value : ''} themeId={this.props.themeId} style={styles.prompt} onClose={this.promptOnClose_} label={promptOptions ? promptOptions.label : ''} description={promptOptions ? promptOptions.description : null} visible={!!this.state.promptOptions} buttons={promptOptions && 'buttons' in promptOptions ? promptOptions.buttons : null} inputType={promptOptions && 'inputType' in promptOptions ? promptOptions.inputType : null} />
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService';
|
||||
import { _ } from '@joplin/lib/locale';
|
||||
import ShareService from '@joplin/lib/services/share/ShareService';
|
||||
import Setting from '@joplin/lib/models/Setting';
|
||||
import Logger from '@joplin/lib/Logger';
|
||||
|
||||
const logger = Logger.create('leaveSharedFolder');
|
||||
@@ -25,7 +26,10 @@ export const runtime = (): CommandRuntime => {
|
||||
const share = shares.find(s => s.folder_id === folderId);
|
||||
if (!share) throw new Error(_('Could not verify the share status of this notebook - aborting. Please try again when you are connected to the internet.'));
|
||||
|
||||
await ShareService.instance().leaveSharedFolder(folderId, share.user.id);
|
||||
const userId = Setting.value('sync.userId');
|
||||
if (share.user.id === userId) throw new Error('Cannot leave own notebook');
|
||||
|
||||
await ShareService.instance().leaveSharedFolder(folderId);
|
||||
} catch (error) {
|
||||
logger.error(error);
|
||||
alert(_('Error: %s', error.message));
|
||||
|
@@ -336,7 +336,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
||||
async function loadScripts() {
|
||||
const scriptsToLoad: {src: string; id: string; loaded: boolean}[] = [
|
||||
{
|
||||
src: 'build/lib/codemirror/addon/dialog/dialog.css',
|
||||
src: 'node_modules/codemirror/addon/dialog/dialog.css',
|
||||
id: 'codemirrorDialogStyle',
|
||||
loaded: false,
|
||||
},
|
||||
@@ -351,7 +351,7 @@ function CodeMirror(props: NoteBodyEditorProps, ref: any) {
|
||||
if (theme.indexOf('solarized') >= 0) theme = 'solarized';
|
||||
|
||||
scriptsToLoad.push({
|
||||
src: `build/lib/codemirror/theme/${theme}.css`,
|
||||
src: `node_modules/codemirror/theme/${theme}.css`,
|
||||
id: `codemirrorTheme${theme}`,
|
||||
loaded: false,
|
||||
});
|
||||
|
@@ -320,7 +320,7 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
|
||||
async function loadScripts() {
|
||||
const scriptsToLoad: any[] = [
|
||||
{
|
||||
src: 'build/lib/tinymce/tinymce.min.js',
|
||||
src: 'node_modules/tinymce/tinymce.min.js',
|
||||
id: 'tinyMceScript',
|
||||
loaded: false,
|
||||
},
|
||||
@@ -571,7 +571,7 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
|
||||
statusbar: false,
|
||||
target_list: false,
|
||||
table_resize_bars: false,
|
||||
language_url: ['en_US', 'en_GB'].includes(language) ? undefined : `build/lib/tinymce/langs/${language}`,
|
||||
language: ['en_US', 'en_GB'].includes(language) ? undefined : language,
|
||||
toolbar: toolbar.join(' '),
|
||||
localization_function: _,
|
||||
contextmenu: false,
|
||||
@@ -708,7 +708,7 @@ const TinyMCE = (props: NoteBodyEditorProps, ref: any) => {
|
||||
}
|
||||
|
||||
const cssFiles = [
|
||||
'build/lib/@fortawesome/fontawesome-free/css/all.min.css',
|
||||
'node_modules/@fortawesome/fontawesome-free/css/all.min.css',
|
||||
`gui/note-viewer/pluginAssets/highlight.js/${theme.codeThemeCss}`,
|
||||
].concat(
|
||||
pluginAssets
|
||||
|
@@ -4,7 +4,7 @@ import styled from 'styled-components';
|
||||
// Need to use `attrs` otherwise styled-components creates many instances of the
|
||||
// style when the component is resized.
|
||||
// https://github.com/styled-components/styled-components/issues/1212
|
||||
export const StyledWrapperRoot: any = styled.div.attrs((props: any) => ({
|
||||
export const StyledWrapperRoot = styled.div.attrs((props: any) => ({
|
||||
style: {
|
||||
width: props.size.width,
|
||||
height: props.size.height,
|
||||
|
@@ -82,11 +82,11 @@ const GlobalStyle = createGlobalStyle`
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/*
|
||||
div, span, a {
|
||||
/*color: ${(props: any) => props.theme.color};*/
|
||||
/*font-size: ${(props: any) => props.theme.fontSize}px;*/
|
||||
font-family: ${(props: any) => props.theme.fontFamily};
|
||||
}
|
||||
*/
|
||||
`;
|
||||
|
||||
let wcsTimeoutId_: any = null;
|
||||
|
@@ -7,7 +7,6 @@ import BaseModel from '@joplin/lib/BaseModel';
|
||||
import uuid from '@joplin/lib/uuid';
|
||||
const { connect } = require('react-redux');
|
||||
import Note from '@joplin/lib/models/Note';
|
||||
import { AppState } from '../../app.reducer';
|
||||
const debounce = require('debounce');
|
||||
const styled = require('styled-components').default;
|
||||
|
||||
@@ -22,7 +21,6 @@ interface Props {
|
||||
notesParentType: string;
|
||||
dispatch?: Function;
|
||||
selectedNoteId: string;
|
||||
isFocused?: boolean;
|
||||
}
|
||||
|
||||
function SearchBar(props: Props) {
|
||||
@@ -118,19 +116,8 @@ function SearchBar(props: Props) {
|
||||
}, [onExitSearch]);
|
||||
|
||||
const onSearchButtonClick = useCallback(() => {
|
||||
console.info('isFocused', props.isFocused);
|
||||
|
||||
if (props.isFocused) {
|
||||
void onExitSearch();
|
||||
} else {
|
||||
setSearchStarted(true);
|
||||
props.inputRef.current.focus();
|
||||
props.dispatch({
|
||||
type: 'FOCUS_SET',
|
||||
field: 'globalSearch',
|
||||
});
|
||||
}
|
||||
}, [onExitSearch, props.isFocused]);
|
||||
void onExitSearch();
|
||||
}, [onExitSearch]);
|
||||
|
||||
useEffect(() => {
|
||||
if (props.notesParentType !== 'Search') {
|
||||
@@ -154,11 +141,10 @@ function SearchBar(props: Props) {
|
||||
);
|
||||
}
|
||||
|
||||
const mapStateToProps = (state: AppState) => {
|
||||
const mapStateToProps = (state: any) => {
|
||||
return {
|
||||
notesParentType: state.notesParentType,
|
||||
selectedNoteId: stateUtils.selectedNoteId(state),
|
||||
isFocused: state.focusedField === 'globalSearch',
|
||||
};
|
||||
};
|
||||
|
||||
|
@@ -46,7 +46,7 @@ const StyledAddRecipient = styled.div`
|
||||
margin-bottom: 1em;
|
||||
`;
|
||||
|
||||
const StyledRecipient = styled(StyledMessage)<any>`
|
||||
const StyledRecipient = styled(StyledMessage)`
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
padding: .6em 1em;
|
||||
@@ -80,7 +80,7 @@ const StyledError = styled(StyledMessage)`
|
||||
margin-bottom: 1em;
|
||||
`;
|
||||
|
||||
const StyledShareState = styled(StyledMessage)<any>`
|
||||
const StyledShareState = styled(StyledMessage)`
|
||||
word-break: break-all;
|
||||
margin-bottom: 1em;
|
||||
`;
|
||||
|
@@ -24,7 +24,7 @@ const StyledRoot = styled.div`
|
||||
max-width: 1200px;
|
||||
`;
|
||||
|
||||
const SyncTargetDescription = styled.div<{height: number}>`
|
||||
const SyncTargetDescription = styled.div`
|
||||
${props => props.height ? `height: ${props.height}px` : ''};
|
||||
margin-bottom: 1.3em;
|
||||
line-height: ${props => props.theme.lineHeight};
|
||||
@@ -69,7 +69,7 @@ const SyncTargetLogo = styled.img`
|
||||
margin-right: 0.4em;
|
||||
`;
|
||||
|
||||
const SyncTargetBox = styled.div<{faded: boolean}>`
|
||||
const SyncTargetBox = styled.div`
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
@@ -96,7 +96,7 @@ const FeatureIcon = styled.i`
|
||||
position: absolute;
|
||||
`;
|
||||
|
||||
const FeatureLine = styled.div<{enabled: boolean}>`
|
||||
const FeatureLine = styled.div`
|
||||
margin-bottom: .5em;
|
||||
opacity: ${props => props.enabled ? 1 : 0.5};
|
||||
position: relative;
|
||||
|
@@ -430,7 +430,7 @@
|
||||
setMarkers(markLoader_.whenDone.keywords, markLoader_.whenDone.options);
|
||||
};
|
||||
|
||||
script.src = '../../build/lib/mark.js/dist/mark.min.js';
|
||||
script.src = '../../node_modules/mark.js/dist/mark.min.js';
|
||||
document.getElementById('joplin-container-markScriptContainer').appendChild(script);
|
||||
} else if (markLoader_.state === 'ready') {
|
||||
setMarkers(keywords, options);
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import styled from 'styled-components';
|
||||
|
||||
const StyledMessage = styled.div<{type: string}>`
|
||||
const StyledMessage = styled.div`
|
||||
border-radius: 3px;
|
||||
background-color: ${props => props.type === 'error' ? props.theme.warningBackgroundColor : 'transparent'};
|
||||
font-size: ${props => props.theme.fontSize}px;
|
||||
|
@@ -15,8 +15,8 @@ const tasks = {
|
||||
copyPluginAssets: {
|
||||
fn: require('./tools/copyPluginAssets.js'),
|
||||
},
|
||||
copyApplicationAssets: {
|
||||
fn: require('./tools/copyApplicationAssets.js'),
|
||||
copyTinyMceLangs: {
|
||||
fn: require('./tools/copyTinyMceLangs.js'),
|
||||
},
|
||||
electronRebuild: {
|
||||
fn: require('./tools/electronRebuild.js'),
|
||||
@@ -40,7 +40,7 @@ const buildParallel = [
|
||||
'compileScripts',
|
||||
'compilePackageInfo',
|
||||
'copyPluginAssets',
|
||||
'copyApplicationAssets',
|
||||
'copyTinyMceLangs',
|
||||
'updateIgnoredTypeScriptBuild',
|
||||
'buildCommandIndex',
|
||||
'compileSass',
|
||||
|
@@ -10,11 +10,11 @@
|
||||
<title>Joplin</title>
|
||||
<link rel="stylesheet" href="style.min.css">
|
||||
<link rel="stylesheet" href="style/icons/style.css">
|
||||
<link rel="stylesheet" href="build/lib/@fortawesome/fontawesome-free/css/all.min.css">
|
||||
<link rel="stylesheet" href="build/lib/react-datetime/css/react-datetime.css">
|
||||
<link rel="stylesheet" href="build/lib/smalltalk/css/smalltalk.css">
|
||||
<link rel="stylesheet" href="build/lib/roboto-fontface/css/roboto/roboto-fontface.css">
|
||||
<link rel="stylesheet" href="build/lib/codemirror/lib/codemirror.css">
|
||||
<link rel="stylesheet" href="node_modules/@fortawesome/fontawesome-free/css/all.min.css">
|
||||
<link rel="stylesheet" href="node_modules/react-datetime/css/react-datetime.css">
|
||||
<link rel="stylesheet" href="node_modules/smalltalk/css/smalltalk.css">
|
||||
<link rel="stylesheet" href="node_modules/roboto-fontface/css/roboto/roboto-fontface.css">
|
||||
<link rel="stylesheet" href="node_modules/codemirror/lib/codemirror.css">
|
||||
|
||||
<style>
|
||||
.smalltalk {
|
||||
|
@@ -23,6 +23,11 @@ module.exports = {
|
||||
// The directory where Jest should output its coverage files
|
||||
// coverageDirectory: undefined,
|
||||
|
||||
// An array of regexp pattern strings used to skip coverage collection
|
||||
// coveragePathIgnorePatterns: [
|
||||
// "/node_modules/"
|
||||
// ],
|
||||
|
||||
// Indicates which provider should be used to instrument code for coverage
|
||||
coverageProvider: 'v8',
|
||||
|
||||
@@ -58,6 +63,11 @@ module.exports = {
|
||||
// The maximum amount of workers used to run your tests. Can be specified as % or a number. E.g. maxWorkers: 10% will use 10% of your CPU amount + 1 as the maximum worker number. maxWorkers: 2 will use a maximum of 2 workers.
|
||||
// maxWorkers: "50%",
|
||||
|
||||
// An array of directory names to be searched recursively up from the requiring module's location
|
||||
// moduleDirectories: [
|
||||
// "node_modules"
|
||||
// ],
|
||||
|
||||
// An array of file extensions your modules use
|
||||
// moduleFileExtensions: [
|
||||
// "js",
|
||||
@@ -138,6 +148,11 @@ module.exports = {
|
||||
'**/*.test.js',
|
||||
],
|
||||
|
||||
// An array of regexp pattern strings that are matched against all test paths, matched tests are skipped
|
||||
// testPathIgnorePatterns: [
|
||||
// "/node_modules/"
|
||||
// ],
|
||||
|
||||
// The regexp pattern or array of patterns that Jest uses to detect test files
|
||||
// testRegex: [],
|
||||
|
||||
@@ -156,6 +171,12 @@ module.exports = {
|
||||
// A map from regular expressions to paths to transformers
|
||||
// transform: undefined,
|
||||
|
||||
// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
|
||||
// transformIgnorePatterns: [
|
||||
// "/node_modules/",
|
||||
// "\\.pnp\\.[^\\/]+$"
|
||||
// ],
|
||||
|
||||
// An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them
|
||||
// unmockedModulePathPatterns: undefined,
|
||||
|
||||
|
@@ -154,10 +154,6 @@ body, button {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
div, span, a {
|
||||
font-family: Roboto;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 24px;
|
||||
|
||||
|
31990
packages/app-desktop/package-lock.json
generated
Normal file
31990
packages/app-desktop/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,19 +1,19 @@
|
||||
{
|
||||
"name": "@joplin/app-desktop",
|
||||
"version": "2.6.10",
|
||||
"version": "2.6.9",
|
||||
"description": "Joplin for Desktop",
|
||||
"main": "main.js",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dist": "yarn run electronRebuild && npx electron-builder",
|
||||
"dist": "npm run electronRebuild && npx electron-builder",
|
||||
"build": "gulp build",
|
||||
"postinstall": "yarn run build",
|
||||
"postinstall": "npm run build",
|
||||
"electronRebuild": "gulp electronRebuild",
|
||||
"tsc": "tsc --project tsconfig.json",
|
||||
"watch": "tsc --watch --preserveWatchOutput --project tsconfig.json",
|
||||
"tsc": "node node_modules/typescript/bin/tsc --project tsconfig.json",
|
||||
"watch": "node node_modules/typescript/bin/tsc --watch --project tsconfig.json",
|
||||
"start": "gulp build && electron . --env dev --log-level debug --no-welcome --open-dev-tools",
|
||||
"test": "jest",
|
||||
"test-ci": "yarn test"
|
||||
"test-ci": "npm run test"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -31,8 +31,7 @@
|
||||
"afterSign": "./tools/notarizeMacApp.js",
|
||||
"extraResources": [
|
||||
"build/icons/*",
|
||||
"build/images/*",
|
||||
"build/lib/*"
|
||||
"build/images/*"
|
||||
],
|
||||
"afterAllArtifactBuild": "./generateSha512.js",
|
||||
"asar": true,
|
||||
@@ -111,13 +110,13 @@
|
||||
"@types/jest": "^26.0.15",
|
||||
"@types/node": "^14.14.6",
|
||||
"@types/react": "16.9.55",
|
||||
"@types/react-redux": "7.1.9",
|
||||
"@types/styled-components": "5.1.4",
|
||||
"@types/react-redux": "^7.1.9",
|
||||
"@types/styled-components": "^5.1.4",
|
||||
"ajv": "^6.5.0",
|
||||
"app-builder-bin": "^1.9.11",
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
"electron": "14.1.0",
|
||||
"electron": "^14.1.0",
|
||||
"electron-builder": "^22.11.7",
|
||||
"electron-notarize": "^1.0.0",
|
||||
"electron-rebuild": "^3.2.3",
|
||||
@@ -127,7 +126,7 @@
|
||||
"js-sha512": "^0.8.0",
|
||||
"nan": "2.14.2",
|
||||
"react-test-renderer": "^16.14.0",
|
||||
"typescript": "4.0.5"
|
||||
"typescript": "^4.0.5"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"7zip-bin-linux": "^1.0.1",
|
||||
@@ -163,17 +162,17 @@
|
||||
"react": "16.13.1",
|
||||
"react-datetime": "^2.14.0",
|
||||
"react-dom": "16.9.0",
|
||||
"react-redux": "5.0.7",
|
||||
"react-redux": "^5.0.7",
|
||||
"react-select": "^2.4.3",
|
||||
"react-toggle-button": "^2.2.0",
|
||||
"react-tooltip": "^3.10.0",
|
||||
"redux": "3.7.2",
|
||||
"redux": "^3.7.2",
|
||||
"reselect": "^4.0.0",
|
||||
"roboto-fontface": "^0.10.0",
|
||||
"smalltalk": "^2.5.1",
|
||||
"sqlite3": "^5.0.2",
|
||||
"styled-components": "5.1.1",
|
||||
"styled-system": "5.1.5",
|
||||
"styled-components": "^5.1.1",
|
||||
"styled-system": "^5.1.5",
|
||||
"taboverride": "^4.0.3",
|
||||
"tinymce": "^5.2.0"
|
||||
}
|
||||
|
@@ -101,11 +101,11 @@ do
|
||||
done
|
||||
|
||||
cd "$ROOT_DIR/packages/app-cli"
|
||||
yarn start --profile "$PROFILE_DIR" batch "$CMD_FILE"
|
||||
npm start -- --profile "$PROFILE_DIR" batch "$CMD_FILE"
|
||||
|
||||
if [[ $COMMANDS != "" ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
cd "$ROOT_DIR/packages/app-desktop"
|
||||
yarn start --profile "$PROFILE_DIR"
|
||||
npm start -- --profile "$PROFILE_DIR"
|
||||
|
@@ -28,13 +28,13 @@ export interface Props {
|
||||
onReady?: Function;
|
||||
}
|
||||
|
||||
const StyledFrame = styled.iframe<{fitToContent: boolean; borderBottom: boolean}>`
|
||||
const StyledFrame = styled.iframe`
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
width: ${(props: any) => props.fitToContent ? `${props.width}px` : '100%'};
|
||||
height: ${(props: any) => props.fitToContent ? `${props.height}px` : '100%'};
|
||||
border: none;
|
||||
border-bottom: ${(props: any) => props.borderBottom ? `1px solid ${props.theme.dividerColor}` : 'none'};
|
||||
border-bottom: ${(props: Props) => props.borderBottom ? `1px solid ${props.theme.dividerColor}` : 'none'};
|
||||
`;
|
||||
|
||||
function serializeForm(form: any) {
|
||||
|
@@ -4,8 +4,8 @@
|
||||
<meta charset="UTF-8">
|
||||
<script src="UserWebviewIndex.js"></script>
|
||||
<link rel="stylesheet" href="../../style/icons/style.css">
|
||||
<link rel="stylesheet" href="../../build/lib/@fortawesome/fontawesome-free/css/all.min.css">
|
||||
<link rel="stylesheet" href="../../build/lib/roboto-fontface/css/roboto/roboto-fontface.css">
|
||||
<link rel="stylesheet" href="../../node_modules/@fortawesome/fontawesome-free/css/all.min.css">
|
||||
<link rel="stylesheet" href="../../node_modules/roboto-fontface/css/roboto/roboto-fontface.css">
|
||||
<style>
|
||||
html {
|
||||
overflow: hidden;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
(function(globalObject) {
|
||||
// TODO: Not sure if that will work once packaged in Electron
|
||||
const sandboxProxy = require('../../build/lib/@joplin/lib/services/plugins/sandboxProxy.js');
|
||||
const sandboxProxy = require('../../node_modules/@joplin/lib/services/plugins/sandboxProxy.js').default;
|
||||
const ipcRenderer = require('electron').ipcRenderer;
|
||||
|
||||
const ipcRendererSend = (message, args) => {
|
||||
|
@@ -4,5 +4,5 @@
|
||||
# It could be used to develop plugins too.
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
PLUGIN_PATH="$SCRIPT_DIR/../app-cli/tests/support/plugins/toc"
|
||||
yarn i --prefix="$PLUGIN_PATH" && yarn start --dev-plugins "$PLUGIN_PATH"
|
||||
PLUGIN_PATH="$SCRIPT_DIR/../app-cli/tests/support/plugins/load_css"
|
||||
npm i --prefix="$PLUGIN_PATH" && npm start -- --dev-plugins "$PLUGIN_PATH"
|
@@ -1,7 +1,7 @@
|
||||
const fs = require('fs-extra');
|
||||
const spawnSync = require('child_process').spawnSync;
|
||||
const { chdir } = require('process');
|
||||
|
||||
const babelPath = `${__dirname}/../node_modules/.bin/babel${process.platform === 'win32' ? '.cmd' : ''}`;
|
||||
const basePath = `${__dirname}/../../..`;
|
||||
|
||||
function fileIsNewerThan(path1, path2) {
|
||||
@@ -14,8 +14,6 @@ function fileIsNewerThan(path1, path2) {
|
||||
}
|
||||
|
||||
function convertJsx(path) {
|
||||
chdir(`${__dirname}/..`);
|
||||
|
||||
fs.readdirSync(path).forEach((filename) => {
|
||||
const jsxPath = `${path}/${filename}`;
|
||||
const p = jsxPath.split('.');
|
||||
@@ -30,7 +28,7 @@ function convertJsx(path) {
|
||||
|
||||
if (fileIsNewerThan(jsxPath, jsPath)) {
|
||||
console.info(`Compiling ${jsxPath}...`);
|
||||
const result = spawnSync('yarn', ['run', 'babel', '--presets', 'react', '--out-file', jsPath, jsxPath]);
|
||||
const result = spawnSync(babelPath, ['--presets', 'react', '--out-file', jsPath, jsxPath]);
|
||||
if (result.status !== 0) {
|
||||
const msg = [];
|
||||
if (result.stdout) msg.push(result.stdout.toString());
|
||||
|
@@ -1,83 +0,0 @@
|
||||
const fs = require('fs-extra');
|
||||
const glob = require('glob');
|
||||
const { resolve } = require('path');
|
||||
const { copyDir, dirname, copyFile, mkdir } = require('@joplin/tools/gulp/utils');
|
||||
|
||||
const nodeModulesDir = resolve(__dirname, '../node_modules');
|
||||
|
||||
async function main() {
|
||||
const langSourceDir = resolve(__dirname, '../../../Assets/TinyMCE/langs');
|
||||
const buildLibDir = resolve(__dirname, '../build/lib');
|
||||
|
||||
const dirs = [
|
||||
'tinymce',
|
||||
'@fortawesome/fontawesome-free/webfonts',
|
||||
'roboto-fontface/fonts',
|
||||
'codemirror/theme',
|
||||
{
|
||||
src: langSourceDir,
|
||||
dest: `${buildLibDir}/tinymce/langs`,
|
||||
},
|
||||
];
|
||||
|
||||
const files = [
|
||||
'@fortawesome/fontawesome-free/css/all.min.css',
|
||||
'react-datetime/css/react-datetime.css',
|
||||
'smalltalk/css/smalltalk.css',
|
||||
'roboto-fontface/css/roboto/roboto-fontface.css',
|
||||
'codemirror/lib/codemirror.css',
|
||||
'codemirror/addon/dialog/dialog.css',
|
||||
'@joeattardi/emoji-button/dist/index.js',
|
||||
'mark.js/dist/mark.min.js',
|
||||
{
|
||||
src: resolve(__dirname, '../../lib/services/plugins/sandboxProxy.js'),
|
||||
dest: `${buildLibDir}/@joplin/lib/services/plugins/sandboxProxy.js`,
|
||||
},
|
||||
];
|
||||
|
||||
for (const dir of dirs) {
|
||||
let sourceDir, destDir;
|
||||
|
||||
if (typeof dir !== 'string') {
|
||||
sourceDir = dir.src;
|
||||
destDir = dir.dest;
|
||||
} else {
|
||||
sourceDir = `${nodeModulesDir}/${dir}`;
|
||||
destDir = `${buildLibDir}/${dir}`;
|
||||
}
|
||||
|
||||
console.info(`Copying ${sourceDir} => ${destDir}`);
|
||||
await mkdir(destDir);
|
||||
await copyDir(sourceDir, destDir);
|
||||
}
|
||||
|
||||
for (const file of files) {
|
||||
let sourceFile, destFile;
|
||||
|
||||
if (typeof file !== 'string') {
|
||||
sourceFile = file.src;
|
||||
destFile = file.dest;
|
||||
} else {
|
||||
sourceFile = `${nodeModulesDir}/${file}`;
|
||||
destFile = `${buildLibDir}/${file}`;
|
||||
}
|
||||
|
||||
await mkdir(dirname(destFile));
|
||||
|
||||
console.info(`Copying ${sourceFile} => ${destFile}`);
|
||||
await copyFile(sourceFile, destFile);
|
||||
}
|
||||
|
||||
const supportedLocales = glob.sync(`${langSourceDir}/*.js`).map(s => {
|
||||
s = s.split('/');
|
||||
s = s[s.length - 1];
|
||||
s = s.split('.');
|
||||
return s[0];
|
||||
});
|
||||
|
||||
const content = `module.exports = ${JSON.stringify(supportedLocales, null, 2)}`;
|
||||
|
||||
await fs.writeFile(`${__dirname}/../gui/NoteEditor/NoteBody/TinyMCE/supportedLocales.js`, content, 'utf8');
|
||||
}
|
||||
|
||||
module.exports = main;
|
@@ -2,7 +2,7 @@ const utils = require('@joplin/tools/gulp/utils');
|
||||
|
||||
async function main() {
|
||||
const rootDir = `${__dirname}/..`;
|
||||
|
||||
// TODO: should take from node_modules/@joplin/renderer
|
||||
const sourceDir = `${rootDir}/../../packages/renderer/assets`;
|
||||
const destDirs = [
|
||||
`${rootDir}/gui/note-viewer/pluginAssets`,
|
||||
|
23
packages/app-desktop/tools/copyTinyMceLangs.js
Normal file
23
packages/app-desktop/tools/copyTinyMceLangs.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const fs = require('fs-extra');
|
||||
const glob = require('glob');
|
||||
const utils = require('@joplin/tools/gulp/utils');
|
||||
|
||||
async function main() {
|
||||
const sourceDir = `${__dirname}/../../../Assets/TinyMCE/langs`;
|
||||
const destDir = `${__dirname}/../node_modules/tinymce/langs`;
|
||||
console.info(`Copying ${sourceDir} => ${destDir}`);
|
||||
await utils.copyDir(sourceDir, destDir);
|
||||
|
||||
const supportedLocales = glob.sync(`${sourceDir}/*.js`).map(s => {
|
||||
s = s.split('/');
|
||||
s = s[s.length - 1];
|
||||
s = s.split('.');
|
||||
return s[0];
|
||||
});
|
||||
|
||||
const content = `module.exports = ${JSON.stringify(supportedLocales, null, 2)}`;
|
||||
|
||||
await fs.writeFile(`${__dirname}/../gui/NoteEditor/NoteBody/TinyMCE/supportedLocales.js`, content, 'utf8');
|
||||
}
|
||||
|
||||
module.exports = main;
|
@@ -30,8 +30,8 @@ async function main() {
|
||||
// console.warn('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!');
|
||||
// return;
|
||||
|
||||
// let exePath = `${__dirname}/../node_modules/.bin/electron-rebuild`;
|
||||
// if (isWindows()) exePath += '.cmd';
|
||||
let exePath = `${__dirname}/../node_modules/.bin/electron-rebuild`;
|
||||
if (isWindows()) exePath += '.cmd';
|
||||
|
||||
process.chdir(`${__dirname}/..`);
|
||||
|
||||
@@ -44,10 +44,10 @@ async function main() {
|
||||
if (isWindows()) {
|
||||
// Cannot run this in parallel, or the 64-bit version might end up
|
||||
// with 32-bit files and vice-versa
|
||||
console.info(await execCommand(['yarn', 'run', 'electron-rebuild', forceAbiArgs, '--arch ia32'].join(' ')));
|
||||
console.info(await execCommand(['yarn', 'run', 'electron-rebuild', forceAbiArgs, '--arch x64'].join(' ')));
|
||||
console.info(await execCommand([`"${exePath}"`, forceAbiArgs, '--arch ia32'].join(' ')));
|
||||
console.info(await execCommand([`"${exePath}"`, forceAbiArgs, '--arch x64'].join(' ')));
|
||||
} else {
|
||||
console.info(await execCommand(['yarn', 'run', 'electron-rebuild', forceAbiArgs].join(' ')));
|
||||
console.info(await execCommand([`"${exePath}"`, forceAbiArgs].join(' ')));
|
||||
}
|
||||
}
|
||||
|
||||
|
13
packages/app-desktop/tools/unlinkReact.js
Normal file
13
packages/app-desktop/tools/unlinkReact.js
Normal file
@@ -0,0 +1,13 @@
|
||||
// const fs = require('fs');
|
||||
|
||||
// try {
|
||||
// fs.unlinkSync(`${__dirname}/../node_modules/react`);
|
||||
// } catch (error) {
|
||||
// // ignore
|
||||
// }
|
||||
|
||||
// try {
|
||||
// fs.unlinkSync(`${__dirname}/../node_modules/react-dom`);
|
||||
// } catch (error) {
|
||||
// // ignore
|
||||
// }
|
@@ -146,8 +146,8 @@ android {
|
||||
applicationId "net.cozic.joplin"
|
||||
minSdkVersion rootProject.ext.minSdkVersion
|
||||
targetSdkVersion rootProject.ext.targetSdkVersion
|
||||
versionCode 2097665
|
||||
versionName "2.6.9"
|
||||
versionCode 2097664
|
||||
versionName "2.6.8"
|
||||
ndk {
|
||||
abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
|
||||
}
|
||||
|
@@ -3,5 +3,5 @@ rmdir /s/q android\app\build
|
||||
rmdir /s/q android\build
|
||||
rmdir /s/q android\.gradle
|
||||
rmdir /s/q node_modules
|
||||
yarn install
|
||||
yarn run start
|
||||
npm install
|
||||
npm run start
|
@@ -215,15 +215,15 @@ PODS:
|
||||
- glog
|
||||
- react-native-alarm-notification (1.0.5):
|
||||
- React
|
||||
- react-native-camera (3.44.3):
|
||||
- react-native-camera (3.40.0):
|
||||
- React-Core
|
||||
- react-native-camera/RCT (= 3.44.3)
|
||||
- react-native-camera/RN (= 3.44.3)
|
||||
- react-native-camera/RCT (3.44.3):
|
||||
- react-native-camera/RCT (= 3.40.0)
|
||||
- react-native-camera/RN (= 3.40.0)
|
||||
- react-native-camera/RCT (3.40.0):
|
||||
- React-Core
|
||||
- react-native-camera/RN (3.44.3):
|
||||
- react-native-camera/RN (3.40.0):
|
||||
- React-Core
|
||||
- react-native-document-picker (4.3.0):
|
||||
- react-native-document-picker (4.0.0):
|
||||
- React-Core
|
||||
- react-native-geolocation (2.0.2):
|
||||
- React
|
||||
@@ -231,9 +231,9 @@ PODS:
|
||||
- React-Core
|
||||
- react-native-image-picker (2.3.4):
|
||||
- React-Core
|
||||
- react-native-image-resizer (1.4.5):
|
||||
- react-native-image-resizer (1.3.0):
|
||||
- React-Core
|
||||
- react-native-netinfo (6.2.1):
|
||||
- react-native-netinfo (6.0.0):
|
||||
- React-Core
|
||||
- react-native-rsa-native (2.0.4):
|
||||
- React
|
||||
@@ -241,9 +241,9 @@ PODS:
|
||||
- React
|
||||
- react-native-sqlite-storage (5.0.0):
|
||||
- React
|
||||
- react-native-version-info (1.1.1):
|
||||
- react-native-version-info (1.1.0):
|
||||
- React-Core
|
||||
- react-native-webview (10.10.2):
|
||||
- react-native-webview (10.9.2):
|
||||
- React-Core
|
||||
- React-perflogger (0.66.1)
|
||||
- React-RCTActionSheet (0.66.1):
|
||||
@@ -312,21 +312,21 @@ PODS:
|
||||
- React-perflogger (= 0.66.1)
|
||||
- rn-fetch-blob (0.12.0):
|
||||
- React-Core
|
||||
- RNCClipboard (1.5.1):
|
||||
- RNCClipboard (1.5.0):
|
||||
- React-Core
|
||||
- RNCPushNotificationIOS (1.10.1):
|
||||
- RNCPushNotificationIOS (1.6.0):
|
||||
- React-Core
|
||||
- RNDateTimePicker (3.5.2):
|
||||
- RNDateTimePicker (3.0.3):
|
||||
- React-Core
|
||||
- RNFileViewer (2.1.4):
|
||||
- React-Core
|
||||
- RNFS (2.18.0):
|
||||
- RNFS (2.16.6):
|
||||
- React
|
||||
- RNQuickAction (0.3.13):
|
||||
- React
|
||||
- RNSecureRandom (1.0.0):
|
||||
- RNSecureRandom (1.0.0-rc.0):
|
||||
- React
|
||||
- RNShare (7.3.2):
|
||||
- RNShare (7.2.1):
|
||||
- React-Core
|
||||
- RNVectorIcons (7.1.0):
|
||||
- React
|
||||
@@ -529,18 +529,18 @@ SPEC CHECKSUMS:
|
||||
React-jsinspector: 8c0517dee5e8c70cd6c3066f20213ff7ce54f176
|
||||
React-logger: bfddd3418dc1d45b77b822958f3e31422e2c179b
|
||||
react-native-alarm-notification: 4817a2a0d7cc2ed2acc97337ebcdf9ae2a69c9d5
|
||||
react-native-camera: b8cc03e2feec0c04403d0998e37cf519d8fd4c6f
|
||||
react-native-document-picker: 20f652c2402d3ddc81f396d8167c3bd978add4a2
|
||||
react-native-camera: 35854c4f764a4a6cf61c1c3525888b92f0fe4b31
|
||||
react-native-document-picker: 0bba80cc56caab1f67dbaa81ff557e3a9b7f2b9f
|
||||
react-native-geolocation: c956aeb136625c23e0dce0467664af2c437888c9
|
||||
react-native-get-random-values: 2c4ff6b44cb71291dabe9a8ae87d3877dcf387da
|
||||
react-native-image-picker: c6d75c4ab2cf46f9289f341242b219cb3c1180d3
|
||||
react-native-image-resizer: d9fb629a867335bdc13230ac2a58702bb8c8828f
|
||||
react-native-netinfo: 3d3769f0d65de15c83a9bf1346f8be71de5a24bf
|
||||
react-native-image-resizer: a79bcffdef1b52160ff91db0d6fa24816a4ff332
|
||||
react-native-netinfo: e849fc21ca2f4128a5726c801a82fc6f4a6db50d
|
||||
react-native-rsa-native: 1f6bba06dd02f0e652a66a384c75c270f7a0062f
|
||||
react-native-slider: e99fc201cefe81270fc9d81714a7a0f5e566b168
|
||||
react-native-sqlite-storage: 418ef4afc5e6df6ce3574c4617e5f0b65cffde55
|
||||
react-native-version-info: a106f23009ac0db4ee00de39574eb546682579b9
|
||||
react-native-webview: 0aa2cde4ee7e3e1c5fffdf64dbce9c709aa18155
|
||||
react-native-version-info: 36490da17d2c6b5cc21321c70e433784dee7ed0b
|
||||
react-native-webview: 4e96d493f9f90ba4f03b28933f30b2964df07e39
|
||||
React-perflogger: fcac6090a80e3d967791b4c7f1b1a017f9d4a398
|
||||
React-RCTActionSheet: caf5913d9f9e605f5467206cf9d1caa6d47d7ad6
|
||||
React-RCTAnimation: 6539e3bf594f6a529cd861985ba6548286ae1ead
|
||||
@@ -554,14 +554,14 @@ SPEC CHECKSUMS:
|
||||
React-runtimeexecutor: 33a949a51bec5f8a3c9e8d8092deb259600d761e
|
||||
ReactCommon: 620442811dc6f707b4bf5e3b27d4f19c12d5a821
|
||||
rn-fetch-blob: f065bb7ab7fb48dd002629f8bdcb0336602d3cba
|
||||
RNCClipboard: 41d8d918092ae8e676f18adada19104fa3e68495
|
||||
RNCPushNotificationIOS: 87b8d16d3ede4532745e05b03c42cff33a36cc45
|
||||
RNDateTimePicker: 7658208086d86d09e1627b5c34ba0cf237c60140
|
||||
RNCClipboard: c7abea1baea58adca5c1f29e56dd5261837b4892
|
||||
RNCPushNotificationIOS: ec7ffe65c7b5097f8d287fd627e1c1674ea69cef
|
||||
RNDateTimePicker: 6f62fd42ac8b58bcc30c43ac3620e5097e8a227f
|
||||
RNFileViewer: 83cc066ad795b1f986791d03b56fe0ee14b6a69f
|
||||
RNFS: 3ab21fa6c56d65566d1fb26c2228e2b6132e5e32
|
||||
RNFS: 2bd9eb49dc82fa9676382f0585b992c424cd59df
|
||||
RNQuickAction: 6d404a869dc872cde841ad3147416a670d13fa93
|
||||
RNSecureRandom: 0dcee021fdb3d50cd5cee5db0ebf583c42f5af0e
|
||||
RNShare: d76b8c9c6e6ffb38fc18f40b4338c9d867592ed3
|
||||
RNSecureRandom: 1f19ad1492f7ed416b8fc79e92216a1f73f13a4c
|
||||
RNShare: edd621a71124961e29a7ba43a84bd1c6f9980d88
|
||||
RNVectorIcons: bc69e6a278b14842063605de32bec61f0b251a59
|
||||
Yoga: 2b4a01651f42a32f82e6cef3830a3ba48088237f
|
||||
|
||||
|
22632
packages/app-mobile/package-lock.json
generated
Normal file
22632
packages/app-mobile/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,12 +7,12 @@
|
||||
"scripts": {
|
||||
"start": "react-native start --reset-cache",
|
||||
"build": "gulp build",
|
||||
"tsc": "tsc --project tsconfig.json",
|
||||
"watch": "tsc --watch --preserveWatchOutput --project tsconfig.json",
|
||||
"tsc": "node node_modules/typescript/bin/tsc --project tsconfig.json",
|
||||
"watch": "node node_modules/typescript/bin/tsc --watch --project tsconfig.json",
|
||||
"clean": "node tools/clean.js",
|
||||
"buildInjectedJs": "gulp buildInjectedJs",
|
||||
"watchInjectedJs": "nodemon --verbose --watch components/NoteEditor/CodeMirror.ts --exec \"yarn run buildInjectedJs\"",
|
||||
"postinstall": "jetify && yarn run build"
|
||||
"watchInjectedJs": "nodemon --verbose --watch components/NoteEditor/CodeMirror.ts --exec \"npm run buildInjectedJs\"",
|
||||
"postinstall": "jetify && npm run build"
|
||||
},
|
||||
"dependencies": {
|
||||
"@joplin/lib": "~2.6",
|
||||
|
@@ -26,8 +26,7 @@ async function buildCodeMirrorBundle() {
|
||||
const sourceFile = `${mobileDir}/components/NoteEditor/CodeMirror.ts`;
|
||||
const fullBundleFile = `${mobileDir}/components/NoteEditor/CodeMirror.bundle.js`;
|
||||
|
||||
await execa('yarn', [
|
||||
'run', 'rollup',
|
||||
await execa('./node_modules/rollup/dist/bin/rollup', [
|
||||
sourceFile,
|
||||
'--name', 'codeMirrorBundle',
|
||||
'-f', 'iife',
|
||||
@@ -36,9 +35,7 @@ async function buildCodeMirrorBundle() {
|
||||
'-p', '@rollup/plugin-typescript',
|
||||
]);
|
||||
|
||||
// await execa('./node_modules/uglify-js/bin/uglifyjs', [
|
||||
await execa('yarn', [
|
||||
'run', 'uglifyjs',
|
||||
await execa('./node_modules/uglify-js/bin/uglifyjs', [
|
||||
'--compress',
|
||||
'-o', codeMirrorBundleFile,
|
||||
fullBundleFile,
|
||||
@@ -48,7 +45,7 @@ async function buildCodeMirrorBundle() {
|
||||
async function main() {
|
||||
await fs.mkdirp(outputDir);
|
||||
await buildCodeMirrorBundle();
|
||||
await copyJs('webviewLib', `${mobileDir}/../lib/renderers/webviewLib.js`);
|
||||
await copyJs('webviewLib', `${mobileDir}/node_modules/@joplin/lib/renderers/webviewLib.js`);
|
||||
await copyJs('CodeMirror.bundle', `${mobileDir}/components/NoteEditor/CodeMirror.bundle.min.js`);
|
||||
}
|
||||
|
||||
|
@@ -1,19 +1,17 @@
|
||||
// We don't make that a gulp task because we might want to run it before
|
||||
// gulp has been installed.
|
||||
|
||||
const fs = require('fs');
|
||||
const fs = require('fs-extra');
|
||||
|
||||
function main() {
|
||||
async function main() {
|
||||
const mobileDir = `${__dirname}/..`;
|
||||
fs.rmSync(`${mobileDir}/android/.gradle`, { recursive: true, force: true });
|
||||
fs.rmSync(`${mobileDir}/android/app/build`, { recursive: true, force: true });
|
||||
fs.rmSync(`${mobileDir}/ios/Pods`, { recursive: true, force: true });
|
||||
await fs.remove(`${mobileDir}/android/.gradle`);
|
||||
await fs.remove(`${mobileDir}/android/app/build`);
|
||||
await fs.remove(`${mobileDir}/ios/Pods`);
|
||||
console.info('To clean the Android build, in some rare cases you might also need to clear the cache in ~/.android and ~/.gradle');
|
||||
}
|
||||
|
||||
try {
|
||||
main();
|
||||
} catch (error) {
|
||||
main().catch((error) => {
|
||||
console.error('Could not clean mobile app build', error);
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
@@ -47,7 +47,7 @@ async function main() {
|
||||
await fs.mkdirp(outputDir);
|
||||
|
||||
const encodedFiles = [];
|
||||
const sourceAssetDir = `${rootDir}/../renderer/assets`;
|
||||
const sourceAssetDir = `${rootDir}/node_modules/@joplin/renderer/assets`;
|
||||
const files = walk(sourceAssetDir);
|
||||
|
||||
for (const file of files) {
|
||||
|
15762
packages/fork-htmlparser2/package-lock.json
generated
Normal file
15762
packages/fork-htmlparser2/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -40,7 +40,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"domelementtype": "^2.0.1",
|
||||
"domhandler": "3.0.0",
|
||||
"domhandler": "^3.0.0",
|
||||
"domutils": "^2.0.0",
|
||||
"entities": "^2.0.0"
|
||||
},
|
||||
@@ -55,7 +55,7 @@
|
||||
"jest": "^26.6.3",
|
||||
"prettier": "^1.18.2",
|
||||
"ts-jest": "^24.0.2",
|
||||
"typescript": "3.8.2"
|
||||
"typescript": "^3.5.3"
|
||||
},
|
||||
"jest": {
|
||||
"preset": "ts-jest",
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import DomHandler, { DomHandlerOptions, Element } from "domhandler";
|
||||
import DomHandler, { DomHandlerOptions, Node, Element } from "domhandler";
|
||||
import * as DomUtils from "domutils";
|
||||
import { Parser, ParserOptions } from "./Parser";
|
||||
|
||||
@@ -147,16 +147,16 @@ export class FeedHandler extends DomHandler {
|
||||
}
|
||||
}
|
||||
|
||||
function getElements(what: string, where: any) {
|
||||
function getElements(what: string, where: Node | Node[]) {
|
||||
return DomUtils.getElementsByTagName(what, where, true);
|
||||
}
|
||||
function getOneElement(
|
||||
what: string | ((name: string) => boolean),
|
||||
where: any
|
||||
where: Node | Node[]
|
||||
) {
|
||||
return DomUtils.getElementsByTagName(what, where, true, 1)[0];
|
||||
}
|
||||
function fetch(what: string, where: any, recurse = false): string {
|
||||
function fetch(what: string, where: Node | Node[], recurse = false): string {
|
||||
return DomUtils.getText(
|
||||
DomUtils.getElementsByTagName(what, where, recurse, 1)
|
||||
).trim();
|
||||
@@ -175,7 +175,7 @@ function addConditionally<T>(
|
||||
obj: T,
|
||||
prop: keyof T,
|
||||
what: string,
|
||||
where: any,
|
||||
where: Node | Node[],
|
||||
recurse = false
|
||||
) {
|
||||
const tmp = fetch(what, where, recurse);
|
||||
|
11686
packages/fork-sax/package-lock.json
generated
Normal file
11686
packages/fork-sax/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,19 +0,0 @@
|
||||
Copyright (c) 2012 Jeremy Selier
|
||||
|
||||
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:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
@@ -1,51 +0,0 @@
|
||||
# Uslug.js
|
||||
|
||||
* * *
|
||||
|
||||
Modified for Joplin:
|
||||
|
||||
- Added support for emojis - "🐶🐶🐶🐱" => "dogdogdogcat"
|
||||
|
||||
* * *
|
||||
|
||||
Permissive slug generator that works with unicode.
|
||||
We keep only characters from the categories Letter, Number and Separator (see [Unicode Categories](http://www.unicode.org/versions/Unicode6.0.0/ch04.pdf))
|
||||
and the common [CJK Unified Ideographs](http://www.unicode.org/versions/Unicode6.0.0/ch12.pdf) as defined in the version 6.0.0 of the Unicode specification.
|
||||
|
||||
Inspired by [unicode-slugify](https://github.com/mozilla/unicode-slugify).
|
||||
Note that this slug generator is different from [node-slug](https://github.com/dodo/node-slug) which focus on translating unicode characters to english or latin equivalent.
|
||||
|
||||
|
||||
## Quick Examples
|
||||
|
||||
uslug('Быстрее и лучше!') // 'быстрее-и-лучше'
|
||||
uslug('汉语/漢語') // '汉语漢語'
|
||||
|
||||
uslug('Y U NO', { lower: false })) // 'Y-U-NO'
|
||||
uslug('Y U NO', { spaces: true })) // 'y u no'
|
||||
uslug('Y-U|NO', { allowedChars: '|' })) // 'yu|no'
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
npm install uslug
|
||||
|
||||
|
||||
## Options
|
||||
|
||||
### uslug(string, options)
|
||||
|
||||
Generate a slug for the string passed.
|
||||
|
||||
__Arguments__
|
||||
|
||||
* string - The string you want to slugify.
|
||||
* options - An optional object that can contain:
|
||||
* allowedChars: a String of chars that you want to be whitelisted. Default: '-_~'.
|
||||
* lower: a Boolean to force to lower case the slug. Default: true.
|
||||
* spaces: a Boolean to allow spaces. Default: false.
|
||||
|
||||
|
||||
## License
|
||||
|
||||
This project is distributed under the MIT License. See LICENSE file for more information.
|
@@ -1 +0,0 @@
|
||||
module.exports = require('./lib/uslug');
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,13 +0,0 @@
|
||||
/*
|
||||
* List of Unicode code that are flagged as separator.
|
||||
*
|
||||
* Contains Unicode code of:
|
||||
* - Zs = Separator, space
|
||||
* - Zl = Separator, line
|
||||
* - Zp = Separator, paragraph
|
||||
*
|
||||
* This list has been computed from http://unicode.org/Public/UNIDATA/UnicodeData.txt
|
||||
* curl -s http://unicode.org/Public/UNIDATA/UnicodeData.txt | grep -E ';Zs;|;Zl;|;Zp;' | cut -d \; -f 1 | xargs -I{} printf '%d, ' 0x{}
|
||||
*
|
||||
*/
|
||||
exports.Z = [32, 160, 5760, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8232, 8233, 8239, 8287, 12288];
|
@@ -1,61 +0,0 @@
|
||||
(function() {
|
||||
var L = require('./L').L,
|
||||
N = require('./N').N,
|
||||
Z = require('./Z').Z,
|
||||
M = require('./M').M,
|
||||
unorm = require('unorm');
|
||||
|
||||
var nodeEmoji = require('node-emoji')
|
||||
|
||||
var _unicodeCategory = function(code) {
|
||||
if (~L.indexOf(code)) return 'L';
|
||||
if (~N.indexOf(code)) return 'N';
|
||||
if (~Z.indexOf(code)) return 'Z';
|
||||
if (~M.indexOf(code)) return 'M';
|
||||
return undefined;
|
||||
};
|
||||
|
||||
module.exports = function(string, options) {
|
||||
string = string || '';
|
||||
options = options || {};
|
||||
var allowedChars = options.allowedChars || '-_~';
|
||||
var lower = typeof options.lower === 'boolean' ? options.lower : true;
|
||||
var spaces = typeof options.spaces === 'boolean' ? options.spaces : false;
|
||||
var rv = [];
|
||||
var noEmojiString = nodeEmoji.unemojify(string);
|
||||
var chars = unorm.nfkc(noEmojiString);
|
||||
for(var i = 0; i < chars.length; i++) {
|
||||
var c = chars[i];
|
||||
var code = c.charCodeAt(0);
|
||||
// Allow Common CJK Unified Ideographs
|
||||
// See: http://www.unicode.org/versions/Unicode6.0.0/ch12.pdf - Table 12-2
|
||||
if (0x4E00 <= code && code <= 0x9FFF) {
|
||||
rv.push(c);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Allow Hangul
|
||||
if (0xAC00 <= code && code <= 0xD7A3) {
|
||||
rv.push(c);
|
||||
continue;
|
||||
}
|
||||
|
||||
// Japanese ideographic punctuation
|
||||
if ((0x3000 <= code && code <= 0x3002) || (0xFF01 <= code && code <= 0xFF02)) {
|
||||
rv.push(' ');
|
||||
}
|
||||
|
||||
if (allowedChars.indexOf(c) != -1) {
|
||||
rv.push(c);
|
||||
continue;
|
||||
}
|
||||
var val = _unicodeCategory(code);
|
||||
if (val && ~'LNM'.indexOf(val)) rv.push(c);
|
||||
if (val && ~'Z'.indexOf(val)) rv.push(' ');
|
||||
}
|
||||
var slug = rv.join('').replace(/^\s+|\s+$/g, '').replace(/\s+/g,' ');
|
||||
if (!spaces) slug = slug.replace(/[\s\-]+/g,'-');
|
||||
if (lower) slug = slug.toLowerCase();
|
||||
return slug;
|
||||
};
|
||||
}());
|
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"name": "@joplin/fork-uslug",
|
||||
"version": "1.0.4",
|
||||
"description": "A permissive slug generator that works with unicode.",
|
||||
"author": "Jeremy Selier <jerem.selier@gmail.com>",
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"dependencies": {
|
||||
"node-emoji": "1.11.0",
|
||||
"unorm": ">= 1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"should": ">= 0.2.1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "http://github.com/jeremys/uslug.git"
|
||||
},
|
||||
"main": "./index",
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "http://github.com/jeremys/uslug/issues"
|
||||
},
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "http://github.com/jeremys/uslug/raw/master/LICENSE"
|
||||
}
|
||||
]
|
||||
}
|
@@ -1,44 +0,0 @@
|
||||
var should = require('should'),
|
||||
uslug = require('../lib/uslug');
|
||||
|
||||
|
||||
var word0 = 'Ελληνικά';
|
||||
var word1 = [word0, word0].join('-');
|
||||
var word2 = [word0, word0].join(' - ');
|
||||
|
||||
var tests = [
|
||||
['', ''],
|
||||
['The \u212B symbol invented by A. J. \u00C5ngstr\u00F6m (1814, L\u00F6gd\u00F6, \u2013 1874) denotes the length 10\u207B\u00B9\u2070 m.', 'the-å-symbol-invented-by-a-j-ångström-1814-lögdö-1874-denotes-the-length-1010-m'],
|
||||
['Быстрее и лучше!', 'быстрее-и-лучше'],
|
||||
['xx x - "#$@ x', 'xx-x-x'],
|
||||
['Bän...g (bang)', 'bäng-bang'],
|
||||
[word0, word0.toLowerCase()],
|
||||
[word1, word1.toLowerCase()],
|
||||
[word2, word1.toLowerCase()],
|
||||
[' a ', 'a'],
|
||||
['tags/', 'tags'],
|
||||
['y_u_no', 'y_u_no'],
|
||||
['el-ni\xf1o', 'el-ni\xf1o'],
|
||||
['x荿', 'x荿'],
|
||||
['ϧ蒬蓣', '\u03e7蒬蓣'],
|
||||
['¿x', 'x'],
|
||||
['汉语/漢語', '汉语漢語'],
|
||||
['فار,سي', 'فارسي'],
|
||||
['เแโ|ใไ', 'เแโใไ'],
|
||||
['日本語ドキュメンテ(ーション)', '日本語ドキュメンテーション'],
|
||||
['一二三四五六七八九十!。。。', '一二三四五六七八九十'],
|
||||
['संसद में काम नहीं तो वेतन क्यों?', 'संसद-में-काम-नहीं-तो-वेतन-क्यों'],
|
||||
['เร่งรัด \'ปรับเงินเดือนท้องถิ่น 1 ขั้น\' ตามมติ ครม.', 'เร่งรัด-ปรับเงินเดือนท้องถิ่น-1-ขั้น-ตามมติ-ครม'],
|
||||
['オバマ大統領が病院爆撃の調査へ同意するように、協力してください!', 'オバマ大統領が病院爆撃の調査へ同意するように-協力してください'],
|
||||
['일본정부 법무대신(法務大臣): 우리는 일본 입관법의 재검토를 요구한다!', '일본정부-법무대신法務大臣-우리는-일본-입관법의-재검토를-요구한다'],
|
||||
['😁', 'grin'],
|
||||
['😁a', 'grina'],
|
||||
['🐶🐶🐶🐱', 'dogdogdogcat'],
|
||||
];
|
||||
|
||||
for (var t in tests) {
|
||||
var test = tests[t];
|
||||
uslug(test[0]).should.equal(test[1]);
|
||||
}
|
||||
|
||||
uslug('qbc,fe', { allowedChars: 'q' }).should.equal('qbcfe');
|
18370
packages/generator-joplin/package-lock.json
generated
Normal file
18370
packages/generator-joplin/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -9,7 +9,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest",
|
||||
"test-ci": "yarn test"
|
||||
"test-ci": "npm run test"
|
||||
},
|
||||
"files": [
|
||||
"generators"
|
||||
|
@@ -12,7 +12,7 @@ CLI_DIR="$SCRIPT_DIR/../app-cli"
|
||||
LIB_DIR="$SCRIPT_DIR/../lib"
|
||||
|
||||
cd "$LIB_DIR"
|
||||
yarn run generatePluginTypes
|
||||
npm run generatePluginTypes
|
||||
|
||||
cd "$SCRIPT_DIR"
|
||||
rsync -a --delete "$LIB_DIR/plugin_types/services/plugins/api/" "$SCRIPT_DIR/generators/app/templates/api/"
|
||||
@@ -20,7 +20,7 @@ cp "$LIB_DIR/services/plugins/api/types.ts" "$SCRIPT_DIR/generators/app/template
|
||||
cp "$SCRIPT_DIR/generators/app/templates/api_index.ts" "$SCRIPT_DIR/generators/app/templates/api/index.ts"
|
||||
rm -f "$SCRIPT_DIR/generators/app/templates/api/types.d.ts"
|
||||
|
||||
yarn link
|
||||
npm link
|
||||
|
||||
"$CLI_DIR/tests/support/plugins/updatePlugins.sh"
|
||||
|
||||
|
321
packages/htmlpack/package-lock.json
generated
Normal file
321
packages/htmlpack/package-lock.json
generated
Normal file
@@ -0,0 +1,321 @@
|
||||
{
|
||||
"name": "@joplin/htmlpack",
|
||||
"version": "2.6.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@joplin/htmlpack",
|
||||
"version": "2.6",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"css": "^3.0.0",
|
||||
"datauri": "^4.1.0",
|
||||
"fs-extra": "^10.0.0",
|
||||
"html-entities": "^1.2.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/fs-extra": "^9.0.6"
|
||||
}
|
||||
},
|
||||
"../fork-htmlparser2": {
|
||||
"name": "@joplin/fork-htmlparser2",
|
||||
"version": "4.1.34",
|
||||
"extraneous": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"domelementtype": "^2.0.1",
|
||||
"domhandler": "^3.0.0",
|
||||
"domutils": "^2.0.0",
|
||||
"entities": "^2.0.0",
|
||||
"fs-extra": "^10.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "^25.1.3",
|
||||
"@types/node": "^13.1.1",
|
||||
"@typescript-eslint/eslint-plugin": "^1.13.0",
|
||||
"@typescript-eslint/parser": "^1.13.0",
|
||||
"coveralls": "^3.0.1",
|
||||
"eslint": "^6.0.0",
|
||||
"eslint-config-prettier": "^6.0.0",
|
||||
"jest": "^26.6.3",
|
||||
"prettier": "^1.18.2",
|
||||
"ts-jest": "^24.0.2",
|
||||
"typescript": "^3.5.3"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/fs-extra": {
|
||||
"version": "9.0.13",
|
||||
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz",
|
||||
"integrity": "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/node": {
|
||||
"version": "16.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.1.tgz",
|
||||
"integrity": "sha512-4/Z9DMPKFexZj/Gn3LylFgamNKHm4K3QDi0gz9B26Uk0c8izYf97B5fxfpspMNkWlFupblKM/nV8+NA9Ffvr+w==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/atob": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
|
||||
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
|
||||
"bin": {
|
||||
"atob": "bin/atob.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 4.5.0"
|
||||
}
|
||||
},
|
||||
"node_modules/css": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz",
|
||||
"integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.4",
|
||||
"source-map": "^0.6.1",
|
||||
"source-map-resolve": "^0.6.0"
|
||||
}
|
||||
},
|
||||
"node_modules/datauri": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/datauri/-/datauri-4.1.0.tgz",
|
||||
"integrity": "sha512-y17kh32+I82G+ED9MNWFkZiP/Cq/vO1hN9+tSZsT9C9qn3NrvcBnh7crSepg0AQPge1hXx2Ca44s1FRdv0gFWA==",
|
||||
"dependencies": {
|
||||
"image-size": "1.0.0",
|
||||
"mimer": "^2.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/decode-uri-component": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
|
||||
"integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "10.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
|
||||
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.8",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
|
||||
"integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg=="
|
||||
},
|
||||
"node_modules/html-entities": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz",
|
||||
"integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA=="
|
||||
},
|
||||
"node_modules/image-size": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/image-size/-/image-size-1.0.0.tgz",
|
||||
"integrity": "sha512-JLJ6OwBfO1KcA+TvJT+v8gbE6iWbj24LyDNFgFEN0lzegn6cC6a/p3NIDaepMsJjQjlUWqIC7wJv8lBFxPNjcw==",
|
||||
"dependencies": {
|
||||
"queue": "6.0.2"
|
||||
},
|
||||
"bin": {
|
||||
"image-size": "bin/image-size.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"node_modules/jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
||||
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
||||
"dependencies": {
|
||||
"universalify": "^2.0.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"graceful-fs": "^4.1.6"
|
||||
}
|
||||
},
|
||||
"node_modules/mimer": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mimer/-/mimer-2.0.2.tgz",
|
||||
"integrity": "sha512-izxvjsB7Ur5HrTbPu6VKTrzxSMBFBqyZQc6dWlZNQ4/wAvf886fD4lrjtFd8IQ8/WmZKdxKjUtqFFNaj3hQ52g==",
|
||||
"bin": {
|
||||
"mimer": "bin/mimer"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 12"
|
||||
}
|
||||
},
|
||||
"node_modules/queue": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz",
|
||||
"integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==",
|
||||
"dependencies": {
|
||||
"inherits": "~2.0.3"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map-resolve": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz",
|
||||
"integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==",
|
||||
"dependencies": {
|
||||
"atob": "^2.1.2",
|
||||
"decode-uri-component": "^0.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/universalify": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
||||
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==",
|
||||
"engines": {
|
||||
"node": ">= 10.0.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/fs-extra": {
|
||||
"version": "9.0.13",
|
||||
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-9.0.13.tgz",
|
||||
"integrity": "sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "16.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.1.tgz",
|
||||
"integrity": "sha512-4/Z9DMPKFexZj/Gn3LylFgamNKHm4K3QDi0gz9B26Uk0c8izYf97B5fxfpspMNkWlFupblKM/nV8+NA9Ffvr+w==",
|
||||
"dev": true
|
||||
},
|
||||
"atob": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
|
||||
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
|
||||
},
|
||||
"css": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/css/-/css-3.0.0.tgz",
|
||||
"integrity": "sha512-DG9pFfwOrzc+hawpmqX/dHYHJG+Bsdb0klhyi1sDneOgGOXy9wQIC8hzyVp1e4NRYDBdxcylvywPkkXCHAzTyQ==",
|
||||
"requires": {
|
||||
"inherits": "^2.0.4",
|
||||
"source-map": "^0.6.1",
|
||||
"source-map-resolve": "^0.6.0"
|
||||
}
|
||||
},
|
||||
"datauri": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/datauri/-/datauri-4.1.0.tgz",
|
||||
"integrity": "sha512-y17kh32+I82G+ED9MNWFkZiP/Cq/vO1hN9+tSZsT9C9qn3NrvcBnh7crSepg0AQPge1hXx2Ca44s1FRdv0gFWA==",
|
||||
"requires": {
|
||||
"image-size": "1.0.0",
|
||||
"mimer": "^2.0.2"
|
||||
}
|
||||
},
|
||||
"decode-uri-component": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
|
||||
"integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU="
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "10.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
|
||||
"integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.2.0",
|
||||
"jsonfile": "^6.0.1",
|
||||
"universalify": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"graceful-fs": {
|
||||
"version": "4.2.8",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz",
|
||||
"integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg=="
|
||||
},
|
||||
"html-entities": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/html-entities/-/html-entities-1.4.0.tgz",
|
||||
"integrity": "sha512-8nxjcBcd8wovbeKx7h3wTji4e6+rhaVuPNpMqwWgnHh+N9ToqsCs6XztWRBPQ+UtzsoMAdKZtUENoVzU/EMtZA=="
|
||||
},
|
||||
"image-size": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/image-size/-/image-size-1.0.0.tgz",
|
||||
"integrity": "sha512-JLJ6OwBfO1KcA+TvJT+v8gbE6iWbj24LyDNFgFEN0lzegn6cC6a/p3NIDaepMsJjQjlUWqIC7wJv8lBFxPNjcw==",
|
||||
"requires": {
|
||||
"queue": "6.0.2"
|
||||
}
|
||||
},
|
||||
"inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"jsonfile": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz",
|
||||
"integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.6",
|
||||
"universalify": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"mimer": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/mimer/-/mimer-2.0.2.tgz",
|
||||
"integrity": "sha512-izxvjsB7Ur5HrTbPu6VKTrzxSMBFBqyZQc6dWlZNQ4/wAvf886fD4lrjtFd8IQ8/WmZKdxKjUtqFFNaj3hQ52g=="
|
||||
},
|
||||
"queue": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz",
|
||||
"integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==",
|
||||
"requires": {
|
||||
"inherits": "~2.0.3"
|
||||
}
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
|
||||
},
|
||||
"source-map-resolve": {
|
||||
"version": "0.6.0",
|
||||
"resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz",
|
||||
"integrity": "sha512-KXBr9d/fO/bWo97NXsPIAW1bFSBOuCnjbNTBMO7N59hsv5i9yzRDfcYwwt0l04+VqnKC+EwzvJZIP/qkuMgR/w==",
|
||||
"requires": {
|
||||
"atob": "^2.1.2",
|
||||
"decode-uri-component": "^0.2.0"
|
||||
}
|
||||
},
|
||||
"universalify": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz",
|
||||
"integrity": "sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ=="
|
||||
}
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user