@fabrika/check 0.7.0 → 0.8.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/package.json +6 -6
- package/src/rules/structure.ts +3 -2
- package/src/scaffold.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabrika/check",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@babel/parser": "8.0.7",
|
|
49
|
-
"@fabrika/app": "0.
|
|
50
|
-
"@fabrika/auth-core": "0.
|
|
51
|
-
"@fabrika/db": "0.
|
|
52
|
-
"@fabrika/operations-contract": "0.
|
|
53
|
-
"@fabrika/platform-node": "0.
|
|
49
|
+
"@fabrika/app": "0.8.0",
|
|
50
|
+
"@fabrika/auth-core": "0.8.0",
|
|
51
|
+
"@fabrika/db": "0.8.0",
|
|
52
|
+
"@fabrika/operations-contract": "0.8.0",
|
|
53
|
+
"@fabrika/platform-node": "0.8.0",
|
|
54
54
|
"zod": "^3.25.76"
|
|
55
55
|
}
|
|
56
56
|
}
|
package/src/rules/structure.ts
CHANGED
|
@@ -130,17 +130,18 @@ const isDataPackage = (specifier: string): boolean => specifier === '@fabrika/db
|
|
|
130
130
|
/** The framework modules logic and queries may import; the rest of `@fabrika/*` is the framework's own composition. */
|
|
131
131
|
const LAYER_PACKAGES: ReadonlySet<string> = new Set(['@fabrika/app', '@fabrika/db'])
|
|
132
132
|
|
|
133
|
-
/** The framework modules an SPA loads: the typed client, its React hooks
|
|
133
|
+
/** The framework modules an SPA loads: the typed client, its React hooks, the component kit and its challenge widget. */
|
|
134
134
|
const SPA_PACKAGES: ReadonlySet<string> = new Set([
|
|
135
135
|
'@fabrika/app/client',
|
|
136
136
|
'@fabrika/app/react',
|
|
137
137
|
'@fabrika/ui',
|
|
138
|
+
'@fabrika/ui/challenge',
|
|
138
139
|
'@fabrika/ui/styles.css',
|
|
139
140
|
'@fabrika/ui/theme.css',
|
|
140
141
|
])
|
|
141
142
|
|
|
142
143
|
const SPA_ALLOWED =
|
|
143
|
-
'@fabrika/app/client, @fabrika/app/react, @fabrika/ui, fabrika.contract.ts, src/schemas.ts, modules under src/shared/ and modules under web/; a type-only import of anything else'
|
|
144
|
+
'@fabrika/app/client, @fabrika/app/react, @fabrika/ui, @fabrika/ui/challenge, fabrika.contract.ts, src/schemas.ts, modules under src/shared/ and modules under web/; a type-only import of anything else'
|
|
144
145
|
|
|
145
146
|
const isSchemaModule = (path: string): boolean => path === SCHEMAS_FILE || path.startsWith(SCHEMAS_DIR)
|
|
146
147
|
|
package/src/scaffold.ts
CHANGED
|
@@ -433,7 +433,8 @@ const capabilityCases = (row: EndpointRow, fixtures: EndpointFixtures): readonly
|
|
|
433
433
|
* one. Its name carries the workload's actions, so a change of them makes the committed test stale.
|
|
434
434
|
*/
|
|
435
435
|
const publicCases = (row: EndpointRow, artifact: ContractArtifact, fixtures: EndpointFixtures): readonly Case[] => {
|
|
436
|
-
|
|
436
|
+
// A `challenge` row is the framework's own issuer of a procedure's ALTCHA challenge: it runs no handler to test.
|
|
437
|
+
if (row.kind !== 'public' || row.source.kind !== 'mount') return []
|
|
437
438
|
const input = inputOf(row, fixtures)
|
|
438
439
|
if (input === undefined) return []
|
|
439
440
|
const call = `await kit.anyone(${quote(row.id)}, ${renderSample(input)})`
|