-
Notifications
You must be signed in to change notification settings - Fork 19
Feat/mothership v2 #1551
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
elibosley
wants to merge
7
commits into
main
Choose a base branch
from
feat/mothership-v2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Feat/mothership v2 #1551
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ff94160
Refactor Mothership integration to use WebSocket-based UnraidServerCl…
elibosley 5959549
feat: mothership working e2e
elibosley fcf74d3
feat: add remote access and connection management to GraphQL API
elibosley 67944eb
feat: introduce unraid-api-plugin-connect-2 with enhanced GraphQL sup…
elibosley 90ed837
refactor: update Mothership API integration to use new GraphQL link
elibosley 81cc9ff
refactor: update unraid-api-plugin-connect to version 2 and enhance G…
elibosley 92e30e2
refactor: consolidate unraid-api-plugin-connect package and update de…
elibosley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "connectionStatus": "PRE_INIT", | ||
| "error": null, | ||
| "lastPing": null, | ||
| "allowedOrigins": "", | ||
| "timestamp": 1753974976746 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| /** | ||
| * @see https://prettier.io/docs/en/configuration.html | ||
| * @type {import("prettier").Config} | ||
| */ | ||
| module.exports = { | ||
| trailingComma: 'es5', | ||
| tabWidth: 4, | ||
| semi: true, | ||
| singleQuote: true, | ||
| printWidth: 105, | ||
| plugins: ['@ianvs/prettier-plugin-sort-imports'], | ||
| // decorators-legacy lets the import sorter transform files with decorators | ||
| importOrderParserPlugins: ['typescript', 'decorators-legacy'], | ||
| importOrder: [ | ||
| /**---------------------- | ||
| * Nest.js & node.js imports | ||
| *------------------------**/ | ||
| '<TYPES>^@nestjs(/.*)?$', | ||
| '^@nestjs(/.*)?$', // matches imports starting with @nestjs | ||
| '<TYPES>^(node:)', | ||
| '<BUILTIN_MODULES>', // Node.js built-in modules | ||
| '', | ||
| /**---------------------- | ||
| * Third party packages | ||
| *------------------------**/ | ||
| '<TYPES>', | ||
| '<THIRD_PARTY_MODULES>', // Imports not matched by other special words or groups. | ||
| '', | ||
| /**---------------------- | ||
| * Application Code | ||
| *------------------------**/ | ||
| '<TYPES>^@app(/.*)?$', // matches type imports starting with @app | ||
| '^@app(/.*)?$', | ||
| '', | ||
| '<TYPES>^[.]', | ||
| '^[.]', // relative imports | ||
| ], | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import type { CodegenConfig } from '@graphql-codegen/cli'; | ||
|
|
||
| const config: CodegenConfig = { | ||
| overwrite: true, | ||
| emitLegacyCommonJSImports: false, | ||
| verbose: true, | ||
| config: { | ||
| namingConvention: { | ||
| enumValues: 'change-case-all#upperCase', | ||
| transformUnderscore: true, | ||
| useTypeImports: true, | ||
| }, | ||
| scalars: { | ||
| DateTime: 'string', | ||
| Long: 'number', | ||
| JSON: 'Record<string, any>', | ||
| URL: 'URL', | ||
| Port: 'number', | ||
| UUID: 'string', | ||
| BigInt: 'number', | ||
| }, | ||
| scalarSchemas: { | ||
| URL: 'z.instanceof(URL)', | ||
| Long: 'z.number()', | ||
| JSON: 'z.record(z.string(), z.any())', | ||
| Port: 'z.number()', | ||
| UUID: 'z.string()', | ||
| BigInt: 'z.number()', | ||
| }, | ||
| }, | ||
| generates: { | ||
| // No longer generating mothership GraphQL types since we switched to WebSocket-based UnraidServerClient | ||
| }, | ||
| }; | ||
|
|
||
| export default config; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| # Justfile for unraid-api-plugin-connect | ||
|
|
||
| # Default recipe to run when just is called without arguments | ||
| default: | ||
| @just --list | ||
|
|
||
| # Watch for changes in src files and run clean + build | ||
| watch: | ||
| watchexec -r -e ts,tsx -w src -- pnpm build | ||
|
|
||
| # Count TypeScript lines in src directory, excluding test and generated files | ||
| count-lines: | ||
| #!/usr/bin/env bash | ||
| # Colors for output | ||
| RED='\033[0;31m' | ||
| GREEN='\033[0;32m' | ||
| BLUE='\033[0;34m' | ||
| NC='\033[0m' # No Color | ||
|
|
||
| echo -e "${BLUE}Counting TypeScript lines in src/ (excluding test/ and graphql/generated/)...${NC}" | ||
| echo | ||
| echo -e "${GREEN}Lines by directory:${NC}" | ||
| cd src | ||
| # First pass to get total lines | ||
| total=$(find . -type f -name "*.ts" -not -path "*/test/*" -not -path "*/graphql/generated/*" | xargs wc -l | tail -n 1 | awk '{print $1}') | ||
|
|
||
| # Second pass to show directory breakdown with percentages | ||
| for dir in $(find . -type d -not -path "*/test/*" -not -path "*/graphql/generated/*" -not -path "." -not -path "./test" | sort); do | ||
| lines=$(find "$dir" -type f -name "*.ts" -not -path "*/graphql/generated/*" | xargs wc -l 2>/dev/null | tail -n 1 | awk '{print $1}') | ||
| if [ ! -z "$lines" ]; then | ||
| percentage=$(echo "scale=1; $lines * 100 / $total" | bc) | ||
| printf "%-30s %6d lines (%5.1f%%)\n" "$dir" "$lines" "$percentage" | ||
| fi | ||
| done | ||
| echo | ||
| echo -e "${GREEN}Top 10 largest files:${NC}" | ||
| find . -type f -name "*.ts" -not -path "*/test/*" -not -path "*/graphql/generated/*" | xargs wc -l | sort -nr | head -n 11 | ||
| echo | ||
| echo -e "${GREEN}Total TypeScript lines:${NC} $total" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add quotes around the value on line 22.
The
.envfile format requires quoted values for consistent parsing by dotenv libraries.Apply this fix:
📝 Committable suggestion
🧰 Tools
🪛 dotenv-linter (4.0.0)
[warning] 22-22: [UnorderedKey] The PATHS_CONNECT_STATUS key should go before the PATHS_CONNECT_STATUS_FILE_PATH key
(UnorderedKey)
[warning] 22-22: [ValueWithoutQuotes] This value needs to be surrounded in quotes
(ValueWithoutQuotes)
🤖 Prompt for AI Agents