From a91fe1db91b76ae260d430e3df0027663ffa3354 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 14 Mar 2022 13:43:18 -0500 Subject: [PATCH 01/23] configureStore: typescript conversion --- app/soapbox/store/configureStore.js | Bin 497 -> 0 bytes app/soapbox/store/configureStore.ts | 20 ++++++++++++++++++++ package.json | 2 ++ yarn.lock | 24 +++++++++++++++++++++++- 4 files changed, 45 insertions(+), 1 deletion(-) delete mode 100644 app/soapbox/store/configureStore.js create mode 100644 app/soapbox/store/configureStore.ts diff --git a/app/soapbox/store/configureStore.js b/app/soapbox/store/configureStore.js deleted file mode 100644 index 2c094c4a40b40f7cfcad902f224594b1b05b269e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 497 zcma)2K~BRk5WMFVduuF(^iBm_ngbFvQd3ZGRur$nBC(^5trS)LJ5CIB)eF6?W@mP1 zMs>X*3rA=OYm1dNgc;O*-+sR;AzB>k322Px4G1TYWI9+73U^qn5*6h3)9J6v)!mGE z!XE>P3=Q$*FFDVb-TBQjkmA|FI4%AY1yU4w?_2M#L5e>nyB-)OLwJ}I3zW5MEl8&u ztBm#$wNxLDLI){>V*)^E9r;}>Cyn>dwM^J$U#V9D%oSwwc%43F0ly9yaF)TSv@m1N q`L Date: Mon, 14 Mar 2022 18:01:09 -0500 Subject: [PATCH 02/23] soapbox/store/configureStore --> soapbox/store, add custom Hooks --- app/soapbox/containers/soapbox.js | Bin 7764 -> 7704 bytes app/soapbox/hooks/index.ts | 1 + app/soapbox/hooks/useAppSelector.ts | 5 +++++ app/soapbox/store.ts | 23 +++++++++++++++++++++++ app/soapbox/store/configureStore.ts | 20 -------------------- 5 files changed, 29 insertions(+), 20 deletions(-) create mode 100644 app/soapbox/hooks/index.ts create mode 100644 app/soapbox/hooks/useAppSelector.ts create mode 100644 app/soapbox/store.ts delete mode 100644 app/soapbox/store/configureStore.ts diff --git a/app/soapbox/containers/soapbox.js b/app/soapbox/containers/soapbox.js index 7f18e8b6143ec8755ed7d03f13f695dd317408aa..b3b07b9be54e7dc40a778206f786c2104d78a50e 100644 GIT binary patch delta 38 tcmca&Gs9+sHmgXrLUBocQK~|%LRwLNu7bLro__J>VAe9m%^%s4#Q_E&4E+EA delta 96 zcmbPXbH!$ZHmgQ*eqLH;dTCK=a7lhqszO>(ey)PLo}PX&h^vo~-E7ZV#;BTFQIKC$ aq5u>wE>Qq0QLqK^kc`mK+`Ne`O&kEVDkC8P diff --git a/app/soapbox/hooks/index.ts b/app/soapbox/hooks/index.ts new file mode 100644 index 0000000000..88f47b4344 --- /dev/null +++ b/app/soapbox/hooks/index.ts @@ -0,0 +1 @@ +export { useAppSelector } from './useAppSelector'; diff --git a/app/soapbox/hooks/useAppSelector.ts b/app/soapbox/hooks/useAppSelector.ts new file mode 100644 index 0000000000..5769900796 --- /dev/null +++ b/app/soapbox/hooks/useAppSelector.ts @@ -0,0 +1,5 @@ +import { TypedUseSelectorHook, useSelector } from 'react-redux'; + +import { RootState } from 'soapbox/store'; + +export const useAppSelector: TypedUseSelectorHook = useSelector; diff --git a/app/soapbox/store.ts b/app/soapbox/store.ts new file mode 100644 index 0000000000..4b34e45e24 --- /dev/null +++ b/app/soapbox/store.ts @@ -0,0 +1,23 @@ +import { composeWithDevTools } from '@redux-devtools/extension'; +import { createStore, applyMiddleware } from 'redux'; +import thunk from 'redux-thunk'; + +import errorsMiddleware from './middleware/errors'; +import soundsMiddleware from './middleware/sounds'; +import appReducer from './reducers'; + +export const store = createStore( + appReducer, + composeWithDevTools( + applyMiddleware( + thunk, + errorsMiddleware(), + soundsMiddleware(), + ), + ), +); + +// Infer the `RootState` and `AppDispatch` types from the store itself +// https://redux.js.org/usage/usage-with-typescript +export type RootState = ReturnType; +export type AppDispatch = typeof store.dispatch; diff --git a/app/soapbox/store/configureStore.ts b/app/soapbox/store/configureStore.ts deleted file mode 100644 index aee34e9195..0000000000 --- a/app/soapbox/store/configureStore.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { composeWithDevTools } from '@redux-devtools/extension'; -import { createStore, applyMiddleware } from 'redux'; -import thunk from 'redux-thunk'; - -import errorsMiddleware from '../middleware/errors'; -import soundsMiddleware from '../middleware/sounds'; -import appReducer from '../reducers'; - -export default function configureStore() { - return createStore( - appReducer, - composeWithDevTools( - applyMiddleware( - thunk, - errorsMiddleware(), - soundsMiddleware(), - ), - ), - ); -} From b2a8f3c1bc5189f12956c3fe4f282ae71c2043d4 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 14 Mar 2022 18:06:42 -0500 Subject: [PATCH 03/23] api: convert to typescript --- app/soapbox/{api.js => api.ts} | Bin 2545 -> 2764 bytes 1 file changed, 0 insertions(+), 0 deletions(-) rename app/soapbox/{api.js => api.ts} (68%) diff --git a/app/soapbox/api.js b/app/soapbox/api.ts similarity index 68% rename from app/soapbox/api.js rename to app/soapbox/api.ts index 13ee071861f043e9f7d602236b814dcd1b6e1ec9..6de6462bcd4d3aea6cc1de5d047a7b7519cd8fb3 100644 GIT binary patch delta 616 zcmaJ;O-lkn7-q8%l!zbgH8;9Vc{_X1V7C@P8iI`V40^)M@m>Ny9&iI2&3G2^3Cr|0D9+4^aWgovcF_>d29|=mPN^M<3Y@ zR7_-9)FXnM(m_ay#%b4e`vR-ywdQ9Q&U~64qukbiWxdJpo%!Y zEf&Io%&e;NoO3Pu-z(@~+LxKl81euXmHx$IsZiU4mROc_YD?2?+1&_If)_8M2PN;} zC1>Bj7w|DWdUFyjy?ET2@0;I`{n-23d3k<)o52z)f>7YgC%7?vi0PY(^ZJP2t7tF1dmK18Y9U?Qd^!X_iI_A|;R zNQY8Tro@ptguVw+iu{dRWSnNUyWmox^=p+(f=nN>xEs{n`4j~uT1s<`4)9QqyLStW z2e}|WfHYtWst&V$h_n` z?-}vCSu9Wq#_af^z_-_bXu}C4TN~0y9yiOz?z&$}hYBSb1#?uSMpk;yj)i&s11kxC Ah5!Hn From 16266f7cb43d6f9ebb328673836328f474e3ca0f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 14 Mar 2022 18:28:13 -0500 Subject: [PATCH 04/23] reducers/instance: typescript conversion --- app/soapbox/reducers/instance.ts | 133 +++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 app/soapbox/reducers/instance.ts diff --git a/app/soapbox/reducers/instance.ts b/app/soapbox/reducers/instance.ts new file mode 100644 index 0000000000..9092e685b9 --- /dev/null +++ b/app/soapbox/reducers/instance.ts @@ -0,0 +1,133 @@ +import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable'; +import { AnyAction } from 'redux'; + +import { ADMIN_CONFIG_UPDATE_REQUEST, ADMIN_CONFIG_UPDATE_SUCCESS } from 'soapbox/actions/admin'; +import { PLEROMA_PRELOAD_IMPORT } from 'soapbox/actions/preload'; +import { normalizeInstance } from 'soapbox/normalizers/instance'; +import KVStore from 'soapbox/storage/kv_store'; +import { ConfigDB } from 'soapbox/utils/config_db'; + +import { + INSTANCE_REMEMBER_SUCCESS, + INSTANCE_FETCH_SUCCESS, + INSTANCE_FETCH_FAIL, + NODEINFO_FETCH_SUCCESS, +} from '../actions/instance'; + +const initialState = normalizeInstance(ImmutableMap()); + +const nodeinfoToInstance = (nodeinfo: ImmutableMap) => { + // Match Pleroma's develop branch + return normalizeInstance(ImmutableMap({ + pleroma: ImmutableMap({ + metadata: ImmutableMap({ + account_activation_required: nodeinfo.getIn(['metadata', 'accountActivationRequired']), + features: nodeinfo.getIn(['metadata', 'features']), + federation: nodeinfo.getIn(['metadata', 'federation']), + fields_limits: ImmutableMap({ + max_fields: nodeinfo.getIn(['metadata', 'fieldsLimits', 'maxFields']), + }), + }), + }), + })); +}; + +const importInstance = (_state: typeof initialState, instance: ImmutableMap) => { + return normalizeInstance(instance); +}; + +const importNodeinfo = (state: typeof initialState, nodeinfo: ImmutableMap) => { + return nodeinfoToInstance(nodeinfo).mergeDeep(state); +}; + +const preloadImport = (state: typeof initialState, action: Record, path: string) => { + const instance = action.data[path]; + return instance ? importInstance(state, ImmutableMap(fromJS(instance))) : state; +}; + +const getConfigValue = (instanceConfig: ImmutableMap, key: string) => { + const v = instanceConfig + .find(value => value.getIn(['tuple', 0]) === key); + + return v ? v.getIn(['tuple', 1]) : undefined; +}; + +const importConfigs = (state: typeof initialState, configs: ImmutableMap) => { + // FIXME: This is pretty hacked together. Need to make a cleaner map. + const config = ConfigDB.find(configs, ':pleroma', ':instance'); + const simplePolicy = ConfigDB.toSimplePolicy(configs); + + if (!config && !simplePolicy) return state; + + return state.withMutations(state => { + if (config) { + const value = config.get('value', ImmutableList()); + const registrationsOpen = getConfigValue(value, ':registrations_open'); + const approvalRequired = getConfigValue(value, ':account_approval_required'); + + state.update('registrations', c => typeof registrationsOpen === 'boolean' ? registrationsOpen : c); + state.update('approval_required', c => typeof approvalRequired === 'boolean' ? approvalRequired : c); + } + + if (simplePolicy) { + state.setIn(['pleroma', 'metadata', 'federation', 'mrf_simple'], simplePolicy); + } + }); +}; + +const handleAuthFetch = (state: typeof initialState) => { + // Authenticated fetch is enabled, so make the instance appear censored + return state.mergeWith((o, n) => o || n, { + title: '██████', + description: '████████████', + }); +}; + +const getHost = (instance: { uri: string }) => { + try { + return new URL(instance.uri).host; + } catch { + try { + return new URL(`https://${instance.uri}`).host; + } catch { + return null; + } + } +}; + +const persistInstance = (instance: { uri: string }) => { + const host = getHost(instance); + + if (host) { + KVStore.setItem(`instance:${host}`, instance).catch(console.error); + } +}; + +const handleInstanceFetchFail = (state: typeof initialState, error: Record) => { + if (error.response?.status === 401) { + return handleAuthFetch(state); + } else { + return state; + } +}; + +export default function instance(state = initialState, action: AnyAction) { + switch(action.type) { + case PLEROMA_PRELOAD_IMPORT: + return preloadImport(state, action, '/api/v1/instance'); + case INSTANCE_REMEMBER_SUCCESS: + return importInstance(state, ImmutableMap(fromJS(action.instance))); + case INSTANCE_FETCH_SUCCESS: + persistInstance(action.instance); + return importInstance(state, ImmutableMap(fromJS(action.instance))); + case INSTANCE_FETCH_FAIL: + return handleInstanceFetchFail(state, action.error); + case NODEINFO_FETCH_SUCCESS: + return importNodeinfo(state, ImmutableMap(fromJS(action.nodeinfo))); + case ADMIN_CONFIG_UPDATE_REQUEST: + case ADMIN_CONFIG_UPDATE_SUCCESS: + return importConfigs(state, ImmutableMap(fromJS(action.configs))); + default: + return state; + } +} From 27564dd3605e54debf216f8eed93add515e24c4f Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 15 Mar 2022 08:48:18 -0500 Subject: [PATCH 05/23] WIP: reducer typescript --- .../actions/{instance.js => instance.ts} | Bin 2977 -> 3447 bytes app/soapbox/components/badge.tsx | 12 +++++++--- app/soapbox/reducers/{index.js => index.ts} | Bin 3828 -> 3979 bytes app/soapbox/reducers/instance.js | Bin 4122 -> 0 bytes .../storage/{kv_store.js => kv_store.ts} | Bin 655 -> 665 bytes package.json | 3 ++- tsconfig.json | 6 +++-- types/redux-immutable/index.d.ts | 17 ++++++++++++++ yarn.lock | 22 +++++++++++------- 9 files changed, 45 insertions(+), 15 deletions(-) rename app/soapbox/actions/{instance.js => instance.ts} (66%) rename app/soapbox/reducers/{index.js => index.ts} (89%) delete mode 100644 app/soapbox/reducers/instance.js rename app/soapbox/storage/{kv_store.js => kv_store.ts} (93%) create mode 100644 types/redux-immutable/index.d.ts diff --git a/app/soapbox/actions/instance.js b/app/soapbox/actions/instance.ts similarity index 66% rename from app/soapbox/actions/instance.js rename to app/soapbox/actions/instance.ts index b1df09d643509deaa1061eac2f7f7da6baf9d004..a59970c2fd4d982c8657b08be5b2e0c5f8e2b4d3 100644 GIT binary patch delta 712 zcma)4yGjE=6h%#3v%v=z3QEEy7TI8owHpmCM1qJZqF87l<7U)FGqcQ2Fd>NG52)N) z(Aq|^)y~iG7Yu@hVj<4PM|=dan&I4Y&m7K~)4|7~!|0wdBgL^W|NtKsSMO~09(B#p+sQ{8k|&#rWGux zEDQDy5!>cvCcV@Km9xxP!MzUN|639tI!!FP`XqxUUW4jXr@vbzcq-VkA8BBde!S HL``z9IUM#3 delta 203 zcmew^wNQM5+{8&%lUW#(H>WXHGO-qyB$lL3{>Ut;o1R*tp`M$nu4&Dspiq=rQd*R! z0G8DQ%6R5!M5`wzC+C;ul@zP%C`{I6$%pD)$Fg_wM=r6+vpDo8zh~o|{D9S$BQp=E zGcP%HvJYGSWF9WT$q{VIlYg+)BP8atub%vgOBAT9YqK-w5k??Gbg~uqX&|jO*^@_p aaz2mmkV;*IwDG ( - {props.title} -); +import { useAppSelector } from 'soapbox/hooks'; + +const Badge = (props: any) => { + const title = useAppSelector(state => state.instance.titles); + + return ( + {props.title} + ); +}; Badge.propTypes = { title: PropTypes.string.isRequired, diff --git a/app/soapbox/reducers/index.js b/app/soapbox/reducers/index.ts similarity index 89% rename from app/soapbox/reducers/index.js rename to app/soapbox/reducers/index.ts index 989a1fa1f6ff32436b2a74cb2fce11aa1b511f45..3c61591e3ec99ef4132b8609649eddc42ab78082 100644 GIT binary patch delta 234 zcmew&+bzE#jz`o=At*IDzbM6~xTGjEFI`6=F|X2YavaaKFe?yK!B!!-B(WqFqDVti z6QsVRv?wp6vLMx_1W4qkDI^vY1f`~wCZ`tJDcIU6RC6gPB(M3W>!ErFq$T`Q>>aCSJR&xoWMsxF9wa<>!|`-C(7FaMolc GzDocEg;S^i delta 62 zcmeB{|025~j%RW)&ow~>TZQ0~#FEsY)a3l46b((y$#uNqljrlMPL|{g6tL#1wdUeV S&d)0@Q7FpKFPXfP?-Br?w-sUl diff --git a/app/soapbox/reducers/instance.js b/app/soapbox/reducers/instance.js deleted file mode 100644 index ac28e88eed510131903a0dba8cf0c756140e4fff..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4122 zcmb_f+iu%N5PkPoOn@My0D($?J}GblMVCgcCApFu6bKA@O^&REDUv0ZN*qJ){epgA zzofHQl9H0VR1j=&IdkTAW_FkF@~jZ>3^SGkD`C3ZRf63oNY7ok;-zS<%7rd$ifs4W z3J&TAc--oEZ!a#m1ssfK(|I^t%qP=d!<*~TU_B0(<3Dc3t92L7y#Ol{F&l)}%kkA>Fbb!$>&0^I+&b3J3rsQ=HxbgT*s+9v z!)aOymPUA@>?De^$Bj^p@cXBg$O<%hum($7V-MJS+=ucf*7DCV%+d{i7=1V~R0*Dx zy-2+d<9pI^fnESi=d1N#K9m`pjb|Um%g|)2+k810uZJIh@MbcYUP*=dVl$g~P#{_{&0^%~CR=A#RH^GlxO@lC zPuaKTr2g@y#v^xU@;TyJFfv) z6lGN^Ldm#2ldKC1{Hx*x#(fG@dm22Tn5O<`&%$|K@QmibDK3qkciWK}*PjhC@*K;b zfLXC4-53ky(@(XnU|XMK5|?4ZcU+JIts?2Qf9{|Dm5!BIoEbb}T?wWGi;kxlny$MVC}{*-l2@)UP&Do1p)xVD(5xW^pzooKMb z;sHm9xkhP4V1~<7Prurb9$sC@nb1$?!NIO)s`%tAZ5;n$7$92rweA%dAq@pRE%QQG9(?4h9 zKCHLA1o~1*gm{82iykoskx>e^SOhRf^$0umh`=C9kfm7AV;+#7giAwCqmwypc=SOB zZHyAz`)1Tg=J#!qJfeg}D9P~zud{?lPfZ+=tr~B9gD9sY0N;TB!kB*b3SKlZI(F=t z($*Dl(lot8XIjM5$ zDD=ISc?v9&nGsJpW*f@tNf<<1?>@^UFFc~_sYD+lRq0bpHjLV*wl({{4)e&^i9l`Z zpo5bnX%oYaZyj`Lwx*D8-S!}dcCiUHn0MQS7ObQ)z=8g@XZ4n)ae{+NY$qr; z>Pww$OE&65`3_UTBT9Y@8zn{kh^ahR#$+bby+=}Rz5oS|tbhp9l8#JqO>f6SI+2=f zUT~3MAH0A6`TOYW>CHCAGAej3d*Q6ukrq8F#Y0EW_%rjJnEf%MeyJy-4OkRUrl;)Q zgkRuhdF2LdP!+rrY)MK>F~yIATuB?as-F~{IQQcvK{zq1baUp`B@!(C%1 z4^;ee@RihJ0TxA8sBStm+|(qqUMiwZ7*EI}yX$E^TLjq@Y9*lKRZh_OK9KED(Uw6S z_RH%x)>l)cBNn@g%ameLV!NcOvsCqzkN8zxnrOFTRU%+hrE33nWVYj%7V5Kd*X;7z zk&@p!T<22 zVVt%_mPdTrPNd@wymhhA$Vbexp*s}KR} +// Gavin Gregory +// Kanitkorn Sujautra +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.3 + +declare module 'redux-immutable' { + import { ReducersMapObject, Reducer, Action } from 'redux'; + import { Collection, Record as ImmutableRecord } from 'immutable'; + + export function combineReducers(reducers: ReducersMapObject, getDefaultState?: () => Collection.Keyed): Reducer; + export function combineReducers(reducers: ReducersMapObject, getDefaultState?: () => Collection.Indexed): Reducer; + export function combineReducers(reducers: ReducersMapObject, getDefaultState?: () => Collection.Indexed): Reducer; + export function combineReducers(reducers: ReducersMapObject, getDefaultState?: () => ImmutableRecord): Reducer; +} diff --git a/yarn.lock b/yarn.lock index 5bc0a3e5ae..01f6d2fab0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1814,6 +1814,13 @@ resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-5.1.2.tgz#693b316ad323ea97eed6b38ed1a3cc02b1672b57" integrity sha512-h4lTMgMJctJybDp8CQrxTUiiYmedihHWkjnF/8Pxseu2S6Nlfcy8kwboQ8yejh456rP2yWoEVm1sS/FVsfM48w== +"@types/http-link-header@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@types/http-link-header/-/http-link-header-1.0.3.tgz#899adf1d8d2036074514f3dbd148fb901ceff920" + integrity sha512-y8HkoD/vyid+5MrJ3aas0FvU3/BVBGcyG9kgxL0Zn4JwstA8CglFPnrR0RuzOjRCXwqzL5uxWC2IO7Ub0rMU2A== + dependencies: + "@types/node" "*" + "@types/http-proxy@^1.17.5": version "1.17.7" resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.7.tgz#30ea85cc2c868368352a37f0d0d3581e24834c6f" @@ -1850,6 +1857,11 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= +"@types/lodash@^4.14.180": + version "4.14.180" + resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.180.tgz#4ab7c9ddfc92ec4a887886483bc14c79fb380670" + integrity sha512-XOKXa1KIxtNXgASAnwj7cnttJxS4fksBRywK/9LzRV5YxrF80BXZIGeQSuoESQ/VkUj30Ae0+YcuHc15wJCB2g== + "@types/mdast@^3.0.0": version "3.0.10" resolved "https://registry.yarnpkg.com/@types/mdast/-/mdast-3.0.10.tgz#4724244a82a4598884cbbe9bcfd73dff927ee8af" @@ -1911,14 +1923,6 @@ "@types/scheduler" "*" csstype "^3.0.2" -"@types/redux-immutable@^4.0.2": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@types/redux-immutable/-/redux-immutable-4.0.2.tgz#8c3c666c33130c6794280bc3dc7726bfa0cfacc7" - integrity sha512-nlnhJn9B+NtIemWnnNWO9arUioeHLNvYCADSSa+48c81y8VwutgHH3WHobX711KKrfhlMlEz3+Q9SYX3sxrYPg== - dependencies: - immutable "^4.0.0-rc.1" - redux "^4.0.0" - "@types/retry@^0.12.0": version "0.12.1" resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.1.tgz#d8f1c0d0dc23afad6dc16a9e993a0865774b4065" @@ -5163,7 +5167,7 @@ immediate@~3.0.5: resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= -immutable@^4.0.0, immutable@^4.0.0-rc.1: +immutable@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0.tgz#b86f78de6adef3608395efb269a91462797e2c23" integrity sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw== From 8587bd4bf60658c86ca223ad7c9e723ddcbb2025 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 18 Mar 2022 16:08:42 +0000 Subject: [PATCH 06/23] Revert "Merge branch 'msw' into 'develop'" This reverts merge request !1100 --- app/soapbox/__mocks__/api.js | Bin 0 -> 585 bytes app/soapbox/__tests__/api.js | Bin 252 -> 0 bytes app/soapbox/actions/__tests__/preload-test.js | Bin 1264 -> 1128 bytes .../actions/__tests__/statuses-test.js | Bin 925 -> 915 bytes app/soapbox/msw.js | Bin 271 -> 0 bytes app/soapbox/test_helpers.js | Bin 1271 -> 1198 bytes app/soapbox/test_setup.js | Bin 366 -> 297 bytes package.json | 1 - yarn.lock | 361 +----------------- 9 files changed, 6 insertions(+), 356 deletions(-) create mode 100644 app/soapbox/__mocks__/api.js delete mode 100644 app/soapbox/__tests__/api.js delete mode 100644 app/soapbox/msw.js diff --git a/app/soapbox/__mocks__/api.js b/app/soapbox/__mocks__/api.js new file mode 100644 index 0000000000000000000000000000000000000000..fcb3a3253e579869cb34179ee7b523bc5cb0c6c3 GIT binary patch literal 585 zcma)&O-=(b42Ab|3hySfXgEMsq>42sK&Wz4j|j|9NE}fKad(_#n5MI0Yk%+gJ=@XE zp5b{mAIA$iCJ()zM`-bC=dc@PzQeL;_f2EwDKMb3aDaCTtUY~3>*;7X;-FfsA7t5f z`(_}9qz*#9yo!{r`BHH>odUuGoLy`vp;F B!Vv%f literal 0 HcmV?d00001 diff --git a/app/soapbox/__tests__/api.js b/app/soapbox/__tests__/api.js deleted file mode 100644 index 420a748284e558ab236543db3d7bf8d925955ca9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 252 zcmZ8bI}XAy4BdN*w diff --git a/app/soapbox/actions/__tests__/preload-test.js b/app/soapbox/actions/__tests__/preload-test.js index 415b22da0c3b4cef27167a53205232788dd81e2b..5290802d2665d800d74653997a78f00f4448d0bf 100644 GIT binary patch delta 111 zcmeys`GRADwN!k3aY<>CLajntQGTw1dU1YYK~jE&equr9#^^pqd5E+|ZhmsMf~}oG wHJ1VyfcSd(dG3=LnKTqMp@IqudPS)PIh7hl1_n9`)wP<|V2Rqzmzd<30RHJ9=Kufz delta 222 zcmaFC@qu%KwL)=fQCVt{jzUptafw2$LRwLNu7Y}TequpVeuaK+arws3K1KBQ z3P1ocMI$#qIa|TjPN5nssGtDi>*eRUPqt!o3ekiLDk$g`r55B=Y8V+9=)eusv<6Gp g0%k*is8YEfBgk&Z%9YH^7|twLH+ey)OgaeiV!QhtSgZgIJ~HCJYCL4Hw* zLbXCsett=CNn%N=&cr#(B_KNWN{dr9xD>zuWQJb)=kva+*MX7~gV|5ggODZ%K zZ0!`Pq3RTXww06?<$)}P=>-`8RHs)AG{3Z1!^pruQwOdbB9&E~pQkZ7gwaR_NlMci Vs;U+$I9Y^AffMf1%}z{#i~uW+Lel^M diff --git a/app/soapbox/msw.js b/app/soapbox/msw.js deleted file mode 100644 index c2dd4f0ef07fbb9578d45637eb9916d7dc71f65e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 271 zcmZvX&klkx494#~MQ$ui^63%%tIRQWJdUKwIn~6&R||pT#>cfC% PomXN?g(ShohvJ~xI_=c(Lh$Eu4&Dcm{yWnFpk{ltPy{bG Date: Fri, 18 Mar 2022 11:32:05 -0500 Subject: [PATCH 07/23] Add @types/http-link-header --- package.json | 1 + yarn.lock | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/package.json b/package.json index fda7716ca6..e58c8643fb 100644 --- a/package.json +++ b/package.json @@ -60,6 +60,7 @@ "@sentry/tracing": "^6.12.0", "@tabler/icons": "^1.53.0", "@types/escape-html": "^1.0.1", + "@types/http-link-header": "^1.0.3", "@types/redux-immutable": "^4.0.2", "array-includes": "^3.0.3", "autoprefixer": "^10.0.0", diff --git a/yarn.lock b/yarn.lock index 5bc0a3e5ae..ac74e6ea96 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1814,6 +1814,13 @@ resolved "https://registry.yarnpkg.com/@types/html-minifier-terser/-/html-minifier-terser-5.1.2.tgz#693b316ad323ea97eed6b38ed1a3cc02b1672b57" integrity sha512-h4lTMgMJctJybDp8CQrxTUiiYmedihHWkjnF/8Pxseu2S6Nlfcy8kwboQ8yejh456rP2yWoEVm1sS/FVsfM48w== +"@types/http-link-header@^1.0.3": + version "1.0.3" + resolved "https://registry.yarnpkg.com/@types/http-link-header/-/http-link-header-1.0.3.tgz#899adf1d8d2036074514f3dbd148fb901ceff920" + integrity sha512-y8HkoD/vyid+5MrJ3aas0FvU3/BVBGcyG9kgxL0Zn4JwstA8CglFPnrR0RuzOjRCXwqzL5uxWC2IO7Ub0rMU2A== + dependencies: + "@types/node" "*" + "@types/http-proxy@^1.17.5": version "1.17.7" resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.7.tgz#30ea85cc2c868368352a37f0d0d3581e24834c6f" From 1fe7a72790a22290ce0c6e6a48a5c93df6bdacbd Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 18 Mar 2022 12:20:03 -0500 Subject: [PATCH 08/23] Fix API mock --- app/soapbox/__mocks__/api.js | Bin 585 -> 0 bytes app/soapbox/__mocks__/api.ts | 28 ++++++++++++++++++ .../actions/__tests__/statuses-test.js | Bin 915 -> 871 bytes app/soapbox/test_helpers.js | Bin 1198 -> 1271 bytes 4 files changed, 28 insertions(+) delete mode 100644 app/soapbox/__mocks__/api.js create mode 100644 app/soapbox/__mocks__/api.ts diff --git a/app/soapbox/__mocks__/api.js b/app/soapbox/__mocks__/api.js deleted file mode 100644 index fcb3a3253e579869cb34179ee7b523bc5cb0c6c3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 585 zcma)&O-=(b42Ab|3hySfXgEMsq>42sK&Wz4j|j|9NE}fKad(_#n5MI0Yk%+gJ=@XE zp5b{mAIA$iCJ()zM`-bC=dc@PzQeL;_f2EwDKMb3aDaCTtUY~3>*;7X;-FfsA7t5f z`(_}9qz*#9yo!{r`BHH>odUuGoLy`vp;F B!Vv%f diff --git a/app/soapbox/__mocks__/api.ts b/app/soapbox/__mocks__/api.ts new file mode 100644 index 0000000000..a0b91a967b --- /dev/null +++ b/app/soapbox/__mocks__/api.ts @@ -0,0 +1,28 @@ +import MockAdapter from 'axios-mock-adapter'; +import { AxiosInstance } from 'axios'; +import { jest } from '@jest/globals'; + +const api = jest.requireActual('../api') as Record; +let mocks: Array = []; + +export const __stub = (func: Function) => mocks.push(func); +export const __clear = (): Function[] => mocks = []; + +const setupMock = (axios: AxiosInstance) => { + const mock = new MockAdapter(axios); + mocks.map(func => func(mock)); +}; + +export const staticClient = api.staticClient; + +export const baseClient = (...params: any[]) => { + const axios = api.baseClient(...params); + setupMock(axios); + return axios; +}; + +export default (...params: any[]) => { + const axios = api.default(...params); + setupMock(axios); + return axios; +}; diff --git a/app/soapbox/actions/__tests__/statuses-test.js b/app/soapbox/actions/__tests__/statuses-test.js index 71a0596a4496278d9cf5f55db18222d768d730e8..aa1ac9f3dc8d9250ac16fc67d2de6d55c54f5ba8 100644 GIT binary patch delta 37 mcmbQt{+w;1Q3;ohLQ#HxNpMMG$;PGqjGQn|>SiaVKt=!r;0t0vqc9 diff --git a/app/soapbox/test_helpers.js b/app/soapbox/test_helpers.js index c9de38dc45e451cb7f7abb73b5887d7b225b6af4..90f41119eb7f7ad4a36ac73f85c7e61ce2e904cd 100644 GIT binary patch delta 116 zcmZ3-`JHn^A7e~vML~X1i9&LIUU7*+QGR|&a7kiGs)8+;9h90 Date: Fri, 18 Mar 2022 13:16:59 -0500 Subject: [PATCH 09/23] Fix Typescript eslint --- .eslintrc.js | Bin 6188 -> 6131 bytes app/soapbox/__mocks__/api.ts | 4 +- package.json | 5 +- yarn.lock | 290 ++++++++++++++++++++++++++++++++++- 4 files changed, 292 insertions(+), 7 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index f4b59595a2d9e88b181421df998e10d2f271e6bf..193d390bd123cbe1c0e2453cad21acfe748847c5 100644 GIT binary patch delta 82 zcmZ2u@L7L@wm7@Gj)JPAu@OmK`n@i)#0kO<^ljn?im#T delta 106 zcmeyYzs6vLw)kW-aoNe!#MO0bb+{COKwn?MC9^m&DJNASFJHGbFC{fiAu~@Qq_QA2 vIJqdZpai69a*DX_WMOe3cD<5fbsYuu$wuNvl3?u$3Q%*vRICnHtu+?_i4+^= diff --git a/app/soapbox/__mocks__/api.ts b/app/soapbox/__mocks__/api.ts index a0b91a967b..2f3a0d7b8f 100644 --- a/app/soapbox/__mocks__/api.ts +++ b/app/soapbox/__mocks__/api.ts @@ -1,6 +1,6 @@ -import MockAdapter from 'axios-mock-adapter'; -import { AxiosInstance } from 'axios'; import { jest } from '@jest/globals'; +import { AxiosInstance } from 'axios'; +import MockAdapter from 'axios-mock-adapter'; const api = jest.requireActual('../api') as Record; let mocks: Array = []; diff --git a/package.json b/package.json index e58c8643fb..efb5808549 100644 --- a/package.json +++ b/package.json @@ -158,7 +158,6 @@ "substring-trie": "^1.0.2", "terser-webpack-plugin": "^5.2.3", "tiny-queue": "^0.2.1", - "ts-jest": "^27.0.5", "ts-loader": "^9.2.6", "tslib": "^2.3.1", "twemoji": "https://github.com/twitter/twemoji#v13.0.2", @@ -173,6 +172,9 @@ "wicg-inert": "^3.1.1" }, "devDependencies": { + "@jest/globals": "^27.5.1", + "@typescript-eslint/eslint-plugin": "^5.15.0", + "@typescript-eslint/parser": "^5.15.0", "axios-mock-adapter": "^1.18.1", "babel-eslint": "^10.1.0", "babel-jest": "^27.1.0", @@ -194,6 +196,7 @@ "stylelint": "^13.7.2", "stylelint-config-standard": "^22.0.0", "stylelint-scss": "^3.18.0", + "ts-jest": "^27.0.5", "webpack-dev-server": "^4.1.0", "yargs": "^16.0.3" } diff --git a/yarn.lock b/yarn.lock index ac74e6ea96..78299464e7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1453,6 +1453,16 @@ "@types/node" "*" jest-mock "^27.1.1" +"@jest/environment@^27.5.1": + version "27.5.1" + resolved "https://registry.yarnpkg.com/@jest/environment/-/environment-27.5.1.tgz#d7425820511fe7158abbecc010140c3fd3be9c74" + integrity sha512-/WQjhPJe3/ghaol/4Bq480JKXV/Rfw8nQdN7f41fM8VDHLcxKXou6QyXAh3EFr9/bVG3x74z1NWDkP87EiY8gA== + dependencies: + "@jest/fake-timers" "^27.5.1" + "@jest/types" "^27.5.1" + "@types/node" "*" + jest-mock "^27.5.1" + "@jest/fake-timers@^27.2.0": version "27.2.0" resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.2.0.tgz#560841bc21ae7fbeff0cbff8de8f5cf43ad3561d" @@ -1465,6 +1475,18 @@ jest-mock "^27.1.1" jest-util "^27.2.0" +"@jest/fake-timers@^27.5.1": + version "27.5.1" + resolved "https://registry.yarnpkg.com/@jest/fake-timers/-/fake-timers-27.5.1.tgz#76979745ce0579c8a94a4678af7a748eda8ada74" + integrity sha512-/aPowoolwa07k7/oM3aASneNeBGCmGQsc3ugN4u6s4C/+s5M64MFo/+djTdiwcbQlRfFElGuDXWzaWj6QgKObQ== + dependencies: + "@jest/types" "^27.5.1" + "@sinonjs/fake-timers" "^8.0.1" + "@types/node" "*" + jest-message-util "^27.5.1" + jest-mock "^27.5.1" + jest-util "^27.5.1" + "@jest/globals@^27.2.0": version "27.2.0" resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.2.0.tgz#4d7085f51df5ac70c8240eb3501289676503933d" @@ -1474,6 +1496,15 @@ "@jest/types" "^27.1.1" expect "^27.2.0" +"@jest/globals@^27.5.1": + version "27.5.1" + resolved "https://registry.yarnpkg.com/@jest/globals/-/globals-27.5.1.tgz#7ac06ce57ab966566c7963431cef458434601b2b" + integrity sha512-ZEJNB41OBQQgGzgyInAv0UUfDDj3upmHydjieSxFvTRuZElrx7tXg/uVQ5hYVEwiXs3+aMsAeEc9X7xiSKCm4Q== + dependencies: + "@jest/environment" "^27.5.1" + "@jest/types" "^27.5.1" + expect "^27.5.1" + "@jest/reporters@^27.2.0": version "27.2.0" resolved "https://registry.yarnpkg.com/@jest/reporters/-/reporters-27.2.0.tgz#629886d9a42218e504a424889a293abb27919e25" @@ -1565,6 +1596,17 @@ "@types/yargs" "^16.0.0" chalk "^4.0.0" +"@jest/types@^27.5.1": + version "27.5.1" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.5.1.tgz#3c79ec4a8ba61c170bf937bcf9e98a9df175ec80" + integrity sha512-Cx46iJ9QpwQTjIdq5VJu2QTMMs3QlEjI0x1QbBP5W1+nMzyc2XmimiRR/CbX9TO0cPTeUlxWMOu8mslYsJ8DEw== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^16.0.0" + chalk "^4.0.0" + "@lcdp/offline-plugin@^5.1.0": version "5.1.0" resolved "https://registry.yarnpkg.com/@lcdp/offline-plugin/-/offline-plugin-5.1.0.tgz#826f3e10d618711bd002afd674edb36dc1d9a792" @@ -1703,6 +1745,13 @@ dependencies: "@sinonjs/commons" "^1.7.0" +"@sinonjs/fake-timers@^8.0.1": + version "8.1.0" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz#3fdc2b6cb58935b21bfb8d1625eb1300484316e7" + integrity sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg== + dependencies: + "@sinonjs/commons" "^1.7.0" + "@stylelint/postcss-css-in-js@^0.37.2": version "0.37.2" resolved "https://registry.yarnpkg.com/@stylelint/postcss-css-in-js/-/postcss-css-in-js-0.37.2.tgz#7e5a84ad181f4234a2480803422a47b8749af3d2" @@ -1852,6 +1901,11 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== +"@types/json-schema@^7.0.9": + version "7.0.10" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.10.tgz#9b05b7896166cd00e9cbd59864853abf65d9ac23" + integrity sha512-BLO9bBq59vW3fxCpD4o0N4U+DXsvwvIcl+jofw0frQo/GrBFC+/jRZj1E7kgp6dvTyNmA4y6JCV5Id/r3mNP5A== + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" @@ -1965,6 +2019,86 @@ dependencies: "@types/yargs-parser" "*" +"@typescript-eslint/eslint-plugin@^5.15.0": + version "5.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.15.0.tgz#c28ef7f2e688066db0b6a9d95fb74185c114fb9a" + integrity sha512-u6Db5JfF0Esn3tiAKELvoU5TpXVSkOpZ78cEGn/wXtT2RVqs2vkt4ge6N8cRCyw7YVKhmmLDbwI2pg92mlv7cA== + dependencies: + "@typescript-eslint/scope-manager" "5.15.0" + "@typescript-eslint/type-utils" "5.15.0" + "@typescript-eslint/utils" "5.15.0" + debug "^4.3.2" + functional-red-black-tree "^1.0.1" + ignore "^5.1.8" + regexpp "^3.2.0" + semver "^7.3.5" + tsutils "^3.21.0" + +"@typescript-eslint/parser@^5.15.0": + version "5.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.15.0.tgz#95f603f8fe6eca7952a99bfeef9b85992972e728" + integrity sha512-NGAYP/+RDM2sVfmKiKOCgJYPstAO40vPAgACoWPO/+yoYKSgAXIFaBKsV8P0Cc7fwKgvj27SjRNX4L7f4/jCKQ== + dependencies: + "@typescript-eslint/scope-manager" "5.15.0" + "@typescript-eslint/types" "5.15.0" + "@typescript-eslint/typescript-estree" "5.15.0" + debug "^4.3.2" + +"@typescript-eslint/scope-manager@5.15.0": + version "5.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.15.0.tgz#d97afab5e0abf4018d1289bd711be21676cdd0ee" + integrity sha512-EFiZcSKrHh4kWk0pZaa+YNJosvKE50EnmN4IfgjkA3bTHElPtYcd2U37QQkNTqwMCS7LXeDeZzEqnsOH8chjSg== + dependencies: + "@typescript-eslint/types" "5.15.0" + "@typescript-eslint/visitor-keys" "5.15.0" + +"@typescript-eslint/type-utils@5.15.0": + version "5.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.15.0.tgz#d2c02eb2bdf54d0a645ba3a173ceda78346cf248" + integrity sha512-KGeDoEQ7gHieLydujGEFLyLofipe9PIzfvA/41urz4hv+xVxPEbmMQonKSynZ0Ks2xDhJQ4VYjB3DnRiywvKDA== + dependencies: + "@typescript-eslint/utils" "5.15.0" + debug "^4.3.2" + tsutils "^3.21.0" + +"@typescript-eslint/types@5.15.0": + version "5.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.15.0.tgz#c7bdd103843b1abae97b5518219d3e2a0d79a501" + integrity sha512-yEiTN4MDy23vvsIksrShjNwQl2vl6kJeG9YkVJXjXZnkJElzVK8nfPsWKYxcsGWG8GhurYXP4/KGj3aZAxbeOA== + +"@typescript-eslint/typescript-estree@5.15.0": + version "5.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.15.0.tgz#81513a742a9c657587ad1ddbca88e76c6efb0aac" + integrity sha512-Hb0e3dGc35b75xLzixM3cSbG1sSbrTBQDfIScqdyvrfJZVEi4XWAT+UL/HMxEdrJNB8Yk28SKxPLtAhfCbBInA== + dependencies: + "@typescript-eslint/types" "5.15.0" + "@typescript-eslint/visitor-keys" "5.15.0" + debug "^4.3.2" + globby "^11.0.4" + is-glob "^4.0.3" + semver "^7.3.5" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.15.0": + version "5.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.15.0.tgz#468510a0974d3ced8342f37e6c662778c277f136" + integrity sha512-081rWu2IPKOgTOhHUk/QfxuFog8m4wxW43sXNOMSCdh578tGJ1PAaWPsj42LOa7pguh173tNlMigsbrHvh/mtA== + dependencies: + "@types/json-schema" "^7.0.9" + "@typescript-eslint/scope-manager" "5.15.0" + "@typescript-eslint/types" "5.15.0" + "@typescript-eslint/typescript-estree" "5.15.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + +"@typescript-eslint/visitor-keys@5.15.0": + version "5.15.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.15.0.tgz#5669739fbf516df060f978be6a6dce75855a8027" + integrity sha512-+vX5FKtgvyHbmIJdxMJ2jKm9z2BIlXJiuewI8dsDYMp5LzPUcuTT78Ya5iwvQg3VqSVdmxyM8Anj1Jeq7733ZQ== + dependencies: + "@typescript-eslint/types" "5.15.0" + eslint-visitor-keys "^3.0.0" + "@webassemblyjs/ast@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" @@ -2246,7 +2380,7 @@ ansi-regex@^2.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= -ansi-regex@^5.0.0: +ansi-regex@^5.0.0, ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== @@ -2992,6 +3126,11 @@ ci-info@^3.1.1: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.2.0.tgz#2876cb948a498797b5236f0095bc057d0dca38b6" integrity sha512-dVqRX7fLUm8J6FgHJ418XuIgDLZDkYcDFTeL6TA2gt5WlIZUQrrH6EZrNClwT/H0FateUsZkGIOPRrLbP+PR9A== +ci-info@^3.2.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" + integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== + cjs-module-lexer@^1.0.0: version "1.2.2" resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" @@ -3559,6 +3698,13 @@ debug@^3.1.1, debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.3.2: + version "4.3.4" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + decamelize-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" @@ -3684,6 +3830,11 @@ diff-sequences@^27.0.6: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.6.tgz#3305cb2e55a033924054695cc66019fd7f8e5723" integrity sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ== +diff-sequences@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.5.1.tgz#eaecc0d327fd68c8d9672a1e64ab8dccb2ef5327" + integrity sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ== + dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" @@ -4240,6 +4391,13 @@ eslint-utils@^2.1.0: dependencies: eslint-visitor-keys "^1.1.0" +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" @@ -4250,6 +4408,11 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== +eslint-visitor-keys@^3.0.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" + integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== + eslint@^7.0.0: version "7.32.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" @@ -4408,6 +4571,16 @@ expect@^27.2.0: jest-message-util "^27.2.0" jest-regex-util "^27.0.6" +expect@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/expect/-/expect-27.5.1.tgz#83ce59f1e5bdf5f9d2b94b61d2050db48f3fef74" + integrity sha512-E1q5hSUG2AmYQwQJ041nvgpkODHQvB+RKlB4IYdru6uJsyFTRyZAP463M+1lINorwbqAmUggi6+WwkD8lCS/Dw== + dependencies: + "@jest/types" "^27.5.1" + jest-get-type "^27.5.1" + jest-matcher-utils "^27.5.1" + jest-message-util "^27.5.1" + express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" @@ -4472,6 +4645,17 @@ fast-glob@^3.1.1, fast-glob@^3.2.5: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.2.9: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -4822,6 +5006,18 @@ globby@^11.0.1, globby@^11.0.3: merge2 "^1.3.0" slash "^3.0.0" +globby@^11.0.4: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + globjoin@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/globjoin/-/globjoin-0.1.4.tgz#2f4494ac8919e3767c5cbb691e9f463324285d43" @@ -4839,6 +5035,11 @@ graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== +graceful-fs@^4.2.9: + version "4.2.9" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" + integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ== + gzip-size@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" @@ -5165,6 +5366,11 @@ ignore@^5.1.4, ignore@^5.1.8: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== +ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + immediate@~3.0.5: version "3.0.6" resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" @@ -5835,6 +6041,16 @@ jest-diff@^27.2.0: jest-get-type "^27.0.6" pretty-format "^27.2.0" +jest-diff@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.5.1.tgz#a07f5011ac9e6643cf8a95a462b7b1ecf6680def" + integrity sha512-m0NvkX55LDt9T4mctTEgnZk3fmEg3NRYutvMPWM/0iPnkFj2wIeF45O1718cMSOFO1vINkqmxqD8vE37uTEbqw== + dependencies: + chalk "^4.0.0" + diff-sequences "^27.5.1" + jest-get-type "^27.5.1" + pretty-format "^27.5.1" + jest-docblock@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-27.0.6.tgz#cc78266acf7fe693ca462cbbda0ea4e639e4e5f3" @@ -5883,6 +6099,11 @@ jest-get-type@^27.0.6: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.6.tgz#0eb5c7f755854279ce9b68a9f1a4122f69047cfe" integrity sha512-XTkK5exIeUbbveehcSR8w0bhH+c0yloW/Wpl+9vZrjzztCPWrxhHwkIFpZzCt71oRBsgxmuUfxEqOYoZI2macg== +jest-get-type@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.5.1.tgz#3cd613c507b0f7ace013df407a1c1cd578bcb4f1" + integrity sha512-2KY95ksYSaK7DMBWQn6dQz3kqAf3BB64y2udeG+hv4KfSOb9qwcYQstTJc1KCbsix+wLZWZYN8t7nwX3GOBLRw== + jest-haste-map@^27.2.0: version "27.2.0" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-27.2.0.tgz#703b3a473e3f2e27d75ab07864ffd7bbaad0d75e" @@ -5945,6 +6166,16 @@ jest-matcher-utils@^27.2.0: jest-get-type "^27.0.6" pretty-format "^27.2.0" +jest-matcher-utils@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-matcher-utils/-/jest-matcher-utils-27.5.1.tgz#9c0cdbda8245bc22d2331729d1091308b40cf8ab" + integrity sha512-z2uTx/T6LBaCoNWNFWwChLBKYxTMcGBRjAt+2SbP929/Fflb9aa5LGma654Rz8z9HLxsrUaYzxE9T/EFIL/PAw== + dependencies: + chalk "^4.0.0" + jest-diff "^27.5.1" + jest-get-type "^27.5.1" + pretty-format "^27.5.1" + jest-message-util@^27.2.0: version "27.2.0" resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.2.0.tgz#2f65c71df55267208686b1d7514e18106c91ceaf" @@ -5960,6 +6191,21 @@ jest-message-util@^27.2.0: slash "^3.0.0" stack-utils "^2.0.3" +jest-message-util@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-message-util/-/jest-message-util-27.5.1.tgz#bdda72806da10d9ed6425e12afff38cd1458b6cf" + integrity sha512-rMyFe1+jnyAAf+NHwTclDz0eAaLkVDdKVHHBFWsBWHnnh5YeJMNWWsv7AbFYXfK3oTqvL7VTWkhNLu1jX24D+g== + dependencies: + "@babel/code-frame" "^7.12.13" + "@jest/types" "^27.5.1" + "@types/stack-utils" "^2.0.0" + chalk "^4.0.0" + graceful-fs "^4.2.9" + micromatch "^4.0.4" + pretty-format "^27.5.1" + slash "^3.0.0" + stack-utils "^2.0.3" + jest-mock@^27.1.1: version "27.1.1" resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.1.1.tgz#c7a2e81301fdcf3dab114931d23d89ec9d0c3a82" @@ -5968,6 +6214,14 @@ jest-mock@^27.1.1: "@jest/types" "^27.1.1" "@types/node" "*" +jest-mock@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-mock/-/jest-mock-27.5.1.tgz#19948336d49ef4d9c52021d34ac7b5f36ff967d6" + integrity sha512-K4jKbY1d4ENhbrG2zuPWaQBvDly+iZ2yAW+T1fATN78hc0sInwn7wZB8XtlNnvHug5RMwV897Xm4LqmPM4e2Og== + dependencies: + "@jest/types" "^27.5.1" + "@types/node" "*" + jest-pnp-resolver@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" @@ -6119,6 +6373,18 @@ jest-util@^27.0.0, jest-util@^27.2.0: is-ci "^3.0.0" picomatch "^2.2.3" +jest-util@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/jest-util/-/jest-util-27.5.1.tgz#3ba9771e8e31a0b85da48fe0b0891fb86c01c2f9" + integrity sha512-Kv2o/8jNvX1MQ0KGtw480E/w4fBCDOnH6+6DmeKi6LZUIlKA5kwY0YNdlzaWTiVgxqAqik11QyxDOKk543aKXw== + dependencies: + "@jest/types" "^27.5.1" + "@types/node" "*" + chalk "^4.0.0" + ci-info "^3.2.0" + graceful-fs "^4.2.9" + picomatch "^2.2.3" + jest-validate@^27.2.0: version "27.2.0" resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-27.2.0.tgz#b7535f12d95dd3b4382831f4047384ca098642ab" @@ -6807,7 +7073,7 @@ merge-stream@^2.0.0: resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== -merge2@^1.3.0: +merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -7936,6 +8202,15 @@ pretty-format@^27.2.0: ansi-styles "^5.0.0" react-is "^17.0.1" +pretty-format@^27.5.1: + version "27.5.1" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.5.1.tgz#2181879fdea51a7a5851fb39d920faa63f01d88e" + integrity sha512-Qb1gy5OrP5+zDf2Bvnzdl3jsTf1qXVMazbvCoKhtKqVs4/YK4ozX4gKQJJVyNe+cajNPn0KoC0MC3FUmaHWEmQ== + dependencies: + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^17.0.1" + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -8556,7 +8831,7 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.3.1: call-bind "^1.0.2" define-properties "^1.1.3" -regexpp@^3.1.0: +regexpp@^3.1.0, regexpp@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== @@ -9717,7 +9992,7 @@ tsconfig-paths@^3.12.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@^1.9.0, tslib@^1.9.3: +tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3: version "1.14.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== @@ -9727,6 +10002,13 @@ tslib@^2.0.1, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + twemoji-parser@13.0.0: version "13.0.0" resolved "https://registry.yarnpkg.com/twemoji-parser/-/twemoji-parser-13.0.0.tgz#bd9d1b98474f1651dc174696b45cabefdfa405af" From e3c60647dcd18ca476a6ad189413cb832a237910 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 18 Mar 2022 15:17:32 -0500 Subject: [PATCH 10/23] tsconfig: exclude Jest files --- tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index cead8687c1..20d08e4b1c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,5 +10,6 @@ "moduleResolution": "node", "experimentalDecorators": true, "allowSyntheticDefaultImports": true - } + }, + "exclude": ["**/*.test.*", "**/__mocks__/*", "**/__tests__/*"] } From c420e83bffe3ba0c6a7f5103a508e1dc48a07c17 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 18 Mar 2022 15:35:22 -0500 Subject: [PATCH 11/23] Throw out accidental badge.tsx changes --- app/soapbox/components/badge.tsx | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/app/soapbox/components/badge.tsx b/app/soapbox/components/badge.tsx index 5afc4ee64b..b12ed768f5 100644 --- a/app/soapbox/components/badge.tsx +++ b/app/soapbox/components/badge.tsx @@ -1,15 +1,9 @@ import PropTypes from 'prop-types'; import React from 'react'; -import { useAppSelector } from 'soapbox/hooks'; - -const Badge = (props: any) => { - const title = useAppSelector(state => state.instance.titles); - - return ( - {props.title} - ); -}; +const Badge = (props: any) => ( + {props.title} +); Badge.propTypes = { title: PropTypes.string.isRequired, From a81424262ad54fbeeb81c3c809cfa94d2f932eee Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 18 Mar 2022 15:36:15 -0500 Subject: [PATCH 12/23] gitlab-ci: lint on ts/tsx changes --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 926f7b7298..d1550dca2c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,6 +26,9 @@ lint-js: only: changes: - "**/*.js" + - "**/*.jsx" + - "**/*.ts" + - "**/*.tsx" - ".eslintignore" - ".eslintrc.js" From 12c57e02a5b1ae96bde3da038c02ae887e61a757 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 18 Mar 2022 16:04:08 -0500 Subject: [PATCH 13/23] Fix Instance types --- app/soapbox/actions/instance.ts | 9 ++++----- app/soapbox/storage/kv_store.ts | 6 +++++- app/soapbox/store.ts | 6 +++--- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/app/soapbox/actions/instance.ts b/app/soapbox/actions/instance.ts index a59970c2fd..2eb20f80fb 100644 --- a/app/soapbox/actions/instance.ts +++ b/app/soapbox/actions/instance.ts @@ -1,12 +1,11 @@ import { get } from 'lodash'; import { AnyAction } from 'redux'; -import { ThunkAction } from 'redux-thunk' -import { AxiosResponse } from 'axios'; import KVStore from 'soapbox/storage/kv_store'; import { AppDispatch, RootState } from 'soapbox/store'; import { getAuthUserUrl } from 'soapbox/utils/auth'; import { parseVersion } from 'soapbox/utils/features'; + import api from '../api'; export const INSTANCE_FETCH_REQUEST = 'INSTANCE_FETCH_REQUEST'; @@ -38,7 +37,7 @@ export const getHost = (state: RootState) => { }; export function rememberInstance(host: string) { - return (dispatch: AppDispatch, _getState: () => RootState) => { + return (dispatch: AppDispatch, _getState: () => RootState): AnyAction => { dispatch({ type: INSTANCE_REMEMBER_REQUEST, host }); return KVStore.getItemOrError(`instance:${host}`).then((instance: Record) => { dispatch({ type: INSTANCE_REMEMBER_SUCCESS, host, instance }); @@ -55,8 +54,8 @@ const needsNodeinfo = (instance: Record): boolean => { return v.software === 'Pleroma' && !get(instance, ['pleroma', 'metadata']); }; -export function fetchInstance(): ThunkAction { - return (dispatch, getState) => { +export function fetchInstance() { + return (dispatch: AppDispatch, getState: () => RootState) => { dispatch({ type: INSTANCE_FETCH_REQUEST }); return api(getState).get('/api/v1/instance').then(({ data: instance }: { data: Record }) => { dispatch({ type: INSTANCE_FETCH_SUCCESS, instance }); diff --git a/app/soapbox/storage/kv_store.ts b/app/soapbox/storage/kv_store.ts index 2140486de7..5b7225c0d7 100644 --- a/app/soapbox/storage/kv_store.ts +++ b/app/soapbox/storage/kv_store.ts @@ -1,8 +1,12 @@ import localforage from 'localforage'; +interface IKVStore extends LocalForage { + getItemOrError?: (key: string) => Promise, +} + // localForage // https://localforage.github.io/localForage/#settings-api-config -export const KVStore = localforage.createInstance({ +export const KVStore: IKVStore = localforage.createInstance({ name: 'soapbox', description: 'Soapbox offline data store', driver: localforage.INDEXEDDB, diff --git a/app/soapbox/store.ts b/app/soapbox/store.ts index 4b34e45e24..5e557ac54b 100644 --- a/app/soapbox/store.ts +++ b/app/soapbox/store.ts @@ -1,6 +1,6 @@ import { composeWithDevTools } from '@redux-devtools/extension'; -import { createStore, applyMiddleware } from 'redux'; -import thunk from 'redux-thunk'; +import { createStore, applyMiddleware, AnyAction } from 'redux'; +import thunk, { ThunkDispatch } from 'redux-thunk'; import errorsMiddleware from './middleware/errors'; import soundsMiddleware from './middleware/sounds'; @@ -20,4 +20,4 @@ export const store = createStore( // Infer the `RootState` and `AppDispatch` types from the store itself // https://redux.js.org/usage/usage-with-typescript export type RootState = ReturnType; -export type AppDispatch = typeof store.dispatch; +export type AppDispatch = ThunkDispatch<{}, {}, AnyAction>; From 454f1e3e8de2dd33207af7a4b393edffefe41bff Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 18 Mar 2022 16:09:36 -0500 Subject: [PATCH 14/23] Lint redux-immutable/index.d.ts --- types/redux-immutable/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/redux-immutable/index.d.ts b/types/redux-immutable/index.d.ts index 17451330c4..32c236a6a5 100644 --- a/types/redux-immutable/index.d.ts +++ b/types/redux-immutable/index.d.ts @@ -7,8 +7,8 @@ // TypeScript Version: 2.3 declare module 'redux-immutable' { - import { ReducersMapObject, Reducer, Action } from 'redux'; import { Collection, Record as ImmutableRecord } from 'immutable'; + import { ReducersMapObject, Reducer, Action } from 'redux'; export function combineReducers(reducers: ReducersMapObject, getDefaultState?: () => Collection.Keyed): Reducer; export function combineReducers(reducers: ReducersMapObject, getDefaultState?: () => Collection.Indexed): Reducer; From ed692c8bef233b608d4f53b7ee96963ac494ddee Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Fri, 18 Mar 2022 16:23:14 -0500 Subject: [PATCH 15/23] Fix build >:( --- app/soapbox/actions/instance.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/soapbox/actions/instance.ts b/app/soapbox/actions/instance.ts index 2eb20f80fb..150e9cc863 100644 --- a/app/soapbox/actions/instance.ts +++ b/app/soapbox/actions/instance.ts @@ -1,5 +1,4 @@ import { get } from 'lodash'; -import { AnyAction } from 'redux'; import KVStore from 'soapbox/storage/kv_store'; import { AppDispatch, RootState } from 'soapbox/store'; @@ -37,7 +36,7 @@ export const getHost = (state: RootState) => { }; export function rememberInstance(host: string) { - return (dispatch: AppDispatch, _getState: () => RootState): AnyAction => { + return (dispatch: AppDispatch, _getState: () => RootState) => { dispatch({ type: INSTANCE_REMEMBER_REQUEST, host }); return KVStore.getItemOrError(`instance:${host}`).then((instance: Record) => { dispatch({ type: INSTANCE_REMEMBER_SUCCESS, host, instance }); From 5248b20547834e6823171f8545cfa9710f6d7da7 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 19 Mar 2022 12:54:10 -0500 Subject: [PATCH 16/23] Improve redux-immutable type definition --- types/redux-immutable/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/redux-immutable/index.d.ts b/types/redux-immutable/index.d.ts index 32c236a6a5..80d00209a0 100644 --- a/types/redux-immutable/index.d.ts +++ b/types/redux-immutable/index.d.ts @@ -7,11 +7,11 @@ // TypeScript Version: 2.3 declare module 'redux-immutable' { - import { Collection, Record as ImmutableRecord } from 'immutable'; + import { Collection, Record } from 'immutable'; import { ReducersMapObject, Reducer, Action } from 'redux'; export function combineReducers(reducers: ReducersMapObject, getDefaultState?: () => Collection.Keyed): Reducer; export function combineReducers(reducers: ReducersMapObject, getDefaultState?: () => Collection.Indexed): Reducer; export function combineReducers(reducers: ReducersMapObject, getDefaultState?: () => Collection.Indexed): Reducer; - export function combineReducers(reducers: ReducersMapObject, getDefaultState?: () => ImmutableRecord): Reducer; + export function combineReducers(reducers: ReducersMapObject, getDefaultState?: Record.Factory): Reducer; } From 09b9df7c80c092a6e91277b223d4f7a95d411bc7 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 19 Mar 2022 13:20:00 -0500 Subject: [PATCH 17/23] Add Tailwind --- .stylelintrc.json | 2 +- package.json | 7 +- postcss.config.js | Bin 162 -> 183 bytes tailwind.config.js | Bin 0 -> 835 bytes yarn.lock | 276 ++++++++++++++++++++++++++++++++++++++++----- 5 files changed, 255 insertions(+), 30 deletions(-) create mode 100644 tailwind.config.js diff --git a/.stylelintrc.json b/.stylelintrc.json index ee76edfede..c164e29688 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -10,6 +10,6 @@ "font-family-no-missing-generic-family-keyword": [true, { "ignoreFontFamilies": ["ForkAwesome", "Font Awesome 5 Free", "OpenDyslexic", "soapbox"] }], "no-descending-specificity": null, "no-duplicate-selectors": null, - "scss/at-rule-no-unknown": true + "scss/at-rule-no-unknown": [true, { "ignoreAtRules": ["/tailwind/"]}] } } diff --git a/package.json b/package.json index 6d8353b28d..81a861e973 100644 --- a/package.json +++ b/package.json @@ -59,11 +59,13 @@ "@sentry/react": "^6.12.0", "@sentry/tracing": "^6.12.0", "@tabler/icons": "^1.53.0", + "@tailwindcss/forms": "^0.4.0", + "@tailwindcss/typography": "^0.5.1", "@types/escape-html": "^1.0.1", "@types/http-link-header": "^1.0.3", "@types/lodash": "^4.14.180", "array-includes": "^3.0.3", - "autoprefixer": "^10.0.0", + "autoprefixer": "^10.4.2", "axios": "^0.21.4", "babel-loader": "^8.2.2", "babel-plugin-lodash": "^3.3.4", @@ -116,7 +118,7 @@ "object-fit-images": "^3.2.3", "object.values": "^1.1.0", "path-browserify": "^1.0.1", - "postcss": "^8.1.1", + "postcss": "^8.4.5", "postcss-loader": "^4.0.3", "postcss-object-fit-images": "^1.1.2", "process": "^0.11.10", @@ -196,6 +198,7 @@ "stylelint": "^13.7.2", "stylelint-config-standard": "^22.0.0", "stylelint-scss": "^3.18.0", + "tailwindcss": "^3.0.15", "ts-jest": "^27.0.5", "webpack-dev-server": "^4.1.0", "yargs": "^16.0.3" diff --git a/postcss.config.js b/postcss.config.js index 1c820c3181b19f05ce82f4178b78950fea2212f9..82c50dee7a1a411453fda80802350928b939a3c4 100644 GIT binary patch delta 26 hcmZ3)xSer=kw8geW=?r#UP^Ltv6Vt~tkg#2RBgf_KOBNs{=@rr-4T8_ij3t6JJ#*}++~j5Z>2 zHxm(#zzG>q%CS&ykQ-vX08}UuV|98pfE)4cpp#^U*lKuWP`@`gLu_r(u-`jF88fKU z?Y1j+u-yPKGxHjYvLV3A1PJJNHG zyC^zYC&Q*@L9%ivP)c2^bQMavs+Ux*G;%kkb?lneGIYyoz4XXvyql3QD88JSIQ4pf zYk}}Kt{D?!ZR1! zKM7A`{#y%jz7&_nxNKXTIy+YN-$L8|?0g*y#iO_-EL~H30?U6W@gt=Yubc->DEp#u f6e{JfgyhP(E@NMo=sXc?Ns>)o>K3iW;jZxmvdGd* literal 0 HcmV?d00001 diff --git a/yarn.lock b/yarn.lock index e9ff6a5002..6a8b8f0e44 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1772,6 +1772,22 @@ resolved "https://registry.yarnpkg.com/@tabler/icons/-/icons-1.53.0.tgz#51536e01b343cfaf26b701df306b2c0369769e3c" integrity sha512-Skk1BqXEOEhiRsXJgZBYtjFa/+4dMSFA5UyzTUW20oyyUSd3iizhEWrYt0jT87iFu771gWoqVV2/OGobBcGjgQ== +"@tailwindcss/forms@^0.4.0": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@tailwindcss/forms/-/forms-0.4.1.tgz#5a47ccd60490cbba84e662f2b9cf3d71a5126d17" + integrity sha512-gS9xjCmJjUBz/eP12QlENPLnf0tCx68oYE3mri0GMP5jdtVwLbGUNSRpjsp6NzLAZzZy3ueOwrcqB78Ax6Z84A== + dependencies: + mini-svg-data-uri "^1.2.3" + +"@tailwindcss/typography@^0.5.1": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@tailwindcss/typography/-/typography-0.5.2.tgz#24b069dab24d7a2467d01aca0dd432cb4b29f0ee" + integrity sha512-coq8DBABRPFcVhVIk6IbKyyHUt7YTEC/C992tatFB+yEx5WGBQrCgsSFjxHUr8AWXphWckadVJbominEduYBqw== + dependencies: + lodash.castarray "^4.4.0" + lodash.isplainobject "^4.0.6" + lodash.merge "^4.6.2" + "@tootallnate/once@1": version "1.1.2" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" @@ -2275,7 +2291,16 @@ acorn-jsx@^5.3.1: resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== -acorn-walk@^7.1.1: +acorn-node@^1.6.1: + version "1.8.2" + resolved "https://registry.yarnpkg.com/acorn-node/-/acorn-node-1.8.2.tgz#114c95d64539e53dede23de8b9d96df7c7ae2af8" + integrity sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A== + dependencies: + acorn "^7.0.0" + acorn-walk "^7.0.0" + xtend "^4.0.2" + +acorn-walk@^7.0.0, acorn-walk@^7.1.1: version "7.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== @@ -2285,7 +2310,7 @@ acorn-walk@^8.0.0: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^7.1.1, acorn@^7.4.0: +acorn@^7.0.0, acorn@^7.1.1, acorn@^7.4.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== @@ -2419,6 +2444,11 @@ anymatch@^3.0.3, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +arg@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.1.tgz#eb0c9a8f77786cad2af8ff2b862899842d7b6adb" + integrity sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -2550,17 +2580,17 @@ at-least-node@^1.0.0: resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== -autoprefixer@^10.0.0: - version "10.3.4" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.3.4.tgz#29efe5d19f51c281953178ddb5b84c5f1ca24c86" - integrity sha512-EKjKDXOq7ug+jagLzmnoTRpTT0q1KVzEJqrJd0hCBa7FiG0WbFOBCcJCy2QkW1OckpO3qgttA1aWjVbeIPAecw== +autoprefixer@^10.4.2: + version "10.4.4" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.4.tgz#3e85a245b32da876a893d3ac2ea19f01e7ea5a1e" + integrity sha512-Tm8JxsB286VweiZ5F0anmbyGiNI3v3wGv3mz9W+cxEDYB/6jbnj6GM9H9mK3wIL8ftgl+C07Lcwb8PG5PCCPzA== dependencies: - browserslist "^4.16.8" - caniuse-lite "^1.0.30001252" - colorette "^1.3.0" - fraction.js "^4.1.1" + browserslist "^4.20.2" + caniuse-lite "^1.0.30001317" + fraction.js "^4.2.0" normalize-range "^0.1.2" - postcss-value-parser "^4.1.0" + picocolors "^1.0.0" + postcss-value-parser "^4.2.0" autoprefixer@^9.8.6: version "9.8.6" @@ -2885,7 +2915,7 @@ browser-process-hrtime@^1.0.0: resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== -browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.16.8, browserslist@^4.17.0: +browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.17.0: version "4.17.0" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.17.0.tgz#1fcd81ec75b41d6d4994fb0831b92ac18c01649c" integrity sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g== @@ -2896,6 +2926,17 @@ browserslist@^4.0.0, browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4 escalade "^3.1.1" node-releases "^1.1.75" +browserslist@^4.20.2: + version "4.20.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.2.tgz#567b41508757ecd904dab4d1c646c612cd3d4f88" + integrity sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA== + dependencies: + caniuse-lite "^1.0.30001317" + electron-to-chromium "^1.4.84" + escalade "^3.1.1" + node-releases "^2.0.2" + picocolors "^1.0.0" + bs-logger@0.x: version "0.2.6" resolved "https://registry.yarnpkg.com/bs-logger/-/bs-logger-0.2.6.tgz#eb7d365307a72cf974cc6cda76b68354ad336bd8" @@ -2970,6 +3011,11 @@ camel-case@^4.1.1: pascal-case "^3.1.2" tslib "^2.0.3" +camelcase-css@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/camelcase-css/-/camelcase-css-2.0.1.tgz#ee978f6947914cc30c6b44741b6ed1df7f043fd5" + integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== + camelcase-keys@^6.2.2: version "6.2.2" resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-6.2.2.tgz#5e755d6ba51aa223ec7d3d52f25778210f9dc3c0" @@ -2999,11 +3045,16 @@ caniuse-api@^3.0.0: lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" -caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001252, caniuse-lite@^1.0.30001254: +caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001254: version "1.0.30001317" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001317.tgz" integrity sha512-xIZLh8gBm4dqNX0gkzrBeyI86J2eCjWzYAs40q88smG844YIrN4tVQl/RhquHvKEKImWWFIVh1Lxe5n1G/N+GQ== +caniuse-lite@^1.0.30001317: + version "1.0.30001319" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001319.tgz#eb4da4eb3ecdd409f7ba1907820061d56096e88f" + integrity sha512-xjlIAFHucBRSMUo1kb5D4LYgcN1M45qdKP++lhqowDpwJwGkpIRTt5qQqnhxjj1vHcI7nrJxWhCC1ATrCEBTcw== + catharsis@^0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/catharsis/-/catharsis-0.9.0.tgz#40382a168be0e6da308c277d3a2b3eb40c7d2121" @@ -3031,7 +3082,7 @@ chalk@^2.0.0, chalk@^2.3.2, chalk@^2.4.1, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^4.0, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1: +chalk@^4.0, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== @@ -3098,7 +3149,7 @@ cheerio@^1.0.0-rc.10, cheerio@^1.0.0-rc.3: optionalDependencies: fsevents "~2.3.2" -chokidar@^3.4.2: +chokidar@^3.4.2, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== @@ -3228,7 +3279,7 @@ color-name@1.1.3: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-name@^1.0.0, color-name@~1.1.4: +color-name@^1.0.0, color-name@^1.1.4, color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== @@ -3402,7 +3453,7 @@ cosmiconfig@^6.0.0: path-type "^4.0.0" yaml "^1.7.2" -cosmiconfig@^7.0.0: +cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== @@ -3771,6 +3822,11 @@ define-properties@^1.1.3: dependencies: object-keys "^1.0.12" +defined@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" + integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= + del@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/del/-/del-6.0.0.tgz#0b40d0332cea743f1614f818be4feb717714c952" @@ -3822,6 +3878,20 @@ detect-passive-events@^2.0.0: dependencies: detect-it "^4.0.1" +detective@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/detective/-/detective-5.2.0.tgz#feb2a77e85b904ecdea459ad897cc90a99bd2a7b" + integrity sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg== + dependencies: + acorn-node "^1.6.1" + defined "^1.0.0" + minimist "^1.1.1" + +didyoumean@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/didyoumean/-/didyoumean-1.2.2.tgz#989346ffe9e839b4555ecf5666edea0d3e8ad037" + integrity sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw== + diff-sequences@^27.0.6: version "27.0.6" resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.6.tgz#3305cb2e55a033924054695cc66019fd7f8e5723" @@ -3844,6 +3914,11 @@ discontinuous-range@1.0.0: resolved "https://registry.yarnpkg.com/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a" integrity sha1-44Mx8IRLukm5qctxx3FYWqsbxlo= +dlv@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/dlv/-/dlv-1.1.3.tgz#5c198a8a11453596e751494d49874bc7732f2e79" + integrity sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA== + dns-equal@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d" @@ -3997,6 +4072,11 @@ electron-to-chromium@^1.3.830: resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.840.tgz#3f2a1df97015d9b1db5d86a4c6bd4cdb920adcbb" integrity sha512-yRoUmTLDJnkIJx23xLY7GbSvnmDCq++NSuxHDQ0jiyDJ9YZBUGJcrdUqm+ZwZFzMbCciVzfem2N2AWiHJcWlbw== +electron-to-chromium@^1.4.84: + version "1.4.88" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.88.tgz#ebe6a2573b563680c7a7bf3a51b9e465c9c501db" + integrity sha512-oA7mzccefkvTNi9u7DXmT0LqvhnOiN2BhSrKerta7HeUC1cLoIwtbf2wL+Ah2ozh5KQd3/1njrGrwDBXx6d14Q== + emittery@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/emittery/-/emittery-0.8.1.tgz#bb23cc86d03b30aa75a7f734819dee2e1ba70860" @@ -4642,7 +4722,7 @@ fast-glob@^3.1.1, fast-glob@^3.2.5: merge2 "^1.3.0" micromatch "^4.0.4" -fast-glob@^3.2.9: +fast-glob@^3.2.11, fast-glob@^3.2.9: version "3.2.11" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== @@ -4804,10 +4884,10 @@ forwarded@0.2.0: resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== -fraction.js@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.1.1.tgz#ac4e520473dae67012d618aab91eda09bcb400ff" - integrity sha512-MHOhvvxHTfRFpF1geTK9czMIZ6xclsEor2wkIGYYq+PxcQqT7vStJqjhe6S1TenZrMZzo+wlqOufBDVepUEgPg== +fraction.js@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.2.0.tgz#448e5109a313a3527f5a3ab2119ec4cf0e0e2950" + integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA== fresh@0.5.2: version "0.5.2" @@ -4934,6 +5014,13 @@ glob-parent@^6.0.0: dependencies: is-glob "^4.0.1" +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob-to-regexp@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" @@ -5652,7 +5739,7 @@ is-core-module@^2.2.0, is-core-module@^2.5.0: dependencies: has "^1.0.3" -is-core-module@^2.8.0: +is-core-module@^2.8.0, is-core-module@^2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== @@ -6674,6 +6761,11 @@ lie@3.1.1: dependencies: immediate "~3.0.5" +lilconfig@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/lilconfig/-/lilconfig-2.0.4.tgz#f4507d043d7058b380b6a8f5cb7bcd4b34cee082" + integrity sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA== + line-awesome@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/line-awesome/-/line-awesome-1.3.0.tgz#51d59fe311ed040d22d8e80d3aa0b9a4b57e6cd3" @@ -6791,6 +6883,11 @@ lodash-es@^4.17.15: resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== +lodash.castarray@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.castarray/-/lodash.castarray-4.4.0.tgz#c02513515e309daddd4c24c60cfddcf5976d9115" + integrity sha1-wCUTUV4wna3dTCTGDP3c9ZdtkRU= + lodash.clonedeep@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" @@ -7142,6 +7239,11 @@ mini-css-extract-plugin@^1.6.2: schema-utils "^3.0.0" webpack-sources "^1.1.0" +mini-svg-data-uri@^1.2.3: + version "1.4.4" + resolved "https://registry.yarnpkg.com/mini-svg-data-uri/-/mini-svg-data-uri-1.4.4.tgz#8ab0aabcdf8c29ad5693ca595af19dd2ead09939" + integrity sha512-r9deDe9p5FJUPZAk3A59wGH7Ii9YrjjWw0jmw/liSbHl2CHiyXj6FcDXDu2K3TjVAXqiJdaw3xxwlZZr9E6nHg== + minimalistic-assert@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -7163,7 +7265,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.2.0, minimist@^1.2.5: +minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -7228,6 +7330,11 @@ nanoid@^3.1.23: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.25.tgz#09ca32747c0e543f0e1814b7d3793477f9c8e152" integrity sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q== +nanoid@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.1.tgz#6347a18cac88af88f58af0b3594b723d5e99bb35" + integrity sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -7286,6 +7393,11 @@ node-releases@^1.1.75: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.75.tgz#6dd8c876b9897a1b8e5a02de26afa79bb54ebbfe" integrity sha512-Qe5OUajvqrqDSy6wrWFmMwfJ0jVgwiw4T3KqmbTcZ62qW0gQkheXYhcFM1+lOVcGUoRxcEcfyvFMAnDgaF1VWw== +node-releases@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.2.tgz#7139fe71e2f4f11b47d4d2986aaf8c48699e0c01" + integrity sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg== + normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" @@ -7367,6 +7479,11 @@ object-fit-images@^3.2.3: resolved "https://registry.yarnpkg.com/object-fit-images/-/object-fit-images-3.2.4.tgz#6c299d38fdf207746e5d2d46c2877f6f25d15b52" integrity sha512-G+7LzpYfTfqUyrZlfrou/PLLLAPNC52FTy5y1CBywX+1/FkxIloOyQXBmZ3Zxa2AWO+lMF0JTuvqbr7G5e5CWg== +object-hash@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-2.2.0.tgz#5ad518581eefc443bd763472b8ff2e9c2c0d54a5" + integrity sha512-gScRMn0bS5fH+IuwyIFgnh9zBdo4DV+6GhygmWM9HyNJSgS0hScp1f5vjtm7oIIOiT9trXrShAkLFSc2IqKNgw== + object-inspect@^1.11.0, object-inspect@^1.7.0, object-inspect@^1.9.0: version "1.11.0" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" @@ -7704,7 +7821,7 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.6: +path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== @@ -7736,6 +7853,11 @@ performance-now@^2.1.0: resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: version "2.3.0" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" @@ -7834,6 +7956,13 @@ postcss-html@^0.36.0: dependencies: htmlparser2 "^3.10.0" +postcss-js@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/postcss-js/-/postcss-js-4.0.0.tgz#31db79889531b80dc7bc9b0ad283e418dce0ac00" + integrity sha512-77QESFBwgX4irogGVPgQ5s07vLvFqWr228qZY+w6lW599cRlK/HmnlivnnVUxkjHnCu4J16PDMHcH+e+2HbvTQ== + dependencies: + camelcase-css "^2.0.1" + postcss-less@^3.1.4: version "3.1.4" resolved "https://registry.yarnpkg.com/postcss-less/-/postcss-less-3.1.4.tgz#369f58642b5928ef898ffbc1a6e93c958304c5ad" @@ -7841,6 +7970,14 @@ postcss-less@^3.1.4: dependencies: postcss "^7.0.14" +postcss-load-config@^3.1.0: + version "3.1.3" + resolved "https://registry.yarnpkg.com/postcss-load-config/-/postcss-load-config-3.1.3.tgz#21935b2c43b9a86e6581a576ca7ee1bde2bd1d23" + integrity sha512-5EYgaM9auHGtO//ljHH+v/aC/TQ5LHXtL7bQajNAUBKUVKiYE8rYpFms7+V26D9FncaGe2zwCoPQsFKb5zF/Hw== + dependencies: + lilconfig "^2.0.4" + yaml "^1.10.2" + postcss-loader@^4.0.3: version "4.3.0" resolved "https://registry.yarnpkg.com/postcss-loader/-/postcss-loader-4.3.0.tgz#2c4de9657cd4f07af5ab42bd60a673004da1b8cc" @@ -7947,6 +8084,13 @@ postcss-modules-values@^4.0.0: dependencies: icss-utils "^5.0.0" +postcss-nested@5.0.6: + version "5.0.6" + resolved "https://registry.yarnpkg.com/postcss-nested/-/postcss-nested-5.0.6.tgz#466343f7fc8d3d46af3e7dba3fcd47d052a945bc" + integrity sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA== + dependencies: + postcss-selector-parser "^6.0.6" + postcss-normalize-charset@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-4.0.1.tgz#8b35add3aee83a136b0471e0d59be58a50285dd4" @@ -8110,6 +8254,14 @@ postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector cssesc "^3.0.0" util-deprecate "^1.0.2" +postcss-selector-parser@^6.0.6, postcss-selector-parser@^6.0.9: + version "6.0.9" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz#ee71c3b9ff63d9cd130838876c13a2ec1a992b2f" + integrity sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + postcss-svgo@^4.0.3: version "4.0.3" resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-4.0.3.tgz#343a2cdbac9505d416243d496f724f38894c941e" @@ -8143,6 +8295,11 @@ postcss-value-parser@^4.0.2, postcss-value-parser@^4.1.0: resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== +postcss-value-parser@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" + integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== + postcss@^5.0.16: version "5.2.18" resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5" @@ -8162,7 +8319,7 @@ postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, postcss@^7.0.2, postcss@^7.0.21 source-map "^0.6.1" supports-color "^6.1.0" -postcss@^8.1.1, postcss@^8.2.15: +postcss@^8.2.15: version "8.3.6" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.6.tgz#2730dd76a97969f37f53b9a6096197be311cc4ea" integrity sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A== @@ -8171,6 +8328,15 @@ postcss@^8.1.1, postcss@^8.2.15: nanoid "^3.1.23" source-map-js "^0.6.2" +postcss@^8.4.5, postcss@^8.4.6: + version "8.4.12" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.12.tgz#1e7de78733b28970fa4743f7da6f3763648b1905" + integrity sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg== + dependencies: + nanoid "^3.3.1" + picocolors "^1.0.0" + source-map-js "^1.0.2" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -8319,6 +8485,11 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== +quick-lru@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932" + integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA== + quote@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/quote/-/quote-0.4.0.tgz#10839217f6c1362b89194044d29b233fd7f32f01" @@ -8973,6 +9144,15 @@ resolve@^1.10.0, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.20.0, resolve@^1.9 is-core-module "^2.2.0" path-parse "^1.0.6" +resolve@^1.22.0: + version "1.22.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" + integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== + dependencies: + is-core-module "^2.8.1" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + resolve@^2.0.0-next.3: version "2.0.0-next.3" resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.3.tgz#d41016293d4a8586a39ca5d9b5f15cbea1f55e46" @@ -9340,6 +9520,11 @@ source-map-js@^0.6.2: resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-0.6.2.tgz#0bb5de631b41cfbda6cfba8bd05a80efdfd2385e" integrity sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug== +source-map-js@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c" + integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== + source-map-support@^0.5.20, source-map-support@^0.5.6, source-map-support@~0.5.12, source-map-support@~0.5.20: version "0.5.20" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.20.tgz#12166089f8f5e5e8c56926b377633392dd2cb6c9" @@ -9744,6 +9929,11 @@ supports-hyperlinks@^2.0.0: has-flag "^4.0.0" supports-color "^7.0.0" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + svg-tags@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/svg-tags/-/svg-tags-1.0.0.tgz#58f71cee3bd519b59d4b2a843b6c7de64ac04764" @@ -9790,6 +9980,33 @@ taffydb@2.6.2: resolved "https://registry.yarnpkg.com/taffydb/-/taffydb-2.6.2.tgz#7cbcb64b5a141b6a2efc2c5d2c67b4e150b2a268" integrity sha1-fLy2S1oUG2ou/CxdLGe04VCyomg= +tailwindcss@^3.0.15: + version "3.0.23" + resolved "https://registry.yarnpkg.com/tailwindcss/-/tailwindcss-3.0.23.tgz#c620521d53a289650872a66adfcb4129d2200d10" + integrity sha512-+OZOV9ubyQ6oI2BXEhzw4HrqvgcARY38xv3zKcjnWtMIZstEsXdI9xftd1iB7+RbOnj2HOEzkA0OyB5BaSxPQA== + dependencies: + arg "^5.0.1" + chalk "^4.1.2" + chokidar "^3.5.3" + color-name "^1.1.4" + cosmiconfig "^7.0.1" + detective "^5.2.0" + didyoumean "^1.2.2" + dlv "^1.1.3" + fast-glob "^3.2.11" + glob-parent "^6.0.2" + is-glob "^4.0.3" + normalize-path "^3.0.0" + object-hash "^2.2.0" + postcss "^8.4.6" + postcss-js "^4.0.0" + postcss-load-config "^3.1.0" + postcss-nested "5.0.6" + postcss-selector-parser "^6.0.9" + postcss-value-parser "^4.2.0" + quick-lru "^5.1.1" + resolve "^1.22.0" + tapable@^1.0.0: version "1.1.3" resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.1.3.tgz#a1fccc06b58db61fd7a45da2da44f5f3a3e67ba2" @@ -10684,6 +10901,11 @@ xmlcreate@^2.0.3: resolved "https://registry.yarnpkg.com/xmlcreate/-/xmlcreate-2.0.3.tgz#df9ecd518fd3890ab3548e1b811d040614993497" integrity sha512-HgS+X6zAztGa9zIK3Y3LXuJes33Lz9x+YyTxgrkIdabu2vqcGOWwdfCpf1hWLRrd553wd4QCDf6BBO6FfdsRiQ== +xtend@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + y18n@^5.0.5: version "5.0.8" resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" @@ -10694,7 +10916,7 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@^1.10.0, yaml@^1.7.2: +yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: version "1.10.2" resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== From b71a592f9595f4c4b26a1ddb0ca47b71afb437f2 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 19 Mar 2022 14:22:52 -0500 Subject: [PATCH 18/23] Typescript: reducers/accounts.ts --- app/soapbox/normalizers/account.ts | 3 +-- .../reducers/{accounts.js => accounts.ts} | Bin 7311 -> 8300 bytes 2 files changed, 1 insertion(+), 2 deletions(-) rename app/soapbox/reducers/{accounts.js => accounts.ts} (73%) diff --git a/app/soapbox/normalizers/account.ts b/app/soapbox/normalizers/account.ts index 1c536ee4ab..41dd1dd0f3 100644 --- a/app/soapbox/normalizers/account.ts +++ b/app/soapbox/normalizers/account.ts @@ -13,7 +13,6 @@ import { import emojify from 'soapbox/features/emoji/emoji'; import { normalizeEmoji } from 'soapbox/normalizers/emoji'; -import { IAccount } from 'soapbox/types'; import { acctFull } from 'soapbox/utils/accounts'; import { unescapeHTML } from 'soapbox/utils/html'; import { mergeDefined, makeEmojiMap } from 'soapbox/utils/normalizers'; @@ -200,7 +199,7 @@ const normalizeFqn = (account: ImmutableMap) => { return account.set('fqn', acctFull(account)); }; -export const normalizeAccount = (account: Record): IAccount => { +export const normalizeAccount = (account: Record) => { return AccountRecord( ImmutableMap(fromJS(account)).withMutations(account => { normalizePleromaLegacyFields(account); diff --git a/app/soapbox/reducers/accounts.js b/app/soapbox/reducers/accounts.ts similarity index 73% rename from app/soapbox/reducers/accounts.js rename to app/soapbox/reducers/accounts.ts index de7926febb8c6997c59d9d8be00b107caf9d0067..cea4603af383f7f524e9e7000c95e5e50e896222 100644 GIT binary patch delta 1522 zcmc&!&ubGw6b4OVU5kn)RxHAxhi)(!L`rd+h6F4UNWml(^;9OCX&lJTE;F;mwMr3B zdQf4&v;Tkx$seGnp8QWNc=OOpefu-pZIpTtk2CLm?|biiKi=KhYrKDmsO8vPqHWY< zUelD+X6Oal-QNoO!FS zxmWWB3h1G_1QREy+W8NatX&uraoSYKS|lR~RablY*A)#R;TIGG;cY&_61d~I6%8^8 zSk=oyTaO(BHwYj5foQQGTB&PDZ4^uDM`2@a3PY59YvAJpnZs_>{d6QA9{r9(t4{H; z`f}>_6@4pPSrnqI_GhlD^E0degP1NS^8CI==$)inpm^W5M+CD}Z9;uN-MDPP9t1-g z&uCPdx}kMDe=Da$xJ8A4CA`ON*D;{o!G27-`cXUhCsDttx3kqn9SqI0qUR2WL`X82Hb=X+q9Aam tl9K~l?%xgn9)q6oX-=}OmVQ>U*H+&~E_9Az3&u5s-i$xSk1j10egSA}5uyM9 delta 491 zcmaFk&~G^*d}Eaw3vY6MUU7*+W?p7VW@66d#jN`5iOI?NrFkWj<%Gp23$W#I>L|cO zrn61sg7b Date: Sat, 19 Mar 2022 14:41:16 -0500 Subject: [PATCH 19/23] Typescript: reducers/statuses.ts --- app/soapbox/normalizers/status.ts | 3 +-- .../reducers/{statuses.js => statuses.ts} | Bin 6913 -> 7365 bytes 2 files changed, 1 insertion(+), 2 deletions(-) rename app/soapbox/reducers/{statuses.js => statuses.ts} (69%) diff --git a/app/soapbox/normalizers/status.ts b/app/soapbox/normalizers/status.ts index 8db44ba397..21cdb42bde 100644 --- a/app/soapbox/normalizers/status.ts +++ b/app/soapbox/normalizers/status.ts @@ -15,7 +15,6 @@ import { normalizeCard } from 'soapbox/normalizers/card'; import { normalizeEmoji } from 'soapbox/normalizers/emoji'; import { normalizeMention } from 'soapbox/normalizers/mention'; import { normalizePoll } from 'soapbox/normalizers/poll'; -import { IStatus } from 'soapbox/types'; // https://docs.joinmastodon.org/entities/status/ export const StatusRecord = ImmutableRecord({ @@ -136,7 +135,7 @@ const fixQuote = (status: ImmutableMap) => { }); }; -export const normalizeStatus = (status: Record): IStatus => { +export const normalizeStatus = (status: Record) => { return StatusRecord( ImmutableMap(fromJS(status)).withMutations(status => { normalizeAttachments(status); diff --git a/app/soapbox/reducers/statuses.js b/app/soapbox/reducers/statuses.ts similarity index 69% rename from app/soapbox/reducers/statuses.js rename to app/soapbox/reducers/statuses.ts index 957640c9cdb1ce83c43aae60a469ced2cf8ece2a..0005adb80b0c0212bf889a19ea0feb777a8fbadd 100644 GIT binary patch delta 1234 zcmbVM&1(}u6i55LNt&uyYN0Seu?d7dX`xA*8c?){g0@9HC}F$%l1|y3S!ZTT)*?ml zCW`oOqF3)yZ{7qE@gj&<{{&Cs+1YG9mzIiqntAW{e((1_W*;wnT70o{nLHwO!96lh zJugt!mJ9P`gL*y}itLdp3#+!GoONLWoS^yc$?Ktg75YFnl%)c>4mKAKStjeC0>L)5 zXDM>?I$>ORmP;Q(jI5N6R$TSw>NTdQ3R^)@^paG9vPO|uEKH&(NR6usVTDVb$V(9_ zCX1*+16DgFtXY1Su3upV=Z0r4 zvmQp3rE4@J5=J@_{Xs}A%H}W9h3h;dDdi%7SdcPk>L9sj2&MJk)qh^+%j;h_$ zBhXbzb(9=E=V)obY(Tev)G3rPO#dkVzXrfYrifQ3XYe3HRuVj**Q`^Gek{k;1NbZR z%Uk&LH%w=a%y=);aW^38J%>$-NgazIfhyuRJ u-uY*&JGFVTMDWAZ?K7IT^TTO(9u7{Qx;UQB_aqiDGkX_bo(q%4-+uu-oU;Z1 delta 665 zcmZ`$ziSjh6eeoC+xxM(oSrecD079*jw}gS1cHcmdJ=?ig@VLoy?tjU?9Qw^vvOxH zMS6w6vl1npf}KPxEGz{70IPt#jfE)K3hvEDlN5H3_rCXi@B7}T#m$ASwHcT65*gj- zkPTB1%A+XN{=E?1Y(GDWKaVwzEA8u4?OYfijN$ic%OaOa&kq$av_xgM4hecK+wRP#Au&FE(AXn<`K)fqv|Zpp!pCF`S=xQgaCp zT#`T!5)fTb_-*3ZNtdh>F1!TdaNuc~IUyVPy5@~{WhykDp1k#62)=3%JX>GHyY=NU Ww)3%mzIcQO__=u-mzsmT{PhPq>g5Um From 47653546de16648e1faf2352ac875968ff6ec9fd Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 19 Mar 2022 15:04:28 -0500 Subject: [PATCH 20/23] Statuses reducer: refactor search_index --- app/soapbox/reducers/statuses.ts | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/app/soapbox/reducers/statuses.ts b/app/soapbox/reducers/statuses.ts index 0005adb80b..569cc75527 100644 --- a/app/soapbox/reducers/statuses.ts +++ b/app/soapbox/reducers/statuses.ts @@ -3,9 +3,9 @@ import { Map as ImmutableMap, List as ImmutableList } from 'immutable'; import { AnyAction } from 'redux'; import emojify from 'soapbox/features/emoji/emoji'; -import { normalizeStatus } from 'soapbox/normalizers/status'; +import { normalizeStatus } from 'soapbox/normalizers'; import { simulateEmojiReact, simulateUnEmojiReact } from 'soapbox/utils/emoji_reacts'; -import { stripCompatibilityFeatures } from 'soapbox/utils/html'; +import { stripCompatibilityFeatures, unescapeHTML } from 'soapbox/utils/html'; import { makeEmojiMap } from 'soapbox/utils/normalizers'; import { @@ -49,9 +49,26 @@ const minifyStatus = (status: StatusRecord): StatusRecord => { }); }; +// Gets titles of poll options from status +const getPollOptionTitles = (status: StatusRecord): Array => { + return status.poll?.options.map(({ title }: { title: string }) => title); +}; + +// Creates search text from the status +const buildSearchContent = (status: StatusRecord): string => { + const pollOptionTitles = getPollOptionTitles(status); + + const fields = ImmutableList([ + status.spoiler_text, + status.content, + ]).concat(pollOptionTitles); + + return unescapeHTML(fields.join('\n\n')); +}; + // Only calculate these values when status first encountered // Otherwise keep the ones already in the reducer -export const calculateStatus = ( +const calculateStatus = ( status: StatusRecord, oldStatus: StatusRecord, expandSpoilers: boolean = false, @@ -65,7 +82,7 @@ export const calculateStatus = ( }); } else { const spoilerText = status.spoiler_text; - const searchContent = (ImmutableList([spoilerText, status.content]).concat(status.poll?.options).map(option => option.title)).join('\n\n').replace(//g, '\n').replace(/<\/p>

