From dc232e29bb4061ca2802040bf68b70e1be9cbc7f Mon Sep 17 00:00:00 2001 From: Spocke Date: Tue, 31 Oct 2023 09:46:12 +0100 Subject: [PATCH] TINY-10275: Removed clipboard effects --- CHANGELOG.md | 6 ++- .../src/test/ts/client/ClipboardTest.ts | 38 ------------------ modules/server/bin/wink.exe | Bin 8192 -> 0 bytes .../server/src/main/ts/bedrock/server/Apis.ts | 3 -- .../ts/bedrock/server/ClipboardEffects.ts | 35 ---------------- 5 files changed, 4 insertions(+), 78 deletions(-) delete mode 100644 modules/sample/src/test/ts/client/ClipboardTest.ts delete mode 100644 modules/server/bin/wink.exe delete mode 100644 modules/server/src/main/ts/bedrock/server/ClipboardEffects.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index c79a9898..088ee491 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,10 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -## 13.6.0 - 2023-10-16 +### Removed +- Removed `/clipboard` effects. #TINY-10275 -## Improved +## 13.6.0 - 2023-10-16 +### Improved - Urls like `/project/node_modules` and `/project//node_modules` are now using node package resolve to serve files. #TINY-10281 ## 13.5.0 - 2023-07-11 diff --git a/modules/sample/src/test/ts/client/ClipboardTest.ts b/modules/sample/src/test/ts/client/ClipboardTest.ts deleted file mode 100644 index 873babe1..00000000 --- a/modules/sample/src/test/ts/client/ClipboardTest.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { UnitTest } from '@ephox/bedrock-client'; - -import { post, sendKeyCombo } from '../utils/Utils'; - -UnitTest.asynctest('Clipboard Test', (success, failure) => { - const importClipboard = function (fileName: string) { - return post('/clipboard', { import: fileName }); - }; - - const pasteInto = function (elm) { - return sendKeyCombo('#' + elm.id, 'v', { ctrlKey: true }); - }; - - const assert = function () { - return new Promise(function (done) { - setTimeout(function () { - alert(body.innerHTML); - done(); - }, 1000); - }); - }; - - const body = document.createElement('div'); - body.id = 'test'; - body.contentEditable = 'true'; - document.body.appendChild(body); - - importClipboard('word.zip') - .then(pasteInto(body) as any) - .then(assert) - .then(function () { - success(); - }) - .catch(function (ex) { - console.log('parsing failed', ex); - failure(ex); - }); -}); diff --git a/modules/server/bin/wink.exe b/modules/server/bin/wink.exe deleted file mode 100644 index 8f2de552152435f9439768988f5a1efa2916f1bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8192 zcmeHLeQX@Zb$`3J_bKVDBPmKWNoRGE)ssjbKP8B=XpFM zMeR23@6GOgkhEq0opi|i&6_uG-n{qbdrv?5EQN?j!|&a9iN1}T)40UD!y2lSANfv_ zz8QaQ_qUZ(ukD^&GF`pm*o%%))(eJZ*`A&kx>L1u)6%DAX7#dN6xnUt5_<#HXQzoy zDIt2h{p5vOZ?BW8Y*DrlwSyD$xyggbb^ONhW6+VQzTKcG!oX<_Kkzw)=+aX}+vR^F z4~o7B{rL#d4AbNI4+qTV>=Mydlz)4esH>U(L9|{sT}sAKKH1bJ>xmT)<+dFF)Jb0h zyHS!!C%Tk%T&IANv~3&&JGu+MrZkS~tRqS`1ld-)gdgj=55J}~PIRoPD9N|rKPR?L zr7(?PV9wsdu~SKD3ab?Q5YRcGQ5+5NpHiPO+Xq5zJt4LIW&(wseqra$Es^_M!=s;q zx>VSKWF^x=l<2z;rD(l0fYP>l>7kx^)-V{0W-wJFJ&8;!nq)9yk@i;YpZ<`|59$#i zu5aUdsN?!OPi7G3gpCQ6uy=9=LYUwRBZELi_U!;Uzt4frN;K2K0$3E0eRsz9IS*~* z^=^&!#bWlokm_l7Zg92pD$r+TI>Fx-58Bg?11aqQj8ifkynE@3FHsxj5u67718VE8 z(LbhMv{XU^3N5fGlJk9N%|JTgyi=#{QEEIuGZB$tzLSXbMk2Nj&QA`If@P&*amKb&f^F>_2+{8$ zN7z!=c0`9S}`Eeo~cwM6}`DN8nZFs5U<|8xP3n;cORft zOKJ9RFcFT#QehjhOWfI-(t4xdO9N8TogZ(FrlP6HGv?4Y?MMYc@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}zm;ERESQ-aIS{D{B#&|}JrO(eD?>n5($Ol*&9^pdRdqbjXiI6BADr&lK`m6C}k8eS|}qf$xt`x-o_>UueA!Tyl;45ei|^zGu+ zi09vGPzJ{lSE{g66!8sZ8Sk(~;eJT1!!@lsQbSMhGPN!FTG31VW*JKxF5Z*&W#Odt zsyR`>Cjo?U!6>;Ra7rrae-CSFruVP2{b+wZ2oN~hUmGD5c(i{75;h|KhQA%3`u{)u I`bFUX0P0hI=>Px# diff --git a/modules/server/src/main/ts/bedrock/server/Apis.ts b/modules/server/src/main/ts/bedrock/server/Apis.ts index 3a221295..70cb64c3 100644 --- a/modules/server/src/main/ts/bedrock/server/Apis.ts +++ b/modules/server/src/main/ts/bedrock/server/Apis.ts @@ -3,7 +3,6 @@ import { Browser } from 'webdriverio'; import { Attempt } from '../core/Attempt'; import * as Coverage from '../core/Coverage'; import * as Waiter from '../util/Waiter'; -import * as ClipboardEffects from './ClipboardEffects'; import * as Controller from './Controller'; import { DriverMaster } from './DriverMaster'; import * as KeyEffects from './KeyEffects'; @@ -137,8 +136,6 @@ export const create = (master: DriverMaster | null, maybeDriver: Attempt" - } - */ -export interface ClipboardData { - readonly import: string; -} - -const importClipboard = (basedir: string, clipboarddir: string, data: ClipboardData): Promise => { - const fileName = data.import; - const fullPath = path.join(clipboarddir, fileName); - const args = [ - path.join(basedir, 'bin/wink.exe'), - '-i ' + fullPath - ]; - - const result = childProcess.execSync(args.join(' ')); - if (result.length > 0) { - console.error(result); - process.exit(ExitCodes.failures.wink); - } - - return Promise.resolve(); -}; - -export const route = (basedir: string, clipboarddir: string) => { - return (data: ClipboardData): Promise => { - return importClipboard(basedir, clipboarddir, data); - }; -};