reviewflow 3.42.0 → 3.42.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/CHANGELOG.md +7 -0
- package/dist/dashboard/index.html +8 -0
- package/dist/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.d.ts +1 -1
- package/dist/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.d.ts.map +1 -1
- package/dist/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.js +10 -5
- package/dist/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.js.map +1 -1
- package/dist/tests/units/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.test.js +23 -14
- package/dist/tests/units/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.test.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.42.1](https://github.com/DGouron/review-flow/compare/reviewflow-v3.42.0...reviewflow-v3.42.1) (2026-07-13)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
* **setup:** validate global CLI config in final setup step, not per-project reviews config ([#331](https://github.com/DGouron/review-flow/issues/331)) ([613e719](https://github.com/DGouron/review-flow/commit/613e7192d32d18929404025bf6f28b87f2064c2a))
|
|
14
|
+
|
|
8
15
|
## [3.42.0](https://github.com/DGouron/review-flow/compare/reviewflow-v3.41.0...reviewflow-v3.42.0) (2026-07-01)
|
|
9
16
|
|
|
10
17
|
|
|
@@ -2461,6 +2461,13 @@
|
|
|
2461
2461
|
|
|
2462
2462
|
function syncAvailableRepositoriesFromResponse(payload) {
|
|
2463
2463
|
availableRepositories = Array.isArray(payload?.repositories) ? payload.repositories : [];
|
|
2464
|
+
updateSetupCtaVisibility();
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
function updateSetupCtaVisibility() {
|
|
2468
|
+
const cta = document.getElementById('setup-cta');
|
|
2469
|
+
if (!cta) return;
|
|
2470
|
+
cta.classList.toggle('hidden', availableRepositories.length > 0);
|
|
2464
2471
|
}
|
|
2465
2472
|
|
|
2466
2473
|
function renderCardCounters() {
|
|
@@ -2734,6 +2741,7 @@
|
|
|
2734
2741
|
|
|
2735
2742
|
async function initOverviewAndTabs() {
|
|
2736
2743
|
await fetchAvailableRepositories();
|
|
2744
|
+
updateSetupCtaVisibility();
|
|
2737
2745
|
renderManagePanel();
|
|
2738
2746
|
bindManagePanelToggle();
|
|
2739
2747
|
bindSettingsModalTrigger();
|
package/dist/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ interface ValidationAdapterGatewayDependencies {
|
|
|
6
6
|
export declare class ValidationAdapterGateway implements ValidationGateway {
|
|
7
7
|
private readonly deps;
|
|
8
8
|
constructor(deps: ValidationAdapterGatewayDependencies);
|
|
9
|
-
validate(
|
|
9
|
+
validate(_projectPath: string): ValidationReport;
|
|
10
10
|
}
|
|
11
11
|
export {};
|
|
12
12
|
//# sourceMappingURL=validation.adapter.gateway.d.ts.map
|
package/dist/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.adapter.gateway.d.ts","sourceRoot":"","sources":["../../../../../src/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"validation.adapter.gateway.d.ts","sourceRoot":"","sources":["../../../../../src/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,iBAAiB,EACjB,gBAAgB,EACjB,MAAM,kEAAkE,CAAC;AAE1E,UAAU,oCAAoC;IAC5C,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,qBAAa,wBAAyB,YAAW,iBAAiB;IACpD,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,oCAAoC;IAOvE,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,gBAAgB;CAejD"}
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
2
|
import { ValidateConfigUseCase } from '../../../../modules/cli-configuration/usecases/cli/validateConfig.usecase.js';
|
|
4
3
|
export class ValidationAdapterGateway {
|
|
5
4
|
deps;
|
|
6
5
|
constructor(deps) {
|
|
7
6
|
this.deps = deps;
|
|
8
7
|
}
|
|
9
|
-
|
|
8
|
+
// `projectPath` is part of the ValidationGateway contract but unused here: this
|
|
9
|
+
// gateway validates the global CLI config (server/user/queue), never the
|
|
10
|
+
// per-project `.claude/reviews/config.json` (github/gitlab/reviewSkill schema).
|
|
11
|
+
// Swapping in the project file used to make this check fail for every
|
|
12
|
+
// already-configured project, since that file never has a server/user/queue section.
|
|
13
|
+
validate(_projectPath) {
|
|
10
14
|
const useCase = new ValidateConfigUseCase({ existsSync, readFileSync });
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
const result = useCase.execute({
|
|
16
|
+
configPath: this.deps.configPath,
|
|
17
|
+
envPath: this.deps.envPath,
|
|
18
|
+
});
|
|
14
19
|
return {
|
|
15
20
|
status: result.status,
|
|
16
21
|
issues: result.issues.map((issue) => ({
|
package/dist/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.adapter.gateway.js","sourceRoot":"","sources":["../../../../../src/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"validation.adapter.gateway.js","sourceRoot":"","sources":["../../../../../src/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oEAAoE,CAAC;AAW3G,MAAM,OAAO,wBAAwB;IACN;IAA7B,YAA6B,IAA0C;QAA1C,SAAI,GAAJ,IAAI,CAAsC;IAAG,CAAC;IAE3E,gFAAgF;IAChF,yEAAyE;IACzE,gFAAgF;IAChF,sEAAsE;IACtE,qFAAqF;IACrF,QAAQ,CAAC,YAAoB;QAC3B,MAAM,OAAO,GAAG,IAAI,qBAAqB,CAAC,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,CAAC;QACxE,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;YAC7B,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU;YAChC,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO;SAC3B,CAAC,CAAC;QACH,OAAO;YACL,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBACpC,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,OAAO,EAAE,KAAK,CAAC,OAAO;gBACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;aACzB,CAAC,CAAC;SACJ,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -8,51 +8,60 @@ const VALID_CONFIG = {
|
|
|
8
8
|
user: { name: 'reviewer' },
|
|
9
9
|
queue: { concurrency: 1 },
|
|
10
10
|
};
|
|
11
|
+
// Shape written by GenerateFilesStep into every configured project's
|
|
12
|
+
// .claude/reviews/config.json — deliberately has no server/user/queue section.
|
|
13
|
+
const REAL_PROJECT_REVIEW_CONFIG = {
|
|
14
|
+
github: true,
|
|
15
|
+
gitlab: false,
|
|
16
|
+
defaultModel: 'sonnet',
|
|
17
|
+
reviewSkill: 'review-code',
|
|
18
|
+
reviewFollowupSkill: 'review-followup',
|
|
19
|
+
};
|
|
11
20
|
function writeJson(path, value) {
|
|
12
21
|
writeFileSync(path, JSON.stringify(value));
|
|
13
22
|
}
|
|
14
23
|
describe('ValidationAdapterGateway (integration with real filesystem)', () => {
|
|
15
24
|
let rootDir;
|
|
16
25
|
let projectPath;
|
|
17
|
-
let
|
|
26
|
+
let configPath;
|
|
18
27
|
let envPath;
|
|
19
28
|
beforeEach(() => {
|
|
20
29
|
rootDir = mkdtempSync(join(tmpdir(), 'reviewflow-validation-adapter-'));
|
|
21
30
|
projectPath = join(rootDir, 'project');
|
|
22
31
|
mkdirSync(projectPath, { recursive: true });
|
|
23
|
-
|
|
32
|
+
configPath = join(rootDir, 'config.json');
|
|
24
33
|
envPath = join(rootDir, '.env');
|
|
25
34
|
});
|
|
26
35
|
afterEach(() => {
|
|
27
36
|
rmSync(rootDir, { recursive: true, force: true });
|
|
28
37
|
});
|
|
29
|
-
it('
|
|
30
|
-
|
|
31
|
-
mkdirSync(join(projectPath, '.claude', 'reviews'), { recursive: true });
|
|
32
|
-
writeJson(projectConfigPath, VALID_CONFIG);
|
|
38
|
+
it('validates the global CLI config regardless of the project path', () => {
|
|
39
|
+
writeJson(configPath, VALID_CONFIG);
|
|
33
40
|
writeFileSync(envPath, 'TOKEN=value\n');
|
|
34
|
-
const gateway = new ValidationAdapterGateway({ configPath
|
|
41
|
+
const gateway = new ValidationAdapterGateway({ configPath, envPath });
|
|
35
42
|
const report = gateway.validate(projectPath);
|
|
36
43
|
expect(report.status).toBe('valid');
|
|
37
44
|
expect(report.issues).toEqual([]);
|
|
38
45
|
});
|
|
39
|
-
it('
|
|
40
|
-
|
|
46
|
+
it('does not mistake a per-project .claude/reviews/config.json for the global config', () => {
|
|
47
|
+
mkdirSync(join(projectPath, '.claude', 'reviews'), { recursive: true });
|
|
48
|
+
writeJson(join(projectPath, '.claude', 'reviews', 'config.json'), REAL_PROJECT_REVIEW_CONFIG);
|
|
49
|
+
writeJson(configPath, VALID_CONFIG);
|
|
41
50
|
writeFileSync(envPath, 'TOKEN=value\n');
|
|
42
|
-
const gateway = new ValidationAdapterGateway({ configPath
|
|
51
|
+
const gateway = new ValidationAdapterGateway({ configPath, envPath });
|
|
43
52
|
const report = gateway.validate(projectPath);
|
|
44
53
|
expect(report.status).toBe('valid');
|
|
45
54
|
expect(report.issues).toEqual([]);
|
|
46
55
|
});
|
|
47
|
-
it('reports not-found when
|
|
48
|
-
const gateway = new ValidationAdapterGateway({ configPath
|
|
56
|
+
it('reports not-found when the global config does not exist', () => {
|
|
57
|
+
const gateway = new ValidationAdapterGateway({ configPath, envPath });
|
|
49
58
|
const report = gateway.validate(projectPath);
|
|
50
59
|
expect(report.status).toBe('not-found');
|
|
51
60
|
expect(report.issues).toEqual([]);
|
|
52
61
|
});
|
|
53
62
|
it('maps each validation issue field, message and severity', () => {
|
|
54
|
-
writeJson(
|
|
55
|
-
const gateway = new ValidationAdapterGateway({ configPath
|
|
63
|
+
writeJson(configPath, { server: { port: 70000 } });
|
|
64
|
+
const gateway = new ValidationAdapterGateway({ configPath, envPath });
|
|
56
65
|
const report = gateway.validate(projectPath);
|
|
57
66
|
expect(report.status).toBe('invalid');
|
|
58
67
|
expect(report.issues).toContainEqual({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.adapter.gateway.test.js","sourceRoot":"","sources":["../../../../../../../src/tests/units/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAErE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kFAAkF,CAAC;AAE5H,MAAM,YAAY,GAAG;IACnB,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;IACtB,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;IAC1B,KAAK,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE;CAC1B,CAAC;AAEF,SAAS,SAAS,CAAC,IAAY,EAAE,KAAc;IAC7C,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,QAAQ,CAAC,6DAA6D,EAAE,GAAG,EAAE;IAC3E,IAAI,OAAe,CAAC;IACpB,IAAI,WAAmB,CAAC;IACxB,IAAI,
|
|
1
|
+
{"version":3,"file":"validation.adapter.gateway.test.js","sourceRoot":"","sources":["../../../../../../../src/tests/units/modules/setup-wizard/interface-adapters/gateways/validation.adapter.gateway.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAErE,OAAO,EAAE,wBAAwB,EAAE,MAAM,kFAAkF,CAAC;AAE5H,MAAM,YAAY,GAAG;IACnB,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;IACtB,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;IAC1B,K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