1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-14 23:26:58 +02:00

Compare commits

..

36 Commits

Author SHA1 Message Date
palerdot
357277cda0 pass handleEscape as false in splitCommand for bundleDefaultPlugins 2023-04-11 15:27:02 +05:30
palerdot
8c1568ae81 pass options to splitCommand for bundleDefaultPlugins 2023-04-11 15:07:47 +05:30
palerdot
66e479d13d Revert "fix path separator in windows for default plugins"
This reverts commit 700c1410fa.
2023-04-11 15:05:51 +05:30
palerdot
700c1410fa fix path separator in windows for default plugins 2023-04-11 13:05:11 +05:30
palerdot
3873e15a21 fix __dirname in windows for default plugins 2023-04-11 12:27:43 +05:30
palerdot
72ec2d3b1e desktop: add jest types for tsconfig 2023-04-11 11:48:57 +05:30
palerdot
7eddbc7002 CI: run tsc task before build task in workspaces 2023-04-11 11:35:18 +05:30
palerdot
d593ed130e fix(CI): --topological-dev for building the project
ref: https://yarnpkg.com/cli/workspaces/foreach#options-topological-dev
@joplin/tools is a devDependency for lots of packages including
app-desktop. The build fails since this dev dependency was not
built as a required dependency in node_modules of desktop
2023-04-11 11:11:02 +05:30
palerdot
b2eabb3836 running updateIgnored at root 2023-04-11 10:54:44 +05:30
palerdot
5e1c789926 chore(desktop): move gulpfile to typescript 2023-04-10 17:46:37 +05:30
palerdot
4f552b396c fix(ci): bundleDefaultPlugins task fixes 2023-04-10 15:15:59 +05:30
palerdot
132bcbd477 chore: auto newline insert for package json 2023-04-10 12:46:50 +05:30
palerdot
8f6192464b Merge remote-tracking branch 'origin/dev' into mac-binary-signing-osxsign-upgrade 2023-04-10 11:24:44 +05:30
palerdot
897addec4e gulp: bundleDefaultPlugins task for desktop 2023-04-10 10:45:17 +05:30
palerdot
51e865c467 change back to desktop directory after bundleDefaultPlugins 2023-04-07 15:50:22 +05:30
palerdot
ac8b3ae0cc Merge remote-tracking branch 'origin/mac-binary-signing-osxsign-upgrade' into mac-binary-signing-osxsign-upgrade 2023-04-07 15:04:21 +05:30
palerdot
0b3919fd62 desktop: bundleDefaultPlugins task added to dist 2023-04-07 15:02:28 +05:30
Laurent Cozic
db69125e8f Merge branch 'dev' into mac-binary-signing-osxsign-upgrade 2023-04-06 14:03:08 +02:00
Laurent Cozic
ccabc778f6 Merge branch 'dev' into mac-binary-signing-osxsign-upgrade 2023-04-06 12:13:35 +02:00
Laurent Cozic
56b9c9fbc9 Merge branch 'dev' into mac-binary-signing-osxsign-upgrade 2023-04-06 10:03:12 +02:00
Laurent Cozic
c68d196baa Merge branch 'dev' into mac-binary-signing-osxsign-upgrade 2023-04-06 09:46:37 +02:00
palerdot
897fd0f727 trying binary signing with plugin jpl path 2023-04-05 16:16:25 +05:30
palerdot
9edb402b18 fix mac app binary signing not a directory error 2023-04-05 15:38:02 +05:30
palerdot
36ae58ffe1 fix mac app binary signing by giving the directory path 2023-04-05 15:02:18 +05:30
palerdot
5ef8b86957 fix(ci): provide extraResources path for mac binary signing 2023-04-05 13:11:39 +05:30
palerdot
c7228cfcd6 fix(ci): desktop package directory navigation fix
correctly navigate to desktop directory for CI building after
building default plugins for CI
2023-04-05 12:40:02 +05:30
palerdot
7a791dbf98 Merge remote-tracking branch 'origin/dev' into mac-binary-signing-osxsign-upgrade 2023-04-05 12:23:28 +05:30
palerdot
a543588527 fix(ci): raw binary path before copying as extraResources 2023-04-05 11:39:58 +05:30
palerdot
998ad142a6 Revert "fix(ci): checking with binary path before copying as extraResources"
This reverts commit b6a53f96f7.
2023-04-05 11:39:08 +05:30
palerdot
b6a53f96f7 fix(ci): checking with binary path before copying as extraResources 2023-04-05 11:38:24 +05:30
palerdot
841a9c6e09 fix(ci): build default plugins for CI check and mac app signing 2023-04-05 11:34:35 +05:30
palerdot
d25c078ef0 fix: mac app correct extraResources path for binaries 2023-04-05 10:53:12 +05:30
palerdot
ff69ac17be include default plugins and binary path for mac signing 2023-04-04 13:17:10 +05:30
palerdot
b44945b3a0 chore: electron-builder v24 update for @electron/osx-sign 2023-04-04 12:37:25 +05:30
palerdot
2584224026 chore: upgrade to @electron/notarize namespace 2023-04-04 12:29:44 +05:30
palerdot
46136871bf chore: upgrade to @electron/rebuild namespace 2023-04-04 11:44:02 +05:30
17 changed files with 294 additions and 398 deletions

