Skip to content

Commit 4ac8da6

Browse files
committed
feat: tidy and changelog
1 parent e09e520 commit 4ac8da6

File tree

4 files changed

+35
-42
lines changed

4 files changed

+35
-42
lines changed

docs/pages/about/changelog/beta-2024-11.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,15 @@
2222
- Add private version of ExtensionFS (`blueprint_private:<identifier>`) that is symlinked to the extension's private directory.
2323
- [`Components.yml`](?page=documentation/componentsyml) has a new "Global" scope within "Dashboard".
2424
- Install, remove and export scripts now have access to the `$ENGINE` environment variable.
25+
- Add [`update.sh`](?page=documentation/scripts) script which will be ran upon an extension update transaction.
2526

2627
<br/>
2728

2829
#### Bugfixes
2930
- Some parts of Blueprint's React modifications caused errors with Prettier in certain cases.
3031
- Use `printf` instead of `echo` to write to `installed_extensions` as a way to prevent new lines from generating.
3132
- Removing the first installed extension causes a Laravel routing error.
33+
- ExtensionFS was not unlinked in the public directory.
3234

3335
<br/>
3436

@@ -38,4 +40,5 @@
3840
- [BlueprintExtensionLibrary](?page=documentation/$blueprint)'s **legacy variation** is being phased out. All `notify` and `file` methods now return false. This does not impact admin, client and console variations.
3941
- Resolved docs/implementation mismatch causing `requests_routers` to default to `application` instead of `web`. Backwards compatibility is not provided with this change.
4042
- Extension [flags](?page=documentation/flags) `hasInstallScript`, `hasRemoveScript` and `hasExportScript` have now been deprecated. Scripts now run by default and no longer require a flag.
41-
- [BlueprintExtensionLibrary](?page=documentation/$blueprint)'s `notifyNow()` and `notifyAfter()` have been deprecated.
43+
- [BlueprintExtensionLibrary](?page=documentation/$blueprint)'s `notifyNow()` and `notifyAfter()` have been deprecated.
44+
- [`export.sh`](?page=documentation/scripts)'s `$BLUEPRINT_EXPORT_DIRECTORY` environment variable has been deprecated in favor of `$BLUEPRINT_TMP`.

docs/pages/developing-extensions/Packaging-extensions.md

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,6 @@ To package an extension for distribution, we need to convert it into a `identifi
2323

2424
After running one of these commands, you'll be left with a `identifier.blueprint` file which you can in turn use to distribute your extension to the outside world.
2525

26-
<br>
27-
28-
### **Scripting**
29-
30-
Exported extensions are essentially just archives, this means your **source code** can be seen by **anyone** that aquires the `identifier.blueprint` file. To prevent this from happening, we can compress or obfuscate some files through export scripts.
31-
32-
To enable export scripts, **create a data directory** and link it to your `conf.yml`. Inside the root of your data directory, create an `export.sh` file and write your shell script in there.
33-
34-
<br>
35-
36-
When exporting extensions with custom export scripts, Blueprint automatically parses some useful variables to make your life as a developer easier. Keep in mind, however, that **placeholders do not work in export scripts** as they are applied upon installation, not when exporting.
37-
```sh
38-
$EXTENSION_IDENTIFIER # Extension identifier
39-
$EXTENSION_VERSION # Extension version
40-
$EXTENSION_TARGET # Extension target version
41-
$PTERODACTYL_DIRECTORY # Pterodactyl directory path
42-
$BLUEPRINT_EXPORT_DIRECTORY # Blueprint build directory
43-
$BLUEPRINT_VERSION # Blueprint version
44-
```
45-
46-
<br>
47-
48-
We hope you can create something that suits your needs with the export script feature, and if you don't have any use for it, at least you know that it exist.
49-
50-
5126
<div class="btn-group docs-navigator" role="group" aria-label="Navigation" style="float: right">
5227
<a href="?page=developing-extensions/React-components" class="btn btn-dark bg-light-subtle border-light-subtle">Previous</a>
5328
<button type="button" class="btn btn-dark bg-light-subtle border-light-subtle text-secondary disabled">Next</button>

docs/pages/developing-extensions/React-components.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<div class="ps-3 ms-3"><b>This section is still being written.</b> You might run into unfinished explanations, incorrect instructions, outdated or misinformation.</div>
77
</div><br/>
88

9+
### **Preparation**
10+
911
Blueprint extensions can add custom pages to Pterodactyl and content to existing pages through the [Components.yml](?page=documentation/componentsyml) feature.
1012

1113
Before we can start utilizing this feature, create a directory called `components` and assign it in your [conf.yml](?page=documentation/confyml) configuration like shown below.
@@ -16,7 +18,11 @@ dashboard:
1618
1719
Inside of that directory, create a file called `Components.yml`, which will contain our Components configuration. Inside of that file, add the example configuration from the [Components.yml](?page=documentation/componentsyml) documentation.
1820

19-
Now create a file called `ExampleComponent.tsx` and define it as a new route in your `Components.yml` configuration.
21+
<br>
22+
23+
### **Creating a custom page**
24+
25+
Create a file called `ExampleComponent.tsx` (inside of the `components` folder) and define it as a new route in your `Components.yml` configuration.
2026
```tsx
2127
// ExampleComponent.tsx
2228
import React from 'react';

docs/pages/documentation/scripts.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ Extension scripts are advanced collections of commands allowing extensions to ex
1515

