intentpatch 0.1.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/README.ko.md +74 -22
- package/README.md +62 -17
- package/dist/application/ports/module-alias-resolver.d.ts +11 -0
- package/dist/application/ports/module-alias-resolver.d.ts.map +1 -0
- package/dist/application/ports/module-alias-resolver.js +2 -0
- package/dist/application/ports/module-alias-resolver.js.map +1 -0
- package/dist/application/ports/module-reference-extractor.d.ts +1 -0
- package/dist/application/ports/module-reference-extractor.d.ts.map +1 -1
- package/dist/application/ports/package-lock-parser.d.ts +20 -0
- package/dist/application/ports/package-lock-parser.d.ts.map +1 -0
- package/dist/application/ports/package-lock-parser.js +2 -0
- package/dist/application/ports/package-lock-parser.js.map +1 -0
- package/dist/application/ports/parse-failure.d.ts +7 -0
- package/dist/application/ports/parse-failure.d.ts.map +1 -0
- package/dist/application/ports/parse-failure.js +5 -0
- package/dist/application/ports/parse-failure.js.map +1 -0
- package/dist/application/ports/pnpm-lock-parser.d.ts +20 -0
- package/dist/application/ports/pnpm-lock-parser.d.ts.map +1 -0
- package/dist/application/ports/pnpm-lock-parser.js +2 -0
- package/dist/application/ports/pnpm-lock-parser.js.map +1 -0
- package/dist/application/ports/pnpm-workspace-parser.d.ts +14 -0
- package/dist/application/ports/pnpm-workspace-parser.d.ts.map +1 -0
- package/dist/application/ports/pnpm-workspace-parser.js +2 -0
- package/dist/application/ports/pnpm-workspace-parser.js.map +1 -0
- package/dist/application/rules/added-dependency-usage-rule.d.ts +16 -0
- package/dist/application/rules/added-dependency-usage-rule.d.ts.map +1 -0
- package/dist/application/rules/added-dependency-usage-rule.js +98 -0
- package/dist/application/rules/added-dependency-usage-rule.js.map +1 -0
- package/dist/application/rules/npm-lockfile-rule.d.ts +12 -0
- package/dist/application/rules/npm-lockfile-rule.d.ts.map +1 -0
- package/dist/application/rules/npm-lockfile-rule.js +109 -0
- package/dist/application/rules/npm-lockfile-rule.js.map +1 -0
- package/dist/application/rules/npm-workspace-dependency-rule.d.ts +10 -0
- package/dist/application/rules/npm-workspace-dependency-rule.d.ts.map +1 -0
- package/dist/application/rules/npm-workspace-dependency-rule.js +107 -0
- package/dist/application/rules/npm-workspace-dependency-rule.js.map +1 -0
- package/dist/application/rules/package-dependency-rule.d.ts +4 -3
- package/dist/application/rules/package-dependency-rule.d.ts.map +1 -1
- package/dist/application/rules/package-dependency-rule.js +34 -31
- package/dist/application/rules/package-dependency-rule.js.map +1 -1
- package/dist/application/rules/pnpm-lockfile-rule.d.ts +12 -0
- package/dist/application/rules/pnpm-lockfile-rule.d.ts.map +1 -0
- package/dist/application/rules/pnpm-lockfile-rule.js +119 -0
- package/dist/application/rules/pnpm-lockfile-rule.js.map +1 -0
- package/dist/application/rules/pnpm-workspace-dependency-rule.d.ts +12 -0
- package/dist/application/rules/pnpm-workspace-dependency-rule.d.ts.map +1 -0
- package/dist/application/rules/pnpm-workspace-dependency-rule.js +59 -0
- package/dist/application/rules/pnpm-workspace-dependency-rule.js.map +1 -0
- package/dist/application/services/analyze-import-impact.d.ts +3 -1
- package/dist/application/services/analyze-import-impact.d.ts.map +1 -1
- package/dist/application/services/analyze-import-impact.js +12 -7
- package/dist/application/services/analyze-import-impact.js.map +1 -1
- package/dist/application/services/workspace-manifest-analysis.d.ts +12 -0
- package/dist/application/services/workspace-manifest-analysis.d.ts.map +1 -0
- package/dist/application/services/workspace-manifest-analysis.js +60 -0
- package/dist/application/services/workspace-manifest-analysis.js.map +1 -0
- package/dist/domain/value-guards.d.ts +3 -0
- package/dist/domain/value-guards.d.ts.map +1 -0
- package/dist/domain/value-guards.js +5 -0
- package/dist/domain/value-guards.js.map +1 -0
- package/dist/infrastructure/config/json-change-contract-loader.d.ts.map +1 -1
- package/dist/infrastructure/config/json-change-contract-loader.js +1 -3
- package/dist/infrastructure/config/json-change-contract-loader.js.map +1 -1
- package/dist/infrastructure/config/text-intent-loader.d.ts +5 -0
- package/dist/infrastructure/config/text-intent-loader.d.ts.map +1 -0
- package/dist/infrastructure/config/text-intent-loader.js +30 -0
- package/dist/infrastructure/config/text-intent-loader.js.map +1 -0
- package/dist/infrastructure/git/git-file-snapshot-source.d.ts.map +1 -1
- package/dist/infrastructure/git/git-file-snapshot-source.js +6 -2
- package/dist/infrastructure/git/git-file-snapshot-source.js.map +1 -1
- package/dist/infrastructure/npm/npm-package-lock-parser.d.ts +6 -0
- package/dist/infrastructure/npm/npm-package-lock-parser.d.ts.map +1 -0
- package/dist/infrastructure/npm/npm-package-lock-parser.js +89 -0
- package/dist/infrastructure/npm/npm-package-lock-parser.js.map +1 -0
- package/dist/infrastructure/pnpm/pnpm-lock-parser.d.ts +6 -0
- package/dist/infrastructure/pnpm/pnpm-lock-parser.d.ts.map +1 -0
- package/dist/infrastructure/pnpm/pnpm-lock-parser.js +122 -0
- package/dist/infrastructure/pnpm/pnpm-lock-parser.js.map +1 -0
- package/dist/infrastructure/pnpm/pnpm-workspace-parser.d.ts +6 -0
- package/dist/infrastructure/pnpm/pnpm-workspace-parser.d.ts.map +1 -0
- package/dist/infrastructure/pnpm/pnpm-workspace-parser.js +62 -0
- package/dist/infrastructure/pnpm/pnpm-workspace-parser.js.map +1 -0
- package/dist/infrastructure/typescript/package-module-reference-extractor.d.ts +7 -0
- package/dist/infrastructure/typescript/package-module-reference-extractor.d.ts.map +1 -0
- package/dist/infrastructure/typescript/package-module-reference-extractor.js +68 -0
- package/dist/infrastructure/typescript/package-module-reference-extractor.js.map +1 -0
- package/dist/infrastructure/typescript/typescript-config-loader.d.ts +17 -0
- package/dist/infrastructure/typescript/typescript-config-loader.d.ts.map +1 -0
- package/dist/infrastructure/typescript/typescript-config-loader.js +97 -0
- package/dist/infrastructure/typescript/typescript-config-loader.js.map +1 -0
- package/dist/infrastructure/typescript/typescript-module-alias-resolver.d.ts +10 -0
- package/dist/infrastructure/typescript/typescript-module-alias-resolver.d.ts.map +1 -0
- package/dist/infrastructure/typescript/typescript-module-alias-resolver.js +78 -0
- package/dist/infrastructure/typescript/typescript-module-alias-resolver.js.map +1 -0
- package/dist/presentation/analyze-repository.d.ts +2 -0
- package/dist/presentation/analyze-repository.d.ts.map +1 -1
- package/dist/presentation/analyze-repository.js +28 -5
- package/dist/presentation/analyze-repository.js.map +1 -1
- package/dist/presentation/cli/arguments.d.ts +1 -0
- package/dist/presentation/cli/arguments.d.ts.map +1 -1
- package/dist/presentation/cli/arguments.js +7 -0
- package/dist/presentation/cli/arguments.js.map +1 -1
- package/dist/presentation/cli/main.js +5 -0
- package/dist/presentation/cli/main.js.map +1 -1
- package/dist/presentation/github/action-inputs.d.ts +2 -0
- package/dist/presentation/github/action-inputs.d.ts.map +1 -1
- package/dist/presentation/github/action-inputs.js +10 -0
- package/dist/presentation/github/action-inputs.js.map +1 -1
- package/dist/presentation/github/pr-body-intent.d.ts +3 -0
- package/dist/presentation/github/pr-body-intent.d.ts.map +1 -0
- package/dist/presentation/github/pr-body-intent.js +15 -0
- package/dist/presentation/github/pr-body-intent.js.map +1 -0
- package/dist/presentation/github/run-action.d.ts.map +1 -1
- package/dist/presentation/github/run-action.js +10 -0
- package/dist/presentation/github/run-action.js.map +1 -1
- package/package.json +3 -2
package/README.ko.md
CHANGED
|
@@ -21,9 +21,16 @@ LLM 없이도 재현 가능한 분석을 제공하고, AI 설명 기능은 선
|
|
|
21
21
|
|
|
22
22
|
## 빠른 시작
|
|
23
23
|
|
|
24
|
-
Node.js 20 이상과 Git이 설치되어 있어야 합니다.
|
|
24
|
+
Node.js 20 이상과 Git이 설치되어 있어야 합니다. npm에 공개된 v0.3.0은 전역 설치 없이
|
|
25
25
|
실행할 수 있습니다.
|
|
26
26
|
|
|
27
|
+
```bash
|
|
28
|
+
npx intentpatch analyze --cwd /path/to/repository
|
|
29
|
+
npx intentpatch analyze --format html --output intentpatch-report.html
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
현재 소스 버전을 실행하려면 저장소를 빌드합니다.
|
|
33
|
+
|
|
27
34
|
```bash
|
|
28
35
|
git clone https://github.com/xx2xxjaeil/intent-patch.git
|
|
29
36
|
cd intent-patch
|
|
@@ -33,13 +40,6 @@ node dist/presentation/cli/main.js --version
|
|
|
33
40
|
node dist/presentation/cli/main.js analyze --cwd /path/to/repository
|
|
34
41
|
```
|
|
35
42
|
|
|
36
|
-
npm 릴리스가 공개된 뒤에는 설치 없이 같은 CLI를 실행할 수 있습니다.
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
npx intentpatch analyze --cwd /path/to/repository
|
|
40
|
-
npx intentpatch analyze --format html --output intentpatch-report.html
|
|
41
|
-
```
|
|
42
|
-
|
|
43
43
|
핵심 분석에는 API key, 유료 AI 모델, 서버 또는 데이터베이스가 필요하지 않습니다. 분석할 Git
|
|
44
44
|
저장소의 파일은 로컬에서 처리하며 LLM 연결은 현재 기본 실행 경로에 포함되지 않습니다.
|
|
45
45
|
|
|
@@ -67,7 +67,7 @@ jobs:
|
|
|
67
67
|
|
|
68
68
|
- name: Analyze pull request
|
|
69
69
|
id: intentpatch
|
|
70
|
-
uses: xx2xxjaeil/intent-patch@
|
|
70
|
+
uses: xx2xxjaeil/intent-patch@v0.3.0
|
|
71
71
|
with:
|
|
72
72
|
fail-on: high
|
|
73
73
|
|
|
@@ -79,9 +79,10 @@ jobs:
|
|
|
79
79
|
path: intentpatch-report
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
Action은 릴리스 버전이나 불변 commit SHA로 고정하는 방식을 권장합니다. v0.3.0에는 pnpm
|
|
83
|
+
lockfile/workspace 분석, 새 의존성의 정적 사용 검토, 명시적 요청문 입력이 포함됩니다.
|
|
84
|
+
`@main`은 미릴리스 변경을 따라갑니다.
|
|
85
|
+
Action은 PR·push 이벤트의 commit 범위를 자동으로 선택하고 다음 결과를 남깁니다.
|
|
85
86
|
|
|
86
87
|
- GitHub Actions Job Summary의 Markdown 보고서
|
|
87
88
|
- 심각도별 workflow annotation
|
|
@@ -127,9 +128,14 @@ LOW 구현체가 하나뿐인 추상화 추가
|
|
|
127
128
|
분석 결과는 단순한 경고 문구가 아니라 관련 파일, 규칙 ID, 판단 근거와 함께 제공하는 것을
|
|
128
129
|
원칙으로 합니다.
|
|
129
130
|
|
|
131
|
+
실제 IntentPatch 커밋을 분석한 [독립 실행형 HTML 예시](./docs/examples/intent-input-change.html)와
|
|
132
|
+
[3건의 검증 결과·재현 명령](./docs/real-world-evaluation.md)을 볼 수 있습니다. 저장소를 clone한
|
|
133
|
+
뒤 HTML 파일을 브라우저에서 열어 주세요. GitHub 파일 화면은 렌더링 대신 소스를 보여줄 수
|
|
134
|
+
있습니다.
|
|
135
|
+
|
|
130
136
|
## 현재 구현된 기능
|
|
131
137
|
|
|
132
|
-
현재
|
|
138
|
+
현재 소스는 Git 변경사항 수집, 루트·npm workspace `package.json`의 직접 dependency와 npm lockfile 분석, TypeScript
|
|
133
139
|
최상위 심볼과 공개 API 변경 분석, 기존 구현 중복·단일 구현 추상화 신호, import graph 기반
|
|
134
140
|
영향 범위와 테스트 동반 변경 분석을 제공합니다.
|
|
135
141
|
|
|
@@ -145,7 +151,15 @@ LOW 구현체가 하나뿐인 추상화 추가
|
|
|
145
151
|
- 외부 CDN이나 JavaScript dependency가 필요 없는 인라인 CSS·SVG 시각화
|
|
146
152
|
- production·development dependency 추가 탐지
|
|
147
153
|
- dependency 삭제, 버전 변경, 섹션 이동 탐지
|
|
154
|
+
- 새 직접 dependency에 정적 JS/TS 참조가 없으면 `low` 심각도의 검토 후보로 표시
|
|
148
155
|
- 잘못된 `package.json`을 예외 대신 근거가 포함된 finding으로 보고
|
|
156
|
+
- npm `package-lock.json` v2/v3의 실제 설치 패키지 추가·삭제·버전 변경 비교
|
|
157
|
+
- scoped·중첩 설치 경로를 구분하고 로컬 workspace 링크는 제외
|
|
158
|
+
- pnpm `pnpm-lock.yaml` v9의 레지스트리 패키지 추가·삭제·버전 변경 비교(2개 문서 형식 포함)
|
|
159
|
+
- 잘못되었거나 미지원인 lockfile을 누락하지 않고 finding으로 보고
|
|
160
|
+
- 루트 `workspaces` 패턴에 속한 변경 manifest의 직접 dependency를 workspace별로 보고
|
|
161
|
+
- `pnpm-workspace.yaml`의 포함·제외 패턴에 속한 변경 manifest의 직접 dependency를 보고
|
|
162
|
+
- workspace 설정 변경과 manifest의 workspace 안팎 이동을 탐지
|
|
149
163
|
- finding 심각도(`high`, `medium`, `low`) 집계
|
|
150
164
|
- CI 품질 게이트를 위한 `--fail-on` 종료 코드
|
|
151
165
|
- 설치된 패키지 버전을 확인하는 `--version` 명령
|
|
@@ -160,11 +174,14 @@ LOW 구현체가 하나뿐인 추상화 추가
|
|
|
160
174
|
- rename 전후 파일 경로를 사용한 심볼 비교
|
|
161
175
|
- 구문 오류가 있는 파일을 누락시키지 않고 분석 불가 근거로 보고
|
|
162
176
|
- `.ts`·`.tsx` 파일의 상대 경로 정적 import와 re-export 관계 수집
|
|
177
|
+
- 가장 가까운 `tsconfig.json`·`jsconfig.json`의 `paths`·`baseUrl`과 상대 경로 `extends`를
|
|
178
|
+
사용해 로컬 별칭 import 해석
|
|
163
179
|
- `.js`·`.jsx`·`.mjs`·`.cjs` specifier를 대응하는 TypeScript 소스로 해석
|
|
164
180
|
- 변경 모듈을 import하는 직접 의존자와 여러 단계를 거친 간접 영향 파일 계산
|
|
165
181
|
- 해결하지 못한 상대 import와 읽기·파싱 실패를 분석 근거로 보존
|
|
166
182
|
- working tree의 tracked·untracked 파일 또는 지정한 head ref를 동일한 결과점에서 분석
|
|
167
183
|
- `.intentpatch.json`에 요청 의도, 예상 경로, 허용 경로와 변경량 예산 선언
|
|
184
|
+
- CLI 요청 문서 또는 선택적으로 GitHub PR 본문에서 요청 의도를 입력
|
|
168
185
|
- 예상·허용 패턴을 벗어난 변경 파일을 파일별 `medium` finding으로 탐지
|
|
169
186
|
- 변경 파일 수와 측정 라인 예산 초과를 수치 근거가 있는 `low` finding으로 탐지
|
|
170
187
|
- Contract가 지정한 소스·테스트 경로를 분류하고 파일명 기준으로 관련 변경 연결
|
|
@@ -174,7 +191,7 @@ LOW 구현체가 하나뿐인 추상화 추가
|
|
|
174
191
|
- Pull Request·push commit 범위를 자동 판별하는 GitHub Action
|
|
175
192
|
- GitHub Job Summary, workflow annotation, JSON·HTML artifact용 보고서 생성
|
|
176
193
|
|
|
177
|
-
아직 lockfile
|
|
194
|
+
아직 lockfile 전이 dependency의 부모 귀속 분석, JavaScript·메서드 구조 분석과 AI 리뷰
|
|
178
195
|
기능은 구현되지 않았습니다.
|
|
179
196
|
|
|
180
197
|
## 상세 사용법
|
|
@@ -219,6 +236,16 @@ HTML 파일에는 스타일과 dependency 영향 SVG 그래프가 모두 포함
|
|
|
219
236
|
IntentPatch를 실행한 현재 디렉터리를 기준으로 해석합니다. 기존 `--json`은
|
|
220
237
|
`--format json`의 단축 옵션입니다.
|
|
221
238
|
|
|
239
|
+
계약 파일 없이 원래 요청을 보고서에 담으려면 분석할 저장소 안에 텍스트·Markdown 파일을 저장하고 실행합니다.
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
intentpatch analyze --intent-file request.md --format html --output report.html
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
`--intent-file`은 계약의 `intent`만 덮어쓰며 기존 scope·테스트 정책은 유지합니다.
|
|
246
|
+
요청 파일은 저장소 안의 일반 파일이어야 하고 64 KiB 이하여야 합니다. 요청 문장만으로
|
|
247
|
+
예상 경로를 추측하거나 범위 검사를 활성화하지 않습니다.
|
|
248
|
+
|
|
222
249
|
### Change Contract로 요청 범위 검사
|
|
223
250
|
|
|
224
251
|
분석할 저장소의 `.intentpatch.json`에 이번 요청의 기대 범위를 선언할 수 있습니다.
|
|
@@ -412,15 +439,23 @@ npm provenance가 자동 생성됩니다. 아직 npm에 존재하지 않는 신
|
|
|
412
439
|
1. ✅ `package.json` 직접 dependency 변경 탐지와 규칙 엔진
|
|
413
440
|
2. ✅ TypeScript AST 기반 함수·클래스·인터페이스·타입 변경 분석
|
|
414
441
|
3. ✅ 상대 경로 정적 import graph 기반 변경 영향 범위 계산
|
|
442
|
+
- ✅ 가장 가까운 TypeScript 프로젝트 설정의 `paths`·`baseUrl` 별칭 해석
|
|
415
443
|
4. ✅ Change Contract 기반 예상 범위 이탈과 변경량 예산 탐지
|
|
416
444
|
5. ✅ Contract 기반 관련 테스트 변경 누락 탐지
|
|
417
445
|
6. lockfile과 workspace를 고려한 package manager adapter
|
|
446
|
+
- ✅ npm `package-lock.json` v2/v3의 설치 패키지 변경
|
|
447
|
+
- ✅ npm workspace manifest의 직접 dependency 변경
|
|
448
|
+
- ✅ pnpm `pnpm-lock.yaml` v9의 레지스트리 패키지 변경
|
|
449
|
+
- ✅ pnpm workspace manifest의 직접 dependency 변경
|
|
450
|
+
- Yarn adapter
|
|
418
451
|
7. ✅ 직접 export된 공개 심볼 삭제와 export 해제 탐지
|
|
419
452
|
8. ✅ 단일 HTML 대시보드와 SVG 기반 dependency 영향 그래프
|
|
420
453
|
9. ✅ re-export·함수/인터페이스 호환성과 기존 코드 중복 가능성 탐지
|
|
421
454
|
10. ✅ 구현체가 하나뿐인 신규 인터페이스 탐지
|
|
422
455
|
11. ✅ PR·push 비교, Job Summary와 artifact 출력을 제공하는 GitHub Action
|
|
423
|
-
12.
|
|
456
|
+
12. 요청 입력과 에이전트 adapter
|
|
457
|
+
- ✅ CLI 요청 문서와 선택적 GitHub PR 본문 입력
|
|
458
|
+
- Codex·Claude Code·Cursor 전용 adapter
|
|
424
459
|
13. 근거 기반 결과에 대한 선택적 LLM 설명
|
|
425
460
|
|
|
426
461
|
## 현재 제한사항
|
|
@@ -428,9 +463,24 @@ npm provenance가 자동 생성됩니다. 아직 npm에 존재하지 않는 신
|
|
|
428
463
|
- 분석 대상은 최소 한 번 이상 커밋된 Git 저장소여야 합니다.
|
|
429
464
|
- untracked symbolic link는 안전을 위해 내용을 읽지 않습니다.
|
|
430
465
|
- 10 MiB를 초과하는 untracked 파일은 라인 수를 측정하지 않습니다.
|
|
431
|
-
- dependency 분석은 저장소
|
|
432
|
-
`devDependencies`를 대상으로 합니다.
|
|
433
|
-
-
|
|
466
|
+
- 직접 dependency 선언 분석은 저장소 루트와 변경된 npm·pnpm workspace `package.json`의
|
|
467
|
+
`dependencies`와 `devDependencies`를 대상으로 합니다.
|
|
468
|
+
- 정적 참조 없음 finding은 미사용 확정이 아닌 검토 후보입니다. 유지보수 대상 JS/TS
|
|
469
|
+
소스의 명시적 import·re-export·문자열 `require()`·`import()`를 살펴봅니다. CLI나 설정
|
|
470
|
+
파일에서만 사용하는 경우는 놓칠 수 있습니다. 파일 읽기·파싱이 불완전하거나 계산된 module
|
|
471
|
+
load가 있거나, 스캔한 소스가 없거나, 소스 파일이 5,000개를 넘으면 후보를 보고하지 않습니다.
|
|
472
|
+
- npm `package-lock.json` v2/v3은 설치 경로와 버전을 비교합니다. 부모 dependency 귀속,
|
|
473
|
+
integrity hash나 취약점 정보까지 분석하지는 않습니다.
|
|
474
|
+
- pnpm `pnpm-lock.yaml` v9은 프로젝트 문서의 레지스트리 패키지 ID와 버전을 비교합니다.
|
|
475
|
+
integrity만 바뀐 경우, 로컬·Git 패키지, snapshot의 peer 변형, 부모 dependency 귀속은 분석하지 않습니다.
|
|
476
|
+
루트의 직접 dependency 여부는 루트 importer를 기준으로 표시합니다.
|
|
477
|
+
- workspace 판별은 루트의 npm `workspaces` 배열과 명시 경로, `*`·`**`·`?` 패턴을 지원합니다.
|
|
478
|
+
부정·중괄호·문자 클래스 패턴은 미지원 finding으로 보고합니다.
|
|
479
|
+
- pnpm workspace는 `pnpm-workspace.yaml`의 `packages`에 명시한 `*`·`**`·`?`와 선행 `!`
|
|
480
|
+
제외 패턴을 지원합니다. npm 설정이 함께 있으면 중복 보고를 막기 위해 pnpm 설정을
|
|
481
|
+
우선합니다. 그 외 glob 문법과 catalog는 해석하지 않습니다.
|
|
482
|
+
- Yarn lockfile과 런타임에서의 실제 dependency 사용 여부는 아직 분석하지 않습니다.
|
|
483
|
+
- working tree의 `package-lock.json`·`pnpm-lock.yaml`은 10 MiB, 그 외 텍스트 snapshot은 1 MiB로 제한합니다.
|
|
434
484
|
- 심볼 분석은 `.ts`와 `.tsx`의 이름이 있는 최상위 함수, 클래스, 인터페이스, 타입
|
|
435
485
|
별칭만 지원합니다.
|
|
436
486
|
- 공개 API 분석은 이름이 있는 최상위 함수·인터페이스, 로컬 `export { name }`, 외부
|
|
@@ -445,10 +495,12 @@ npm provenance가 자동 생성됩니다. 아직 npm에 존재하지 않는 신
|
|
|
445
495
|
보고합니다. TypeScript의 구조적 구현, factory 반환 타입과 런타임 등록은 계산하지 않습니다.
|
|
446
496
|
- 메서드, 변수 선언, enum, 중첩 선언, JavaScript 파일은 아직 심볼 분석 대상이 아닙니다.
|
|
447
497
|
- 선언 내부의 포맷이나 주석 변경도 심볼 수정으로 집계될 수 있습니다.
|
|
448
|
-
- 영향 분석은 `.ts`·`.tsx` 파일의
|
|
449
|
-
`
|
|
450
|
-
|
|
451
|
-
|
|
498
|
+
- 영향 분석은 `.ts`·`.tsx` 파일의 정적 `import`, side-effect import, `export ... from`,
|
|
499
|
+
`import = require()`를 대상으로 합니다. 로컬 별칭은 가장 가까운 `tsconfig.json` 또는
|
|
500
|
+
`jsconfig.json`과 상대 경로 `extends`를 해석합니다.
|
|
501
|
+
- 외부 패키지 설정을 참조하는 `extends`, project references, 임의 이름의 설정 파일,
|
|
502
|
+
package `imports`·`exports`, 외부 package import, dynamic `import()`, 일반 `require()`는
|
|
503
|
+
아직 그래프에 포함하지 않습니다.
|
|
452
504
|
- 영향 그래프는 비교 결과점(working tree 또는 head ref)의 파일을 기준으로 만듭니다. 따라서
|
|
453
505
|
삭제된 모듈을 가리키던 과거 import의 영향은 현재 단계에서 계산할 수 없습니다.
|
|
454
506
|
- 영향 분석용 소스 파일은 파일당 1 MiB로 제한하며, symbolic link는 읽지 않습니다.
|
package/README.md
CHANGED
|
@@ -18,7 +18,15 @@ IntentPatch combines **Git diff analysis, static analysis, and dependency analys
|
|
|
18
18
|
|
|
19
19
|
## Quick start
|
|
20
20
|
|
|
21
|
-
IntentPatch requires Node.js 20 or later and Git.
|
|
21
|
+
IntentPatch requires Node.js 20 or later and Git. Run the published v0.3.0 CLI without
|
|
22
|
+
installing it globally:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx intentpatch analyze --cwd /path/to/repository
|
|
26
|
+
npx intentpatch analyze --format html --output intentpatch-report.html
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
To run the current source version instead, build it from the repository:
|
|
22
30
|
|
|
23
31
|
```bash
|
|
24
32
|
git clone https://github.com/xx2xxjaeil/intent-patch.git
|
|
@@ -29,13 +37,6 @@ node dist/presentation/cli/main.js --version
|
|
|
29
37
|
node dist/presentation/cli/main.js analyze --cwd /path/to/repository
|
|
30
38
|
```
|
|
31
39
|
|
|
32
|
-
After the npm release becomes public, run the same CLI without installing it globally:
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
npx intentpatch analyze --cwd /path/to/repository
|
|
36
|
-
npx intentpatch analyze --format html --output intentpatch-report.html
|
|
37
|
-
```
|
|
38
|
-
|
|
39
40
|
The core analyzer needs no API key, paid AI model, server, or database. Repository files are processed locally, and no LLM is used in the default execution path.
|
|
40
41
|
|
|
41
42
|
## GitHub Action
|
|
@@ -61,7 +62,7 @@ jobs:
|
|
|
61
62
|
|
|
62
63
|
- name: Analyze pull request
|
|
63
64
|
id: intentpatch
|
|
64
|
-
uses: xx2xxjaeil/intent-patch@
|
|
65
|
+
uses: xx2xxjaeil/intent-patch@v0.3.0
|
|
65
66
|
with:
|
|
66
67
|
fail-on: high
|
|
67
68
|
|
|
@@ -73,7 +74,9 @@ jobs:
|
|
|
73
74
|
path: intentpatch-report
|
|
74
75
|
```
|
|
75
76
|
|
|
76
|
-
|
|
77
|
+
Pin the action to a released version or an immutable commit SHA. The v0.3.0 release adds pnpm
|
|
78
|
+
lockfile/workspace analysis, static dependency-use review, and explicit request input; `@main`
|
|
79
|
+
follows unreleased changes.
|
|
77
80
|
|
|
78
81
|
The action detects the comparison range for pull request and push events and produces:
|
|
79
82
|
|
|
@@ -119,9 +122,14 @@ LOW New abstraction has only one implementation
|
|
|
119
122
|
|
|
120
123
|
Every finding includes the relevant file, a stable rule ID, and evidence for the decision instead of only presenting an unexplained warning.
|
|
121
124
|
|
|
125
|
+
For a report generated from an actual IntentPatch commit, see the
|
|
126
|
+
[standalone HTML example](./docs/examples/intent-input-change.html) and the
|
|
127
|
+
[three-case evaluation with reproduction commands](./docs/real-world-evaluation.md). After cloning,
|
|
128
|
+
open the HTML file locally in a browser; GitHub may show its source rather than render it.
|
|
129
|
+
|
|
122
130
|
## Implemented capabilities
|
|
123
131
|
|
|
124
|
-
The current
|
|
132
|
+
The current source tree analyzes Git changes, direct dependencies in the root `package.json`, top-level TypeScript symbols and public API changes, possible duplicate implementations, single-implementation abstractions, import-graph impact, and related test changes.
|
|
125
133
|
|
|
126
134
|
### Git and reporting
|
|
127
135
|
|
|
@@ -142,7 +150,15 @@ The current version analyzes Git changes, direct dependencies in the root `packa
|
|
|
142
150
|
|
|
143
151
|
- Detect additions to production and development dependencies.
|
|
144
152
|
- Detect dependency removal, version changes, and section moves.
|
|
153
|
+
- Flag a newly added direct dependency with no static JS/TS import as a low-severity review candidate.
|
|
145
154
|
- Report malformed `package.json` files as evidence-backed findings instead of crashing.
|
|
155
|
+
- Compare resolved package additions, removals, and version changes in npm `package-lock.json` v2/v3.
|
|
156
|
+
- Keep scoped and nested installation paths distinct, and exclude local workspace links.
|
|
157
|
+
- Compare resolved registry package changes in pnpm `pnpm-lock.yaml` v9, including two-document lockfiles.
|
|
158
|
+
- Report malformed or unsupported lockfiles as findings rather than silently skipping them.
|
|
159
|
+
- Attribute direct dependency changes to changed npm workspace manifests selected by the root `workspaces` patterns.
|
|
160
|
+
- Analyze changed pnpm workspace manifests selected by `pnpm-workspace.yaml`, including exclusion patterns.
|
|
161
|
+
- Report changes to workspace patterns and manifest moves into or out of a configured workspace.
|
|
146
162
|
- Extract top-level named functions, classes, interfaces, and type aliases from `.ts` and `.tsx` files.
|
|
147
163
|
- Detect symbol additions, modifications, and removals with source locations.
|
|
148
164
|
- Preserve direct exports, local export lists, and external re-exports as public-symbol evidence.
|
|
@@ -157,11 +173,14 @@ The current version analyzes Git changes, direct dependencies in the root `packa
|
|
|
157
173
|
### Impact, scope, and tests
|
|
158
174
|
|
|
159
175
|
- Build relative static import and re-export relationships for `.ts` and `.tsx` files.
|
|
176
|
+
- Resolve local imports through the nearest `tsconfig.json` or `jsconfig.json` `paths` and
|
|
177
|
+
`baseUrl`, including relative `extends` files.
|
|
160
178
|
- Resolve `.js`, `.jsx`, `.mjs`, and `.cjs` import specifiers to matching TypeScript sources.
|
|
161
179
|
- Calculate direct importers and transitively impacted files for changed modules.
|
|
162
180
|
- Preserve unresolved relative imports and file read or parse failures as evidence.
|
|
163
181
|
- Build the graph at the same result point as the diff: the working tree or the selected head ref.
|
|
164
182
|
- Read intent, expected paths, allowed paths, and change budgets from `.intentpatch.json`.
|
|
183
|
+
- Accept a request text/Markdown file through the CLI, or opt in to using the PR body in the GitHub Action.
|
|
165
184
|
- Report each file outside expected and allowed patterns as a medium-severity finding.
|
|
166
185
|
- Report file-count and measurable-line budget overruns with numeric evidence.
|
|
167
186
|
- Classify source and test paths declared by the contract and connect related changes by basename.
|
|
@@ -169,7 +188,7 @@ The current version analyzes Git changes, direct dependencies in the root `packa
|
|
|
169
188
|
- Report source files without a related test change as medium-severity findings.
|
|
170
189
|
- Support repository-relative `*`, `**`, and `?` path patterns.
|
|
171
190
|
|
|
172
|
-
|
|
191
|
+
Transitive lockfile dependency provenance, JavaScript and method-level structure analysis, and optional AI review are not implemented yet.
|
|
173
192
|
|
|
174
193
|
## CLI usage
|
|
175
194
|
|
|
@@ -210,6 +229,14 @@ node dist/presentation/cli/main.js analyze \
|
|
|
210
229
|
|
|
211
230
|
The HTML file contains all styles and the dependency-impact SVG, so it opens directly without a server or API key. `--output` also works with text and JSON formats. Relative output paths are resolved from the directory where IntentPatch is executed. `--json` is an alias for `--format json`.
|
|
212
231
|
|
|
232
|
+
To include the original request without writing a contract, save it in the analyzed repository and run:
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
intentpatch analyze --intent-file request.md --format html --output report.html
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
`--intent-file` overrides only the contract's `intent`; existing scope and test policies remain intact. The file must be a regular file inside the analyzed repository and at most 64 KiB. Request text alone does not infer expected paths or activate scope checks.
|
|
239
|
+
|
|
213
240
|
### Check request scope with a Change Contract
|
|
214
241
|
|
|
215
242
|
Create `.intentpatch.json` in the repository being analyzed and declare the expected scope of the request:
|
|
@@ -396,15 +423,23 @@ No long-lived npm token is stored as a GitHub secret. Public packages published
|
|
|
396
423
|
1. ✅ Direct `package.json` dependency detection and rule engine
|
|
397
424
|
2. ✅ TypeScript AST analysis for functions, classes, interfaces, and types
|
|
398
425
|
3. ✅ Relative static import graph and change-impact calculation
|
|
426
|
+
- ✅ TypeScript `paths` and `baseUrl` aliases from the nearest project config
|
|
399
427
|
4. ✅ Change Contract scope and change-budget analysis
|
|
400
428
|
5. ✅ Contract-based detection of missing related test changes
|
|
401
429
|
6. Package-manager adapters for lockfiles and workspaces
|
|
430
|
+
- ✅ npm `package-lock.json` v2/v3 resolved package changes
|
|
431
|
+
- ✅ npm workspace manifest dependency changes
|
|
432
|
+
- ✅ pnpm `pnpm-lock.yaml` v9 resolved registry package changes
|
|
433
|
+
- ✅ pnpm workspace manifest dependency changes
|
|
434
|
+
- Yarn adapter
|
|
402
435
|
7. ✅ Detection of removed public exports
|
|
403
436
|
8. ✅ Standalone HTML dashboard and SVG dependency-impact graph
|
|
404
437
|
9. ✅ Re-export and function/interface compatibility checks plus possible code duplication
|
|
405
438
|
10. ✅ Detection of newly introduced single-implementation interfaces
|
|
406
439
|
11. ✅ GitHub Action with PR/push comparison, Job Summary, annotations, and artifacts
|
|
407
|
-
12.
|
|
440
|
+
12. Request capture and agent adapters
|
|
441
|
+
- ✅ CLI request file and opt-in GitHub PR body
|
|
442
|
+
- Codex, Claude Code, and Cursor-specific adapters
|
|
408
443
|
13. Optional LLM explanations grounded in deterministic evidence
|
|
409
444
|
|
|
410
445
|
## Current limitations
|
|
@@ -412,8 +447,14 @@ No long-lived npm token is stored as a GitHub secret. Public packages published
|
|
|
412
447
|
- The target must be a Git repository with at least one commit.
|
|
413
448
|
- Untracked symbolic links are not read for safety.
|
|
414
449
|
- Line counts are skipped for untracked files larger than 10 MiB.
|
|
415
|
-
-
|
|
416
|
-
-
|
|
450
|
+
- Direct dependency declarations are analyzed from `dependencies` and `devDependencies` in the root `package.json` and changed npm/pnpm workspace manifests.
|
|
451
|
+
- The no-static-reference finding is a review candidate, not proof that a package is unused. It checks explicit JS/TS imports, re-exports, literal `require()` and `import()` across maintained source files; CLI-only/configuration usage may not appear. It does not emit a candidate if source reads or parsing are incomplete, a computed module load exists, no source was scanned, or more than 5,000 source files are present.
|
|
452
|
+
- npm `package-lock.json` v2/v3 analysis compares installed package paths and versions, not dependency provenance, integrity hashes, or vulnerability data. It does not attribute transitive packages to their parents.
|
|
453
|
+
- pnpm `pnpm-lock.yaml` v9 analysis compares registry package IDs and versions in the project document. It ignores integrity-only edits, local/Git packages, snapshot peer variants, and dependency provenance. Root-direct evidence comes from the root importer only.
|
|
454
|
+
- Workspace detection supports the root npm `workspaces` array with explicit paths and `*`, `**`, and `?` globs. Negation, brace, and character-class patterns are reported as unsupported.
|
|
455
|
+
- pnpm workspace detection reads `pnpm-workspace.yaml` `packages` patterns with `*`, `**`, `?`, and leading `!` exclusions. When both npm and pnpm workspace settings exist, pnpm settings take precedence to avoid duplicate findings. Other glob features and pnpm catalogs are not interpreted.
|
|
456
|
+
- Yarn lockfiles and runtime dependency usage are not analyzed yet.
|
|
457
|
+
- Working-tree `package-lock.json` and `pnpm-lock.yaml` files are limited to 10 MiB; other text snapshots retain the 1 MiB limit.
|
|
417
458
|
- Symbol analysis supports named top-level functions, classes, interfaces, and type aliases in `.ts` and `.tsx` files.
|
|
418
459
|
- Public API analysis supports named top-level functions and interfaces, local `export { name }`, external `export { name } from`, and `export * from`. Package `exports`, anonymous default exports, and detailed class or type-alias contracts are not interpreted yet.
|
|
419
460
|
- Function compatibility compares explicitly written parameter and return-type text. It does not evaluate inferred return types or full TypeScript structural assignability.
|
|
@@ -421,8 +462,12 @@ No long-lived npm token is stored as a GitHub secret. Public packages published
|
|
|
421
462
|
- A single-implementation abstraction is reported only when exactly one named class explicitly uses `implements` for a new interface. Structural implementation, factory return types, and runtime registration are not calculated.
|
|
422
463
|
- Methods, variable declarations, enums, nested declarations, and JavaScript files are not included in symbol analysis.
|
|
423
464
|
- Formatting or comment changes inside a declaration can be counted as symbol modifications.
|
|
424
|
-
- Impact analysis covers
|
|
425
|
-
|
|
465
|
+
- Impact analysis covers static `import`, side-effect imports, `export ... from`, and
|
|
466
|
+
`import = require()` in `.ts` and `.tsx` files. Local aliases use the nearest `tsconfig.json` or
|
|
467
|
+
`jsconfig.json`, with relative `extends` support.
|
|
468
|
+
- Package-based config `extends`, project references, arbitrary config filenames, package
|
|
469
|
+
`imports`/`exports`, external package imports, dynamic `import()`, and ordinary `require()` are
|
|
470
|
+
not included in the graph.
|
|
426
471
|
- The graph is built from files at the comparison result point: the working tree or head ref. Impact from historical imports that referenced a deleted module cannot be calculated yet.
|
|
427
472
|
- Source files used for impact analysis are limited to 1 MiB per file, and symbolic links are not read.
|
|
428
473
|
- IntentPatch does not infer expected paths from natural-language intent. Scope decisions use the contract's explicit `include` and `allow` patterns.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ImpactAnalysisIssue } from "../../domain/impact.js";
|
|
2
|
+
import type { AnalysisTarget } from "../../domain/report.js";
|
|
3
|
+
/** 분석 결과점에서 해석 가능한 비상대 경로 import를 찾는 언어별 출력 포트다. */
|
|
4
|
+
export interface ModuleAliasResolver {
|
|
5
|
+
prepare(target: AnalysisTarget, repositoryPaths: readonly string[], sourcePaths: ReadonlySet<string>): Promise<PreparedModuleAliasResolver>;
|
|
6
|
+
}
|
|
7
|
+
export interface PreparedModuleAliasResolver {
|
|
8
|
+
readonly issues: readonly ImpactAnalysisIssue[];
|
|
9
|
+
resolve(importer: string, specifier: string): string | undefined;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=module-alias-resolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-alias-resolver.d.ts","sourceRoot":"","sources":["../../../src/application/ports/module-alias-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,oDAAoD;AACpD,MAAM,WAAW,mBAAmB;IAClC,OAAO,CACL,MAAM,EAAE,cAAc,EACtB,eAAe,EAAE,SAAS,MAAM,EAAE,EAClC,WAAW,EAAE,WAAW,CAAC,MAAM,CAAC,GAC/B,OAAO,CAAC,2BAA2B,CAAC,CAAC;CACzC;AAED,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,MAAM,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAChD,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CAClE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"module-alias-resolver.js","sourceRoot":"","sources":["../../../src/application/ports/module-alias-resolver.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-reference-extractor.d.ts","sourceRoot":"","sources":["../../../src/application/ports/module-reference-extractor.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,+BAA+B,GACvC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"module-reference-extractor.d.ts","sourceRoot":"","sources":["../../../src/application/ports/module-reference-extractor.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,+BAA+B,GACvC,QAAQ,CAAC;IACP,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC,GACF,QAAQ,CAAC;IAAE,IAAI,EAAE,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEtD,oDAAoD;AACpD,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,+BAA+B,CAAC;CACxE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** npm lockfile의 설치 위치를 기준으로 비교할 수 있는 패키지 정보다. */
|
|
2
|
+
export interface LockedPackage {
|
|
3
|
+
readonly path: string;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly version: string;
|
|
6
|
+
readonly rootDirect: boolean;
|
|
7
|
+
}
|
|
8
|
+
export type PackageLockParseResult = Readonly<{
|
|
9
|
+
ok: true;
|
|
10
|
+
packages: ReadonlyMap<string, LockedPackage>;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
ok: false;
|
|
13
|
+
kind: "invalid" | "unsupported";
|
|
14
|
+
reason: string;
|
|
15
|
+
}>;
|
|
16
|
+
/** 패키지 매니저의 파일 형식을 분석 규칙에서 분리하는 입력 포트다. */
|
|
17
|
+
export interface PackageLockParser {
|
|
18
|
+
parse(content: string): PackageLockParseResult;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=package-lock-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-lock-parser.d.ts","sourceRoot":"","sources":["../../../src/application/ports/package-lock-parser.ts"],"names":[],"mappings":"AAAA,kDAAkD;AAClD,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,MAAM,sBAAsB,GAC9B,QAAQ,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;CAAE,CAAC,GACpE,QAAQ,CAAC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,SAAS,GAAG,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7E,2CAA2C;AAC3C,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,sBAAsB,CAAC;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package-lock-parser.js","sourceRoot":"","sources":["../../../src/application/ports/package-lock-parser.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-failure.d.ts","sourceRoot":"","sources":["../../../src/application/ports/parse-failure.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,MAAM,GACb,QAAQ,CAAC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAE1D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parse-failure.js","sourceRoot":"","sources":["../../../src/application/ports/parse-failure.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,MAAM,UAAU,kBAAkB,CAChC,MAAc;IAEd,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** pnpm v9 lockfile의 프로젝트 패키지 목록에서 비교할 사실이다. */
|
|
2
|
+
export interface PnpmLockedPackage {
|
|
3
|
+
readonly id: string;
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly version: string;
|
|
6
|
+
readonly rootDirect: boolean;
|
|
7
|
+
}
|
|
8
|
+
export type PnpmLockParseResult = Readonly<{
|
|
9
|
+
ok: true;
|
|
10
|
+
packages: ReadonlyMap<string, PnpmLockedPackage>;
|
|
11
|
+
}> | Readonly<{
|
|
12
|
+
ok: false;
|
|
13
|
+
kind: "invalid" | "unsupported";
|
|
14
|
+
reason: string;
|
|
15
|
+
}>;
|
|
16
|
+
/** YAML 파일 형식 해석을 분석 규칙에서 분리하는 입력 포트다. */
|
|
17
|
+
export interface PnpmLockParser {
|
|
18
|
+
parse(content: string): PnpmLockParseResult;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=pnpm-lock-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pnpm-lock-parser.d.ts","sourceRoot":"","sources":["../../../src/application/ports/pnpm-lock-parser.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B;AAED,MAAM,MAAM,mBAAmB,GAC3B,QAAQ,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,WAAW,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;CAAE,CAAC,GACxE,QAAQ,CAAC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,SAAS,GAAG,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7E,0CAA0C;AAC1C,MAAM,WAAW,cAAc;IAC7B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,mBAAmB,CAAC;CAC7C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pnpm-lock-parser.js","sourceRoot":"","sources":["../../../src/application/ports/pnpm-lock-parser.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WorkspacePatterns } from "../services/workspace-manifest-analysis.js";
|
|
2
|
+
export type PnpmWorkspaceParseResult = Readonly<{
|
|
3
|
+
ok: true;
|
|
4
|
+
patterns: WorkspacePatterns;
|
|
5
|
+
}> | Readonly<{
|
|
6
|
+
ok: false;
|
|
7
|
+
kind: "invalid" | "unsupported";
|
|
8
|
+
reason: string;
|
|
9
|
+
}>;
|
|
10
|
+
/** pnpm 설정 파일을 workspace glob 사실로 바꾸는 출력 포트다. */
|
|
11
|
+
export interface PnpmWorkspaceParser {
|
|
12
|
+
parse(content: string | undefined): PnpmWorkspaceParseResult;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=pnpm-workspace-parser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pnpm-workspace-parser.d.ts","sourceRoot":"","sources":["../../../src/application/ports/pnpm-workspace-parser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAEpF,MAAM,MAAM,wBAAwB,GAChC,QAAQ,CAAC;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,iBAAiB,CAAA;CAAE,CAAC,GACnD,QAAQ,CAAC;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,SAAS,GAAG,aAAa,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAE7E,iDAAiD;AACjD,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,wBAAwB,CAAC;CAC9D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pnpm-workspace-parser.js","sourceRoot":"","sources":["../../../src/application/ports/pnpm-workspace-parser.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Finding } from "../../domain/finding.js";
|
|
2
|
+
import type { AnalysisContext, AnalysisRule } from "../ports/analysis-rule.js";
|
|
3
|
+
import type { FileSnapshotSource } from "../ports/file-snapshot-source.js";
|
|
4
|
+
import type { ModuleReferenceExtractor } from "../ports/module-reference-extractor.js";
|
|
5
|
+
import type { PnpmWorkspaceParser } from "../ports/pnpm-workspace-parser.js";
|
|
6
|
+
import type { ProjectFileSource } from "../ports/project-file-source.js";
|
|
7
|
+
/** 새 직접 dependency의 정적 소스 참조가 없을 때만 검토 후보를 제시한다. */
|
|
8
|
+
export declare class AddedDependencyUsageRule implements AnalysisRule {
|
|
9
|
+
private readonly snapshots;
|
|
10
|
+
private readonly files;
|
|
11
|
+
private readonly extractor;
|
|
12
|
+
private readonly pnpmWorkspaceParser;
|
|
13
|
+
constructor(snapshots: FileSnapshotSource, files: ProjectFileSource, extractor: ModuleReferenceExtractor, pnpmWorkspaceParser: PnpmWorkspaceParser);
|
|
14
|
+
analyze(context: AnalysisContext): Promise<readonly Finding[]>;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=added-dependency-usage-rule.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"added-dependency-usage-rule.d.ts","sourceRoot":"","sources":["../../../src/application/rules/added-dependency-usage-rule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAgBzE,oDAAoD;AACpD,qBAAa,wBAAyB,YAAW,YAAY;IAEzD,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,KAAK;IACtB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,mBAAmB;gBAHnB,SAAS,EAAE,kBAAkB,EAC7B,KAAK,EAAE,iBAAiB,EACxB,SAAS,EAAE,wBAAwB,EACnC,mBAAmB,EAAE,mBAAmB;IAG9C,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,SAAS,OAAO,EAAE,CAAC;CAoE5E"}
|