@aiready/pattern-detect 0.17.14 → 0.17.16
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/dist/analyzer-entry/index.d.mts +2 -2
- package/dist/analyzer-entry/index.d.ts +2 -2
- package/dist/analyzer-entry/index.js +391 -89
- package/dist/analyzer-entry/index.mjs +4 -4
- package/dist/chunk-3LMYFYWG.mjs +514 -0
- package/dist/chunk-4SKGAZEW.mjs +514 -0
- package/dist/chunk-4YXKUW4P.mjs +143 -0
- package/dist/chunk-5A3ULAQ5.mjs +571 -0
- package/dist/chunk-5FACKJ7M.mjs +519 -0
- package/dist/chunk-6B72OWZA.mjs +143 -0
- package/dist/chunk-6SHBBRHF.mjs +600 -0
- package/dist/chunk-ATXO4JL7.mjs +404 -0
- package/dist/chunk-BKSIA7A2.mjs +516 -0
- package/dist/chunk-CM5YJR7G.mjs +516 -0
- package/dist/chunk-F42Q2M4O.mjs +143 -0
- package/dist/chunk-FSXOU23F.mjs +620 -0
- package/dist/chunk-GUYQI3AF.mjs +514 -0
- package/dist/chunk-H2TGXGMX.mjs +587 -0
- package/dist/chunk-JWP5TCDM.mjs +143 -0
- package/dist/chunk-KDXWIT6W.mjs +408 -0
- package/dist/chunk-KMAOEVRS.mjs +150 -0
- package/dist/chunk-KZQXBBR3.mjs +143 -0
- package/dist/chunk-NVV4UFIV.mjs +514 -0
- package/dist/chunk-NWG2ZIGX.mjs +146 -0
- package/dist/chunk-OFVJFGQW.mjs +514 -0
- package/dist/chunk-PCCZREHY.mjs +143 -0
- package/dist/chunk-PFA2DO73.mjs +392 -0
- package/dist/chunk-PQS5ACTN.mjs +516 -0
- package/dist/chunk-TVE75IDM.mjs +143 -0
- package/dist/chunk-UDOGQ42Q.mjs +603 -0
- package/dist/chunk-UFI4UDQI.mjs +514 -0
- package/dist/chunk-UXV57HN3.mjs +144 -0
- package/dist/chunk-VC2BOV6R.mjs +143 -0
- package/dist/chunk-VI2OVG73.mjs +514 -0
- package/dist/chunk-VKGYNHFY.mjs +514 -0
- package/dist/chunk-WBLZYAQ2.mjs +518 -0
- package/dist/chunk-WFVXMMB3.mjs +143 -0
- package/dist/chunk-WQC43BIO.mjs +516 -0
- package/dist/chunk-WQX7IHAN.mjs +514 -0
- package/dist/chunk-WTAIM3SG.mjs +146 -0
- package/dist/chunk-XC7U55PE.mjs +514 -0
- package/dist/chunk-XR373Q6G.mjs +146 -0
- package/dist/chunk-XWIBTD67.mjs +620 -0
- package/dist/chunk-YUQ2VQVJ.mjs +514 -0
- package/dist/chunk-Z4NOH52X.mjs +143 -0
- package/dist/cli.js +395 -93
- package/dist/cli.mjs +8 -8
- package/dist/context-rules-entry/index.js +385 -88
- package/dist/context-rules-entry/index.mjs +1 -1
- package/dist/detector-entry/index.d.mts +2 -2
- package/dist/detector-entry/index.d.ts +2 -2
- package/dist/detector-entry/index.js +389 -89
- package/dist/detector-entry/index.mjs +2 -2
- package/dist/index-BGvkJ9j1.d.mts +136 -0
- package/dist/index-BJq32qmj.d.mts +137 -0
- package/dist/index-BpoJSgX-.d.mts +136 -0
- package/dist/index-C7qLPKmH.d.ts +150 -0
- package/dist/index-CThnG9hv.d.ts +155 -0
- package/dist/index-D0Hpg9nN.d.mts +150 -0
- package/dist/index-DN6XpBOW.d.mts +155 -0
- package/dist/index-F8xqZ2PS.d.ts +136 -0
- package/dist/index-HNhDr6CV.d.ts +137 -0
- package/dist/index-ux0Wo8Ps.d.ts +136 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +393 -91
- package/dist/index.mjs +6 -6
- package/dist/scoring-entry/index.d.mts +1 -1
- package/dist/scoring-entry/index.d.ts +1 -1
- package/dist/scoring-entry/index.js +2 -2
- package/dist/scoring-entry/index.mjs +1 -1
- package/dist/types-tgrmUrHE.d.mts +37 -0
- package/dist/types-tgrmUrHE.d.ts +37 -0
- package/package.json +8 -6
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Severity } from '@aiready/core';
|
|
2
|
+
|
|
3
|
+
type PatternType = 'api-handler' | 'validator' | 'utility' | 'class-method' | 'component' | 'function' | 'unknown';
|
|
4
|
+
interface DuplicatePattern {
|
|
5
|
+
file1: string;
|
|
6
|
+
line1: number;
|
|
7
|
+
endLine1: number;
|
|
8
|
+
file2: string;
|
|
9
|
+
line2: number;
|
|
10
|
+
endLine2: number;
|
|
11
|
+
code1: string;
|
|
12
|
+
code2: string;
|
|
13
|
+
similarity: number;
|
|
14
|
+
confidence: number;
|
|
15
|
+
patternType: PatternType;
|
|
16
|
+
tokenCost: number;
|
|
17
|
+
severity: Severity;
|
|
18
|
+
reason?: string;
|
|
19
|
+
suggestion?: string;
|
|
20
|
+
matchedRule?: string;
|
|
21
|
+
}
|
|
22
|
+
interface DetectionOptions {
|
|
23
|
+
minSimilarity: number;
|
|
24
|
+
minLines: number;
|
|
25
|
+
batchSize: number;
|
|
26
|
+
approx: boolean;
|
|
27
|
+
minSharedTokens: number;
|
|
28
|
+
maxCandidatesPerBlock: number;
|
|
29
|
+
streamResults: boolean;
|
|
30
|
+
excludePatterns?: string[];
|
|
31
|
+
excludeFiles?: string[];
|
|
32
|
+
confidenceThreshold?: number;
|
|
33
|
+
ignoreWhitelist?: string[];
|
|
34
|
+
onProgress?: (processed: number, total: number, message: string) => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type { DuplicatePattern as D, PatternType as P, DetectionOptions as a };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Severity } from '@aiready/core';
|
|
2
|
+
|
|
3
|
+
type PatternType = 'api-handler' | 'validator' | 'utility' | 'class-method' | 'component' | 'function' | 'unknown';
|
|
4
|
+
interface DuplicatePattern {
|
|
5
|
+
file1: string;
|
|
6
|
+
line1: number;
|
|
7
|
+
endLine1: number;
|
|
8
|
+
file2: string;
|
|
9
|
+
line2: number;
|
|
10
|
+
endLine2: number;
|
|
11
|
+
code1: string;
|
|
12
|
+
code2: string;
|
|
13
|
+
similarity: number;
|
|
14
|
+
confidence: number;
|
|
15
|
+
patternType: PatternType;
|
|
16
|
+
tokenCost: number;
|
|
17
|
+
severity: Severity;
|
|
18
|
+
reason?: string;
|
|
19
|
+
suggestion?: string;
|
|
20
|
+
matchedRule?: string;
|
|
21
|
+
}
|
|
22
|
+
interface DetectionOptions {
|
|
23
|
+
minSimilarity: number;
|
|
24
|
+
minLines: number;
|
|
25
|
+
batchSize: number;
|
|
26
|
+
approx: boolean;
|
|
27
|
+
minSharedTokens: number;
|
|
28
|
+
maxCandidatesPerBlock: number;
|
|
29
|
+
streamResults: boolean;
|
|
30
|
+
excludePatterns?: string[];
|
|
31
|
+
excludeFiles?: string[];
|
|
32
|
+
confidenceThreshold?: number;
|
|
33
|
+
ignoreWhitelist?: string[];
|
|
34
|
+
onProgress?: (processed: number, total: number, message: string) => void;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export type { DuplicatePattern as D, PatternType as P, DetectionOptions as a };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aiready/pattern-detect",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.16",
|
|
4
4
|
"description": "Semantic duplicate pattern detection for AI-generated code - finds similar implementations that waste AI context tokens",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -56,16 +56,16 @@
|
|
|
56
56
|
"license": "MIT",
|
|
57
57
|
"repository": {
|
|
58
58
|
"type": "git",
|
|
59
|
-
"url": "https://github.com/
|
|
59
|
+
"url": "https://github.com/getaiready/aiready-pattern-detect.git"
|
|
60
60
|
},
|
|
61
|
-
"homepage": "https://github.com/
|
|
61
|
+
"homepage": "https://github.com/getaiready/aiready-pattern-detect",
|
|
62
62
|
"bugs": {
|
|
63
|
-
"url": "https://github.com/
|
|
63
|
+
"url": "https://github.com/getaiready/aiready-pattern-detect/issues"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"commander": "^14.0.0",
|
|
67
67
|
"chalk": "^5.3.0",
|
|
68
|
-
"@aiready/core": "0.24.
|
|
68
|
+
"@aiready/core": "0.24.19"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"tsup": "^8.3.5",
|
|
@@ -91,6 +91,8 @@
|
|
|
91
91
|
"clean": "rm -rf dist",
|
|
92
92
|
"release": "pnpm build && pnpm publish --no-git-checks",
|
|
93
93
|
"type-check": "tsc --noEmit",
|
|
94
|
-
"format-check": "prettier --check . --ignore-path ../../.prettierignore"
|
|
94
|
+
"format-check": "prettier --check . --ignore-path ../../.prettierignore",
|
|
95
|
+
"format": "prettier --write . --ignore-path ../../.prettierignore",
|
|
96
|
+
"lint:fix": "eslint . --fix"
|
|
95
97
|
}
|
|
96
98
|
}
|