From b32781e2807f82af262493e298d504f8bb387bed Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sun, 10 May 2026 13:00:03 +0800 Subject: [PATCH 1/4] ci: remove qemu from companion edge deploy workflow (#6282) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary - replace QEMU-based multi-platform build in `.github/workflows/companion-deploy.yml` with native runner matrix builds - build amd64 on `ubuntu-24.04` and arm64 on `ubuntu-24.04-arm` - push architecture-specific tags (`edge-amd64`, `edge-arm64`) and publish `transloadit/companion:edge` as a manifest that references both - add explicit workflow permissions (`contents: read`) and keep workflow expression formatting consistent - remove conflicting `DOCKER_BUILDKIT`/`COMPOSE_DOCKER_CLI_BUILD` env overrides from the docker job ## Validation - `corepack yarn check:ci` ✅ - baseline full run before edits: `corepack yarn check:ci && corepack yarn build && corepack yarn test` (test step had pre-existing failures in `@uppy/utils` due `Promise.withResolvers` in this environment) - parallel validation (Code Review + CodeQL) ✅ ## TODO - [ ] do the same for release? https://github.com/transloadit/uppy/blob/main/.github/workflows/release.yml --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: mifi <402547+mifi@users.noreply.github.com> Co-authored-by: Mikael Finstad --- .github/workflows/companion-deploy.yml | 52 ++++++++++++++++---------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/.github/workflows/companion-deploy.yml b/.github/workflows/companion-deploy.yml index b7696d1b1..53e87b9f0 100644 --- a/.github/workflows/companion-deploy.yml +++ b/.github/workflows/companion-deploy.yml @@ -38,35 +38,49 @@ jobs: path: /tmp/companion-${{ github.sha }}.tar.gz docker: - name: DockerHub - runs-on: ubuntu-latest - env: - DOCKER_BUILDKIT: 0 - COMPOSE_DOCKER_CLI_BUILD: 0 + name: DockerHub (${{ matrix.platform }}) + strategy: + matrix: + include: + - runner: ubuntu-24.04 + platform: linux/amd64 + platform_tag: amd64 + - runner: ubuntu-24.04-arm + platform: linux/arm64 + platform_tag: arm64 + runs-on: ${{ matrix.runner }} steps: - name: Checkout sources uses: actions/checkout@v6 - - name: Docker meta - id: docker_meta - uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0 - with: - images: transloadit/companion - tags: | - type=edge - type=raw,value=latest,enable=false - - uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0 - uses: docker/setup-buildx-action@v3 - name: Log in to DockerHub uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 with: - username: ${{secrets.DOCKER_USERNAME}} - password: ${{secrets.DOCKER_PASSWORD}} + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2 with: push: true context: . - platforms: linux/amd64,linux/arm64 + platforms: ${{ matrix.platform }} file: Dockerfile - tags: ${{ steps.docker_meta.outputs.tags }} - labels: ${{ steps.docker_meta.outputs.labels }} \ No newline at end of file + tags: transloadit/companion:edge-${{ matrix.platform_tag }} + + docker-manifest: + name: DockerHub manifest + needs: docker + runs-on: ubuntu-latest + steps: + - uses: docker/setup-buildx-action@v3 + - name: Log in to DockerHub + uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + - name: Publish edge manifest + run: | + docker buildx imagetools create \ + --tag transloadit/companion:edge \ + transloadit/companion:edge-amd64 \ + transloadit/companion:edge-arm64 From 0e09bd209691f9675c03acd89a760417653425e4 Mon Sep 17 00:00:00 2001 From: Kevin van Zonneveld Date: Tue, 12 May 2026 14:14:10 +0200 Subject: [PATCH 2/4] Harden dependency installs (#6291) ## Why Recent npm supply-chain compromises showed that dependency installs and shared CI caches can execute or preserve newly published malicious packages before advisories catch up. This PR reduces that exposure for this repo. ## What changed - Made eligible Yarn installs immutable and removed shared dependency caching from the manual CDN upload path; existing minimal age gate remains unchanged. ## Validation - Ran `git diff --check` across the prepared worktree. - Audited this PR set for `pull_request_target` and release/deploy/CDN cache reuse; patched actionable hits. - Did not run the full test suite; this is a workflow/config-only change. --- .github/workflows/bundlers.yml | 2 +- .github/workflows/ci.yml | 4 ++-- .github/workflows/manual-cdn.yml | 12 ------------ 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/bundlers.yml b/.github/workflows/bundlers.yml index 0f2035da8..a0dcf03ee 100644 --- a/.github/workflows/bundlers.yml +++ b/.github/workflows/bundlers.yml @@ -42,7 +42,7 @@ jobs: node-version: lts/* - name: Install dependencies run: - corepack yarn install + corepack yarn install --immutable env: # https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation CYPRESS_INSTALL_BINARY: 0 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2d657c7ef..8846111ce 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: node-version: ${{matrix.node-version}} - name: Install dependencies run: - corepack yarn install + corepack yarn install --immutable - name: Install Playwright Browsers run: corepack yarn workspace @uppy/dashboard playwright install --with-deps - name: Build @@ -84,7 +84,7 @@ jobs: node-version: lts/* - name: Install dependencies run: - corepack yarn install + corepack yarn install --immutable - run: corepack yarn run typecheck lint_js: diff --git a/.github/workflows/manual-cdn.yml b/.github/workflows/manual-cdn.yml index 2d511a965..0efbe6fa7 100644 --- a/.github/workflows/manual-cdn.yml +++ b/.github/workflows/manual-cdn.yml @@ -30,18 +30,6 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v6 - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: - echo "dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT - - - uses: actions/cache@v5 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- - name: Install Node.js uses: actions/setup-node@v6 with: From 57f8daf55de6d61a430f3b591f33b4be34c1ae3e Mon Sep 17 00:00:00 2001 From: Prakash Date: Wed, 13 May 2026 02:52:53 +0530 Subject: [PATCH 3/4] @uppy/transloadit: add AssemblyStatus to plugin state (#6267) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - fixes content repo testing area bug https://github.com/transloadit/content/issues/4943 (tested locally in content repo) - Simplifies the testing area code — no need to manually construct the assembly object and listen for multiple events; just subscribe to state using `useUppyState` and that's it (tested locally in content repo) - Addresses https://transloadit.slack.com/archives/C0AFZGN6W2F/p1775580430051829?thread_ts=1775555821.837409&cid=C0AFZGN6W2F (one of our customers wanted to create a custom UI around assembly execution); this would become much easier now (need to verify) - Addresses https://github.com/transloadit/content/blob/9474e8d8e72c73d27288507c874f550c2df6cee4/_console/js/features/templates/components/TestingArea/uppy.tsx#L131-L147 - Partially addresses #6264 --- .changeset/legal-drinks-marry.md | 5 +++ packages/@uppy/transloadit/src/Assembly.ts | 7 +++++ packages/@uppy/transloadit/src/index.test.js | 19 +++++++++++ packages/@uppy/transloadit/src/index.ts | 33 ++++++++++++++++++-- 4 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 .changeset/legal-drinks-marry.md diff --git a/.changeset/legal-drinks-marry.md b/.changeset/legal-drinks-marry.md new file mode 100644 index 000000000..e859660be --- /dev/null +++ b/.changeset/legal-drinks-marry.md @@ -0,0 +1,5 @@ +--- +"@uppy/transloadit": minor +--- + +Add assemblyStatus and lastAssemblyStatus to transloadit's plugin state diff --git a/packages/@uppy/transloadit/src/Assembly.ts b/packages/@uppy/transloadit/src/Assembly.ts index ea2f676cf..d98900ac1 100644 --- a/packages/@uppy/transloadit/src/Assembly.ts +++ b/packages/@uppy/transloadit/src/Assembly.ts @@ -140,6 +140,13 @@ class TransloaditAssembly extends Emitter { this.#sse.addEventListener('assembly_execution_progress', (e) => { const details = JSON.parse(e.data) + // setting combined execution progress of the assembly + if (typeof details.progress_combined === 'number') { + this.status = { + ...this.status, + progress_combined: details.progress_combined, + } + } this.emit('execution-progress', details) }) diff --git a/packages/@uppy/transloadit/src/index.test.js b/packages/@uppy/transloadit/src/index.test.js index 8f3cf6e7d..0bd6f1854 100644 --- a/packages/@uppy/transloadit/src/index.test.js +++ b/packages/@uppy/transloadit/src/index.test.js @@ -189,6 +189,15 @@ describe('Transloadit', () => { }, }) + // Plugin state should start empty; track every distinct `ok` that lands in + // it so we can verify the assembly lifecycle is reflected. + expect(uppy.getState().plugins.Transloadit.assemblyStatus).toBeUndefined() + const okHistory = [] + const unsubscribe = uppy.store.subscribe((_prev, next) => { + const ok = next.plugins.Transloadit.assemblyStatus?.ok + if (ok && ok !== okHistory.at(-1)) okHistory.push(ok) + }) + uppy.addFile({ source: 'test', name: 'cat.jpg', @@ -228,12 +237,22 @@ describe('Transloadit', () => { uppy.resumeAll() await uploadPromise + unsubscribe() expect(successSpy).toHaveBeenCalled() // Should be reset to true after upload completes expect(uppy.getState().allowNewUpload).toBe(true) + // The createAssembly mock returned ASSEMBLY_EXECUTING and the assembly + // setter forwarded that status into plugin state during the upload. + expect(okHistory).toContain('ASSEMBLY_EXECUTING') + // `assemblyStatus` is the live slot — it clears when `this.assembly` + // becomes undefined at the end of `#afterUpload`. `lastAssembly` is + // intentionally not populated here because no terminal event fires in + // this mocked flow (the server keeps returning ASSEMBLY_EXECUTING). + expect(uppy.getState().plugins.Transloadit.assemblyStatus).toBeUndefined() + server.close() }) diff --git a/packages/@uppy/transloadit/src/index.ts b/packages/@uppy/transloadit/src/index.ts index 60ce29fa1..5d226595f 100644 --- a/packages/@uppy/transloadit/src/index.ts +++ b/packages/@uppy/transloadit/src/index.ts @@ -26,7 +26,9 @@ import AssemblyWatcher from './AssemblyWatcher.js' import Client, { type AssemblyError } from './Client.js' import locale from './locale.js' -export type AssemblyResponse = AssemblyStatus +export type AssemblyResponse = AssemblyStatus & { + progress_combined?: number +} export type AssemblyFile = AssemblyStatusUpload export type AssemblyResult = AssemblyStatusResult & { localId: string | null } export type AssemblyParameters = AssemblyInstructionsInput @@ -79,6 +81,19 @@ type TransloaditState = { string, { assembly: string; id: string; uploadedFile: AssemblyFile } > + /** + * Live status of the currently-active assembly. Tracks every status + * transition (UPLOADING → EXECUTING → ...). Cleared automatically when + * `this.assembly = undefined` (no live assembly). + */ + assemblyStatus: AssemblyResponse | undefined + /** + * Snapshot of the most recent non-null status seen. Persists across the + * gap between uploads so the UI can keep showing "your last upload's + * result" after `assemblyStatus` clears. Overwritten by the next + * status update routed through `#handleAssemblyStatusUpdate`. + */ + lastAssemblyStatus: AssemblyResponse | undefined results: Array<{ result: AssemblyResult stepName: string @@ -499,11 +514,20 @@ export default class Transloadit< } /** - * Allows Golden Retriever plugin to serialize the Assembly status so we can restore it later + * Mirrors the live Assembly status into plugin state and lets Golden + * Retriever serialize it for restore. `assemblyStatus` is written + * unconditionally — when `this.assembly = undefined`, `assemblyResponse` + * is undefined and `assemblyStatus` clears too. `lastAssemblyStatus` + * captures the most recent non-null status so the UI can keep displaying + * the previous run's result after `assemblyStatus` clears. */ #handleAssemblyStatusUpdate = ( assemblyResponse: AssemblyResponse | undefined, ) => { + if (assemblyResponse != null) { + this.setPluginState({ lastAssemblyStatus: assemblyResponse }) + } + this.setPluginState({ assemblyStatus: assemblyResponse }) this.uppy.emit('restore:plugin-data-changed', { [this.id]: assemblyResponse ? { assemblyResponse } : undefined, }) @@ -650,6 +674,9 @@ export default class Transloadit< this.uppy.log(err) } } + // `assemblyStatus` is cleared automatically when `this.assembly = undefined` + // (via `#cancelAssembly` above, or by `#afterUpload`'s finally block). + // Reset allowNewUpload when upload is cancelled this.uppy.setState({ allowNewUpload: true }) } @@ -1006,6 +1033,8 @@ export default class Transloadit< this.uppy.on('restored', this.#onRestored) this.setPluginState({ + assemblyStatus: undefined, + lastAssemblyStatus: undefined, // Contains file data from Transloadit, indexed by their Transloadit-assigned ID. files: {}, // Contains result data from Transloadit. From 12de077e6d7019c5d907d36868a6809d139057ca Mon Sep 17 00:00:00 2001 From: Prakash Date: Wed, 13 May 2026 14:42:10 +0530 Subject: [PATCH 4/4] remove @uppy/instagram (#6257) closes #5455 , this PR removes all Instagram support from both the client and Companion server. Removed: - Instagram from @uppy/remote-sources (src, package.json, keywords) - Instagram export from uppy bundle (bundle.ts, index.ts, package.json) - Companion Instagram OAuth provider (provider/index.js, grant.js) - Companion standalone helper Instagram env vars (helper.js, env_example) - All Companion Instagram tests (providers.test.js, provider-manager.test.js, fixtures/index.js, mockserver.js) --- .changeset/gold-rice-jog.md | 9 + .env.example | 3 - .github/CONTRIBUTING.md | 4 +- BUNDLE-README.md | 2 +- CLAUDE.md | 2 +- README.md | 14 +- examples/companion/client/index.html | 5 - examples/companion/server/index.js | 4 - package.json | 2 +- packages/@uppy/companion/KUBERNETES.md | 2 - packages/@uppy/companion/README.md | 2 +- packages/@uppy/companion/env_example | 4 - packages/@uppy/companion/src/config/grant.ts | 4 - .../@uppy/companion/src/server/Uploader.ts | 2 +- .../companion/src/server/provider/index.ts | 2 - .../provider/instagram/graph/adapter.ts | 103 ---------- .../server/provider/instagram/graph/index.ts | 161 --------------- .../@uppy/companion/src/standalone/helper.ts | 5 - .../@uppy/companion/test/fixtures/index.ts | 2 - .../companion/test/fixtures/instagram.ts | 9 - packages/@uppy/companion/test/mockserver.ts | 5 - .../companion/test/provider-manager.test.ts | 30 --- .../@uppy/companion/test/providers.test.ts | 42 ---- .../test/resources/instagram_secret_file | 1 - .../@uppy/components/src/ProviderIcon.tsx | 31 --- .../components/src/hooks/remote-source.ts | 1 - packages/@uppy/core/README.md | 4 +- packages/@uppy/core/package.json | 2 +- packages/@uppy/core/src/Uppy.test.ts | 6 +- packages/@uppy/dashboard/README.md | 4 +- .../@uppy/dashboard/src/utils/trapFocus.ts | 4 +- packages/@uppy/instagram/.npmignore | 1 - packages/@uppy/instagram/CHANGELOG.md | 183 ------------------ packages/@uppy/instagram/LICENSE | 21 -- packages/@uppy/instagram/README.md | 48 ----- packages/@uppy/instagram/package.json | 52 ----- packages/@uppy/instagram/src/Instagram.tsx | 133 ------------- packages/@uppy/instagram/src/index.ts | 2 - packages/@uppy/instagram/src/locale.ts | 5 - packages/@uppy/instagram/tsconfig.build.json | 23 --- packages/@uppy/instagram/tsconfig.json | 22 --- packages/@uppy/instagram/turbo.json | 8 - packages/@uppy/locales/src/ca_ES.ts | 1 - packages/@uppy/locales/src/de_DE.ts | 1 - packages/@uppy/locales/src/en_US.ts | 1 - packages/@uppy/locales/src/es_ES.ts | 1 - packages/@uppy/locales/src/fa_IR.ts | 1 - packages/@uppy/locales/src/ms_MY.ts | 1 - packages/@uppy/locales/src/nl_NL.ts | 1 - packages/@uppy/locales/src/pl_PL.ts | 1 - packages/@uppy/locales/src/pt_BR.ts | 1 - packages/@uppy/locales/src/sv_SE.ts | 1 - packages/@uppy/locales/src/uk_UA.ts | 1 - packages/@uppy/locales/src/uz_UZ.ts | 1 - packages/@uppy/locales/src/vi_VN.ts | 1 - packages/@uppy/locales/turbo.json | 3 +- .../SearchProviderView/SearchProviderView.tsx | 2 +- packages/@uppy/remote-sources/package.json | 4 +- .../@uppy/remote-sources/src/index.test.ts | 2 +- packages/@uppy/remote-sources/src/index.ts | 3 - .../@uppy/remote-sources/tsconfig.build.json | 3 - packages/@uppy/remote-sources/tsconfig.json | 3 - packages/@uppy/transloadit/src/index.ts | 1 - packages/uppy/package.json | 3 +- packages/uppy/src/bundle.ts | 1 - packages/uppy/src/index.ts | 1 - packages/uppy/tsconfig.build.json | 3 - packages/uppy/tsconfig.json | 3 - private/dev/Dashboard.js | 2 - yarn.lock | 17 -- 70 files changed, 36 insertions(+), 997 deletions(-) create mode 100644 .changeset/gold-rice-jog.md delete mode 100644 packages/@uppy/companion/src/server/provider/instagram/graph/adapter.ts delete mode 100644 packages/@uppy/companion/src/server/provider/instagram/graph/index.ts delete mode 100644 packages/@uppy/companion/test/fixtures/instagram.ts delete mode 100644 packages/@uppy/companion/test/resources/instagram_secret_file delete mode 100644 packages/@uppy/instagram/.npmignore delete mode 100644 packages/@uppy/instagram/CHANGELOG.md delete mode 100644 packages/@uppy/instagram/LICENSE delete mode 100644 packages/@uppy/instagram/README.md delete mode 100644 packages/@uppy/instagram/package.json delete mode 100644 packages/@uppy/instagram/src/Instagram.tsx delete mode 100644 packages/@uppy/instagram/src/index.ts delete mode 100644 packages/@uppy/instagram/src/locale.ts delete mode 100644 packages/@uppy/instagram/tsconfig.build.json delete mode 100644 packages/@uppy/instagram/tsconfig.json delete mode 100644 packages/@uppy/instagram/turbo.json diff --git a/.changeset/gold-rice-jog.md b/.changeset/gold-rice-jog.md new file mode 100644 index 000000000..71b7a8fc0 --- /dev/null +++ b/.changeset/gold-rice-jog.md @@ -0,0 +1,9 @@ +--- +"@uppy/components": major +"@uppy/companion": major +"uppy": major +"@uppy/transloadit": minor +"@uppy/locales": minor +--- + +Remove @uppy/instagram references from all the packages diff --git a/.env.example b/.env.example index a3bbe74b7..f8ccdd5f4 100644 --- a/.env.example +++ b/.env.example @@ -44,9 +44,6 @@ COMPANION_DROPBOX_SECRET=*** COMPANION_GOOGLE_KEY=*** COMPANION_GOOGLE_SECRET=*** -COMPANION_INSTAGRAM_KEY=*** -COMPANION_INSTAGRAM_SECRET=*** - COMPANION_FACEBOOK_KEY=*** COMPANION_FACEBOOK_SECRET=*** diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 22ea1f915..b154e0281 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -57,7 +57,7 @@ This is not needed for changing existing components. ## Companion If you’d like to work on features that the basic development version of Uppy -doesn’t support, such as Uppy integrations with Instagram/Google Drive/Facebook +doesn’t support, such as Uppy integrations with Google Drive/Facebook etc., you need to set up your `.env` file (copy the contents of `.env.example` and adjust them based on what you need to work on), and run: @@ -78,7 +78,7 @@ when files are changed. ### How the Authentication and Token mechanism works This section describes how Authentication works between Companion and Providers. -While this behaviour is the same for all Providers (Dropbox, Instagram, Google +While this behaviour is the same for all Providers (Dropbox, Google Drive, etc.), we are going to be referring to Dropbox in place of any Provider throughout this section. diff --git a/BUNDLE-README.md b/BUNDLE-README.md index ffc6fc6c0..5e6396bd5 100644 --- a/BUNDLE-README.md +++ b/BUNDLE-README.md @@ -83,7 +83,7 @@ inline into the page. This, and many more configuration options can be found here: . Uppy has many more Plugins besides Xhr and the Dashboard. For example, you can -enable Webcam, Instagram, or video encoding support. Note that for some Plugins, +enable Webcam or video encoding support. Note that for some Plugins, you will need to run a server side component called: Companion. Those plugins are marked with a (c) symbol. Alternatively, you can sign up for a free Transloadit account. Transloadit runs Companion for you, tusd servers to handle diff --git a/CLAUDE.md b/CLAUDE.md index eb73dda14..4091038aa 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -46,7 +46,7 @@ yarn workspace @uppy/[package-name] build - **Uppy Core** (`@uppy/core`) - Main class that manages plugins, state, and events - **Plugins** - Modular components for different functionalities: - **UI Plugins**: Dashboard, Drag & Drop, File Input, Webcam, etc. - - **Provider Plugins**: Google Drive, Dropbox, Instagram, etc. (require Companion) + - **Provider Plugins**: Google Drive, Dropbox, etc. (require Companion) - **Uploader Plugins**: Tus (resumable), XHR Upload, AWS S3, etc. - **Utility Plugins**: Golden Retriever (recovery), Thumbnail Generator, etc. diff --git a/README.md b/README.md index 261e5ab0b..2b63aff7f 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ with any application. It’s fast, has a comprehensible API and lets you worry about more important problems than building a file uploader. - **Fetch** files from local disk, remote URLs, Google Drive, Dropbox, Box, - Instagram or snap and record selfies with a camera + or snap and record selfies with a camera - **Preview** and edit metadata with a nice interface - **Upload** to the final destination, optionally process/encode @@ -82,7 +82,7 @@ For the supported frameworks (except Angular) Uppy offers three ways to build us - Lightweight, modular plugin-based architecture, light on dependencies :zap: - Resumable file uploads via the open [tus](https://tus.io/) standard, so large uploads survive network hiccups -- Supports picking files from: Webcam, Dropbox, Box, Google Drive, Instagram, +- Supports picking files from: Webcam, Dropbox, Box, Google Drive, bypassing the user’s device where possible, syncing between servers directly via [@uppy/companion](https://uppy.io/docs/companion) - Works great with file encoding and processing backends, such as @@ -140,7 +140,7 @@ CDN. In that case `Uppy` will attach itself to the global `window.Uppy` object. - [Uppy](https://uppy.io/docs/uppy/) — full list of options, methods and events - [Companion](https://uppy.io/docs/companion/) — setting up and running a - Companion instance, which adds support for Instagram, Dropbox, Box, Google + Companion instance, which adds support for Dropbox, Box, Google Drive and remote URLs - [React](https://uppy.io/docs/react/) — components to integrate Uppy UI plugins with React apps @@ -153,7 +153,7 @@ CDN. In that case `Uppy` will attach itself to the global `window.Uppy` object. - [`Dashboard`](https://uppy.io/docs/dashboard/) — universal UI with previews, progress bars, metadata editor and all the cool stuff. Required for most UI - plugins like Webcam and Instagram + plugins like Webcam - Headless components ([react](https://uppy.io/docs/react/), [svelte](https://uppy.io/docs/svelte/), [vue](https://uppy.io/docs/vue/)) ### Sources @@ -166,8 +166,6 @@ CDN. In that case `Uppy` will attach itself to the global `window.Uppy` object. Google Drive - ⓒ [`Dropbox`](https://uppy.io/docs/dropbox/) — import files from Dropbox - ⓒ [`Box`](https://uppy.io/docs/box/) — import files from Box -- ⓒ [`Instagram`](https://uppy.io/docs/instagram/) — import images and videos - from Instagram - ⓒ [`Facebook`](https://uppy.io/docs/facebook/) — import images and videos from Facebook - ⓒ [`OneDrive`](https://uppy.io/docs/onedrive/) — import files from Microsoft @@ -222,7 +220,7 @@ cases, the file input leaves some to be desired: - Uppy supports editing meta information before uploading. - Uppy allows cropping images before uploading. - There’s the situation where people are using their mobile devices and want to - upload on the go, but they have their picture on Instagram, files in Dropbox + upload on the go, but they have files in Dropbox or a plain file URL from anywhere on the open web. Uppy allows to pick files from those and push it to the destination without downloading it to your mobile device first. @@ -272,7 +270,7 @@ If you want resumability with the Tus plugin, use [one of the tus server implementations](https://tus.io/implementations.html) 👌🏼 And you’ll need [`@uppy/companion`](https://uppy.io/docs/companion) if you’d -like your users to be able to pick files from Instagram, Google Drive, Dropbox +like your users to be able to pick files from Google Drive, Dropbox or via direct URLs (with more services coming). ## Contributions are welcome diff --git a/examples/companion/client/index.html b/examples/companion/client/index.html index 26489beb8..64d93e91c 100644 --- a/examples/companion/client/index.html +++ b/examples/companion/client/index.html @@ -16,17 +16,12 @@ import { Uppy, Dashboard, - Instagram, GoogleDrive, Tus, } from 'https://releases.transloadit.com/uppy/v4.18.0/uppy.min.mjs' const uppy = new Uppy({ debug: true, autoProceed: false }) .use(Dashboard, { trigger: '#uppyModalOpener' }) - .use(Instagram, { - target: Dashboard, - companionUrl: 'http://localhost:3020', - }) .use(GoogleDrive, { target: Dashboard, companionUrl: 'http://localhost:3020', diff --git a/examples/companion/server/index.js b/examples/companion/server/index.js index 076e187cd..ab7c5f6ee 100644 --- a/examples/companion/server/index.js +++ b/examples/companion/server/index.js @@ -32,10 +32,6 @@ const companionOptions = { key: 'your google key', secret: 'your google secret', }, - instagram: { - key: 'your instagram key', - secret: 'your instagram secret', - }, dropbox: { key: 'your dropbox key', secret: 'your dropbox secret', diff --git a/package.json b/package.json index fbc1d08dc..19499e50c 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@uppy-dev/build", "version": "0.0.0", "private": true, - "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", + "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Dropbox, Google Drive, S3 and more :dog:", "license": "MIT", "workspaces": [ "examples/*", diff --git a/packages/@uppy/companion/KUBERNETES.md b/packages/@uppy/companion/KUBERNETES.md index 5b148a478..e72b2c131 100644 --- a/packages/@uppy/companion/KUBERNETES.md +++ b/packages/@uppy/companion/KUBERNETES.md @@ -38,8 +38,6 @@ data: COMPANION_BOX_SECRET: 'YOUR BOX SECRET' COMPANION_GOOGLE_KEY: 'YOUR GOOGLE KEY' COMPANION_GOOGLE_SECRET: 'YOUR GOOGLE SECRET' - COMPANION_INSTAGRAM_KEY: 'YOUR INSTAGRAM KEY' - COMPANION_INSTAGRAM_SECRET: 'YOUR INSTAGRAM SECRET' COMPANION_AWS_KEY: 'YOUR AWS KEY' COMPANION_AWS_SECRET: 'YOUR AWS SECRET' COMPANION_AWS_BUCKET: 'YOUR AWS S3 BUCKET' diff --git a/packages/@uppy/companion/README.md b/packages/@uppy/companion/README.md index bed8ac782..30e37e963 100644 --- a/packages/@uppy/companion/README.md +++ b/packages/@uppy/companion/README.md @@ -8,7 +8,7 @@ Companion is a server integration for [Uppy](https://github.com/transloadit/uppy) file uploader. It handles the server-to-server communication between your server and file -storage providers such as Google Drive, Dropbox, Instagram, etc. **Companion is +storage providers such as Google Drive, Dropbox, etc. **Companion is not a target to upload files to**. For this, use a server (if you want resumable) or your existing Apache/Nginx server (if you don’t). [See here for full documentation](https://uppy.io/docs/companion/) diff --git a/packages/@uppy/companion/env_example b/packages/@uppy/companion/env_example index cd5726e69..162232a21 100644 --- a/packages/@uppy/companion/env_example +++ b/packages/@uppy/companion/env_example @@ -26,10 +26,6 @@ COMPANION_GOOGLE_KEY= COMPANION_GOOGLE_SECRET= COMPANION_GOOGLE_SECRET_FILE= -COMPANION_INSTAGRAM_KEY= -COMPANION_INSTAGRAM_SECRET= -COMPANION_INSTAGRAM_SECRET_FILE= - COMPANION_FACEBOOK_KEY= COMPANION_FACEBOOK_SECRET= COMPANION_FACEBOOK_SECRET_FILE= diff --git a/packages/@uppy/companion/src/config/grant.ts b/packages/@uppy/companion/src/config/grant.ts index c923b02c7..c8ad6af17 100644 --- a/packages/@uppy/companion/src/config/grant.ts +++ b/packages/@uppy/companion/src/config/grant.ts @@ -56,10 +56,6 @@ export default function grantConfig(): GrantStaticConfig { access_url: 'https://api.box.com/oauth2/token', callback: '/box/callback', }, - instagram: { - ...defaults, - callback: '/instagram/callback', - }, facebook: { ...defaults, scope: ['email', 'user_photos'], diff --git a/packages/@uppy/companion/src/server/Uploader.ts b/packages/@uppy/companion/src/server/Uploader.ts index 2352e34d5..b564cdafa 100644 --- a/packages/@uppy/companion/src/server/Uploader.ts +++ b/packages/@uppy/companion/src/server/Uploader.ts @@ -222,7 +222,7 @@ export default class Uploader { /** * Uploads file to destination based on the supplied protocol (tus, s3-multipart, multipart) * For tus uploads, the deferredLength option is enabled, because file size value can be unreliable - * for some providers (Instagram particularly) + * for some providers. * * @param optionsIn */ diff --git a/packages/@uppy/companion/src/server/provider/index.ts b/packages/@uppy/companion/src/server/provider/index.ts index 31b28fe1a..3329d027b 100644 --- a/packages/@uppy/companion/src/server/provider/index.ts +++ b/packages/@uppy/companion/src/server/provider/index.ts @@ -7,7 +7,6 @@ import { getCredentialsResolver } from './credentials.js' import dropbox from './dropbox/index.js' import facebook from './facebook/index.js' import { Drive } from './google/drive/index.js' -import instagram from './instagram/graph/index.js' import onedrive from './onedrive/index.js' import { isOAuthProvider, type ProviderCtor } from './Provider.js' import unsplash from './unsplash/index.js' @@ -113,7 +112,6 @@ export function getDefaultProviders() { facebook, onedrive, zoom, - instagram, unsplash, webdav, } diff --git a/packages/@uppy/companion/src/server/provider/instagram/graph/adapter.ts b/packages/@uppy/companion/src/server/provider/instagram/graph/adapter.ts deleted file mode 100644 index 8779361d5..000000000 --- a/packages/@uppy/companion/src/server/provider/instagram/graph/adapter.ts +++ /dev/null @@ -1,103 +0,0 @@ -import querystring from 'node:querystring' - -const MEDIA_TYPES = Object.freeze({ - video: 'VIDEO', - carousel: 'CAROUSEL_ALBUM', - image: 'IMAGE', -}) - -type InstagramMedia = { - id: string - media_type: string - media_url?: string - thumbnail_url?: string - timestamp: string - children?: { data: InstagramMedia[] } -} - -type InstagramListResponse = { - data: InstagramMedia[] - paging?: { cursors?: { after?: string } } -} - -const isVideo = (item: InstagramMedia): boolean => - item.media_type === MEDIA_TYPES.video - -const isFolder = (_item: InstagramMedia): boolean => { - return false -} - -const getItemIcon = (item: InstagramMedia): string | undefined => { - return isVideo(item) ? item.thumbnail_url : item.media_url -} - -const getItemSubList = (item: InstagramListResponse): InstagramMedia[] => { - const newItems: InstagramMedia[] = [] - item.data.forEach((subItem) => { - if (subItem.media_type === MEDIA_TYPES.carousel) { - subItem.children?.data.forEach((i) => newItems.push(i)) - } else { - newItems.push(subItem) - } - }) - return newItems -} - -const getItemName = (item: InstagramMedia, index: number): string => { - const ext = isVideo(item) ? 'mp4' : 'jpeg' - // adding index, so the name is unique - return `Instagram ${item.timestamp}${index}.${ext}` -} - -const getMimeType = (item: InstagramMedia): string => { - return isVideo(item) ? 'video/mp4' : 'image/jpeg' -} - -const getItemId = (item: InstagramMedia): string => item.id - -const getItemRequestPath = (item: InstagramMedia): string => item.id - -const getItemModifiedDate = (item: InstagramMedia): string => item.timestamp - -const getItemThumbnailUrl = (item: InstagramMedia): string | undefined => - getItemIcon(item) - -const getNextPagePath = ( - data: InstagramListResponse, - currentQuery: Record, - currentPath: string | undefined, -): string | null => { - if (!data.paging || !data.paging.cursors) { - return null - } - - const after = data.paging.cursors.after - if (after == null || after.length === 0) return null - - const query = { ...currentQuery, cursor: after } - return `${currentPath || ''}?${querystring.stringify(query)}` -} - -const adaptData = ( - res: InstagramListResponse, - username: string | null, - directory: string | undefined, - currentQuery: Record, -) => { - const items = getItemSubList(res).map((item, i) => ({ - isFolder: isFolder(item), - icon: getItemIcon(item), - name: getItemName(item, i), - mimeType: getMimeType(item), - id: getItemId(item), - size: null, - thumbnail: getItemThumbnailUrl(item), - requestPath: getItemRequestPath(item), - modifiedDate: getItemModifiedDate(item), - })) - - const nextPagePath = getNextPagePath(res, currentQuery, directory) - return { username, items, nextPagePath } -} - -export default adaptData diff --git a/packages/@uppy/companion/src/server/provider/instagram/graph/index.ts b/packages/@uppy/companion/src/server/provider/instagram/graph/index.ts deleted file mode 100644 index 791bd5008..000000000 --- a/packages/@uppy/companion/src/server/provider/instagram/graph/index.ts +++ /dev/null @@ -1,161 +0,0 @@ -import type { Readable } from 'node:stream' -import got from 'got' -import { isRecord } from '../../../helpers/type-guards.js' -import { prepareStream } from '../../../helpers/utils.js' -import logger from '../../../logger.js' -import Provider, { - type ProviderListResponse, - type Query, -} from '../../Provider.js' -import { withProviderErrorHandling } from '../../providerErrors.js' -import adaptData from './adapter.js' - -type InstagramClient = ReturnType - -interface InstagramUserSession { - accessToken: string -} - -const getClient = ({ token }: { token: string }): InstagramClient => - got.extend({ - prefixUrl: 'https://graph.instagram.com', - headers: { - authorization: `Bearer ${token}`, - }, - }) - -async function getMediaUrl({ - token, - id, -}: { - token: string - id: string -}): Promise { - const body = await getClient({ token }) - .get(String(id), { - searchParams: { fields: 'media_url' }, - responseType: 'json', - }) - .json<{ media_url: string }>() - - return body.media_url -} - -/** - * Adapter for API https://developers.facebook.com/docs/instagram-api/overview - */ -export default class Instagram extends Provider { - // for "grant" - static override getExtraGrantConfig() { - return { - protocol: 'https', - scope: ['user_profile', 'user_media'], - } - } - - static override get oauthProvider() { - return 'instagram' - } - - override async list({ - directory, - providerUserSession: { accessToken: token }, - query, - }: { - directory?: string | undefined - providerUserSession: InstagramUserSession - query?: Query | undefined - }): Promise { - return this.#withErrorHandling( - 'provider.instagram.list.error', - async () => { - const qs: Record = { - fields: - 'id,media_type,thumbnail_url,media_url,timestamp,children{media_type,media_url,thumbnail_url,timestamp}', - } - - if (typeof query?.['cursor'] === 'string') { - qs['after'] = query['cursor'] - } - - const client = getClient({ token }) - - const [me, list] = await Promise.all([ - client - .get('me', { - searchParams: { fields: 'username' }, - responseType: 'json', - }) - .json<{ username?: string }>(), - client - .get('me/media', { searchParams: qs, responseType: 'json' }) - .json[0]>(), - ]) - - const username = me.username != null ? me.username : null - const currentQuery: Record = {} - if (typeof query?.['cursor'] === 'string') - currentQuery['cursor'] = query['cursor'] - return adaptData(list, username, directory, currentQuery) - }, - ) - } - - override async download({ - id, - providerUserSession: { accessToken: token }, - }: { - id: string - providerUserSession: InstagramUserSession - }): Promise<{ stream: Readable; size: number | undefined }> { - return this.#withErrorHandling( - 'provider.instagram.download.error', - async () => { - const url = await getMediaUrl({ token, id }) - const stream = got.stream.get(url, { responseType: 'json' }) - const { size } = await prepareStream(stream) - return { stream, size } - }, - ) - } - - override async thumbnail(): Promise<{ - stream: Readable - contentType: string - }> { - // not implementing this because a public thumbnail from instagram will be used instead - logger.error( - 'call to thumbnail is not implemented', - 'provider.instagram.thumbnail.error', - ) - throw new Error('call to thumbnail is not implemented') - } - - override async logout() { - // access revoke is not supported by Instagram's API - return { - revoked: false, - manual_revoke_url: 'https://www.instagram.com/accounts/manage_access/', - } - } - - async #withErrorHandling(tag: string, fn: () => Promise): Promise { - return withProviderErrorHandling({ - fn, - tag, - providerName: Instagram.oauthProvider, - isAuthError: (response) => { - const body = response.body - if (!isRecord(body)) return false - const err = body['error'] - return isRecord(err) && err['code'] === 190 - }, // Invalid OAuth 2.0 Access Token - getJsonErrorMessage: (body) => { - if (!isRecord(body)) return undefined - const err = body['error'] - if (!isRecord(err)) return undefined - return typeof err['message'] === 'string' ? err['message'] : undefined - }, - }) - } -} diff --git a/packages/@uppy/companion/src/standalone/helper.ts b/packages/@uppy/companion/src/standalone/helper.ts index c55ab8350..d14cf8eb3 100644 --- a/packages/@uppy/companion/src/standalone/helper.ts +++ b/packages/@uppy/companion/src/standalone/helper.ts @@ -145,11 +145,6 @@ const getConfigFromEnv = (): StandaloneCompanionOptions => { secret: getSecret('COMPANION_BOX_SECRET'), credentialsURL: process.env['COMPANION_BOX_KEYS_ENDPOINT'], }, - instagram: { - key: process.env['COMPANION_INSTAGRAM_KEY'], - secret: getSecret('COMPANION_INSTAGRAM_SECRET'), - credentialsURL: process.env['COMPANION_INSTAGRAM_KEYS_ENDPOINT'], - }, facebook: { key: process.env['COMPANION_FACEBOOK_KEY'], secret: getSecret('COMPANION_FACEBOOK_SECRET'), diff --git a/packages/@uppy/companion/test/fixtures/index.ts b/packages/@uppy/companion/test/fixtures/index.ts index 70593d650..2a9f61332 100644 --- a/packages/@uppy/companion/test/fixtures/index.ts +++ b/packages/@uppy/companion/test/fixtures/index.ts @@ -3,7 +3,6 @@ import * as constants from './constants.js' import * as drive from './drive.js' import * as dropbox from './dropbox.js' import * as facebook from './facebook.js' -import * as instagram from './instagram.js' import * as onedrive from './onedrive.js' import * as zoom from './zoom.js' @@ -11,7 +10,6 @@ export const providers = { box, drive, dropbox, - instagram, onedrive, facebook, zoom, diff --git a/packages/@uppy/companion/test/fixtures/instagram.ts b/packages/@uppy/companion/test/fixtures/instagram.ts deleted file mode 100644 index f1193ec00..000000000 --- a/packages/@uppy/companion/test/fixtures/instagram.ts +++ /dev/null @@ -1,9 +0,0 @@ -export const expects: { - itemName: string - itemMimeType: string - itemSize: null -} = { - itemName: 'Instagram 2017-08-31T18:10:00+00000.jpeg', - itemMimeType: 'image/jpeg', - itemSize: null, -} diff --git a/packages/@uppy/companion/test/mockserver.ts b/packages/@uppy/companion/test/mockserver.ts index 5fb178467..1a66514ca 100644 --- a/packages/@uppy/companion/test/mockserver.ts +++ b/packages/@uppy/companion/test/mockserver.ts @@ -37,11 +37,6 @@ const defaultEnv = { COMPANION_GOOGLE_KEYS_ENDPOINT: undefined, COMPANION_GOOGLE_SECRET_FILE: undefined, - COMPANION_INSTAGRAM_KEY: 'instagram_key', - COMPANION_INSTAGRAM_SECRET: 'instagram_secret', - COMPANION_INSTAGRAM_KEYS_ENDPOINT: undefined, - COMPANION_INSTAGRAM_SECRET_FILE: undefined, - COMPANION_FACEBOOK_KEY: 'facebook_key', COMPANION_FACEBOOK_SECRET: 'facebook_secret', COMPANION_FACEBOOK_KEYS_ENDPOINT: undefined, diff --git a/packages/@uppy/companion/test/provider-manager.test.ts b/packages/@uppy/companion/test/provider-manager.test.ts index ce386fc6b..79031e568 100644 --- a/packages/@uppy/companion/test/provider-manager.test.ts +++ b/packages/@uppy/companion/test/provider-manager.test.ts @@ -74,32 +74,17 @@ describe('Test Provider options', () => { expect(googledrive['secret']).toBe('google_secret') - const instagram = requireGrantProviderConfig(grantConfig, 'instagram') - expect(instagram['key']).toBe('instagram_key') - expect(instagram['secret']).toBe('instagram_secret') - const zoom = requireGrantProviderConfig(grantConfig, 'zoom') expect(zoom['key']).toBe('zoom_key') expect(zoom['secret']).toBe('zoom_secret') }) test('adds extra provider config', () => { - process.env['COMPANION_INSTAGRAM_KEY'] = '123456' providerManager.addProviderOptions( getAddProviderOptionsArgs(getCompanionOptions()), grantConfig, getOauthProvider, ) - expect(requireGrantProviderConfig(grantConfig, 'instagram')).toEqual({ - transport: 'session', - state: true, - callback: '/instagram/callback', - redirect_uri: 'http://localhost:3020/instagram/redirect', - key: '123456', - secret: 'instagram_secret', - protocol: 'https', - scope: ['user_profile', 'user_media'], - }) expect(requireGrantProviderConfig(grantConfig, 'dropbox')).toEqual({ key: 'dropbox_key', @@ -164,8 +149,6 @@ describe('Test Provider options', () => { `${process.env['PWD']}/test/resources/box_secret_file` process.env['COMPANION_GOOGLE_SECRET_FILE'] = `${process.env['PWD']}/test/resources/google_secret_file` - process.env['COMPANION_INSTAGRAM_SECRET_FILE'] = - `${process.env['PWD']}/test/resources/instagram_secret_file` process.env['COMPANION_ZOOM_SECRET_FILE'] = `${process.env['PWD']}/test/resources/zoom_secret_file` process.env['COMPANION_ZOOM_VERIFICATION_TOKEN_FILE'] = @@ -188,9 +171,6 @@ describe('Test Provider options', () => { expect( requireGrantProviderConfig(grantConfig, 'googledrive')['secret'], ).toBe('elgoog') - expect(requireGrantProviderConfig(grantConfig, 'instagram')['secret']).toBe( - 'margatsni', - ) expect(requireGrantProviderConfig(grantConfig, 'zoom')['secret']).toBe( 'u8Z5ceq', ) @@ -232,13 +212,6 @@ describe('Test Provider options', () => { getGrantProviderField(grantConfig, 'googledrive', 'secret'), ).toBeUndefined() - expect( - getGrantProviderField(grantConfig, 'instagram', 'key'), - ).toBeUndefined() - expect( - getGrantProviderField(grantConfig, 'instagram', 'secret'), - ).toBeUndefined() - expect(getGrantProviderField(grantConfig, 'zoom', 'key')).toBeUndefined() expect(getGrantProviderField(grantConfig, 'zoom', 'secret')).toBeUndefined() }) @@ -262,9 +235,6 @@ describe('Test Provider options', () => { expect( requireGrantProviderConfig(grantConfig, 'googledrive')['redirect_uri'], ).toBe('http://domain.com/drive/redirect') - expect( - requireGrantProviderConfig(grantConfig, 'instagram')['redirect_uri'], - ).toBe('http://domain.com/instagram/redirect') expect( requireGrantProviderConfig(grantConfig, 'zoom')['redirect_uri'], ).toBe('http://domain.com/zoom/redirect') diff --git a/packages/@uppy/companion/test/providers.test.ts b/packages/@uppy/companion/test/providers.test.ts index f7d45a215..b9d8f9288 100644 --- a/packages/@uppy/companion/test/providers.test.ts +++ b/packages/@uppy/companion/test/providers.test.ts @@ -316,30 +316,6 @@ describe('list provider files', () => { expect1({ username, items, providerFixture }) }) - test('instagram', async () => { - nock('https://graph.instagram.com').get('/me?fields=username').reply(200, { - id: '17841405793187218', - username: defaults.USERNAME, - }) - nock('https://graph.instagram.com') - .get( - '/me/media?fields=id%2Cmedia_type%2Cthumbnail_url%2Cmedia_url%2Ctimestamp%2Cchildren%7Bmedia_type%2Cmedia_url%2Cthumbnail_url%2Ctimestamp%7D', - ) - .reply(200, { - data: [ - { - id: defaults.ITEM_ID, - media_type: 'IMAGE', - timestamp: '2017-08-31T18:10:00+0000', - media_url: defaults.THUMBNAIL_URL, - }, - ], - }) - - const { username, items, providerFixture } = await runTest('instagram') - expect1({ username, items, providerFixture }) - }) - test('onedrive', async () => { nock('https://graph.microsoft.com').get('/v1.0/me').reply(200, { userPrincipalName: defaults.USERNAME, @@ -490,20 +466,6 @@ describe('provider file gets downloaded from', () => { await runTest('facebook') }) - test('instagram', async () => { - // times(2) because of size request - nock('https://graph.instagram.com') - .get(`/${defaults.ITEM_ID}?fields=media_url`) - .times(2) - .reply(200, { - id: defaults.ITEM_ID, - media_type: 'IMAGE', - media_url: defaults.THUMBNAIL_URL, - timestamp: '2017-08-31T18:10:00+0000', - }) - await runTest('instagram') - }) - test('onedrive', async () => { nock('https://graph.microsoft.com') .get(`/v1.0/drives/DUMMY-DRIVE-ID/items/${defaults.ITEM_ID}`) @@ -609,10 +571,6 @@ describe('logout of provider', () => { await runTest('facebook') }) - test('instagram', async () => { - await runTest('instagram') - }) - test('onedrive', async () => { await runTest('onedrive') }) diff --git a/packages/@uppy/companion/test/resources/instagram_secret_file b/packages/@uppy/companion/test/resources/instagram_secret_file deleted file mode 100644 index b57fd4dde..000000000 --- a/packages/@uppy/companion/test/resources/instagram_secret_file +++ /dev/null @@ -1 +0,0 @@ -margatsni \ No newline at end of file diff --git a/packages/@uppy/components/src/ProviderIcon.tsx b/packages/@uppy/components/src/ProviderIcon.tsx index 3dc00007e..730855f6a 100644 --- a/packages/@uppy/components/src/ProviderIcon.tsx +++ b/packages/@uppy/components/src/ProviderIcon.tsx @@ -8,7 +8,6 @@ export type ProviderIconProps = { | 'audio' | 'dropbox' | 'facebook' - | 'instagram' | 'onedrive' | 'googlephotos' | 'googledrive' @@ -94,36 +93,6 @@ export default function ProviderIcon(props: ProviderIconProps) { ) - case 'instagram': - return ( - - ) case 'onedrive': return ( { }) core.addFile({ - source: 'instagram', + source: 'dropbox', name: 'foo.jpg', type: 'image/jpeg', // @ts-ignore @@ -2028,7 +2028,7 @@ describe('src/Core', () => { }) }) core.addFile({ - source: 'instagram', + source: 'dropbox', name: 'foo.jpg', type: 'image/jpeg', // @ts-ignore @@ -2045,7 +2045,7 @@ describe('src/Core', () => { }) }) core.addFile({ - source: 'instagram', + source: 'dropbox', name: 'bar.jpg', type: 'image/jpeg', // @ts-ignore diff --git a/packages/@uppy/dashboard/README.md b/packages/@uppy/dashboard/README.md index 0ee113f7b..57544da7a 100644 --- a/packages/@uppy/dashboard/README.md +++ b/packages/@uppy/dashboard/README.md @@ -10,8 +10,8 @@ Dashboard is a universal UI plugin for Uppy: - Drag and Drop, paste, select from local disk / my device -- UI for Webcam and remote sources: Google Drive, Dropbox, Instagram (all - optional, added via plugins) +- UI for Webcam and remote sources: Google Drive, Dropbox (all optional, added + via plugins) - File previews and info - Metadata editor - Progress: total and for individual files diff --git a/packages/@uppy/dashboard/src/utils/trapFocus.ts b/packages/@uppy/dashboard/src/utils/trapFocus.ts index ad2ceafff..c902f4fbd 100644 --- a/packages/@uppy/dashboard/src/utils/trapFocus.ts +++ b/packages/@uppy/dashboard/src/utils/trapFocus.ts @@ -24,8 +24,6 @@ function focusOnLastNode(event: $TSFixMe, nodes: $TSFixMe) { // Firefox thinks
    is focusable, but we don't have
      s in our FOCUSABLE_ELEMENTS. Which means that if we tab into // the
        , code will think that we are not in the active overlay, and we should focusOnFirstNode() of the currently // active overlay! -// [Practical check] if we use (focusedItemIndex === -1), instagram provider in firefox will never get focus on its pics -// in the
          . function isFocusInOverlay(activeOverlayEl: $TSFixMe) { return activeOverlayEl.contains(document.activeElement) } @@ -60,7 +58,7 @@ function trapFocus( } } -// Traps focus inside of the currently open overlay (e.g. Dashboard, or e.g. Instagram), +// Traps focus inside of the currently open overlay (e.g. Dashboard), // never lets focus disappear from the modal. export { trapFocus as forModal } diff --git a/packages/@uppy/instagram/.npmignore b/packages/@uppy/instagram/.npmignore deleted file mode 100644 index 6c816673f..000000000 --- a/packages/@uppy/instagram/.npmignore +++ /dev/null @@ -1 +0,0 @@ -tsconfig.* diff --git a/packages/@uppy/instagram/CHANGELOG.md b/packages/@uppy/instagram/CHANGELOG.md deleted file mode 100644 index 56a1b50ca..000000000 --- a/packages/@uppy/instagram/CHANGELOG.md +++ /dev/null @@ -1,183 +0,0 @@ -# @uppy/instagram - -## 5.1.0 - -### Minor Changes - -- 79e6460: - Add PluginTypeRegistry and typed getPlugin overload in @uppy/core - - Register plugin ids across packages so uppy.getPlugin('Dashboard' | 'Webcam') returns the concrete plugin type and removes the need to pass generics in getPlugin() - -### Patch Changes - -- Updated dependencies [e661348] -- Updated dependencies [79e6460] -- Updated dependencies [ac12f35] -- Updated dependencies [4817585] - - @uppy/provider-views@5.2.0 - - @uppy/core@5.2.0 - - @uppy/utils@7.1.4 - -## 5.0.1 - -### Patch Changes - -- 975317d: Removed "main" from package.json, since export maps serve as the contract for the public API. -- Updated dependencies [4b6a76c] -- Updated dependencies [975317d] -- Updated dependencies [9bac4c8] - - @uppy/core@5.0.2 - - @uppy/companion-client@5.0.1 - - @uppy/provider-views@5.0.2 - - @uppy/utils@7.0.2 - -## 5.0.0 - -### Major Changes - -- c5b51f6: ### Export maps for all packages - - All packages now have export maps. This is a breaking change in two cases: - - 1. The css imports have changed from `@uppy[package]/dist/styles.min.css` to `@uppy[package]/css/styles.min.css` - 2. You were importing something that wasn't exported from the root, for instance `@uppy/core/lib/foo.js`. You can now only import things we explicitly exported. - - #### Changed imports for `@uppy/react`, `@uppy/vue`, and `@uppy/svelte` - - Some components, like Dashboard, require a peer dependency to work but since all components were exported from a single file you were forced to install all peer dependencies. Even if you never imported, for instance, the status bar component. - - Every component that requires a peer dependency has now been moved to a subpath, such as `@uppy/react/dashboard`, so you only need to install the peer dependencies you need. - - **Example for `@uppy/react`:** - - **Before:** - - ```javascript - import { Dashboard, StatusBar } from "@uppy/react"; - ``` - - **Now:** - - ```javascript - import Dashboard from "@uppy/react/dashboard"; - import StatusBar from "@uppy/react/status-bar"; - ``` - -### Patch Changes - -- Updated dependencies [d301c01] -- Updated dependencies [c5b51f6] - - @uppy/utils@7.0.0 - - @uppy/companion-client@5.0.0 - - @uppy/provider-views@5.0.0 - - @uppy/core@5.0.0 - -## 4.3.2 - -### Patch Changes - -- 1b1a9e3: Define "files" in package.json -- Updated dependencies [1b1a9e3] -- Updated dependencies [c66fd85] - - @uppy/companion-client@4.5.2 - - @uppy/provider-views@4.5.2 - - @uppy/utils@6.2.2 - - @uppy/core@4.5.2 - -## 4.3.0 - -### Minor Changes - -- 0c24c5a: Use TypeScript compiler instead of Babel - -### Patch Changes - -- Updated dependencies [0c24c5a] -- Updated dependencies [0c24c5a] - - @uppy/core@4.5.0 - - @uppy/companion-client@4.5.0 - - @uppy/provider-views@4.5.0 - - @uppy/utils@6.2.0 - -## 4.2.3 - -Released: 2025-05-18 -Included in: Uppy v4.16.0 - -- @uppy/audio,@uppy/box,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/google-drive-picker,@uppy/google-drive,@uppy/google-photos-picker,@uppy/image-editor,@uppy/instagram,@uppy/onedrive,@uppy/remote-sources,@uppy/screen-capture,@uppy/unsplash,@uppy/url,@uppy/utils,@uppy/webcam,@uppy/webdav,@uppy/zoom: ts: make locale strings optional (Merlijn Vos / #5728) - -## 4.2.0 - -Released: 2025-01-06 -Included in: Uppy v4.11.0 - -- @uppy/angular,@uppy/audio,@uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/compressor,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/drop-target,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive-picker,@uppy/google-drive,@uppy/google-photos-picker,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react,@uppy/remote-sources,@uppy/screen-capture,@uppy/status-bar,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/vue,@uppy/webcam,@uppy/webdav,@uppy/xhr-upload,@uppy/zoom: Remove "paths" from all tsconfig's (Merlijn Vos / #5572) - -## 4.1.2 - -Released: 2024-12-05 -Included in: Uppy v4.8.0 - -- @uppy/audio,@uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/compressor,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/drop-target,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react,@uppy/remote-sources,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/utils,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: cleanup tsconfig (Mikael Finstad / #5520) - -## 4.1.1 - -Released: 2024-10-31 -Included in: Uppy v4.6.0 - -- @uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react-native,@uppy/react,@uppy/redux-dev-tools,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/store-redux,@uppy/svelte,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/utils,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: Fix links (Anthony Veaudry / #5492) - -## 4.1.0 - -Released: 2024-08-29 -Included in: Uppy v4.3.0 - -- @uppy/aws-s3,@uppy/box,@uppy/compressor,@uppy/dropbox,@uppy/facebook,@uppy/google-drive,@uppy/google-photos,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/screen-capture,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/xhr-upload,@uppy/zoom: export plugin options (Antoine du Hamel / #5433) - -## 4.0.0-beta.1 - -Released: 2024-03-28 -Included in: Uppy v4.0.0-beta.1 - -- @uppy/instagram: refactor to TypeScript (Murderlon / #4979) - -## 3.3.0 - -Released: 2024-03-27 -Included in: Uppy v3.24.0 - -- @uppy/instagram: refactor to TypeScript (Murderlon / #4979) - -## 3.0.1 - -Released: 2022-09-25 -Included in: Uppy v3.1.0 - -- @uppy/audio,@uppy/aws-s3-multipart,@uppy/aws-s3,@uppy/box,@uppy/companion-client,@uppy/companion,@uppy/compressor,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/drop-target,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/progress-bar,@uppy/provider-views,@uppy/react,@uppy/redux-dev-tools,@uppy/remote-sources,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/store-redux,@uppy/svelte,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/utils,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: add missing entries to changelog for individual packages (Antoine du Hamel / #4092) - -## 3.0.0 - -Released: 2022-08-22 -Included in: Uppy v3.0.0 - -- Switch to ESM - -## 2.1.1 - -Released: 2022-05-30 -Included in: Uppy v2.11.0 - -- @uppy/angular,@uppy/audio,@uppy/aws-s3-multipart,@uppy/aws-s3,@uppy/box,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/form,@uppy/golden-retriever,@uppy/google-drive,@uppy/image-editor,@uppy/informer,@uppy/instagram,@uppy/onedrive,@uppy/progress-bar,@uppy/react,@uppy/redux-dev-tools,@uppy/robodog,@uppy/screen-capture,@uppy/status-bar,@uppy/store-default,@uppy/store-redux,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/tus,@uppy/unsplash,@uppy/url,@uppy/vue,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: doc: update bundler recommendation (Antoine du Hamel / #3763) - -## 2.1.0 - -Released: 2022-05-14 -Included in: Uppy v2.10.0 - -- @uppy/instagram: refactor to ESM (Antoine du Hamel / #3696) - -## 2.0.5 - -Released: 2021-12-07 -Included in: Uppy v2.3.0 - -- @uppy/aws-s3,@uppy/box,@uppy/core,@uppy/dashboard,@uppy/drag-drop,@uppy/dropbox,@uppy/facebook,@uppy/file-input,@uppy/google-drive,@uppy/image-editor,@uppy/instagram,@uppy/locales,@uppy/onedrive,@uppy/screen-capture,@uppy/status-bar,@uppy/thumbnail-generator,@uppy/transloadit,@uppy/url,@uppy/webcam,@uppy/xhr-upload,@uppy/zoom: Refactor locale scripts & generate types and docs (Merlijn Vos / #3276) diff --git a/packages/@uppy/instagram/LICENSE b/packages/@uppy/instagram/LICENSE deleted file mode 100644 index c23747330..000000000 --- a/packages/@uppy/instagram/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2018 Transloadit - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/packages/@uppy/instagram/README.md b/packages/@uppy/instagram/README.md deleted file mode 100644 index acb3c588b..000000000 --- a/packages/@uppy/instagram/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# @uppy/instagram - -Uppy logo: a smiling puppy above a pink upwards arrow - -[![npm version](https://img.shields.io/npm/v/@uppy/instagram.svg?style=flat-square)](https://www.npmjs.com/package/@uppy/instagram) -![CI status for Uppy tests](https://github.com/transloadit/uppy/workflows/CI/badge.svg) -![CI status for Companion tests](https://github.com/transloadit/uppy/workflows/Companion/badge.svg) -![CI status for browser tests](https://github.com/transloadit/uppy/workflows/End-to-end%20tests/badge.svg) - -The Instagram plugin lets users import photos from their Instagram account. - -A [Companion](https://uppy.io/docs/companion) instance is required for the -Instagram plugin to work. Companion handles authentication with Instagram, -downloads the pictures and videos, and uploads them to the destination. This -saves the user bandwidth, especially helpful if they are on a mobile connection. - -Uppy is being developed by the folks at [Transloadit](https://transloadit.com), -a versatile file encoding service. - -## Example - -```js -import Uppy from '@uppy/core' -import Instagram from '@uppy/instagram' - -const uppy = new Uppy() -uppy.use(Instagram, {}) -``` - -## Installation - -```bash -$ npm install @uppy/instagram -``` - -Alternatively, you can also use this plugin in a pre-built bundle from -Transloadit’s CDN: Smart CDN. In that case `Uppy` will attach itself to the -global `window.Uppy` object. See the -[main Uppy documentation](https://uppy.io/docs/#Installation) for instructions. - -## Documentation - -Documentation for this plugin can be found on the -[Uppy website](https://uppy.io/docs/instagram). - -## License - -[The MIT License](./LICENSE). diff --git a/packages/@uppy/instagram/package.json b/packages/@uppy/instagram/package.json deleted file mode 100644 index 2bf6927a0..000000000 --- a/packages/@uppy/instagram/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "@uppy/instagram", - "description": "Import photos and videos from Instagram, into Uppy.", - "version": "5.1.0", - "license": "MIT", - "type": "module", - "sideEffects": false, - "scripts": { - "build": "tsc --build tsconfig.build.json", - "typecheck": "tsc --build" - }, - "keywords": [ - "file uploader", - "uppy", - "uppy-plugin", - "instagram", - "provider", - "photos", - "videos" - ], - "homepage": "https://uppy.io", - "bugs": { - "url": "https://github.com/transloadit/uppy/issues" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/transloadit/uppy.git" - }, - "files": [ - "src", - "lib", - "dist", - "CHANGELOG.md" - ], - "exports": { - ".": "./lib/index.js", - "./package.json": "./package.json" - }, - "dependencies": { - "@uppy/companion-client": "workspace:^", - "@uppy/provider-views": "workspace:^", - "@uppy/utils": "workspace:^", - "preact": "^10.26.10" - }, - "peerDependencies": { - "@uppy/core": "workspace:^" - }, - "devDependencies": { - "@uppy/core": "workspace:^", - "typescript": "^5.8.3" - } -} diff --git a/packages/@uppy/instagram/src/Instagram.tsx b/packages/@uppy/instagram/src/Instagram.tsx deleted file mode 100644 index 9f56b0379..000000000 --- a/packages/@uppy/instagram/src/Instagram.tsx +++ /dev/null @@ -1,133 +0,0 @@ -import { - type CompanionPluginOptions, - getAllowedHosts, - Provider, - tokenStorage, -} from '@uppy/companion-client' -import type { - AsyncStore, - Body, - Meta, - UnknownProviderPlugin, - UnknownProviderPluginState, - UppyFile, -} from '@uppy/core' -import { UIPlugin, type Uppy } from '@uppy/core' -import { ProviderViews } from '@uppy/provider-views' - -import type { LocaleStrings } from '@uppy/utils' -// biome-ignore lint/style/useImportType: h is not a type -import { type ComponentChild, h } from 'preact' -import packageJson from '../package.json' with { type: 'json' } -import locale from './locale.js' - -declare module '@uppy/core' { - export interface PluginTypeRegistry { - Instagram: Instagram - } -} - -export type InstagramOptions = CompanionPluginOptions & { - locale?: LocaleStrings -} - -export default class Instagram - extends UIPlugin - implements UnknownProviderPlugin -{ - static VERSION = packageJson.version - - icon: () => h.JSX.Element - - provider: Provider - - view!: ProviderViews - - storage: AsyncStore - - files: UppyFile[] - - rootFolderId: string | null = 'recent' - - constructor(uppy: Uppy, opts: InstagramOptions) { - super(uppy, opts) - this.type = 'acquirer' - this.files = [] - this.storage = this.opts.storage || tokenStorage - this.id = this.opts.id || 'Instagram' - this.icon = () => ( - - ) - - this.defaultLocale = locale - - this.i18nInit() - this.title = this.i18n('pluginNameInstagram') - - this.opts.companionAllowedHosts = getAllowedHosts( - this.opts.companionAllowedHosts, - this.opts.companionUrl, - ) - this.provider = new Provider(uppy, { - companionUrl: this.opts.companionUrl, - companionHeaders: this.opts.companionHeaders, - companionKeysParams: this.opts.companionKeysParams, - companionCookiesRule: this.opts.companionCookiesRule, - provider: 'instagram', - pluginId: this.id, - supportsRefreshToken: false, - }) - - this.render = this.render.bind(this) - } - - install(): void { - this.view = new ProviderViews(this, { - provider: this.provider, - viewType: 'grid', - showTitles: false, - showFilter: false, - showBreadcrumbs: false, - }) - - const { target } = this.opts - if (target) { - this.mount(target, this) - } - } - - uninstall(): void { - this.view.tearDown() - this.unmount() - } - - render(state: unknown): ComponentChild { - return this.view.render(state) - } -} diff --git a/packages/@uppy/instagram/src/index.ts b/packages/@uppy/instagram/src/index.ts deleted file mode 100644 index e5948eede..000000000 --- a/packages/@uppy/instagram/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export type { InstagramOptions } from './Instagram.js' -export { default } from './Instagram.js' diff --git a/packages/@uppy/instagram/src/locale.ts b/packages/@uppy/instagram/src/locale.ts deleted file mode 100644 index edb740b88..000000000 --- a/packages/@uppy/instagram/src/locale.ts +++ /dev/null @@ -1,5 +0,0 @@ -export default { - strings: { - pluginNameInstagram: 'Instagram', - }, -} diff --git a/packages/@uppy/instagram/tsconfig.build.json b/packages/@uppy/instagram/tsconfig.build.json deleted file mode 100644 index afabb530f..000000000 --- a/packages/@uppy/instagram/tsconfig.build.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "extends": "../../../tsconfig.shared", - "compilerOptions": { - "outDir": "./lib", - "rootDir": "./src" - }, - "include": ["./src/**/*.*"], - "exclude": ["./src/**/*.test.ts"], - "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, - { - "path": "../core/tsconfig.build.json" - } - ] -} diff --git a/packages/@uppy/instagram/tsconfig.json b/packages/@uppy/instagram/tsconfig.json deleted file mode 100644 index 847db9a4f..000000000 --- a/packages/@uppy/instagram/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "../../../tsconfig.shared", - "compilerOptions": { - "emitDeclarationOnly": false, - "noEmit": true - }, - "include": ["./package.json", "./src/**/*.*"], - "references": [ - { - "path": "../companion-client/tsconfig.build.json" - }, - { - "path": "../provider-views/tsconfig.build.json" - }, - { - "path": "../utils/tsconfig.build.json" - }, - { - "path": "../core/tsconfig.build.json" - } - ] -} diff --git a/packages/@uppy/instagram/turbo.json b/packages/@uppy/instagram/turbo.json deleted file mode 100644 index 83c0d57e1..000000000 --- a/packages/@uppy/instagram/turbo.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "extends": ["//"], - "tasks": { - "build": { - "dependsOn": ["^build", "@uppy/core#build"] - } - } -} diff --git a/packages/@uppy/locales/src/ca_ES.ts b/packages/@uppy/locales/src/ca_ES.ts index ed30f8517..f05b43102 100644 --- a/packages/@uppy/locales/src/ca_ES.ts +++ b/packages/@uppy/locales/src/ca_ES.ts @@ -134,7 +134,6 @@ ca_ES.strings = { pluginNameDropbox: 'Dropbox', pluginNameFacebook: 'Facebook', pluginNameGoogleDrive: 'Google Drive', - pluginNameInstagram: 'Instagram', pluginNameOneDrive: 'OneDrive', pluginNameZoom: 'Zoom', poweredBy: 'Desenvolupat per %{uppy}', diff --git a/packages/@uppy/locales/src/de_DE.ts b/packages/@uppy/locales/src/de_DE.ts index 77df88e1d..b6bbb4cba 100644 --- a/packages/@uppy/locales/src/de_DE.ts +++ b/packages/@uppy/locales/src/de_DE.ts @@ -124,7 +124,6 @@ de_DE.strings = { pluginNameDropbox: 'Dropbox', pluginNameFacebook: 'Facebook', pluginNameGoogleDrive: 'Google Drive', - pluginNameInstagram: 'Instagram', pluginNameOneDrive: 'OneDrive', pluginNameZoom: 'Zoom', poweredBy: 'Powered by %{uppy}', diff --git a/packages/@uppy/locales/src/en_US.ts b/packages/@uppy/locales/src/en_US.ts index a0634ef26..b8a925181 100644 --- a/packages/@uppy/locales/src/en_US.ts +++ b/packages/@uppy/locales/src/en_US.ts @@ -153,7 +153,6 @@ en_US.strings = { pluginNameGoogleDrive: 'Google Drive', pluginNameGoogleDrivePicker: 'Google Drive', pluginNameGooglePhotosPicker: 'Google Photos', - pluginNameInstagram: 'Instagram', pluginNameOneDrive: 'OneDrive', pluginNameScreenCapture: 'Screencast', pluginNameUnsplash: 'Unsplash', diff --git a/packages/@uppy/locales/src/es_ES.ts b/packages/@uppy/locales/src/es_ES.ts index 17d491928..7114a7cf2 100644 --- a/packages/@uppy/locales/src/es_ES.ts +++ b/packages/@uppy/locales/src/es_ES.ts @@ -137,7 +137,6 @@ es_ES.strings = { pluginNameDropbox: 'Dropbox', pluginNameFacebook: 'Facebook', pluginNameGoogleDrive: 'Google Drive', - pluginNameInstagram: 'Instagram', pluginNameOneDrive: 'OneDrive', pluginNameZoom: 'Zoom', poweredBy: 'Desarrollado por %{uppy}', diff --git a/packages/@uppy/locales/src/fa_IR.ts b/packages/@uppy/locales/src/fa_IR.ts index 239018953..024e96e59 100644 --- a/packages/@uppy/locales/src/fa_IR.ts +++ b/packages/@uppy/locales/src/fa_IR.ts @@ -128,7 +128,6 @@ fa_IR.strings = { pluginNameDropbox: 'دراپ باکس', pluginNameFacebook: 'فیس بوک', pluginNameGoogleDrive: 'درایو گوگل', - pluginNameInstagram: 'اینستاگرام', pluginNameOneDrive: 'OneDrive', pluginNameZoom: 'بزرگ‌نمایی', poweredBy: 'قدرت گرفته از %{uppy}', diff --git a/packages/@uppy/locales/src/ms_MY.ts b/packages/@uppy/locales/src/ms_MY.ts index eec9dcc38..941c65fee 100644 --- a/packages/@uppy/locales/src/ms_MY.ts +++ b/packages/@uppy/locales/src/ms_MY.ts @@ -136,7 +136,6 @@ ms_MY.strings = { pluginNameDropbox: 'Dropbox', pluginNameFacebook: 'Facebook', pluginNameGoogleDrive: 'Google Drive', - pluginNameInstagram: 'Instagram', pluginNameOneDrive: 'OneDrive', pluginNameScreenCapture: 'Screencast', pluginNameUnsplash: 'Unsplash', diff --git a/packages/@uppy/locales/src/nl_NL.ts b/packages/@uppy/locales/src/nl_NL.ts index dd2632f69..28d2b604a 100644 --- a/packages/@uppy/locales/src/nl_NL.ts +++ b/packages/@uppy/locales/src/nl_NL.ts @@ -147,7 +147,6 @@ nl_NL.strings = { pluginNameGoogleDrive: 'Google Drive', pluginNameGoogleDrivePicker: 'Google Drive', pluginNameGooglePhotosPicker: 'Google Photos', - pluginNameInstagram: 'Instagram', pluginNameOneDrive: 'OneDrive', pluginNameScreenCapture: 'Screencast', pluginNameUnsplash: 'Unsplash', diff --git a/packages/@uppy/locales/src/pl_PL.ts b/packages/@uppy/locales/src/pl_PL.ts index e69e3a8c6..1ca1d2b15 100644 --- a/packages/@uppy/locales/src/pl_PL.ts +++ b/packages/@uppy/locales/src/pl_PL.ts @@ -144,7 +144,6 @@ pl_PL.strings = { pluginNameGoogleDrive: 'Google Drive', pluginNameGoogleDrivePicker: 'Google Drive', pluginNameGooglePhotosPicker: 'Google Photos', - pluginNameInstagram: 'Instagram', pluginNameOneDrive: 'OneDrive', pluginNameScreenCapture: 'Zrzut ekranu', pluginNameUnsplash: 'Unsplash', diff --git a/packages/@uppy/locales/src/pt_BR.ts b/packages/@uppy/locales/src/pt_BR.ts index 972673375..24a52c72a 100644 --- a/packages/@uppy/locales/src/pt_BR.ts +++ b/packages/@uppy/locales/src/pt_BR.ts @@ -148,7 +148,6 @@ pt_BR.strings = { pluginNameGoogleDrive: 'Google Drive', pluginNameGoogleDrivePicker: 'Google Drive', pluginNameGooglePhotosPicker: 'Google Photos', - pluginNameInstagram: 'Instagram', pluginNameOneDrive: 'OneDrive', pluginNameScreenCapture: 'Screencast', pluginNameUnsplash: 'Unsplash', diff --git a/packages/@uppy/locales/src/sv_SE.ts b/packages/@uppy/locales/src/sv_SE.ts index 588c22533..5f0a27b20 100644 --- a/packages/@uppy/locales/src/sv_SE.ts +++ b/packages/@uppy/locales/src/sv_SE.ts @@ -144,7 +144,6 @@ sv_SE.strings = { pluginNameGoogleDrive: 'Google Drive', pluginNameGoogleDrivePicker: 'Google Drive', pluginNameGooglePhotosPicker: 'Google Foton', - pluginNameInstagram: 'Instagram', pluginNameOneDrive: 'OneDrive', pluginNameScreenCapture: 'Skärminspelning', pluginNameUnsplash: 'Unsplash', diff --git a/packages/@uppy/locales/src/uk_UA.ts b/packages/@uppy/locales/src/uk_UA.ts index 113a40d76..765503d1c 100644 --- a/packages/@uppy/locales/src/uk_UA.ts +++ b/packages/@uppy/locales/src/uk_UA.ts @@ -138,7 +138,6 @@ uk_UA.strings = { pluginNameDropbox: 'Dropbox', pluginNameFacebook: 'Facebook', pluginNameGoogleDrive: 'Google Drive', - pluginNameInstagram: 'Instagram', pluginNameOneDrive: 'OneDrive', pluginNameZoom: 'Zoom', poweredBy: 'Працює на %{uppy}', diff --git a/packages/@uppy/locales/src/uz_UZ.ts b/packages/@uppy/locales/src/uz_UZ.ts index c31c4d877..dec5b451f 100644 --- a/packages/@uppy/locales/src/uz_UZ.ts +++ b/packages/@uppy/locales/src/uz_UZ.ts @@ -131,7 +131,6 @@ uz_UZ.strings = { pluginNameDropbox: 'Dropbox', pluginNameFacebook: 'Facebook', pluginNameGoogleDrive: 'Google Drive', - pluginNameInstagram: 'Instagram', pluginNameOneDrive: 'OneDrive', pluginNameZoom: 'Zoom', poweredBy: '%{uppy} tomonidan quvvatlanadi', diff --git a/packages/@uppy/locales/src/vi_VN.ts b/packages/@uppy/locales/src/vi_VN.ts index 25dc39a2c..a8f9a371d 100644 --- a/packages/@uppy/locales/src/vi_VN.ts +++ b/packages/@uppy/locales/src/vi_VN.ts @@ -131,7 +131,6 @@ vi_VN.strings = { pluginNameDropbox: 'Dropbox', pluginNameFacebook: 'Facebook', pluginNameGoogleDrive: 'Google Drive', - pluginNameInstagram: 'Instagram', pluginNameOneDrive: 'OneDrive', pluginNameZoom: 'Zoom', poweredBy: 'Được cung cấp bởi %{uppy}', diff --git a/packages/@uppy/locales/turbo.json b/packages/@uppy/locales/turbo.json index 7c1a5e518..cf8c2da6b 100644 --- a/packages/@uppy/locales/turbo.json +++ b/packages/@uppy/locales/turbo.json @@ -24,8 +24,7 @@ "@uppy/dropbox#build", "@uppy/webdav#build", "@uppy/unsplash#build", - "@uppy/webcam#build", - "@uppy/instagram#build" + "@uppy/webcam#build" ], "inputs": [ "script/**/*.{js,ts,jsx,tsx}", diff --git a/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx b/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx index 2de72ba92..61bfe827f 100644 --- a/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx +++ b/packages/@uppy/provider-views/src/SearchProviderView/SearchProviderView.tsx @@ -66,7 +66,7 @@ const defaultOptions = { /** * SearchProviderView, used for Unsplash and future image search providers. - * Extends generic View, shared with regular providers like Google Drive and Instagram. + * Extends generic View, shared with regular providers like Google Drive. */ export default class SearchProviderView { static VERSION = packageJson.version diff --git a/packages/@uppy/remote-sources/package.json b/packages/@uppy/remote-sources/package.json index 833bfb397..0648b4e77 100644 --- a/packages/@uppy/remote-sources/package.json +++ b/packages/@uppy/remote-sources/package.json @@ -1,6 +1,6 @@ { "name": "@uppy/remote-sources", - "description": "Uppy plugin that includes all remote sources that Uppy+Companion offer, like Instagram, Google Drive, Dropox, Box, Unsplash, Url etc", + "description": "Uppy plugin that includes all remote sources that Uppy+Companion offer, like Google Drive, Dropbox, Box, Unsplash, Url etc", "version": "3.1.0", "license": "MIT", "type": "module", @@ -12,7 +12,6 @@ }, "keywords": [ "file uploader", - "instagram", "google-drive", "facebook", "dropbox", @@ -46,7 +45,6 @@ "@uppy/dropbox": "workspace:^", "@uppy/facebook": "workspace:^", "@uppy/google-drive": "workspace:^", - "@uppy/instagram": "workspace:^", "@uppy/onedrive": "workspace:^", "@uppy/unsplash": "workspace:^", "@uppy/url": "workspace:^", diff --git a/packages/@uppy/remote-sources/src/index.test.ts b/packages/@uppy/remote-sources/src/index.test.ts index c7e31cbc6..c7eace47d 100644 --- a/packages/@uppy/remote-sources/src/index.test.ts +++ b/packages/@uppy/remote-sources/src/index.test.ts @@ -46,7 +46,7 @@ describe('RemoteSources', () => { sources: ['Webcam'], }) }).toThrow( - 'Invalid plugin: "Webcam" is not one of: Box, Dropbox, Facebook, GoogleDrive, Instagram, OneDrive, Unsplash, Url, or Zoom.', + 'Invalid plugin: "Webcam" is not one of: Box, Dropbox, Facebook, GoogleDrive, OneDrive, Unsplash, Url, or Zoom.', ) }) diff --git a/packages/@uppy/remote-sources/src/index.ts b/packages/@uppy/remote-sources/src/index.ts index 91d9fbefb..f9ec5f842 100644 --- a/packages/@uppy/remote-sources/src/index.ts +++ b/packages/@uppy/remote-sources/src/index.ts @@ -11,7 +11,6 @@ import { BasePlugin } from '@uppy/core' import Dropbox from '@uppy/dropbox' import Facebook from '@uppy/facebook' import GoogleDrive from '@uppy/google-drive' -import Instagram from '@uppy/instagram' import OneDrive from '@uppy/onedrive' import Unsplash from '@uppy/unsplash' import Url from '@uppy/url' @@ -25,7 +24,6 @@ export const availablePlugins = { Dropbox, Facebook, GoogleDrive, - Instagram, OneDrive, Unsplash, Url, @@ -37,7 +35,6 @@ export type AvailablePluginsKeys = | 'Dropbox' | 'Facebook' | 'GoogleDrive' - | 'Instagram' | 'OneDrive' | 'Unsplash' | 'Url' diff --git a/packages/@uppy/remote-sources/tsconfig.build.json b/packages/@uppy/remote-sources/tsconfig.build.json index 598b35505..49003415b 100644 --- a/packages/@uppy/remote-sources/tsconfig.build.json +++ b/packages/@uppy/remote-sources/tsconfig.build.json @@ -22,9 +22,6 @@ { "path": "../google-drive/tsconfig.build.json" }, - { - "path": "../instagram/tsconfig.build.json" - }, { "path": "../onedrive/tsconfig.build.json" }, diff --git a/packages/@uppy/remote-sources/tsconfig.json b/packages/@uppy/remote-sources/tsconfig.json index 12b17eb48..ed4d1624b 100644 --- a/packages/@uppy/remote-sources/tsconfig.json +++ b/packages/@uppy/remote-sources/tsconfig.json @@ -21,9 +21,6 @@ { "path": "../google-drive/tsconfig.build.json" }, - { - "path": "../instagram/tsconfig.build.json" - }, { "path": "../onedrive/tsconfig.build.json" }, diff --git a/packages/@uppy/transloadit/src/index.ts b/packages/@uppy/transloadit/src/index.ts index 5d226595f..c54150cdd 100644 --- a/packages/@uppy/transloadit/src/index.ts +++ b/packages/@uppy/transloadit/src/index.ts @@ -321,7 +321,6 @@ export default class Transloadit< addPluginVersion('GoogleDrive', 'uppy-google-drive') addPluginVersion('GoogleDrivePicker', 'uppy-google-drive-picker') addPluginVersion('GooglePhotosPicker', 'uppy-google-photos-picker') - addPluginVersion('Instagram', 'uppy-instagram') addPluginVersion('OneDrive', 'uppy-onedrive') addPluginVersion('Zoom', 'uppy-zoom') addPluginVersion('Url', 'uppy-url') diff --git a/packages/uppy/package.json b/packages/uppy/package.json index 88d580041..3f2154a52 100644 --- a/packages/uppy/package.json +++ b/packages/uppy/package.json @@ -1,6 +1,6 @@ { "name": "uppy", - "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Instagram, Dropbox, Google Drive, S3 and more :dog:", + "description": "Extensible JavaScript file upload widget with support for drag&drop, resumable uploads, previews, restrictions, file processing/encoding, remote providers like Dropbox, Google Drive, S3 and more :dog:", "version": "5.2.4", "license": "MIT", "main": "lib/index.js", @@ -55,7 +55,6 @@ "@uppy/google-photos-picker": "workspace:*", "@uppy/image-editor": "workspace:*", "@uppy/image-generator": "workspace:*", - "@uppy/instagram": "workspace:*", "@uppy/locales": "workspace:*", "@uppy/onedrive": "workspace:*", "@uppy/provider-views": "workspace:*", diff --git a/packages/uppy/src/bundle.ts b/packages/uppy/src/bundle.ts index 84433c38e..860c41d21 100644 --- a/packages/uppy/src/bundle.ts +++ b/packages/uppy/src/bundle.ts @@ -35,7 +35,6 @@ export { default as GoogleDrive } from '@uppy/google-drive' export { default as GoogleDrivePicker } from '@uppy/google-drive-picker' export { default as GooglePhotosPicker } from '@uppy/google-photos-picker' export { default as ImageEditor } from '@uppy/image-editor' -export { default as Instagram } from '@uppy/instagram' export { default as OneDrive } from '@uppy/onedrive' export { default as RemoteSources } from '@uppy/remote-sources' export { default as ScreenCapture } from '@uppy/screen-capture' diff --git a/packages/uppy/src/index.ts b/packages/uppy/src/index.ts index de33c8399..cf85901dc 100644 --- a/packages/uppy/src/index.ts +++ b/packages/uppy/src/index.ts @@ -17,7 +17,6 @@ export type { FormOptions } from '@uppy/form' export type { GoldenRetrieverOptions } from '@uppy/golden-retriever' export type { GoogleDriveOptions } from '@uppy/google-drive' export type { ImageEditorOptions } from '@uppy/image-editor' -export type { InstagramOptions } from '@uppy/instagram' export type { OneDriveOptions } from '@uppy/onedrive' export type { RemoteSourcesOptions } from '@uppy/remote-sources' export type { ScreenCaptureOptions } from '@uppy/screen-capture' diff --git a/packages/uppy/tsconfig.build.json b/packages/uppy/tsconfig.build.json index ab68b4479..f782a97d5 100644 --- a/packages/uppy/tsconfig.build.json +++ b/packages/uppy/tsconfig.build.json @@ -55,9 +55,6 @@ { "path": "../@uppy/image-editor/tsconfig.build.json" }, - { - "path": "../@uppy/instagram/tsconfig.build.json" - }, { "path": "../@uppy/onedrive/tsconfig.build.json" }, diff --git a/packages/uppy/tsconfig.json b/packages/uppy/tsconfig.json index d748cb51d..1c9df8e7c 100644 --- a/packages/uppy/tsconfig.json +++ b/packages/uppy/tsconfig.json @@ -54,9 +54,6 @@ { "path": "../@uppy/image-editor/tsconfig.build.json" }, - { - "path": "../@uppy/instagram/tsconfig.build.json" - }, { "path": "../@uppy/onedrive/tsconfig.build.json" }, diff --git a/private/dev/Dashboard.js b/private/dev/Dashboard.js index f3b7ffdd5..1a3c2fed2 100644 --- a/private/dev/Dashboard.js +++ b/private/dev/Dashboard.js @@ -122,7 +122,6 @@ export default () => { companionAllowedHosts, ...getCompanionKeysParams('GOOGLE_DRIVE'), }) - // .use(Instagram, { target: Dashboard, companionUrl: COMPANION_URL, companionAllowedHosts }) // .use(Dropbox, { target: Dashboard, companionUrl: COMPANION_URL, companionAllowedHosts }) // .use(Box, { target: Dashboard, companionUrl: COMPANION_URL, companionAllowedHosts }) // .use(Facebook, { target: Dashboard, companionUrl: COMPANION_URL, companionAllowedHosts }) @@ -150,7 +149,6 @@ export default () => { 'Box', 'Dropbox', 'Facebook', - 'Instagram', 'OneDrive', 'Unsplash', 'Zoom', diff --git a/yarn.lock b/yarn.lock index 9efee9162..dcf06642e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10373,21 +10373,6 @@ __metadata: languageName: unknown linkType: soft -"@uppy/instagram@workspace:*, @uppy/instagram@workspace:^, @uppy/instagram@workspace:packages/@uppy/instagram": - version: 0.0.0-use.local - resolution: "@uppy/instagram@workspace:packages/@uppy/instagram" - dependencies: - "@uppy/companion-client": "workspace:^" - "@uppy/core": "workspace:^" - "@uppy/provider-views": "workspace:^" - "@uppy/utils": "workspace:^" - preact: "npm:^10.26.10" - typescript: "npm:^5.8.3" - peerDependencies: - "@uppy/core": "workspace:^" - languageName: unknown - linkType: soft - "@uppy/locales@workspace:*, @uppy/locales@workspace:packages/@uppy/locales": version: 0.0.0-use.local resolution: "@uppy/locales@workspace:packages/@uppy/locales" @@ -10488,7 +10473,6 @@ __metadata: "@uppy/dropbox": "workspace:^" "@uppy/facebook": "workspace:^" "@uppy/google-drive": "workspace:^" - "@uppy/instagram": "workspace:^" "@uppy/onedrive": "workspace:^" "@uppy/unsplash": "workspace:^" "@uppy/url": "workspace:^" @@ -23862,7 +23846,6 @@ __metadata: "@uppy/google-photos-picker": "workspace:*" "@uppy/image-editor": "workspace:*" "@uppy/image-generator": "workspace:*" - "@uppy/instagram": "workspace:*" "@uppy/locales": "workspace:*" "@uppy/onedrive": "workspace:*" "@uppy/provider-views": "workspace:*"