pickety 0.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/package.json ADDED
@@ -0,0 +1,144 @@
1
+ {
2
+ "name": "pickety",
3
+ "displayName": "Pickety",
4
+ "description": "A high-performance architectural enforcement engine for TypeScript projects",
5
+ "author": {
6
+ "name": "Dan Serio"
7
+ },
8
+ "version": "0.1.1",
9
+ "publisher": "DanSerio",
10
+ "icon": "resources/icon.png",
11
+ "license": "MIT",
12
+ "bugs": {
13
+ "url": "https://github.com/DanielSerio/pickety/issues"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "https://github.com/DanielSerio/pickety.git"
18
+ },
19
+ "keywords": [
20
+ "architecture",
21
+ "typescript",
22
+ "SOLID",
23
+ "boundaries",
24
+ "mermaid",
25
+ "linter",
26
+ "imports",
27
+ "dependencies",
28
+ "circular-dependencies",
29
+ "coupling",
30
+ "static-analysis",
31
+ "clean-architecture",
32
+ "module-health",
33
+ "vscode",
34
+ "cli"
35
+ ],
36
+ "badges": [
37
+ {
38
+ "url": "https://github.com/DanielSerio/pickety/actions/workflows/ci.yml/badge.svg",
39
+ "href": "https://github.com/DanielSerio/pickety/actions/workflows/ci.yml",
40
+ "description": "CI Status"
41
+ },
42
+ {
43
+ "url": "https://img.shields.io/visual-studio-marketplace/v/DanSerio.pickety.svg",
44
+ "href": "https://marketplace.visualstudio.com/items?itemName=DanSerio.pickety",
45
+ "description": "Marketplace Version"
46
+ },
47
+ {
48
+ "url": "https://img.shields.io/github/license/DanielSerio/pickety.svg",
49
+ "href": "https://github.com/DanielSerio/pickety/blob/main/LICENSE",
50
+ "description": "License"
51
+ }
52
+ ],
53
+ "galleryBanner": {
54
+ "color": "#1e1e2e",
55
+ "theme": "dark"
56
+ },
57
+ "engines": {
58
+ "vscode": "^1.75.0"
59
+ },
60
+ "categories": [
61
+ "Linters",
62
+ "Visualization",
63
+ "Other"
64
+ ],
65
+ "activationEvents": [
66
+ "onLanguage:typescript",
67
+ "onLanguage:typescriptreact",
68
+ "onLanguage:javascript",
69
+ "onLanguage:javascriptreact",
70
+ "onStartupFinished"
71
+ ],
72
+ "main": "./out/extension.js",
73
+ "bin": {
74
+ "pickety": "./out/cli.js"
75
+ },
76
+ "contributes": {
77
+ "commands": [
78
+ {
79
+ "command": "pickety.init",
80
+ "title": "Initialize Configuration",
81
+ "category": "Pickety"
82
+ },
83
+ {
84
+ "command": "pickety.refresh",
85
+ "title": "Refresh Configuration",
86
+ "category": "Pickety"
87
+ },
88
+ {
89
+ "command": "pickety.generateDiagram",
90
+ "title": "Generate Boundary Diagram",
91
+ "category": "Pickety"
92
+ },
93
+ {
94
+ "command": "pickety.showImpact",
95
+ "title": "Show Impact",
96
+ "category": "Pickety"
97
+ },
98
+ {
99
+ "command": "pickety.showHealth",
100
+ "title": "Show Module Health",
101
+ "category": "Pickety"
102
+ }
103
+ ],
104
+ "jsonValidation": [
105
+ {
106
+ "fileMatch": "pickety.json",
107
+ "url": "./resources/pickety.schema.json"
108
+ }
109
+ ]
110
+ },
111
+ "scripts": {
112
+ "vscode:prepublish": "npm run build && npm run build:cli",
113
+ "compile": "npm run build",
114
+ "compile-tests": "tsc -p ./",
115
+ "build": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node --main-fields=module,main --minify",
116
+ "build:cli": "esbuild ./src/cli.ts --bundle --outfile=out/cli.js --format=cjs --platform=node --main-fields=module,main --minify --banner:js=\"#!/usr/bin/env node\"",
117
+ "watch": "esbuild ./src/extension.ts --bundle --outfile=out/extension.js --external:vscode --format=cjs --platform=node --main-fields=module,main --watch",
118
+ "type-check": "tsc -p ./ --noEmit",
119
+ "pretest": "npm run compile-tests && npm run compile && npm run lint",
120
+ "lint": "eslint src",
121
+ "test": "vscode-test",
122
+ "test:core": "npm run compile-tests && mocha --ui tdd out/test/core/**/*.test.js",
123
+ "release:patch": "npm version patch && git push --follow-tags",
124
+ "release:minor": "npm version minor && git push --follow-tags",
125
+ "release:major": "npm version major && git push --follow-tags"
126
+ },
127
+ "devDependencies": {
128
+ "@types/mocha": "^10.0.10",
129
+ "@types/node": "22.x",
130
+ "@types/vscode": "^1.75.0",
131
+ "@vscode/test-cli": "^0.0.12",
132
+ "@vscode/test-electron": "^2.5.2",
133
+ "@vscode/vsce": "^3.7.1",
134
+ "esbuild": "^0.27.3",
135
+ "eslint": "^9.39.2",
136
+ "mocha": "^11.7.5",
137
+ "typescript": "^5.9.3",
138
+ "typescript-eslint": "^8.54.0"
139
+ },
140
+ "dependencies": {
141
+ "jsonc-parser": "^3.3.1",
142
+ "minimatch": "^10.2.2"
143
+ }
144
+ }
@@ -0,0 +1,160 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "title": "Pickety Configuration",
4
+ "description": "Configuration for Pickety, a high-performance architectural enforcement engine for TypeScript.",
5
+ "type": "object",
6
+ "properties": {
7
+ "version": {
8
+ "type": "string",
9
+ "description": "Configuration schema version. Currently 0.1.0.",
10
+ "enum": [
11
+ "0.1.0"
12
+ ],
13
+ "default": "0.1.0"
14
+ },
15
+ "modules": {
16
+ "type": "object",
17
+ "description": "Map module names to file glob patterns. Files belong to the first module that matches.",
18
+ "markdownDescription": "Map module names to file glob patterns. Files belong to the first module that matches.\n\nExample:\n```json\n{\n \"features\": \"src/features/*\",\n \"components\": \"src/components/**/*\"\n}\n```",
19
+ "additionalProperties": {
20
+ "type": "string",
21
+ "description": "Glob pattern for the module files."
22
+ }
23
+ },
24
+ "rules": {
25
+ "type": "object",
26
+ "description": "Architectural rules enforcement.",
27
+ "properties": {
28
+ "module-boundaries": {
29
+ "type": "object",
30
+ "description": "Import boundary rules.",
31
+ "properties": {
32
+ "severity": {
33
+ "type": "string",
34
+ "enum": [
35
+ "error",
36
+ "warn"
37
+ ],
38
+ "default": "error",
39
+ "description": "Default severity for all violations."
40
+ },
41
+ "rules": {
42
+ "type": "array",
43
+ "description": "List of boundary rules.",
44
+ "items": {
45
+ "type": "object",
46
+ "required": [
47
+ "imports"
48
+ ],
49
+ "properties": {
50
+ "importer": {
51
+ "type": "string",
52
+ "description": "Source module name or glob pattern.",
53
+ "markdownDescription": "Source module name or glob pattern.\n\nSupports `$variable` interpolation to match importer subdirectories with target subdirectories."
54
+ },
55
+ "imports": {
56
+ "type": "string",
57
+ "description": "Target module name, glob, or relative path pattern.",
58
+ "markdownDescription": "Target module name, glob, or relative path pattern.\n\nSupports `$variable` interpolation."
59
+ },
60
+ "allow": {
61
+ "type": "boolean",
62
+ "description": "Permit or deny the import. Defaults to false (deny).",
63
+ "default": false
64
+ },
65
+ "only": {
66
+ "type": "boolean",
67
+ "description": "If true, the 'imports' target can ONLY be imported by the specified 'importer'. Everyone else is forbidden.",
68
+ "default": false
69
+ },
70
+ "containedTo": {
71
+ "type": "string",
72
+ "description": "Restrict the 'imports' target to be contained within this importer pattern. Shortcut for 'only: true'.",
73
+ "markdownDescription": "Restrict the 'imports' target to be contained within this importer pattern. Shortcut for 'only: true'.\n\nExample:\n```json\n{ \"imports\": \"**/internal/*\", \"containedTo\": \"src/features/$name/**/*\" }\n```"
74
+ },
75
+ "message": {
76
+ "type": "string",
77
+ "description": "Custom error message shown in the editor."
78
+ },
79
+ "severity": {
80
+ "type": "string",
81
+ "enum": [
82
+ "error",
83
+ "warn"
84
+ ],
85
+ "description": "Override the global severity for this specific rule."
86
+ },
87
+ "name": {
88
+ "type": "string",
89
+ "description": "Unique identifier for the rule. Used in diagnostics and 'Go to Rule' navigation."
90
+ },
91
+ "maxViolations": {
92
+ "type": "integer",
93
+ "minimum": 0,
94
+ "description": "Debt threshold: if total violations for this rule are at or below this number, they are downgraded to warnings. Exceeding the threshold escalates all violations to errors.",
95
+ "markdownDescription": "Debt threshold for gradual adoption.\n\n- Violations **at or below** this count → downgraded to `warn`\n- Violations **exceeding** this count → escalated to `error`\n\nSet this to your current violation count and ratchet it down over time."
96
+ }
97
+ }
98
+ }
99
+ }
100
+ },
101
+ "required": [
102
+ "rules"
103
+ ]
104
+ }
105
+ },
106
+ "required": [
107
+ "module-boundaries"
108
+ ]
109
+ },
110
+ "boundary-diagrams": {
111
+ "oneOf": [
112
+ {
113
+ "type": "boolean"
114
+ },
115
+ {
116
+ "type": "string"
117
+ }
118
+ ],
119
+ "description": "Generate a Mermaid diagram on save.",
120
+ "markdownDescription": "Automatically generate a Mermaid diagram of module boundaries on every save.\n\n- `true`: Writes to `picket-boundaries.mermaid` in workspace root.\n- `\"path/to/file.mermaid\"`: Writes to a custom path."
121
+ },
122
+ "health": {
123
+ "type": "object",
124
+ "description": "Module health thresholds. Violations appear as diagnostics on pickety.json.",
125
+ "markdownDescription": "Set thresholds for module health metrics. When a module exceeds a threshold, a diagnostic warning or error is reported on `pickety.json`.\n\nAll fields are optional — only configured thresholds are enforced.",
126
+ "properties": {
127
+ "maxAfferentCoupling": {
128
+ "type": "integer",
129
+ "minimum": 1,
130
+ "description": "Maximum number of modules that may depend on any single module (Ca).",
131
+ "markdownDescription": "Maximum **afferent coupling (Ca)** — the number of other modules that depend on a given module.\n\nHigh Ca means the module is heavily depended upon; changing it is risky."
132
+ },
133
+ "maxEfferentCoupling": {
134
+ "type": "integer",
135
+ "minimum": 1,
136
+ "description": "Maximum number of modules any single module may depend on (Ce).",
137
+ "markdownDescription": "Maximum **efferent coupling (Ce)** — the number of other modules a given module depends on.\n\nHigh Ce means the module is fragile and sensitive to external changes."
138
+ },
139
+ "maxInstability": {
140
+ "type": "number",
141
+ "minimum": 0,
142
+ "maximum": 1,
143
+ "description": "Maximum instability ratio Ce/(Ca+Ce) for any module, between 0 and 1.",
144
+ "markdownDescription": "Maximum **instability (I)** — `Ce / (Ca + Ce)`.\n\n- `0` = maximally stable (everyone depends on it, it depends on nothing)\n- `1` = maximally unstable (it depends on others, nothing depends on it)"
145
+ },
146
+ "maxDepth": {
147
+ "type": "integer",
148
+ "minimum": 1,
149
+ "description": "Maximum dependency chain depth for any module.",
150
+ "markdownDescription": "Maximum **dependency depth** — the longest chain from a module to a leaf in the dependency graph.\n\nDeep chains mean changes cascade further through the architecture."
151
+ }
152
+ },
153
+ "additionalProperties": false
154
+ }
155
+ },
156
+ "required": [
157
+ "modules",
158
+ "rules"
159
+ ]
160
+ }