/g, '\n\n'); + const searchContent = buildSearchContent(status); const emojiMap = makeEmojiMap(status.emojis); return status.merge({ From a59daacc042212d28e87666b8c439a279dd57d05 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 19 Mar 2022 17:29:46 -0500 Subject: [PATCH 21/23] Fix calculateStatus export --- app/soapbox/reducers/statuses.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/soapbox/reducers/statuses.ts b/app/soapbox/reducers/statuses.ts index 569cc75527..059e153daf 100644 --- a/app/soapbox/reducers/statuses.ts +++ b/app/soapbox/reducers/statuses.ts @@ -68,7 +68,7 @@ const buildSearchContent = (status: StatusRecord): string => { // Only calculate these values when status first encountered // Otherwise keep the ones already in the reducer -const calculateStatus = ( +export const calculateStatus = ( status: StatusRecord, oldStatus: StatusRecord, expandSpoilers: boolean = false, From b3de700732c5775fc2b170b3dba86de3bd034f30 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 20 Mar 2022 18:41:47 -0500 Subject: [PATCH 22/23] Fix Soapbox Config --- .../__fixtures__/pleroma-admin-config.json | 3120 +++++++++++++++++ .../reducers/__tests__/instance-test.js | Bin 3185 -> 3845 bytes app/soapbox/reducers/instance.ts | 4 +- 3 files changed, 3122 insertions(+), 2 deletions(-) create mode 100644 app/soapbox/__fixtures__/pleroma-admin-config.json diff --git a/app/soapbox/__fixtures__/pleroma-admin-config.json b/app/soapbox/__fixtures__/pleroma-admin-config.json new file mode 100644 index 0000000000..8e17d1e7ba --- /dev/null +++ b/app/soapbox/__fixtures__/pleroma-admin-config.json @@ -0,0 +1,3120 @@ +{ + "configs": [ + { + "group": ":pleroma", + "key": ":ecto_repos", + "value": [ + "Pleroma.Repo" + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Captcha", + "value": [ + { + "tuple": [ + ":enabled", + true + ] + }, + { + "tuple": [ + ":seconds_valid", + 300 + ] + }, + { + "tuple": [ + ":method", + "Pleroma.Captcha.Native" + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Captcha.Kocaptcha", + "value": [ + { + "tuple": [ + ":endpoint", + "https://captcha.kotobank.ch" + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Uploaders.S3", + "value": [ + { + "tuple": [ + ":bucket", + null + ] + }, + { + "tuple": [ + ":bucket_namespace", + null + ] + }, + { + "tuple": [ + ":truncated_namespace", + null + ] + }, + { + "tuple": [ + ":streaming_enabled", + true + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":emoji", + "value": [ + { + "tuple": [ + ":shortcode_globs", + [ + "/emoji/custom/**/*.png" + ] + ] + }, + { + "tuple": [ + ":pack_extensions", + [ + ".png", + ".gif" + ] + ] + }, + { + "tuple": [ + ":groups", + [ + { + "tuple": [ + ":Custom", + [ + "/emoji/*.png", + "/emoji/**/*.png" + ] + ] + } + ] + ] + }, + { + "tuple": [ + ":default_manifest", + "https://git.pleroma.social/pleroma/emoji-index/raw/master/index.json" + ] + }, + { + "tuple": [ + ":shared_pack_cache_seconds_per_file", + 60 + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":uri_schemes", + "value": [ + { + "tuple": [ + ":valid_schemes", + [ + "https", + "http", + "dat", + "dweb", + "gopher", + "hyper", + "ipfs", + "ipns", + "irc", + "ircs", + "magnet", + "mailto", + "mumble", + "ssb", + "xmpp" + ] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":http", + "value": [ + { + "tuple": [ + ":proxy_url", + null + ] + }, + { + "tuple": [ + ":send_user_agent", + true + ] + }, + { + "tuple": [ + ":user_agent", + ":default" + ] + }, + { + "tuple": [ + ":adapter", + [] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":welcome", + "value": [ + { + "tuple": [ + ":direct_message", + [ + { + "tuple": [ + ":enabled", + false + ] + }, + { + "tuple": [ + ":sender_nickname", + null + ] + }, + { + "tuple": [ + ":message", + null + ] + } + ] + ] + }, + { + "tuple": [ + ":chat_message", + [ + { + "tuple": [ + ":enabled", + false + ] + }, + { + "tuple": [ + ":sender_nickname", + null + ] + }, + { + "tuple": [ + ":message", + null + ] + } + ] + ] + }, + { + "tuple": [ + ":email", + [ + { + "tuple": [ + ":enabled", + false + ] + }, + { + "tuple": [ + ":sender", + null + ] + }, + { + "tuple": [ + ":subject", + "Welcome to <%= instance_name %>" + ] + }, + { + "tuple": [ + ":html", + "Welcome to <%= instance_name %>" + ] + }, + { + "tuple": [ + ":text", + "Welcome to <%= instance_name %>" + ] + } + ] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":feed", + "value": [ + { + "tuple": [ + ":post_title", + { + ":max_length": 100, + ":omission": "..." + } + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":markup", + "value": [ + { + "tuple": [ + ":allow_inline_images", + true + ] + }, + { + "tuple": [ + ":allow_headings", + false + ] + }, + { + "tuple": [ + ":allow_tables", + false + ] + }, + { + "tuple": [ + ":allow_fonts", + false + ] + }, + { + "tuple": [ + ":scrub_policy", + [ + "Pleroma.HTML.Scrubber.Default", + "Pleroma.HTML.Transform.MediaProxy" + ] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":frontend_configurations", + "value": [ + { + "tuple": [ + ":pleroma_fe", + { + ":alwaysShowSubjectInput": true, + ":background": "/images/city.jpg", + ":collapseMessageWithSubject": false, + ":disableChat": false, + ":greentext": false, + ":hideFilteredStatuses": false, + ":hideMutedPosts": false, + ":hidePostStats": false, + ":hideSitename": false, + ":hideUserStats": false, + ":loginMethod": "password", + ":logo": "/static/logo.svg", + ":logoMargin": ".1em", + ":logoMask": true, + ":minimalScopesMode": false, + ":noAttachmentLinks": false, + ":nsfwCensorImage": "", + ":postContentType": "text/plain", + ":redirectRootLogin": "/main/friends", + ":redirectRootNoLogin": "/main/all", + ":scopeCopy": true, + ":showFeaturesPanel": true, + ":showInstanceSpecificPanel": false, + ":sidebarRight": false, + ":subjectLineBehavior": "email", + ":theme": "pleroma-dark", + ":webPushNotifications": false + } + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":assets", + "value": [ + { + "tuple": [ + ":mascots", + [ + { + "tuple": [ + ":pleroma_fox_tan", + { + ":mime_type": "image/png", + ":url": "/images/pleroma-fox-tan-smol.png" + } + ] + }, + { + "tuple": [ + ":pleroma_fox_tan_shy", + { + ":mime_type": "image/png", + ":url": "/images/pleroma-fox-tan-shy.png" + } + ] + } + ] + ] + }, + { + "tuple": [ + ":default_mascot", + ":pleroma_fox_tan" + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":manifest", + "value": [ + { + "tuple": [ + ":icons", + [ + { + ":src": "/static/logo.svg", + ":type": "image/svg+xml" + } + ] + ] + }, + { + "tuple": [ + ":theme_color", + "#282c37" + ] + }, + { + "tuple": [ + ":background_color", + "#191b22" + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":streamer", + "value": [ + { + "tuple": [ + ":workers", + 3 + ] + }, + { + "tuple": [ + ":overflow_workers", + 2 + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":user", + "value": [ + { + "tuple": [ + ":deny_follow_blocked", + true + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":mrf_normalize_markup", + "value": [ + { + "tuple": [ + ":scrub_policy", + "Pleroma.HTML.Scrubber.Default" + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":mrf_rejectnonpublic", + "value": [ + { + "tuple": [ + ":allow_followersonly", + false + ] + }, + { + "tuple": [ + ":allow_direct", + false + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":mrf_simple", + "value": [ + { + "tuple": [ + ":media_removal", + [] + ] + }, + { + "tuple": [ + ":media_nsfw", + [] + ] + }, + { + "tuple": [ + ":federated_timeline_removal", + [] + ] + }, + { + "tuple": [ + ":report_removal", + [] + ] + }, + { + "tuple": [ + ":reject", + [] + ] + }, + { + "tuple": [ + ":followers_only", + [] + ] + }, + { + "tuple": [ + ":accept", + [] + ] + }, + { + "tuple": [ + ":avatar_removal", + [] + ] + }, + { + "tuple": [ + ":banner_removal", + [] + ] + }, + { + "tuple": [ + ":reject_deletes", + [] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":mrf_keyword", + "value": [ + { + "tuple": [ + ":reject", + [] + ] + }, + { + "tuple": [ + ":federated_timeline_removal", + [] + ] + }, + { + "tuple": [ + ":replace", + [] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":mrf_hashtag", + "value": [ + { + "tuple": [ + ":sensitive", + [ + "nsfw" + ] + ] + }, + { + "tuple": [ + ":reject", + [] + ] + }, + { + "tuple": [ + ":federated_timeline_removal", + [] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":mrf_subchain", + "value": [ + { + "tuple": [ + ":match_actor", + {} + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":mrf_activity_expiration", + "value": [ + { + "tuple": [ + ":days", + 365 + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":mrf_vocabulary", + "value": [ + { + "tuple": [ + ":accept", + [] + ] + }, + { + "tuple": [ + ":reject", + [] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":mrf_object_age", + "value": [ + { + "tuple": [ + ":threshold", + 604800 + ] + }, + { + "tuple": [ + ":actions", + [ + ":delist", + ":strip_followers" + ] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":mrf_nsfw_api", + "value": [ + { + "tuple": [ + ":url", + "http://127.0.0.1:5000/" + ] + }, + { + "tuple": [ + ":threshold", + 0.7 + ] + }, + { + "tuple": [ + ":mark_sensitive", + true + ] + }, + { + "tuple": [ + ":unlist", + false + ] + }, + { + "tuple": [ + ":reject", + false + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":mrf_follow_bot", + "value": [ + { + "tuple": [ + ":follower_nickname", + null + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":mrf_inline_quote", + "value": [ + { + "tuple": [ + ":prefix", + "RT" + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":rich_media", + "value": [ + { + "tuple": [ + ":enabled", + true + ] + }, + { + "tuple": [ + ":ignore_hosts", + [] + ] + }, + { + "tuple": [ + ":ignore_tld", + [ + "local", + "localdomain", + "lan" + ] + ] + }, + { + "tuple": [ + ":parsers", + [ + "Pleroma.Web.RichMedia.Parsers.OEmbed", + "Pleroma.Web.RichMedia.Parsers.TwitterCard" + ] + ] + }, + { + "tuple": [ + ":oembed_providers_enabled", + true + ] + }, + { + "tuple": [ + ":failure_backoff", + 60000 + ] + }, + { + "tuple": [ + ":ttl_setters", + [ + "Pleroma.Web.RichMedia.Parser.TTL.AwsSignedUrl" + ] + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Web.MediaProxy.Invalidation.Http", + "value": [ + { + "tuple": [ + ":method", + ":purge" + ] + }, + { + "tuple": [ + ":headers", + [] + ] + }, + { + "tuple": [ + ":options", + [] + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Web.MediaProxy.Invalidation.Script", + "value": [ + { + "tuple": [ + ":script_path", + null + ] + }, + { + "tuple": [ + ":url_format", + null + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":media_preview_proxy", + "value": [ + { + "tuple": [ + ":enabled", + false + ] + }, + { + "tuple": [ + ":thumbnail_max_width", + 600 + ] + }, + { + "tuple": [ + ":thumbnail_max_height", + 600 + ] + }, + { + "tuple": [ + ":image_quality", + 85 + ] + }, + { + "tuple": [ + ":min_content_length", + 102400 + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":shout", + "value": [ + { + "tuple": [ + ":enabled", + true + ] + }, + { + "tuple": [ + ":limit", + 5000 + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":gopher", + "value": [ + { + "tuple": [ + ":enabled", + false + ] + }, + { + "tuple": [ + ":ip", + { + "tuple": [ + 0, + 0, + 0, + 0 + ] + } + ] + }, + { + "tuple": [ + ":port", + 9999 + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Web.Metadata", + "value": [ + { + "tuple": [ + ":providers", + [ + "Pleroma.Web.Metadata.Providers.OpenGraph", + "Pleroma.Web.Metadata.Providers.TwitterCard" + ] + ] + }, + { + "tuple": [ + ":unfurl_nsfw", + false + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Web.Preload", + "value": [ + { + "tuple": [ + ":providers", + [ + "Pleroma.Web.Preload.Providers.Instance" + ] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":http_security", + "value": [ + { + "tuple": [ + ":enabled", + true + ] + }, + { + "tuple": [ + ":sts", + false + ] + }, + { + "tuple": [ + ":sts_max_age", + 31536000 + ] + }, + { + "tuple": [ + ":ct_max_age", + 2592000 + ] + }, + { + "tuple": [ + ":referrer_policy", + "same-origin" + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.User", + "value": [ + { + "tuple": [ + ":restricted_nicknames", + [ + ".well-known", + "~", + "about", + "activities", + "api", + "auth", + "check_password", + "dev", + "friend-requests", + "inbox", + "internal", + "main", + "media", + "nodeinfo", + "notice", + "oauth", + "objects", + "ostatus_subscribe", + "pleroma", + "proxy", + "push", + "registration", + "relay", + "settings", + "status", + "tag", + "user-search", + "user_exists", + "users", + "web", + "verify_credentials", + "update_credentials", + "relationships", + "search", + "confirmation_resend", + "mfa" + ] + ] + }, + { + "tuple": [ + ":email_blacklist", + [] + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Oban", + "value": [ + { + "tuple": [ + ":repo", + "Pleroma.Repo" + ] + }, + { + "tuple": [ + ":log", + false + ] + }, + { + "tuple": [ + ":queues", + [ + { + "tuple": [ + ":activity_expiration", + 10 + ] + }, + { + "tuple": [ + ":token_expiration", + 5 + ] + }, + { + "tuple": [ + ":filter_expiration", + 1 + ] + }, + { + "tuple": [ + ":backup", + 1 + ] + }, + { + "tuple": [ + ":federator_incoming", + 50 + ] + }, + { + "tuple": [ + ":federator_outgoing", + 50 + ] + }, + { + "tuple": [ + ":ingestion_queue", + 50 + ] + }, + { + "tuple": [ + ":web_push", + 50 + ] + }, + { + "tuple": [ + ":mailer", + 10 + ] + }, + { + "tuple": [ + ":transmogrifier", + 20 + ] + }, + { + "tuple": [ + ":scheduled_activities", + 10 + ] + }, + { + "tuple": [ + ":poll_notifications", + 10 + ] + }, + { + "tuple": [ + ":background", + 5 + ] + }, + { + "tuple": [ + ":remote_fetcher", + 2 + ] + }, + { + "tuple": [ + ":attachments_cleanup", + 1 + ] + }, + { + "tuple": [ + ":new_users_digest", + 1 + ] + }, + { + "tuple": [ + ":mute_expire", + 5 + ] + } + ] + ] + }, + { + "tuple": [ + ":plugins", + [ + "Oban.Plugins.Pruner" + ] + ] + }, + { + "tuple": [ + ":crontab", + [ + { + "tuple": [ + "0 0 * * 0", + "Pleroma.Workers.Cron.DigestEmailsWorker" + ] + }, + { + "tuple": [ + "0 0 * * *", + "Pleroma.Workers.Cron.NewUsersDigestWorker" + ] + } + ] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":workers", + "value": [ + { + "tuple": [ + ":retries", + [ + { + "tuple": [ + ":federator_incoming", + 5 + ] + }, + { + "tuple": [ + ":federator_outgoing", + 5 + ] + } + ] + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Formatter", + "value": [ + { + "tuple": [ + ":class", + false + ] + }, + { + "tuple": [ + ":rel", + "ugc" + ] + }, + { + "tuple": [ + ":new_window", + false + ] + }, + { + "tuple": [ + ":truncate", + false + ] + }, + { + "tuple": [ + ":strip_prefix", + false + ] + }, + { + "tuple": [ + ":extra", + true + ] + }, + { + "tuple": [ + ":validate_tld", + ":no_scheme" + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":ldap", + "value": [ + { + "tuple": [ + ":enabled", + false + ] + }, + { + "tuple": [ + ":host", + "localhost" + ] + }, + { + "tuple": [ + ":port", + 389 + ] + }, + { + "tuple": [ + ":ssl", + false + ] + }, + { + "tuple": [ + ":sslopts", + [] + ] + }, + { + "tuple": [ + ":tls", + false + ] + }, + { + "tuple": [ + ":tlsopts", + [] + ] + }, + { + "tuple": [ + ":base", + "dc=example,dc=com" + ] + }, + { + "tuple": [ + ":uid", + "cn" + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":auth", + "value": [ + { + "tuple": [ + ":oauth_consumer_strategies", + [] + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Emails.UserEmail", + "value": [ + { + "tuple": [ + ":logo", + null + ] + }, + { + "tuple": [ + ":styling", + { + ":background_color": "#2C3645", + ":content_background_color": "#1B2635", + ":header_color": "#d8a070", + ":link_color": "#d8a070", + ":text_color": "#b9b9ba", + ":text_muted_color": "#b9b9ba" + } + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Emails.NewUsersDigestEmail", + "value": [ + { + "tuple": [ + ":enabled", + false + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.ScheduledActivity", + "value": [ + { + "tuple": [ + ":daily_user_limit", + 25 + ] + }, + { + "tuple": [ + ":total_user_limit", + 300 + ] + }, + { + "tuple": [ + ":enabled", + true + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":email_notifications", + "value": [ + { + "tuple": [ + ":digest", + { + ":active": false, + ":inactivity_threshold": 7, + ":interval": 7 + } + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":oauth2", + "value": [ + { + "tuple": [ + ":token_expires_in", + 3153600000 + ] + }, + { + "tuple": [ + ":issue_new_refresh_token", + true + ] + }, + { + "tuple": [ + ":clean_expired_tokens", + false + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":features", + "value": [ + { + "tuple": [ + ":improved_hashtag_timeline", + ":auto" + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":populate_hashtags_table", + "value": [ + { + "tuple": [ + ":fault_rate_allowance", + 0.01 + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":rate_limit", + "value": [ + { + "tuple": [ + ":authentication", + { + "tuple": [ + 60000, + 15 + ] + } + ] + }, + { + "tuple": [ + ":timeline", + { + "tuple": [ + 500, + 3 + ] + } + ] + }, + { + "tuple": [ + ":search", + [ + { + "tuple": [ + 1000, + 10 + ] + }, + { + "tuple": [ + 1000, + 30 + ] + } + ] + ] + }, + { + "tuple": [ + ":app_account_creation", + { + "tuple": [ + 1800000, + 25 + ] + } + ] + }, + { + "tuple": [ + ":relations_actions", + { + "tuple": [ + 10000, + 10 + ] + } + ] + }, + { + "tuple": [ + ":relation_id_action", + { + "tuple": [ + 60000, + 2 + ] + } + ] + }, + { + "tuple": [ + ":statuses_actions", + { + "tuple": [ + 10000, + 15 + ] + } + ] + }, + { + "tuple": [ + ":status_id_action", + { + "tuple": [ + 60000, + 3 + ] + } + ] + }, + { + "tuple": [ + ":password_reset", + { + "tuple": [ + 1800000, + 5 + ] + } + ] + }, + { + "tuple": [ + ":account_confirmation_resend", + { + "tuple": [ + 8640000, + 5 + ] + } + ] + }, + { + "tuple": [ + ":ap_routes", + { + "tuple": [ + 60000, + 15 + ] + } + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Workers.PurgeExpiredActivity", + "value": [ + { + "tuple": [ + ":enabled", + true + ] + }, + { + "tuple": [ + ":min_lifetime", + 600 + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Web.Plugs.RemoteIp", + "value": [ + { + "tuple": [ + ":enabled", + true + ] + }, + { + "tuple": [ + ":headers", + [ + "x-forwarded-for" + ] + ] + }, + { + "tuple": [ + ":proxies", + [] + ] + }, + { + "tuple": [ + ":reserved", + [ + "127.0.0.0/8", + "::1/128", + "fc00::/7", + "10.0.0.0/8", + "172.16.0.0/12", + "192.168.0.0/16" + ] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":static_fe", + "value": [ + { + "tuple": [ + ":enabled", + false + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":web_cache_ttl", + "value": [ + { + "tuple": [ + ":activity_pub", + null + ] + }, + { + "tuple": [ + ":activity_pub_question", + 30000 + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":modules", + "value": [ + { + "tuple": [ + ":runtime_dir", + "instance/modules" + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":connections_pool", + "value": [ + { + "tuple": [ + ":reclaim_multiplier", + 0.1 + ] + }, + { + "tuple": [ + ":connection_acquisition_wait", + 250 + ] + }, + { + "tuple": [ + ":connection_acquisition_retries", + 5 + ] + }, + { + "tuple": [ + ":max_connections", + 250 + ] + }, + { + "tuple": [ + ":max_idle_time", + 30000 + ] + }, + { + "tuple": [ + ":retry", + 0 + ] + }, + { + "tuple": [ + ":connect_timeout", + 5000 + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":pools", + "value": [ + { + "tuple": [ + ":federation", + [ + { + "tuple": [ + ":size", + 50 + ] + }, + { + "tuple": [ + ":max_waiting", + 10 + ] + }, + { + "tuple": [ + ":recv_timeout", + 10000 + ] + } + ] + ] + }, + { + "tuple": [ + ":media", + [ + { + "tuple": [ + ":size", + 50 + ] + }, + { + "tuple": [ + ":max_waiting", + 20 + ] + }, + { + "tuple": [ + ":recv_timeout", + 15000 + ] + } + ] + ] + }, + { + "tuple": [ + ":upload", + [ + { + "tuple": [ + ":size", + 25 + ] + }, + { + "tuple": [ + ":max_waiting", + 5 + ] + }, + { + "tuple": [ + ":recv_timeout", + 15000 + ] + } + ] + ] + }, + { + "tuple": [ + ":default", + [ + { + "tuple": [ + ":size", + 10 + ] + }, + { + "tuple": [ + ":max_waiting", + 2 + ] + }, + { + "tuple": [ + ":recv_timeout", + 5000 + ] + } + ] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":hackney_pools", + "value": [ + { + "tuple": [ + ":federation", + [ + { + "tuple": [ + ":max_connections", + 50 + ] + }, + { + "tuple": [ + ":timeout", + 150000 + ] + } + ] + ] + }, + { + "tuple": [ + ":media", + [ + { + "tuple": [ + ":max_connections", + 50 + ] + }, + { + "tuple": [ + ":timeout", + 150000 + ] + } + ] + ] + }, + { + "tuple": [ + ":upload", + [ + { + "tuple": [ + ":max_connections", + 25 + ] + }, + { + "tuple": [ + ":timeout", + 300000 + ] + } + ] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":majic_pool", + "value": [ + { + "tuple": [ + ":size", + 2 + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":restrict_unauthenticated", + "value": [ + { + "tuple": [ + ":timelines", + { + ":federated": ":if_instance_is_private", + ":local": ":if_instance_is_private" + } + ] + }, + { + "tuple": [ + ":profiles", + { + ":local": ":if_instance_is_private", + ":remote": ":if_instance_is_private" + } + ] + }, + { + "tuple": [ + ":activities", + { + ":local": ":if_instance_is_private", + ":remote": ":if_instance_is_private" + } + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":instances_favicons", + "value": [ + { + "tuple": [ + ":enabled", + false + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Web.Auth.Authenticator", + "value": "Pleroma.Web.Auth.PleromaAuthenticator" + }, + { + "group": ":pleroma", + "key": "Pleroma.User.Backup", + "value": [ + { + "tuple": [ + ":purge_after_days", + 30 + ] + }, + { + "tuple": [ + ":limit_days", + 7 + ] + }, + { + "tuple": [ + ":dir", + null + ] + } + ] + }, + { + "group": ":pleroma", + "key": "ConcurrentLimiter", + "value": [ + { + "tuple": [ + "Pleroma.Web.RichMedia.Helpers", + [ + { + "tuple": [ + ":max_running", + 5 + ] + }, + { + "tuple": [ + ":max_waiting", + 5 + ] + } + ] + ] + }, + { + "tuple": [ + "Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy", + [ + { + "tuple": [ + ":max_running", + 5 + ] + }, + { + "tuple": [ + ":max_waiting", + 5 + ] + } + ] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":activitypub", + "value": [ + { + "tuple": [ + ":unfollow_blocked", + true + ] + }, + { + "tuple": [ + ":outgoing_blocks", + true + ] + }, + { + "tuple": [ + ":follow_handshake_timeout", + 500 + ] + }, + { + "tuple": [ + ":note_replies_output_limit", + 5 + ] + }, + { + "tuple": [ + ":sign_object_fetches", + true + ] + }, + { + "tuple": [ + ":authorized_fetch_mode", + false + ] + }, + { + "tuple": [ + ":blockers_visible", + false + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":frontends", + "value": [ + { + "tuple": [ + ":available", + { + "admin-fe": { + "build_url": "https://git.pleroma.social/pleroma/admin-fe/-/jobs/artifacts/${ref}/download?job=build", + "git": "https://git.pleroma.social/pleroma/admin-fe", + "name": "admin-fe", + "ref": "develop" + }, + "fedi-fe": { + "build_url": "https://git.pleroma.social/pleroma/fedi-fe/-/jobs/artifacts/${ref}/download?job=build", + "custom-http-headers": [ + { + "tuple": [ + "service-worker-allowed", + "/" + ] + } + ], + "git": "https://git.pleroma.social/pleroma/fedi-fe", + "name": "fedi-fe", + "ref": "master" + }, + "kenoma": { + "build_url": "https://git.pleroma.social/lambadalambda/kenoma/-/jobs/artifacts/${ref}/download?job=build", + "git": "https://git.pleroma.social/lambadalambda/kenoma", + "name": "kenoma", + "ref": "master" + }, + "pleroma-fe": { + "build_url": "https://git.pleroma.social/pleroma/pleroma-fe/-/jobs/artifacts/${ref}/download?job=build", + "git": "https://git.pleroma.social/pleroma/pleroma-fe", + "name": "pleroma-fe", + "ref": "develop" + }, + "soapbox-fe": { + "build_dir": "static", + "build_url": "https://gitlab.com/soapbox-pub/soapbox-fe/-/jobs/artifacts/${ref}/download?job=build-production", + "git": "https://gitlab.com/soapbox-pub/soapbox-fe", + "name": "soapbox-fe", + "ref": "develop" + } + } + ] + }, + { + "tuple": [ + ":primary", + { + "name": "landing-fe", + "ref": "vendor" + } + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Upload", + "value": [ + { + "tuple": [ + ":uploader", + "Pleroma.Uploaders.Local" + ] + }, + { + "tuple": [ + ":link_name", + false + ] + }, + { + "tuple": [ + ":proxy_remote", + false + ] + }, + { + "tuple": [ + ":filename_display_max_length", + 30 + ] + }, + { + "tuple": [ + ":default_description", + null + ] + }, + { + "tuple": [ + ":base_url", + null + ] + }, + { + "tuple": [ + ":filters", + [ + "Pleroma.Upload.Filter.AnalyzeMetadata", + "Pleroma.Upload.Filter.Dedupe", + "Pleroma.Upload.Filter.Exiftool" + ] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":mrf", + "value": [ + { + "tuple": [ + ":transparency", + true + ] + }, + { + "tuple": [ + ":transparency_exclusions", + [] + ] + }, + { + "tuple": [ + ":policies", + [ + "Pleroma.Web.ActivityPub.MRF.SimplePolicy", + "Pleroma.Web.ActivityPub.MRF.HellthreadPolicy", + "Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy", + "Pleroma.Web.ActivityPub.MRF.TagPolicy", + "Pleroma.Web.ActivityPub.MRF.InlineQuotePolicy" + ] + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":dangerzone", + "value": [ + { + "tuple": [ + ":override_repo_pool_size", + true + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":mrf_hellthread", + "value": [ + { + "tuple": [ + ":delist_threshold", + 15 + ] + }, + { + "tuple": [ + ":reject_threshold", + 100 + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Emails.Mailer", + "value": [ + { + "tuple": [ + ":enabled", + false + ] + }, + { + "tuple": [ + ":adapter", + "Swoosh.Adapters.Local" + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Web.ApiSpec.CastAndValidate", + "value": [ + { + "tuple": [ + ":strict", + true + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":media_proxy", + "value": [ + { + "tuple": [ + ":invalidation", + [ + { + "tuple": [ + ":enabled", + false + ] + }, + { + "tuple": [ + ":provider", + "Pleroma.Web.MediaProxy.Invalidation.Script" + ] + } + ] + ] + }, + { + "tuple": [ + ":proxy_opts", + [ + { + "tuple": [ + ":redirect_on_failure", + false + ] + }, + { + "tuple": [ + ":max_body_length", + 26214400 + ] + }, + { + "tuple": [ + ":max_read_duration", + 30000 + ] + }, + { + "tuple": [ + ":http", + [ + { + "tuple": [ + ":follow_redirect", + true + ] + }, + { + "tuple": [ + ":pool", + ":media" + ] + } + ] + ] + } + ] + ] + }, + { + "tuple": [ + ":whitelist", + [] + ] + }, + { + "tuple": [ + ":enabled", + false + ] + }, + { + "tuple": [ + ":redirect_on_failure", + true + ] + } + ] + }, + { + "group": ":pleroma", + "key": ":instance", + "value": [ + { + "tuple": [ + ":background_image", + "/images/city.jpg" + ] + }, + { + "tuple": [ + ":description_limit", + 5000 + ] + }, + { + "tuple": [ + ":remote_limit", + 100000 + ] + }, + { + "tuple": [ + ":upload_limit", + 16000000 + ] + }, + { + "tuple": [ + ":avatar_upload_limit", + 2000000 + ] + }, + { + "tuple": [ + ":background_upload_limit", + 4000000 + ] + }, + { + "tuple": [ + ":banner_upload_limit", + 4000000 + ] + }, + { + "tuple": [ + ":poll_limits", + { + ":max_expiration": 31536000, + ":max_option_chars": 200, + ":max_options": 20, + ":min_expiration": 0 + } + ] + }, + { + "tuple": [ + ":invites_enabled", + false + ] + }, + { + "tuple": [ + ":account_activation_required", + false + ] + }, + { + "tuple": [ + ":account_approval_required", + false + ] + }, + { + "tuple": [ + ":federating", + true + ] + }, + { + "tuple": [ + ":federation_incoming_replies_max_depth", + 100 + ] + }, + { + "tuple": [ + ":federation_reachability_timeout_days", + 7 + ] + }, + { + "tuple": [ + ":federation_publisher_modules", + [ + "Pleroma.Web.ActivityPub.Publisher" + ] + ] + }, + { + "tuple": [ + ":allow_relay", + true + ] + }, + { + "tuple": [ + ":public", + true + ] + }, + { + "tuple": [ + ":quarantined_instances", + [] + ] + }, + { + "tuple": [ + ":allowed_post_formats", + [ + "text/plain", + "text/html", + "text/markdown", + "text/bbcode" + ] + ] + }, + { + "tuple": [ + ":autofollowed_nicknames", + [] + ] + }, + { + "tuple": [ + ":autofollowing_nicknames", + [] + ] + }, + { + "tuple": [ + ":max_pinned_statuses", + 1 + ] + }, + { + "tuple": [ + ":attachment_links", + false + ] + }, + { + "tuple": [ + ":max_report_comment_size", + 1000 + ] + }, + { + "tuple": [ + ":safe_dm_mentions", + false + ] + }, + { + "tuple": [ + ":healthcheck", + false + ] + }, + { + "tuple": [ + ":remote_post_retention_days", + 90 + ] + }, + { + "tuple": [ + ":skip_thread_containment", + true + ] + }, + { + "tuple": [ + ":limit_to_local_content", + ":unauthenticated" + ] + }, + { + "tuple": [ + ":user_bio_length", + 5000 + ] + }, + { + "tuple": [ + ":user_name_length", + 100 + ] + }, + { + "tuple": [ + ":user_location_length", + 50 + ] + }, + { + "tuple": [ + ":max_account_fields", + 10 + ] + }, + { + "tuple": [ + ":max_remote_account_fields", + 20 + ] + }, + { + "tuple": [ + ":account_field_name_length", + 512 + ] + }, + { + "tuple": [ + ":account_field_value_length", + 2048 + ] + }, + { + "tuple": [ + ":registration_reason_length", + 500 + ] + }, + { + "tuple": [ + ":external_user_synchronization", + true + ] + }, + { + "tuple": [ + ":extended_nickname_format", + true + ] + }, + { + "tuple": [ + ":cleanup_attachments", + false + ] + }, + { + "tuple": [ + ":multi_factor_authentication", + [ + { + "tuple": [ + ":totp", + [ + { + "tuple": [ + ":digits", + 6 + ] + }, + { + "tuple": [ + ":period", + 30 + ] + } + ] + ] + }, + { + "tuple": [ + ":backup_codes", + [ + { + "tuple": [ + ":number", + 5 + ] + }, + { + "tuple": [ + ":length", + 16 + ] + } + ] + ] + } + ] + ] + }, + { + "tuple": [ + ":show_reactions", + true + ] + }, + { + "tuple": [ + ":password_reset_token_validity", + 86400 + ] + }, + { + "tuple": [ + ":profile_directory", + true + ] + }, + { + "tuple": [ + ":max_endorsed_users", + 20 + ] + }, + { + "tuple": [ + ":birthday_required", + false + ] + }, + { + "tuple": [ + ":birthday_min_age", + 0 + ] + }, + { + "tuple": [ + ":privileged_staff", + true + ] + }, + { + "tuple": [ + ":max_media_attachments", + 20 + ] + }, + { + "tuple": [ + ":description", + "Social media owned by you" + ] + }, + { + "tuple": [ + ":instance_thumbnail", + "/instance/thumbnail.png" + ] + }, + { + "tuple": [ + ":name", + "localhost" + ] + }, + { + "tuple": [ + ":email", + "alex@alexgleason.me" + ] + }, + { + "tuple": [ + ":notify_email", + "alex@alexgleason.me" + ] + }, + { + "tuple": [ + ":limit", + 5000 + ] + }, + { + "tuple": [ + ":registrations_open", + true + ] + }, + { + "tuple": [ + ":static_dir", + "/home/alex/Projects/soapbox-be/instance/static" + ] + } + ] + }, + { + "group": ":pleroma", + "key": "Pleroma.Uploaders.Local", + "value": [ + { + "tuple": [ + ":uploads", + "/home/alex/Projects/soapbox-be/uploads" + ] + } + ] + }, + { + "group": ":joken", + "key": ":default_signer", + "value": "KaehAYXaKzxCdcqSD35I6R9KRUMvgqb0DBMV6PIiqjoHbg0eppqH6nSpNp4fbbLT" + }, + { + "group": ":web_push_encryption", + "key": ":http_client", + "value": "Pleroma.HTTP.WebPush" + }, + { + "group": ":web_push_encryption", + "key": ":vapid_details", + "value": [ + { + "tuple": [ + ":subject", + "mailto:alex@alexgleason.me" + ] + }, + { + "tuple": [ + ":public_key", + "BCUFu4_-77t6dQ2XfZIyEE7k8H4r11s-a5doq7hZHDv9RqTUek-8yrE9nUN-rZYTxkjxuXF7IMcDdRgZ1fOCUy8" + ] + }, + { + "tuple": [ + ":private_key", + "KN3JU4Ug0e7_lsxhqOW_jQuQNeQTrr7QtOmdNIpUUbY" + ] + } + ] + }, + { + "group": ":phoenix", + "key": ":format_encoders", + "value": [ + { + "tuple": [ + ":json", + "Jason" + ] + }, + { + "tuple": [ + ":\"activity+json\"", + "Jason" + ] + } + ] + }, + { + "group": ":phoenix", + "key": ":json_library", + "value": "Jason" + }, + { + "group": ":phoenix", + "key": ":filter_parameters", + "value": [ + "password", + "confirm" + ] + }, + { + "group": ":phoenix", + "key": ":stacktrace_depth", + "value": 20 + }, + { + "group": ":phoenix", + "key": ":plug_init_mode", + "value": ":runtime" + }, + { + "group": ":logger", + "key": ":ex_syslogger", + "value": [ + { + "tuple": [ + ":level", + ":debug" + ] + }, + { + "tuple": [ + ":ident", + "pleroma" + ] + }, + { + "tuple": [ + ":format", + "$metadata[$level] $message" + ] + }, + { + "tuple": [ + ":metadata", + [ + ":request_id" + ] + ] + } + ] + }, + { + "group": ":logger", + "key": ":console", + "value": [ + { + "tuple": [ + ":level", + ":debug" + ] + }, + { + "tuple": [ + ":metadata", + [ + ":request_id" + ] + ] + }, + { + "tuple": [ + ":format", + "[$level] $message\n" + ] + } + ] + }, + { + "group": ":floki", + "key": ":html_parser", + "value": "Floki.HTMLParser.FastHtml" + }, + { + "group": ":ex_aws", + "key": ":s3", + "value": [ + { + "tuple": [ + ":access_key_id", + null + ] + }, + { + "tuple": [ + ":secret_access_key", + null + ] + }, + { + "tuple": [ + ":scheme", + "https://" + ] + } + ] + }, + { + "group": ":ex_aws", + "key": ":http_client", + "value": "Pleroma.HTTP.ExAws" + }, + { + "group": ":tzdata", + "key": ":http_client", + "value": "Pleroma.HTTP.Tzdata" + }, + { + "group": ":http_signatures", + "key": ":adapter", + "value": "Pleroma.Signature" + }, + { + "group": ":prometheus", + "key": "Pleroma.Web.Endpoint.MetricsExporter", + "value": [ + { + "tuple": [ + ":enabled", + false + ] + }, + { + "tuple": [ + ":auth", + false + ] + }, + { + "tuple": [ + ":ip_whitelist", + [] + ] + }, + { + "tuple": [ + ":path", + "/api/pleroma/app_metrics" + ] + }, + { + "tuple": [ + ":format", + ":text" + ] + } + ] + }, + { + "group": ":ueberauth", + "key": "Ueberauth", + "value": [ + { + "tuple": [ + ":base_path", + "/oauth" + ] + }, + { + "tuple": [ + ":providers", + [] + ] + } + ] + }, + { + "group": ":esshd", + "key": ":enabled", + "value": false + }, + { + "group": ":cors_plug", + "key": ":max_age", + "value": 86400 + }, + { + "group": ":cors_plug", + "key": ":methods", + "value": [ + "POST", + "PUT", + "DELETE", + "GET", + "PATCH", + "OPTIONS" + ] + }, + { + "group": ":cors_plug", + "key": ":expose", + "value": [ + "Link", + "X-RateLimit-Reset", + "X-RateLimit-Limit", + "X-RateLimit-Remaining", + "X-Request-Id", + "Idempotency-Key" + ] + }, + { + "group": ":cors_plug", + "key": ":credentials", + "value": true + }, + { + "group": ":cors_plug", + "key": ":headers", + "value": [ + "Authorization", + "Content-Type", + "Idempotency-Key" + ] + }, + { + "group": ":mime", + "key": ":types", + "value": { + "application/activity+json": [ + "activity+json" + ], + "application/jrd+json": [ + "jrd+json" + ], + "application/ld+json": [ + "activity+json" + ], + "application/xml": [ + "xml" + ], + "application/xrd+xml": [ + "xrd+xml" + ] + } + }, + { + "group": ":quack", + "key": ":level", + "value": ":warn" + }, + { + "group": ":quack", + "key": ":meta", + "value": [ + ":all" + ] + }, + { + "group": ":quack", + "key": ":webhook_url", + "value": "https://hooks.slack.com/services/YOUR-KEY-HERE" + } + ], + "need_reboot": false +} diff --git a/app/soapbox/reducers/__tests__/instance-test.js b/app/soapbox/reducers/__tests__/instance-test.js index 06eb3091b17b34588859af7b0a694abafce622e1..0954c38786c68d91d4524d4877ce0f84c8c1c147 100644 GIT binary patch delta 564 zcmaKp!A`sARSD3xF$iozPEWeQ{3PMsMdN(d|W#(s%^ z;nH9651eU>!3~S)Bz<}3+}r*fydAyUZlihA?hGz(J6G-2pnunF^xVO{+wHp#Jy<}% zXaqW^DDmjbLB1d~<_;P~B-U#hi4w{L%;96}@UwNieXRkEF!vepu%T}t>lPR$)X!lq zHvoJIRTy~(WXz?vo_4j$X%b@TN7c+%&8PMwr?GC zmJ78~u3jt(E`Z}ePXc4gA{3HW%wU2z3>h91E*Q!_#2NS@<#;p%??o05&@>bU*{5aI zi3=of`d!*z&KEMXG6LXPf_-6RGy5OVv<1DuMu0+&R~54;jX=l*c~cUP*SlJ$g#Z8m delta 15 WcmZpb`zSF%Z)34N4@<44H5ULatOUsb diff --git a/app/soapbox/reducers/instance.ts b/app/soapbox/reducers/instance.ts index 9092e685b9..7c832c2006 100644 --- a/app/soapbox/reducers/instance.ts +++ b/app/soapbox/reducers/instance.ts @@ -52,7 +52,7 @@ const getConfigValue = (instanceConfig: ImmutableMap, key: string) return v ? v.getIn(['tuple', 1]) : undefined; }; -const importConfigs = (state: typeof initialState, configs: ImmutableMap) => { +const importConfigs = (state: typeof initialState, configs: ImmutableList) => { // FIXME: This is pretty hacked together. Need to make a cleaner map. const config = ConfigDB.find(configs, ':pleroma', ':instance'); const simplePolicy = ConfigDB.toSimplePolicy(configs); @@ -126,7 +126,7 @@ export default function instance(state = initialState, action: AnyAction) { return importNodeinfo(state, ImmutableMap(fromJS(action.nodeinfo))); case ADMIN_CONFIG_UPDATE_REQUEST: case ADMIN_CONFIG_UPDATE_SUCCESS: - return importConfigs(state, ImmutableMap(fromJS(action.configs))); + return importConfigs(state, ImmutableList(fromJS(action.configs))); default: return state; } From fb9c665e3e3ea17594b308037fe22729727fb6bd Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 20 Mar 2022 19:40:08 -0500 Subject: [PATCH 23/23] Typescript: utils/config_db.ts --- .../utils/{config_db.js => config_db.ts} | Bin 1089 -> 1466 bytes 1 file changed, 0 insertions(+), 0 deletions(-) rename app/soapbox/utils/{config_db.js => config_db.ts} (52%) diff --git a/app/soapbox/utils/config_db.js b/app/soapbox/utils/config_db.ts similarity index 52% rename from app/soapbox/utils/config_db.js rename to app/soapbox/utils/config_db.ts index 98fe650d925ba0c402cbd80909ecd9653a72f4d6..1ea8a0b8c3ba40c96206eb3f729dfe237aa83125 100644 GIT binary patch literal 1466 zcmaJ>O>5&Y5WV|X%wfSY7_+@PO$u!5tNU;GM{x2L(@kSJfxjuHf7o%lSv|Nm!nzKVI2Xr#I zftk6@@no~3!{)H=?u9_dv%)#--}7%5Bz<~Mou--XUki~Oa1R#l3xqBKXNW;K90_I- zR^f7P`QW2H3qOxW99=jx@B3m8`~d>X*DFD*Nk0bUJ|^DR1GXk-sDJ#ZI+mVT|K~^K giF(n?KsoDmrpT>0_=H|-9aSaA#`;(1`Ee8d2Unop^Z)<= delta 174 zcmdnReUM|qWToW%yy6mtw9LE|1zQCTATKR5y;w&fy(qu5Kt~}vwNi7k1EURJHIj%z z?c^DZ%Ir|JlOHoi*yt!EmlhRiD%jd7RC6f+0mRs9g_6>OoK!1?XrMtl3K{vuCB?A{ ywLqId%JoX}y@E9~H-BZ~VdN>!%mu0p$j`}4uAHpLBFhT4d~!aE@#e)W;*0