diff --git a/README.md b/README.md index 32819ef9..d4490194 100644 --- a/README.md +++ b/README.md @@ -1206,7 +1206,7 @@ sync folders to/from copyparty the commandline uploader [up2k.py](https://github.com/9001/copyparty/tree/hovudstraum/bin#up2kpy) with `--dr` is the best way to sync a folder to copyparty; verifies checksums and does files in parallel, and deletes unexpected files on the server after upload has finished which makes file-renames really cheap (it'll rename serverside and skip uploading) -alternatively there is [rclone](./docs/rclone.md) which allows for bidirectional sync and is *way* more flexible (stream files straight from sftp/s3/gcs to copyparty for instance), although there is no integrity check and it won't work with files over 100 MiB if copyparty is behind cloudflare +alternatively there is [rclone](./docs/rclone.md) which allows for bidirectional sync and is *way* more flexible (stream files straight from sftp/s3/gcs to copyparty, ...), although there is no integrity check and it won't work with files over 100 MiB if copyparty is behind cloudflare * starting from rclone v1.63 (currently [in beta](https://beta.rclone.org/?filter=latest)), rclone will also be faster than up2k.py @@ -1217,7 +1217,7 @@ a remote copyparty server as a local filesystem; go to the control-panel and cl alternatively, some alternatives roughly sorted by speed (unreproducible benchmark), best first: -* [rclone-webdav](./docs/rclone.md) (25s), read/WRITE ((v1.63-beta)[https://beta.rclone.org/?filter=latest]) +* [rclone-webdav](./docs/rclone.md) (25s), read/WRITE ([v1.63-beta](https://beta.rclone.org/?filter=latest)) * [rclone-http](./docs/rclone.md) (26s), read-only * [partyfuse.py](./bin/#partyfusepy) (35s), read-only * [rclone-ftp](./docs/rclone.md) (47s), read/WRITE diff --git a/scripts/deps-docker/Dockerfile b/scripts/deps-docker/Dockerfile index 14fa6c66..b65e85ad 100644 --- a/scripts/deps-docker/Dockerfile +++ b/scripts/deps-docker/Dockerfile @@ -3,12 +3,20 @@ FROM alpine:3.16 WORKDIR /z ENV ver_asmcrypto=c72492f4a66e17a0e5dd8ad7874de354f3ccdaa5 \ ver_hashwasm=4.9.0 \ - ver_marked=4.2.5 \ + ver_marked=4.3.0 \ ver_mde=2.18.0 \ - ver_codemirror=5.65.11 \ + ver_codemirror=5.65.12 \ ver_fontawesome=5.13.0 \ ver_zopfli=1.0.3 +# versioncheck: +# https://github.com/markedjs/marked/releases +# https://github.com/Ionaru/easy-markdown-editor/tags +# https://github.com/codemirror/codemirror5/releases +# https://github.com/Daninet/hash-wasm/releases +# https://github.com/openpgpjs/asmcrypto.js +# https://github.com/google/zopfli/tags + # download; # the scp url is regular latin from https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap diff --git a/scripts/deps-docker/Makefile b/scripts/deps-docker/Makefile index e24eee9f..ab3d96a9 100644 --- a/scripts/deps-docker/Makefile +++ b/scripts/deps-docker/Makefile @@ -1,10 +1,9 @@ self := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) vend := $(self)/../../copyparty/web/deps +# prefers podman-docker (optionally rootless) over actual docker/moby + all: - -service docker start - -systemctl start docker - docker build -t build-copyparty-deps . rm -rf $(vend) diff --git a/scripts/deps-docker/marked-ln.patch b/scripts/deps-docker/marked-ln.patch index 65a78be2..fa01028b 100644 --- a/scripts/deps-docker/marked-ln.patch +++ b/scripts/deps-docker/marked-ln.patch @@ -1,5 +1,5 @@ diff --git a/src/Lexer.js b/src/Lexer.js -adds linetracking to marked.js v4.2.3; +adds linetracking to marked.js v4.3.0; add data-ln="%d" to most tags, %d is the source markdown line --- a/src/Lexer.js +++ b/src/Lexer.js @@ -206,7 +206,6 @@ index a22a2bc..884ad66 100644 // Run any renderer extensions if (this.options.extensions && this.options.extensions.renderers && this.options.extensions.renderers[token.type]) { diff --git a/src/Renderer.js b/src/Renderer.js -index 7c36a75..aa1a53a 100644 --- a/src/Renderer.js +++ b/src/Renderer.js @@ -11,6 +11,12 @@ export class Renderer { @@ -290,10 +289,9 @@ index 7c36a75..aa1a53a 100644 if (title) { out += ` title="${title}"`; diff --git a/src/Tokenizer.js b/src/Tokenizer.js -index e8a69b6..2cc772b 100644 --- a/src/Tokenizer.js +++ b/src/Tokenizer.js -@@ -312,4 +312,7 @@ export class Tokenizer { +@@ -333,4 +333,7 @@ export class Tokenizer { const l = list.items.length; + // each nested list gets +1 ahead; this hack makes every listgroup -1 but atleast it doesn't get infinitely bad diff --git a/scripts/deps-docker/marked.patch b/scripts/deps-docker/marked.patch index f4e5747e..66871c9c 100644 --- a/scripts/deps-docker/marked.patch +++ b/scripts/deps-docker/marked.patch @@ -1,4 +1,5 @@ diff --git a/src/Lexer.js b/src/Lexer.js +strip some features --- a/src/Lexer.js +++ b/src/Lexer.js @@ -7,5 +7,5 @@ import { repeatString } from './helpers.js'; @@ -56,7 +57,7 @@ diff --git a/src/Renderer.js b/src/Renderer.js diff --git a/src/Tokenizer.js b/src/Tokenizer.js --- a/src/Tokenizer.js +++ b/src/Tokenizer.js -@@ -352,14 +352,7 @@ export class Tokenizer { +@@ -367,14 +367,7 @@ export class Tokenizer { type: 'html', raw: cap[0], - pre: !this.options.sanitizer @@ -72,7 +73,7 @@ diff --git a/src/Tokenizer.js b/src/Tokenizer.js - } return token; } -@@ -502,15 +495,9 @@ export class Tokenizer { +@@ -517,15 +510,9 @@ export class Tokenizer { return { - type: this.options.sanitize @@ -90,7 +91,7 @@ diff --git a/src/Tokenizer.js b/src/Tokenizer.js + text: cap[0] }; } -@@ -699,10 +686,10 @@ export class Tokenizer { +@@ -714,10 +701,10 @@ export class Tokenizer { } - autolink(src, mangle) { @@ -103,7 +104,7 @@ diff --git a/src/Tokenizer.js b/src/Tokenizer.js + text = escape(cap[1]); href = 'mailto:' + text; } else { -@@ -727,10 +714,10 @@ export class Tokenizer { +@@ -742,10 +729,10 @@ export class Tokenizer { } - url(src, mangle) { @@ -116,7 +117,7 @@ diff --git a/src/Tokenizer.js b/src/Tokenizer.js + text = escape(cap[0]); href = 'mailto:' + text; } else { -@@ -764,12 +751,12 @@ export class Tokenizer { +@@ -779,12 +766,12 @@ export class Tokenizer { } - inlineText(src, smartypants) { @@ -135,8 +136,8 @@ diff --git a/src/Tokenizer.js b/src/Tokenizer.js diff --git a/src/defaults.js b/src/defaults.js --- a/src/defaults.js +++ b/src/defaults.js -@@ -10,11 +10,7 @@ export function getDefaults() { - highlight: null, +@@ -11,11 +11,7 @@ export function getDefaults() { + hooks: null, langPrefix: 'language-', - mangle: true, pedantic: false, @@ -170,7 +171,7 @@ diff --git a/src/helpers.js b/src/helpers.js +export function cleanUrl(base, href) { if (base && !originIndependentUrl.test(href)) { href = resolveUrl(base, href); -@@ -250,10 +237,4 @@ export function findClosingBracket(str, b) { +@@ -233,10 +220,4 @@ export function findClosingBracket(str, b) { } -export function checkSanitizeDeprecation(opt) { @@ -185,30 +186,25 @@ diff --git a/src/marked.js b/src/marked.js --- a/src/marked.js +++ b/src/marked.js @@ -7,5 +7,4 @@ import { Slugger } from './Slugger.js'; + import { Hooks } from './Hooks.js'; import { - merge, - checkSanitizeDeprecation, escape } from './helpers.js'; -@@ -35,5 +34,4 @@ export function marked(src, opt, callback) { - - opt = merge({}, marked.defaults, opt || {}); -- checkSanitizeDeprecation(opt); - - if (callback) { -@@ -318,5 +316,4 @@ marked.parseInline = function(src, opt) { - - opt = merge({}, marked.defaults, opt || {}); -- checkSanitizeDeprecation(opt); - - try { -@@ -327,5 +324,5 @@ marked.parseInline = function(src, opt) { - return Parser.parseInline(tokens, opt); - } catch (e) { +@@ -18,5 +17,5 @@ import { + function onError(silent, async, callback) { + return (e) => { - e.message += '\nPlease report this to https://github.com/markedjs/marked.'; + e.message += '\nmake issue @ https://github.com/9001/copyparty'; - if (opt.silent) { - return '

An error occurred:

'
+ 
+     if (silent) {
+@@ -65,6 +64,4 @@ function parseMarkdown(lexer, parser) {
+     }
+ 
+-    checkSanitizeDeprecation(opt);
+-
+     if (opt.hooks) {
+       opt.hooks.options = opt;
 diff --git a/test/bench.js b/test/bench.js
 --- a/test/bench.js
 +++ b/test/bench.js
@@ -250,70 +246,70 @@ diff --git a/test/specs/run-spec.js b/test/specs/run-spec.js
 diff --git a/test/unit/Lexer-spec.js b/test/unit/Lexer-spec.js
 --- a/test/unit/Lexer-spec.js
 +++ b/test/unit/Lexer-spec.js
-@@ -712,5 +712,5 @@ paragraph
+@@ -794,5 +794,5 @@ paragraph
      });
  
 -    it('sanitize', () => {
 +    /*it('sanitize', () => {
        expectTokens({
          md: '
html
', -@@ -730,5 +730,5 @@ paragraph +@@ -812,5 +812,5 @@ paragraph ] }); - }); + });*/ }); -@@ -810,5 +810,5 @@ paragraph +@@ -892,5 +892,5 @@ paragraph }); - it('html sanitize', () => { + /*it('html sanitize', () => { expectInlineTokens({ md: '
html
', -@@ -818,5 +818,5 @@ paragraph +@@ -900,5 +900,5 @@ paragraph ] }); - }); + });*/ it('link', () => { -@@ -1129,5 +1129,5 @@ paragraph +@@ -1211,5 +1211,5 @@ paragraph }); - it('autolink mangle email', () => { + /*it('autolink mangle email', () => { expectInlineTokens({ md: '', -@@ -1149,5 +1149,5 @@ paragraph +@@ -1231,5 +1231,5 @@ paragraph ] }); - }); + });*/ it('url', () => { -@@ -1186,5 +1186,5 @@ paragraph +@@ -1268,5 +1268,5 @@ paragraph }); - it('url mangle email', () => { + /*it('url mangle email', () => { expectInlineTokens({ md: 'test@example.com', -@@ -1206,5 +1206,5 @@ paragraph +@@ -1288,5 +1288,5 @@ paragraph ] }); - }); + });*/ }); -@@ -1222,5 +1222,5 @@ paragraph +@@ -1304,5 +1304,5 @@ paragraph }); - describe('smartypants', () => { + /*describe('smartypants', () => { it('single quotes', () => { expectInlineTokens({ -@@ -1292,5 +1292,5 @@ paragraph +@@ -1374,5 +1374,5 @@ paragraph }); }); - }); diff --git a/scripts/pyinstaller/deps.sha512 b/scripts/pyinstaller/deps.sha512 index fd153a08..0eea55de 100644 --- a/scripts/pyinstaller/deps.sha512 +++ b/scripts/pyinstaller/deps.sha512 @@ -26,5 +26,5 @@ ba91ab0518c61eff13e5612d9e6b532940813f6b56e6ed81ea6c7c4d45acee4d98136a383a250675 00558cca2e0ac813d404252f6e5aeacb50546822ecb5d0570228b8ddd29d94e059fbeb6b90393dee5abcddaca1370aca784dc9b095cbb74e980b3c024767fb24 Jinja2-3.1.2-py3-none-any.whl b1db6f5a79fc15391547643e5973cf5946c0acfa6febb68bc90fc3f66369681100cc100f32dd04256dcefa510e7864c718515a436a4af3a10fe205c413c7e693 MarkupSafe-2.1.2-cp311-cp311-win_amd64.whl 4a20aeb52d4fde6aabcba05ee261595eeb5482c72ee27332690f34dd6e7a49c0b3ba3813202ac15c9d21e29f1cd803f2e79ccc1c45ec314fcd0a937016bcbc56 mutagen-1.46.0-py3-none-any.whl -ea152624499966615ee74f2aefed27da528785e1215f46d61e79c5290bb8105fd98e9948938efbca9cd19e2f1dd48c9e712b4f30a4148a0ed5d1ff2dff77106e Pillow-9.4.0-cp311-cp311-win_amd64.whl +78414808cb9a5fa74e7b23360b8f46147952530e3cc78a3ad4b80be3e26598080537ac691a1be1f35b7428a22c1f65a6adf45986da2752fbe9d9819d77a58bf8 Pillow-9.5.0-cp311-cp311-win_amd64.whl 2b04b196f1115f42375e623a35edeb71565dfd090416b22510ec0270fefe86f7d397a98aabbe9ebfe3f6a355fe25c487a4875d4252027d0a61ccb64cacd7631d python-3.11.2-amd64.exe