Skip to content

Commit

Permalink
Improve log display name and update settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Jul 4, 2022
1 parent e47281e commit 2a6f5a5
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 17 deletions.
12 changes: 7 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
"source.organizeImports": true,
"source.fixAll": true
},
"editor.rulers": [
80
],
"editor.quickSuggestions": true,
"editor.rulers": [80],
"editor.quickSuggestions": {
"comments": "on",
"strings": "on",
"other": "on"
},
"editor.suggestOnTriggerCharacters": true
}
}
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
}
},
"dependencies": {
"@metacall/protocol": "^0.1.11",
"@metacall/protocol": "^0.1.13",
"archiver": "^5.0.2",
"chalk": "^4.1.1",
"console-table-printer": "^2.10.0",
Expand Down
2 changes: 1 addition & 1 deletion src/cli/selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const planSelection = (
]).then((res: { plan: Plans }) => res.plan);

export const listSelection = (
list: string[],
list: string[] | { name: string; value: string }[],
message: string
): Promise<string> =>
prompt<{ container: string }>([
Expand Down
17 changes: 16 additions & 1 deletion src/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
DeployStatus,
LogType
} from '@metacall/protocol/deployment';
import { RunnerToDisplayName } from '@metacall/protocol/language';
import API, { isProtocolError } from '@metacall/protocol/protocol';
import args from './cli/args';
import { error, info } from './cli/messages';
Expand Down Expand Up @@ -58,7 +59,21 @@ export const logs = async (
) => {
try {
const container: string = await listSelection(
[...containers, 'deploy'],
containers.reduce(
(choices, runner) => [
...choices,
{
name: RunnerToDisplayName(runner),
value: runner
}
],
[
{
name: 'Deploy',
value: 'deploy'
}
]
),
'Select a container to get logs'
);
const type = container === 'deploy' ? LogType.Deploy : LogType.Job;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
This modules demonstrates a basic example of a python backend that serves
an html index and returns the current hour in just two functions.
"""
"""

from os import path
from datetime import datetime
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/integration/time-app-web/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
This modules demonstrates a basic example of a python backend that serves
an html index and returns the current hour in just two functions.
"""
"""

from os import path
from datetime import datetime
Expand Down

0 comments on commit 2a6f5a5

Please sign in to comment.