logkitty
Advanced tools
Comparing version 0.6.0 to 0.6.1
@@ -34,3 +34,3 @@ "use strict"; | ||
try { | ||
(0, _child_process.execSync)(`'${adbPath}' logcat -c`); | ||
(0, _child_process.execSync)(`${adbPath} logcat -c`); | ||
} catch (error) { | ||
@@ -37,0 +37,0 @@ throw new _errors.CodeError(_errors.ERR_ANDROID_CANNOT_CLEAN_LOGCAT_BUFFER, error.message); |
@@ -91,4 +91,5 @@ "use strict"; | ||
type: 'string', | ||
describe: 'Use custom path to ADB' | ||
}).example('$0 android tag MyTag', 'Filter logs to only include ones with MyTag tag').example('$0 android tag MyTag -I', 'Filter logs to only include ones with MyTag tag and priority INFO and above').example('$0 android app com.example.myApp', 'Show all logs from com.example.myApp').example('$0 android match device', 'Show all logs matching /device/gm regex').example('$0 android app com.example.myApp -E', 'Show all logs from com.example.myApp with priority ERROR and above').example('$0 android custom *:S MyTag:D', 'Silence all logs and show only ones with MyTag with priority DEBUG and above')).command('ios <filter>', 'ios', yargs => yargs.command('tag <tags ...>', 'Show logs matching given tags', iosPriorityOptions).command('match <regexes...>', 'Show logs matching given patterns', iosPriorityOptions).command('all', 'Show all logs', iosPriorityOptions).demandCommand(1).example('$0 ios tag MyTag', 'Filter logs to only include ones with MyTag tag').example('$0 ios tag MyTag -i', 'Filter logs to only include ones with MyTag tag and priority Info and Error').example('$0 ios match device', 'Show all logs matching /device/gm regex')).demandCommand(1).help('h').alias('h', 'help').alias('v', 'version').version(); | ||
describe: 'Use custom path to adb', | ||
nargs: 1 | ||
}).example('$0 android tag MyTag', 'Filter logs to only include ones with MyTag tag').example('$0 android tag MyTag -I', 'Filter logs to only include ones with MyTag tag and priority INFO and above').example('$0 android app com.example.myApp', 'Show all logs from com.example.myApp').example('$0 android match device', 'Show all logs matching /device/gm regex').example('$0 android app com.example.myApp -E', 'Show all logs from com.example.myApp with priority ERROR and above').example('$0 android custom *:S MyTag:D', 'Silence all logs and show only ones with MyTag with priority DEBUG and above')).command('ios <filter>', 'iOS', yargs => yargs.command('tag <tags ...>', 'Show logs matching given tags', iosPriorityOptions).command('match <regexes...>', 'Show logs matching given patterns', iosPriorityOptions).command('all', 'Show all logs', iosPriorityOptions).demandCommand(1).example('$0 ios tag MyTag', 'Filter logs to only include ones with MyTag tag').example('$0 ios tag MyTag -i', 'Filter logs to only include ones with MyTag tag and priority Info and Error').example('$0 ios match device', 'Show all logs matching /device/gm regex')).demandCommand(1).help('h').alias('h', 'help').alias('v', 'version').version(); | ||
@@ -137,2 +138,3 @@ const selectedAndroidPriorities = { | ||
platform: platform, | ||
adbPath: args.adbPath ? String(args.adbPath) : '', | ||
priority: platform === 'android' ? (0, _utils.getMinPriority)(_api.AndroidPriority, selectedAndroidPriorities, _api.AndroidPriority.DEBUG) : (0, _utils.getMinPriority)(_api.IosPriority, selectedIosPriorities, _api.IosPriority.DEFAULT), | ||
@@ -139,0 +141,0 @@ filter: createFilter |
# Node API | ||
## Example: | ||
## Example | ||
```ts | ||
@@ -28,2 +29,3 @@ import { | ||
``` | ||
## API | ||
@@ -36,3 +38,3 @@ | ||
* `platform: 'android' | 'ios'` - Platform to get the logs from: uses `adb logcat` for Android and `xcrun simctl` + `log` for iOS simulator`. | ||
* `adbPath?: string` - Custom path to ADB tool or `undefined` (used only when `platform` is `android`). | ||
* `adbPath?: string` - Custom path to adb tool or `undefined` (used only when `platform` is `android`). | ||
* `priority?: number` - Minimum priority of entries to show of `undefined`, which will include all entries with priority **DEBUG** (Android)/**DEFAULT** (iOS) or above. | ||
@@ -58,3 +60,2 @@ * `filter?: FilterCreator` - The returned value from `makeTagsFilter`/`makeAppFilter`/`makeMatchFilter`/`makeCustomFilter` or `undefined`, which will include all entries (similar to `all` command in the CLI). | ||
#### `makeMatchFilter(...regexes: RegExp[]): FilterCreator` | ||
@@ -78,2 +79,2 @@ | ||
Takes an error and formats it to a string with ANSI escape codes for coloring. | ||
Takes an error and formats it to a string with ANSI escape codes for coloring. |
{ | ||
"name": "logkitty", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "Display pretty Android and iOS logs without Android Studio or Console.app, with intuitive Command Line Interface.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
# logkitty | ||
[![Version][version]][package] | ||
[![Version][version]][package] | ||
@@ -16,3 +16,3 @@ [![PRs Welcome][prs-welcome-badge]][prs-welcome] | ||
```bash | ||
```sh | ||
yarn global add logkitty | ||
@@ -23,3 +23,3 @@ ``` | ||
``` | ||
```sh | ||
yarn add -D logkitty | ||
@@ -31,3 +31,3 @@ yarn logkitty --help | ||
```bash | ||
```sh | ||
logkitty <platform> <command> [options] | ||
@@ -40,3 +40,3 @@ ``` | ||
```bash | ||
```sh | ||
logkitty -h # prints available platforms and global options | ||
@@ -66,3 +66,3 @@ logkitty android -h # prints commands and options for android | ||
* platform `android`: | ||
`tag`, `app`, `match` and `all` commands support additional priority filtering options (sorted by priority): | ||
@@ -93,3 +93,3 @@ | ||
``` | ||
```sh | ||
logkitty android tag ReactNativeJS | ||
@@ -101,3 +101,3 @@ logkitty ios tag ReactNativeJS | ||
``` | ||
```sh | ||
logkitty android app com.example.myApplication -i | ||
@@ -108,3 +108,3 @@ ``` | ||
``` | ||
```sh | ||
logkitty android match CodePush | ||
@@ -116,3 +116,3 @@ logkitty ios match CodePush | ||
``` | ||
```sh | ||
logkitty android all -e | ||
@@ -124,3 +124,3 @@ logkitty ios all -e | ||
``` | ||
```sh | ||
logkitty android custom *:S my-tag:D | ||
@@ -133,3 +133,2 @@ ``` | ||
<!-- badges (common) --> | ||
@@ -136,0 +135,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
SPDX disjunction
LicenseSPDX disjunction for an artifact's license information
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Missing package tarball
QualityThis package is missing it's tarball. It could be removed from the npm registry or there may have been an error when publishing.
Found 1 instance in 1 package
103038
61
100
811
0
136
3
15
1
1
2
2
+ Addedansi-fragments@^0.2.1
+ Addeddayjs@^1.8.15
+ Addedyargs@^12.0.5
+ Addedansi-fragments@0.2.1(transitive)
+ Addedansi-regex@2.1.13.0.14.1.1(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedastral-regex@1.0.0(transitive)
+ Addedcamelcase@5.3.1(transitive)
+ Addedcliui@4.1.0(transitive)
+ Addedcode-point-at@1.1.0(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcolorette@1.4.0(transitive)
+ Addedcross-spawn@6.0.5(transitive)
+ Addeddayjs@1.11.11(transitive)
+ Addeddecamelize@1.2.0(transitive)
+ Addedend-of-stream@1.4.4(transitive)
+ Addedexeca@1.0.0(transitive)
+ Addedfind-up@3.0.0(transitive)
+ Addedget-caller-file@1.0.3(transitive)
+ Addedget-stream@4.1.0(transitive)
+ Addedinvert-kv@2.0.0(transitive)
+ Addedis-fullwidth-code-point@1.0.02.0.0(transitive)
+ Addedis-stream@1.1.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedlcid@2.0.0(transitive)
+ Addedlocate-path@3.0.0(transitive)
+ Addedmap-age-cleaner@0.1.3(transitive)
+ Addedmem@4.3.0(transitive)
+ Addedmimic-fn@2.1.0(transitive)
+ Addednice-try@1.0.5(transitive)
+ Addednpm-run-path@2.0.2(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedos-locale@3.1.0(transitive)
+ Addedp-defer@1.0.0(transitive)
+ Addedp-finally@1.0.0(transitive)
+ Addedp-is-promise@2.1.0(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@3.0.0(transitive)
+ Addedp-try@2.2.0(transitive)
+ Addedpath-exists@3.0.0(transitive)
+ Addedpath-key@2.0.1(transitive)
+ Addedpump@3.0.0(transitive)
+ Addedrequire-directory@2.1.1(transitive)
+ Addedrequire-main-filename@1.0.1(transitive)
+ Addedsemver@5.7.2(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedshebang-command@1.2.0(transitive)
+ Addedshebang-regex@1.0.0(transitive)
+ Addedsignal-exit@3.0.7(transitive)
+ Addedslice-ansi@2.1.0(transitive)
+ Addedstring-width@1.0.22.1.1(transitive)
+ Addedstrip-ansi@3.0.14.0.05.2.0(transitive)
+ Addedstrip-eof@1.0.0(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwhich-module@2.0.1(transitive)
+ Addedwrap-ansi@2.1.0(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedy18n@4.0.3(transitive)
+ Addedyargs@12.0.5(transitive)
+ Addedyargs-parser@11.1.1(transitive)