Skip to content

Commit c2c6ff3

Browse files
committed
remove separate vendoring of node_modules
1 parent 3392f08 commit c2c6ff3

File tree

7 files changed

+3
-24
lines changed

7 files changed

+3
-24
lines changed

.github/workflows/build-plugin.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,6 @@ jobs:
100100
with:
101101
name: unraid-api
102102
path: ${{ github.workspace }}/plugin/api/
103-
- name: Download PNPM Store
104-
uses: actions/download-artifact@v4
105-
with:
106-
name: packed-node-modules
107-
path: ${{ github.workspace }}/plugin/node-modules-archive/
108103
- name: Extract Unraid API
109104
run: |
110105
mkdir -p ${{ github.workspace }}/plugin/source/dynamix.unraid.net/usr/local/unraid-api

.github/workflows/main.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,6 @@ jobs:
185185
with:
186186
name: unraid-api
187187
path: ${{ github.workspace }}/api/deploy/unraid-api.tgz
188-
- name: Upload Node Modules to Github artifacts
189-
uses: actions/upload-artifact@v4
190-
with:
191-
name: packed-node-modules
192-
path: ${{ github.workspace }}/api/deploy/node-modules-archive/packed-node-modules.tar.xz
193188

194189
build-unraid-ui-webcomponents:
195190
name: Build Unraid UI Library (Webcomponent Version)

api/scripts/build.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,6 @@ try {
120120
}
121121
}
122122

123-
const compressionLevel = process.env.WATCH_MODE ? '-1' : '-5';
124-
await $`XZ_OPT=${compressionLevel} tar -cJf packed-node-modules.tar.xz node_modules`;
125-
// Create a subdirectory for the node modules archive
126-
await mkdir('../node-modules-archive', { recursive: true });
127-
await $`mv packed-node-modules.tar.xz ../node-modules-archive/`;
128-
// await $`rm -rf node_modules`;
129-
130123
// Clean the release directory
131124
await $`rm -rf ../release/*`;
132125

plugin/builder/build-plugin.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { $ } from "zx";
33
import { escape as escapeHtml } from "html-sloppy-escaper";
44
import { dirname, join } from "node:path";
55
import { getTxzName, pluginName, startingDir, defaultArch, defaultBuild } from "./utils/consts";
6-
import { getAssetUrl, getPluginUrl } from "./utils/bucket-urls";
6+
import { getPluginUrl } from "./utils/bucket-urls";
77
import { getMainTxzUrl } from "./utils/bucket-urls";
88
import {
99
deployDir,
@@ -12,7 +12,7 @@ import {
1212
} from "./utils/paths";
1313
import { PluginEnv, setupPluginEnv } from "./cli/setup-plugin-environment";
1414
import { cleanupPluginFiles } from "./utils/cleanup";
15-
import { bundleVendorStore, getVendorBundleName } from "./build-vendor-store";
15+
import { getVendorBundleName } from "./build-vendor-store";
1616

1717
/**
1818
* Check if git is available
@@ -123,7 +123,6 @@ const main = async () => {
123123

124124
await buildPlugin(validatedEnv);
125125
await moveTxzFile(validatedEnv);
126-
await bundleVendorStore(validatedEnv.apiVersion);
127126
} catch (error) {
128127
console.error(error);
129128
process.exit(1);

plugin/builder/build-vendor-store.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ async function createNodeModulesTarball(outputPath: string): Promise<void> {
5454
* After this operation, the vendored node_modules will be available inside the `deployDir`.
5555
*
5656
* @param apiVersion Required API version to use for the vendor bundle
57+
* @deprecated vendored node_modules are now included in the API slackware package
5758
*/
5859
export async function bundleVendorStore(apiVersion: string): Promise<void> {
5960
// Ensure deploy directory exists

plugin/docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ services:
1414
- ../unraid-ui/dist-wc:/app/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components/uui
1515
- ../web/.nuxt/nuxt-custom-elements/dist/unraid-components:/app/source/dynamix.unraid.net/usr/local/emhttp/plugins/dynamix.my.servers/unraid-components/nuxt
1616
- ../api/deploy/release/:/app/source/dynamix.unraid.net/usr/local/unraid-api # Use the release dir instead of pack to allow watcher to not try to build with node_modules
17-
- ../api/deploy/node-modules-archive:/app/node-modules-archive
1817
stdin_open: true # equivalent to -i
1918
tty: true # equivalent to -t
2019
environment:

plugin/plugins/dynamix.unraid.net.plg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
<!ENTITY txz_sha256 "">
1010
<!ENTITY txz_url "">
1111
<!ENTITY txz_name "">
12-
<!ENTITY vendor_store_url "">
13-
<!ENTITY vendor_store_filename "">
1412
<!ENTITY arch "x86_64">
1513
<!ENTITY build "1">
1614
<!ENTITY tag "">
@@ -219,7 +217,6 @@ exit 0
219217
PKG_FILE="&source;" # Full path to the package file including .txz extension
220218
PKG_URL="&txz_url;" # URL where package was downloaded from
221219
PKG_NAME="&txz_name;" # Name of the package file
222-
VENDOR_ARCHIVE="/boot/config/plugins/dynamix.my.servers/&vendor_store_filename;"
223220
<![CDATA[
224221
# Install the Slackware package
225222
echo "Installing package..."

0 commit comments

Comments
 (0)