@fyuld/snitch 1.4.1
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/.snitchconfig.json +142 -0
- package/dist/src/commands/badimports.d.ts +2 -0
- package/dist/src/commands/badimports.d.ts.map +1 -0
- package/dist/src/commands/badimports.js +8 -0
- package/dist/src/commands/badimports.js.map +1 -0
- package/dist/src/commands/dirtydefaults.d.ts +2 -0
- package/dist/src/commands/dirtydefaults.d.ts.map +1 -0
- package/dist/src/commands/dirtydefaults.js +8 -0
- package/dist/src/commands/dirtydefaults.js.map +1 -0
- package/dist/src/commands/dm.d.ts +2 -0
- package/dist/src/commands/dm.d.ts.map +1 -0
- package/dist/src/commands/dm.js +100 -0
- package/dist/src/commands/dm.js.map +1 -0
- package/dist/src/commands/enumerate.d.ts +2 -0
- package/dist/src/commands/enumerate.d.ts.map +1 -0
- package/dist/src/commands/enumerate.js +8 -0
- package/dist/src/commands/enumerate.js.map +1 -0
- package/dist/src/commands/expectmagic.d.ts +2 -0
- package/dist/src/commands/expectmagic.d.ts.map +1 -0
- package/dist/src/commands/expectmagic.js +8 -0
- package/dist/src/commands/expectmagic.js.map +1 -0
- package/dist/src/commands/fixtures.d.ts +2 -0
- package/dist/src/commands/fixtures.d.ts.map +1 -0
- package/dist/src/commands/fixtures.js +8 -0
- package/dist/src/commands/fixtures.js.map +1 -0
- package/dist/src/commands/init.d.ts +2 -0
- package/dist/src/commands/init.d.ts.map +1 -0
- package/dist/src/commands/init.js +64 -0
- package/dist/src/commands/init.js.map +1 -0
- package/dist/src/commands/scan.d.ts +2 -0
- package/dist/src/commands/scan.d.ts.map +1 -0
- package/dist/src/commands/scan.js +81 -0
- package/dist/src/commands/scan.js.map +1 -0
- package/dist/src/commands/vocab.d.ts +2 -0
- package/dist/src/commands/vocab.d.ts.map +1 -0
- package/dist/src/commands/vocab.js +166 -0
- package/dist/src/commands/vocab.js.map +1 -0
- package/dist/src/datamodel.d.ts +18 -0
- package/dist/src/datamodel.d.ts.map +1 -0
- package/dist/src/datamodel.js +23 -0
- package/dist/src/datamodel.js.map +1 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +69 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/utils/pattern-scanner.d.ts +31 -0
- package/dist/src/utils/pattern-scanner.d.ts.map +1 -0
- package/dist/src/utils/pattern-scanner.js +154 -0
- package/dist/src/utils/pattern-scanner.js.map +1 -0
- package/dist/src/utils/ts-parser.d.ts +16 -0
- package/dist/src/utils/ts-parser.d.ts.map +1 -0
- package/dist/src/utils/ts-parser.js +350 -0
- package/dist/src/utils/ts-parser.js.map +1 -0
- package/package.json +40 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scans": {
|
|
3
|
+
"expectmagic": {
|
|
4
|
+
"description": "Find magic values in expect() assertions",
|
|
5
|
+
"fileFilter": "testFiles",
|
|
6
|
+
"warnings": [
|
|
7
|
+
{
|
|
8
|
+
"message": "magic number in expect",
|
|
9
|
+
"regexes": [
|
|
10
|
+
"expect\\(.*\\)\\.([a-zA-Z]+)\\(-?\\d+(\\.\\d+)?\\)"
|
|
11
|
+
],
|
|
12
|
+
"recommendation": {
|
|
13
|
+
"message": "Do not test against magic values.",
|
|
14
|
+
"recommendations": [
|
|
15
|
+
"When possible test against value from fixture, for example if parameter is loaded from the fixture, then test that it's from the fixture.",
|
|
16
|
+
"Otherwise consider test to be useless, it only adds to refactoring burden.",
|
|
17
|
+
"In case where you disagree, consult with user to add an exception."
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"message": "magic string in expect",
|
|
23
|
+
"regexes": [
|
|
24
|
+
"expect\\(.*\\)\\.([a-zA-Z]+)\\(['\"][^'\"]*['\"]\\)"
|
|
25
|
+
],
|
|
26
|
+
"recommendation": {
|
|
27
|
+
"message": "Do not test against magic values.",
|
|
28
|
+
"recommendations": [
|
|
29
|
+
"When possible test against value from fixture, for example if parameter is loaded from the fixture, then test that it's from the fixture.",
|
|
30
|
+
"Otherwise consider test to be useless, it only adds to refactoring burden.",
|
|
31
|
+
"In case where you disagree, consult with user to add an exception."
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"fixtures": {
|
|
38
|
+
"description": "Find inline config declarations that should use fixtures",
|
|
39
|
+
"fileFilter": "allTypeScript",
|
|
40
|
+
"warnings": [
|
|
41
|
+
{
|
|
42
|
+
"message": "config declared inline",
|
|
43
|
+
"regexes": [
|
|
44
|
+
"const\\s+\\w+:\\s+\\w+Config\\s*=\\s*\\{"
|
|
45
|
+
],
|
|
46
|
+
"recommendation": {
|
|
47
|
+
"message": "Always use external fixtures.",
|
|
48
|
+
"recommendations": [
|
|
49
|
+
"External fixtures are easier to monitor and modify.",
|
|
50
|
+
"They promote better test maintainability and reusability."
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
"dirtydefaults": {
|
|
57
|
+
"description": "Default values are evil. Do not use them.",
|
|
58
|
+
"fileFilter": "allTypeScript",
|
|
59
|
+
"warnings": [
|
|
60
|
+
{
|
|
61
|
+
"message": "function parameter with default value",
|
|
62
|
+
"regexes": [
|
|
63
|
+
"\\([a-zA-Z0-9]+\\s*=\\s*[a-zA-Z0-9.]+[\\),]",
|
|
64
|
+
", [a-zA-Z]+\\s*=\\s*[0-9a-zA-Z]\\s*[,)]",
|
|
65
|
+
"^\\s*[a-zA-Z0-9]+\\s*=\\s*[a-zA-Z0-9.]+,"
|
|
66
|
+
],
|
|
67
|
+
"recommendation": {
|
|
68
|
+
"message": "Do not use defaults unless absolutely needed.",
|
|
69
|
+
"recommendations": [
|
|
70
|
+
"If this is required, for example in the user facing API, declare defaults as separate constants const DEFAULT_FUNCTION_NAME_PARAM_NAME. Yes super ugly, it should hurt.",
|
|
71
|
+
"Or load defaults from external file."
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
"badimports": {
|
|
78
|
+
"description": "Imports should follow strict rules.",
|
|
79
|
+
"fileFilter": "allTypeScript",
|
|
80
|
+
"warnings": [
|
|
81
|
+
{
|
|
82
|
+
"message": "No require() imports",
|
|
83
|
+
"regexes": ["= require\\(.*\\)"],
|
|
84
|
+
"recommendation": {
|
|
85
|
+
"message": "Replace with import…from statements."
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
"message": "Default exports not allowed. Names exports are safer",
|
|
90
|
+
"regexes": ["export default"],
|
|
91
|
+
"recommendation": {
|
|
92
|
+
"message": "Only named exports are allowed"
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
"enumerate": {
|
|
98
|
+
"description": "Don't use inline literals bullshit. Use enums",
|
|
99
|
+
"fileFilter": "allTypeScript",
|
|
100
|
+
"warnings": [
|
|
101
|
+
{
|
|
102
|
+
"message": "case used with literal instead of enum",
|
|
103
|
+
"regexes": ["case\\s*['\"][a-zA-Z0-9]+['\"]:"],
|
|
104
|
+
"recommendation": {
|
|
105
|
+
"message": "",
|
|
106
|
+
"recommendations": [
|
|
107
|
+
"Use values from variables",
|
|
108
|
+
"Request user to use enum.",
|
|
109
|
+
"Or create enum, if you are allowed to."
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"message": "inline union type used instead of enum",
|
|
115
|
+
"regexes": [
|
|
116
|
+
"['\"][a-zA-Z0-9]+['\"]\\s*\\|\\s*['\"][a-zA-Z0-9]+['\"]"
|
|
117
|
+
],
|
|
118
|
+
"recommendation": {
|
|
119
|
+
"message": "Don't inline values. Use enum.",
|
|
120
|
+
"recommendations": [
|
|
121
|
+
"Request user to use enum.",
|
|
122
|
+
"Or create enum, if you are allowed to."
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"message": "inline union type used instead of enum",
|
|
128
|
+
"regexes": [
|
|
129
|
+
"[a-zA-Z0-9?.]+\\s*\\|\\|\\s*['\"]{0,1}[a-zA-Z0-9]+['\"]{0,1}"
|
|
130
|
+
],
|
|
131
|
+
"recommendation": {
|
|
132
|
+
"message": "Don't inline values. Use enum.",
|
|
133
|
+
"recommendations": [
|
|
134
|
+
"Request user to use enum.",
|
|
135
|
+
"Or create enum, if you are allowed to."
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badimports.d.ts","sourceRoot":"","sources":["../../../src/commands/badimports.ts"],"names":[],"mappings":"AAEA,wBAAsB,iBAAiB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE9E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.badimportsCommand = badimportsCommand;
|
|
4
|
+
const scan_1 = require("./scan");
|
|
5
|
+
async function badimportsCommand(sourceDirectory) {
|
|
6
|
+
await (0, scan_1.scanCommand)(["badimports", sourceDirectory]);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=badimports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badimports.js","sourceRoot":"","sources":["../../../src/commands/badimports.ts"],"names":[],"mappings":";;AAEA,8CAEC;AAJD,iCAAqC;AAE9B,KAAK,UAAU,iBAAiB,CAAC,eAAuB;IAC7D,MAAM,IAAA,kBAAW,EAAC,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dirtydefaults.d.ts","sourceRoot":"","sources":["../../../src/commands/dirtydefaults.ts"],"names":[],"mappings":"AAEA,wBAAsB,oBAAoB,CACxC,eAAe,EAAE,MAAM,GACtB,OAAO,CAAC,IAAI,CAAC,CAEf"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.dirtydefaultsCommand = dirtydefaultsCommand;
|
|
4
|
+
const scan_1 = require("./scan");
|
|
5
|
+
async function dirtydefaultsCommand(sourceDirectory) {
|
|
6
|
+
await (0, scan_1.scanCommand)(['dirtydefaults', sourceDirectory]);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=dirtydefaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dirtydefaults.js","sourceRoot":"","sources":["../../../src/commands/dirtydefaults.ts"],"names":[],"mappings":";;AAEA,oDAIC;AAND,iCAAoC;AAE7B,KAAK,UAAU,oBAAoB,CACxC,eAAuB;IAEvB,MAAM,IAAA,kBAAW,EAAC,CAAC,eAAe,EAAE,eAAe,CAAC,CAAC,CAAA;AACvD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dm.d.ts","sourceRoot":"","sources":["../../../src/commands/dm.ts"],"names":[],"mappings":"AAQA,wBAAsB,SAAS,CAC7B,eAAe,GAAE,MAAiB,GACjC,OAAO,CAAC,IAAI,CAAC,CAuEf"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.dmCommand = dmCommand;
|
|
37
|
+
const path = __importStar(require("path"));
|
|
38
|
+
const fs = __importStar(require("fs"));
|
|
39
|
+
const ts_parser_1 = require("../utils/ts-parser");
|
|
40
|
+
async function dmCommand(sourceDirectory = 'foobar') {
|
|
41
|
+
const absolutePath = path.resolve(sourceDirectory);
|
|
42
|
+
if (!fs.existsSync(absolutePath)) {
|
|
43
|
+
throw new Error(`Directory not found: ${absolutePath}`);
|
|
44
|
+
}
|
|
45
|
+
if (!fs.statSync(absolutePath).isDirectory()) {
|
|
46
|
+
throw new Error(`Not a directory: ${absolutePath}`);
|
|
47
|
+
}
|
|
48
|
+
console.log(`Scanning directory: ${absolutePath}\n`);
|
|
49
|
+
const files = (0, ts_parser_1.scanDirectory)(absolutePath);
|
|
50
|
+
const allDeclarations = [];
|
|
51
|
+
for (const file of files) {
|
|
52
|
+
const declarations = (0, ts_parser_1.parseDeclarations)(file);
|
|
53
|
+
allDeclarations.push(...declarations);
|
|
54
|
+
}
|
|
55
|
+
if (allDeclarations.length === 0) {
|
|
56
|
+
console.log('No type declarations found.');
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
const groupedByType = {
|
|
60
|
+
interface: allDeclarations.filter((d) => d.type === 'interface'),
|
|
61
|
+
type: allDeclarations.filter((d) => d.type === 'type'),
|
|
62
|
+
enum: allDeclarations.filter((d) => d.type === 'enum'),
|
|
63
|
+
};
|
|
64
|
+
console.log('='.repeat(80));
|
|
65
|
+
console.log('DATA MODEL REPORT');
|
|
66
|
+
console.log('='.repeat(80));
|
|
67
|
+
console.log(`\nTotal declarations found: ${allDeclarations.length}\n`);
|
|
68
|
+
if (groupedByType.interface.length > 0) {
|
|
69
|
+
console.log(`\n${'─'.repeat(80)}`);
|
|
70
|
+
console.log(`INTERFACES (${groupedByType.interface.length})`);
|
|
71
|
+
console.log('─'.repeat(80));
|
|
72
|
+
for (const decl of groupedByType.interface) {
|
|
73
|
+
const relativePath = path.relative(process.cwd(), decl.file);
|
|
74
|
+
console.log(` ${decl.name}`);
|
|
75
|
+
console.log(` Location: ${relativePath}:${decl.line}`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (groupedByType.type.length > 0) {
|
|
79
|
+
console.log(`\n${'─'.repeat(80)}`);
|
|
80
|
+
console.log(`TYPES (${groupedByType.type.length})`);
|
|
81
|
+
console.log('─'.repeat(80));
|
|
82
|
+
for (const decl of groupedByType.type) {
|
|
83
|
+
const relativePath = path.relative(process.cwd(), decl.file);
|
|
84
|
+
console.log(` ${decl.name}`);
|
|
85
|
+
console.log(` Location: ${relativePath}:${decl.line}`);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
if (groupedByType.enum.length > 0) {
|
|
89
|
+
console.log(`\n${'─'.repeat(80)}`);
|
|
90
|
+
console.log(`ENUMS (${groupedByType.enum.length})`);
|
|
91
|
+
console.log('─'.repeat(80));
|
|
92
|
+
for (const decl of groupedByType.enum) {
|
|
93
|
+
const relativePath = path.relative(process.cwd(), decl.file);
|
|
94
|
+
console.log(` ${decl.name}`);
|
|
95
|
+
console.log(` Location: ${relativePath}:${decl.line}`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
console.log(`\n${'='.repeat(80)}\n`);
|
|
99
|
+
}
|
|
100
|
+
//# sourceMappingURL=dm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dm.js","sourceRoot":"","sources":["../../../src/commands/dm.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,8BAyEC;AAjFD,2CAA4B;AAC5B,uCAAwB;AACxB,kDAI2B;AAEpB,KAAK,UAAU,SAAS,CAC7B,kBAA0B,QAAQ;IAElC,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAA;IAElD,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QACjC,MAAM,IAAI,KAAK,CAAC,wBAAwB,YAAY,EAAE,CAAC,CAAA;IACzD,CAAC;IAED,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;QAC7C,MAAM,IAAI,KAAK,CAAC,oBAAoB,YAAY,EAAE,CAAC,CAAA;IACrD,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,uBAAuB,YAAY,IAAI,CAAC,CAAA;IAEpD,MAAM,KAAK,GAAG,IAAA,yBAAa,EAAC,YAAY,CAAC,CAAA;IACzC,MAAM,eAAe,GAAkB,EAA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;QAClC,OAAO,CAAC,GAAG,CAAC,UAAU,aAAa,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAA;QACnD,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAA;QAC3B,KAAK,MAAM,IAAI,IAAI,aAAa,CAAC,IAAI,EAAE,CAAC;YACtC,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;YAC5D,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;YAC7B,OAAO,CAAC,GAAG,CAAC,iBAAiB,YAAY,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC,CAAA;QAC3D,CAAC;IACH,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,CAAA;AACtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enumerate.d.ts","sourceRoot":"","sources":["../../../src/commands/enumerate.ts"],"names":[],"mappings":"AAEA,wBAAsB,gBAAgB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE7E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.enumerateCommand = enumerateCommand;
|
|
4
|
+
const scan_1 = require("./scan");
|
|
5
|
+
async function enumerateCommand(sourceDirectory) {
|
|
6
|
+
await (0, scan_1.scanCommand)(["enumerate", sourceDirectory]);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=enumerate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enumerate.js","sourceRoot":"","sources":["../../../src/commands/enumerate.ts"],"names":[],"mappings":";;AAEA,4CAEC;AAJD,iCAAqC;AAE9B,KAAK,UAAU,gBAAgB,CAAC,eAAuB;IAC5D,MAAM,IAAA,kBAAW,EAAC,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expectmagic.d.ts","sourceRoot":"","sources":["../../../src/commands/expectmagic.ts"],"names":[],"mappings":"AAEA,wBAAsB,kBAAkB,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.expectmagicCommand = expectmagicCommand;
|
|
4
|
+
const scan_1 = require("./scan");
|
|
5
|
+
async function expectmagicCommand(sourceDirectory) {
|
|
6
|
+
await (0, scan_1.scanCommand)(["expectmagic", sourceDirectory]);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=expectmagic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expectmagic.js","sourceRoot":"","sources":["../../../src/commands/expectmagic.ts"],"names":[],"mappings":";;AAEA,gDAEC;AAJD,iCAAqC;AAE9B,KAAK,UAAU,kBAAkB,CAAC,eAAuB;IAC9D,MAAM,IAAA,kBAAW,EAAC,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/commands/fixtures.ts"],"names":[],"mappings":"AAEA,wBAAsB,eAAe,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE5E"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.fixturesCommand = fixturesCommand;
|
|
4
|
+
const scan_1 = require("./scan");
|
|
5
|
+
async function fixturesCommand(sourceDirectory) {
|
|
6
|
+
await (0, scan_1.scanCommand)(["fixtures", sourceDirectory]);
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fixtures.js","sourceRoot":"","sources":["../../../src/commands/fixtures.ts"],"names":[],"mappings":";;AAEA,0CAEC;AAJD,iCAAqC;AAE9B,KAAK,UAAU,eAAe,CAAC,eAAuB;IAC3D,MAAM,IAAA,kBAAW,EAAC,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/commands/init.ts"],"names":[],"mappings":"AAGA,wBAAsB,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAgCjD"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.initCommand = initCommand;
|
|
37
|
+
const path = __importStar(require("path"));
|
|
38
|
+
const fs = __importStar(require("fs"));
|
|
39
|
+
async function initCommand() {
|
|
40
|
+
const targetPath = path.resolve(".snitchconfig.json");
|
|
41
|
+
if (fs.existsSync(targetPath)) {
|
|
42
|
+
console.log("⚠️ .snitchconfig.json already exists in current directory");
|
|
43
|
+
console.log(` Location: ${targetPath}`);
|
|
44
|
+
console.log("\nNo changes made.");
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
// The bundled config is at the root of the package
|
|
48
|
+
// When installed via npm, it will be in node_modules/@baw/snitch/
|
|
49
|
+
// __dirname is dist/src/commands, so we go up 3 levels to package root
|
|
50
|
+
let sourcePath = path.resolve(__dirname, "../../../.snitchconfig.json");
|
|
51
|
+
if (!fs.existsSync(sourcePath)) {
|
|
52
|
+
// Try alternative path for local development (dist/src/commands -> project root)
|
|
53
|
+
sourcePath = path.resolve(__dirname, "../../..", ".snitchconfig.json");
|
|
54
|
+
if (!fs.existsSync(sourcePath)) {
|
|
55
|
+
throw new Error(`Could not find .snitchconfig.json template.\nSearched: ${sourcePath}\nThis is likely a packaging issue.`);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const configContent = fs.readFileSync(sourcePath, "utf-8");
|
|
59
|
+
fs.writeFileSync(targetPath, configContent, "utf-8");
|
|
60
|
+
console.log("✓ Created .snitchconfig.json in current directory");
|
|
61
|
+
console.log(` Location: ${targetPath}`);
|
|
62
|
+
console.log("\nYou can now customize the configuration for your project.");
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=init.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../../src/commands/init.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,kCAgCC;AAnCD,2CAA6B;AAC7B,uCAAyB;AAElB,KAAK,UAAU,WAAW;IAC/B,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAEtD,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,4DAA4D,CAAC,CAAC;QAC1E,OAAO,CAAC,GAAG,CAAC,gBAAgB,UAAU,EAAE,CAAC,CAAC;QAC1C,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAC;QAClC,OAAO;IACT,CAAC;IAED,mDAAmD;IACnD,kEAAkE;IAClE,uEAAuE;IACvE,IAAI,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,6BAA6B,CAAC,CAAC;IAExE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/B,iFAAiF;QACjF,UAAU,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,EAAE,oBAAoB,CAAC,CAAC;QAEvE,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;YAC/B,MAAM,IAAI,KAAK,CACb,0DAA0D,UAAU,qCAAqC,CAC1G,CAAC;QACJ,CAAC;IACH,CAAC;IAED,MAAM,aAAa,GAAG,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAC3D,EAAE,CAAC,aAAa,CAAC,UAAU,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;IAErD,OAAO,CAAC,GAAG,CAAC,mDAAmD,CAAC,CAAC;IACjE,OAAO,CAAC,GAAG,CAAC,eAAe,UAAU,EAAE,CAAC,CAAC;IACzC,OAAO,CAAC,GAAG,CAAC,6DAA6D,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan.d.ts","sourceRoot":"","sources":["../../../src/commands/scan.ts"],"names":[],"mappings":"AAoBA,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CA8DjE"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.scanCommand = scanCommand;
|
|
37
|
+
const path = __importStar(require("path"));
|
|
38
|
+
const fs = __importStar(require("fs"));
|
|
39
|
+
const pattern_scanner_1 = require("../utils/pattern-scanner");
|
|
40
|
+
async function scanCommand(params) {
|
|
41
|
+
if (params.length === 0) {
|
|
42
|
+
console.error("Error: Scan name is required");
|
|
43
|
+
console.log("\nUsage: snitch scan <scan-name> [directory]");
|
|
44
|
+
console.log("\nAvailable scans:");
|
|
45
|
+
const configPath = path.resolve(".snitchconfig.json");
|
|
46
|
+
if (fs.existsSync(configPath)) {
|
|
47
|
+
const config = JSON.parse(fs.readFileSync(configPath, "utf-8"));
|
|
48
|
+
for (const [name, scan] of Object.entries(config.scans)) {
|
|
49
|
+
console.log(` ${name} - ${scan.description}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
process.exit(1);
|
|
53
|
+
}
|
|
54
|
+
const scanName = params[0];
|
|
55
|
+
const sourceDirectory = params.length > 1 ? params[1] : ".";
|
|
56
|
+
const absolutePath = path.resolve(sourceDirectory);
|
|
57
|
+
if (!fs.existsSync(absolutePath)) {
|
|
58
|
+
throw new Error(`Directory not found: ${absolutePath}`);
|
|
59
|
+
}
|
|
60
|
+
if (!fs.statSync(absolutePath).isDirectory()) {
|
|
61
|
+
throw new Error(`Not a directory: ${absolutePath}`);
|
|
62
|
+
}
|
|
63
|
+
const configPath = path.resolve(".snitchconfig.json");
|
|
64
|
+
if (!fs.existsSync(configPath)) {
|
|
65
|
+
throw new Error(`Config file not found: ${configPath}\nPlease create .snitchconfig.json in your project root.`);
|
|
66
|
+
}
|
|
67
|
+
const config = JSON.parse(fs.readFileSync(configPath, "utf-8"));
|
|
68
|
+
const scanDef = config.scans[scanName];
|
|
69
|
+
if (!scanDef) {
|
|
70
|
+
throw new Error(`Scan '${scanName}' not found in config.\nAvailable scans: ${Object.keys(config.scans).join(", ")}`);
|
|
71
|
+
}
|
|
72
|
+
const fileFilter = pattern_scanner_1.FILE_FILTERS[scanDef.fileFilter];
|
|
73
|
+
if (!fileFilter) {
|
|
74
|
+
throw new Error(`Invalid file filter: ${scanDef.fileFilter}\nAvailable filters: ${Object.keys(pattern_scanner_1.FILE_FILTERS).join(", ")}`);
|
|
75
|
+
}
|
|
76
|
+
console.log(`Scanning directory: ${absolutePath}\n`);
|
|
77
|
+
const files = (0, pattern_scanner_1.scanFiles)(absolutePath, fileFilter);
|
|
78
|
+
const violations = (0, pattern_scanner_1.findViolations)(files, { warnings: scanDef.warnings });
|
|
79
|
+
(0, pattern_scanner_1.printReport)(violations, `${scanName} violations report`);
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=scan.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scan.js","sourceRoot":"","sources":["../../../src/commands/scan.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,kCA8DC;AAlFD,2CAA6B;AAC7B,uCAAyB;AACzB,8DAMkC;AAY3B,KAAK,UAAU,WAAW,CAAC,MAAgB;IAChD,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACxB,OAAO,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;Q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