@dryui/mcp 0.1.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/ai-surface.d.ts +10 -0
- package/dist/architecture.d.ts +103 -0
- package/dist/architecture.js +6262 -0
- package/dist/architecture.json +24419 -0
- package/dist/check-contract.d.ts +1 -0
- package/dist/composition-data.d.ts +27 -0
- package/dist/composition-data.js +5502 -0
- package/dist/contract.d.ts +41 -0
- package/dist/contract.v1.json +22804 -0
- package/dist/contract.v1.schema.json +523 -0
- package/dist/generate-architecture.d.ts +1 -0
- package/dist/generate-contract.d.ts +1 -0
- package/dist/generate-llms-txt.d.ts +6 -0
- package/dist/generate-spec.d.ts +26 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +31474 -0
- package/dist/project-planner.d.ts +73 -0
- package/dist/project-planner.js +374 -0
- package/dist/reviewer.d.ts +28 -0
- package/dist/reviewer.js +744 -0
- package/dist/spec-formatters.d.ts +19 -0
- package/dist/spec-formatters.js +256 -0
- package/dist/spec-types.d.ts +83 -0
- package/dist/spec-types.js +0 -0
- package/dist/spec.json +22976 -0
- package/dist/theme-checker.d.ts +22 -0
- package/dist/theme-checker.js +823 -0
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +72 -0
- package/dist/workspace-audit.d.ts +54 -0
- package/dist/workspace-audit.js +2099 -0
- package/package.json +94 -0
package/dist/utils.d.ts
ADDED
package/dist/utils.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
function __accessProp(key) {
|
|
7
|
+
return this[key];
|
|
8
|
+
}
|
|
9
|
+
var __toESMCache_node;
|
|
10
|
+
var __toESMCache_esm;
|
|
11
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
12
|
+
var canCache = mod != null && typeof mod === "object";
|
|
13
|
+
if (canCache) {
|
|
14
|
+
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
15
|
+
var cached = cache.get(mod);
|
|
16
|
+
if (cached)
|
|
17
|
+
return cached;
|
|
18
|
+
}
|
|
19
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
20
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
21
|
+
for (let key of __getOwnPropNames(mod))
|
|
22
|
+
if (!__hasOwnProp.call(to, key))
|
|
23
|
+
__defProp(to, key, {
|
|
24
|
+
get: __accessProp.bind(mod, key),
|
|
25
|
+
enumerable: true
|
|
26
|
+
});
|
|
27
|
+
if (canCache)
|
|
28
|
+
cache.set(mod, to);
|
|
29
|
+
return to;
|
|
30
|
+
};
|
|
31
|
+
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
32
|
+
var __returnValue = (v) => v;
|
|
33
|
+
function __exportSetter(name, newValue) {
|
|
34
|
+
this[name] = __returnValue.bind(null, newValue);
|
|
35
|
+
}
|
|
36
|
+
var __export = (target, all) => {
|
|
37
|
+
for (var name in all)
|
|
38
|
+
__defProp(target, name, {
|
|
39
|
+
get: all[name],
|
|
40
|
+
enumerable: true,
|
|
41
|
+
configurable: true,
|
|
42
|
+
set: __exportSetter.bind(all, name)
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// src/utils.ts
|
|
47
|
+
function buildLineOffsets(text) {
|
|
48
|
+
const offsets = [0];
|
|
49
|
+
for (let i = 0;i < text.length; i++) {
|
|
50
|
+
if (text[i] === `
|
|
51
|
+
`)
|
|
52
|
+
offsets.push(i + 1);
|
|
53
|
+
}
|
|
54
|
+
return offsets;
|
|
55
|
+
}
|
|
56
|
+
function lineAtOffset(lineOffsets, offset) {
|
|
57
|
+
let lo = 0;
|
|
58
|
+
let hi = lineOffsets.length - 1;
|
|
59
|
+
while (lo < hi) {
|
|
60
|
+
const mid = lo + hi + 1 >> 1;
|
|
61
|
+
const midVal = lineOffsets[mid];
|
|
62
|
+
if (midVal !== undefined && midVal <= offset)
|
|
63
|
+
lo = mid;
|
|
64
|
+
else
|
|
65
|
+
hi = mid - 1;
|
|
66
|
+
}
|
|
67
|
+
return lo + 1;
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
lineAtOffset,
|
|
71
|
+
buildLineOffsets
|
|
72
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type ProjectDetection, type ProjectPlannerSpec } from './project-planner.js';
|
|
2
|
+
export type WorkspaceSeverity = 'error' | 'warning' | 'info';
|
|
3
|
+
export interface WorkspaceFix {
|
|
4
|
+
readonly description: string;
|
|
5
|
+
readonly replacement?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface WorkspaceFinding {
|
|
8
|
+
readonly file: string;
|
|
9
|
+
readonly line: number | null;
|
|
10
|
+
readonly column: number | null;
|
|
11
|
+
readonly ruleId: string;
|
|
12
|
+
readonly severity: WorkspaceSeverity;
|
|
13
|
+
readonly fixable: boolean;
|
|
14
|
+
readonly message: string;
|
|
15
|
+
readonly suggestedFixes: readonly WorkspaceFix[];
|
|
16
|
+
}
|
|
17
|
+
export interface WorkspaceReport {
|
|
18
|
+
readonly root: string;
|
|
19
|
+
readonly projects: readonly ProjectDetection[];
|
|
20
|
+
readonly scope: {
|
|
21
|
+
readonly include: readonly string[];
|
|
22
|
+
readonly exclude: readonly string[];
|
|
23
|
+
readonly changed: boolean;
|
|
24
|
+
};
|
|
25
|
+
readonly scannedFiles: number;
|
|
26
|
+
readonly skippedFiles: number;
|
|
27
|
+
readonly findings: readonly WorkspaceFinding[];
|
|
28
|
+
readonly warnings: readonly string[];
|
|
29
|
+
readonly summary: {
|
|
30
|
+
readonly error: number;
|
|
31
|
+
readonly warning: number;
|
|
32
|
+
readonly info: number;
|
|
33
|
+
readonly byRule: Readonly<Record<string, number>>;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export interface WorkspaceAuditOptions {
|
|
37
|
+
readonly cwd?: string;
|
|
38
|
+
readonly include?: readonly string[];
|
|
39
|
+
readonly exclude?: readonly string[];
|
|
40
|
+
readonly changed?: boolean;
|
|
41
|
+
readonly maxSeverity?: WorkspaceSeverity;
|
|
42
|
+
}
|
|
43
|
+
export interface WorkspaceAuditSpec extends Pick<ProjectPlannerSpec, 'themeImports'> {
|
|
44
|
+
readonly components: Record<string, {
|
|
45
|
+
readonly compound?: boolean;
|
|
46
|
+
readonly props?: Record<string, unknown>;
|
|
47
|
+
readonly parts?: Record<string, {
|
|
48
|
+
readonly props: Record<string, unknown>;
|
|
49
|
+
}>;
|
|
50
|
+
readonly cssVars?: Record<string, string>;
|
|
51
|
+
}>;
|
|
52
|
+
}
|
|
53
|
+
export declare function buildWorkspaceReport(spec: WorkspaceAuditSpec, options?: WorkspaceAuditOptions): WorkspaceReport;
|
|
54
|
+
export declare function scanWorkspace(spec: WorkspaceAuditSpec, options?: WorkspaceAuditOptions): WorkspaceReport;
|