@feasibleone/blong 1.7.3 → 1.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/CHANGELOG.md +7 -0
- package/dist/types.d.ts +25 -13
- package/dist/types.js +1 -0
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.8.0](https://github.com/feasibleone/blong/compare/blong-v1.7.3...blong-v1.8.0) (2026-02-28)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* self-contained layers ([9b80e3a](https://github.com/feasibleone/blong/commit/9b80e3a1bfd1b6843ece5dba80b619444ec93c84))
|
|
9
|
+
|
|
3
10
|
## [1.7.3](https://github.com/feasibleone/blong/compare/blong-v1.7.2...blong-v1.7.3) (2026-02-17)
|
|
4
11
|
|
|
5
12
|
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
-
import { JavaScriptTypeBuilder, Static, TArray, TBoolean, TFunction, TObject, TSchema, TString } from '@sinclair/typebox';
|
|
3
|
+
import { JavaScriptTypeBuilder, Static, TArray, TBoolean, TFunction, TNever, TObject, TSchema, TString } from '@sinclair/typebox';
|
|
4
4
|
import { SrvRecord } from 'dns';
|
|
5
5
|
import { EventEmitter } from 'events';
|
|
6
6
|
import { Socket, TcpNetConnectOpts } from 'net';
|
|
@@ -17546,7 +17546,7 @@ export type Config<T, C> = {
|
|
|
17546
17546
|
maxReceiveBuffer: number;
|
|
17547
17547
|
logLevel: Parameters<ILog["logger"]>[0];
|
|
17548
17548
|
namespace: string | string[];
|
|
17549
|
-
imports: string | string[];
|
|
17549
|
+
imports: string | RegExp | (string | RegExp)[];
|
|
17550
17550
|
} & T;
|
|
17551
17551
|
export type RemoteMethod = (...params: unknown[]) => Promise<unknown>;
|
|
17552
17552
|
export interface IRemote {
|
|
@@ -17611,6 +17611,7 @@ export interface IRegistry {
|
|
|
17611
17611
|
}
|
|
17612
17612
|
export interface IApi {
|
|
17613
17613
|
id?: string;
|
|
17614
|
+
type: JavaScriptTypeBuilder;
|
|
17614
17615
|
adapter: (id: string) => (api: {
|
|
17615
17616
|
utError: IError;
|
|
17616
17617
|
remote: IRemote;
|
|
@@ -17646,6 +17647,8 @@ export interface IApi {
|
|
|
17646
17647
|
};
|
|
17647
17648
|
handlers?: (api: {
|
|
17648
17649
|
utError: IError;
|
|
17650
|
+
remote: IRemote;
|
|
17651
|
+
type: JavaScriptTypeBuilder;
|
|
17649
17652
|
}) => {
|
|
17650
17653
|
extends?: string | ((api: {
|
|
17651
17654
|
utError: IError;
|
|
@@ -17664,13 +17667,16 @@ export interface IErrorMap {
|
|
|
17664
17667
|
};
|
|
17665
17668
|
}
|
|
17666
17669
|
export interface IAdapter<T, C> {
|
|
17670
|
+
validation?: TSchema;
|
|
17667
17671
|
config?: Config<T, C>;
|
|
17672
|
+
activation?: IActivationConfig<Partial<Config<T, C>>>;
|
|
17668
17673
|
configBase?: string;
|
|
17669
17674
|
log?: ILogger;
|
|
17670
17675
|
errors?: Errors<IErrorMap>;
|
|
17671
17676
|
imported?: ReturnType<IAdapterFactory<T, C>>;
|
|
17672
17677
|
extends?: object | `adapter.${string}` | `orchestrator.${string}`;
|
|
17673
|
-
|
|
17678
|
+
activeConfig?: (this: ReturnType<IAdapterFactory<T, C>>) => Partial<Config<T, C>>;
|
|
17679
|
+
init?: (this: ReturnType<IAdapterFactory<T, C>>, ...config: Partial<Config<T, C>>[]) => Promise<void>;
|
|
17674
17680
|
start?: (this: ReturnType<IAdapterFactory<T, C>>) => Promise<object>;
|
|
17675
17681
|
ready?: (this: ReturnType<IAdapterFactory<T, C>>) => Promise<object>;
|
|
17676
17682
|
stop?: (this: ReturnType<IAdapterFactory<T, C>>) => Promise<object>;
|
|
@@ -17842,26 +17848,31 @@ export interface IBaseConfig extends TObject<{
|
|
|
17842
17848
|
adapter: TBoolean;
|
|
17843
17849
|
orchestrator: TBoolean;
|
|
17844
17850
|
test: TBoolean;
|
|
17845
|
-
|
|
17846
|
-
|
|
17847
|
-
dev: TBoolean;
|
|
17851
|
+
error: TBoolean;
|
|
17852
|
+
gateway: TBoolean | TObject;
|
|
17848
17853
|
sim: TBoolean;
|
|
17849
17854
|
resolution: TBoolean;
|
|
17850
17855
|
}> {
|
|
17851
17856
|
additionalProperties: false;
|
|
17852
17857
|
}
|
|
17853
|
-
export interface
|
|
17858
|
+
export interface IActivationConfig<T> {
|
|
17859
|
+
default: T;
|
|
17860
|
+
integration?: T;
|
|
17861
|
+
deployment?: T;
|
|
17862
|
+
microservice?: T;
|
|
17863
|
+
dev?: T;
|
|
17864
|
+
}
|
|
17865
|
+
export interface IModuleConfig<T extends TSchema = TNever> {
|
|
17854
17866
|
pkg?: {
|
|
17855
17867
|
name: string;
|
|
17856
17868
|
version: string;
|
|
17857
17869
|
};
|
|
17858
17870
|
url: string;
|
|
17859
|
-
config
|
|
17871
|
+
config?: {
|
|
17860
17872
|
default: Partial<Static<IBaseConfig> & Static<T>>;
|
|
17861
|
-
|
|
17862
|
-
|
|
17863
|
-
|
|
17864
|
-
children: (string | (() => Promise<object>))[] | ((layer: ModuleApi) => unknown)[];
|
|
17873
|
+
} & IActivationConfig<Partial<Static<T> & Static<IBaseConfig>>>;
|
|
17874
|
+
validation?: T;
|
|
17875
|
+
children?: (string | (() => Promise<object>))[] | ((layer: ModuleApi) => unknown)[];
|
|
17865
17876
|
}
|
|
17866
17877
|
export interface ILogger {
|
|
17867
17878
|
trace?: LogFn;
|
|
@@ -17995,7 +18006,7 @@ export type ModuleApi = {
|
|
|
17995
18006
|
} & {
|
|
17996
18007
|
[name: string]: (blong: Definition<Record<string, unknown>, Record<string, unknown>>) => ModuleApi;
|
|
17997
18008
|
};
|
|
17998
|
-
export type SolutionFactory<T extends
|
|
18009
|
+
export type SolutionFactory<T extends TSchema = TNever> = (definition: {
|
|
17999
18010
|
type: JavaScriptTypeBuilder;
|
|
18000
18011
|
}) => IModuleConfig<T> | Promise<IModuleConfig<T>>;
|
|
18001
18012
|
export declare abstract class Internal {
|
|
@@ -18016,6 +18027,7 @@ export declare const validationHandlers: (handlers: Record<string, TFunction>) =
|
|
|
18016
18027
|
export declare const realm: <T extends TObject>(definition: SolutionFactory<T>) => SolutionFactory<T>;
|
|
18017
18028
|
export declare const server: <T extends TObject>(definition: SolutionFactory<T>) => SolutionFactory<T>;
|
|
18018
18029
|
export declare const browser: <T extends TObject>(definition: SolutionFactory<T>) => SolutionFactory<T>;
|
|
18030
|
+
export declare const layer: (activation: Record<string, boolean | object>) => Record<string, boolean | object>;
|
|
18019
18031
|
export declare const adapter: <T, C = AdapterContext>(definition: IAdapterFactory<T, C>) => IAdapterFactory<T, C>;
|
|
18020
18032
|
export declare const orchestrator: <T, C = AdapterContext>(definition: IAdapterFactory<T, C>) => IAdapterFactory<T, C>;
|
|
18021
18033
|
export declare const kind: <T>(what: T) => "lib" | "validation" | "api" | "solution" | "server" | "browser" | "adapter" | "orchestrator" | "handler";
|
package/dist/types.js
CHANGED
|
@@ -38,6 +38,7 @@ export const validationHandlers = handlers => validation(() => Object.fromEntrie
|
|
|
38
38
|
export const realm = (definition) => Object.defineProperty(definition, Kind, { value: 'solution' });
|
|
39
39
|
export const server = (definition) => Object.defineProperty(definition, Kind, { value: 'server' });
|
|
40
40
|
export const browser = (definition) => Object.defineProperty(definition, Kind, { value: 'browser' });
|
|
41
|
+
export const layer = (activation) => Object.defineProperty(activation, Kind, { value: 'layer' });
|
|
41
42
|
export const adapter = (definition) => Object.defineProperty(definition, Kind, { value: 'adapter' });
|
|
42
43
|
export const orchestrator = (definition) => Object.defineProperty(definition, Kind, { value: 'orchestrator' });
|
|
43
44
|
export const kind = (what) => what[Kind];
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"AAEA,WAAW;AACX,iBAAiB;AACjB,iBAAiB;AACjB,uBAAuB;AACvB,8BAA8B;AAC9B,aAAa;AACb,oCAAoC;AACpC,OAAO,EACH,IAAI,
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"AAEA,WAAW;AACX,iBAAiB;AACjB,iBAAiB;AACjB,uBAAuB;AACvB,8BAA8B;AAC9B,aAAa;AACb,oCAAoC;AACpC,OAAO,EACH,IAAI,GAUP,MAAM,mBAAmB,CAAC;AAS3B,OAAO,KAAK,MAAM,mBAAmB,CAAC;AAwkBtC,MAAM,IAAI,GAAW,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAE9C,MAAM,OAAgB,QAAQ;IAC1B,IAAI,CAAO;IACD,GAAG,CAA8B;IAC3C,YAAmB,GAAiB;QAChC,IAAI,CAAC,IAAI,GAAG,GAAG,EAAE,GAAG,CAAC;IACzB,CAAC;IACS,KAAK,GAAkB,CAAC,GAAG,IAAI,EAAE,EAAE;QACzC,MAAM,MAAM,GAAG,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;QAC9B,IAAI,MAAM,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI;YAC5B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAC,CAAC,CAAC;QAChF,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;IACK,KAAK,CAAC,IAAI,KAAmB,CAAC;IAC9B,KAAK,CAAC,KAAK,CAAC,GAAG,MAAiB,IAAkB,CAAC;CAC7D;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,CACnB,UAA4B,EACZ,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC,UAAU,EAAE,IA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|
45
45
|
"scripts": {
|
|
46
46
|
"build": "heft build --clean;dts-bundle-generator --config dts-gen.config.json",
|
|
47
47
|
"ci-publish": "node ../../common/scripts/install-run-rush-pnpm.js publish --access public --provenance"
|