Skip to content

Conversation

@BramSuurdje
Copy link
Member

Note

We are meticulous when it comes to merging code into the main branch, so please understand that we may reject pull requests that do not meet the project's standards. It's never personal. Also, game-related scripts have a lower chance of being merged.

Description

In this pull request. the data fetching of the website will change from the old Pocketbase system to the new JSON based system. making it easier to maintain in the future.

Type of change

Please check the relevant option(s):

  • New feature (non-breaking change that adds functionality)

BramSuurdje and others added 20 commits November 6, 2024 01:05
…dpoint to aggregate data. Adjust type definitions for Script and Category
…amline interface/port handling for better clarity
…cript` types, simplifying the sorting logic and enhancing clarity
…ilize centralized `fetchCategories` for improved maintainability
…stent badge rendering across script types
…ity and streamline the installation script logic
…d handle undefined values more gracefully in rendering
…d update copy button logic for improved functionality
…de script name for better clarity in the UI
@newzealandpaul
Copy link
Contributor

That was quick work! Well done 🚀

I wasn't actually aware you could call URLs like: https://api.github.com/repos/community-scripts/ProxmoxVE/contents/json

I thought we would need to dynamically compile all the JSON into a single script on deploy, but this avoids that. Amazing!

How resilient is the code if someone accidentally merges malformed json into a file inside /json? Will the build just fail?

I have two suggestions before merging:

  1. Remove the following pocketbase related files:
  • /frontend/src/lib/pocketbase.ts
  • /frontend/example.env
  • /frontend/.env.local
  1. There is also a number of occurrences of the string "https://community-scripts.github.io/Proxmox/" that should be replaced with "https://community-scripts.github.io/Proxmox/VM", or put inside an environment variable rather than being hardcoded.

@judeibe
Copy link

judeibe commented Nov 6, 2024 via email

@BramSuurdje
Copy link
Member Author

@newzealandpaul

How resilient is the code if someone accidentally merges malformed json into a file inside /json? Will the build just fail?

i dont actually know. i think wont fail but it will cause problems.

i can start work on a JSON validator that people can use to check if everything is valid. i can then also make it so that if a script is not valid. that it will automatically excluded.

@BramSuurdje
Copy link
Member Author

@havardthom everything should be applied now. thank you!

BramSuurdje and others added 6 commits November 6, 2024 22:42
Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>
Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>
Co-authored-by: Håvard Gjøby Thom <34199185+havardthom@users.noreply.github.com>
@havardthom
Copy link
Contributor

Looks like some basepath error on https://bramsuurdje.github.io/ProxmoxVE/scripts (request to https://api.github.com/repos/community-scripts//ProxmoxVE). Can merge when that is fixed

@BramSuurdje
Copy link
Member Author

Should be good to go now.

@MickLesk
Copy link
Member

MickLesk commented Nov 6, 2024

@havardthom Please merge on your own if you think it's okay. :-)

@BramSuurdje BramSuurdje merged commit 93fd495 into community-scripts:main Nov 6, 2024
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.

5 participants