@persistica/flux-mesh 0.0.28 → 0.0.30

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@persistica/flux-mesh",
3
- "version": "0.0.28",
3
+ "version": "0.0.30",
4
4
  "description": "Persistica Flux Mesh",
5
5
  "type": "module",
6
6
  "keywords": [],
@@ -1,3 +1,4 @@
1
+ import type { StringValue } from 'ms';
1
2
  import type { TNetworkId_S } from '@flux/shared/types';
2
3
  import type { TFluxClientUID } from '@flux/shared/utils';
3
4
  export type TTokenPayload = {
@@ -14,11 +15,12 @@ export type TTokenPayloadJWT = string & {
14
15
  * Generates JWT string from a token payload.
15
16
  *
16
17
  * @param { TTokenPayload } payload - The token payload to sign
17
- * @param { number } [expiresIn] - Token expiry time in seconds
18
+ * @param { StringValue | number } [expiresIn] - Token expiry as a jsonwebtoken
19
+ * timespan (e.g. '15m') or a number of seconds.
18
20
  *
19
21
  * @returns { string } The signed JWT string
20
22
  */
21
- export declare const generateToken: (payload: TTokenPayload, expiresIn?: number) => string;
23
+ export declare const generateToken: (payload: TTokenPayload, expiresIn?: StringValue | number) => string;
22
24
  /**
23
25
  * Normalizes the authority claim to the string form used throughout mesh.
24
26
  *
@@ -1,10 +1,12 @@
1
1
  import { type TProcessAddress, type TMachineAddress } from '@flux/shared/types';
2
2
  import { RedisConnection } from '../../routing/redis/redis-connection.class';
3
3
  import { NetworkAgentService } from '../../register/network-agent.service';
4
+ import { NetworkAuthorityCache } from '../../register/network-authority-cache.class';
4
5
  export declare class ProcessClass {
5
6
  private readonly _redisConnection;
6
7
  private readonly _networkAgentService;
7
- constructor(_redisConnection: RedisConnection, _networkAgentService: NetworkAgentService);
8
+ private readonly _networkAuthorityCache;
9
+ constructor(_redisConnection: RedisConnection, _networkAgentService: NetworkAgentService, _networkAuthorityCache: NetworkAuthorityCache);
8
10
  /**
9
11
  *
10
12
  */