# kieker-javascript-cli

> Kieker javascript command line

Latest version **0.11.4** (published 2016-11-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install kieker-javascript-cli
pnpm add kieker-javascript-cli
yarn add kieker-javascript-cli
bun add kieker-javascript-cli
```

Provides the command `kieker`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.11.4 |
| Published | 2016-11-05 |
| First published | 2016-09-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.10.0 |
| Dependencies | 10 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Daniel Schmidt |
| Maintainers | dschmidt |
| Keywords | cli-app, cli |

## Links

- npm: https://www.npmjs.com/package/kieker-javascript-cli
- Repository: https://github.com/danielmschmidt/kieker-javascript-cli
- Homepage: https://github.com/danielmschmidt/kieker-javascript-cli#readme
- Issues: https://github.com/danielmschmidt/kieker-javascript-cli/issues
- npm.io page: https://npm.io/package/kieker-javascript-cli

## Dependencies (10)

- [glob](https://npm.io/package/glob.md) ^7.0.6
- [meow](https://npm.io/package/meow.md) ^3.7.0
- [listr](https://npm.io/package/listr.md) ^0.5.0
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [babylon](https://npm.io/package/babylon.md) ^6.9.1
- [object-assign](https://npm.io/package/object-assign.md) ^4.1.0
- [babel-generator](https://npm.io/package/babel-generator.md) ^6.11.4
- [kieker-javascript-advice-method](https://npm.io/package/kieker-javascript-advice-method.md) ^0.11.3
- [kieker-javascript-advice-function](https://npm.io/package/kieker-javascript-advice-function.md) ^0.11.3
- [kieker-javascript-advice-environment](https://npm.io/package/kieker-javascript-advice-environment.md) ^0.11.4

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 0.11.4 (latest) — 2016-11-05
- 0.11.3 — 2016-11-01
- 0.10.0 — 2016-10-12
- 0.9.2 — 2016-10-11
- 0.9.0 — 2016-10-09
- 0.8.5 — 2016-10-09
- 0.8.4 — 2016-10-09
- 0.8.3 — 2016-10-09
- 0.8.2 — 2016-10-09
- 0.8.1 — 2016-10-08
- 0.7.0 — 2016-10-08
- 0.6.0 — 2016-09-26
- 0.5.0 — 2016-09-25
- 0.4.1 — 2016-09-17
- 0.4.0 — 2016-09-06
- … 5 more at https://npm.io/package/kieker-javascript-cli/versions

## README

# kieker-javascript-cli

> Instrument your JS code via commmand-line


## Install

```
$ npm install --global kieker-javascript-cli
```


## Usage

```bash
$ kieker
```

## Configuration

The configuration is done as part of the `package.json:

```json
{
	...
	"kieker": {
		"serverUrl": "http://localhost:8000",
		"es6": true, // allow ECMAScript 6 code
		"entryFile": "./index.js", // required
		"files": [{
			"cwd": "src/",
			"src": "**/*.js",
			"dest": "dist/"
		}],
		"output": "./build.js", // required
		"workerOutput": "./worker.js",
		"advices": [{
			"type": "function",
			"exclude": { // blacklisting
				"name": "private_*" // any valid regex
			},
			"include": { // whitelisting
				"type": "function" // method or function
			}
		}, {
			"type": "function", // multiple advices of same type possible
			"include": {
				"type": "method"
			}
		}, {
			"type": "metainformation",
			"include": ["os", "version", "name"]
		}],
		"writer": [{
			"type": "console",
			"logLevel": "info"
		}, {
			"type": "websocket",
			"serverUrl": "http://myKiekerDataBridge.com:3333"
		}]
	}
	...
}
```

## entryFile

Sets the entry file, normally the first file to be loaded. The basic configuration will be included in the output file.

## files

The files to be transpiled given in an array of object with these three keys

### cwd

The current working directory to take the files from

### src

The source files, globbing is possible here

### dest

The directory to write the files to (respectant to their path from the cwd directory)

## output

The output file to write the transformed entry file to.

## advices

An array of objects containing the configuration for the advices.
Advices are the foundation of this library, as they collect the data to be monitored. They may be found on [npm](https://www.npmjs.com/search?q=kieker-javascript-advice-*).

## es6

Boolean flag that allows or disallows ECMAScript 6 code to be instrumented.

### Writing your own Advice

- If the advice needs an own Kieker Record, please enhance the kieker [instrumentation-languages](https://github.com/kieker-monitoring/instrumentation-languages), specifically the Javascript one
- As you (most likely) need some form of configuration or automated instrumentation to be used in this cli you need to add your package to this `package.json`.
	- For Configuration: Please see kieker-javascript-advice-environment as an example
	- For automated instrumentation: Please see kieker-javascript-advice-function as an example


## writer

Writer work in a separate thread and send the data to the destination you want.
They may be found on [npm](https://www.npmjs.com/search?q=kieker-javascript-writer-*).

## FAQ

### require is not a function / undefined

The problem is that you are currently not using a build tool which

- inlines the required JS files or
- provides a require function in both the normal and the worker thread

To solve this, please use [browserify](http://browserify.org/) in your build chain.

## License

MIT © [Daniel Schmidt](http://danielmschmidt.de)

---
_Source: https://npm.io/package/kieker-javascript-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
