Commit graph

39 commits

Author SHA1 Message Date
Evgenia Karunus
3c0140aa13
Image editor: make compressor work after the image editor, too (#4918)
* Editor.tsx - clean up post typescriptofication

* dev - finally add favicons to avoid errors in the console

* ImageEditor.tsx - reinsert filename after image editor
2024-02-14 15:59:59 +04:00
Antoine du Hamel
975038cf4c
meta: upgrade Vite and Vitest (#4881) 2024-01-22 15:56:40 +01:00
Antoine du Hamel
c7bb57b7f8
dev: remove extensions from Vite aliases
This started causing issues as we are transitioning to TS. By removing the file extension, Vite is able to pick up the correct file.
2023-12-18 15:18:33 +01:00
Antoine du Hamel
773c8cb9a1
meta: add support for TypeScript plugins (#4640) 2023-10-17 15:38:15 +02:00
Antoine du Hamel
34c78e9093
meta: run Prettier on existing files (#4713) 2023-09-29 11:11:28 +02:00
Mikael Finstad
b910f84fe2
add test endpoint for dynamic oauth creds (#4667)
* add test endpoint for dynamic oauth creds

this allows us to test it on uppy.io (we can enable it for one provider like google drive for example)

* add to env.example
2023-09-20 18:09:47 +08:00
Mikael Finstad
a16e22eb6b
fix VITE_COMPANION_ALLOWED_HOSTS (#4690)
it was broken
2023-09-20 17:53:22 +08:00
Merlijn Vos
ef613e6a9f
Move remote file upload logic into companion-client (#4573) 2023-08-24 14:27:28 +02:00
Artur Paikin
1ab4db5e7c
Readme improvements (#4622)
* Make logo fit on the right of the table on laptop screens+

* Move table

* Update README.md

Co-authored-by: Antoine du Hamel <antoine@transloadit.com>

* No need to make logo smaller on all packages after all

* Accidental change

---------

Co-authored-by: Antoine du Hamel <antoine@transloadit.com>
2023-08-15 14:39:04 +01:00
Mikael Finstad
90f7fb9197
@uppy/core: improve performance of validating & uploading files (#4402)
* show how many files are added when loading

remake of https://github.com/transloadit/uppy/pull/4388

* add french (cherry pick)

* implement concurrent file listing

* refactor / fix lint

* refactor/reduce duplication

* pull out totals validation

don't do it for every file added, as it's very slow
instead do the check at the end when all files are added.
this allows us to easily work with 10k+ files
fixes #4389

* Update packages/@uppy/core/src/Uppy.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

* make restricter.validate validate everything

instead make more specific methods for sub-validation
also rename validateTotals to validateAggregateRestrictions

* improve errors and user feedback

- handle errors centrally so that we can limit the amount of toasts (informers) sent to the users (prevent flooding hundreds/thousands of them)
- introduce FileRestrictionError which is a restriction error for a specific file
- introduce isUserFacing field for RestrictionError

* fix performance issue reintroduced

* improvements

- show "%{count} additional restrictions were not fulfilled" for any restriction errors more than 4
- refactor/rename methods
- improve ghost logic/comments

* improve performance when uploading

- introduce new event "upload-start"  that can contain multiple files
- make a new patchFilesState method to allow updating more files
- unify "upload-start" logic in all plugins (send it before files start uploading)
- defer slicing buffer until we need the data
- refactor to reuse code

* fix e2e build issue

* try to upgrade cypress

maybe it fixes the error

* Revert "fix e2e build issue"

This reverts commit ff3e580c0f.

* upgrade parcel

* move mutation logic to end

* remove FileRestrictionError

merge it with RestrictionError

* fix silly bug

looks like the e2e tests are doing its job 👏

---------

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-04-15 23:50:19 +08:00
Mikael Finstad
3dd1e5e68c
@uppy/provider-views: fix race condition when adding folders (#4384)
* fix race condtion when adding files

don't call addFolder from listAllFiles
because that would call addFile before all folders were loaded

also remove unused selectedFolders state

* fix also the case of adding multiple folders

* fix todo: remove SharedHandler

* remove loaderWrapper

* fix logic

* fix the last race condition

* fix broken duplicate file check

* fix logic

* prettiyfy loop

* add user feedback

so they know that something is happening

* run corepack yarn run build:locale-pack

* Revert "run corepack yarn run build:locale-pack"

This reverts commit 85548ce2fc.

* Revert "add user feedback"

This reverts commit 4060019c35.

* use async generator instead of p-map

* re-fix race-condition

* remove providerFileToId

as suggested by @arturi

* use addFiles instead of addFile

* rename function

* use provider-supplied file ID

instead of generating an ID, for providers that we whitelsit
this allows adding the same time many times (with a different path)

* call core directly

* improve dev dashboard

* disable experimental getAsFileSystemHandle

it seems to be causing problems when dropping folders with subfolders in newest chrome
e.g a folder with 50 files and a subfolder which in turn has another 50 files

also refactor and document the code more

* Update packages/@uppy/provider-views/src/ProviderView/ProviderView.jsx

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

* mov eto utils

---------

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-04-04 12:13:39 +09:00
Mikael Finstad
ef1a945f79
@uppy/companion: add connection keep-alive to dropbox (#4365)
* add connection: keep-alive to dropbox

fixes #4357

* update a todo

* dont clear screen by vite

i want to also see companion's output
2023-03-20 20:59:03 +08:00
Antoine du Hamel
2ef662140b
@uppy/transloadit: fix assemblyOptions option (#4316) 2023-02-13 18:33:42 +01:00
Antoine du Hamel
141eb248be
meta: upgrade to Vite 4 and ESBuild 0.16 (#4243) 2022-12-13 15:07:19 +01:00
Antoine du Hamel
bf1ff229fa
meta: fix transloadit-xhr dev example (#4149) 2022-10-18 21:46:13 +02:00
Antoine du Hamel
5044230bf1
meta: upgrade all dev dependencies (#3903) 2022-08-16 22:39:28 +02:00
Mikael Finstad
35812ca378
Companion: rewrite request and purest to got (#3953)
* rewrite to async

* rewrite box and dropbox to got

(not yet working due to jest esm issues)

* downgrade got

* update developer notes

* rewrite

- rewrite remaining providers to got
- rewrite to async/await
- pull out adapt code into adapters
- provider/companion tests still todo

* add zoom to dev dashboard

* rewrites

- rewrite remaining providers to got and reuse code
- port tests
- remove request
- remove purest
- rewrite periodic ping job to got
- rewrite uploader to got
- rewrite "url" to got
- rewrite getRedirectEvaluator/request to got
- rewrite http/https agent/request to got
- rewrite credentials.js to got
- fix "todo: handle failures differently to return 400 for this case instead"
- add test for http/https agent
- improve test for credentials (remote/local)
- make /zoom/logout return 424 instead of 500 on credentials error
- remove useless http-agent tests
- fix various eslint warnings

* work around ts error

* remove forgotten change
2022-08-16 18:44:04 +07:00
Merlijn Vos
9a213b59da
Fix all breaking todo comments for 3.0 (#3907)
- `@uppy/aws/s3-multipart`: remove `client` getter and setter.
  - reason: internal usage only
  - migrate: use exposed options only
- `@uppy/core`: remove `AggregateError` polyfill
  - reason: [should be polyfilled by the user](https://github.com/transloadit/uppy/pull/3532#discussion_r818602636)
  - migrate: install `AggregateError` polyfill or use `core-js`
- `@uppy/core`: remove `reset()` method
  - reason: it's a duplicate of `cancelAll`, but with a less intention revealing name
  - migrate: use `cancelAll`
- `@uppy/core`: remove backwards compatible exports (static properties on `Uppy`)
  - reason: transition to ESM
  - migrate: import the `Uppy` class by default and/or use named exports for everything else.
- `@uppy/react`: don't expose `validProps`
  - reason: internal only
  - migrate: do not depend on this
- `@uppy/store-redux`: remove backwards compatible exports (static properties on `ReduxStore`)
  - reason: transition to ESM
  - migrate: use named imports
- `@uppy/thumbnail-generator`: remove `rotateImage`, `protect`, and `canvasToBlob` from prototype.
  - reason: internal only
  - migrate: don't depend on this
2022-08-03 20:07:24 +02:00
Antoine du Hamel
0db5b83e16
meta: upgrade to Vite v3 (#3882)
Refs: https://vitejs.dev/blog/announcing-vite3.html
2022-07-14 17:10:38 +02:00
Antoine du Hamel
4bdfbe7c48 Merge stable branch 2022-07-06 18:01:19 +02:00
Mikael Finstad
3277ac3589
@uppy/provider-views: improve logging (#3638)
* add testing dynamic oauth example

* improve logging levels

Log origin errors with error level

* Update Dashboard.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-07-06 16:28:58 +02:00
Antoine du Hamel
a6029d0304 Merge stable branch 2022-06-09 21:15:10 +02:00
Artur Paikin
9a597114fd
Add @uppy/remote-sources preset/plugin (#3676)
Co-authored-by: Merlijn Vos <merlijn@soverin.net>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-06-07 18:56:02 +02:00
Antoine du Hamel
c223a1f204
@uppy/transloadit: remove IE 10 hack (#3777) 2022-05-30 18:32:53 +02:00
Renée Kooi
1856401153
dev: fix return type of generateSignatureIfSecret (#3793) 2022-05-30 14:44:06 +02:00
Antoine du Hamel
b01a52e368
meta: remove vite-plugin-jsx-commonjs plugin on dev env (#3749)
Now that we removed all JSX and CJS from `.js` files,
there's no need to run Babel on every files, which speeds up greatly the
time it takes for Vite to get ready.
2022-05-23 16:50:45 +02:00
Antoine du Hamel
0b3713c2e6
meta: fix linter warnings (#3753) 2022-05-19 11:57:14 +02:00
Antoine du Hamel
3f5a03f504
@uppy/transloadit: refactor to ESM (#3725) 2022-05-17 15:17:50 +02:00
Antoine du Hamel
bc341351b3
meta: fix dev env Vite's config 2022-05-14 13:51:07 +02:00
Antoine du Hamel
a77b039efc
dev: sign requests sent to Transloadit (#3517)
* dev: sign requests sent to Transloadit

* Address review comments
2022-04-21 16:08:28 +02:00
Artur Paikin
953ae5c929
@uppy/compressor: ignore remote files, calculate savings correctly (#3578) 2022-03-16 20:17:16 +00:00
Antoine du Hamel
994acffca2
meta: fix CJS interop in Vite config (#3543)
* meta: fix CJS interop in Vite config

* fixup! meta: fix CJS interop in Vite config
2022-03-08 18:37:53 +01:00
Antoine du Hamel
f4f1b810b7
meta: use a single .env file for config (#3498)
Fixes: https://github.com/transloadit/uppy/issues/3473
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2022-02-17 15:47:15 +01:00
Antoine du Hamel
a6e36217ad
meta: add support for ESM sources in build script (#3468) 2022-02-15 17:46:14 +01:00
Renée Kooi
db47700321
Finishing touches on Companion dynamic Oauth (#2802)
Co-authored-by: Mikael Finstad <finstaden@gmail.com>
2022-02-14 11:07:52 +01:00
Merlijn Vos
6da874ed3a
meta: Make E2E Great Again (#3444)
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2022-02-08 17:37:27 +01:00
Artur Paikin
18bd009771
Add PostCSS handling to Vite (#3467)
* Add postcss handling to Vite

* Update yarn.lock
2022-02-07 23:36:38 +00:00
Antoine du Hamel
2f15f61536
dev: move configuration to a .env file (#3430)
Putting the dev config in a git-ignored files improves DX and lower the
risk of a private dev key being committed by mistake.
2022-01-11 19:38:41 +01:00
Antoine du Hamel
b0bf1a3eb4
meta: move dev workspace to private/ (#3368)
* meta: move dev workspace to `private/`

* `DragDrop.html` -> `dragdrop.html`
2021-12-14 12:53:34 +01:00