-
Notifications
You must be signed in to change notification settings - Fork 29
Add Client-Side Pre-Upload Package Validation #1061
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
Conversation
d27ceb8
to
511181e
Compare
511181e
to
d8bf267
Compare
8b7a454
to
7a6b794
Compare
I cannot build this branch on my machine, it fails with the error Would adding something like this to the
|
7a6b794
to
7780955
Compare
As of 15c1243 it should build for you now. if your Builder-1 dies, just:
|
comment: string; | ||
crc32: number; | ||
|
||
getData( | ||
writer: zip.Writer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type reference zip.Writer
should be updated to just Writer
since the zip
namespace declaration has been removed. This will align with the new export style used throughout the file and prevent potential type errors.
writer: zip.Writer, | |
writer: Writer, |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
writer: zip.Writer, | ||
callback: (zipWriter: zip.ZipWriter) => void, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type references in this interface need to be updated to match the new export style. Since the zip
namespace declaration has been removed, the parameter types should be changed from zip.Writer
and zip.ZipWriter
to just Writer
and ZipWriter
respectively to be consistent with the direct export approach used in the rest of the file.
writer: zip.Writer, | |
callback: (zipWriter: zip.ZipWriter) => void, | |
writer: Writer, | |
callback: (zipWriter: ZipWriter) => void, |
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1061 +/- ##
=======================================
Coverage 92.21% 92.21%
=======================================
Files 331 331
Lines 10060 10060
Branches 926 926
=======================================
Hits 9277 9277
Misses 657 657
Partials 126 126 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Prevents users from attempting to upload packages that aren't zips or packages without a manifest, icon, and readme in the root of the zip. Warns the user when uploading packages with > 8 DLL files, an Assembly-CSharp.dll file, or BepInEx.dll. Fixes a chromium bug preventing the selection of a file that was previously selected and canceled.
Move upload zip validation into separate file Add wrongCase, wrongExtension, and noExtension errors
Remove unused exported variables from zip-fs-full.d.ts
This reverts commit 070a1c6.
Add check for "test" in file name so we can warn users to test locally first
2071f7c
to
61cda5b
Compare
I tested this again and encountered the following error when uploading a package:
There are no unapplied migrations in my development environment, and uploading a package works as expected on the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comment: #1061 (comment)
I rebased yesterday so that's likely unrelated. This has also happened in the past: #1112 (review) It doesn't make sense to me that this could happen seeing as how we have a default value in the migration. Could you try running If it persists, I can't recreate this, so you could test:
|
Prevents users from attempting to upload packages that aren't zips or packages without a manifest, icon, and readme in the root of the zip.
Warns the user when uploading packages with > 8 DLL files, an Assembly-CSharp.dll file, or BepInEx.dll.
Fixes a chromium bug preventing the selection of a file that was previously selected and canceled.