@promptci/core 0.2.1 → 0.3.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-config.d.ts +13 -6
- package/dist/ai-config.d.ts.map +1 -1
- package/dist/ai-config.js +25 -78
- package/dist/ai-config.js.map +1 -1
- package/dist/close-match.d.ts +97 -0
- package/dist/close-match.d.ts.map +1 -0
- package/dist/close-match.js +215 -0
- package/dist/close-match.js.map +1 -0
- package/dist/command-validity.d.ts.map +1 -1
- package/dist/command-validity.js +309 -76
- package/dist/command-validity.js.map +1 -1
- package/dist/context-optimizer.d.ts.map +1 -1
- package/dist/context-optimizer.js +9 -2
- package/dist/context-optimizer.js.map +1 -1
- package/dist/dead-references.d.ts +8 -1
- package/dist/dead-references.d.ts.map +1 -1
- package/dist/dead-references.js +162 -243
- package/dist/dead-references.js.map +1 -1
- package/dist/dependency-staleness.d.ts.map +1 -1
- package/dist/dependency-staleness.js +24 -38
- package/dist/dependency-staleness.js.map +1 -1
- package/dist/detectors.js +1 -1
- package/dist/detectors.js.map +1 -1
- package/dist/discovery.d.ts +138 -0
- package/dist/discovery.d.ts.map +1 -0
- package/dist/discovery.js +569 -0
- package/dist/discovery.js.map +1 -0
- package/dist/fix-engine.d.ts.map +1 -1
- package/dist/fix-engine.js +75 -1
- package/dist/fix-engine.js.map +1 -1
- package/dist/frameworks/dotnet.d.ts.map +1 -1
- package/dist/frameworks/dotnet.js +10 -11
- package/dist/frameworks/dotnet.js.map +1 -1
- package/dist/frameworks/go.d.ts.map +1 -1
- package/dist/frameworks/go.js +8 -4
- package/dist/frameworks/go.js.map +1 -1
- package/dist/frameworks/nextjs.d.ts.map +1 -1
- package/dist/frameworks/nextjs.js +8 -17
- package/dist/frameworks/nextjs.js.map +1 -1
- package/dist/frameworks/python.d.ts.map +1 -1
- package/dist/frameworks/python.js +5 -3
- package/dist/frameworks/python.js.map +1 -1
- package/dist/frameworks/rust.d.ts.map +1 -1
- package/dist/frameworks/rust.js +3 -3
- package/dist/frameworks/rust.js.map +1 -1
- package/dist/frameworks/unity.d.ts.map +1 -1
- package/dist/frameworks/unity.js +6 -5
- package/dist/frameworks/unity.js.map +1 -1
- package/dist/gitignore.d.ts +31 -2
- package/dist/gitignore.d.ts.map +1 -1
- package/dist/gitignore.js +33 -8
- package/dist/gitignore.js.map +1 -1
- package/dist/hooks-settings-detector.d.ts.map +1 -1
- package/dist/hooks-settings-detector.js +5 -1
- package/dist/hooks-settings-detector.js.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/index.js.map +1 -1
- package/dist/known-paths.d.ts +82 -0
- package/dist/known-paths.d.ts.map +1 -0
- package/dist/known-paths.js +152 -0
- package/dist/known-paths.js.map +1 -0
- package/dist/makefile.d.ts +11 -3
- package/dist/makefile.d.ts.map +1 -1
- package/dist/makefile.js +28 -22
- package/dist/makefile.js.map +1 -1
- package/dist/manifest-consistency.d.ts +1 -1
- package/dist/manifest-consistency.d.ts.map +1 -1
- package/dist/manifest-consistency.js +12 -8
- package/dist/manifest-consistency.js.map +1 -1
- package/dist/mcp-config-detector.d.ts.map +1 -1
- package/dist/mcp-config-detector.js +5 -1
- package/dist/mcp-config-detector.js.map +1 -1
- package/dist/project-type.d.ts +2 -1
- package/dist/project-type.d.ts.map +1 -1
- package/dist/project-type.js +36 -48
- package/dist/project-type.js.map +1 -1
- package/dist/prompt-cache.d.ts.map +1 -1
- package/dist/prompt-cache.js +13 -2
- package/dist/prompt-cache.js.map +1 -1
- package/dist/repo-context.d.ts +9 -0
- package/dist/repo-context.d.ts.map +1 -1
- package/dist/repo-context.js +32 -35
- package/dist/repo-context.js.map +1 -1
- package/dist/repo-tree.d.ts +281 -0
- package/dist/repo-tree.d.ts.map +1 -0
- package/dist/repo-tree.js +455 -0
- package/dist/repo-tree.js.map +1 -0
- package/dist/report.d.ts.map +1 -1
- package/dist/report.js +3 -0
- package/dist/report.js.map +1 -1
- package/dist/sarif.d.ts +27 -0
- package/dist/sarif.d.ts.map +1 -0
- package/dist/sarif.js +357 -0
- package/dist/sarif.js.map +1 -0
- package/dist/scan.d.ts.map +1 -1
- package/dist/scan.js +8 -2
- package/dist/scan.js.map +1 -1
- package/dist/scanner.d.ts +4 -3
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +36 -77
- package/dist/scanner.js.map +1 -1
- package/dist/security-pack.d.ts.map +1 -1
- package/dist/security-pack.js +34 -35
- package/dist/security-pack.js.map +1 -1
- package/dist/skill-supply-chain.d.ts.map +1 -1
- package/dist/skill-supply-chain.js +29 -19
- package/dist/skill-supply-chain.js.map +1 -1
- package/dist/skills-detector.d.ts.map +1 -1
- package/dist/skills-detector.js +11 -3
- package/dist/skills-detector.js.map +1 -1
- package/dist/token-estimates.d.ts +42 -0
- package/dist/token-estimates.d.ts.map +1 -0
- package/dist/token-estimates.js +200 -0
- package/dist/token-estimates.js.map +1 -0
- package/dist/types.d.ts +89 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,569 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discovery lists and a pure path-based discovery API (pcic-zg3).
|
|
3
|
+
*
|
|
4
|
+
* `scanner.ts` (instruction files), `ai-config.ts` (skills, settings, MCP) and
|
|
5
|
+
* `repo-context.ts` (workflows / composite actions) each discover a different
|
|
6
|
+
* class of file from the real filesystem with `fast-glob`. The constants and
|
|
7
|
+
* predicates that decide WHAT belongs to each class live here, once, so those
|
|
8
|
+
* three modules import them instead of keeping their own copies — two
|
|
9
|
+
* modules can no longer drift apart on what counts as, say, a skill location.
|
|
10
|
+
*
|
|
11
|
+
* `selectScanPaths` is the filesystem-free counterpart: given a plain list of
|
|
12
|
+
* repo-relative paths (as a server with only a GitHub tree listing has, not a
|
|
13
|
+
* checkout), it applies the exact same patterns, `include`/`exclude` policy,
|
|
14
|
+
* and caps to answer what a real scan would read, without ever touching disk.
|
|
15
|
+
* It applies scanner.ts's MAX_FILE_SIZE guard to instruction files and
|
|
16
|
+
* composite actions when a caller supplies `size` (there is nothing to check
|
|
17
|
+
* without it); it never applies the binary-content guard, since there are no
|
|
18
|
+
* bytes here to sniff.
|
|
19
|
+
*/
|
|
20
|
+
import micromatch from 'micromatch';
|
|
21
|
+
// ── Shared size guard (scanner.ts) ───────────────────────────────────────────
|
|
22
|
+
/** Files larger than this are skipped before they are ever read (scanner.ts). */
|
|
23
|
+
export const MAX_FILE_SIZE = 500 * 1024;
|
|
24
|
+
/** Bytes sniffed for a NUL byte when deciding whether a file is binary (scanner.ts). */
|
|
25
|
+
export const BINARY_CHECK_BYTES = 512;
|
|
26
|
+
// ── Instruction files (scanner.ts) ────────────────────────────────────────────
|
|
27
|
+
/** Default glob patterns scanner.ts reads when no `include` override is given. */
|
|
28
|
+
export const DEFAULT_INSTRUCTION_PATTERNS = [
|
|
29
|
+
// Core AI instruction files
|
|
30
|
+
'CLAUDE.md',
|
|
31
|
+
'AGENTS.md',
|
|
32
|
+
'.cursorrules',
|
|
33
|
+
'.windsurfrules',
|
|
34
|
+
// Gemini CLI. Root only, like CLAUDE.md/AGENTS.md above.
|
|
35
|
+
'GEMINI.md',
|
|
36
|
+
// Cline: a single `.clinerules` file OR a `.clinerules/` directory of
|
|
37
|
+
// markdown rule files.
|
|
38
|
+
'.clinerules',
|
|
39
|
+
'.clinerules/**/*.md',
|
|
40
|
+
'!.clinerules/workflows/**',
|
|
41
|
+
// Agent persona files (SOUL.md, USER.md, TOOLS.md). Repo ROOT only.
|
|
42
|
+
'SOUL.md',
|
|
43
|
+
'USER.md',
|
|
44
|
+
'TOOLS.md',
|
|
45
|
+
// Cursor IDE rules
|
|
46
|
+
'.cursor/rules/**',
|
|
47
|
+
// GitHub Copilot instructions (legacy + new per-file format)
|
|
48
|
+
'.github/copilot-instructions.md',
|
|
49
|
+
'.github/instructions/**/*.md',
|
|
50
|
+
// Claude memory / settings directory
|
|
51
|
+
'.claude/**/*.md',
|
|
52
|
+
// README is often the only context file in small repos
|
|
53
|
+
'README.md',
|
|
54
|
+
'QA.md',
|
|
55
|
+
'CONTRIBUTING.md',
|
|
56
|
+
'ARCHITECTURE.md',
|
|
57
|
+
'DEVELOPMENT.md',
|
|
58
|
+
'CODING_STANDARDS.md',
|
|
59
|
+
'CONVENTIONS.md',
|
|
60
|
+
'GUIDELINES.md',
|
|
61
|
+
// Explicit AI/prompt directories only — not generic docs/
|
|
62
|
+
'ai/**/*.md',
|
|
63
|
+
'ai-instructions/**/*.md',
|
|
64
|
+
'prompts/**/*.md',
|
|
65
|
+
'system-prompts/**/*.md',
|
|
66
|
+
];
|
|
67
|
+
/** The `.clinerules/` directory globs, dropped when `.clinerules` is a file (see scanner.ts). */
|
|
68
|
+
const CLINE_DIR_PATTERNS = new Set([
|
|
69
|
+
'.clinerules/**/*.md',
|
|
70
|
+
'!.clinerules/workflows/**',
|
|
71
|
+
]);
|
|
72
|
+
/** `DEFAULT_INSTRUCTION_PATTERNS`, minus the `.clinerules/` directory globs when it is a file. */
|
|
73
|
+
export function defaultInstructionPatterns(clineIsDir) {
|
|
74
|
+
return clineIsDir
|
|
75
|
+
? DEFAULT_INSTRUCTION_PATTERNS
|
|
76
|
+
: DEFAULT_INSTRUCTION_PATTERNS.filter((p) => !CLINE_DIR_PATTERNS.has(p));
|
|
77
|
+
}
|
|
78
|
+
/** Directory names scanner.ts's default scan ignores at any depth. */
|
|
79
|
+
export const SCAN_IGNORE_DIRS = [
|
|
80
|
+
'.git', 'node_modules', 'Library', 'Temp', 'bin', 'obj', 'dist', 'build', 'worktrees', '.worktrees',
|
|
81
|
+
];
|
|
82
|
+
// ── Skills, settings, MCP (ai-config.ts) ──────────────────────────────────────
|
|
83
|
+
/**
|
|
84
|
+
* Every location an Agent Skill is installed from. The root-level globs are
|
|
85
|
+
* anchored on purpose: a `**\/skills/**` glob would also sweep up vendored
|
|
86
|
+
* copies and test fixtures.
|
|
87
|
+
*/
|
|
88
|
+
export const SKILL_GLOBS = [
|
|
89
|
+
'.claude/**/SKILL.md',
|
|
90
|
+
'.agents/skills/**/SKILL.md',
|
|
91
|
+
'skills/*/SKILL.md',
|
|
92
|
+
'plugins/*/skills/*/SKILL.md',
|
|
93
|
+
];
|
|
94
|
+
/** Non-markdown config surfaces ai-config.ts discovers and whose content a detector reports on. */
|
|
95
|
+
export const AI_CONFIG_EXACT_FILES = [
|
|
96
|
+
'.claude/settings.json',
|
|
97
|
+
'.claude/settings.local.json',
|
|
98
|
+
'.mcp.json',
|
|
99
|
+
];
|
|
100
|
+
/**
|
|
101
|
+
* Subagent, Cursor-rule and Copilot per-file instruction surfaces. These ARE
|
|
102
|
+
* markdown, and scanner.ts's own `DEFAULT_INSTRUCTION_PATTERNS` glob-matches
|
|
103
|
+
* the same locations — but the detectors that structurally audit them
|
|
104
|
+
* (subagents-detector.ts, cursor-rules-detector.ts, copilot-instructions-
|
|
105
|
+
* detector.ts) read them independently through `context.aiConfig`, which
|
|
106
|
+
* ai-config.ts discovers under `DISCOVERY_IGNORE_DIRS` (no `bin`/`obj`/
|
|
107
|
+
* `Library`/`Temp`), not scanner.ts's longer `SCAN_IGNORE_DIRS`. A file under
|
|
108
|
+
* one of those four extra ignored names is matched here but not by
|
|
109
|
+
* `instructionFiles`'s glob — put in `aiConfigFiles` rather than invented as
|
|
110
|
+
* a sixth result field, since that is genuinely how core reads it: never as
|
|
111
|
+
* always-loaded instruction prose there, always through the ai_config path.
|
|
112
|
+
* A copy outside those four directories legitimately appears in BOTH
|
|
113
|
+
* buckets, the same way a SKILL.md appears in both `instructionFiles` and
|
|
114
|
+
* `skillFiles` — two real pipelines reading the same file for two purposes.
|
|
115
|
+
*/
|
|
116
|
+
export const AI_CONFIG_MARKDOWN_GLOBS = [
|
|
117
|
+
'.claude/agents/**/*.md',
|
|
118
|
+
'.cursor/rules/**/*.mdc',
|
|
119
|
+
'.github/instructions/**/*.md',
|
|
120
|
+
];
|
|
121
|
+
/** Directory names discovery for skills/agents/settings/mcp/cursor-rules ignores. */
|
|
122
|
+
export const DISCOVERY_IGNORE_DIRS = [
|
|
123
|
+
'node_modules', '.git', 'dist', 'build', 'worktrees', '.worktrees',
|
|
124
|
+
];
|
|
125
|
+
/**
|
|
126
|
+
* Exact repo-relative directories that hold skills rather than being one — a
|
|
127
|
+
* SKILL.md sitting directly in one of them owns no bundle of its own.
|
|
128
|
+
*/
|
|
129
|
+
export const SKILL_CONTAINER_DIRS = new Set([
|
|
130
|
+
'.', '.claude', '.agents', '.claude/skills', '.agents/skills', '.claude/plugins', 'skills', 'plugins',
|
|
131
|
+
]);
|
|
132
|
+
export function isSkillContainerDir(dir) {
|
|
133
|
+
return SKILL_CONTAINER_DIRS.has(dir);
|
|
134
|
+
}
|
|
135
|
+
/** Directories inside a skill that are not walked for bundled files. */
|
|
136
|
+
export const BUNDLE_SKIP_DIRS = new Set(['node_modules', '.git', 'worktrees', '.worktrees']);
|
|
137
|
+
/** Upper bound on bundled files read per skill. */
|
|
138
|
+
export const MAX_BUNDLED_FILES_PER_SKILL = 200;
|
|
139
|
+
/** Directory entries visited per skill before the (real, filesystem) walk stops. */
|
|
140
|
+
export const MAX_BUNDLE_LISTING = 20_000;
|
|
141
|
+
/** Dependency package manifests read per skill (per `node_modules/` found, and in total). */
|
|
142
|
+
export const MAX_DEPENDENCY_MANIFESTS = 100;
|
|
143
|
+
/**
|
|
144
|
+
* Scripts, executables, manifests, shell-like config and extensionless files:
|
|
145
|
+
* listed (and scanned) before documents.
|
|
146
|
+
*/
|
|
147
|
+
const PRIORITY_BUNDLE_RE = new RegExp(String.raw `(?:^|\/)(?:[^/.]+|package\.json|requirements[^/]{0,40}\.txt|(?:GNU)?makefile|Dockerfile[^/]{0,40}|Containerfile|Justfile)$|` +
|
|
148
|
+
String.raw `\.(?:sh|bash|zsh|ksh|fish|command|js|mjs|cjs|ts|mts|cts|jsx|tsx|py|pyw|rb|ps1|psm1|pl|php|lua|bat|cmd|mk|` +
|
|
149
|
+
String.raw `vbs|vba|vbe|hta|applescript|wsf|jse|reg|exe|dll|so|dylib|wasm|jar|war|class|zip|tar|gz|tgz|bz2|xz|7z|rar|` +
|
|
150
|
+
String.raw `msi|dmg|pkg|deb|rpm|appimage|apk|bin|o|a|lnk|scr|com|pif|scpt|node|env)$`, 'i');
|
|
151
|
+
export function isPriorityBundleFile(rel) {
|
|
152
|
+
return PRIORITY_BUNDLE_RE.test(rel);
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Candidate `<node_modules>/<pkg>/package.json` manifests, in the order and
|
|
156
|
+
* bounded the way ai-config.ts's `listPackageManifests` reads them: top-level
|
|
157
|
+
* entries sorted by name (dot-prefixed ones skipped), a `@scope` entry's own
|
|
158
|
+
* children sorted by name within it, capped at `cap` total. Shared between
|
|
159
|
+
* that filesystem-backed reader and this module's path-only equivalent so
|
|
160
|
+
* the two cannot drift on ORDER — each supplies its own `exists`/listing.
|
|
161
|
+
*/
|
|
162
|
+
export function dependencyManifestCandidates(topLevelNames, scopedNamesOf, exists, nodeModulesDir, cap = MAX_DEPENDENCY_MANIFESTS) {
|
|
163
|
+
const out = [];
|
|
164
|
+
const tryPkg = (pkgDir) => {
|
|
165
|
+
const manifest = `${pkgDir}/package.json`;
|
|
166
|
+
if (out.length < cap && exists(manifest))
|
|
167
|
+
out.push(manifest);
|
|
168
|
+
};
|
|
169
|
+
for (const name of [...topLevelNames].sort()) {
|
|
170
|
+
if (out.length >= cap)
|
|
171
|
+
break;
|
|
172
|
+
if (name.startsWith('.'))
|
|
173
|
+
continue;
|
|
174
|
+
if (name.startsWith('@')) {
|
|
175
|
+
for (const scoped of [...scopedNamesOf(name)].sort())
|
|
176
|
+
tryPkg(`${nodeModulesDir}/${name}/${scoped}`);
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
tryPkg(`${nodeModulesDir}/${name}`);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
return out;
|
|
183
|
+
}
|
|
184
|
+
// ── Workflows and composite actions (repo-context.ts) ─────────────────────────
|
|
185
|
+
/** Composite actions: a root `action.yml` and any under `.github/actions/`. */
|
|
186
|
+
export const COMPOSITE_ACTION_GLOBS = [
|
|
187
|
+
'action.yml',
|
|
188
|
+
'action.yaml',
|
|
189
|
+
'.github/actions/**/action.yml',
|
|
190
|
+
'.github/actions/**/action.yaml',
|
|
191
|
+
];
|
|
192
|
+
/** Strip a leading `./` and normalize backslashes, so either form of the same path collapses to one entry. */
|
|
193
|
+
function normalizeOnePath(p) {
|
|
194
|
+
let out = p.replace(/\\/g, '/');
|
|
195
|
+
while (out.startsWith('./'))
|
|
196
|
+
out = out.slice(2);
|
|
197
|
+
return out;
|
|
198
|
+
}
|
|
199
|
+
/** Normalizes and de-duplicates by path (first occurrence wins). */
|
|
200
|
+
function normalizePaths(paths) {
|
|
201
|
+
const seen = new Set();
|
|
202
|
+
const out = [];
|
|
203
|
+
for (const raw of paths) {
|
|
204
|
+
const e = typeof raw === 'string' ? { path: raw } : raw;
|
|
205
|
+
const path = normalizeOnePath(e.path);
|
|
206
|
+
if (seen.has(path))
|
|
207
|
+
continue;
|
|
208
|
+
seen.add(path);
|
|
209
|
+
out.push({ path, size: e.size, symlink: e.symlink });
|
|
210
|
+
}
|
|
211
|
+
return out;
|
|
212
|
+
}
|
|
213
|
+
function hasAncestorDir(filePath, dirs) {
|
|
214
|
+
const segs = filePath.split('/');
|
|
215
|
+
return segs.slice(0, -1).some((seg) => dirs.includes(seg));
|
|
216
|
+
}
|
|
217
|
+
/** `dirname` for a POSIX repo-relative path, `.` for a root-level file. */
|
|
218
|
+
function dirOf(filePath) {
|
|
219
|
+
const idx = filePath.lastIndexOf('/');
|
|
220
|
+
return idx < 0 ? '.' : filePath.slice(0, idx);
|
|
221
|
+
}
|
|
222
|
+
function splitNegated(patterns) {
|
|
223
|
+
const positive = [];
|
|
224
|
+
const negative = [];
|
|
225
|
+
for (const p of patterns) {
|
|
226
|
+
if (p.startsWith('!'))
|
|
227
|
+
negative.push(p.slice(1));
|
|
228
|
+
else
|
|
229
|
+
positive.push(p);
|
|
230
|
+
}
|
|
231
|
+
return { positive, negative };
|
|
232
|
+
}
|
|
233
|
+
/** A pattern with no glob metacharacter at all — a plain literal path, directory-ish or not. */
|
|
234
|
+
const GLOB_META_RE = /[*?{}[\]()!]/;
|
|
235
|
+
/**
|
|
236
|
+
* fast-glob's directory-walk pruning of a literal (non-glob) pattern is NOT
|
|
237
|
+
* "matches the directory, so skip it" in either of the two places a literal
|
|
238
|
+
* can appear — and the two places behave DIFFERENTLY from each other
|
|
239
|
+
* (verified empirically against the built `scanFilesWithAliases`, not just
|
|
240
|
+
* read off fast-glob's docs):
|
|
241
|
+
*
|
|
242
|
+
* - as a `!`-prefixed pattern inside the main pattern array (`include`'s own
|
|
243
|
+
* negations): any literal that doesn't end in `/` prunes everything below
|
|
244
|
+
* it, single path segment or many (`!prompts`, `!.claude/skills/foo`).
|
|
245
|
+
* - as an entry of the separate `ignore` OPTION (scanner.ts's `IGNORE_DIRS`,
|
|
246
|
+
* a caller's `exclude`): only a literal with an INTERNAL `/` and no
|
|
247
|
+
* trailing one prunes (`'.claude/skills/foo'`) — a single-segment bare
|
|
248
|
+
* name (`'prompts'`) or a trailing-slash one (`'prompts/'`) prunes
|
|
249
|
+
* NOTHING at all, so leaving those exactly as given already matches real
|
|
250
|
+
* behavior; appending `/**` to them would OVER-prune relative to a real
|
|
251
|
+
* scan, not under-prune.
|
|
252
|
+
*
|
|
253
|
+
* `micromatch(list, ..., {ignore})` has no walk to prune either way; it only
|
|
254
|
+
* matches complete file paths, so a literal that should prune a subtree is
|
|
255
|
+
* over-fetched instead unless `/**` is appended for it specifically.
|
|
256
|
+
*/
|
|
257
|
+
function withNegationPruning(patterns) {
|
|
258
|
+
const out = [];
|
|
259
|
+
for (const p of patterns) {
|
|
260
|
+
out.push(p);
|
|
261
|
+
if (!GLOB_META_RE.test(p) && !p.endsWith('/'))
|
|
262
|
+
out.push(`${p}/**`);
|
|
263
|
+
}
|
|
264
|
+
return out;
|
|
265
|
+
}
|
|
266
|
+
/** See {@link withNegationPruning} — the separate `ignore`-option rule, narrower than the in-pattern `!` rule. */
|
|
267
|
+
function withIgnoreOptionPruning(patterns) {
|
|
268
|
+
const out = [];
|
|
269
|
+
for (const p of patterns) {
|
|
270
|
+
out.push(p);
|
|
271
|
+
if (!GLOB_META_RE.test(p) && p.includes('/') && !p.endsWith('/'))
|
|
272
|
+
out.push(`${p}/**`);
|
|
273
|
+
}
|
|
274
|
+
return out;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* fast-glob's actual pattern-array semantics (scanner.ts, ai-config.ts's
|
|
278
|
+
* `listFiles`): a `!`-prefixed pattern is a GLOBAL subtraction from the union
|
|
279
|
+
* of the positive patterns, regardless of where it sits in the array — unlike
|
|
280
|
+
* a bare `micromatch(list, patterns)` call, which is order-sensitive (a `!`
|
|
281
|
+
* pattern only subtracts from positive matches that appear earlier in the
|
|
282
|
+
* same array). `extraIgnore` is an always-literal addition (scanner.ts's
|
|
283
|
+
* `IGNORE_DIRS`, a caller's `exclude`) — fast-glob's separate `ignore`
|
|
284
|
+
* option, pruned by its own (narrower) rule; `negative` is pruned by the
|
|
285
|
+
* in-pattern `!` rule instead, since that is what it really is.
|
|
286
|
+
*/
|
|
287
|
+
function globMatch(list, patterns, extraIgnore = []) {
|
|
288
|
+
const { positive, negative } = splitNegated(patterns);
|
|
289
|
+
if (positive.length === 0)
|
|
290
|
+
return [];
|
|
291
|
+
const ignore = [...withNegationPruning(negative), ...withIgnoreOptionPruning(extraIgnore)];
|
|
292
|
+
return micromatch(list, positive, { ignore, dot: true });
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* ai-config.ts's `isExcluded` / repo-context.ts's `isExcludedPath`: true when
|
|
296
|
+
* `filePath` itself, or any ancestor directory of it, matches an `exclude`
|
|
297
|
+
* pattern (checked both bare and with a trailing slash, the way a directory
|
|
298
|
+
* entry in `exclude` is meant to cover everything beneath it).
|
|
299
|
+
*/
|
|
300
|
+
function isAncestorExcluded(filePath, exclude) {
|
|
301
|
+
if (exclude.length === 0)
|
|
302
|
+
return false;
|
|
303
|
+
const candidates = [filePath];
|
|
304
|
+
const parts = filePath.split('/');
|
|
305
|
+
for (let i = 1; i < parts.length; i++) {
|
|
306
|
+
const dir = parts.slice(0, i).join('/');
|
|
307
|
+
candidates.push(dir, `${dir}/`);
|
|
308
|
+
}
|
|
309
|
+
return candidates.some((c) => micromatch.isMatch(c, [...exclude], { dot: true }));
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* `discoverAiConfigFiles`'s `list()` narrowing: when `include` is given, the
|
|
313
|
+
* candidate set is INTERSECTED with it via a single, order-sensitive
|
|
314
|
+
* `micromatch` call (not `globMatch` — ai-config.ts does not give `include`
|
|
315
|
+
* fast-glob's global-negation treatment, so neither does this).
|
|
316
|
+
*/
|
|
317
|
+
function narrowByInclude(list, include) {
|
|
318
|
+
if (!include || include.length === 0)
|
|
319
|
+
return [...list];
|
|
320
|
+
return micromatch([...list], [...include], { dot: true });
|
|
321
|
+
}
|
|
322
|
+
function matchesInclude(path, include) {
|
|
323
|
+
return !include || include.length === 0 || micromatch.isMatch(path, [...include], { dot: true });
|
|
324
|
+
}
|
|
325
|
+
const instructionIgnoreGlobs = SCAN_IGNORE_DIRS.map((d) => `**/${d}/**`);
|
|
326
|
+
const discoveryIgnoreGlobs = DISCOVERY_IGNORE_DIRS.map((d) => `**/${d}/**`);
|
|
327
|
+
function underSize(size) {
|
|
328
|
+
return size === undefined || size <= MAX_FILE_SIZE;
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* SKILL.md files plus their bundled files, from a full path list — the pure
|
|
332
|
+
* equivalent of ai-config.ts's `discoverSkillFiles` (no filesystem walk
|
|
333
|
+
* needed: every candidate is already in `entries`). Symlinks are excluded
|
|
334
|
+
* entirely, as `discoverSkillFiles`'s walk does.
|
|
335
|
+
*/
|
|
336
|
+
function selectSkillFiles(entries, include, exclude) {
|
|
337
|
+
const real = entries.filter((e) => !e.symlink);
|
|
338
|
+
const allPaths = real.map((e) => e.path);
|
|
339
|
+
const skillCandidates = globMatch(allPaths, SKILL_GLOBS, [...discoveryIgnoreGlobs, ...exclude]);
|
|
340
|
+
const skillMatches = narrowByInclude(skillCandidates, include).sort();
|
|
341
|
+
if (skillMatches.length === 0)
|
|
342
|
+
return [];
|
|
343
|
+
const skillSet = new Set(skillMatches);
|
|
344
|
+
const skillDirs = [...new Set(skillMatches.map((p) => dirOf(p)).filter((dir) => !isSkillContainerDir(dir)))].sort();
|
|
345
|
+
const skillDirSet = new Set(skillDirs);
|
|
346
|
+
const nearestSkillDir = (filePath) => {
|
|
347
|
+
const segs = filePath.split('/');
|
|
348
|
+
for (let n = segs.length - 1; n >= 1; n--) {
|
|
349
|
+
const dir = segs.slice(0, n).join('/');
|
|
350
|
+
if (skillDirSet.has(dir))
|
|
351
|
+
return dir;
|
|
352
|
+
}
|
|
353
|
+
return null;
|
|
354
|
+
};
|
|
355
|
+
const byPath = (a, b) => (a < b ? -1 : a > b ? 1 : 0);
|
|
356
|
+
const pathSet = new Set(allPaths);
|
|
357
|
+
const perSkillOwned = new Map();
|
|
358
|
+
const perSkillNodeModules = new Map();
|
|
359
|
+
for (const entry of real) {
|
|
360
|
+
const rel = entry.path;
|
|
361
|
+
if (skillSet.has(rel))
|
|
362
|
+
continue;
|
|
363
|
+
if (rel.endsWith('/SKILL.md') || rel === 'SKILL.md')
|
|
364
|
+
continue;
|
|
365
|
+
const dir = nearestSkillDir(rel);
|
|
366
|
+
if (dir === null)
|
|
367
|
+
continue;
|
|
368
|
+
const belowSkillDir = rel.split('/').slice(dir === '.' ? 0 : dir.split('/').length);
|
|
369
|
+
const ancestors = belowSkillDir.slice(0, -1);
|
|
370
|
+
const skipIdx = ancestors.findIndex((seg) => BUNDLE_SKIP_DIRS.has(seg));
|
|
371
|
+
if (skipIdx !== -1) {
|
|
372
|
+
// The real walk never descends into a BUNDLE_SKIP_DIR (node_modules,
|
|
373
|
+
// .git, worktrees, .worktrees), so it never evaluates `isExcluded` on
|
|
374
|
+
// anything below it either — only on the skip-dir ITSELF (and its own
|
|
375
|
+
// ancestors), while it was still walking down to find it. Checking
|
|
376
|
+
// `exclude` against the full nested path (as if the walk had visited
|
|
377
|
+
// it) would wrongly drop a node_modules package.json that an
|
|
378
|
+
// unrelated-looking `exclude: ['**/package.json']` happens to match —
|
|
379
|
+
// ai-config.ts's `listPackageManifests` does not consult `exclude` at
|
|
380
|
+
// all once it opens a `node_modules` dir (see the comment below).
|
|
381
|
+
if (ancestors[skipIdx] === 'node_modules') {
|
|
382
|
+
const nmDirRel = [dir === '.' ? null : dir, ...ancestors.slice(0, skipIdx + 1)].filter(Boolean).join('/');
|
|
383
|
+
if (isAncestorExcluded(nmDirRel, exclude))
|
|
384
|
+
continue;
|
|
385
|
+
const set = perSkillNodeModules.get(dir) ?? new Set();
|
|
386
|
+
set.add(nmDirRel);
|
|
387
|
+
perSkillNodeModules.set(dir, set);
|
|
388
|
+
}
|
|
389
|
+
continue; // inside node_modules/.git/worktrees/.worktrees — not an owned bundle file
|
|
390
|
+
}
|
|
391
|
+
// `isExcluded`'s check comes before anything else for a regular file in
|
|
392
|
+
// the real walk: an excluded path is never counted as owned.
|
|
393
|
+
if (isAncestorExcluded(rel, exclude))
|
|
394
|
+
continue;
|
|
395
|
+
if (!matchesInclude(rel, include))
|
|
396
|
+
continue;
|
|
397
|
+
const list = perSkillOwned.get(dir) ?? [];
|
|
398
|
+
list.push(rel);
|
|
399
|
+
perSkillOwned.set(dir, list);
|
|
400
|
+
}
|
|
401
|
+
const out = [...skillMatches];
|
|
402
|
+
for (const dir of skillDirs) {
|
|
403
|
+
let owned = perSkillOwned.get(dir) ?? [];
|
|
404
|
+
// MAX_BUNDLE_LISTING bounds how many directory entries the real walk visits
|
|
405
|
+
// before it gives up on a single skill; a flat path list has no traversal
|
|
406
|
+
// order to truncate mid-walk, so the closest faithful approximation is
|
|
407
|
+
// capping the candidate pool (sorted, for determinism) before priority
|
|
408
|
+
// sorting and the per-skill cap apply.
|
|
409
|
+
owned = owned.sort(byPath).slice(0, MAX_BUNDLE_LISTING);
|
|
410
|
+
owned.sort((a, b) => Number(isPriorityBundleFile(b)) - Number(isPriorityBundleFile(a)) || byPath(a, b));
|
|
411
|
+
out.push(...owned.slice(0, MAX_BUNDLED_FILES_PER_SKILL));
|
|
412
|
+
// Known divergence, matching ai-config.ts's own `listPackageManifests`:
|
|
413
|
+
// `exclude` only gates whether a `node_modules` dir is entered at all (the
|
|
414
|
+
// check on `rel` above, before this point); once inside, every manifest
|
|
415
|
+
// found is harvested regardless of `exclude` — core's real reader does
|
|
416
|
+
// not re-check it per package.json either.
|
|
417
|
+
const dependencyManifests = [];
|
|
418
|
+
for (const nmDir of [...(perSkillNodeModules.get(dir) ?? [])].sort()) {
|
|
419
|
+
const prefix = `${nmDir}/`;
|
|
420
|
+
const topLevelNames = new Set();
|
|
421
|
+
for (const p of allPaths) {
|
|
422
|
+
if (p.startsWith(prefix))
|
|
423
|
+
topLevelNames.add(p.slice(prefix.length).split('/')[0]);
|
|
424
|
+
}
|
|
425
|
+
const scopedNamesOf = (scope) => {
|
|
426
|
+
const scopePrefix = `${nmDir}/${scope}/`;
|
|
427
|
+
const names = new Set();
|
|
428
|
+
for (const p of allPaths) {
|
|
429
|
+
if (p.startsWith(scopePrefix))
|
|
430
|
+
names.add(p.slice(scopePrefix.length).split('/')[0]);
|
|
431
|
+
}
|
|
432
|
+
return [...names];
|
|
433
|
+
};
|
|
434
|
+
dependencyManifests.push(...dependencyManifestCandidates([...topLevelNames], scopedNamesOf, (rel) => pathSet.has(rel), nmDir));
|
|
435
|
+
}
|
|
436
|
+
out.push(...dependencyManifests.sort().slice(0, MAX_DEPENDENCY_MANIFESTS));
|
|
437
|
+
}
|
|
438
|
+
return out.sort(byPath);
|
|
439
|
+
}
|
|
440
|
+
function selectAiConfigFiles(allPaths, include, exclude) {
|
|
441
|
+
const matches = globMatch(allPaths, [...AI_CONFIG_EXACT_FILES, ...AI_CONFIG_MARKDOWN_GLOBS], [...discoveryIgnoreGlobs, ...exclude]);
|
|
442
|
+
return narrowByInclude(matches, include).sort();
|
|
443
|
+
}
|
|
444
|
+
function selectWorkflowFiles(entries, exclude) {
|
|
445
|
+
const real = entries.filter((e) => !e.symlink);
|
|
446
|
+
const paths = real.map((e) => e.path);
|
|
447
|
+
const sizeOf = new Map(real.map((e) => [e.path, e.size]));
|
|
448
|
+
// `context.workflows.files` lists every workflow file unconditionally — no
|
|
449
|
+
// exclude, no size cap (only reading its CONTENT into `sources` is gated).
|
|
450
|
+
const workflows = paths.filter((p) => p.startsWith('.github/workflows/') && p.split('/').length === 3 && /\.ya?ml$/i.test(p));
|
|
451
|
+
// Composite actions: `listFiles`'s own DISCOVERY_IGNORE_DIRS, then
|
|
452
|
+
// `isExcludedPath`, then the same MAX_FILE_SIZE guard every read applies
|
|
453
|
+
// (repo-context.ts's `readCompositeActionSources` always checks it).
|
|
454
|
+
const composites = globMatch(paths, COMPOSITE_ACTION_GLOBS, discoveryIgnoreGlobs)
|
|
455
|
+
.filter((p) => !isAncestorExcluded(p, exclude))
|
|
456
|
+
.filter((p) => underSize(sizeOf.get(p)));
|
|
457
|
+
return [...new Set([...workflows, ...composites])].sort();
|
|
458
|
+
}
|
|
459
|
+
/** Root names GNU make looks up when no `-f` is given. */
|
|
460
|
+
const ROOT_MAKEFILE_NAMES = ['GNUmakefile', 'makefile', 'Makefile'];
|
|
461
|
+
/** Root manifests read for cross-referencing (version/script checks), never scanned as prose. */
|
|
462
|
+
const ROOT_MANIFEST_NAMES = ['package.json', 'pyproject.toml', 'requirements.txt', 'Cargo.toml'];
|
|
463
|
+
/**
|
|
464
|
+
* The narrowest ignore list anything in core's context-reading paths uses:
|
|
465
|
+
* workspace-manifests.ts's own nested-package.json discovery ignores exactly
|
|
466
|
+
* this, and a Makefile read via `readMakefile`/RepoTree has no ignore list
|
|
467
|
+
* of its own at all (it is handed a directory directly, from a `make -C`/
|
|
468
|
+
* `cd dir && make` command) — `node_modules`/`.git` is the only pair nothing
|
|
469
|
+
* in a real checkout legitimately builds or documents a Makefile under.
|
|
470
|
+
*/
|
|
471
|
+
const MINIMAL_IGNORE_DIRS = ['node_modules', '.git'];
|
|
472
|
+
/** tsconfig/jsconfig/deno configs dependency-staleness.ts reads at the root and at each manifest's directory. */
|
|
473
|
+
const NESTED_CONFIG_NAMES = ['tsconfig.json', 'jsconfig.json', 'deno.json', 'deno.jsonc'];
|
|
474
|
+
function selectContextFiles(paths, skillFiles, exclude) {
|
|
475
|
+
const pathSet = new Set(paths);
|
|
476
|
+
const out = new Set();
|
|
477
|
+
// Root-level reads core never checks `exclude` against.
|
|
478
|
+
for (const p of paths) {
|
|
479
|
+
if (p === '.gitignore' || p === 'pnpm-workspace.yaml')
|
|
480
|
+
out.add(p);
|
|
481
|
+
else if (ROOT_MANIFEST_NAMES.includes(p))
|
|
482
|
+
out.add(p);
|
|
483
|
+
else if (p === '.promptci/config.json' || p === '.promptci/custom-rules.json')
|
|
484
|
+
out.add(p);
|
|
485
|
+
}
|
|
486
|
+
// frameworks/dotnet.ts reads exactly one root `.csproj` (the first, sorted).
|
|
487
|
+
const rootCsproj = paths.filter((p) => !p.includes('/') && p.endsWith('.csproj')).sort()[0];
|
|
488
|
+
if (rootCsproj !== undefined)
|
|
489
|
+
out.add(rootCsproj);
|
|
490
|
+
// Makefile/GNUmakefile/makefile at any depth outside node_modules/.git:
|
|
491
|
+
// `make -C dir` / `cd dir && make` makes a non-root one reachable, and
|
|
492
|
+
// makefile.ts's `readMakefile` is handed that directory DIRECTLY (via
|
|
493
|
+
// RepoTree, with no ignore list of its own) rather than discovered by a
|
|
494
|
+
// glob — so a Makefile under `build/`, `bin/` or any other name in
|
|
495
|
+
// scanner.ts's SCAN_IGNORE_DIRS is still reachable this way. WHICH
|
|
496
|
+
// directory core actually opens is content-dependent (it follows an
|
|
497
|
+
// instruction file's documented command), so every candidate name outside
|
|
498
|
+
// the two directories nothing legitimately builds from is listed instead
|
|
499
|
+
// of guessing which one a command points at.
|
|
500
|
+
for (const p of paths) {
|
|
501
|
+
const base = p.slice(p.lastIndexOf('/') + 1);
|
|
502
|
+
if (ROOT_MAKEFILE_NAMES.includes(base) && !hasAncestorDir(p, MINIMAL_IGNORE_DIRS))
|
|
503
|
+
out.add(p);
|
|
504
|
+
}
|
|
505
|
+
// Nested .gitignore files, outside the directories the scan ignores wholesale.
|
|
506
|
+
for (const p of paths) {
|
|
507
|
+
if (p !== '.gitignore' && p.endsWith('/.gitignore') && !hasAncestorDir(p, SCAN_IGNORE_DIRS))
|
|
508
|
+
out.add(p);
|
|
509
|
+
}
|
|
510
|
+
// Nested package.json (workspace manifests): workspace-manifests.ts's own
|
|
511
|
+
// discovery ignores only node_modules/.git (narrower than the scanner's own
|
|
512
|
+
// ignore list), honors `exclude`, and caps what it reads EAGERLY at 200 —
|
|
513
|
+
// but dependency-staleness.ts's `loadLazyFacts` reads up to 200 MORE,
|
|
514
|
+
// lazily, the first time an instruction mentions a package not already
|
|
515
|
+
// known, with its own (broader) ignore list. Between the two, core can end
|
|
516
|
+
// up reading any nested package.json outside node_modules/.git, and WHICH
|
|
517
|
+
// one depends on instruction content this pure function cannot read. So,
|
|
518
|
+
// deliberately, no cap is applied here: every nested package.json is
|
|
519
|
+
// listed as a candidate — a caller fetching hundreds of them in a huge
|
|
520
|
+
// monorepo pays a real cost for that completeness, but a 200-file cap here
|
|
521
|
+
// would silently drop a manifest core's lazy path can still reach.
|
|
522
|
+
const nestedPackageJson = paths
|
|
523
|
+
.filter((p) => p !== 'package.json' && p.endsWith('/package.json'))
|
|
524
|
+
.filter((p) => !hasAncestorDir(p, MINIMAL_IGNORE_DIRS))
|
|
525
|
+
.filter((p) => !skillFiles.has(p))
|
|
526
|
+
.filter((p) => !isAncestorExcluded(p, exclude))
|
|
527
|
+
.sort();
|
|
528
|
+
for (const p of nestedPackageJson)
|
|
529
|
+
out.add(p);
|
|
530
|
+
// tsconfig/jsconfig/deno configs, read at the root and at each manifest dir above.
|
|
531
|
+
const manifestDirs = new Set(['.', ...nestedPackageJson.map((p) => dirOf(p))]);
|
|
532
|
+
for (const dir of manifestDirs) {
|
|
533
|
+
for (const name of NESTED_CONFIG_NAMES) {
|
|
534
|
+
const candidate = dir === '.' ? name : `${dir}/${name}`;
|
|
535
|
+
if (pathSet.has(candidate) && !isAncestorExcluded(candidate, exclude))
|
|
536
|
+
out.add(candidate);
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
return [...out].sort();
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* Pure counterpart to a real scan's file discovery: given a repo's full path
|
|
543
|
+
* list (as a server building from GitHub's tree listing has, not a checkout),
|
|
544
|
+
* returns what a scan would read, classified the way the scanner, ai_config
|
|
545
|
+
* and repo-context modules classify it. Applies the same ignore dirs,
|
|
546
|
+
* `include`/`exclude` policy, skill-bundle rules and caps those modules use —
|
|
547
|
+
* see the module doc above.
|
|
548
|
+
*/
|
|
549
|
+
export function selectScanPaths(paths, options) {
|
|
550
|
+
const entries = normalizePaths(paths);
|
|
551
|
+
const allPaths = entries.map((e) => e.path);
|
|
552
|
+
const sizeOf = new Map(entries.map((e) => [e.path, e.size]));
|
|
553
|
+
const include = options?.include && options.include.length > 0 ? [...options.include] : undefined;
|
|
554
|
+
const exclude = options?.exclude ? [...options.exclude] : [];
|
|
555
|
+
const clineIsDir = allPaths.some((p) => p.startsWith('.clinerules/'));
|
|
556
|
+
const instrPatterns = include ?? defaultInstructionPatterns(clineIsDir);
|
|
557
|
+
const instructionFiles = globMatch(allPaths, instrPatterns, [...instructionIgnoreGlobs, ...exclude])
|
|
558
|
+
.filter((p) => underSize(sizeOf.get(p)))
|
|
559
|
+
.sort();
|
|
560
|
+
const skillFiles = selectSkillFiles(entries, include, exclude);
|
|
561
|
+
return {
|
|
562
|
+
instructionFiles,
|
|
563
|
+
skillFiles,
|
|
564
|
+
aiConfigFiles: selectAiConfigFiles(allPaths, include, exclude),
|
|
565
|
+
workflowFiles: selectWorkflowFiles(entries, exclude),
|
|
566
|
+
contextFiles: selectContextFiles(allPaths, new Set(skillFiles), exclude),
|
|
567
|
+
};
|
|
568
|
+
}
|
|
569
|
+
//# sourceMappingURL=discovery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.js","sourceRoot":"","sources":["../src/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,gFAAgF;AAEhF,iFAAiF;AACjF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,GAAG,IAAI,CAAC;AACxC,wFAAwF;AACxF,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAEtC,iFAAiF;AAEjF,kFAAkF;AAClF,MAAM,CAAC,MAAM,4BAA4B,GAAsB;IAC7D,4BAA4B;IAC5B,WAAW;IACX,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB,yDAAyD;IACzD,WAAW;IACX,sEAAsE;IACtE,uBAAuB;IACvB,aAAa;IACb,qBAAqB;IACrB,2BAA2B;IAC3B,oEAAoE;IACpE,SAAS;IACT,SAAS;IACT,UAAU;IACV,mBAAmB;IACnB,kBAAkB;IAClB,6DAA6D;IAC7D,iCAAiC;IACjC,8BAA8B;IAC9B,qCAAqC;IACrC,iBAAiB;IACjB,uDAAuD;IACvD,WAAW;IACX,OAAO;IACP,iBAAiB;IACjB,iBAAiB;IACjB,gBAAgB;IAChB,qBAAqB;IACrB,gBAAgB;IAChB,eAAe;IACf,0DAA0D;IAC1D,YAAY;IACZ,yBAAyB;IACzB,iBAAiB;IACjB,wBAAwB;CACzB,CAAC;AAEF,iGAAiG;AACjG,MAAM,kBAAkB,GAAwB,IAAI,GAAG,CAAC;IACtD,qBAAqB;IACrB,2BAA2B;CAC5B,CAAC,CAAC;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AE,CAAC;IAEV,MAAM,UAAU,GAAG,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;IAE/D,OAAO;QACL,gBAAgB;QAChB,UAAU;QACV,aAAa,EAAE,mBAAmB,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC;QAC9D,aAAa,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC;QACpD,YAAY,EAAE,kBAAkB,CAAC,QAAQ,EAAE,IAAI,GAAG,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;KACzE,CAAC;AACJ,CAAC"}
|
package/dist/fix-engine.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fix-engine.d.ts","sourceRoot":"","sources":["../src/fix-engine.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"fix-engine.d.ts","sourceRoot":"","sources":["../src/fix-engine.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAW,aAAa,EAAE,MAAM,YAAY,CAAC;AAKzD,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB;AAiBD;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,sBAAsB,EAAE,MAAM,GAAG,MAAM,CAUxF;AAqED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,KAAK,EAAE,aAAa,EACpB,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,UAAU,EAAE,CAAC,CAwKvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAE1D"}
|