Kaynağa Gözat

Merge stable branch

Antoine du Hamel 10 ay önce
ebeveyn
işleme
2be1a99123

+ 0 - 67
.github/CONTRIBUTING.md

@@ -101,61 +101,6 @@ Authenticates and Uploads from Dropbox through Companion:
 - Companion reports progress to Uppy, as if it were a local upload.
 - Completed!
 
-### Instagram integration
-
-Even though facebook
-[allows using](https://developers.facebook.com/blog/post/2018/06/08/enforce-https-facebook-login/)
-http://localhost in dev mode, Instagram doesn’t seem to support that, and seems
-to need a publically available domain name with HTTPS. So we will tunnel
-requests to localhost using `ngrok`.
-
-Make sure that you are using a development facebook app at
-<https://developers.facebook.com/apps>
-
-Go to “Instagram Basic Display” and find `Instagram App ID` and
-`Instagram App Secret`. Put them in a file called `.env` in the repo root:
-
-```
-COMPANION_INSTAGRAM_KEY="Instagram App ID"
-COMPANION_INSTAGRAM_SECRET="Instagram App Secret"
-```
-
-**Note!** `ngrok` seems to be blocked by Instagram now, so you may have to find
-an alternative.
-
-Run
-
-```bash
-ngrok http 3020
-```
-
-Note the ngrok https base URL, for example `https://e0c7de09808d.ngrok.io` and
-append `/instagram/redirect` to it, such as:
-
-```
-https://e0c7de09808d.ngrok.io/instagram/redirect
-```
-
-Add this full ngrok URL to `Valid OAuth Redirect URIs` under
-`Instagram Basic Display`.
-
-Edit `.env` and change to your ngrok URI:
-
-```
-COMPANION_DOMAIN="e0c7de09808d.ngrok.io"
-COMPANION_PROTOCOL="https"
-VITE_COMPANION_URL = 'https://e0c7de09808d.ngrok.io'
-```
-
-Go to: Roles -> Roles -> Add Instagram testers -> Add your instagram account
-
-Go to your instagram account at
-<https://www.instagram.com/accounts/manage_access/>
-
-Tester invites -> Accept
-
-Now you should be able to test the Instagram integration.
-
 ### Requiring files
 
 - If we are `require()`ing a file from the same subpackage, we can freely use
@@ -213,18 +158,6 @@ To generate the boilerplate for a new test run:
 yarn e2e:generate
 ```
 
-## Zoom
-
-See above Instagram instructions for setting up a tunnel, but replace
-`instagram` with `zoom` in the URL. Note that **you also have to add the OAuth
-redirect URL to `OAuth allow list`** in the Zoom Oauth app settings or it will
-not work.
-
-Add the following scopes: `recording:read`, `user:read`, `user_info:read`
-
-To test recording a meeting, you need to sign up for a Zoom Pro trial (can be
-cancelled later), for example using their iOS app.
-
 ## Releases
 
 Releases are managed by GitHub Actions, here’s an overview of the process to

+ 1 - 1
.github/workflows/companion-deploy.yml

@@ -63,7 +63,7 @@ jobs:
           username: ${{secrets.DOCKER_USERNAME}}
           password: ${{secrets.DOCKER_PASSWORD}}
       - name: Build and push
-        uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
+        uses: docker/build-push-action@31159d49c0d4756269a0940a750801a1ea5d7003 # v6.1.0
         with:
           push: true
           context: .

+ 1 - 1
.github/workflows/release.yml

@@ -161,7 +161,7 @@ jobs:
           username: ${{secrets.DOCKER_USERNAME}}
           password: ${{secrets.DOCKER_PASSWORD}}
       - name: Build and push
-        uses: docker/build-push-action@ca052bb54ab0790a636c9b5f226502c73d547a25 # v5.4.0
+        uses: docker/build-push-action@31159d49c0d4756269a0940a750801a1ea5d7003 # v6.1.0
         with:
           push: true
           context: .

+ 17 - 0
CHANGELOG.md

@@ -467,6 +467,23 @@ Released: 2024-03-28
 - @uppy/vue: [v4.x] remove manual types (Antoine du Hamel / #4803)
 - meta: prepare release workflow for beta versions (Antoine du Hamel)
 
+
+## 3.27.1
+
+Released: 2024-06-27
+
+| Package          | Version | Package          | Version |
+| ---------------- | ------- | ---------------- | ------- |
+| @uppy/dashboard  |   3.9.1 | uppy             |  3.27.1 |
+| @uppy/xhr-upload |   3.6.8 |                  |         |
+
+- @uppy/xhr-upload: add `'PATCH'` as valid method (Quinn Daley / #5279)
+- @uppy/dashboard: fix handling of `null` for `doneButtonHandler` (Antoine du Hamel / #5283)
+- meta: Bump docker/build-push-action from 5.4.0 to 6.1.0 (dependabot[bot] / #5272)
+- docs: rewrite Instagram dev setup section (Evgenia Karunus / #5274)
+- meta: remove the Zoom section from `CONTRIBUTING.md` (Evgenia Karunus / #5273)
+
+
 ## 3.27.0
 
 Released: 2024-06-18

+ 19 - 0
docs/sources/companion-plugins/instagram.mdx

@@ -123,6 +123,25 @@ companion.app({
 });
 ```
 
+### Development
+
+Among Uppy-supported providers, Instagram is the only provider at the time of
+writing that requires https even in dev mode. So, to test your integration in
+development, you need to use some reverse proxy. The easiest way to do it is to
+use [https://redirectmeto.com](https://redirectmeto.com).
+
+In your `.env`, set:
+
+```sh
+COMPANION_DOMAIN="redirectmeto.com/http://localhost:3020"
+COMPANION_PROTOCOL="https"
+```
+
+On
+[https://developers.facebook.com/apps/.../instagram-basic-display/basic-display](https://developers.facebook.com/apps/.../instagram-basic-display/basic-display)
+page, in the “Valid OAuth Redirect URIs” field, add
+`https://redirectmeto.com/http://localhost:3020/instagram/redirect`.
+
 ## API
 
 ### Options

+ 7 - 0
packages/@uppy/dashboard/CHANGELOG.md

@@ -36,6 +36,13 @@ Included in: Uppy v4.0.0-beta.1
 - @uppy/dashboard: refactor to TypeScript (Antoine du Hamel / #4984)
 - @uppy/dashboard: refactor to stable lifecycle method (Antoine du Hamel / #4999)
 
+## 3.9.1
+
+Released: 2024-06-27
+Included in: Uppy v3.27.1
+
+- @uppy/dashboard: fix handling of `null` for `doneButtonHandler` (Antoine du Hamel / #5283)
+
 ## 3.8.3
 
 Released: 2024-05-07

+ 9 - 5
packages/@uppy/dashboard/src/Dashboard.tsx

@@ -137,7 +137,7 @@ interface DashboardMiscOptions<M extends Meta, B extends Body>
   disableLocalFiles?: boolean
   disableStatusBar?: boolean
   disableThumbnailGenerator?: boolean
-  doneButtonHandler?: () => void
+  doneButtonHandler?: null | (() => void)
   fileManagerSelectionType?: 'files' | 'folders' | 'both'
   hideCancelButton?: boolean
   hidePauseResumeButton?: boolean
@@ -215,7 +215,7 @@ const defaultOptions = {
   // Dynamic default options, they have to be defined in the constructor (because
   // they require access to the `this` keyword), but we still want them to
   // appear in the default options so TS knows they'll be defined.
-  doneButtonHandler: null as any,
+  doneButtonHandler: undefined as any,
   onRequestCloseModal: null as any,
 } satisfies Partial<DashboardOptions<any, any>>
 
@@ -271,9 +271,13 @@ export default class Dashboard<M extends Meta, B extends Body> extends UIPlugin<
     this.defaultLocale = locale
 
     // Dynamic default options:
-    this.opts.doneButtonHandler ??= () => {
-      this.uppy.clear()
-      this.requestCloseModal()
+    if (this.opts.doneButtonHandler === undefined) {
+      // `null` means "do not display a Done button", while `undefined` means
+      // "I want the default behavior". For this reason, we need to differentiate `null` and `undefined`.
+      this.opts.doneButtonHandler = () => {
+        this.uppy.clear()
+        this.requestCloseModal()
+      }
     }
     this.opts.onRequestCloseModal ??= () => this.closeModal()
 

+ 7 - 0
packages/@uppy/xhr-upload/CHANGELOG.md

@@ -42,6 +42,13 @@ Included in: Uppy v4.0.0-beta.1
 
 - @uppy/aws-s3-multipart,@uppy/tus,@uppy/utils,@uppy/xhr-upload: Make `allowedMetaFields` consistent (Merlijn Vos / #5011)
 
+## 3.6.8
+
+Released: 2024-06-27
+Included in: Uppy v3.27.1
+
+- @uppy/xhr-upload: add `'PATCH'` as valid method (Quinn Daley / #5279)
+
 ## 3.6.7
 
 Released: 2024-05-23

+ 15 - 1
packages/@uppy/xhr-upload/src/index.ts

@@ -44,7 +44,21 @@ declare module '@uppy/core' {
 export interface XhrUploadOpts<M extends Meta, B extends Body>
   extends PluginOpts {
   endpoint: string
-  method?: 'post' | 'put'
+  method?:
+    | 'GET'
+    | 'HEAD'
+    | 'POST'
+    | 'PUT'
+    | 'DELETE'
+    | 'OPTIONS'
+    | 'PATCH'
+    | 'delete'
+    | 'get'
+    | 'head'
+    | 'options'
+    | 'post'
+    | 'put'
+    | string
   formData?: boolean
   fieldName?: string
   headers?: