@socketsecurity/cli 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +44 -1
- package/lib/commands/info/index.js +0 -1
- package/package.json +3 -3
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,14 +1,57 @@
|
|
|
1
1
|
# Socket CLI
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@socketsecurity/cli)
|
|
4
|
+
[](https://github.com/SocketDev/eslint-config)
|
|
5
|
+
[](https://twitter.com/SocketSecurity)
|
|
6
|
+
|
|
7
|
+
CLI tool for [Socket.dev](https://socket.dev/)
|
|
8
|
+
|
|
9
|
+
## Usage
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install -g @socketsecurity/cli
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
socket --help
|
|
17
|
+
socket info webtorrent@1.9.1
|
|
18
|
+
socket report create package.json
|
|
19
|
+
```
|
|
20
|
+
|
|
3
21
|
## Commands
|
|
4
22
|
|
|
5
|
-
* `
|
|
23
|
+
* `socket info <package@version>` - looks up issues for a package
|
|
24
|
+
* `socket report create` - uploads the specified `package.json` and/or `package-lock.json` to create a report on [socket.dev](https://socket.dev/). If only one of a `package.json`/`package-lock.json` has been specified, the other will be automatically found and uploaded if it exists
|
|
25
|
+
|
|
26
|
+
## Flags
|
|
27
|
+
|
|
28
|
+
### Action flags
|
|
29
|
+
|
|
30
|
+
* `--dry-run` - the `socket report create` supports running the command without actually uploading anything. All CLI tools that perform an action should have a dry run flag
|
|
31
|
+
|
|
32
|
+
### Output flags
|
|
33
|
+
|
|
34
|
+
* `--json` - outputs result as json which you can then pipe into [`jq`](https://stedolan.github.io/jq/) and other tools
|
|
35
|
+
* `--markdown` - outputs result as markdown which you can then copy into an issue, PR or even chat
|
|
36
|
+
|
|
37
|
+
### Other flags
|
|
38
|
+
|
|
39
|
+
* `--debug` - outputs additional debug output. Great for debugging, geeks and us who develop. Hopefully you will never _need_ it, but it can still be fun, right?
|
|
40
|
+
* `--help` - prints the help for the current command. All CLI tools should have this flag
|
|
41
|
+
* `--version` - prints the version of the tool. All CLI tools should have this flag
|
|
6
42
|
|
|
7
43
|
## Environment variables
|
|
8
44
|
|
|
9
45
|
* `SOCKET_SECURITY_API_KEY` - if set, this will be used as the API-key
|
|
10
46
|
|
|
47
|
+
## Contributing
|
|
11
48
|
### Environment variables for development
|
|
12
49
|
|
|
13
50
|
* `SOCKET_SECURITY_API_BASE_URL` - if set, this will be the base for all API-calls. Defaults to `https://api.socket.dev/v0/`
|
|
14
51
|
* `SOCKET_SECURITY_API_PROXY` - if set to something like [`http://127.0.0.1:9090`](https://docs.proxyman.io/troubleshooting/couldnt-see-any-requests-from-3rd-party-network-libraries), then all request will be proxied through that proxy
|
|
52
|
+
|
|
53
|
+
## See also
|
|
54
|
+
|
|
55
|
+
* [`@socketsecurity/sdk`]('https://github.com/SocketDev/socket-sdk-js") - the SDK used in this CLI
|
|
56
|
+
* [Socket API Reference](https://docs.socket.dev/reference) - the API used in this CLI
|
|
57
|
+
* [Socket GitHub App](https://github.com/apps/socket-security) - the plug-and-play GitHub App
|
|
@@ -78,7 +78,6 @@ const run = async (argv, importMeta, { parentName }) => {
|
|
|
78
78
|
|
|
79
79
|
const pkgName = rawPkgName.slice(0, versionSeparator)
|
|
80
80
|
const pkgVersion = rawPkgName.slice(versionSeparator + 1)
|
|
81
|
-
console.log('sdfd', pkgName, pkgVersion)
|
|
82
81
|
|
|
83
82
|
if (!pkgVersion) {
|
|
84
83
|
throw new InputError('Need to specify a version, like eg: webtorrent@1.0.0')
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@socketsecurity/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "CLI tool for Socket.dev",
|
|
5
|
-
"homepage": "http://github.com/SocketDev/socket-
|
|
5
|
+
"homepage": "http://github.com/SocketDev/socket-cli-js",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
|
-
"url": "git://github.com/SocketDev/socket-
|
|
8
|
+
"url": "git://github.com/SocketDev/socket-cli-js.git"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [],
|
|
11
11
|
"author": {
|