-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@uppy/aws-s3-multipart: refactor to TS #4902
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Diff output filesdiff --git a/packages/@uppy/aws-s3-multipart/lib/MultipartUploader.js b/packages/@uppy/aws-s3-multipart/lib/MultipartUploader.js
index 54dbb05..8a50ce9 100644
--- a/packages/@uppy/aws-s3-multipart/lib/MultipartUploader.js
+++ b/packages/@uppy/aws-s3-multipart/lib/MultipartUploader.js
@@ -182,11 +182,7 @@ class MultipartUploader {
_classPrivateFieldLooseBase(this, _abortController)[_abortController] = new AbortController();
}
abort(opts) {
- var _opts;
- if (opts === void 0) {
- opts = undefined;
- }
- if ((_opts = opts) != null && _opts.really) _classPrivateFieldLooseBase(this, _abortUpload)[_abortUpload]();
+ if (opts != null && opts.really) _classPrivateFieldLooseBase(this, _abortUpload)[_abortUpload]();
else this.pause();
}
get chunkState() {
diff --git a/packages/@uppy/aws-s3-multipart/lib/createSignedURL.js b/packages/@uppy/aws-s3-multipart/lib/createSignedURL.js
index c6d54e0..6937ed2 100644
--- a/packages/@uppy/aws-s3-multipart/lib/createSignedURL.js
+++ b/packages/@uppy/aws-s3-multipart/lib/createSignedURL.js
@@ -48,9 +48,6 @@ async function hash(key, data) {
} = globalThis.crypto;
return subtle.sign(algorithm, await generateHmacKey(key), ec.encode(data));
}
-function percentEncode(c) {
- return `%${c.charCodeAt(0).toString(16).toUpperCase()}`;
-}
export default async function createSignedURL(_ref2) {
let {
accountKey,
@@ -65,7 +62,9 @@ export default async function createSignedURL(_ref2) {
} = _ref2;
const Service = "s3";
const host = `${bucketName}.${Service}.${Region}.amazonaws.com`;
- const CanonicalUri = `/${encodeURI(Key).replace(/[;?:@&=+$,#!'()*]/g, percentEncode)}`;
+ const CanonicalUri = `/${
+ encodeURI(Key).replace(/[;?:@&=+$,#!'()*]/g, c => `%${c.charCodeAt(0).toString(16).toUpperCase()}`)
+ }`;
const payload = "UNSIGNED-PAYLOAD";
const requestDateTime = new Date().toISOString().replace(/[-:]|\.\d+/g, "");
const date = requestDateTime.slice(0, 8);
diff --git a/packages/@uppy/aws-s3-multipart/lib/index.js b/packages/@uppy/aws-s3-multipart/lib/index.js
index cce71eb..70d6f5b 100644
--- a/packages/@uppy/aws-s3-multipart/lib/index.js
+++ b/packages/@uppy/aws-s3-multipart/lib/index.js
@@ -11,29 +11,25 @@ function _classPrivateFieldLooseKey(name) {
}
import { RequestClient } from "@uppy/companion-client";
import BasePlugin from "@uppy/core/lib/BasePlugin.js";
+import EventManager from "@uppy/core/lib/EventManager.js";
import { createAbortError } from "@uppy/utils/lib/AbortController";
-import EventManager from "@uppy/utils/lib/EventManager";
import { filterFilesToEmitUploadStarted, filterNonFailedFiles } from "@uppy/utils/lib/fileFilters";
import { RateLimitedQueue } from "@uppy/utils/lib/RateLimitedQueue";
import createSignedURL from "./createSignedURL.js";
-import MultipartUploader, { pausingUploadReason } from "./MultipartUploader.js";
+import { HTTPCommunicationQueue } from "./HTTPCommunicationQueue.js";
+import MultipartUploader from "./MultipartUploader.js";
+import { throwIfAborted } from "./utils.js";
const packageJson = {
"version": "3.10.2",
};
function assertServerError(res) {
- if (res && res.error) {
+ if (res != null && res.error) {
const error = new Error(res.message);
Object.assign(error, res.error);
throw error;
}
return res;
}
-function removeMetadataFromURL(urlString) {
- const urlObject = new URL(urlString);
- urlObject.search = "";
- urlObject.hash = "";
- return urlObject.href;
-}
function getExpiry(credentials) {
const expirationDate = credentials.Expiration;
if (expirationDate) {
@@ -60,439 +56,20 @@ function getAllowedMetadata(_ref) {
}),
);
}
-function throwIfAborted(signal) {
- if (signal != null && signal.aborted) {
- throw createAbortError("The operation was aborted", {
- cause: signal.reason,
- });
- }
-}
-var _abortMultipartUpload = _classPrivateFieldLooseKey("abortMultipartUpload");
-var _cache = _classPrivateFieldLooseKey("cache");
-var _createMultipartUpload = _classPrivateFieldLooseKey("createMultipartUpload");
-var _fetchSignature = _classPrivateFieldLooseKey("fetchSignature");
-var _getUploadParameters = _classPrivateFieldLooseKey("getUploadParameters");
-var _listParts = _classPrivateFieldLooseKey("listParts");
-var _previousRetryDelay = _classPrivateFieldLooseKey("previousRetryDelay");
-var _requests = _classPrivateFieldLooseKey("requests");
-var _retryDelays = _classPrivateFieldLooseKey("retryDelays");
-var _sendCompletionRequest = _classPrivateFieldLooseKey("sendCompletionRequest");
-var _setS3MultipartState = _classPrivateFieldLooseKey("setS3MultipartState");
-var _uploadPartBytes = _classPrivateFieldLooseKey("uploadPartBytes");
-var _getFile = _classPrivateFieldLooseKey("getFile");
-var _shouldRetry = _classPrivateFieldLooseKey("shouldRetry");
-var _nonMultipartUpload = _classPrivateFieldLooseKey("nonMultipartUpload");
-class HTTPCommunicationQueue {
- constructor(_requests2, options, setS3MultipartState, getFile) {
- Object.defineProperty(this, _nonMultipartUpload, {
- value: _nonMultipartUpload2,
- });
- Object.defineProperty(this, _shouldRetry, {
- value: _shouldRetry2,
- });
- Object.defineProperty(this, _abortMultipartUpload, {
- writable: true,
- value: void 0,
- });
- Object.defineProperty(this, _cache, {
- writable: true,
- value: new WeakMap(),
- });
- Object.defineProperty(this, _createMultipartUpload, {
- writable: true,
- value: void 0,
- });
- Object.defineProperty(this, _fetchSignature, {
- writable: true,
- value: void 0,
- });
- Object.defineProperty(this, _getUploadParameters, {
- writable: true,
- value: void 0,
- });
- Object.defineProperty(this, _listParts, {
- writable: true,
- value: void 0,
- });
- Object.defineProperty(this, _previousRetryDelay, {
- writable: true,
- value: void 0,
- });
- Object.defineProperty(this, _requests, {
- writable: true,
- value: void 0,
- });
- Object.defineProperty(this, _retryDelays, {
- writable: true,
- value: void 0,
- });
- Object.defineProperty(this, _sendCompletionRequest, {
- writable: true,
- value: void 0,
- });
- Object.defineProperty(this, _setS3MultipartState, {
- writable: true,
- value: void 0,
- });
- Object.defineProperty(this, _uploadPartBytes, {
- writable: true,
- value: void 0,
- });
- Object.defineProperty(this, _getFile, {
- writable: true,
- value: void 0,
- });
- _classPrivateFieldLooseBase(this, _requests)[_requests] = _requests2;
- _classPrivateFieldLooseBase(this, _setS3MultipartState)[_setS3MultipartState] = setS3MultipartState;
- _classPrivateFieldLooseBase(this, _getFile)[_getFile] = getFile;
- this.setOptions(options);
- }
- setOptions(options) {
- const requests = _classPrivateFieldLooseBase(this, _requests)[_requests];
- if ("abortMultipartUpload" in options) {
- _classPrivateFieldLooseBase(this, _abortMultipartUpload)[_abortMultipartUpload] = requests.wrapPromiseFunction(
- options.abortMultipartUpload,
- {
- priority: 1,
- },
- );
- }
- if ("createMultipartUpload" in options) {
- _classPrivateFieldLooseBase(this, _createMultipartUpload)[_createMultipartUpload] = requests.wrapPromiseFunction(
- options.createMultipartUpload,
- {
- priority: -1,
- },
- );
- }
- if ("signPart" in options) {
- _classPrivateFieldLooseBase(this, _fetchSignature)[_fetchSignature] = requests.wrapPromiseFunction(
- options.signPart,
- );
- }
- if ("listParts" in options) {
- _classPrivateFieldLooseBase(this, _listParts)[_listParts] = requests.wrapPromiseFunction(options.listParts);
- }
- if ("completeMultipartUpload" in options) {
- _classPrivateFieldLooseBase(this, _sendCompletionRequest)[_sendCompletionRequest] = requests.wrapPromiseFunction(
- options.completeMultipartUpload,
- {
- priority: 1,
- },
- );
- }
- if ("retryDelays" in options) {
- var _options$retryDelays;
- _classPrivateFieldLooseBase(this, _retryDelays)[_retryDelays] =
- (_options$retryDelays = options.retryDelays) != null ? _options$retryDelays : [];
- }
- if ("uploadPartBytes" in options) {
- _classPrivateFieldLooseBase(this, _uploadPartBytes)[_uploadPartBytes] = requests.wrapPromiseFunction(
- options.uploadPartBytes,
- {
- priority: Infinity,
- },
- );
- }
- if ("getUploadParameters" in options) {
- _classPrivateFieldLooseBase(this, _getUploadParameters)[_getUploadParameters] = requests.wrapPromiseFunction(
- options.getUploadParameters,
- );
- }
- }
- async getUploadId(file, signal) {
- let cachedResult;
- while ((cachedResult = _classPrivateFieldLooseBase(this, _cache)[_cache].get(file.data)) != null) {
- try {
- return await cachedResult;
- } catch {}
- }
- const promise = _classPrivateFieldLooseBase(this, _createMultipartUpload)[_createMultipartUpload](
- _classPrivateFieldLooseBase(this, _getFile)[_getFile](file),
- signal,
- );
- const abortPromise = () => {
- promise.abort(signal.reason);
- _classPrivateFieldLooseBase(this, _cache)[_cache].delete(file.data);
- };
- signal.addEventListener("abort", abortPromise, {
- once: true,
- });
- _classPrivateFieldLooseBase(this, _cache)[_cache].set(file.data, promise);
- promise.then(async result => {
- signal.removeEventListener("abort", abortPromise);
- _classPrivateFieldLooseBase(this, _setS3MultipartState)[_setS3MultipartState](file, result);
- _classPrivateFieldLooseBase(this, _cache)[_cache].set(file.data, result);
- }, () => {
- signal.removeEventListener("abort", abortPromise);
- _classPrivateFieldLooseBase(this, _cache)[_cache].delete(file.data);
- });
- return promise;
- }
- async abortFileUpload(file) {
- const result = _classPrivateFieldLooseBase(this, _cache)[_cache].get(file.data);
- if (result == null) {
- return;
- }
- _classPrivateFieldLooseBase(this, _cache)[_cache].delete(file.data);
- _classPrivateFieldLooseBase(this, _setS3MultipartState)[_setS3MultipartState](file, Object.create(null));
- let awaitedResult;
- try {
- awaitedResult = await result;
- } catch {
- return;
- }
- await _classPrivateFieldLooseBase(this, _abortMultipartUpload)[_abortMultipartUpload](
- _classPrivateFieldLooseBase(this, _getFile)[_getFile](file),
- awaitedResult,
- );
- }
- async uploadFile(file, chunks, signal) {
- throwIfAborted(signal);
- if (chunks.length === 1 && !chunks[0].shouldUseMultipart) {
- return _classPrivateFieldLooseBase(this, _nonMultipartUpload)[_nonMultipartUpload](file, chunks[0], signal);
- }
- const {
- uploadId,
- key,
- } = await this.getUploadId(file, signal);
- throwIfAborted(signal);
- try {
- const parts = await Promise.all(chunks.map((chunk, i) => this.uploadChunk(file, i + 1, chunk, signal)));
- throwIfAborted(signal);
- return await _classPrivateFieldLooseBase(this, _sendCompletionRequest)[_sendCompletionRequest](
- _classPrivateFieldLooseBase(this, _getFile)[_getFile](file),
- {
- key,
- uploadId,
- parts,
- signal,
- },
- signal,
- ).abortOn(signal);
- } catch (err) {
- if (
- (err == null ? void 0 : err.cause) !== pausingUploadReason && (err == null ? void 0 : err.name) !== "AbortError"
- ) {
- this.abortFileUpload(file);
- }
- throw err;
- }
- }
- restoreUploadFile(file, uploadIdAndKey) {
- _classPrivateFieldLooseBase(this, _cache)[_cache].set(file.data, uploadIdAndKey);
- }
- async resumeUploadFile(file, chunks, signal) {
- throwIfAborted(signal);
- if (chunks.length === 1 && chunks[0] != null && !chunks[0].shouldUseMultipart) {
- return _classPrivateFieldLooseBase(this, _nonMultipartUpload)[_nonMultipartUpload](file, chunks[0], signal);
- }
- const {
- uploadId,
- key,
- } = await this.getUploadId(file, signal);
- throwIfAborted(signal);
- const alreadyUploadedParts = await _classPrivateFieldLooseBase(this, _listParts)[_listParts](
- _classPrivateFieldLooseBase(this, _getFile)[_getFile](file),
- {
- uploadId,
- key,
- signal,
- },
- signal,
- ).abortOn(signal);
- throwIfAborted(signal);
- const parts = await Promise.all(chunks.map((chunk, i) => {
- const partNumber = i + 1;
- const alreadyUploadedInfo = alreadyUploadedParts.find(_ref2 => {
- let {
- PartNumber,
- } = _ref2;
- return PartNumber === partNumber;
- });
- if (alreadyUploadedInfo == null) {
- return this.uploadChunk(file, partNumber, chunk, signal);
- }
- chunk == null || chunk.setAsUploaded == null || chunk.setAsUploaded();
- return {
- PartNumber: partNumber,
- ETag: alreadyUploadedInfo.ETag,
- };
- }));
- throwIfAborted(signal);
- return _classPrivateFieldLooseBase(this, _sendCompletionRequest)[_sendCompletionRequest](
- _classPrivateFieldLooseBase(this, _getFile)[_getFile](file),
- {
- key,
- uploadId,
- parts,
- signal,
- },
- signal,
- ).abortOn(signal);
- }
- async uploadChunk(file, partNumber, chunk, signal) {
- throwIfAborted(signal);
- const {
- uploadId,
- key,
- } = await this.getUploadId(file, signal);
- const signatureRetryIterator = _classPrivateFieldLooseBase(this, _retryDelays)[_retryDelays].values();
- const chunkRetryIterator = _classPrivateFieldLooseBase(this, _retryDelays)[_retryDelays].values();
- const shouldRetrySignature = () => {
- const next = signatureRetryIterator.next();
- if (next == null || next.done) {
- return null;
- }
- return next.value;
- };
- for (;;) {
- throwIfAborted(signal);
- const chunkData = chunk.getData();
- const {
- onProgress,
- onComplete,
- } = chunk;
- let signature;
- try {
- signature = await _classPrivateFieldLooseBase(this, _fetchSignature)[_fetchSignature](
- _classPrivateFieldLooseBase(this, _getFile)[_getFile](file),
- {
- uploadId,
- key,
- partNumber,
- body: chunkData,
- signal,
- },
- ).abortOn(signal);
- } catch (err) {
- const timeout = shouldRetrySignature();
- if (timeout == null || signal.aborted) {
- throw err;
- }
- await new Promise(resolve => setTimeout(resolve, timeout));
- continue;
- }
- throwIfAborted(signal);
- try {
- return {
- PartNumber: partNumber,
- ...(await _classPrivateFieldLooseBase(this, _uploadPartBytes)[_uploadPartBytes]({
- signature,
- body: chunkData,
- size: chunkData.size,
- onProgress,
- onComplete,
- signal,
- }).abortOn(signal)),
- };
- } catch (err) {
- if (!(await _classPrivateFieldLooseBase(this, _shouldRetry)[_shouldRetry](err, chunkRetryIterator))) throw err;
- }
- }
- }
-}
-async function _shouldRetry2(err, retryDelayIterator) {
- var _err$source;
- const requests = _classPrivateFieldLooseBase(this, _requests)[_requests];
- const status = err == null || (_err$source = err.source) == null ? void 0 : _err$source.status;
- if (status == null) {
- return false;
- }
- if (status === 403 && err.message === "Request has expired") {
- if (!requests.isPaused) {
- if (requests.limit === 1 || _classPrivateFieldLooseBase(this, _previousRetryDelay)[_previousRetryDelay] == null) {
- const next = retryDelayIterator.next();
- if (next == null || next.done) {
- return false;
- }
- _classPrivateFieldLooseBase(this, _previousRetryDelay)[_previousRetryDelay] = next.value;
- }
- requests.rateLimit(0);
- await new Promise(resolve =>
- setTimeout(resolve, _classPrivateFieldLooseBase(this, _previousRetryDelay)[_previousRetryDelay])
- );
- }
- } else if (status === 429) {
- if (!requests.isPaused) {
- const next = retryDelayIterator.next();
- if (next == null || next.done) {
- return false;
- }
- requests.rateLimit(next.value);
- }
- } else if (status > 400 && status < 500 && status !== 409) {
- return false;
- } else if (typeof navigator !== "undefined" && navigator.onLine === false) {
- if (!requests.isPaused) {
- requests.pause();
- window.addEventListener("online", () => {
- requests.resume();
- }, {
- once: true,
- });
- }
- } else {
- const next = retryDelayIterator.next();
- if (next == null || next.done) {
- return false;
- }
- await new Promise(resolve => setTimeout(resolve, next.value));
- }
- return true;
-}
-async function _nonMultipartUpload2(file, chunk, signal) {
- const {
- method = "POST",
- url,
- fields,
- headers,
- } = await _classPrivateFieldLooseBase(this, _getUploadParameters)[_getUploadParameters](
- _classPrivateFieldLooseBase(this, _getFile)[_getFile](file),
- {
- signal,
- },
- ).abortOn(signal);
- let body;
- const data = chunk.getData();
- if (method.toUpperCase() === "POST") {
- const formData = new FormData();
- Object.entries(fields).forEach(_ref10 => {
- let [key, value] = _ref10;
- return formData.set(key, value);
- });
- formData.set("file", data);
- body = formData;
- } else {
- body = data;
- }
- const {
- onProgress,
- onComplete,
- } = chunk;
- const result = await _classPrivateFieldLooseBase(this, _uploadPartBytes)[_uploadPartBytes]({
- signature: {
- url,
- headers,
- method,
- },
- body,
- size: data.size,
- onProgress,
- onComplete,
- signal,
- }).abortOn(signal);
- return "location" in result ? result : {
- location: removeMetadataFromURL(url),
- ...result,
- };
-}
+const defaultOptions = {
+ allowedMetaFields: null,
+ limit: 6,
+ getTemporarySecurityCredentials: false,
+ shouldUseMultipart: file => file.size !== 0,
+ retryDelays: [0, 1000, 3000, 5000],
+ companionHeaders: {},
+};
var _companionCommunicationQueue = _classPrivateFieldLooseKey("companionCommunicationQueue");
var _client = _classPrivateFieldLooseKey("client");
var _cachedTemporaryCredentials = _classPrivateFieldLooseKey("cachedTemporaryCredentials");
var _getTemporarySecurityCredentials = _classPrivateFieldLooseKey("getTemporarySecurityCredentials");
-var _setS3MultipartState2 = _classPrivateFieldLooseKey("setS3MultipartState");
-var _getFile2 = _classPrivateFieldLooseKey("getFile");
+var _setS3MultipartState = _classPrivateFieldLooseKey("setS3MultipartState");
+var _getFile = _classPrivateFieldLooseKey("getFile");
var _uploadLocalFile = _classPrivateFieldLooseKey("uploadLocalFile");
var _getCompanionClientArgs = _classPrivateFieldLooseKey("getCompanionClientArgs");
var _upload = _classPrivateFieldLooseKey("upload");
@@ -502,8 +79,18 @@ var _resetResumableCapability = _classPrivateFieldLooseKey("resetResumableCapabi
_Symbol$for = Symbol.for("uppy test: getClient");
export default class AwsS3Multipart extends BasePlugin {
constructor(uppy, opts) {
- var _this$opts$rateLimite;
- super(uppy, opts);
+ var _rateLimitedQueue;
+ super(uppy, {
+ ...defaultOptions,
+ uploadPartBytes: AwsS3Multipart.uploadPartBytes,
+ createMultipartUpload: null,
+ listParts: null,
+ abortMultipartUpload: null,
+ completeMultipartUpload: null,
+ signPart: null,
+ getUploadParameters: null,
+ ...opts,
+ });
Object.defineProperty(this, _getCompanionClientArgs, {
value: _getCompanionClientArgs2,
});
@@ -525,13 +112,13 @@ export default class AwsS3Multipart extends BasePlugin {
writable: true,
value: void 0,
});
- Object.defineProperty(this, _setS3MultipartState2, {
+ Object.defineProperty(this, _setS3MultipartState, {
writable: true,
- value: (file, _ref3) => {
+ value: (file, _ref2) => {
let {
key,
uploadId,
- } = _ref3;
+ } = _ref2;
const cFile = this.uppy.getFile(file.id);
if (cFile == null) {
return;
@@ -545,7 +132,7 @@ export default class AwsS3Multipart extends BasePlugin {
});
},
});
- Object.defineProperty(this, _getFile2, {
+ Object.defineProperty(this, _getFile, {
writable: true,
value: file => {
return this.uppy.getFile(file.id) || file;
@@ -620,38 +207,30 @@ export default class AwsS3Multipart extends BasePlugin {
this.id = this.opts.id || "AwsS3Multipart";
this.title = "AWS S3 Multipart";
_classPrivateFieldLooseBase(this, _client)[_client] = new RequestClient(uppy, opts);
- const defaultOptions = {
- allowedMetaFields: null,
- limit: 6,
- shouldUseMultipart: file => file.size !== 0,
- retryDelays: [0, 1000, 3000, 5000],
- createMultipartUpload: this.createMultipartUpload.bind(this),
- listParts: this.listParts.bind(this),
- abortMultipartUpload: this.abortMultipartUpload.bind(this),
- completeMultipartUpload: this.completeMultipartUpload.bind(this),
- getTemporarySecurityCredentials: false,
- signPart: opts != null && opts.getTemporarySecurityCredentials
- ? this.createSignedURL.bind(this)
- : this.signPart.bind(this),
- uploadPartBytes: AwsS3Multipart.uploadPartBytes,
+ const dynamicDefaultOptions = {
+ createMultipartUpload: this.createMultipartUpload,
+ listParts: this.listParts,
+ abortMultipartUpload: this.abortMultipartUpload,
+ completeMultipartUpload: this.completeMultipartUpload,
+ signPart: opts != null && opts.getTemporarySecurityCredentials ? this.createSignedURL : this.signPart,
getUploadParameters: opts != null && opts.getTemporarySecurityCredentials
- ? this.createSignedURL.bind(this)
- : this.getUploadParameters.bind(this),
- companionHeaders: {},
- };
- this.opts = {
- ...defaultOptions,
- ...opts,
+ ? this.createSignedURL
+ : this.getUploadParameters,
};
+ for (const key of Object.keys(dynamicDefaultOptions)) {
+ if (this.opts[key] == null) {
+ this.opts[key] = dynamicDefaultOptions[key].bind(this);
+ }
+ }
if ((opts == null ? void 0 : opts.prepareUploadParts) != null && opts.signPart == null) {
- this.opts.signPart = async (file, _ref4) => {
+ this.opts.signPart = async (file, _ref3) => {
let {
uploadId,
key,
partNumber,
body,
signal,
- } = _ref4;
+ } = _ref3;
const {
presignedUrls,
headers,
@@ -670,15 +249,15 @@ export default class AwsS3Multipart extends BasePlugin {
};
};
}
- this.requests = (_this$opts$rateLimite = this.opts.rateLimitedQueue) != null
- ? _this$opts$rateLimite
+ this.requests = (_rateLimitedQueue = this.opts.rateLimitedQueue) != null
+ ? _rateLimitedQueue
: new RateLimitedQueue(this.opts.limit);
_classPrivateFieldLooseBase(this, _companionCommunicationQueue)[_companionCommunicationQueue] =
new HTTPCommunicationQueue(
this.requests,
this.opts,
- _classPrivateFieldLooseBase(this, _setS3MultipartState2)[_setS3MultipartState2],
- _classPrivateFieldLooseBase(this, _getFile2)[_getFile2],
+ _classPrivateFieldLooseBase(this, _setS3MultipartState)[_setS3MultipartState],
+ _classPrivateFieldLooseBase(this, _getFile)[_getFile],
);
this.uploaders = Object.create(null);
this.uploaderEvents = Object.create(null);
@@ -695,12 +274,9 @@ export default class AwsS3Multipart extends BasePlugin {
_classPrivateFieldLooseBase(this, _setCompanionHeaders)[_setCompanionHeaders]();
}
resetUploaderReferences(fileID, opts) {
- if (opts === void 0) {
- opts = {};
- }
if (this.uploaders[fileID]) {
this.uploaders[fileID].abort({
- really: opts.abort || false,
+ really: (opts == null ? void 0 : opts.abort) || false,
});
this.uploaders[fileID] = null;
}
@@ -735,11 +311,14 @@ export default class AwsS3Multipart extends BasePlugin {
signal,
}).then(assertServerError);
}
- listParts(file, _ref5, signal) {
+ listParts(file, _ref4, oldSignal) {
+ var _signal;
let {
key,
uploadId,
- } = _ref5;
+ signal,
+ } = _ref4;
+ (_signal = signal) != null ? _signal : signal = oldSignal;
this.assertHost("listParts");
throwIfAborted(signal);
const filename = encodeURIComponent(key);
@@ -747,12 +326,15 @@ export default class AwsS3Multipart extends BasePlugin {
signal,
}).then(assertServerError);
}
- completeMultipartUpload(file, _ref6, signal) {
+ completeMultipartUpload(file, _ref5, oldSignal) {
+ var _signal2;
let {
key,
uploadId,
parts,
- } = _ref6;
+ signal,
+ } = _ref5;
+ (_signal2 = signal) != null ? _signal2 : signal = oldSignal;
this.assertHost("completeMultipartUpload");
throwIfAborted(signal);
const filename = encodeURIComponent(key);
@@ -775,7 +357,6 @@ export default class AwsS3Multipart extends BasePlugin {
uploadId,
key,
partNumber,
- signal,
} = options;
return {
method: "PUT",
@@ -791,20 +372,19 @@ export default class AwsS3Multipart extends BasePlugin {
Key: key != null ? key : `${crypto.randomUUID()}-${file.name}`,
uploadId,
partNumber,
- signal,
})}`,
headers: {
"Content-Type": file.type,
},
};
}
- signPart(file, _ref7) {
+ signPart(file, _ref6) {
let {
uploadId,
key,
partNumber,
signal,
- } = _ref7;
+ } = _ref6;
this.assertHost("signPart");
throwIfAborted(signal);
if (uploadId == null || key == null || partNumber == null) {
@@ -818,11 +398,14 @@ export default class AwsS3Multipart extends BasePlugin {
},
).then(assertServerError);
}
- abortMultipartUpload(file, _ref8, signal) {
+ abortMultipartUpload(file, _ref7, oldSignal) {
+ var _signal3;
let {
key,
uploadId,
- } = _ref8;
+ signal,
+ } = _ref7;
+ (_signal3 = signal) != null ? _signal3 : signal = oldSignal;
this.assertHost("abortMultipartUpload");
const filename = encodeURIComponent(key);
const uploadIdEnc = encodeURIComponent(uploadId);
@@ -854,7 +437,7 @@ export default class AwsS3Multipart extends BasePlugin {
});
return _classPrivateFieldLooseBase(this, _client)[_client].get(`s3/params?${query}`, options);
}
- static async uploadPartBytes(_ref9) {
+ static async uploadPartBytes(_ref8) {
let {
signature: {
url,
@@ -867,7 +450,7 @@ export default class AwsS3Multipart extends BasePlugin {
onProgress,
onComplete,
signal,
- } = _ref9;
+ } = _ref8;
throwIfAborted(signal);
if (url == null) {
throw new Error("Cannot upload to an undefined URL");
@@ -888,9 +471,9 @@ export default class AwsS3Multipart extends BasePlugin {
xhr.abort();
}
function cleanup() {
- signal.removeEventListener("abort", onabort);
+ signal == null || signal.removeEventListener("abort", onabort);
}
- signal.addEventListener("abort", onabort);
+ signal == null || signal.addEventListener("abort", onabort);
xhr.upload.addEventListener("progress", ev => {
onProgress(ev);
});
@@ -908,15 +491,15 @@ export default class AwsS3Multipart extends BasePlugin {
});
xhr.addEventListener("load", ev => {
cleanup();
- if (ev.target.status === 403 && ev.target.responseText.includes("<Message>Request has expired</Message>")) {
+ if (xhr.status === 403 && xhr.responseText.includes("<Message>Request has expired</Message>")) {
const error = new Error("Request has expired");
- error.source = ev.target;
+ error.source = xhr;
reject(error);
return;
}
- if (ev.target.status < 200 || ev.target.status >= 300) {
+ if (xhr.status < 200 || xhr.status >= 300) {
const error = new Error("Non 2xx");
- error.source = ev.target;
+ error.source = xhr;
reject(error);
return;
}
@@ -924,8 +507,8 @@ export default class AwsS3Multipart extends BasePlugin {
loaded: size,
lengthComputable: true,
});
- const etag = ev.target.getResponseHeader("ETag");
- const location = ev.target.getResponseHeader("Location");
+ const etag = xhr.getResponseHeader("ETag");
+ const location = xhr.getResponseHeader("Location");
if (method.toUpperCase() === "POST" && location === null) {
console.warn(
"AwsS3/Multipart: Could not read the Location header. This likely means CORS is not configured correctly on the S3 Bucket. See https://uppy.io/docs/aws-s3-multipart#S3-Bucket-Configuration for instructions.",
@@ -979,7 +562,7 @@ async function _getTemporarySecurityCredentials2(options) {
if (this.opts.getTemporarySecurityCredentials === true) {
this.assertHost("getTemporarySecurityCredentials");
_classPrivateFieldLooseBase(this, _cachedTemporaryCredentials)[_cachedTemporaryCredentials] =
- _classPrivateFieldLooseBase(this, _client)[_client].get("s3/sts", null, options).then(assertServerError);
+ _classPrivateFieldLooseBase(this, _client)[_client].get("s3/sts", options).then(assertServerError);
} else {
_classPrivateFieldLooseBase(this, _cachedTemporaryCredentials)[_cachedTemporaryCredentials] = this.opts
.getTemporarySecurityCredentials(options);
@@ -1018,18 +601,16 @@ function _uploadLocalFile2(file) {
body: {
...result,
},
+ status: 200,
uploadURL: result.location,
};
this.resetUploaderReferences(file.id);
- this.uppy.emit("upload-success", _classPrivateFieldLooseBase(this, _getFile2)[_getFile2](file), uploadResp);
+ this.uppy.emit("upload-success", _classPrivateFieldLooseBase(this, _getFile)[_getFile](file), uploadResp);
if (result.location) {
this.uppy.log(`Download ${file.name} from ${result.location}`);
}
resolve();
};
- const onPartComplete = part => {
- this.uppy.emit("s3-multipart:part-uploaded", _classPrivateFieldLooseBase(this, _getFile2)[_getFile2](file), part);
- };
const upload = new MultipartUploader(file.data, {
companionComm: _classPrivateFieldLooseBase(this, _companionCommunicationQueue)[_companionCommunicationQueue],
log: function() {
@@ -1039,7 +620,9 @@ function _uploadLocalFile2(file) {
onProgress,
onError,
onSuccess,
- onPartComplete,
+ onPartComplete: part => {
+ this.uppy.emit("s3-multipart:part-uploaded", _classPrivateFieldLooseBase(this, _getFile)[_getFile](file), part);
+ },
file,
shouldUseMultipart: this.opts.shouldUseMultipart,
...file.s3Multipart,
@@ -1052,15 +635,12 @@ function _uploadLocalFile2(file) {
this.resetUploaderReferences(file.id, {
abort: true,
});
- resolve(`upload ${removed.id} was removed`);
+ resolve(`upload ${removed} was removed`);
});
- eventManager.onCancelAll(file.id, function(_temp) {
- let {
- reason,
- } = _temp === void 0 ? {} : _temp;
- if (reason === "user") {
+ eventManager.onCancelAll(file.id, options => {
+ if ((options == null ? void 0 : options.reason) === "user") {
upload.abort();
- _this.resetUploaderReferences(file.id, {
+ this.resetUploaderReferences(file.id, {
abort: true,
});
}
@@ -1083,8 +663,9 @@ function _uploadLocalFile2(file) {
});
}
function _getCompanionClientArgs2(file) {
+ var _file$remote;
return {
- ...file.remote.body,
+ ...((_file$remote = file.remote) == null ? void 0 : _file$remote.body),
protocol: "s3-multipart",
size: file.data.size,
metadata: file.meta, |
Murderlon
reviewed
Mar 11, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kudos on pushing through to get this done 👏
Murderlon
approved these changes
Mar 19, 2024
Merged
github-actions bot
added a commit
that referenced
this pull request
Mar 27, 2024
| Package | Version | Package | Version | | ------------------------- | ------- | ------------------------- | ------- | | @uppy/audio | 1.1.8 | @uppy/progress-bar | 3.1.1 | | @uppy/aws-s3-multipart | 3.11.0 | @uppy/provider-views | 3.11.0 | | @uppy/box | 2.3.0 | @uppy/react | 3.3.0 | | @uppy/companion | 4.13.0 | @uppy/remote-sources | 1.2.0 | | @uppy/companion-client | 3.8.0 | @uppy/screen-capture | 3.2.0 | | @uppy/compressor | 1.1.2 | @uppy/status-bar | 3.3.1 | | @uppy/core | 3.10.0 | @uppy/thumbnail-generator | 3.1.0 | | @uppy/dashboard | 3.8.0 | @uppy/transloadit | 3.6.0 | | @uppy/drag-drop | 3.1.0 | @uppy/tus | 3.5.4 | | @uppy/drop-target | 2.0.5 | @uppy/unsplash | 3.3.0 | | @uppy/dropbox | 3.3.0 | @uppy/url | 3.6.0 | | @uppy/facebook | 3.3.0 | @uppy/utils | 5.7.5 | | @uppy/golden-retriever | 3.2.0 | @uppy/webcam | 3.4.0 | | @uppy/google-drive | 3.5.0 | @uppy/zoom | 2.3.0 | | @uppy/instagram | 3.3.0 | uppy | 3.24.0 | | @uppy/onedrive | 3.3.0 | | | - @uppy/box,@uppy/companion-client,@uppy/provider-views,@uppy/status-bar: fix type imports (Antoine du Hamel / #5038) - @uppy/aws-s3-multipart: mark `opts` as optional (Antoine du Hamel / #5039) - e2e: bump Cypress version (Antoine du Hamel / #5034) - @uppy/react: refactor to TS (Antoine du Hamel / #5012) - @uppy/core: refine type of private variables (Antoine du Hamel / #5028) - @uppy/dashboard: refine type of private variables (Antoine du Hamel / #5027) - @uppy/drag-drop: refine type of private variables (Antoine du Hamel / #5026) - @uppy/status-bar: refine type of private variables (Antoine du Hamel / #5025) - @uppy/remote-sources: migrate to TS (Merlijn Vos / #5020) - @uppy/dashboard: refine option types (Antoine du Hamel / #5022) - @uppy/dashboard: add new `autoOpen` option (Chris Grigg / #5001) - @uppy/core: fix some type errors (Antoine du Hamel / #5015) - @uppy/audio,@uppy/dashboard,@uppy/drop-target,@uppy/webcam: add missing exports (Antoine du Hamel / #5014) - meta: Bump webpack-dev-middleware from 5.3.3 to 5.3.4 (dependabot[bot] / #5013) - @uppy/dashboard: refactor to TypeScript (Antoine du Hamel / #4984) - @uppy/companion: improve error msg (Mikael Finstad / #5010) - @uppy/aws-s3-multipart: refactor to TS (Antoine du Hamel / #4902) - @uppy/dashboard: refactor to stable lifecycle method (Antoine du Hamel / #4999) - @uppy/companion: crash if trying to set path to / (Mikael Finstad / #5003) - @uppy/provider-views: fix `super.toggleCheckbox` bug (Mikael Finstad / #5004) - @uppy/aws-s3-multipart: fix escaping issue with client signed request (Hiroki Shimizu / #5006) - @uppy/drag-drop,@uppy/progress-bar: add missing exports (Antoine du Hamel / #5009) - @uppy/transloadit: migrate to TS (Merlijn Vos / #4987) - @uppy/utils: fix `RateLimitedQueue#wrapPromiseFunction` types (Antoine du Hamel / #5007) - @uppy/golden-retriever: migrate to TS (Merlijn Vos / #4989) - meta: Bump follow-redirects from 1.15.4 to 1.15.6 (dependabot[bot] / #5002) - meta: fix `resize-observer-polyfill` types (Antoine du Hamel / #4994) - @uppy/core: various type fixes (Antoine du Hamel / #4995) - @uppy/utils: fix `findAllDOMElements` type (Antoine du Hamel / #4997) - @uppy/status-bar: fix `recoveredState` type (Antoine du Hamel / #4996) - @uppy/utils: fix `AbortablePromise` type (Antoine du Hamel / #4988) - @uppy/core,@uppy/provider-views: Fix breadcrumbs (Evgenia Karunus / #4986) - @uppy/drag-drop: refactor to TypeScript (Antoine du Hamel / #4983) - @uppy/webcam: refactor to TypeScript (Antoine du Hamel / #4870) - @uppy/url: migrate to TS (Merlijn Vos / #4980) - @uppy/zoom: refactor to TypeScript (Murderlon / #4979) - @uppy/unsplash: refactor to TypeScript (Murderlon / #4979) - @uppy/onedrive: refactor to TypeScript (Murderlon / #4979) - @uppy/instagram: refactor to TypeScript (Murderlon / #4979) - @uppy/google-drive: refactor to TypeScript (Murderlon / #4979) - @uppy/facebook: refactor to TypeScript (Murderlon / #4979) - @uppy/dropbox: refactor to TypeScript (Murderlon / #4979) - @uppy/box: refactor to TypeScript (Murderlon / #4979) - @uppy/utils: migrate RateLimitedQueue to TS (Merlijn Vos / #4981) - @uppy/thumbnail-generator: migrate to TS (Merlijn Vos / #4978) - @uppy/screen-capture: migrate to TS (Merlijn Vos / #4965) - @uppy/companion-client: Replace Provider.initPlugin with composition (Merlijn Vos / #4977)
This was referenced Mar 28, 2024
github-actions bot
added a commit
that referenced
this pull request
Mar 28, 2024
| Package | Version | Package | Version | | ------------------------- | ------------ | ------------------------- | ------------ | | @uppy/angular | 0.7.0-beta.1 | @uppy/progress-bar | 4.0.0-beta.1 | | @uppy/audio | 2.0.0-beta.1 | @uppy/provider-views | 4.0.0-beta.1 | | @uppy/aws-s3 | 4.0.0-beta.1 | @uppy/react | 4.0.0-beta.1 | | @uppy/aws-s3-multipart | 4.0.0-beta.1 | @uppy/redux-dev-tools | 4.0.0-beta.1 | | @uppy/box | 3.0.0-beta.1 | @uppy/remote-sources | 2.0.0-beta.1 | | @uppy/companion | 5.0.0-beta.1 | @uppy/screen-capture | 4.0.0-beta.1 | | @uppy/companion-client | 4.0.0-beta.1 | @uppy/status-bar | 4.0.0-beta.1 | | @uppy/compressor | 2.0.0-beta.1 | @uppy/store-default | 4.0.0-beta.1 | | @uppy/core | 4.0.0-beta.1 | @uppy/store-redux | 4.0.0-beta.1 | | @uppy/dashboard | 4.0.0-beta.1 | @uppy/svelte | 4.0.0-beta.1 | | @uppy/drag-drop | 4.0.0-beta.1 | @uppy/thumbnail-generator | 4.0.0-beta.1 | | @uppy/drop-target | 3.0.0-beta.1 | @uppy/transloadit | 4.0.0-beta.1 | | @uppy/dropbox | 4.0.0-beta.1 | @uppy/tus | 4.0.0-beta.1 | | @uppy/facebook | 4.0.0-beta.1 | @uppy/unsplash | 4.0.0-beta.1 | | @uppy/file-input | 4.0.0-beta.1 | @uppy/url | 4.0.0-beta.1 | | @uppy/form | 4.0.0-beta.1 | @uppy/utils | 6.0.0-beta.1 | | @uppy/golden-retriever | 4.0.0-beta.1 | @uppy/vue | 2.0.0-beta.1 | | @uppy/google-drive | 4.0.0-beta.1 | @uppy/webcam | 4.0.0-beta.1 | | @uppy/image-editor | 3.0.0-beta.1 | @uppy/xhr-upload | 4.0.0-beta.1 | | @uppy/informer | 4.0.0-beta.1 | @uppy/zoom | 3.0.0-beta.1 | | @uppy/instagram | 4.0.0-beta.1 | uppy | 4.0.0-beta.1 | | @uppy/onedrive | 4.0.0-beta.1 | | | - @uppy/vue: migrate to Composition API with TS & drop Vue 2 support (Merlijn Vos / #5043) - @uppy/angular: upgrade to Angular 17.x and to TS 5.4 (Antoine du Hamel / #5008) - @uppy/svelte: remove UMD output and make it use newer types (Antoine du Hamel / #5023) - @uppy/companion-client,@uppy/provider-views,@uppy/status-bar: fix type imports (Antoine du Hamel / #5038) - @uppy/aws-s3-multipart: mark `opts` as optional (Antoine du Hamel / #5039) - e2e: bump Cypress version (Antoine du Hamel / #5034) - @uppy/react: remove `prop-types` dependency (Antoine du Hamel / #5031) - @uppy/progress-bar: remove default target (Antoine du Hamel / #4971) - @uppy/status-bar: remove default target (Antoine du Hamel / #4970) - @uppy/react: remove `Wrapper.ts` (Antoine du Hamel / #5032) - @uppy/react: refactor to TS (Antoine du Hamel / #5012) - @uppy/core: refine type of private variables (Antoine du Hamel / #5028) - @uppy/dashboard: refine type of private variables (Antoine du Hamel / #5027) - @uppy/drag-drop: refine type of private variables (Antoine du Hamel / #5026) - @uppy/status-bar: refine type of private variables (Antoine du Hamel / #5025) - @uppy/remote-sources: migrate to TS (Merlijn Vos / #5020) - @uppy/dashboard: refine option types (Antoine du Hamel / #5022) - @uppy/dashboard: add new `autoOpen` option (Chris Grigg / #5001) - @uppy/aws-s3-multipart,@uppy/tus,@uppy/utils,@uppy/xhr-upload: Make `allowedMetaFields` consistent (Merlijn Vos / #5011) - @uppy/core: fix some type errors (Antoine du Hamel / #5015) - @uppy/audio,@uppy/dashboard,@uppy/drop-target,@uppy/webcam: add missing exports (Antoine du Hamel / #5014) - meta: Bump webpack-dev-middleware from 5.3.3 to 5.3.4 (dependabot[bot] / #5013) - @uppy/dashboard: refactor to TypeScript (Antoine du Hamel / #4984) - @uppy/companion: improve error msg (Mikael Finstad / #5010) - @uppy/aws-s3-multipart: refactor to TS (Antoine du Hamel / #4902) - @uppy/dashboard: refactor to stable lifecycle method (Antoine du Hamel / #4999) - @uppy/companion: crash if trying to set path to / (Mikael Finstad / #5003) - @uppy/provider-views: fix `super.toggleCheckbox` bug (Mikael Finstad / #5004) - @uppy/aws-s3-multipart: fix escaping issue with client signed request (Hiroki Shimizu / #5006) - @uppy/drag-drop,@uppy/progress-bar: add missing exports (Antoine du Hamel / #5009) - @uppy/transloadit: migrate to TS (Merlijn Vos / #4987) - @uppy/utils: fix `RateLimitedQueue#wrapPromiseFunction` types (Antoine du Hamel / #5007) - @uppy/golden-retriever: migrate to TS (Merlijn Vos / #4989) - meta: Bump follow-redirects from 1.15.4 to 1.15.6 (dependabot[bot] / #5002) - meta: fix `resize-observer-polyfill` types (Antoine du Hamel / #4994) - @uppy/core: various type fixes (Antoine du Hamel / #4995) - @uppy/utils: fix `findAllDOMElements` type (Antoine du Hamel / #4997) - @uppy/status-bar: fix `recoveredState` type (Antoine du Hamel / #4996) - @uppy/utils: fix `AbortablePromise` type (Antoine du Hamel / #4988) - @uppy/core,@uppy/provider-views: Fix breadcrumbs (Evgenia Karunus / #4986) - @uppy/drag-drop: refactor to TypeScript (Antoine du Hamel / #4983) - @uppy/webcam: refactor to TypeScript (Antoine du Hamel / #4870) - @uppy/url: migrate to TS (Merlijn Vos / #4980) - @uppy/zoom: refactor to TypeScript (Murderlon / #4979) - @uppy/unsplash: refactor to TypeScript (Murderlon / #4979) - @uppy/onedrive: refactor to TypeScript (Murderlon / #4979) - @uppy/instagram: refactor to TypeScript (Murderlon / #4979) - @uppy/google-drive: refactor to TypeScript (Murderlon / #4979) - @uppy/facebook: refactor to TypeScript (Murderlon / #4979) - @uppy/dropbox: refactor to TypeScript (Murderlon / #4979) - @uppy/box: refactor to TypeScript (Murderlon / #4979) - @uppy/utils: migrate RateLimitedQueue to TS (Merlijn Vos / #4981) - @uppy/thumbnail-generator: migrate to TS (Merlijn Vos / #4978) - @uppy/screen-capture: migrate to TS (Merlijn Vos / #4965) - @uppy/companion-client: Replace Provider.initPlugin with composition (Merlijn Vos / #4977) - uppy: remove legacy bundle (Antoine du Hamel) - meta: include types in npm archive (Antoine du Hamel) - @uppy/angular: fix build (Antoine du Hamel) - meta: Remove generate types from locale-pack (Murderlon) - meta: enable CI on `4.x` branch (Antoine du Hamel) - @uppy/vue: [v4.x] remove manual types (Antoine du Hamel / #4803) - meta: prepare release workflow for beta versions (Antoine du Hamel) | Package | Version | Package | Version | | ------------------------- | ------- | ------------------------- | ------- | | @uppy/audio | 1.1.8 | @uppy/progress-bar | 3.1.1 | | @uppy/aws-s3-multipart | 3.11.0 | @uppy/provider-views | 3.11.0 | | @uppy/box | 2.3.0 | @uppy/react | 3.3.0 | | @uppy/companion | 4.13.0 | @uppy/remote-sources | 1.2.0 | | @uppy/companion-client | 3.8.0 | @uppy/screen-capture | 3.2.0 | | @uppy/compressor | 1.1.2 | @uppy/status-bar | 3.3.1 | | @uppy/core | 3.10.0 | @uppy/thumbnail-generator | 3.1.0 | | @uppy/dashboard | 3.8.0 | @uppy/transloadit | 3.6.0 | | @uppy/drag-drop | 3.1.0 | @uppy/tus | 3.5.4 | | @uppy/drop-target | 2.0.5 | @uppy/unsplash | 3.3.0 | | @uppy/dropbox | 3.3.0 | @uppy/url | 3.6.0 | | @uppy/facebook | 3.3.0 | @uppy/utils | 5.7.5 | | @uppy/golden-retriever | 3.2.0 | @uppy/webcam | 3.4.0 | | @uppy/google-drive | 3.5.0 | @uppy/zoom | 2.3.0 | | @uppy/instagram | 3.3.0 | uppy | 3.24.0 | | @uppy/onedrive | 3.3.0 | | | - @uppy/box,@uppy/companion-client,@uppy/provider-views,@uppy/status-bar: fix type imports (Antoine du Hamel / #5038) - @uppy/aws-s3-multipart: mark `opts` as optional (Antoine du Hamel / #5039) - e2e: bump Cypress version (Antoine du Hamel / #5034) - @uppy/react: refactor to TS (Antoine du Hamel / #5012) - @uppy/core: refine type of private variables (Antoine du Hamel / #5028) - @uppy/dashboard: refine type of private variables (Antoine du Hamel / #5027) - @uppy/drag-drop: refine type of private variables (Antoine du Hamel / #5026) - @uppy/status-bar: refine type of private variables (Antoine du Hamel / #5025) - @uppy/remote-sources: migrate to TS (Merlijn Vos / #5020) - @uppy/dashboard: refine option types (Antoine du Hamel / #5022) - @uppy/dashboard: add new `autoOpen` option (Chris Grigg / #5001) - @uppy/core: fix some type errors (Antoine du Hamel / #5015) - @uppy/audio,@uppy/dashboard,@uppy/drop-target,@uppy/webcam: add missing exports (Antoine du Hamel / #5014) - meta: Bump webpack-dev-middleware from 5.3.3 to 5.3.4 (dependabot[bot] / #5013) - @uppy/dashboard: refactor to TypeScript (Antoine du Hamel / #4984) - @uppy/companion: improve error msg (Mikael Finstad / #5010) - @uppy/aws-s3-multipart: refactor to TS (Antoine du Hamel / #4902) - @uppy/dashboard: refactor to stable lifecycle method (Antoine du Hamel / #4999) - @uppy/companion: crash if trying to set path to / (Mikael Finstad / #5003) - @uppy/provider-views: fix `super.toggleCheckbox` bug (Mikael Finstad / #5004) - @uppy/aws-s3-multipart: fix escaping issue with client signed request (Hiroki Shimizu / #5006) - @uppy/drag-drop,@uppy/progress-bar: add missing exports (Antoine du Hamel / #5009) - @uppy/transloadit: migrate to TS (Merlijn Vos / #4987) - @uppy/utils: fix `RateLimitedQueue#wrapPromiseFunction` types (Antoine du Hamel / #5007) - @uppy/golden-retriever: migrate to TS (Merlijn Vos / #4989) - meta: Bump follow-redirects from 1.15.4 to 1.15.6 (dependabot[bot] / #5002) - meta: fix `resize-observer-polyfill` types (Antoine du Hamel / #4994) - @uppy/core: various type fixes (Antoine du Hamel / #4995) - @uppy/utils: fix `findAllDOMElements` type (Antoine du Hamel / #4997) - @uppy/status-bar: fix `recoveredState` type (Antoine du Hamel / #4996) - @uppy/utils: fix `AbortablePromise` type (Antoine du Hamel / #4988) - @uppy/core,@uppy/provider-views: Fix breadcrumbs (Evgenia Karunus / #4986) - @uppy/drag-drop: refactor to TypeScript (Antoine du Hamel / #4983) - @uppy/webcam: refactor to TypeScript (Antoine du Hamel / #4870) - @uppy/url: migrate to TS (Merlijn Vos / #4980) - @uppy/zoom: refactor to TypeScript (Murderlon / #4979) - @uppy/unsplash: refactor to TypeScript (Murderlon / #4979) - @uppy/onedrive: refactor to TypeScript (Murderlon / #4979) - @uppy/instagram: refactor to TypeScript (Murderlon / #4979) - @uppy/google-drive: refactor to TypeScript (Murderlon / #4979) - @uppy/facebook: refactor to TypeScript (Murderlon / #4979) - @uppy/dropbox: refactor to TypeScript (Murderlon / #4979) - @uppy/box: refactor to TypeScript (Murderlon / #4979) - @uppy/utils: migrate RateLimitedQueue to TS (Merlijn Vos / #4981) - @uppy/thumbnail-generator: migrate to TS (Merlijn Vos / #4978) - @uppy/screen-capture: migrate to TS (Merlijn Vos / #4965) - @uppy/companion-client: Replace Provider.initPlugin with composition (Merlijn Vos / #4977)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.