1616
Scripts can **prevent extensions from being listed** on the [extension browse list](../browse) if they do not meet **all of the following requirements**:
1717
- Scripts <u>should never</u> cause conflicts with other extensions respecting these guidelines.
18+
- This means extensions are not allowed to overwrite files outside of the scope of their own extensions and must use search-and-replace instead.
1819
- Scripts must stay <u>within the Pterodactyl instance</u> and not edit anything outside of the panel's webserver folder without user consent.
1920
- Extensions must undo all of their changes when removing the extension.
2021
- Updating extensions utilizing scripts must not break their modifications.
2122
- Scripts should use **environment variables** or [placeholders](?page=documentation/placeholders) for detecting the webserver folder.
23+
- [Placeholders](?page=documentation/placeholders) are <u>not available</u> for `update.sh` and `export.sh`.
2224

2325
**Export scripts are free from (most of) these limitations** as they are specifically made to help the developer automate actions upon export. As long as you don't cause permanent damages through export scripts, you should be fine.
2426

@@ -27,42 +29,49 @@ Scripts can **prevent extensions from being listed** on the [extension browse li
2729
### **Environment variables**
2830
These variables can be used anywhere in your scripts and are automatically assigned the correct value by Blueprint.
2931

32+
##### Baseline
33+
3034
<!-- $ENGINE -->
31-
`$ENGINE`
32-
<span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">install.sh <i class="bi bi-check"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">remove.sh <i class="bi bi-check"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">export.sh <i class="bi bi-check"></i></span>\
35+
`$ENGINE`\
3336
Codename of the engine currently handling the extension.
3437

3538
<!-- $EXTENSION_IDENTIFIER -->
36-
`$EXTENSION_IDENTIFIER`
37-
<span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">install.sh <i class="bi bi-check"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">remove.sh <i class="bi bi-check"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">export.sh <i class="bi bi-check"></i></span>\
39+
`$EXTENSION_IDENTIFIER`\
3840
Provides the extension's identifier.
3941

4042
<!-- $EXTENSION_VERSION -->
41-
`$EXTENSION_VERSION`
42-
<span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">install.sh <i class="bi bi-check"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">remove.sh <i class="bi bi-check"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">export.sh <i class="bi bi-check"></i></span>\
43+
`$EXTENSION_VERSION`\
4344
Provides the extension's version.
4445

4546
<!-- $EXTENSION_TARGET -->
46-
`$EXTENSION_TARGET`
47-
<span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">install.sh <i class="bi bi-check"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">remove.sh <i class="bi bi-check"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">export.sh <i class="bi bi-check"></i></span>\
47+
`$EXTENSION_TARGET`\
4848
Provides the extension's defined target version, not to be confused with the version the extension is currently being installed on.
4949

5050
<!-- $PTERODACTYL_DIRECTORY -->
51-
`$PTERODACTYL_DIRECTORY`
52-
<span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">install.sh <i class="bi bi-check"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">remove.sh <i class="bi bi-check"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">export.sh <i class="bi bi-check"></i></span>\
51+
`$PTERODACTYL_DIRECTORY`\
5352
Path towards the Pterodactyl webserver folder, commonly `/var/www/pterodactyl`.
5453

5554
<!-- $BLUEPRINT_VERSION -->
56-
`$BLUEPRINT_VERSION`
57-
<span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">install.sh <i class="bi bi-check"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">remove.sh <i class="bi bi-check"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">export.sh <i class="bi bi-check"></i></span>\
55+
`$BLUEPRINT_VERSION`\
5856
Blueprint version currently installed on the target panel.
5957

58+
<br>
59+
60+
##### Limited availability
61+
6062
<!-- $BLUEPRINT_DEVELOPER -->
6163
`$BLUEPRINT_DEVELOPER`
62-
<span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">install.sh <i class="bi bi-check"></i></span> <span class="badge bg-secondary-subtle text-secondary-emphasis rounded-pill opacity-50">remove.sh <i class="bi bi-x"></i></span> <span class="badge bg-secondary-subtle text-secondary-emphasis rounded-pill opacity-50">export.sh <i class="bi bi-x"></i></span>\
64+
<span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">install.sh <i class="bi bi-check"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">update.sh <i class="bi bi-check"></i></span> <span class="badge bg-secondary-subtle text-secondary-emphasis rounded-pill opacity-50">remove.sh <i class="bi bi-x"></i></span> <span class="badge bg-secondary-subtle text-secondary-emphasis rounded-pill opacity-50">export.sh <i class="bi bi-x"></i></span>\
6365
Either `true` or `false` depending on if the extension was installed through developer commands.
6466

67+
<!-- $BLUEPRINT_TMP -->
68+
`$BLUEPRINT_TMP` <span class="badge bg-secondary-subtle text-secondary-emphasis rounded-pill opacity-50">install.sh <i class="bi bi-x"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">update.sh <i class="bi bi-check"></i></span> <span class="badge bg-secondary-subtle text-secondary-emphasis rounded-pill opacity-50">remove.sh <i class="bi bi-x"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">export.sh <i class="bi bi-check"></i></span>\
69+
Path towards the folder where Blueprint is either building the extension package or preparing the extension for installation depending on script type.
70+
71+
<br>
72+
73+
##### Deprecated
74+
6575
<!-- $BLUEPRINT_EXPORT_DIRECTORY -->
66-
`$BLUEPRINT_EXPORT_DIRECTORY`
67-
<span class="badge bg-secondary-subtle text-secondary-emphasis rounded-pill opacity-50">install.sh <i class="bi bi-x"></i></span> <span class="badge bg-secondary-subtle text-secondary-emphasis rounded-pill opacity-50">remove.sh <i class="bi bi-x"></i></span> <span class="badge bg-primary-subtle text-primary-emphasis rounded-pill">export.sh <i class="bi bi-check"></i></span>\
76+
~~`$BLUEPRINT_EXPORT_DIRECTORY`~~ <tag type="deprecated" content="beta-2024-11"/></tag>\
6877
Path towards the folder where Blueprint is building the extension package.

0 commit comments

Comments
 (0)