-
Notifications
You must be signed in to change notification settings - Fork 0
feat: add command field to Swarm services and improve service deployments
#56
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
Changes from all commits
2bd28dc
317fb8b
f1f6a20
2934480
328aaf7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| { | ||
| "name": "web", | ||
| "version": "0.11.4", | ||
| "version": "0.11.5", | ||
| "type": "module", | ||
| "private": true, | ||
| "scripts": { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| -- AlterTable | ||
| ALTER TABLE "SwarmService" ADD COLUMN "command" TEXT; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| export function splitCommand(cmd: string): string[] { | ||
|
||
| const result: string[] = []; | ||
| let current = ''; | ||
| let quote: "'" | '"' | null = null; | ||
| let escaped = false; | ||
|
|
||
| for (let i = 0; i < cmd.length; i++) { | ||
| const c = cmd[i]; | ||
|
|
||
| if (escaped) { | ||
| current += c; | ||
| escaped = false; | ||
| continue; | ||
| } | ||
|
|
||
| if (c === '\\') { | ||
| escaped = true; | ||
| continue; | ||
| } | ||
|
|
||
| if (quote) { | ||
| if (c === quote) { | ||
| quote = null; | ||
| } else { | ||
| current += c; | ||
| } | ||
| continue; | ||
| } | ||
|
|
||
| if (c === "'" || c === '"') { | ||
| quote = c; | ||
| continue; | ||
| } | ||
|
|
||
| if (c === ' ') { | ||
| if (current.length > 0) { | ||
| result.push(current); | ||
| current = ''; | ||
| } | ||
| continue; | ||
| } | ||
|
|
||
| current += c; | ||
| } | ||
|
|
||
| if (current.length > 0) { | ||
| result.push(current); | ||
| } | ||
|
|
||
| return result; | ||
| } | ||
|
Comment on lines
+1
to
+51
|
||
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.
The command input field lacks helpful description or hint text to guide users. Consider adding a FormDescription component (similar to other form fields in the codebase) that explains:
This would improve the user experience and reduce potential configuration errors.