Comparing version 0.3.1 to 0.3.2
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
const constants_1 = require("constants"); | ||
@@ -12,4 +13,4 @@ const command_1 = require("./command"); | ||
} | ||
InitCommand.samplePath = `${__dirname}/../../../sample/tyscan.yml`; | ||
InitCommand.samplePath = path.resolve(__dirname, '../../../sample/tyscan.yml'); | ||
exports.InitCommand = InitCommand; | ||
//# sourceMappingURL=initCommand.js.map |
@@ -12,3 +12,3 @@ "use strict"; | ||
if (fs.statSync(p).isDirectory()) { | ||
return fg.sync([`${p}/**/*.ts`, `${p}/**/*.tsx`]).map(e => e.toString()); | ||
return fg.sync([`${p}/**/*.{ts,tsx}`]).map(e => e.toString()); | ||
} | ||
@@ -15,0 +15,0 @@ return [p]; |
{ | ||
"name": "tyscan", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Command line tool for scanning TypeScript sources", | ||
@@ -10,7 +10,7 @@ "bin": { | ||
"bin", | ||
"dist" | ||
"dist", | ||
"sample" | ||
], | ||
"scripts": { | ||
"build": "tsc --project tsconfig.json --outDir dist", | ||
"format": "tslint --fix --project tsconfig.json", | ||
"prepare": "npm run build", | ||
@@ -20,2 +20,3 @@ "test": "nyc mocha test/*.ts --no-timeouts", | ||
"docker": "docker build -t sider/tyscan:dev .", | ||
"smoke": "./test/smoke.sh", | ||
"release": "np" | ||
@@ -33,4 +34,4 @@ }, | ||
"dependencies": { | ||
"commander": "^2.19.0", | ||
"fast-glob": "^2.2.6", | ||
"commander": "^6.0.0", | ||
"fast-glob": "^3.2.2", | ||
"js-yaml": "^3.13.0", | ||
@@ -46,4 +47,4 @@ "parsimmon": "^1.12.0", | ||
"@types/js-yaml": "^3.12.1", | ||
"@types/mocha": "^5.2.6", | ||
"@types/node": "^11.13.10", | ||
"@types/mocha": "^8.0.0", | ||
"@types/node": "^14.0.5", | ||
"@types/parsimmon": "^1.10.0", | ||
@@ -54,8 +55,6 @@ "@types/prompt-sync": "^4.1.0", | ||
"chai": "^4.2.0", | ||
"mocha": "^5.2.0", | ||
"mocha": "^8.0.1", | ||
"np": "latest", | ||
"nyc": "^14.1.1", | ||
"nyc": "^15.0.1", | ||
"ts-node": "^8.1.0", | ||
"tslint": "^5.16.0", | ||
"tslint-config-airbnb": "^5.11.1", | ||
"tsutils": "^3.10.0", | ||
@@ -62,0 +61,0 @@ "typescript": "^3.4.5" |
@@ -6,20 +6,34 @@ ![TyScan logo](logo/TyScan_Horizontal.png) | ||
[![npm version](https://badge.fury.io/js/tyscan.svg)](https://badge.fury.io/js/tyscan) | ||
[![CircleCI](https://circleci.com/gh/sider/TyScan.svg?style=svg)](https://circleci.com/gh/sider/TyScan) | ||
TyScan is a command line tool for scanning TypeScript code. | ||
TyScan is a command-line tool for scanning TypeScript code by own custom rules. | ||
## Installation | ||
## Getting started | ||
1. Install TyScan and TypeScript with `npm`: | ||
1. Install TyScan and TypeScript: | ||
```shell | ||
```console | ||
$ npm install tyscan typescript --save-dev | ||
``` | ||
2. Check the installation: | ||
2. Verify the installation: | ||
```shell | ||
$ npx tyscan # Should print help message | ||
```console | ||
$ npx tyscan --version | ||
``` | ||
3. Create a rule file `tyscan.yml`: | ||
```console | ||
$ npx tyscan init | ||
``` | ||
4. Scan your TypeScript files: | ||
```console | ||
$ npx tyscan scan | ||
``` | ||
You can write your own rules into the generated `tyscan.yml` file. | ||
See the [documentation](#documentation) for more details. | ||
### Docker | ||
@@ -29,3 +43,3 @@ | ||
```shell | ||
```console | ||
$ docker run -it --rm -v "$PWD":/work sider/tyscan | ||
@@ -32,0 +46,0 @@ ``` |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
121193
16
106
1557
59
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addedcommander@6.2.1(transitive)
+ Addedfast-glob@3.3.2(transitive)
+ Addedfastq@1.18.0(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
- Removed@mrmlnc/readdir-enhanced@2.2.1(transitive)
- Removed@nodelib/fs.stat@1.1.3(transitive)
- Removedarr-diff@4.0.0(transitive)
- Removedarr-flatten@1.1.0(transitive)
- Removedarr-union@3.1.0(transitive)
- Removedarray-unique@0.3.2(transitive)
- Removedassign-symbols@1.0.0(transitive)
- Removedatob@2.1.2(transitive)
- Removedbase@0.11.2(transitive)
- Removedbraces@2.3.2(transitive)
- Removedcache-base@1.0.1(transitive)
- Removedcall-me-maybe@1.0.2(transitive)
- Removedclass-utils@0.3.6(transitive)
- Removedcollection-visit@1.0.0(transitive)
- Removedcommander@2.20.3(transitive)
- Removedcomponent-emitter@1.3.1(transitive)
- Removedcopy-descriptor@0.1.1(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddecode-uri-component@0.2.2(transitive)
- Removeddefine-property@0.2.51.0.02.0.2(transitive)
- Removedexpand-brackets@2.1.4(transitive)
- Removedextend-shallow@2.0.13.0.2(transitive)
- Removedextglob@2.0.4(transitive)
- Removedfast-glob@2.2.7(transitive)
- Removedfill-range@4.0.0(transitive)
- Removedfor-in@1.0.2(transitive)
- Removedfragment-cache@0.2.1(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-value@2.0.6(transitive)
- Removedglob-parent@3.1.0(transitive)
- Removedglob-to-regexp@0.3.0(transitive)
- Removedhas-value@0.3.11.0.0(transitive)
- Removedhas-values@0.1.41.0.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedis-accessor-descriptor@1.0.1(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedis-data-descriptor@1.0.1(transitive)
- Removedis-descriptor@0.1.71.0.3(transitive)
- Removedis-extendable@0.1.11.0.1(transitive)
- Removedis-glob@3.1.0(transitive)
- Removedis-number@3.0.0(transitive)
- Removedis-plain-object@2.0.4(transitive)
- Removedis-windows@1.0.2(transitive)
- Removedisarray@1.0.0(transitive)
- Removedisobject@2.1.03.0.1(transitive)
- Removedkind-of@3.2.24.0.06.0.3(transitive)
- Removedmap-cache@0.2.2(transitive)
- Removedmap-visit@1.0.0(transitive)
- Removedmicromatch@3.1.10(transitive)
- Removedmixin-deep@1.3.2(transitive)
- Removedms@2.0.0(transitive)
- Removednanomatch@1.2.13(transitive)
- Removedobject-copy@0.1.0(transitive)
- Removedobject-visit@1.0.1(transitive)
- Removedobject.pick@1.3.0(transitive)
- Removedpascalcase@0.1.1(transitive)
- Removedpath-dirname@1.0.2(transitive)
- Removedposix-character-classes@0.1.1(transitive)
- Removedregex-not@1.0.2(transitive)
- Removedrepeat-element@1.1.4(transitive)
- Removedrepeat-string@1.6.1(transitive)
- Removedresolve-url@0.2.1(transitive)
- Removedret@0.1.15(transitive)
- Removedsafe-regex@1.1.0(transitive)
- Removedset-value@2.0.1(transitive)
- Removedsnapdragon@0.8.2(transitive)
- Removedsnapdragon-node@2.1.1(transitive)
- Removedsnapdragon-util@3.0.1(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedsource-map-resolve@0.5.3(transitive)
- Removedsource-map-url@0.4.1(transitive)
- Removedsplit-string@3.1.0(transitive)
- Removedstatic-extend@0.1.2(transitive)
- Removedto-object-path@0.3.0(transitive)
- Removedto-regex@3.0.2(transitive)
- Removedto-regex-range@2.1.1(transitive)
- Removedunion-value@1.0.1(transitive)
- Removedunset-value@1.0.0(transitive)
- Removedurix@0.1.0(transitive)
- Removeduse@3.1.1(transitive)
Updatedcommander@^6.0.0
Updatedfast-glob@^3.2.2