Skip to content
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

feat: add thirdweb fallback #2808

Merged
merged 5 commits into from
May 5, 2023
Merged

feat: add thirdweb fallback #2808

merged 5 commits into from
May 5, 2023

Conversation

bigint
Copy link
Member

@bigint bigint commented May 5, 2023

What does this PR do?

🤖 Generated by Copilot at f7bc34c

This pull request adds the option to use Thirdweb's storage service for uploading files to IPFS in the apps/web project. It modifies the uploadToIPFS function, adds the @thirdweb-dev/storage package, and updates the pnpm-lock.yaml file with the required dependencies.

Related issues

Fixes # (issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Enhancement (non-breaking small changes to existing functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Explanation of the changes

🤖 Generated by Copilot at f7bc34c

  • Add @thirdweb-dev/storage package as a dependency to enable uploading files to IPFS using Thirdweb's service (link, link, link)
  • Import ThirdwebStorage class from @thirdweb-dev/storage package and create a storage client instance in apps/web/src/lib/uploadToIPFS.ts (link)
  • Add USE_THIRDWEB constant to toggle between using Thirdweb's storage or S3 as the backend for uploading files to IPFS in apps/web/src/lib/uploadToIPFS.ts (link)
  • Modify uploadToIPFS function to check USE_THIRDWEB constant and call uploadBatch method of the storage client if true, and map the returned URIs to the MediaSet type in apps/web/src/lib/uploadToIPFS.ts (link)
  • Add and update various packages as dependencies to support the @thirdweb-dev/storage package and its dependencies, such as @assemblyscript/loader, @multiformats/base-x, cids, ipfs-unixfs-importer, rabin-wasm, and others in pnpm-lock.yaml (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)

Emoji

📦🌐🧬

@vercel
Copy link

vercel bot commented May 5, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
prerender ✅ Ready (Inspect) Visit Preview May 5, 2023 2:34pm
ui ✅ Ready (Inspect) Visit Preview May 5, 2023 2:34pm
web ✅ Ready (Inspect) Visit Preview May 5, 2023 2:34pm

@socket-security
Copy link

socket-security bot commented May 5, 2023

New dependency changes detected. Learn more about Socket for GitHub ↗︎


🚨 Potential security issues found in this pull request. To accept the risk, merge this PR and you will not be notified again.

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

  • @SocketSecurity ignore protobufjs@6.11.3
📜 Install scripts

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Package Script field Source
protobufjs@6.11.3 (added) postinstall pnpm-lock.yaml, apps/web/package.json via @thirdweb-dev/storage@1.1.2
Pull request alert summary
Issue Status
Install scripts ⚠️ 1 issue
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

➕ Added Package Capability Access +/- Transitive Count Publisher
@thirdweb-dev/storage@1.1.2 eval, network, shell, environment +41 jnsdls

🚮 Removed packages: @growthbook/growthbook-react@0.16.0

@vercel vercel bot temporarily deployed to Preview – prerender May 5, 2023 14:06 Inactive
@vercel vercel bot temporarily deployed to Preview – web May 5, 2023 14:08 Inactive
@vercel vercel bot temporarily deployed to Preview – ui May 5, 2023 14:09 Inactive
@vercel vercel bot temporarily deployed to Preview – ui May 5, 2023 14:28 Inactive
@vercel vercel bot temporarily deployed to Preview – prerender May 5, 2023 14:29 Inactive
@vercel vercel bot temporarily deployed to Preview – ui May 5, 2023 14:31 Inactive
@bigint bigint merged commit a06c5d3 into main May 5, 2023
@bigint bigint deleted the thirdweb-fb branch May 5, 2023 14:32
@vercel vercel bot temporarily deployed to Preview – web May 5, 2023 14:34 Inactive
@vercel vercel bot temporarily deployed to Preview – prerender May 5, 2023 14:34 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant