Compare commits

...

1 Commits

Author SHA1 Message Date
Eli Bosley
fe0ec82a3d feat: separate api builds 2025-03-25 14:04:20 -04:00
9 changed files with 349 additions and 41 deletions

View File

@@ -18,7 +18,9 @@
"dev": "vite",
"command": "pnpm run build && clear && ./dist/cli.js",
"// Build and Deploy": "",
"build": "vite build --mode=production",
"build": "pnpm run build:connect",
"build:connect": "CONNECT=true vite build --mode=production",
"build:api": "CONNECT=false vite build --mode=production",
"postbuild": "chmod +x dist/main.js && chmod +x dist/cli.js",
"build:watch": "nodemon --watch src --ext ts,js,json --exec 'tsx ./scripts/build.ts'",
"build:docker": "./scripts/dc.sh run --rm builder",

View File

@@ -5,20 +5,25 @@ import { exit } from 'process';
import { $, cd } from 'zx';
import { getDeploymentVersion } from './get-deployment-version.js';
import { join } from 'path';
const workingDir = join(import.meta.dirname, '..');
console.log('Working directory:', workingDir);
try {
// Create release and pack directories
await mkdir('./deploy/release', { recursive: true });
await mkdir('./deploy/pack', { recursive: true });
await mkdir(join(workingDir, 'deploy/release'), { recursive: true });
await mkdir(join(workingDir, 'deploy/pack/api'), { recursive: true });
await mkdir(join(workingDir, 'deploy/pack/connect'), { recursive: true });
// Build Generated Types
await $`pnpm run codegen`;
await $`pnpm run build`;
await $`pnpm run build:api`;
await $`pnpm run build:connect`;
// Copy app files to plugin directory
// Get package details
const packageJson = await readFile('./package.json', 'utf-8');
const packageJson = await readFile(join(workingDir, 'package.json'), 'utf-8');
const parsedPackageJson = JSON.parse(packageJson);
const deploymentVersion = await getDeploymentVersion(process.env, parsedPackageJson.version);
@@ -26,23 +31,30 @@ try {
// Update the package.json version to the deployment version
parsedPackageJson.version = deploymentVersion;
// Create a temporary directory for packaging
await mkdir('./deploy/pack/', { recursive: true });
await writeFile(join(workingDir, 'deploy/pack/api/package.json'), JSON.stringify(parsedPackageJson, null, 4));
await writeFile(join(workingDir, 'deploy/pack/connect/package.json'), JSON.stringify(parsedPackageJson, null, 4));
await writeFile('./deploy/pack/package.json', JSON.stringify(parsedPackageJson, null, 4));
// Copy necessary files to the pack directory
await $`cp -r dist README.md .env.* ecosystem.config.json ./deploy/pack/`;
await $`cp -r dist/api/ README.md .env.* ecosystem.config.json ./deploy/pack/api/`;
await $`cp -r dist/connect/ README.md .env.* ecosystem.config.json ./deploy/pack/connect/`;
// Change to the pack directory and install dependencies
cd('./deploy/pack');
cd(join(workingDir, 'deploy/pack/connect'));
console.log('Installing production dependencies...');
$.verbose = true;
await $`pnpm install --prod --ignore-workspace --node-linker hoisted`;
await $`pnpm approve-builds --all`;
cd(join(workingDir, 'deploy/pack/api'));
await $`cp -r ../connect/node_modules ./node_modules`;
// chmod the cli
await $`chmod +x ./dist/cli.js`;
await $`chmod +x ./dist/main.js`;
await $`chmod +x ${join(workingDir, 'deploy/pack/api/cli.js')} \
${join(workingDir, 'deploy/pack/api/main.js')} \
${join(workingDir, 'deploy/pack/connect/cli.js')} \
${join(workingDir, 'deploy/pack/connect/main.js')}`;
} catch (error) {
// Error with a command
if (Object.keys(error).includes('stderr')) {

View File

@@ -65,3 +65,9 @@ export const MOTHERSHIP_GRAPHQL_LINK = process.env.MOTHERSHIP_GRAPHQL_LINK
: 'https://mothership.unraid.net/ws';
export const PM2_HOME = process.env.PM2_HOME ?? join(homedir(), '.pm2');
/**
* Whether the API is running in the context of Unraid Connect
*
* When true, enables Connect specific features
*/
export const CONNECT = process.env.CONNECT;

View File

@@ -13,12 +13,7 @@ import type { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-
* Therefore it is highly recommended to use the babel or swc plugin for production.
* Learn more about it here: https://the-guild.dev/graphql/codegen/plugins/presets/preset-client#reducing-bundle-size
*/
type Documents = {
"\n mutation sendRemoteGraphQLResponse($input: RemoteGraphQLServerInput!) {\n remoteGraphQLResponse(input: $input)\n }\n": typeof types.sendRemoteGraphQLResponseDocument,
"\n fragment RemoteGraphQLEventFragment on RemoteGraphQLEvent {\n remoteGraphQLEventData: data {\n type\n body\n sha256\n }\n }\n": typeof types.RemoteGraphQLEventFragmentFragmentDoc,
"\n subscription events {\n events {\n __typename\n ... on ClientConnectedEvent {\n connectedData: data {\n type\n version\n apiKey\n }\n connectedEvent: type\n }\n ... on ClientDisconnectedEvent {\n disconnectedData: data {\n type\n version\n apiKey\n }\n disconnectedEvent: type\n }\n ...RemoteGraphQLEventFragment\n }\n }\n": typeof types.eventsDocument,
};
const documents: Documents = {
const documents = {
"\n mutation sendRemoteGraphQLResponse($input: RemoteGraphQLServerInput!) {\n remoteGraphQLResponse(input: $input)\n }\n": types.sendRemoteGraphQLResponseDocument,
"\n fragment RemoteGraphQLEventFragment on RemoteGraphQLEvent {\n remoteGraphQLEventData: data {\n type\n body\n sha256\n }\n }\n": types.RemoteGraphQLEventFragmentFragmentDoc,
"\n subscription events {\n events {\n __typename\n ... on ClientConnectedEvent {\n connectedData: data {\n type\n version\n apiKey\n }\n connectedEvent: type\n }\n ... on ClientDisconnectedEvent {\n disconnectedData: data {\n type\n version\n apiKey\n }\n disconnectedEvent: type\n }\n ...RemoteGraphQLEventFragment\n }\n }\n": types.eventsDocument,

View File

@@ -1,4 +1,5 @@
import { minigraphLogger, mothershipLogger } from '@app/core/log.js';
import { CONNECT } from '@app/environment.js';
import { useFragment } from '@app/graphql/generated/client/fragment-masking.js';
import { ClientType } from '@app/graphql/generated/client/graphql.js';
import { EVENTS_SUBSCRIPTION, RemoteGraphQL_Fragment } from '@app/graphql/mothership/subscriptions.js';
@@ -75,14 +76,18 @@ export const subscribeToEvents = async (apiKey: string) => {
};
export const setupNewMothershipSubscription = async (state = store.getState()) => {
await GraphQLClient.clearInstance();
if (getMothershipConnectionParams(state)?.apiKey) {
minigraphLogger.trace('Creating Graphql client');
const client = GraphQLClient.createSingletonInstance();
if (client) {
minigraphLogger.trace('Connecting to mothership');
await subscribeToEvents(state.config.remote.apikey);
initPingTimeoutJobs();
if (CONNECT) {
await GraphQLClient.clearInstance();
if (getMothershipConnectionParams(state)?.apiKey) {
minigraphLogger.trace('Creating Graphql client');
const client = GraphQLClient.createSingletonInstance();
if (client) {
minigraphLogger.trace('Connecting to mothership');
await subscribeToEvents(state.config.remote.apikey);
initPingTimeoutJobs();
}
}
} else {
minigraphLogger.trace('In API mode, CONNECT is false - skipping mothership subscription');
}
};

View File

@@ -3,6 +3,7 @@ import 'reflect-metadata';
import type { TypedAddListener, TypedStartListening } from '@reduxjs/toolkit';
import { addListener, createListenerMiddleware } from '@reduxjs/toolkit';
import { CONNECT } from '@app/environment.js';
import { type AppDispatch, type RootState } from '@app/store/index.js';
import { enableArrayEventListener } from '@app/store/listeners/array-event-listener.js';
import { enableConfigFileListener } from '@app/store/listeners/config-listener.js';
@@ -25,13 +26,17 @@ export const addAppListener = addListener as TypedAddListener<RootState, AppDisp
export const startMiddlewareListeners = () => {
// Begin listening for events
enableMothershipJobsListener();
if (CONNECT) {
enableMothershipJobsListener();
}
enableConfigFileListener('flash')();
enableConfigFileListener('memory')();
enableUpnpListener();
enableVersionListener();
enableDynamicRemoteAccessListener();
enableArrayEventListener();
enableWanAccessChangeListener();
enableServerStateListener();
if (CONNECT) {
enableUpnpListener();
enableDynamicRemoteAccessListener();
enableWanAccessChangeListener();
}
};

View File

@@ -12,6 +12,7 @@ import type {
} from '@app/graphql/generated/api/types.js';
import type { DataSlice, SettingSlice, UIElement } from '@app/unraid-api/types/json-forms.js';
import { fileExistsSync } from '@app/core/utils/files/file-exists.js';
import { CONNECT } from '@app/environment.js';
import {
DynamicRemoteAccessType,
WAN_ACCESS_TYPE,
@@ -147,16 +148,16 @@ export class ConnectSettingsService {
* Builds the complete settings schema
*/
async buildSettingsSchema(): Promise<SettingSlice> {
const slices = [
await this.remoteAccessSlice(),
await this.sandboxSlice(),
this.flashBackupSlice(),
// Because CORS is effectively disabled, this setting is no longer necessary
// keeping it here for in case it needs to be re-enabled
//
// this.extraOriginsSlice(),
];
const slices: SettingSlice[] = [];
if (CONNECT) {
slices.push(await this.remoteAccessSlice());
slices.push(this.flashBackupSlice());
}
slices.push(await this.sandboxSlice());
// Because CORS is effectively disabled, this setting is no longer necessary
// keeping it here for in case it needs to be re-enabled
//
// this.extraOriginsSlice(),
return mergeSettingSlices(slices);
}

View File

@@ -7,6 +7,7 @@ import { VitePluginNode } from 'vite-plugin-node';
import tsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
const isConnect = process.env.CONNECT === 'true';
export default defineConfig(({ mode }): ViteUserConfig => {
return {
assetsInclude: ['src/**/*.graphql', 'src/**/*.patch'],
@@ -58,6 +59,7 @@ export default defineConfig(({ mode }): ViteUserConfig => {
define: {
// Allows vite to preserve process.env variables and not hardcode them
'process.env': 'process.env',
'process.env.CONNECT': isConnect,
},
optimizeDeps: {
exclude: [
@@ -80,7 +82,7 @@ export default defineConfig(({ mode }): ViteUserConfig => {
build: {
ssr: true,
sourcemap: false,
outDir: 'dist',
outDir: isConnect ? 'dist/connect/' : 'dist/api/',
rollupOptions: {
input: {
main: 'src/index.ts',

View File

@@ -2126,3 +2126,283 @@ fi
( cd usr/local/unraid-api/node_modules/@pm2/io/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
( cd usr/local/unraid-api/node_modules/request/node_modules/.bin ; rm -rf uuid )
( cd usr/local/unraid-api/node_modules/request/node_modules/.bin ; ln -sf ../uuid/bin/uuid uuid )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf apollo-pbjs )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@apollo/protobufjs/bin/pbjs apollo-pbjs )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf apollo-pbts )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@apollo/protobufjs/bin/pbts apollo-pbts )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf blessed )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../blessed/bin/tput.js blessed )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf esbuild )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../esbuild/bin/esbuild esbuild )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf escodegen )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../escodegen/bin/escodegen.js escodegen )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf esgenerate )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../escodegen/bin/esgenerate.js esgenerate )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf esparse )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../esprima/bin/esparse.js esparse )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf esvalidate )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../esprima/bin/esvalidate.js esvalidate )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf fxparser )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../fast-xml-parser/src/cli/cli.js fxparser )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf glob )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../glob/dist/esm/bin.mjs glob )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf js-yaml )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../js-yaml/bin/js-yaml.js js-yaml )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf jsesc )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../jsesc/bin/jsesc jsesc )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf loose-envify )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../loose-envify/cli.js loose-envify )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf mime )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../mime/cli.js mime )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf mkdirp )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../mkdirp/bin/cmd.js mkdirp )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf mustache )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../mustache/bin/mustache mustache )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf needle )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../needle/bin/needle needle )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf node-which )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../which/bin/node-which node-which )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf opencollective )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@nuxt/opencollective/bin/opencollective.js opencollective )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf parser )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@babel/parser/bin/babel-parser.js parser )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pino )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pino/bin.js pino )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pino-pretty )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pino-pretty/bin.js pino-pretty )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pm2 )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pm2/bin/pm2 pm2 )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pm2-dev )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pm2/bin/pm2-dev pm2-dev )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pm2-docker )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pm2/bin/pm2-docker pm2-docker )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pm2-runtime )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pm2/bin/pm2-runtime pm2-runtime )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf prettier )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../prettier/bin/prettier.cjs prettier )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf relay-compiler )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@ardatan/relay-compiler/bin/relay-compiler relay-compiler )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf resolve )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../resolve/bin/resolve resolve )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf semver )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf sha.js )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../sha.js/bin.js sha.js )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf sshpk-conv )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-conv sshpk-conv )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf sshpk-sign )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-sign sshpk-sign )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf sshpk-verify )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-verify sshpk-verify )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf systeminformation )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../systeminformation/lib/cli.js systeminformation )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf tsc )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../typescript/bin/tsc tsc )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf tsserver )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../typescript/bin/tsserver tsserver )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf tsx )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../tsx/dist/cli.mjs tsx )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf ua-parser-js )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../ua-parser-js/script/cli.js ua-parser-js )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf uuid )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../uuid/dist/esm/bin/uuid uuid )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf xss )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../xss/bin/xss xss )
( cd usr/local/unraid-api/connect/node_modules/@apollo/protobufjs/node_modules/.bin ; rm -rf apollo-pbjs )
( cd usr/local/unraid-api/connect/node_modules/@apollo/protobufjs/node_modules/.bin ; ln -sf ../../bin/pbjs apollo-pbjs )
( cd usr/local/unraid-api/connect/node_modules/@apollo/protobufjs/node_modules/.bin ; rm -rf apollo-pbts )
( cd usr/local/unraid-api/connect/node_modules/@apollo/protobufjs/node_modules/.bin ; ln -sf ../../bin/pbts apollo-pbts )
( cd usr/local/unraid-api/connect/node_modules/@apollo/server/node_modules/.bin ; rm -rf uuid )
( cd usr/local/unraid-api/connect/node_modules/@apollo/server/node_modules/.bin ; ln -sf ../uuid/dist/bin/uuid uuid )
( cd usr/local/unraid-api/connect/node_modules/@nestjs/core/node_modules/.bin ; rm -rf opencollective )
( cd usr/local/unraid-api/connect/node_modules/@nestjs/core/node_modules/.bin ; ln -sf ../../../../@nuxt/opencollective/bin/opencollective.js opencollective )
( cd usr/local/unraid-api/connect/node_modules/@pm2/agent/node_modules/.bin ; rm -rf semver )
( cd usr/local/unraid-api/connect/node_modules/@pm2/agent/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
( cd usr/local/unraid-api/connect/node_modules/@pm2/io/node_modules/.bin ; rm -rf semver )
( cd usr/local/unraid-api/connect/node_modules/@pm2/io/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
( cd usr/local/unraid-api/connect/node_modules/esbuild/node_modules/.bin ; rm -rf esbuild )
( cd usr/local/unraid-api/connect/node_modules/esbuild/node_modules/.bin ; ln -sf ../../bin/esbuild esbuild )
( cd usr/local/unraid-api/connect/node_modules/nestjs-pino/node_modules/.bin ; rm -rf pino )
( cd usr/local/unraid-api/connect/node_modules/nestjs-pino/node_modules/.bin ; ln -sf ../../../pino/bin.js pino )
( cd usr/local/unraid-api/connect/node_modules/request/node_modules/.bin ; rm -rf uuid )
( cd usr/local/unraid-api/connect/node_modules/request/node_modules/.bin ; ln -sf ../uuid/bin/uuid uuid )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf apollo-pbjs )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@apollo/protobufjs/bin/pbjs apollo-pbjs )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf apollo-pbts )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@apollo/protobufjs/bin/pbts apollo-pbts )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf blessed )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../blessed/bin/tput.js blessed )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf esbuild )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../esbuild/bin/esbuild esbuild )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf escodegen )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../escodegen/bin/escodegen.js escodegen )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf esgenerate )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../escodegen/bin/esgenerate.js esgenerate )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf esparse )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../esprima/bin/esparse.js esparse )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf esvalidate )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../esprima/bin/esvalidate.js esvalidate )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf fxparser )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../fast-xml-parser/src/cli/cli.js fxparser )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf glob )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../glob/dist/esm/bin.mjs glob )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf js-yaml )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../js-yaml/bin/js-yaml.js js-yaml )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf jsesc )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../jsesc/bin/jsesc jsesc )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf loose-envify )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../loose-envify/cli.js loose-envify )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf mime )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../mime/cli.js mime )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf mkdirp )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../mkdirp/bin/cmd.js mkdirp )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf mustache )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../mustache/bin/mustache mustache )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf needle )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../needle/bin/needle needle )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf node-which )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../which/bin/node-which node-which )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf opencollective )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@nuxt/opencollective/bin/opencollective.js opencollective )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf parser )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@babel/parser/bin/babel-parser.js parser )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pino )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pino/bin.js pino )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pino-pretty )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pino-pretty/bin.js pino-pretty )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pm2 )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pm2/bin/pm2 pm2 )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pm2-dev )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pm2/bin/pm2-dev pm2-dev )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pm2-docker )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pm2/bin/pm2-docker pm2-docker )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pm2-runtime )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pm2/bin/pm2-runtime pm2-runtime )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf prettier )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../prettier/bin/prettier.cjs prettier )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf relay-compiler )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@ardatan/relay-compiler/bin/relay-compiler relay-compiler )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf resolve )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../resolve/bin/resolve resolve )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf semver )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf sha.js )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../sha.js/bin.js sha.js )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf sshpk-conv )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-conv sshpk-conv )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf sshpk-sign )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-sign sshpk-sign )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf sshpk-verify )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-verify sshpk-verify )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf systeminformation )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../systeminformation/lib/cli.js systeminformation )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf tsc )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../typescript/bin/tsc tsc )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf tsserver )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../typescript/bin/tsserver tsserver )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf tsx )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../tsx/dist/cli.mjs tsx )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf ua-parser-js )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../ua-parser-js/script/cli.js ua-parser-js )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf uuid )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../uuid/dist/esm/bin/uuid uuid )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf xss )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../xss/bin/xss xss )
( cd usr/local/unraid-api/connect/node_modules/@apollo/server/node_modules/.bin ; rm -rf uuid )
( cd usr/local/unraid-api/connect/node_modules/@apollo/server/node_modules/.bin ; ln -sf ../uuid/dist/bin/uuid uuid )
( cd usr/local/unraid-api/connect/node_modules/@pm2/agent/node_modules/.bin ; rm -rf semver )
( cd usr/local/unraid-api/connect/node_modules/@pm2/agent/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
( cd usr/local/unraid-api/connect/node_modules/@pm2/io/node_modules/.bin ; rm -rf semver )
( cd usr/local/unraid-api/connect/node_modules/@pm2/io/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
( cd usr/local/unraid-api/connect/node_modules/request/node_modules/.bin ; rm -rf uuid )
( cd usr/local/unraid-api/connect/node_modules/request/node_modules/.bin ; ln -sf ../uuid/bin/uuid uuid )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf apollo-pbjs )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@apollo/protobufjs/bin/pbjs apollo-pbjs )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf apollo-pbts )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@apollo/protobufjs/bin/pbts apollo-pbts )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf blessed )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../blessed/bin/tput.js blessed )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf esbuild )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../esbuild/bin/esbuild esbuild )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf escodegen )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../escodegen/bin/escodegen.js escodegen )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf esgenerate )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../escodegen/bin/esgenerate.js esgenerate )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf esparse )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../esprima/bin/esparse.js esparse )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf esvalidate )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../esprima/bin/esvalidate.js esvalidate )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf fxparser )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../fast-xml-parser/src/cli/cli.js fxparser )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf glob )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../glob/dist/esm/bin.mjs glob )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf js-yaml )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../js-yaml/bin/js-yaml.js js-yaml )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf jsesc )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../jsesc/bin/jsesc jsesc )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf loose-envify )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../loose-envify/cli.js loose-envify )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf mime )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../mime/cli.js mime )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf mkdirp )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../mkdirp/bin/cmd.js mkdirp )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf mustache )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../mustache/bin/mustache mustache )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf needle )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../needle/bin/needle needle )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf node-which )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../which/bin/node-which node-which )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf opencollective )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@nuxt/opencollective/bin/opencollective.js opencollective )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf parser )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@babel/parser/bin/babel-parser.js parser )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pino )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pino/bin.js pino )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pino-pretty )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pino-pretty/bin.js pino-pretty )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pm2 )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pm2/bin/pm2 pm2 )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pm2-dev )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pm2/bin/pm2-dev pm2-dev )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pm2-docker )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pm2/bin/pm2-docker pm2-docker )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf pm2-runtime )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../pm2/bin/pm2-runtime pm2-runtime )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf prettier )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../prettier/bin/prettier.cjs prettier )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf relay-compiler )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../@ardatan/relay-compiler/bin/relay-compiler relay-compiler )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf resolve )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../resolve/bin/resolve resolve )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf semver )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf sha.js )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../sha.js/bin.js sha.js )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf sshpk-conv )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-conv sshpk-conv )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf sshpk-sign )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-sign sshpk-sign )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf sshpk-verify )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../sshpk/bin/sshpk-verify sshpk-verify )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf systeminformation )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../systeminformation/lib/cli.js systeminformation )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf tsc )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../typescript/bin/tsc tsc )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf tsserver )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../typescript/bin/tsserver tsserver )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf tsx )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../tsx/dist/cli.mjs tsx )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf ua-parser-js )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../ua-parser-js/script/cli.js ua-parser-js )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf uuid )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../uuid/dist/esm/bin/uuid uuid )
( cd usr/local/unraid-api/connect/node_modules/.bin ; rm -rf xss )
( cd usr/local/unraid-api/connect/node_modules/.bin ; ln -sf ../xss/bin/xss xss )
( cd usr/local/unraid-api/connect/node_modules/@apollo/server/node_modules/.bin ; rm -rf uuid )
( cd usr/local/unraid-api/connect/node_modules/@apollo/server/node_modules/.bin ; ln -sf ../uuid/dist/bin/uuid uuid )
( cd usr/local/unraid-api/connect/node_modules/@pm2/agent/node_modules/.bin ; rm -rf semver )
( cd usr/local/unraid-api/connect/node_modules/@pm2/agent/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
( cd usr/local/unraid-api/connect/node_modules/@pm2/io/node_modules/.bin ; rm -rf semver )
( cd usr/local/unraid-api/connect/node_modules/@pm2/io/node_modules/.bin ; ln -sf ../semver/bin/semver.js semver )
( cd usr/local/unraid-api/connect/node_modules/request/node_modules/.bin ; rm -rf uuid )
( cd usr/local/unraid-api/connect/node_modules/request/node_modules/.bin ; ln -sf ../uuid/bin/uuid uuid )