deep-slop 1.4.1 → 1.5.0
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/deep-slop-bundled.js +170 -1
- package/dist/mcp.js +1 -1
- package/package.json +1 -1
|
@@ -29579,6 +29579,161 @@ var init_list = __esm({
|
|
|
29579
29579
|
}
|
|
29580
29580
|
});
|
|
29581
29581
|
|
|
29582
|
+
// src/config/json-schema.ts
|
|
29583
|
+
var json_schema_exports = {};
|
|
29584
|
+
__export(json_schema_exports, {
|
|
29585
|
+
generateJsonSchema: () => generateJsonSchema
|
|
29586
|
+
});
|
|
29587
|
+
function generateJsonSchema() {
|
|
29588
|
+
return {
|
|
29589
|
+
$schema: "http://json-schema.org/draft-07/schema#",
|
|
29590
|
+
title: "DeepSlopConfig",
|
|
29591
|
+
description: "Configuration for deep-slop \u2014 deep AI slop detection with 18 AST-powered engines",
|
|
29592
|
+
type: "object",
|
|
29593
|
+
properties: {
|
|
29594
|
+
engines: {
|
|
29595
|
+
type: "object",
|
|
29596
|
+
description: "Enable/disable individual analysis engines",
|
|
29597
|
+
additionalProperties: { type: "boolean" },
|
|
29598
|
+
properties: {
|
|
29599
|
+
"ast-slop": { type: "boolean", description: "AI slop pattern detection" },
|
|
29600
|
+
"import-intelligence": { type: "boolean", description: "Import optimization and barrel analysis" },
|
|
29601
|
+
"dead-flow": { type: "boolean", description: "Dead code and unreachable branch detection" },
|
|
29602
|
+
"type-safety": { type: "boolean", description: "TypeScript type safety analysis" },
|
|
29603
|
+
"syntax-deep": { type: "boolean", description: "Syntax anomaly detection" },
|
|
29604
|
+
"security-deep": { type: "boolean", description: "Security vulnerability scanning" },
|
|
29605
|
+
"arch-constraints": { type: "boolean", description: "Architecture constraint analysis" },
|
|
29606
|
+
"dup-detect": { type: "boolean", description: "Duplicate code detection" },
|
|
29607
|
+
"perf-hints": { type: "boolean", description: "Performance hints" },
|
|
29608
|
+
"i18n-lint": { type: "boolean", description: "Internationalization linting" },
|
|
29609
|
+
"config-lint": { type: "boolean", description: "Configuration validation" },
|
|
29610
|
+
"meta-quality": { type: "boolean", description: "Meta quality scoring and trend analysis" },
|
|
29611
|
+
"lint-external": { type: "boolean", description: "External linter integration (ruff, golangci-lint, clippy)" },
|
|
29612
|
+
"arch-rules": { type: "boolean", description: "User-defined architecture rules" },
|
|
29613
|
+
knip: { type: "boolean", description: "Unused dependency/export detection" },
|
|
29614
|
+
"format-lint": { type: "boolean", description: "Formatting consistency" },
|
|
29615
|
+
"framework-lint": { type: "boolean", description: "Framework-specific rules (Next.js, Tailwind)" },
|
|
29616
|
+
"markup-lint": { type: "boolean", description: "Markup & config quality (JSON, YAML, CSS, HTML, Markdown)" }
|
|
29617
|
+
}
|
|
29618
|
+
},
|
|
29619
|
+
exclude: {
|
|
29620
|
+
type: "array",
|
|
29621
|
+
items: { type: "string" },
|
|
29622
|
+
description: "Glob patterns to exclude from scanning",
|
|
29623
|
+
default: ["node_modules", "dist", "coverage", ".git"]
|
|
29624
|
+
},
|
|
29625
|
+
quality: {
|
|
29626
|
+
type: "object",
|
|
29627
|
+
description: "Quality thresholds",
|
|
29628
|
+
properties: {
|
|
29629
|
+
maxFunctionLoc: { type: "number", default: 50, description: "Max lines per function" },
|
|
29630
|
+
maxFileLoc: { type: "number", default: 300, description: "Max lines per file" },
|
|
29631
|
+
maxNesting: { type: "number", default: 4, description: "Max nesting depth" },
|
|
29632
|
+
maxParams: { type: "number", default: 5, description: "Max function parameters" },
|
|
29633
|
+
maxCyclomatic: { type: "number", default: 10, description: "Max cyclomatic complexity" },
|
|
29634
|
+
maxCoupling: { type: "number", default: 7, description: "Max coupling between modules" }
|
|
29635
|
+
},
|
|
29636
|
+
additionalProperties: true
|
|
29637
|
+
},
|
|
29638
|
+
security: {
|
|
29639
|
+
type: "object",
|
|
29640
|
+
description: "Security engine settings",
|
|
29641
|
+
properties: {
|
|
29642
|
+
audit: { type: "boolean", default: true, description: "Run npm audit" },
|
|
29643
|
+
auditTimeout: { type: "number", default: 3e4, description: "Audit timeout in ms" },
|
|
29644
|
+
owasp: { type: "boolean", default: true, description: "Enable OWASP checks" }
|
|
29645
|
+
},
|
|
29646
|
+
additionalProperties: true
|
|
29647
|
+
},
|
|
29648
|
+
imports: {
|
|
29649
|
+
type: "object",
|
|
29650
|
+
description: "Import intelligence settings",
|
|
29651
|
+
properties: {
|
|
29652
|
+
suggestAlternatives: { type: "boolean", default: true },
|
|
29653
|
+
optimizeBarrels: { type: "boolean", default: true },
|
|
29654
|
+
validateAliases: { type: "boolean", default: true },
|
|
29655
|
+
buildGraph: { type: "boolean", default: true },
|
|
29656
|
+
maxCircularDepth: { type: "number", default: 5 }
|
|
29657
|
+
},
|
|
29658
|
+
additionalProperties: true
|
|
29659
|
+
},
|
|
29660
|
+
types: {
|
|
29661
|
+
type: "object",
|
|
29662
|
+
description: "Type safety settings",
|
|
29663
|
+
properties: {
|
|
29664
|
+
flagAsAny: { type: "boolean", default: true },
|
|
29665
|
+
suggestTypes: { type: "boolean", default: true },
|
|
29666
|
+
flagDoubleAssertion: { type: "boolean", default: true }
|
|
29667
|
+
},
|
|
29668
|
+
additionalProperties: true
|
|
29669
|
+
},
|
|
29670
|
+
deadCode: {
|
|
29671
|
+
type: "object",
|
|
29672
|
+
description: "Dead code detection settings",
|
|
29673
|
+
properties: {
|
|
29674
|
+
unreachableBranches: { type: "boolean", default: true },
|
|
29675
|
+
unusedExports: { type: "boolean", default: true },
|
|
29676
|
+
unusedVariables: { type: "boolean", default: true }
|
|
29677
|
+
},
|
|
29678
|
+
additionalProperties: true
|
|
29679
|
+
},
|
|
29680
|
+
i18n: {
|
|
29681
|
+
type: "object",
|
|
29682
|
+
description: "Internationalization settings",
|
|
29683
|
+
properties: {
|
|
29684
|
+
hardcodedStrings: { type: "boolean", default: true },
|
|
29685
|
+
validateKeys: { type: "boolean", default: true }
|
|
29686
|
+
},
|
|
29687
|
+
additionalProperties: true
|
|
29688
|
+
},
|
|
29689
|
+
scoring: {
|
|
29690
|
+
type: "object",
|
|
29691
|
+
description: "Scoring configuration",
|
|
29692
|
+
properties: {
|
|
29693
|
+
mode: { type: "string", enum: ["logarithmic", "linear"], default: "logarithmic" },
|
|
29694
|
+
smoothing: { type: "number", default: 20 },
|
|
29695
|
+
maxPerRule: { type: "number", default: 40 }
|
|
29696
|
+
}
|
|
29697
|
+
},
|
|
29698
|
+
telemetry: {
|
|
29699
|
+
type: "object",
|
|
29700
|
+
description: "Telemetry settings",
|
|
29701
|
+
properties: {
|
|
29702
|
+
enabled: { type: "boolean", default: false }
|
|
29703
|
+
}
|
|
29704
|
+
},
|
|
29705
|
+
ci: {
|
|
29706
|
+
type: "object",
|
|
29707
|
+
description: "CI quality gate settings",
|
|
29708
|
+
properties: {
|
|
29709
|
+
failBelow: { type: "number", default: 70, description: "Minimum score to pass CI" },
|
|
29710
|
+
format: { type: "string", enum: ["json", "human", "sarif"], default: "json" },
|
|
29711
|
+
failOnErrors: { type: "boolean", default: true }
|
|
29712
|
+
}
|
|
29713
|
+
},
|
|
29714
|
+
rules: {
|
|
29715
|
+
type: "object",
|
|
29716
|
+
description: "Per-rule severity overrides (e.g. ast-slop/narrative-comment: off)",
|
|
29717
|
+
additionalProperties: {
|
|
29718
|
+
type: "string",
|
|
29719
|
+
enum: ["off", "info", "suggestion", "warning", "error"]
|
|
29720
|
+
}
|
|
29721
|
+
},
|
|
29722
|
+
extends: {
|
|
29723
|
+
type: "string",
|
|
29724
|
+
description: "Preset to extend (recommended, strict, minimal)",
|
|
29725
|
+
enum: ["recommended", "strict", "minimal"]
|
|
29726
|
+
}
|
|
29727
|
+
},
|
|
29728
|
+
additionalProperties: false
|
|
29729
|
+
};
|
|
29730
|
+
}
|
|
29731
|
+
var init_json_schema = __esm({
|
|
29732
|
+
"src/config/json-schema.ts"() {
|
|
29733
|
+
"use strict";
|
|
29734
|
+
}
|
|
29735
|
+
});
|
|
29736
|
+
|
|
29582
29737
|
// node_modules/.pnpm/commander@14.0.3/node_modules/commander/esm.mjs
|
|
29583
29738
|
var import_index = __toESM(require_commander(), 1);
|
|
29584
29739
|
var {
|
|
@@ -29676,7 +29831,7 @@ function computeExitCode(options) {
|
|
|
29676
29831
|
init_formatter();
|
|
29677
29832
|
|
|
29678
29833
|
// src/version.ts
|
|
29679
|
-
var APP_VERSION = "1.
|
|
29834
|
+
var APP_VERSION = "1.5.0";
|
|
29680
29835
|
|
|
29681
29836
|
// src/output/sarif.ts
|
|
29682
29837
|
function mapSeverity4(sev) {
|
|
@@ -32989,6 +33144,20 @@ program2.command("badge").description("Generate a shields.io badge for your deep
|
|
|
32989
33144
|
console.log("");
|
|
32990
33145
|
}
|
|
32991
33146
|
});
|
|
33147
|
+
program2.command("schema").description("Output JSON Schema for .deep-slop/config.yml (for IDE autocomplete)").option("--output <path>", "Write schema to file instead of stdout").action(async (opts) => {
|
|
33148
|
+
const { generateJsonSchema: generateJsonSchema2 } = await Promise.resolve().then(() => (init_json_schema(), json_schema_exports));
|
|
33149
|
+
const schema = generateJsonSchema2();
|
|
33150
|
+
if (opts.output) {
|
|
33151
|
+
const { writeFileSync: writeFileSync11 } = await import("node:fs");
|
|
33152
|
+
const { resolve: resolvePath } = await import("node:path");
|
|
33153
|
+
const outPath = resolvePath(opts.output);
|
|
33154
|
+
writeFileSync11(outPath, JSON.stringify(schema, null, 2) + "\n");
|
|
33155
|
+
process.stderr.write(` \u2714 Schema written to ${outPath}
|
|
33156
|
+
`);
|
|
33157
|
+
} else {
|
|
33158
|
+
console.log(JSON.stringify(schema, null, 2));
|
|
33159
|
+
}
|
|
33160
|
+
});
|
|
32992
33161
|
program2.command("discover").description("Analyze project: languages, frameworks, package manager, linters, tests, CI").argument("[path]", "project directory", ".").option("--json", "Output as JSON").action(async (path2, opts) => {
|
|
32993
33162
|
const rootDir = resolve13(path2);
|
|
32994
33163
|
process.stderr.write(`
|
package/dist/mcp.js
CHANGED
|
@@ -34871,7 +34871,7 @@ var ALL_ENGINE_NAMES = [
|
|
|
34871
34871
|
];
|
|
34872
34872
|
|
|
34873
34873
|
// src/version.ts
|
|
34874
|
-
var APP_VERSION = "1.
|
|
34874
|
+
var APP_VERSION = "1.5.0";
|
|
34875
34875
|
|
|
34876
34876
|
// src/output/rule-labels.ts
|
|
34877
34877
|
var labels = {
|
package/package.json
CHANGED