Skip to content

Add version update reminders#212

Open
prplwtf wants to merge 8 commits into
mainfrom
remote-metadata
Open

Add version update reminders#212
prplwtf wants to merge 8 commits into
mainfrom
remote-metadata

Conversation

@prplwtf
Copy link
Copy Markdown
Member

@prplwtf prplwtf commented May 10, 2026

Tip

To test this PR on your own Blueprint instance, run the following command: blueprint -upgrade remote blueprintframework/framework remote-metadata. You can refetch the update data by setting the remote_metadata flag to false, saving, and turning it back to true.

uses data from blueprint.zip/browse, another reason to submit your extension :)

image image

@prplwtf prplwtf self-assigned this May 10, 2026
@prplwtf prplwtf added scope:backend Issues or pull requests related to Blueprint's backend. scope:extensions Issues or pull requests related to Blueprint extensions. scope:admin Issues or pull requests related to the Pterodactyl admin area. labels May 10, 2026
@prplwtf prplwtf linked an issue May 10, 2026 that may be closed by this pull request
@prplwtf
Copy link
Copy Markdown
Member Author

prplwtf commented May 11, 2026

I kind of want this data to also reflect on the extension's pages, but that proves to be a bit more difficult, as it's not supplied by $blueprint.

That said, we could probably also turn this into a $blueprint method.

@prplwtf
Copy link
Copy Markdown
Member Author

prplwtf commented May 11, 2026

image

I've added a new $blueprint method called extensionMetadata(identifier), which returns collected metadata for an extension.

@prplwtf prplwtf marked this pull request as ready for review May 11, 2026 13:43
@prplwtf prplwtf requested a review from naterfute May 11, 2026 13:44
Comment thread app/Console/Commands/BlueprintFramework/MetadataCacheCommand.php Outdated

// get version info
$context = stream_context_create(['http' => ['method' => 'GET', 'header' => 'User-Agent: BlueprintFramework']]);
$remoteVersions = @file_get_contents(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe use a proper http client instead

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took the file_get_contents shenanigans directly from a few other Artisan commands of ours, but I'll migrate it over to use Illuminate\Support\Facades\Http.

$installedExtensions = $this->blueprint->extensions();

// get version info
$context = stream_context_create(['http' => ['method' => 'GET', 'header' => 'User-Agent: BlueprintFramework']]);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version in the user agent could be useful

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I somewhat agree, but would that kind of conflict with users disabling telemetry?

}

// atomic swap
DB::statement("RENAME TABLE {$table} TO {$table}_bak, {$temp} TO {$table}");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is the worst code ive seen in a long time, please use a real atomic swap, e.g. using model upsert or a transaction where you remove all rows and add them back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:admin Issues or pull requests related to the Pterodactyl admin area. scope:backend Issues or pull requests related to Blueprint's backend. scope:extensions Issues or pull requests related to Blueprint extensions.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notify administrators when extensions are out of date

2 participants