Skip to content

Commit

Permalink
fix: update configurate, update frontend, fix file uploading issues
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniDigger committed Jan 20, 2024
1 parent 5afd112 commit 811cbde
Show file tree
Hide file tree
Showing 5 changed files with 428 additions and 418 deletions.
4 changes: 2 additions & 2 deletions backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.2.1</version>
<version>3.2.2</version>
<relativePath/>
</parent>

Expand All @@ -27,7 +27,7 @@

<!-- dependency management -->
<jdbi3-bom.version>3.43.0</jdbi3-bom.version>
<configurate.version>4.1.2</configurate.version>
<configurate.version>4.2.0-SNAPSHOT</configurate.version>
<spring-cloud-aws.version>3.1.0</spring-cloud-aws.version>

<!-- dependencies -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
import io.papermc.hangar.model.internal.versions.VersionUpload;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Encoding;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
Expand Down Expand Up @@ -49,10 +52,11 @@ public interface IVersionsController {
@ApiResponse(responseCode = "401", description = "Api session missing, invalid or expired"),
@ApiResponse(responseCode = "403", description = "Not enough permissions to use this endpoint")
})
@RequestBody(content = @Content(encoding = @Encoding(name = "versionUpload", contentType = "application/json")))
@PostMapping(path = "/projects/{slug}/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
UploadedVersion uploadVersion(@Parameter(description = "The slug of the project to return versions for") @PathVariable String slug,
@Parameter(description = "The version files in order of selected platforms, if any") @RequestPart(required = false) @Size(max = 3, message = "version.new.error.invalidNumOfPlatforms") List<@Valid MultipartFile> files,
@Parameter(description = "Version data. See the VersionUpload schema for more info") @RequestPart @Valid VersionUpload versionUpload);
@Parameter(description = "The version files in order of selected platforms, if any") @RequestPart(required = false, name = "files") @Size(max = 3, message = "version.new.error.invalidNumOfPlatforms") List<@Valid MultipartFile> files,
@Parameter(description = "Version data. See the VersionUpload schema for more info") @RequestPart("versionUpload") @Valid VersionUpload versionUpload);

@PostMapping(path = "/projects/{author}/{slug}/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@Deprecated(forRemoval = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ private String createPendingFile(final MultipartFile file, final String channel,
}

final SortedSet<String> loadedPlatformDependencies = pluginDataFile.data().getPlatformDependencies().get(platform);
if (loadedPlatformDependencies != null) {
if (loadedPlatformDependencies != null && !loadedPlatformDependencies.isEmpty()) {
// Make sure we don't add invalid versions
final Set<String> versionsForPlatform = new HashSet<>(this.platformService.getFullVersionsForPlatform(platform));
loadedPlatformDependencies.retainAll(versionsForPlatform);
Expand Down
24 changes: 14 additions & 10 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@
"@headlessui/vue": "1.7.17",
"@intlify/unplugin-vue-i18n": "2.0.0",
"@pinia/nuxt": "0.5.1",
"@unhead/vue": "^1.8.9",
"@unhead/vue": "1.8.10",
"@vuelidate/core": "2.0.3",
"@vuelidate/validators": "2.0.4",
"@vueuse/components": "10.7.1",
"@vueuse/core": "10.7.1",
"@vueuse/components": "10.7.2",
"@vueuse/core": "10.7.2",
"accept-language-parser": "1.5.0",
"axios": "1.6.5",
"chart.js": "4.4.1",
Expand All @@ -52,7 +52,7 @@
"qs": "6.11.2",
"rapidoc": "9.3.4",
"universal-cookie": "6.1.1",
"vue": "3.4.13",
"vue": "3.4.15",
"vue-advanced-cropper": "2.8.8",
"vue-chartjs": "5.3.0",
"vue-i18n": "9.9.0",
Expand All @@ -61,7 +61,7 @@
},
"devDependencies": {
"@iconify-json/mdi": "1.1.64",
"@nuxt-alt/proxy": "2.5.5",
"@nuxt-alt/proxy": "2.5.8",
"@nuxtjs/eslint-config-typescript": "12.1.0",
"@types/accept-language-parser": "1.5.6",
"@types/debug": "4.1.12",
Expand All @@ -76,7 +76,7 @@
"@types/qs": "6.9.11",
"@types/swagger-ui-dist": "3.30.4",
"@unocss/nuxt": "0.58.3",
"@vue/compiler-sfc": "3.4.13",
"@vue/compiler-sfc": "3.4.15",
"@vue/eslint-config-typescript": "12.0.0",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
Expand All @@ -88,11 +88,11 @@
"eslint-plugin-vue": "9.20.1",
"husky": "8.0.3",
"lint-staged": "15.2.0",
"nuxt": "3.9.1",
"nuxt": "3.9.3",
"pnpm": "8.14.1",
"prettier": "2.8.8",
"regenerator-runtime": "0.14.1",
"sass": "1.69.7",
"sass": "1.70.0",
"typescript": "5.3.3",
"unplugin-auto-import": "0.17.3",
"unplugin-icons": "0.18.2",
Expand All @@ -101,10 +101,14 @@
"vite-plugin-eslint": "1.8.1",
"vue-tsc": "1.8.27"
},
"comments": "Hookable 5.5 seems to break with nuxt...",
"comments": {
"hookable": "Hookable 5.5 seems to break with nuxt...",
"untyped": "https://github.com/unjs/untyped/issues/123"
},
"pnpm": {
"overrides": {
"hookable": "5.4.2"
"hookable": "5.4.2",
"untyped": "1.4.0"
}
}
}
Loading

0 comments on commit 811cbde

Please sign in to comment.