@lakindu_perera/toren 1.0.10 → 1.1.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/CHANGELOG.md +20 -0
- package/README.md +2 -0
- package/dist/cli/toren.js +2 -1
- package/dist/cli/toren.js.map +1 -1
- package/dist/detectors/evidence-weights.d.ts +101 -0
- package/dist/detectors/evidence-weights.js +135 -0
- package/dist/detectors/evidence-weights.js.map +1 -0
- package/dist/detectors/technology-stack-detector.d.ts +111 -0
- package/dist/detectors/technology-stack-detector.js +1730 -0
- package/dist/detectors/technology-stack-detector.js.map +1 -0
- package/dist/focused-output.js +63 -2
- package/dist/focused-output.js.map +1 -1
- package/dist/renderers/console-renderer.js +51 -0
- package/dist/renderers/console-renderer.js.map +1 -1
- package/dist/renderers/html-renderer.js +79 -0
- package/dist/renderers/html-renderer.js.map +1 -1
- package/dist/renderers/json-renderer.js +2 -0
- package/dist/renderers/json-renderer.js.map +1 -1
- package/dist/renderers/markdown-renderer.js +56 -0
- package/dist/renderers/markdown-renderer.js.map +1 -1
- package/dist/scanner/scan.d.ts +19 -0
- package/dist/scanner/scan.js +64 -31
- package/dist/scanner/scan.js.map +1 -1
- package/dist/types/index.d.ts +64 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,26 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.1.1] - 2026-09-13
|
|
9
|
+
### Changed
|
|
10
|
+
- **Accuracy and Confidence Scoring**: Evidence scoring logic has been centralized and optimized.
|
|
11
|
+
- **Minimum Evidence Requirements**: A secondary guard prevents false-positive detections from weak signals (like config files) if strong signals (like package manager dependencies) are missing.
|
|
12
|
+
- **Deduplication and Determinism**: Evidence lists and technology output order are now guaranteed to be perfectly deterministic and deduplicated.
|
|
13
|
+
- **Renderer Hardening and XSS Protection**: Technology stack output is now fully integrated into Markdown and HTML outputs, with strict escaping applied to protect against XSS vulnerabilities.
|
|
14
|
+
- **Extensive Test Coverage**: Added comprehensive false-positive and deterministic regression test suites. Over 150+ new tests added.
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.1.0] - 2026-09-09
|
|
18
|
+
### Added
|
|
19
|
+
- Technology Stack detector for Testing, Build, Quality, Container, and Deployment tools.
|
|
20
|
+
- `--tech-stack` (and `--stack` alias) CLI flag for focused technology breakdown.
|
|
21
|
+
- Technology Stack section included in JSON, Console, Markdown, and HTML outputs.
|
|
22
|
+
- **Backend Framework Detection**: Detects Node.js (Express, Fastify, NestJS, Koa, Hapi), Python (Django, Flask, FastAPI), Java (Spring Boot), PHP (Laravel), and Ruby (Rails) backends using package dependency and structural file evidence only.
|
|
23
|
+
- **Database Detection**: Detects PostgreSQL, MySQL, MariaDB, SQLite, MongoDB, and Redis from package dependencies and config/schema files. Never reads `.env` files or credentials.
|
|
24
|
+
- **ORM / Data-Access Detection**: Independently detects Prisma, Drizzle, TypeORM, Sequelize, Mongoose, Knex, SQLAlchemy, Hibernate, Django ORM, Eloquent, and Active Record. ORMs are never inferred from database type and vice-versa.
|
|
25
|
+
- **Safety Guarantees**: `.env`, `.env.*` secret files are never read or inspected. Database URLs and credentials are never used as evidence. All signals are structural (package names, file presence, config files).
|
|
26
|
+
- **128 new tests** covering all backend, database, ORM detectors plus false-positive guards, `.env` safety, category ordering, and `scan()` integration fixtures.
|
|
27
|
+
|
|
8
28
|
## [1.0.10] - 2026-09-06
|
|
9
29
|
### Added
|
|
10
30
|
- **Full Tree Output**: Added a new `--all` (or `-a`) flag to the CLI. This flag bypasses the default display limit and prints the complete directory tree without hiding any files or folders, making it easier to view, copy, or document the entire file structure.
|
package/README.md
CHANGED
|
@@ -74,6 +74,7 @@ toren --scripts
|
|
|
74
74
|
toren --summary
|
|
75
75
|
toren --important-files
|
|
76
76
|
toren --health
|
|
77
|
+
toren --stack
|
|
77
78
|
|
|
78
79
|
# Lifecycle & Help Commands
|
|
79
80
|
toren --help
|
|
@@ -96,6 +97,7 @@ toren --uninstall
|
|
|
96
97
|
| `--summary` | Show project summary only. |
|
|
97
98
|
| `--important-files` | Show important files only. |
|
|
98
99
|
| `--health` | Show project health observations only. |
|
|
100
|
+
| `--stack`, `--tech-stack` | Show detected technology stack only. |
|
|
99
101
|
| `--format <type>` | Output format: `console` (default), `json`, `markdown`, `html`. |
|
|
100
102
|
| `--include-hidden` | Include hidden files and dot-directories in the scan. |
|
|
101
103
|
| `--max-files <n>` | Override the default 50,000-file scan limit. |
|
package/dist/cli/toren.js
CHANGED
|
@@ -64,7 +64,8 @@ Fast Repository Discovery CLI
|
|
|
64
64
|
--scripts Show available package scripts only
|
|
65
65
|
--summary Show project summary only
|
|
66
66
|
--important-files Show important files only
|
|
67
|
-
--health Show project health observations
|
|
67
|
+
--health Show project health observations
|
|
68
|
+
--stack, --tech-stack Show detected technology stack only
|
|
68
69
|
--include-hidden Include hidden files and folders
|
|
69
70
|
--all, -a Show complete directory tree without limits
|
|
70
71
|
--max-files <n> Set scan file limit
|
package/dist/cli/toren.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toren.js","sourceRoot":"","sources":["../../src/cli/toren.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,MAAe,oBAAoB,CAAC;AACnD,OAAO,SAAS,MAAc,uBAAuB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE1D,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,CAAC,GA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,EAAG,GAAW,CAAC,WAAW,CAAC,CAAC;YAClG,CAAC;iBAAM,CAAC;gBACN,UAAU,CAAC,aAAa,EAAG,GAAW,CAAC,OAAO,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,EAAE,CAAC"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Toren — Centralized Evidence Weight Model (v1.1.1)
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for evidence confidence contributions.
|
|
5
|
+
* All technology detection rules MUST reference these weights rather than
|
|
6
|
+
* embedding raw numbers independently.
|
|
7
|
+
*
|
|
8
|
+
* Design principles:
|
|
9
|
+
* - Deterministic: same evidence always yields the same weight.
|
|
10
|
+
* - Strongly typed: TechnologyEvidenceType is the key.
|
|
11
|
+
* - Immutable: `as const` prevents accidental mutation.
|
|
12
|
+
* - Capped externally: callers cap the total at 1.0 via `capConfidence()`.
|
|
13
|
+
* - Zero runtime dependencies.
|
|
14
|
+
*
|
|
15
|
+
* Evidence strength tiers:
|
|
16
|
+
* STRONG (≥ 0.60): dependency, devDependency, peerDependency, manifest
|
|
17
|
+
* - A single strong signal alone crosses the 0.60 detection threshold.
|
|
18
|
+
* - Suitable for package.json entries and canonical manifest files.
|
|
19
|
+
* MODERATE (0.20–0.25): config, script
|
|
20
|
+
* - Provides meaningful supporting evidence but cannot stand alone.
|
|
21
|
+
* WEAK (0.10–0.15): file, directory
|
|
22
|
+
* - Supplements strong detections but never creates one independently.
|
|
23
|
+
*
|
|
24
|
+
* @module detectors/evidence-weights
|
|
25
|
+
*/
|
|
26
|
+
import type { TechnologyEvidenceType } from '../types/index.js';
|
|
27
|
+
/**
|
|
28
|
+
* Confidence contribution for each evidence kind.
|
|
29
|
+
*
|
|
30
|
+
* Values chosen to satisfy the following invariants:
|
|
31
|
+
* 1. One strong signal alone (dep/devDep/peerDep/manifest) crosses 0.60 threshold.
|
|
32
|
+
* 2. One weak signal alone (file/dir) does NOT cross 0.60 threshold.
|
|
33
|
+
* 3. One config alone (0.25) does NOT cross 0.60 threshold.
|
|
34
|
+
* 4. dep(0.60) + config(0.25) = 0.85 — consistent with existing tests.
|
|
35
|
+
* 5. dep(0.60) + config(0.25) + file(0.15) = 1.00 — consistent with existing tests.
|
|
36
|
+
* 6. peerDep(0.55) alone crosses 0.60 — WAIT, 0.55 < 0.60. Let peers be 0.60 too for
|
|
37
|
+
* backwards compat, or use a nuanced threshold. We keep peerDep = 0.60 for now.
|
|
38
|
+
*/
|
|
39
|
+
export declare const EVIDENCE_WEIGHTS: {
|
|
40
|
+
/** Direct runtime dependency in package.json `dependencies`. */
|
|
41
|
+
readonly dependency: 0.6;
|
|
42
|
+
/** Development dependency in package.json `devDependencies`. */
|
|
43
|
+
readonly devDependency: 0.6;
|
|
44
|
+
/** Peer dependency in package.json `peerDependencies`. */
|
|
45
|
+
readonly peerDependency: 0.6;
|
|
46
|
+
/** A recognised framework/tool configuration file (e.g. tailwind.config.ts). */
|
|
47
|
+
readonly config: 0.25;
|
|
48
|
+
/** A specific file whose presence indicates a technology (e.g. schema.prisma). */
|
|
49
|
+
readonly file: 0.15;
|
|
50
|
+
/** A specific directory whose presence supports detection (supplementary only). */
|
|
51
|
+
readonly directory: 0.15;
|
|
52
|
+
/** A package.json script keyword that invokes a tool. */
|
|
53
|
+
readonly script: 0.15;
|
|
54
|
+
/**
|
|
55
|
+
* A non-package.json manifest file (e.g. Dockerfile, Gemfile, manage.py).
|
|
56
|
+
* Treated as strong evidence, equivalent to a direct dependency.
|
|
57
|
+
*/
|
|
58
|
+
readonly manifest: 0.6;
|
|
59
|
+
};
|
|
60
|
+
/** Ordered list of evidence types from strongest to weakest. */
|
|
61
|
+
export declare const EVIDENCE_TYPE_ORDER: TechnologyEvidenceType[];
|
|
62
|
+
/** Evidence types that are considered "strong" (≥ 0.60 threshold by themselves). */
|
|
63
|
+
export declare const STRONG_EVIDENCE_TYPES: Set<TechnologyEvidenceType>;
|
|
64
|
+
/**
|
|
65
|
+
* Returns the confidence weight for a given evidence type.
|
|
66
|
+
*
|
|
67
|
+
* @param type - The evidence kind to look up.
|
|
68
|
+
* @returns The confidence contribution in the range [0, 1].
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* getEvidenceWeight('dependency') // 0.60
|
|
72
|
+
* getEvidenceWeight('config') // 0.25
|
|
73
|
+
* getEvidenceWeight('directory') // 0.15
|
|
74
|
+
*/
|
|
75
|
+
export declare function getEvidenceWeight(type: TechnologyEvidenceType): number;
|
|
76
|
+
/**
|
|
77
|
+
* Returns true if the evidence type is considered "strong" — i.e., a single
|
|
78
|
+
* piece of this evidence alone can cross the detection threshold.
|
|
79
|
+
*
|
|
80
|
+
* @param type - The evidence kind to check.
|
|
81
|
+
*/
|
|
82
|
+
export declare function isStrongEvidence(type: TechnologyEvidenceType): boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Cap a raw confidence score at exactly 1.0 and round to 2 decimal places
|
|
85
|
+
* to avoid floating-point representation issues (e.g. 0.8500000000000001).
|
|
86
|
+
*
|
|
87
|
+
* Rounding is applied BEFORE the cap so the cap always produces a clean 1.00.
|
|
88
|
+
*
|
|
89
|
+
* @param rawScore - Accumulated raw score (may exceed 1.0).
|
|
90
|
+
* @returns Confidence in [0.00, 1.00] rounded to 2 decimal places.
|
|
91
|
+
*/
|
|
92
|
+
export declare function capConfidence(rawScore: number): number;
|
|
93
|
+
/**
|
|
94
|
+
* Returns the sort rank for an evidence type used in deterministic ordering.
|
|
95
|
+
* Lower rank = displayed first.
|
|
96
|
+
*
|
|
97
|
+
* Ordering: dependency < devDependency < peerDependency < manifest <
|
|
98
|
+
* config < script < file < directory
|
|
99
|
+
* Within the same type, values are sorted alphabetically.
|
|
100
|
+
*/
|
|
101
|
+
export declare function evidenceTypeRank(type: TechnologyEvidenceType): number;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Toren — Centralized Evidence Weight Model (v1.1.1)
|
|
3
|
+
*
|
|
4
|
+
* Single source of truth for evidence confidence contributions.
|
|
5
|
+
* All technology detection rules MUST reference these weights rather than
|
|
6
|
+
* embedding raw numbers independently.
|
|
7
|
+
*
|
|
8
|
+
* Design principles:
|
|
9
|
+
* - Deterministic: same evidence always yields the same weight.
|
|
10
|
+
* - Strongly typed: TechnologyEvidenceType is the key.
|
|
11
|
+
* - Immutable: `as const` prevents accidental mutation.
|
|
12
|
+
* - Capped externally: callers cap the total at 1.0 via `capConfidence()`.
|
|
13
|
+
* - Zero runtime dependencies.
|
|
14
|
+
*
|
|
15
|
+
* Evidence strength tiers:
|
|
16
|
+
* STRONG (≥ 0.60): dependency, devDependency, peerDependency, manifest
|
|
17
|
+
* - A single strong signal alone crosses the 0.60 detection threshold.
|
|
18
|
+
* - Suitable for package.json entries and canonical manifest files.
|
|
19
|
+
* MODERATE (0.20–0.25): config, script
|
|
20
|
+
* - Provides meaningful supporting evidence but cannot stand alone.
|
|
21
|
+
* WEAK (0.10–0.15): file, directory
|
|
22
|
+
* - Supplements strong detections but never creates one independently.
|
|
23
|
+
*
|
|
24
|
+
* @module detectors/evidence-weights
|
|
25
|
+
*/
|
|
26
|
+
// ---------------------------------------------------------------------------
|
|
27
|
+
// Evidence weight table
|
|
28
|
+
// ---------------------------------------------------------------------------
|
|
29
|
+
/**
|
|
30
|
+
* Confidence contribution for each evidence kind.
|
|
31
|
+
*
|
|
32
|
+
* Values chosen to satisfy the following invariants:
|
|
33
|
+
* 1. One strong signal alone (dep/devDep/peerDep/manifest) crosses 0.60 threshold.
|
|
34
|
+
* 2. One weak signal alone (file/dir) does NOT cross 0.60 threshold.
|
|
35
|
+
* 3. One config alone (0.25) does NOT cross 0.60 threshold.
|
|
36
|
+
* 4. dep(0.60) + config(0.25) = 0.85 — consistent with existing tests.
|
|
37
|
+
* 5. dep(0.60) + config(0.25) + file(0.15) = 1.00 — consistent with existing tests.
|
|
38
|
+
* 6. peerDep(0.55) alone crosses 0.60 — WAIT, 0.55 < 0.60. Let peers be 0.60 too for
|
|
39
|
+
* backwards compat, or use a nuanced threshold. We keep peerDep = 0.60 for now.
|
|
40
|
+
*/
|
|
41
|
+
export const EVIDENCE_WEIGHTS = {
|
|
42
|
+
/** Direct runtime dependency in package.json `dependencies`. */
|
|
43
|
+
dependency: 0.60,
|
|
44
|
+
/** Development dependency in package.json `devDependencies`. */
|
|
45
|
+
devDependency: 0.60,
|
|
46
|
+
/** Peer dependency in package.json `peerDependencies`. */
|
|
47
|
+
peerDependency: 0.60,
|
|
48
|
+
/** A recognised framework/tool configuration file (e.g. tailwind.config.ts). */
|
|
49
|
+
config: 0.25,
|
|
50
|
+
/** A specific file whose presence indicates a technology (e.g. schema.prisma). */
|
|
51
|
+
file: 0.15,
|
|
52
|
+
/** A specific directory whose presence supports detection (supplementary only). */
|
|
53
|
+
directory: 0.15,
|
|
54
|
+
/** A package.json script keyword that invokes a tool. */
|
|
55
|
+
script: 0.15,
|
|
56
|
+
/**
|
|
57
|
+
* A non-package.json manifest file (e.g. Dockerfile, Gemfile, manage.py).
|
|
58
|
+
* Treated as strong evidence, equivalent to a direct dependency.
|
|
59
|
+
*/
|
|
60
|
+
manifest: 0.60,
|
|
61
|
+
};
|
|
62
|
+
// ---------------------------------------------------------------------------
|
|
63
|
+
// Type helpers
|
|
64
|
+
// ---------------------------------------------------------------------------
|
|
65
|
+
/** Ordered list of evidence types from strongest to weakest. */
|
|
66
|
+
export const EVIDENCE_TYPE_ORDER = [
|
|
67
|
+
'dependency',
|
|
68
|
+
'devDependency',
|
|
69
|
+
'peerDependency',
|
|
70
|
+
'manifest',
|
|
71
|
+
'config',
|
|
72
|
+
'script',
|
|
73
|
+
'file',
|
|
74
|
+
'directory',
|
|
75
|
+
];
|
|
76
|
+
/** Evidence types that are considered "strong" (≥ 0.60 threshold by themselves). */
|
|
77
|
+
export const STRONG_EVIDENCE_TYPES = new Set([
|
|
78
|
+
'dependency',
|
|
79
|
+
'devDependency',
|
|
80
|
+
'peerDependency',
|
|
81
|
+
'manifest',
|
|
82
|
+
]);
|
|
83
|
+
// ---------------------------------------------------------------------------
|
|
84
|
+
// API
|
|
85
|
+
// ---------------------------------------------------------------------------
|
|
86
|
+
/**
|
|
87
|
+
* Returns the confidence weight for a given evidence type.
|
|
88
|
+
*
|
|
89
|
+
* @param type - The evidence kind to look up.
|
|
90
|
+
* @returns The confidence contribution in the range [0, 1].
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* getEvidenceWeight('dependency') // 0.60
|
|
94
|
+
* getEvidenceWeight('config') // 0.25
|
|
95
|
+
* getEvidenceWeight('directory') // 0.15
|
|
96
|
+
*/
|
|
97
|
+
export function getEvidenceWeight(type) {
|
|
98
|
+
return EVIDENCE_WEIGHTS[type];
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Returns true if the evidence type is considered "strong" — i.e., a single
|
|
102
|
+
* piece of this evidence alone can cross the detection threshold.
|
|
103
|
+
*
|
|
104
|
+
* @param type - The evidence kind to check.
|
|
105
|
+
*/
|
|
106
|
+
export function isStrongEvidence(type) {
|
|
107
|
+
return STRONG_EVIDENCE_TYPES.has(type);
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Cap a raw confidence score at exactly 1.0 and round to 2 decimal places
|
|
111
|
+
* to avoid floating-point representation issues (e.g. 0.8500000000000001).
|
|
112
|
+
*
|
|
113
|
+
* Rounding is applied BEFORE the cap so the cap always produces a clean 1.00.
|
|
114
|
+
*
|
|
115
|
+
* @param rawScore - Accumulated raw score (may exceed 1.0).
|
|
116
|
+
* @returns Confidence in [0.00, 1.00] rounded to 2 decimal places.
|
|
117
|
+
*/
|
|
118
|
+
export function capConfidence(rawScore) {
|
|
119
|
+
// Round to 2 decimal places first to eliminate floating-point drift.
|
|
120
|
+
const rounded = Math.round(rawScore * 100) / 100;
|
|
121
|
+
return Math.min(rounded, 1.0);
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Returns the sort rank for an evidence type used in deterministic ordering.
|
|
125
|
+
* Lower rank = displayed first.
|
|
126
|
+
*
|
|
127
|
+
* Ordering: dependency < devDependency < peerDependency < manifest <
|
|
128
|
+
* config < script < file < directory
|
|
129
|
+
* Within the same type, values are sorted alphabetically.
|
|
130
|
+
*/
|
|
131
|
+
export function evidenceTypeRank(type) {
|
|
132
|
+
const idx = EVIDENCE_TYPE_ORDER.indexOf(type);
|
|
133
|
+
return idx === -1 ? EVIDENCE_TYPE_ORDER.length : idx;
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=evidence-weights.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence-weights.js","sourceRoot":"","sources":["../../src/detectors/evidence-weights.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAIH,8EAA8E;AAC9E,wBAAwB;AACxB,8EAA8E;AAE9E;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,gEAAgE;IAChE,UAAU,EAAO,IAAI;IACrB,gEAAgE;IAChE,aAAa,EAAI,IAAI;IACrB,0DAA0D;IAC1D,cAAc,EAAG,IAAI;IACrB,gFAAgF;IAChF,MAAM,EAAW,IAAI;IACrB,kFAAkF;IAClF,IAAI,EAAa,IAAI;IACrB,mFAAmF;IACnF,SAAS,EAAQ,IAAI;IACrB,yDAAyD;IACzD,MAAM,EAAW,IAAI;IACrB;;;OAGG;IACH,QAAQ,EAAS,IAAI;CACoC,CAAC;AAE5D,8EAA8E;AAC9E,eAAe;AACf,8EAA8E;AAE9E,gEAAgE;AAChE,MAAM,CAAC,MAAM,mBAAmB,GAA6B;IAC3D,YAAY;IACZ,eAAe;IACf,gBAAgB;IAChB,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,WAAW;CACZ,CAAC;AAEF,oFAAoF;AACpF,MAAM,CAAC,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAyB;IACnE,YAAY;IACZ,eAAe;IACf,gBAAgB;IAChB,UAAU;CACX,CAAC,CAAC;AAEH,8EAA8E;AAC9E,MAAM;AACN,8EAA8E;AAE9E;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAAC,IAA4B;IAC5D,OAAO,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAA4B;IAC3D,OAAO,qBAAqB,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACzC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,QAAgB;IAC5C,qEAAqE;IACrE,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,GAAG,CAAC,GAAG,GAAG,CAAC;IACjD,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;AAChC,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAA4B;IAC3D,MAAM,GAAG,GAAG,mBAAmB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC;AACvD,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Toren — Technology Stack Detector (v1.1.1)
|
|
3
|
+
*
|
|
4
|
+
* Detects the technology stack of a project using pre-collected scan context.
|
|
5
|
+
* Does NOT re-scan the repository or re-read package.json.
|
|
6
|
+
*
|
|
7
|
+
* Design contract:
|
|
8
|
+
* - Consumes only the data already collected by scan() and passed in context.
|
|
9
|
+
* - Deterministic: same input always produces the same ordered output.
|
|
10
|
+
* - Confidence model (centralized in evidence-weights.ts):
|
|
11
|
+
* dependency / devDependency / peerDependency → +0.60 (strong)
|
|
12
|
+
* manifest → +0.60 (strong)
|
|
13
|
+
* config file → +0.25 (moderate supporting)
|
|
14
|
+
* script keyword → +0.15 (weak supporting)
|
|
15
|
+
* file → +0.15 (weak supporting)
|
|
16
|
+
* directory → +0.15 (weak supporting)
|
|
17
|
+
* - Confidence is rounded to 2 decimal places and capped at 1.0.
|
|
18
|
+
* - Technologies below the CONFIDENCE_THRESHOLD (0.60) are suppressed.
|
|
19
|
+
* - When multiple rules match the same technology, evidence is merged and
|
|
20
|
+
* confidence is combined (capped), never producing duplicate entries.
|
|
21
|
+
* - Evidence within a technology is deduplicated and sorted deterministically.
|
|
22
|
+
* - Files under noise directories (examples/, fixtures/, demo/, samples/)
|
|
23
|
+
* are deprioritised for file/directory evidence to reduce false positives
|
|
24
|
+
* from nested example projects.
|
|
25
|
+
* - Output is ordered by: category rank → confidence desc → name asc.
|
|
26
|
+
|
|
27
|
+
*
|
|
28
|
+
* Frontend technologies detected (Step 4):
|
|
29
|
+
* React, Next.js, Vue, Nuxt, Angular, Svelte, SvelteKit, Astro, Remix
|
|
30
|
+
*
|
|
31
|
+
* Styling technologies detected (Step 4):
|
|
32
|
+
* Tailwind CSS, Sass, Less, Styled Components, Emotion, Bootstrap,
|
|
33
|
+
* Material UI, Chakra UI
|
|
34
|
+
*
|
|
35
|
+
* Backend technologies detected (Step 5):
|
|
36
|
+
* Node.js: Express, Fastify, NestJS, Koa, Hapi
|
|
37
|
+
* Python: Django, Flask, FastAPI
|
|
38
|
+
* Java: Spring Boot
|
|
39
|
+
* PHP: Laravel
|
|
40
|
+
* Ruby: Rails
|
|
41
|
+
*
|
|
42
|
+
* Database technologies detected (Step 5):
|
|
43
|
+
* PostgreSQL, MySQL, MariaDB, SQLite, MongoDB, Redis
|
|
44
|
+
*
|
|
45
|
+
* ORM / data-access tools detected (Step 5):
|
|
46
|
+
* Prisma, Drizzle, TypeORM, Sequelize, Mongoose, Knex,
|
|
47
|
+
* SQLAlchemy, Hibernate, Django ORM, Eloquent, Active Record
|
|
48
|
+
*
|
|
49
|
+
* Testing frameworks detected (Step 6):
|
|
50
|
+
* Jest, Vitest, Mocha, Playwright, Cypress, Testing Library,
|
|
51
|
+
* Pytest, JUnit
|
|
52
|
+
*
|
|
53
|
+
* Build tools detected (Step 6):
|
|
54
|
+
* Vite, Webpack, Rollup, esbuild
|
|
55
|
+
*
|
|
56
|
+
* Quality tools detected (Step 6):
|
|
57
|
+
* ESLint, Prettier, Biome, Stylelint
|
|
58
|
+
*
|
|
59
|
+
* Container tools detected (Step 6):
|
|
60
|
+
* Docker, Docker Compose
|
|
61
|
+
*
|
|
62
|
+
* Deployment tools detected (Step 6):
|
|
63
|
+
* Vercel, Netlify, Fly.io, Railway, Render,
|
|
64
|
+
* Serverless Framework, AWS SAM
|
|
65
|
+
*
|
|
66
|
+
* False-positive / safety guards:
|
|
67
|
+
* - Directory names alone never trigger framework detection.
|
|
68
|
+
* - .env / secret files are NEVER read or scanned.
|
|
69
|
+
* - Database URLs / credentials are NEVER used as evidence.
|
|
70
|
+
* - ORM is never guessed from database type; each needs its own evidence.
|
|
71
|
+
* - Plain CSS files are never reported as a technology framework.
|
|
72
|
+
*
|
|
73
|
+
* @module detectors/technology-stack-detector
|
|
74
|
+
*/
|
|
75
|
+
import type { TechnologyStack, PackageManager, ScriptInfo } from '../types/index.js';
|
|
76
|
+
/**
|
|
77
|
+
* All information already collected by scan().
|
|
78
|
+
* The detector reuses this data — it never reads from disk again.
|
|
79
|
+
*/
|
|
80
|
+
export interface TechnologyDetectorContext {
|
|
81
|
+
/** Flat list of relative file paths (POSIX separators). */
|
|
82
|
+
flatFiles: string[];
|
|
83
|
+
/** Root-level config file names (already detected). */
|
|
84
|
+
configs: string[];
|
|
85
|
+
/** Enriched script entries. */
|
|
86
|
+
scripts: ScriptInfo[];
|
|
87
|
+
/** Detected package manager (or null). */
|
|
88
|
+
packageManager: PackageManager | null;
|
|
89
|
+
/** Detected project type string (e.g. "Next.js", "Node.js / TypeScript"). */
|
|
90
|
+
projectType: string;
|
|
91
|
+
/**
|
|
92
|
+
* Parsed package.json dependencies already available from a prior read.
|
|
93
|
+
* Keyed maps of name → version.
|
|
94
|
+
* Providing this avoids re-reading package.json.
|
|
95
|
+
*/
|
|
96
|
+
packageManifest?: {
|
|
97
|
+
dependencies?: Record<string, string>;
|
|
98
|
+
devDependencies?: Record<string, string>;
|
|
99
|
+
peerDependencies?: Record<string, string>;
|
|
100
|
+
} | null;
|
|
101
|
+
/** Frameworks already detected by project-info-detector. */
|
|
102
|
+
existingFrameworks?: string[];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Detect the technology stack from already-collected scan context.
|
|
106
|
+
*
|
|
107
|
+
* @param context - Pre-collected scan data. No disk I/O is performed.
|
|
108
|
+
* @returns TechnologyStack with deduplicated, ordered, threshold-filtered
|
|
109
|
+
* technologies.
|
|
110
|
+
*/
|
|
111
|
+
export declare function detectTechnologyStack(context: TechnologyDetectorContext): TechnologyStack;
|