View File

@@ -330,6 +330,7 @@ packages/app-desktop/gui/style/StyledTextInput.js
packages/app-desktop/gui/utils/NoteListUtils.js
packages/app-desktop/gui/utils/convertToScreenCoordinates.js
packages/app-desktop/gui/utils/loadScript.js
packages/app-desktop/gulpfile.js
packages/app-desktop/plugins/GotoAnything.js
packages/app-desktop/services/bridge.js
packages/app-desktop/services/commands/stateToWhenClauseContext.js

View File

@@ -180,9 +180,6 @@ cd "$ROOT_DIR/packages/app-desktop"
if [[ $GIT_TAG_NAME = v* ]]; then
echo "Step: Building and publishing desktop application..."
# cd "$ROOT_DIR/packages/tools"
# node bundleDefaultPlugins.js
cd "$ROOT_DIR/packages/app-desktop"
USE_HARD_LINKS=false yarn run dist
elif [[ $IS_LINUX = 1 ]] && [[ $GIT_TAG_NAME = $SERVER_TAG_PREFIX-* ]]; then
echo "Step: Building Docker Image..."

1
.gitignore vendored
View File

@@ -317,6 +317,7 @@ packages/app-desktop/gui/style/StyledTextInput.js
packages/app-desktop/gui/utils/NoteListUtils.js
packages/app-desktop/gui/utils/convertToScreenCoordinates.js
packages/app-desktop/gui/utils/loadScript.js
packages/app-desktop/gulpfile.js
packages/app-desktop/plugins/GotoAnything.js
packages/app-desktop/services/bridge.js
packages/app-desktop/services/commands/stateToWhenClauseContext.js

View File

@@ -1,30 +0,0 @@
diff --git a/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java b/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java
index a8abd71833879201e3438b2fa51d712a311c4551..ffe9c2c6dfa5c703ba76b65d94d5dd6784102c19 100644
--- a/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java
+++ b/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java
@@ -591,7 +591,7 @@ public class RNFetchBlobReq extends BroadcastReceiver implements Runnable {
// ignored.printStackTrace();
}
- RNFetchBlobFileResp rnFetchBlobFileResp = (RNFetchBlobFileResp) responseBody;
+ RNFetchBlobFileResp rnFetchBlobFileResp = new RNFetchBlobFileResp(responseBody);
if(rnFetchBlobFileResp != null && !rnFetchBlobFileResp.isDownloadComplete()){
callback.invoke("Download interrupted.", null);
diff --git a/android/src/main/java/com/RNFetchBlob/Response/RNFetchBlobFileResp.java b/android/src/main/java/com/RNFetchBlob/Response/RNFetchBlobFileResp.java
index 2470eef612308c15a89dfea5a1f16937469be29f..965f8becc195965907699182c764ec9e51811450 100644
--- a/android/src/main/java/com/RNFetchBlob/Response/RNFetchBlobFileResp.java
+++ b/android/src/main/java/com/RNFetchBlob/Response/RNFetchBlobFileResp.java
@@ -35,6 +35,12 @@ public class RNFetchBlobFileResp extends ResponseBody {
FileOutputStream ofStream;
boolean isEndMarkerReceived;
+ // ref: https://github.com/joltup/rn-fetch-blob/issues/490#issuecomment-990899440
+ public RNFetchBlobFileResp(ResponseBody body) {
+ super();
+ this.originalBody = body;
+ }
+
public RNFetchBlobFileResp(ReactApplicationContext ctx, String taskId, ResponseBody body, String path, boolean overwrite) throws IOException {
super();
this.rctContext = ctx;

View File

@@ -13,7 +13,7 @@
},
"scripts": {
"buildParallel": "yarn workspaces foreach --verbose --interlaced --parallel --jobs 2 --topological run build && yarn run tsc",
"buildSequential": "yarn workspaces foreach --verbose --interlaced --topological run build && yarn run tsc",
"buildSequential": "yarn run tsc && yarn workspaces foreach --verbose --interlaced --topological-dev run build",
"buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md",
"buildCommandIndex": "node packages/tools/gulp/tasks/buildCommandIndexRun.js",
"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/",
@@ -95,7 +95,6 @@
},
"packageManager": "yarn@3.3.1",
"resolutions": {
"react-native-camera@4.2.1": "patch:react-native-camera@npm%3A4.2.1#./.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch",
"rn-fetch-blob@0.12.0": "patch:rn-fetch-blob@npm%3A0.12.0#./.yarn/patches/rn-fetch-blob-npm-0.12.0-cf02e3c544.patch"
"react-native-camera@4.2.1": "patch:react-native-camera@npm%3A4.2.1#./.yarn/patches/react-native-camera-npm-4.2.1-24b2600a7e.patch"
}
}

View File

@@ -2,6 +2,7 @@ const gulp = require('gulp');
const utils = require('@joplin/tools/gulp/utils');
const compileSass = require('@joplin/tools/compileSass');
const compilePackageInfo = require('@joplin/tools/compilePackageInfo');
const bundleDefaultPlugins = require('@joplin/tools/bundleDefaultPlugins');
const tasks = {
compileScripts: {
@@ -35,6 +36,11 @@ const tasks = {
);
},
},
bundleDefaultPlugins: {
fn: async () => {
await bundleDefaultPlugins();
},
},
};
utils.registerGulpTasks(gulp, tasks);

