feat: Add base44 logs command
#531
Annotations
10 errors and 1 warning
|
tests/cli/logs.spec.ts > logs command > outputs raw JSON with --json flag:
tests/cli/testkit/CLIResultMatcher.ts#L38
Error: Expected output to contain ""events""
stdout: ┌ Base 44
│
◇ Logs fetched successfully
[
{
"time": "2024-01-15T10:30:00Z",
"level": "info",
"message": "function unknown called (status )",
"source": "App"
}
]
│
└
stderr:
❯ CLIResultMatcher.toContain tests/cli/testkit/CLIResultMatcher.ts:38:13
❯ tests/cli/logs.spec.ts:104:28
|
|
tests/cli/logs.spec.ts > logs command > shows no events message when empty:
tests/cli/testkit/CLIResultMatcher.ts#L38
Error: Expected output to contain "No events found"
stdout: ┌ Base 44
│
◇ Logs fetched successfully
│
● No logs found matching the filters.
│
└
stderr:
❯ CLIResultMatcher.toContain tests/cli/testkit/CLIResultMatcher.ts:38:13
❯ tests/cli/logs.spec.ts:72:28
|
|
tests/cli/logs.spec.ts > logs command > fetches and displays logs successfully:
tests/cli/testkit/CLIResultMatcher.ts#L38
Error: Expected output to contain "api.function.call"
stdout: ┌ Base 44
│
◇ Logs fetched successfully
│
● Showing 2 of 2 events
│
│
│ TIME LEVEL MESSAGE
│
│ 2024-01-15 10:30:00 info function unknown called (status )
│
│ 2024-01-15 10:29:00 error failed to create entity Task
│
└
stderr:
❯ CLIResultMatcher.toContain tests/cli/testkit/CLIResultMatcher.ts:38:13
❯ tests/cli/logs.spec.ts:52:28
|
|
tests/cli/functions_logs.spec.ts > functions logs command > requires function name argument:
tests/cli/testkit/CLIResultMatcher.ts#L38
Error: Expected output to contain "missing required argument"
stdout:
stderr: error: unknown command 'logs'
❯ CLIResultMatcher.toContain tests/cli/testkit/CLIResultMatcher.ts:38:13
❯ tests/cli/functions_logs.spec.ts:128:28
|
|
tests/cli/functions_logs.spec.ts > functions logs command > fails with invalid level option:
tests/cli/testkit/CLIResultMatcher.ts#L38
Error: Expected output to contain "Invalid level"
stdout:
stderr: error: unknown command 'logs'
❯ CLIResultMatcher.toContain tests/cli/testkit/CLIResultMatcher.ts:38:13
❯ tests/cli/functions_logs.spec.ts:119:28
|
|
tests/cli/functions_logs.spec.ts > functions logs command > fails when not in a project directory:
tests/cli/testkit/CLIResultMatcher.ts#L38
Error: Expected output to contain "No Base44 project found"
stdout:
stderr: error: unknown command 'logs'
❯ CLIResultMatcher.toContain tests/cli/testkit/CLIResultMatcher.ts:38:13
❯ tests/cli/functions_logs.spec.ts:92:28
|
|
tests/cli/functions_logs.spec.ts > functions logs command > outputs raw JSON with --json flag:
tests/cli/testkit/CLIResultMatcher.ts#L14
Error: Expected command to succeed but got exit code 1
stderr: error: unknown command 'logs'
❯ CLIResultMatcher.toSucceed tests/cli/testkit/CLIResultMatcher.ts:14:13
❯ tests/cli/functions_logs.spec.ts:80:28
|
|
tests/cli/functions_logs.spec.ts > functions logs command > filters by log level:
tests/cli/testkit/CLIResultMatcher.ts#L14
Error: Expected command to succeed but got exit code 1
stderr: error: unknown command 'logs'
❯ CLIResultMatcher.toSucceed tests/cli/testkit/CLIResultMatcher.ts:14:13
❯ tests/cli/functions_logs.spec.ts:63:28
|
|
tests/cli/functions_logs.spec.ts > functions logs command > shows no logs message when empty:
tests/cli/testkit/CLIResultMatcher.ts#L14
Error: Expected command to succeed but got exit code 1
stderr: error: unknown command 'logs'
❯ CLIResultMatcher.toSucceed tests/cli/testkit/CLIResultMatcher.ts:14:13
❯ tests/cli/functions_logs.spec.ts:36:28
|
|
tests/cli/functions_logs.spec.ts > functions logs command > fetches and displays logs successfully:
tests/cli/testkit/CLIResultMatcher.ts#L14
Error: Expected command to succeed but got exit code 1
stderr: error: unknown command 'logs'
❯ CLIResultMatcher.toSucceed tests/cli/testkit/CLIResultMatcher.ts:14:13
❯ tests/cli/functions_logs.spec.ts:24:28
|
|
test
Unexpected input(s) 'cache', valid inputs are ['bun-version', 'bun-version-file', 'bun-download-url', 'registries', 'registry-url', 'scope', 'no-cache', 'token']
|