dsh-ci-diet 0.2.0 → 0.3.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/README.ko.md +39 -10
- package/README.md +50 -14
- package/client/index.d.ts +3 -0
- package/client/index.js +1035 -0
- package/dist/adapters/github/budget.d.ts +1 -1
- package/dist/adapters/github/budget.js +4 -2
- package/dist/adapters/github/budget.js.map +1 -1
- package/dist/adapters/github/client.d.ts +2 -0
- package/dist/adapters/github/client.js.map +1 -1
- package/dist/adapters/github/errors.d.ts +1 -1
- package/dist/adapters/github/errors.js +5 -3
- package/dist/adapters/github/errors.js.map +1 -1
- package/dist/adapters/github/transport.d.ts +10 -3
- package/dist/adapters/github/transport.js +115 -21
- package/dist/adapters/github/transport.js.map +1 -1
- package/dist/cli/index.d.ts +25 -0
- package/dist/cli/index.js +334 -233
- package/dist/cli/index.js.map +1 -1
- package/dist/core/analysis/coverage.js +2 -2
- package/dist/core/analysis/coverage.js.map +1 -1
- package/dist/core/config/load.d.ts +13 -0
- package/dist/core/config/load.js +71 -0
- package/dist/core/config/load.js.map +1 -0
- package/dist/core/config/plugin-settings.d.ts +37 -0
- package/dist/core/config/plugin-settings.js +75 -0
- package/dist/core/config/plugin-settings.js.map +1 -0
- package/dist/core/history/sync.d.ts +8 -3
- package/dist/core/history/sync.js +163 -45
- package/dist/core/history/sync.js.map +1 -1
- package/dist/core/patch/apply.d.ts +28 -7
- package/dist/core/patch/apply.js +341 -284
- package/dist/core/patch/apply.js.map +1 -1
- package/dist/core/patch/approval.d.ts +5 -0
- package/dist/core/patch/approval.js +26 -1
- package/dist/core/patch/approval.js.map +1 -1
- package/dist/core/patch/attestation.js +7 -3
- package/dist/core/patch/attestation.js.map +1 -1
- package/dist/core/patch/dependencies.d.ts +1 -0
- package/dist/core/patch/dependencies.js +176 -132
- package/dist/core/patch/dependencies.js.map +1 -1
- package/dist/core/patch/diff.d.ts +11 -0
- package/dist/core/patch/diff.js +76 -0
- package/dist/core/patch/diff.js.map +1 -0
- package/dist/core/patch/edits.d.ts +1 -1
- package/dist/core/patch/edits.js +7 -4
- package/dist/core/patch/edits.js.map +1 -1
- package/dist/core/patch/eligibility.d.ts +3 -2
- package/dist/core/patch/eligibility.js +22 -19
- package/dist/core/patch/eligibility.js.map +1 -1
- package/dist/core/patch/locks.d.ts +50 -0
- package/dist/core/patch/locks.js +196 -0
- package/dist/core/patch/locks.js.map +1 -0
- package/dist/core/patch/plan.d.ts +1 -2
- package/dist/core/patch/plan.js +2 -2
- package/dist/core/patch/plan.js.map +1 -1
- package/dist/core/patch/request-plan.d.ts +51 -0
- package/dist/core/patch/request-plan.js +122 -0
- package/dist/core/patch/request-plan.js.map +1 -0
- package/dist/core/patch/store.d.ts +123 -5
- package/dist/core/patch/store.js +722 -80
- package/dist/core/patch/store.js.map +1 -1
- package/dist/core/patch/verify.d.ts +4 -3
- package/dist/core/patch/verify.js +6 -4
- package/dist/core/patch/verify.js.map +1 -1
- package/dist/core/policy/constants.d.ts +34 -0
- package/dist/core/policy/constants.js +35 -0
- package/dist/core/policy/constants.js.map +1 -0
- package/dist/core/rules/cd001.js +107 -42
- package/dist/core/rules/cd001.js.map +1 -1
- package/dist/core/rules/cd003.js +42 -14
- package/dist/core/rules/cd003.js.map +1 -1
- package/dist/core/rules/cd005.d.ts +0 -5
- package/dist/core/rules/cd005.js +156 -68
- package/dist/core/rules/cd005.js.map +1 -1
- package/dist/core/rules/cd008.d.ts +1 -2
- package/dist/core/rules/cd008.js +2 -2
- package/dist/core/rules/cd008.js.map +1 -1
- package/dist/core/savings/report-metrics.js +5 -1
- package/dist/core/savings/report-metrics.js.map +1 -1
- package/dist/core/scan/binding.d.ts +34 -2
- package/dist/core/scan/binding.js +58 -17
- package/dist/core/scan/binding.js.map +1 -1
- package/dist/core/scan/discover.d.ts +2 -0
- package/dist/core/scan/discover.js +7 -6
- package/dist/core/scan/discover.js.map +1 -1
- package/dist/core/scan/scan.d.ts +4 -0
- package/dist/core/scan/scan.js +8 -2
- package/dist/core/scan/scan.js.map +1 -1
- package/dist/core/support/clock.d.ts +34 -0
- package/dist/core/support/clock.js +34 -0
- package/dist/core/support/clock.js.map +1 -0
- package/dist/core/support/concurrency.d.ts +11 -0
- package/dist/core/support/concurrency.js +47 -0
- package/dist/core/support/concurrency.js.map +1 -0
- package/dist/core/support/deadline.d.ts +17 -0
- package/dist/core/support/deadline.js +45 -0
- package/dist/core/support/deadline.js.map +1 -0
- package/dist/core/support/filesystem.d.ts +19 -0
- package/dist/core/support/filesystem.js +8 -0
- package/dist/core/support/filesystem.js.map +1 -0
- package/dist/core/version.d.ts +1 -1
- package/dist/core/version.js +1 -1
- package/dist/core/workflow/jobkey.js +89 -35
- package/dist/core/workflow/jobkey.js.map +1 -1
- package/dist/core/workflow/matrix.d.ts +4 -2
- package/dist/core/workflow/matrix.js +90 -25
- package/dist/core/workflow/matrix.js.map +1 -1
- package/dist/core/workflow/parse.js +14 -11
- package/dist/core/workflow/parse.js.map +1 -1
- package/dist/dsh/host/plugin.d.ts +122 -5
- package/dist/dsh/host/plugin.js +199 -138
- package/dist/dsh/host/plugin.js.map +1 -1
- package/dist/shared/i18n/en.d.ts +14 -3
- package/dist/shared/i18n/en.js +14 -3
- package/dist/shared/i18n/en.js.map +1 -1
- package/dist/shared/i18n/es.js +14 -3
- package/dist/shared/i18n/es.js.map +1 -1
- package/dist/shared/i18n/fr.js +14 -3
- package/dist/shared/i18n/fr.js.map +1 -1
- package/dist/shared/i18n/hi.js +14 -3
- package/dist/shared/i18n/hi.js.map +1 -1
- package/dist/shared/i18n/ko.js +14 -3
- package/dist/shared/i18n/ko.js.map +1 -1
- package/dist/shared/i18n/zh-Hans.js +14 -3
- package/dist/shared/i18n/zh-Hans.js.map +1 -1
- package/package.json +15 -3
package/README.ko.md
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
낭비된 GitHub Actions 러너 시간을 찾고, 작고 검토 가능한 패치를 제안합니다.
|
|
4
4
|
|
|
5
|
-
상태: **알파,
|
|
5
|
+
상태: **알파, `dsh-ci-diet@0.3.1` npm 게시됨**. 계약, 명세, 분석 엔진,
|
|
6
6
|
패치 엔진, CLI, DSH 플러그인 도구, 자체 완결형 HTML 보고서는 구현과 테스트를
|
|
7
|
-
마쳤습니다. DSH Web
|
|
7
|
+
마쳤습니다. DSH Web 클라이언트는 설정 화면을 제공하고, 보고서·적용 화면은 아직
|
|
8
|
+
남아 있습니다.
|
|
8
9
|
|
|
9
10
|
## 하는 일
|
|
10
11
|
|
|
@@ -58,15 +59,43 @@ CI Diet는 두 가지를 읽고 비교합니다.
|
|
|
58
59
|
|
|
59
60
|
## 설치
|
|
60
61
|
|
|
62
|
+
CLI는 Node `^22.19.0 || >=24.0.0`이 필요합니다. DSH 플러그인은 DSH
|
|
63
|
+
`>=0.2.1-rc.2 <0.3.0-0` 또는 `>=0.2.2-rc.1 <0.3.0-0`이 필요합니다. `0.3.1`
|
|
64
|
+
릴리스는 DSH `0.2.1-rc.2`에서 검증했으며 DSH `0.3.0`은 아직 지원하지 않습니다.
|
|
65
|
+
|
|
66
|
+
CLI 설치:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
npm install --global dsh-ci-diet@0.3.1
|
|
70
|
+
ci-diet --version
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
전역 설치를 원하지 않으면 `npx dsh-ci-diet@0.3.1`으로 같은 CLI를 실행할 수
|
|
74
|
+
있습니다.
|
|
75
|
+
|
|
76
|
+
DSH 플러그인 설치:
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
dsh plugin --profile web add dsh-ci-diet@0.3.1
|
|
80
|
+
dsh --profile web
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
플러그인은 기본으로 꺼진 로더 항목 하나와 **설정 → CI Diet** 페이지를 추가합니다.
|
|
84
|
+
이 페이지에서 분석 규칙, 이력 상한, 저장 공간 한도, 비용 추정, 네트워크 접근,
|
|
85
|
+
상태 디렉터리를 모두 바꿀 수 있습니다. 값은 `ci-diet --config`와 같은 계약 검증과
|
|
86
|
+
기본값을 쓰며, 재시작 없이 다음 도구 호출부터 적용되고 CLI의 설정 파일은 건드리지
|
|
87
|
+
않습니다. 적용 도구가 아직 없어 `localApplyEnabled`는 노출하지 않습니다.
|
|
88
|
+
|
|
89
|
+
기존 설치 업데이트:
|
|
90
|
+
|
|
61
91
|
```
|
|
62
|
-
npm install --global dsh-ci-diet
|
|
63
|
-
dsh plugin --profile web add dsh-ci-diet
|
|
92
|
+
npm install --global dsh-ci-diet@latest
|
|
93
|
+
dsh plugin --profile web add dsh-ci-diet@latest
|
|
64
94
|
```
|
|
65
95
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
릴리스 태그는 GitHub에, 같은 버전은 npm `0.2.0`에 있습니다.
|
|
96
|
+
플러그인을 업데이트한 뒤 DSH를 재시작합니다. `dsh plugin --profile web list`로
|
|
97
|
+
설치된 플러그인 버전을, `ci-diet --version`(또는
|
|
98
|
+
`npx dsh-ci-diet@latest --version`)으로 CLI 버전을 확인할 수 있습니다.
|
|
70
99
|
|
|
71
100
|
## 실행
|
|
72
101
|
|
|
@@ -114,8 +143,8 @@ lockfile 변경을 따라가지 못하는 리터럴 캐시 키가 대상입니
|
|
|
114
143
|
`.github/workflows/publish.yml`이 실행됩니다.
|
|
115
144
|
|
|
116
145
|
```
|
|
117
|
-
git tag v0.
|
|
118
|
-
git push origin v0.
|
|
146
|
+
git tag v0.3.1
|
|
147
|
+
git push origin v0.3.1
|
|
119
148
|
```
|
|
120
149
|
|
|
121
150
|
워크플로는 태그와 `package.json` 버전을 대조하고(`node
|
package/README.md
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Find wasted GitHub Actions runner time and propose small, reviewable patches.
|
|
4
4
|
|
|
5
|
-
Status: **alpha
|
|
5
|
+
Status: **alpha**, `dsh-ci-diet@0.3.1` is released on npm. The contracts,
|
|
6
6
|
specification, analysis engine, patch engine, CLI, DSH plugin tools, and a
|
|
7
|
-
self-contained HTML report are implemented and tested. The DSH Web client
|
|
8
|
-
screens are still open.
|
|
7
|
+
self-contained HTML report are implemented and tested. The DSH Web client has a
|
|
8
|
+
Settings screen; the report and apply screens are still open.
|
|
9
9
|
|
|
10
10
|
## What it does
|
|
11
11
|
|
|
@@ -60,15 +60,43 @@ is not shipped.
|
|
|
60
60
|
|
|
61
61
|
## Install
|
|
62
62
|
|
|
63
|
+
The CLI needs Node `^22.19.0 || >=24.0.0`. The DSH plugin needs DSH
|
|
64
|
+
`>=0.2.1-rc.2 <0.3.0-0` or `>=0.2.2-rc.1 <0.3.0-0`. Release `0.3.1` was tested
|
|
65
|
+
against DSH `0.2.1-rc.2`; DSH `0.3.0` is not supported yet.
|
|
66
|
+
|
|
67
|
+
Install the CLI:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
npm install --global dsh-ci-diet@0.3.1
|
|
71
|
+
ci-diet --version
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
If you do not want a global install, `npx dsh-ci-diet@0.3.1` runs the same CLI.
|
|
75
|
+
|
|
76
|
+
Install the DSH plugin into a profile:
|
|
77
|
+
|
|
63
78
|
```
|
|
64
|
-
|
|
65
|
-
dsh
|
|
79
|
+
dsh plugin --profile web add dsh-ci-diet@0.3.1
|
|
80
|
+
dsh --profile web
|
|
66
81
|
```
|
|
67
82
|
|
|
68
|
-
The plugin adds one disabled loader entry
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
83
|
+
The plugin adds one disabled loader entry and a **Settings → CI Diet** page.
|
|
84
|
+
The page edits every engine setting used by the DSH tools: analysis rules, history
|
|
85
|
+
caps, storage limits, the cost estimate, network access, and the state directory.
|
|
86
|
+
Values use the same contract validation and defaults as `ci-diet --config`, apply
|
|
87
|
+
to the next tool call without a restart, and never rewrite the CLI's own config.
|
|
88
|
+
`localApplyEnabled` is not exposed because there is no apply tool yet.
|
|
89
|
+
|
|
90
|
+
Update an existing install:
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
npm install --global dsh-ci-diet@latest
|
|
94
|
+
dsh plugin --profile web add dsh-ci-diet@latest
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Restart DSH after updating the plugin. `dsh plugin --profile web list` shows the
|
|
98
|
+
installed plugin version, and `ci-diet --version` (or
|
|
99
|
+
`npx dsh-ci-diet@latest --version`) shows the CLI version.
|
|
72
100
|
|
|
73
101
|
## Run it
|
|
74
102
|
|
|
@@ -85,13 +113,21 @@ ci-diet revert --change <changeId> # restores the backed-up bytes
|
|
|
85
113
|
`plan` refuses to write when the finding is not patch-eligible, when coverage
|
|
86
114
|
does not allow a write, or when the policy snapshot a rule depends on is stale.
|
|
87
115
|
CD005 needs `--job` and `--minutes`; CD008 needs `--job` and `--step`, plus
|
|
88
|
-
`--claims artifact-purpose:temporary,consumer-min-days:7`.
|
|
89
|
-
|
|
116
|
+
`--claims artifact-purpose:temporary,consumer-min-days:7`. The command prints the
|
|
117
|
+
proposed lines as a diff, and `ci-diet plans --plan <planId>` shows a saved plan
|
|
118
|
+
again. Nothing is committed, pushed, or applied without the explicit `approve`
|
|
119
|
+
step.
|
|
120
|
+
|
|
121
|
+
`--config <file>` merges a partial JSON configuration over the built-in defaults
|
|
122
|
+
for any command, so a repository can lower the workflow size limit or the
|
|
123
|
+
storage quota without code changes. The merged document is validated against
|
|
124
|
+
the frozen contract before the command runs; an unreadable or invalid file
|
|
125
|
+
exits `2`. Relative paths resolve against the effective `--cwd`.
|
|
90
126
|
|
|
91
127
|
## Read a report
|
|
92
128
|
|
|
93
129
|
```
|
|
94
|
-
ci-diet report # text summary
|
|
130
|
+
ci-diet report # text summary for this repository
|
|
95
131
|
ci-diet report --format html --out report.html
|
|
96
132
|
ci-diet diagnose # explain job-name attribution and collection coverage
|
|
97
133
|
ci-diet prune # drop expired reports, plans, and cache entries
|
|
@@ -117,8 +153,8 @@ Pushing a tag that matches the version in `package.json` triggers
|
|
|
117
153
|
`.github/workflows/publish.yml`:
|
|
118
154
|
|
|
119
155
|
```
|
|
120
|
-
git tag v0.
|
|
121
|
-
git push origin v0.
|
|
156
|
+
git tag v0.3.1
|
|
157
|
+
git push origin v0.3.1
|
|
122
158
|
```
|
|
123
159
|
|
|
124
160
|
The workflow compares the tag with `package.json` (`node
|