Files
api/web
renovate[bot] 9cad1a9454 fix(deps): update dependency graphql-ws to v6 (#1210)
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [graphql-ws](https://the-guild.dev/graphql/ws)
([source](https://redirect.github.com/enisdenjo/graphql-ws)) |
[`^5.16.0` ->
`^6.0.0`](https://renovatebot.com/diffs/npm/graphql-ws/5.16.2/6.0.4) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/graphql-ws/6.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/graphql-ws/6.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/graphql-ws/5.16.2/6.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/graphql-ws/5.16.2/6.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>enisdenjo/graphql-ws (graphql-ws)</summary>

###
[`v6.0.4`](https://redirect.github.com/enisdenjo/graphql-ws/blob/HEAD/CHANGELOG.md#604)

[Compare
Source](https://redirect.github.com/enisdenjo/graphql-ws/compare/v6.0.3...v6.0.4)

##### Patch Changes

-
[#&#8203;625](https://redirect.github.com/enisdenjo/graphql-ws/pull/625)
[`b4a656d`](https://redirect.github.com/enisdenjo/graphql-ws/commit/b4a656d585827f4e6888eadac1e824c7dcb4ffd0)
Thanks [@&#8203;HermanBilous](https://redirect.github.com/HermanBilous)!
- Use Math.pow for retry delay calculation

###
[`v6.0.3`](https://redirect.github.com/enisdenjo/graphql-ws/blob/HEAD/CHANGELOG.md#603)

[Compare
Source](https://redirect.github.com/enisdenjo/graphql-ws/compare/v6.0.2...v6.0.3)

##### Patch Changes

-
[`747c01c`](https://redirect.github.com/enisdenjo/graphql-ws/commit/747c01c73e9ca547edcbd17c8df2df3a98e8dbea)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
Drop `ExecutionPatchResult` and `FormattedExecutionPatchResult` types

Neither of the types are officially supported (yet) and the future
versions of graphql-js adding support for stream/defer will a different
signature for the incremental execution result.

###
[`v6.0.2`](https://redirect.github.com/enisdenjo/graphql-ws/blob/HEAD/CHANGELOG.md#602)

[Compare
Source](https://redirect.github.com/enisdenjo/graphql-ws/compare/v6.0.1...v6.0.2)

##### Patch Changes

-
[#&#8203;621](https://redirect.github.com/enisdenjo/graphql-ws/pull/621)
[`6b180e8`](https://redirect.github.com/enisdenjo/graphql-ws/commit/6b180e8fc291aaada4df8906ba90ed333709513a)
Thanks [@&#8203;pleunv](https://redirect.github.com/pleunv)! -
FormattedExecutionResult errors field returns GraphQLFormattedError

###
[`v6.0.1`](https://redirect.github.com/enisdenjo/graphql-ws/blob/HEAD/CHANGELOG.md#601)

[Compare
Source](https://redirect.github.com/enisdenjo/graphql-ws/compare/v6.0.0...v6.0.1)

##### Patch Changes

-
[#&#8203;618](https://redirect.github.com/enisdenjo/graphql-ws/pull/618)
[`6be34c7`](https://redirect.github.com/enisdenjo/graphql-ws/commit/6be34c7969d1dbf262f589c8812ff31bd8571c8f)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
Remove exports for CommonJS for Deno exports in package.json

[Deno supports ECMAScript modules
exclusively.](https://docs.deno.com/runtime/fundamentals/modules/)

-
[#&#8203;618](https://redirect.github.com/enisdenjo/graphql-ws/pull/618)
[`6be34c7`](https://redirect.github.com/enisdenjo/graphql-ws/commit/6be34c7969d1dbf262f589c8812ff31bd8571c8f)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
Define exports for CommonJS TypeScript definitions in package.json

###
[`v6.0.0`](https://redirect.github.com/enisdenjo/graphql-ws/blob/HEAD/CHANGELOG.md#600)

[Compare
Source](https://redirect.github.com/enisdenjo/graphql-ws/compare/v5.16.2...v6.0.0)

##### Major Changes

-
[`b668b30`](https://redirect.github.com/enisdenjo/graphql-ws/commit/b668b304a8a49833c33470ae2ecaaec0e1fea466)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
[@&#8203;fastify/websocket](https://redirect.github.com/fastify/websocket)
WebSocket in the context extra has been renamed from `connection` to
`socket`

##### Migrating from v5 to v6

```diff
import { makeHandler } from 'graphql-ws/use/@&#8203;fastify/websocket';

makeHandler({
  schema(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  context(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onConnect(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onDisconnect(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onClose(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onSubscribe(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onOperation(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onError(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onNext(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
  onComplete(ctx) {
-   const websocket = ctx.connection;
+   const websocket = ctx.socket;
  },
});
```

-
[#&#8203;613](https://redirect.github.com/enisdenjo/graphql-ws/pull/613)
[`3f11aba`](https://redirect.github.com/enisdenjo/graphql-ws/commit/3f11aba49582e18e6c0608d75fd4b784fde11422)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
Drop support for `ws` v7

    `ws` v7 has been deprecated. Please upgrade and use v8.

-
[#&#8203;613](https://redirect.github.com/enisdenjo/graphql-ws/pull/613)
[`3f11aba`](https://redirect.github.com/enisdenjo/graphql-ws/commit/3f11aba49582e18e6c0608d75fd4b784fde11422)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
Drop support for deprecated `fastify-websocket`

[`fastify-websocket` has been deprecated since
v4.3.0.](https://www.npmjs.com/package/fastify-websocket). Please
upgrade and use
[`@fastify/websocket`](https://redirect.github.com/fastify/fastify-websocket).

-
[#&#8203;613](https://redirect.github.com/enisdenjo/graphql-ws/pull/613)
[`3f11aba`](https://redirect.github.com/enisdenjo/graphql-ws/commit/3f11aba49582e18e6c0608d75fd4b784fde11422)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! - The
`/lib/` part from imports has been removed, for example
`graphql-ws/lib/use/ws` becomes `graphql-ws/use/ws`

##### Migrating from v5 to v6

Simply remove the `/lib/` part from your graphql-ws imports that use a
handler.

##### ws

```diff
- import { useServer } from 'graphql-ws/lib/use/ws';
+ import { useServer } from 'graphql-ws/use/ws';
```

##### uWebSockets.js

```diff
- import { makeBehavior } from 'graphql-ws/lib/use/uWebSockets';
+ import { makeBehavior } from 'graphql-ws/use/uWebSockets';
```

#####
[@&#8203;fastify/websocket](https://redirect.github.com/fastify/websocket)

```diff
- import { makeHandler } from 'graphql-ws/lib/use/@&#8203;fastify/websocket';
+ import { makeHandler } from 'graphql-ws/use/@&#8203;fastify/websocket';
```

##### Bun

```diff
- import { handleProtocols, makeHandler } from 'graphql-ws/lib/use/bun';
+ import { handleProtocols, makeHandler } from 'graphql-ws/use/bun';
```

##### Deno

```diff
- import { makeHandler } from 'https://esm.sh/graphql-ws/lib/use/deno';
+ import { makeHandler } from 'https://esm.sh/graphql-ws/use/deno';
```

-
[#&#8203;613](https://redirect.github.com/enisdenjo/graphql-ws/pull/613)
[`3f11aba`](https://redirect.github.com/enisdenjo/graphql-ws/commit/3f11aba49582e18e6c0608d75fd4b784fde11422)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
`ErrorMessage` uses and `onError` returns `GraphQLFormattedError`
(instead of `GraphQLError`)

Thanks [@&#8203;benjie](https://redirect.github.com/benjie) for working
on this in
[#&#8203;599](https://redirect.github.com/enisdenjo/graphql-ws/issues/599)

-
[#&#8203;613](https://redirect.github.com/enisdenjo/graphql-ws/pull/613)
[`3f11aba`](https://redirect.github.com/enisdenjo/graphql-ws/commit/3f11aba49582e18e6c0608d75fd4b784fde11422)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
Least supported Node version is v20

Node v10 has been deprecated for years now. There is no reason to
support it. Bumping the engine to the current LTS (v20) also allows the
code to be leaner and use less polyfills.

-
[#&#8203;613](https://redirect.github.com/enisdenjo/graphql-ws/pull/613)
[`3f11aba`](https://redirect.github.com/enisdenjo/graphql-ws/commit/3f11aba49582e18e6c0608d75fd4b784fde11422)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
Least supported `graphql` peer dependency is ^15.10.1 and ^16

Users are advised to use the latest of `graphql` because of various
improvements in performance and security.

-
[#&#8203;613](https://redirect.github.com/enisdenjo/graphql-ws/pull/613)
[`3f11aba`](https://redirect.github.com/enisdenjo/graphql-ws/commit/3f11aba49582e18e6c0608d75fd4b784fde11422)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
`NextMessage` uses and `onNext` returns `FormattedExecutionResult`
(instead of `ExecutionResult`)

-
[#&#8203;613](https://redirect.github.com/enisdenjo/graphql-ws/pull/613)
[`3f11aba`](https://redirect.github.com/enisdenjo/graphql-ws/commit/3f11aba49582e18e6c0608d75fd4b784fde11422)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
`schema`, `context`, `onSubscribe`, `onOperation`, `onError`, `onNext`
and `onComplete` hooks don't have the full accompanying message anymore,
only the ID and the relevant part from the message

There is really no need to pass the full `SubscribeMessage` to the
`onSubscribe` hook. The only relevant parts from the message are the
`id` and the `payload`, the `type` is useless since the hook inherently
has it (`onNext` is `next` type, `onError` is `error` type, etc).

The actual techincal reason for not having the full message is to avoid
serialising results and errors twice. Both `onNext` and `onError` allow
the user to augment the result and return it to be used instead.
`onNext` originally had the `NextMessage` argument which already has the
`FormattedExecutionResult`, and `onError` originally had the
`ErrorMessage` argument which already has the `GraphQLFormattedError`,
and they both also returned `FormattedExecutionResult` and
`GraphQLFormattedError` respectivelly - meaning, if the user serialised
the results - the serialisation would happen **twice**.

Additionally, the `onOperation`, `onError`, `onNext` and `onComplete`
now have the `payload` which is the `SubscribeMessage.payload`
(`SubscribePayload`) for easier access to the original query as well as
execution params extensions.

##### Migrating from v5 to v6

##### `schema`

```diff
import { ExecutionArgs } from 'graphql';
import { ServerOptions, SubscribePayload } from 'graphql-ws';

const opts: ServerOptions = {
- schema(ctx, message, argsWithoutSchema: Omit<ExecutionArgs, 'schema'>) {
-   const messageId = message.id;
-   const messagePayload: SubscribePayload = message.payload;
- },
+ schema(ctx, id, payload) {
+   const messageId = id;
+   const messagePayload: SubscribePayload = payload;
+ },
};
```

##### `context`

```diff
import { ExecutionArgs } from 'graphql';
import { ServerOptions, SubscribePayload } from 'graphql-ws';

const opts: ServerOptions = {
- context(ctx, message, args: ExecutionArgs) {
-   const messageId = message.id;
-   const messagePayload: SubscribePayload = message.payload;
- },
+ context(ctx, id, payload, args: ExecutionArgs) {
+   const messageId = id;
+   const messagePayload: SubscribePayload = payload;
+ },
};
```

##### `onSubscribe`

```diff
import { ServerOptions, SubscribePayload } from 'graphql-ws';

const opts: ServerOptions = {
- onSubscribe(ctx, message) {
-   const messageId = message.id;
-   const messagePayload: SubscribePayload = message.payload;
- },
+ onSubscribe(ctx, id, payload) {
+   const messageId = id;
+   const messagePayload: SubscribePayload = payload;
+ },
};
```

##### `onOperation`

The `SubscribeMessage.payload` is not useful here at all, the `payload`
has been parsed to ready-to-use graphql execution args and should be
used instead.

```diff
import { ExecutionArgs } from 'graphql';
import { ServerOptions, SubscribePayload, OperationResult } from 'graphql-ws';

const opts: ServerOptions = {
- onOperation(ctx, message, args: ExecutionArgs, result: OperationResult) {
-   const messageId = message.id;
-   const messagePayload: SubscribePayload = message.payload;
- },
+ onOperation(ctx, id, payload, args: ExecutionArgs, result: OperationResult) {
+   const messageId = id;
+   const messagePayload: SubscribePayload = payload;
+ },
};
```

##### `onError`

The `ErrorMessage.payload` (`GraphQLFormattedError[]`) is not useful
here at all, the user has access to `GraphQLError[]` that are true
instances of the error containing object references to `originalError`s
and other properties. The user can always convert and return
`GraphQLFormattedError[]` by using the `.toJSON()` method.

```diff
import { GraphQLError, GraphQLFormattedError } from 'graphql';
import { ServerOptions, SubscribePayload } from 'graphql-ws';

const opts: ServerOptions = {
- onError(ctx, message, errors) {
-   const messageId = message.id;
-   const graphqlErrors: readonly GraphQLError[] = errors;
-   const errorMessagePayload: readonly GraphQLFormattedError[] = message.payload;
- },
+ onError(ctx, id, payload, errors) {
+   const messageId = id;
+   const graphqlErrors: readonly GraphQLError[] = errors;
+   const subscribeMessagePayload: SubscribePayload = payload;
+   const errorMessagePayload: readonly GraphQLFormattedError[] = errors.map((e) => e.toJSON());
+ },
};
```

##### `onNext`

The `NextMessage.payload` (`FormattedExecutionResult`) is not useful
here at all, the user has access to `ExecutionResult` that contains
actual object references to error instances. The user can always convert
and return `FormattedExecutionResult` by serialising the errors with
`GraphQLError.toJSON()` method.

```diff
import { ExecutionArgs, ExecutionResult, FormattedExecutionResult } from 'graphql';
import { ServerOptions, SubscribePayload } from 'graphql-ws';

const opts: ServerOptions = {
- onNext(ctx, message, args: ExecutionArgs, result: ExecutionResult) {
-   const messageId = message.id;
-   const nextMessagePayload: FormattedExecutionResult = message.payload;
- },
+ onNext(ctx, id, payload, args: ExecutionArgs, result: ExecutionResult) {
+   const messageId = id;
+   const subscribeMessagePayload: SubscribePayload = payload;
+   const nextMessagePayload: FormattedExecutionResult = { ...result, errors: result.errors?.map((e) => e.toJSON()) };
+ },
};
```

##### `onComplete`

```diff
import { ServerOptions, SubscribePayload } from 'graphql-ws';

const opts: ServerOptions = {
- onComplete(ctx, message) {
-   const messageId = message.id;
- },
+ onComplete(ctx, id, payload) {
+   const messageId = id;
+   const subscribeMessagePayload: SubscribePayload = payload;
+ },
};
```

-
[#&#8203;613](https://redirect.github.com/enisdenjo/graphql-ws/pull/613)
[`3f11aba`](https://redirect.github.com/enisdenjo/graphql-ws/commit/3f11aba49582e18e6c0608d75fd4b784fde11422)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
Errors thrown from subscription iterables will be caught and reported
through the `ErrorMessage`

Compared to the behaviour before, which terminated the whole WebSocket
connection - those errors are now gracefully reported and terminate only
the specific subscription that threw the error.

There's been [an editorial change in the GraphQL Spec suggesting this
being the correct
approach](https://redirect.github.com/graphql/graphql-spec/pull/1099).

Also, if you'd like to get involved and ideally drop your opinion about
whether iterable errors should be reported as errors or
`ExecutionResult`s with `errors` field set, [please read more
here](https://redirect.github.com/graphql/graphql-spec/pull/1127).

##### Migrating from v5 to v6

If you had used the suggested "ws server usage with custom subscribe
method that gracefully handles thrown errors" recipe, you can simply
remove it since this behaviour is now baked in.

```diff
import { subscribe } from 'graphql';
import { useServer } from 'graphql-ws/use/ws';
import { WebSocketServer } from 'ws'; // yarn add ws

const wsServer = new WebSocketServer({
  port: 4000,
  path: '/graphql',
});

useServer(
  {
    schema,
-   async subscribe(...args) {
-     const result = await subscribe(...args);
-     if ('next' in result) {
-       // is an async iterable, augment the next method to handle thrown errors
-       const originalNext = result.next;
-       result.next = async () => {
-         try {
-           return await originalNext();
-         } catch (err) {
-           // gracefully handle the error thrown from the next method
-           return { value: { errors: [err] } };
-         }
-       };
-     }
-     return result;
-   },
  },
  wsServer,
);
```

-
[#&#8203;613](https://redirect.github.com/enisdenjo/graphql-ws/pull/613)
[`3f11aba`](https://redirect.github.com/enisdenjo/graphql-ws/commit/3f11aba49582e18e6c0608d75fd4b784fde11422)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
Remove deprecated `isMessage`, use `validateMessage` instead

##### Migrating from v5 to v6

Replace all ocurrances of `isMessage` with `validateMessage`. Note that
`validateMessage` throws if the message is not valid, compared with
`isMessage` that simply returned true/false.

```diff
- import { isMessage } from 'graphql-ws';
+ import { validateMessage } from 'graphql-ws';

function isGraphQLWSMessage(val) {
- return isMessage(val);
+ try {
+   validateMessage(val);
+   return true;
+ } catch {
+   return false;
+ }
}
```

-
[#&#8203;613](https://redirect.github.com/enisdenjo/graphql-ws/pull/613)
[`3f11aba`](https://redirect.github.com/enisdenjo/graphql-ws/commit/3f11aba49582e18e6c0608d75fd4b784fde11422)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
Removed deprecated `isFatalConnectionProblem`, use `shouldRetry` instead

##### Migrating from v5 to v6

Replace all ocurrances of `isFatalConnectionProblem` with `shouldRetry`.
Note that the result is inverted, where you returned `false` in
`isFatalConnectionProblem` you should return `true` in `shouldRetry`.

```diff
import { createClient } from 'graphql-ws';

const client = createClient({
  url: 'ws://localhost:4000/graphql',
- isFatalConnectionProblem: () => false,
+ shouldRetry: () => true,
});
```

##### Minor Changes

-
[#&#8203;613](https://redirect.github.com/enisdenjo/graphql-ws/pull/613)
[`3f11aba`](https://redirect.github.com/enisdenjo/graphql-ws/commit/3f11aba49582e18e6c0608d75fd4b784fde11422)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
Client is truly zero-dependency, not even a peer dependency on `graphql`

In non-browser environments, you can use only the client and not even
depend on `graphql` by importing from `graphql-ws/client`.

    ```ts
    import { createClient } from 'graphql-ws/client';

    const client = createClient({
      url: 'ws://localhost:4000/graphql',
    });
    ```

Note that, in browser envirments (and of course having your bundler use
the [`browser` package.json
field](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#browser)),
you don't have to import from `graphql-ws/client` - simply importing
from `graphql-ws` will only have the `createClient` available.

-
[#&#8203;615](https://redirect.github.com/enisdenjo/graphql-ws/pull/615)
[`29dd26a`](https://redirect.github.com/enisdenjo/graphql-ws/commit/29dd26a5099be26ef6e851c2a047b0c85dd5bfe6)
Thanks [@&#8203;enisdenjo](https://redirect.github.com/enisdenjo)! -
Define optional peer dependencies and least supported versions

Using the
[`peerDependencies`](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#peerdependencies)
in combination with
[`peerDependenciesMeta`](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#peerdependenciesmeta)
configuration in `package.json`.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/unraid/api).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNzYuMiIsInVwZGF0ZWRJblZlciI6IjM5LjE3Ni4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-20 15:57:04 -04:00
..
2025-01-28 09:12:54 -05:00
2025-03-18 16:21:40 -04:00
2025-03-18 16:21:40 -04:00
2025-02-24 13:42:31 -05:00
2025-02-25 13:09:02 -05:00
2024-05-16 14:13:01 -07:00
2025-01-09 16:06:10 -05:00

connect-components via Nuxt 3

Install dependencies

npm i

Dev testing and builds with .env setup

There's 3 version required for various types of development, testing builds in the Unraid webgui, and creating a prod build for the Unraid webgui.

  • .env for npm run dev local development
  • .env.staging for npm run build:dev which tests builds in the Unraid webgui
  • .env.production for npm run build:webgui which does a production build for the Unraid webgui

For the URL values, you can use what you'd like. So if you're testing locally, you can use http://localhost:5555 for the account app if you have a local version running. Alternatively you're free to use the staging or production URLs.

For productions URLs you could ultimately not provide any value and the URL helpers will default to the production URLs. But for local dev and testing, it's usually easiest to keep the .env key value pairs so you don't forget about them.

.env for npm run dev local development

VITE_ACCOUNT=http://localhost:5555
VITE_CONNECT=https://connect.myunraid.net
VITE_UNRAID_NET=https://preview.unraid.net
VITE_OS_RELEASES="https://releases.unraid.net/os"
VITE_CALLBACK_KEY="FIND_IN_1PASSWORD"
VITE_ALLOW_CONSOLE_LOGS=true
VITE_TAILWIND_BASE_FONT_SIZE=16

.env.staging for npm run build:dev which tests builds in the Unraid webgui

Please take a look at the prebuild:dev & postbuild:dev scripts in package.json to see how the .env.staging file is used.

VITE_ACCOUNT=https://staging.account.unraid.net
VITE_CONNECT=https://connect.myunraid.net
VITE_UNRAID_NET=https://staging.unraid.net
VITE_OS_RELEASES="https://releases.unraid.net/os"
VITE_CALLBACK_KEY="FIND_IN_1PASSWORD"
VITE_ALLOW_CONSOLE_LOGS=TRUE

Notice how VITE_TAILWIND_BASE_FONT_SIZE is not set in the .env.staging file. This is because the Unraid webgui uses the font-size: 62.5% "trick".

.env.production for npm run build:webgui which does a production build for the Unraid webgui

Please take a look at the prebuild:webgui & postbuild:webgui scripts in package.json to see how the .env.production file is used.

VITE_ACCOUNT=https://account.unraid.net
VITE_CONNECT=https://connect.myunraid.net
VITE_UNRAID_NET=https://unraid.net
VITE_OS_RELEASES="https://releases.unraid.net/os"
VITE_CALLBACK_KEY="FIND_IN_1PASSWORD"

Both VITE_ALLOW_CONSOLE_LOGS and VITE_TAILWIND_BASE_FONT_SIZE should never be set here.

Interfacing with unraid-api

@todo Apollo VueJS Guide on Colocating Fragments