@feasibleone/blong 1.24.0 → 1.25.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/package.json +2 -2
  3. package/types.ts +38 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.25.1](https://github.com/feasibleone/blong/compare/blong-v1.25.0...blong-v1.25.1) (2026-09-10)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * split core to folders ([3900de8](https://github.com/feasibleone/blong/commit/3900de88defe8a3e9c492c5cf9388ac4ee81d781))
9
+
10
+ ## [1.25.0](https://github.com/feasibleone/blong/compare/blong-v1.24.0...blong-v1.25.0) (2026-08-21)
11
+
12
+
13
+ ### Features
14
+
15
+ * access sessions and audit ([694349f](https://github.com/feasibleone/blong/commit/694349f7e70973b984a30f696d2b6e892b55ec02))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * blong-access-mock, silent error, expected error ([dc00429](https://github.com/feasibleone/blong/commit/dc00429a63a973996d6e94359830cc52d149b995))
21
+
3
22
  ## [1.24.0](https://github.com/feasibleone/blong/compare/blong-v1.23.0...blong-v1.24.0) (2026-08-19)
4
23
 
5
24
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@feasibleone/blong",
3
- "version": "1.24.0",
3
+ "version": "1.25.1",
4
4
  "description": "API and DRY focused RAD framework https://feasibleone.github.io/blong-docs",
5
5
  "keywords": [
6
6
  "blong",
@@ -47,7 +47,7 @@
47
47
  "react": "^19.1.0",
48
48
  "tarn": "^3.0.2",
49
49
  "typescript": "^6.0.3",
50
- "@feasibleone/blong-dev": "1.2.0"
50
+ "@feasibleone/blong-dev": "1.2.2"
51
51
  },
52
52
  "scripts": {
53
53
  "build": "heft build --clean;dts-bundle-generator --config dts-gen.config.json",
package/types.ts CHANGED
@@ -586,6 +586,7 @@ export interface IMeta {
586
586
  redirect?: string;
587
587
  code?: number;
588
588
  state?: unknown[];
589
+ unstate?: unknown[];
589
590
  header?: string[] | [string, unknown][];
590
591
  };
591
592
  httpRequest?: {
@@ -599,6 +600,10 @@ export interface IMeta {
599
600
  permissionMap?: Buffer;
600
601
  actorId?: string | number;
601
602
  sessionId?: string;
603
+ /** Audit record id of the access-check audit recorded for this request. */
604
+ auditId?: string;
605
+ /** Allowed action methodIds — populated by the gateway authorize handler. */
606
+ actions?: string[];
602
607
  };
603
608
  language?: {
604
609
  languageId?: string | number;
@@ -667,6 +672,7 @@ export interface ITypedError extends Error {
667
672
  method?: string | string[];
668
673
  params?: object;
669
674
  code?: string;
675
+ silent?: boolean;
670
676
  req?: {
671
677
  httpVersion: string;
672
678
  url: URL;
@@ -806,6 +812,19 @@ export type GatewaySchema = (
806
812
  bundle?: string;
807
813
  creditCost?: number;
808
814
  meter?: boolean;
815
+ /**
816
+ * Opt this route OUT of the gateway access-check audit (`gateway.audit`).
817
+ * Use for operations that record their own audit trail (e.g. payments)
818
+ * or that must not generate audit noise (e.g. integration-test probes).
819
+ */
820
+ audit?: boolean;
821
+ /**
822
+ * Authenticate the route (bearer) but skip the RBAC action-list check.
823
+ * Use ONLY for self-service methods that operate on the caller's own
824
+ * session (e.g. `login.token.revoke`) — the action is scoped by the
825
+ * token's own `ses` claim, so no cross-user action is possible.
826
+ */
827
+ skipAuthorize?: boolean;
809
828
  };
810
829
 
811
830
  export type SchemaObject = OpenAPIV3_1.SchemaObject | OpenAPIV2.SchemaObject;
@@ -919,6 +938,16 @@ export interface ILib {
919
938
  level?: 'info' | 'warn';
920
939
  },
921
940
  ) => Promise<T>;
941
+ /**
942
+ * Optional map of configurable method/handler bindings that a library may
943
+ * expose under the conventional `methods` member — the idiomatic way to
944
+ * bundle soft dependencies (e.g. the access-realm methods that blong-login's
945
+ * `sessionLib` resolves from config). Handlers read the resolved handlers
946
+ * through `lib.methods.<name>`; each value is a bound handler or `undefined`
947
+ * when the binding is disabled. See the blong-handler skill →
948
+ * "Library as a configurable-bindings bundle (soft dependencies)".
949
+ */
950
+ methods?: LibMethods;
922
951
  }
923
952
 
924
953
  export type ValidationFn = () => GatewaySchema;
@@ -968,6 +997,15 @@ export type PortHandlerBound = (<T>(
968
997
  [name: string]: PortHandlerBound;
969
998
  };
970
999
  export type LibFn = <T>(...params: unknown[]) => T;
1000
+ /**
1001
+ * A map of configurable handler/method bindings exposed by a library under the
1002
+ * conventional `methods` member (see the blong-handler skill). Values are
1003
+ * bound handlers (usually resolved from config against the `handler` proxy);
1004
+ * `undefined` when the binding is disabled.
1005
+ */
1006
+ export type LibMethods = {
1007
+ [method: string]: LibFn | undefined;
1008
+ };
971
1009
  export interface IRemoteHandler {
972
1010
  [name: string]: PortHandlerBound;
973
1011
  }