@feasibleone/blong-gogo 1.38.0 → 1.38.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/package.json +3 -3
- package/src/Gateway.ts +12 -2
- package/template/.storybook/preview.tsx +8 -14
- package/template/meta/dbTest/accessAuthorizationMerge.yaml +14 -6
- package/template/meta/fixture/$subjectFixture.ts +11 -10
- package/template/src/stories/$Object.stories.tsx +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.38.1](https://github.com/feasibleone/blong/compare/blong-gogo-v1.38.0...blong-gogo-v1.38.1) (2026-10-01)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* error handling ([fc1af53](https://github.com/feasibleone/blong/commit/fc1af536ae814a88a661341936bd9f9c519b38d1))
|
|
9
|
+
|
|
3
10
|
## [1.38.0](https://github.com/feasibleone/blong/compare/blong-gogo-v1.37.0...blong-gogo-v1.38.0) (2026-09-29)
|
|
4
11
|
|
|
5
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@feasibleone/blong-gogo",
|
|
3
|
-
"version": "1.38.
|
|
3
|
+
"version": "1.38.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"url": "git+https://github.com/feasibleone/blong.git"
|
|
6
6
|
},
|
|
@@ -88,11 +88,11 @@
|
|
|
88
88
|
"@rushstack/heft-typescript-plugin": "^1.3.1",
|
|
89
89
|
"@types/cacache": "^20.0.1",
|
|
90
90
|
"@types/node": "^24",
|
|
91
|
-
"playwright": "^1.
|
|
91
|
+
"playwright": "^1.63.0",
|
|
92
92
|
"tap": "^21.6.3",
|
|
93
93
|
"typescript": "^6.0.3",
|
|
94
94
|
"vite": "^8.2.1",
|
|
95
|
-
"@feasibleone/blong-dev": "1.
|
|
95
|
+
"@feasibleone/blong-dev": "1.8.0"
|
|
96
96
|
},
|
|
97
97
|
"scripts": {
|
|
98
98
|
"browser-check": "node scripts/browser-compat-check.mjs",
|
package/src/Gateway.ts
CHANGED
|
@@ -14,7 +14,12 @@ import type {
|
|
|
14
14
|
IPlatformApi,
|
|
15
15
|
} from '@feasibleone/blong/types';
|
|
16
16
|
import {Internal} from '@feasibleone/blong/types';
|
|
17
|
-
import fastify, {
|
|
17
|
+
import fastify, {
|
|
18
|
+
LogController,
|
|
19
|
+
type FastifyReply,
|
|
20
|
+
type FastifyRequest,
|
|
21
|
+
type RouteOptions,
|
|
22
|
+
} from 'fastify';
|
|
18
23
|
import os from 'os';
|
|
19
24
|
import type {LevelWithSilent} from 'pino';
|
|
20
25
|
import {Type, type TSchema} from 'typebox';
|
|
@@ -706,7 +711,12 @@ export default class Gateway extends Internal implements IGateway {
|
|
|
706
711
|
// both more than a reader needs and less than the flow records say.
|
|
707
712
|
// Nothing else depends on those two lines: the request has a flow, the
|
|
708
713
|
// flow has its calls, and both are recorded where they belong.
|
|
709
|
-
|
|
714
|
+
//
|
|
715
|
+
// Passed as a `LogController` instance rather than as fastify's own
|
|
716
|
+
// top-level `disableRequestLogging`, which is deprecated and warned
|
|
717
|
+
// about a line per process — one line per package in a CI run — for a
|
|
718
|
+
// flag whose replacement does exactly the same thing.
|
|
719
|
+
logController: new LogController({disableRequestLogging: true}),
|
|
710
720
|
ajv: {
|
|
711
721
|
customOptions: {
|
|
712
722
|
allErrors: true,
|
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {defineBlongStorybookPreview} from '@feasibleone/blong-browser/storybook.tsx';
|
|
2
2
|
// The composed entry, not `../browser.ts`: a model story needs the portal port
|
|
3
3
|
// (blong-browser), which only the composed entry carries. A realm's composed
|
|
4
4
|
// entry is `index.browser.ts`; a suite's `browser.ts` already is one.
|
|
5
5
|
import browser from '../index.browser.ts';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
color: /(background|color)$/i,
|
|
15
|
-
date: /Date$/,
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
},
|
|
19
|
-
};
|
|
7
|
+
// One line on purpose. The factory owns the toolbar — backend (mock / live
|
|
8
|
+
// JSON-RPC / live MLE), role, theme, language, direction — plus its persistence
|
|
9
|
+
// and the decorators that apply them, so every realm's preview (and the kukum
|
|
10
|
+
// template that generates it) is this same line. `backend: true` adds the
|
|
11
|
+
// Backend and Role items: these stories run on the loaded platform, so there is
|
|
12
|
+
// a backend adapter to point at a gateway.
|
|
13
|
+
export default defineBlongStorybookPreview(browser, {backend: true});
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
# RBAC test seed — grants `$subject` capabilities to the
|
|
1
|
+
# RBAC test seed — grants `$subject` capabilities to the seeded roles.
|
|
2
2
|
#
|
|
3
|
-
# `testAdmin` / `testUser`
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# `Guest`) get
|
|
3
|
+
# `testAdmin` / `testUser` hold the `Admin` role, so the `$subjectManage`
|
|
4
|
+
# capability gives them every `$subject` action; `testManager` (role `Manager`)
|
|
5
|
+
# gets read + edit but not remove; `testViewer` (role `Customer`) and
|
|
6
|
+
# `testGuest` (role `Guest`) get read-only — which is what lets the Storybook
|
|
7
|
+
# toolbar's Role item show a permission difference rather than three identical
|
|
8
|
+
# screens, and what the access-control test relies on for its 403 (it calls
|
|
9
|
+
# `add`, which none of the read-only roles holds).
|
|
7
10
|
#
|
|
8
11
|
# The file name is deliberately `accessAuthorizationMerge.yaml` (NOT
|
|
9
12
|
# `$subject`-prefixed): the seed method is derived from the file name, so this
|
|
@@ -16,6 +19,11 @@
|
|
|
16
19
|
# Capability names are the NON-dotted handler names (the default convention).
|
|
17
20
|
role:
|
|
18
21
|
Admin: $subjectManage
|
|
22
|
+
Manager: $subjectMaintain
|
|
23
|
+
Customer: $subjectView
|
|
24
|
+
Guest: $subjectView
|
|
19
25
|
capability:
|
|
20
|
-
$subjectManage: $subject$ObjectAdd,$subject$ObjectFind,$subject$ObjectGet,$subject$ObjectEdit,$subject$ObjectRemove
|
|
26
|
+
$subjectManage: $subject$ObjectAdd,$subject$ObjectFind,$subject$ObjectGet,$subject$ObjectEdit,$subject$ObjectRemove,subject.object.schema
|
|
27
|
+
$subjectMaintain: $subject$ObjectAdd,$subject$ObjectFind,$subject$ObjectGet,$subject$ObjectEdit,subject.object.schema
|
|
28
|
+
$subjectView: $subject$ObjectFind,$subject$ObjectGet,subject.object.schema
|
|
21
29
|
|
|
@@ -9,12 +9,13 @@ import {handler} from '@feasibleone/blong';
|
|
|
9
9
|
* that one describes mock OpenAPI subjects/dropdowns, a different shape.
|
|
10
10
|
*
|
|
11
11
|
* `browser.ts` globs this folder; a fixture the browser platform never loads
|
|
12
|
-
* leaves every story empty. The sample
|
|
13
|
-
* meta/dbTest/$subject$ObjectMerge.yaml
|
|
14
|
-
* fixture
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
12
|
+
* leaves every story empty. The sample records mirror
|
|
13
|
+
* meta/dbTest/$subject$ObjectMerge.yaml — same ids, same names plus a
|
|
14
|
+
* `(fixture)` marker — because a story must load in both modes: the fixture
|
|
15
|
+
* feeds the Storybook mock path and the seed feeds the database path, and the
|
|
16
|
+
* marker is what makes the toolbar's Backend item visibly do something. The
|
|
17
|
+
* Open story in src/stories/$Object.stories.tsx opens record 101, so keep a
|
|
18
|
+
* row whose key is 101 here.
|
|
18
19
|
*/
|
|
19
20
|
export default handler(
|
|
20
21
|
() =>
|
|
@@ -22,13 +23,13 @@ export default handler(
|
|
|
22
23
|
return {
|
|
23
24
|
'$subject.$object': [
|
|
24
25
|
{
|
|
25
|
-
$objectId:
|
|
26
|
-
$objectName: 'Sample $Object One',
|
|
26
|
+
$objectId: 101,
|
|
27
|
+
$objectName: 'Sample $Object One (fixture)',
|
|
27
28
|
$objectStatus: 'draft',
|
|
28
29
|
},
|
|
29
30
|
{
|
|
30
|
-
$objectId:
|
|
31
|
-
$objectName: 'Sample $Object Two',
|
|
31
|
+
$objectId: 102,
|
|
32
|
+
$objectName: 'Sample $Object Two (fixture)',
|
|
32
33
|
$objectStatus: 'sent',
|
|
33
34
|
},
|
|
34
35
|
],
|
|
@@ -9,8 +9,10 @@ export default meta;
|
|
|
9
9
|
|
|
10
10
|
/** Browse — the $Object list with its toolbar. */
|
|
11
11
|
export const Browse = page('$subject.$object.browse');
|
|
12
|
-
/** Open — record
|
|
13
|
-
|
|
12
|
+
/** Open — record 101, the first row `meta/dbTest/$subject$ObjectMerge.yaml`
|
|
13
|
+
* seeds and `meta/fixture/$subjectFixture.ts` mirrors, so it loads in both the
|
|
14
|
+
* mock and the live backend mode. */
|
|
15
|
+
export const Open = page('$subject.$object.open', 101);
|
|
14
16
|
/** New — the empty create form. */
|
|
15
17
|
export const New = page('$subject.$object.new');
|
|
16
18
|
/** Report — the read-only view. */
|