View File

@@ -5,7 +5,8 @@
"main": "main.js",
"private": true,
"scripts": {
"dist": "yarn run electronRebuild && npx electron-builder",
"dist": "yarn run bundleDefaultPlugins && yarn run electronRebuild && npx electron-builder",
"bundleDefaultPlugins": "gulp bundleDefaultPlugins",
"build": "gulp build",
"postinstall": "yarn run build",
"electronBuilder": "gulp electronBuilder",
@@ -90,7 +91,10 @@
"CFBundleURLName": "org.joplinapp.x-callback-url"
}
]
}
},
"binaries": [
"Contents/Resources/build/defaultPlugins/io.github.jackgruber.backup/plugin.jpl"
]
},
"linux": {
"icon": "../../Assets/LinuxIcons",
@@ -107,6 +111,8 @@
},
"homepage": "https://github.com/laurent22/joplin#readme",
"devDependencies": {
"@electron/notarize": "1.2.3",
"@electron/rebuild": "3.2.10",
"@joplin/tools": "~2.11",
"@testing-library/react-hooks": "8.0.1",
"@types/jest": "29.2.6",
@@ -115,9 +121,7 @@
"@types/react-redux": "7.1.25",
"@types/styled-components": "5.1.26",
"electron": "19.1.4",
"electron-builder": "23.6.0",
"electron-notarize": "1.2.2",
"electron-rebuild": "3.2.9",
"electron-builder": "24.1.2",
"glob": "8.1.0",
"gulp": "4.0.2",
"jest": "29.4.3",
@@ -125,6 +129,7 @@
"js-sha512": "0.8.0",
"nan": "2.17.0",
"react-test-renderer": "18.2.0",
"ts-node": "^10.9.1",
"typescript": "4.9.4"
},
"optionalDependencies": {

View File

@@ -1,6 +1,6 @@
const fs = require('fs');
const path = require('path');
const electron_notarize = require('electron-notarize');
const electron_notarize = require('@electron/notarize');
const execCommand = require('./execCommand');
function isDesktopAppTag(tagName) {

View File

@@ -1,11 +1,18 @@
{
"extends": "../../tsconfig.json",
"include": [
"**/*.ts",
"**/*.tsx",
"include": [
"**/*.ts",
"**/*.tsx",
],
"exclude": [
"**/node_modules",
"**/dist",
"gulpfile.ts",
],
"compilerOptions": {
"types": [
"jest",
"node"
]
}
}

View File

@@ -54,7 +54,7 @@
"react-native-image-picker": "5.3.1",
"react-native-image-resizer": "1.4.5",
"react-native-modal-datetime-picker": "14.0.1",
"react-native-paper": "5.5.2",
"react-native-paper": "5.4.1",
"react-native-popup-menu": "0.16.1",
"react-native-quick-actions": "0.3.13",
"react-native-rsa-native": "2.0.5",

View File

@@ -1,4 +1,4 @@
import { join } from 'path';
import { join, normalize } from 'path';
import { pathExists, mkdir, readFile, move, remove, writeFile } from 'fs-extra';
import { DefaultPluginsInfo } from '@joplin/lib/services/plugins/PluginService';
import getDefaultPluginsInfo from '@joplin/lib/services/plugins/defaultPlugins/desktopDefaultPluginsInfo';
@@ -41,7 +41,7 @@ async function downloadFile(url: string, outputPath: string) {
export async function extractPlugins(currentDir: string, defaultPluginDir: string, downloadedPluginsNames: PluginIdAndName): Promise<void> {
for (const pluginId of Object.keys(downloadedPluginsNames)) {
await execCommand(`tar xzf ${currentDir}/${downloadedPluginsNames[pluginId]}`, { quiet: true });
await execCommand(`tar xzf ${currentDir}/${downloadedPluginsNames[pluginId]}`, { quiet: true, splitCommandOptions: { handleEscape: false } });
await move(`package/publish/${pluginId}.jpl`, `${defaultPluginDir}/${pluginId}/plugin.jpl`, { overwrite: true });
await move(`package/publish/${pluginId}.json`, `${defaultPluginDir}/${pluginId}/manifest.json`, { overwrite: true });
await remove(`${downloadedPluginsNames[pluginId]}`);
@@ -74,7 +74,10 @@ export const downloadPlugins = async (localPluginsVersions: PluginAndVersion, de
};
async function start(): Promise<void> {
const defaultPluginDir = join(__dirname, '..', '..', 'packages', 'app-desktop', 'build', 'defaultPlugins');
// windows CI fix: normalizing __dirname for windows
const cwd = normalize(__dirname);
process.chdir(cwd);
const defaultPluginDir = join(cwd, '..', '..', 'packages', 'app-desktop', 'build', 'defaultPlugins');
const defaultPluginsInfo = getDefaultPluginsInfo();
const manifestData = await fetch('https://raw.githubusercontent.com/joplin/plugins/master/manifests.json');
@@ -83,7 +86,7 @@ async function start(): Promise<void> {
const localPluginsVersions = await localPluginsVersion(defaultPluginDir, defaultPluginsInfo);
const downloadedPluginNames: PluginIdAndName = await downloadPlugins(localPluginsVersions, defaultPluginsInfo, manifests);
await extractPlugins(__dirname, defaultPluginDir, downloadedPluginNames);
await extractPlugins(cwd, defaultPluginDir, downloadedPluginNames);
}
if (require.main === module) {
@@ -94,3 +97,7 @@ if (require.main === module) {
process.exit(1);
});
}
module.exports = async () => {
await start();
};

View File

@@ -1,6 +1,6 @@
import * as execa from 'execa';
import commandToString from './commandToString';
import splitCommandString from './splitCommandString';
import splitCommandString, { SplitCommandOptions } from './splitCommandString';
import { stdout } from 'process';
interface ExecCommandOptions {
@@ -8,6 +8,7 @@ interface ExecCommandOptions {
showStdout?: boolean;
showStderr?: boolean;
quiet?: boolean;
splitCommandOptions?: SplitCommandOptions | null;
}
export default async (command: string | string[], options: ExecCommandOptions | null = null): Promise<string> => {
@@ -33,7 +34,7 @@ export default async (command: string | string[], options: ExecCommandOptions |
}
}
const args: string[] = typeof command === 'string' ? splitCommandString(command) : command as string[];
const args: string[] = typeof command === 'string' ? splitCommandString(command, options.splitCommandOptions || null) : command as string[];
const executableName = args[0];
args.splice(0, 1);
const promise = execa(executableName, args);

View File

@@ -1,3 +1,7 @@
export interface SplitCommandOptions {
handleEscape?: boolean;
}
export default (command: string, options: any = null) => {
options = options || {};
if (!('handleEscape' in options)) {

View File

@@ -439,14 +439,6 @@
"created_at": "2023-04-10T02:33:42Z",
"repoId": 79162682,
"pullRequestNo": 8036
},
{
"name": "simonla",
"id": 14934570,
"comment_id": 1503950257,
"created_at": "2023-04-11T19:02:23Z",
"repoId": 79162682,
"pullRequestNo": 8042
}
]
}

View File

@@ -741,7 +741,7 @@ The following commands are available in [command-line mode](#command-line-mode):
# License
Copyright (c) 2016-2023 Laurent Cozic
Copyright (c) 2016-2021 Laurent Cozic
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

View File

@@ -4,13 +4,13 @@
"config:base"
],
"major": {
"stabilityDays": 80,
"stabilityDays": 30,
},
"minor": {
"stabilityDays": 40,
"stabilityDays": 20,
},
"patch": {
"stabilityDays": 20,
"stabilityDays": 10,
},
"prConcurrentLimit": 5,
"prHourlyLimit": 0,

574
yarn.lock

File diff suppressed because it is too large Load Diff