@fougere/cli 0.8.0-alpha.0 → 0.8.2-alpha.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.
|
@@ -6,7 +6,9 @@ import {
|
|
|
6
6
|
resolveEffectiveOperations,
|
|
7
7
|
type ScanDiagnostic,
|
|
8
8
|
} from '@fougere/core';
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
adaptersOf, crossFrondImports, handlerDeclarations, outsideConventions, resolveConventions,
|
|
11
|
+
} from '@fougere/core/node';
|
|
10
12
|
import ProjectScan from '../services/ProjectScan.js';
|
|
11
13
|
|
|
12
14
|
/** One thing that does not hold, in the terms of whoever has to fix it. */
|
|
@@ -159,6 +161,35 @@ export default class CheckHandler {
|
|
|
159
161
|
});
|
|
160
162
|
}
|
|
161
163
|
|
|
164
|
+
/**
|
|
165
|
+
* What no convention names. Reported before the declarations below, because a frond
|
|
166
|
+
* with nowhere to put a word is why the word ends up in a handler.
|
|
167
|
+
*/
|
|
168
|
+
for (const unplaced of await outsideConventions(fronds, resolveConventions(config.conventions))) {
|
|
169
|
+
findings.push({
|
|
170
|
+
severity: 'warning',
|
|
171
|
+
code: unplaced.rule,
|
|
172
|
+
filePath: unplaced.filePath,
|
|
173
|
+
subject: unplaced.frond,
|
|
174
|
+
message: unplaced.message,
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* The same shape of warning, one file lower: what the handler holds still runs, and
|
|
180
|
+
* what it costs is the next caller — a test, a second operation, another handler —
|
|
181
|
+
* that cannot reach it without moving it first.
|
|
182
|
+
*/
|
|
183
|
+
for (const held of await handlerDeclarations(fronds)) {
|
|
184
|
+
findings.push({
|
|
185
|
+
severity: 'warning',
|
|
186
|
+
code: held.rule,
|
|
187
|
+
filePath: held.filePath,
|
|
188
|
+
subject: `${held.handler}.${held.subject}`,
|
|
189
|
+
message: held.message,
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
|
|
162
193
|
return { fronds: fronds.length, handlers, findings };
|
|
163
194
|
}
|
|
164
195
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fougere/cli",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2-alpha.0",
|
|
4
4
|
"description": "The Fougere CLI — compose a workspace, serve a frond, call an operation.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fougere",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"jiti": "^2.4.2",
|
|
43
43
|
"picocolors": "^1.1.1",
|
|
44
44
|
"safe-regex": "^2.1.1",
|
|
45
|
-
"@fougere/container": "0.8.
|
|
46
|
-
"@fougere/
|
|
47
|
-
"@fougere/
|
|
48
|
-
"@fougere/schema": "0.8.
|
|
49
|
-
"@fougere/transport-http": "0.8.
|
|
50
|
-
"@fougere/defaults": "0.8.
|
|
45
|
+
"@fougere/container": "0.8.2-alpha.0",
|
|
46
|
+
"@fougere/adapter-sql": "0.8.2-alpha.0",
|
|
47
|
+
"@fougere/core": "0.8.2-alpha.0",
|
|
48
|
+
"@fougere/schema": "0.8.2-alpha.0",
|
|
49
|
+
"@fougere/transport-http": "0.8.2-alpha.0",
|
|
50
|
+
"@fougere/defaults": "0.8.2-alpha.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"vitest": "^4.1.0"
|