@feasibleone/blong 1.8.0 → 1.9.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 +14 -0
- package/README.md +1 -1
- package/dist/types.d.ts +21 -18
- package/dist/types.js +2 -9
- package/dist/types.js.map +1 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.9.1](https://github.com/feasibleone/blong/compare/blong-v1.9.0...blong-v1.9.1) (2026-03-02)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* dependencies ([985e389](https://github.com/feasibleone/blong/commit/985e389e982a9f3937a5a192131a9cde12d01c3c))
|
|
9
|
+
|
|
10
|
+
## [1.9.0](https://github.com/feasibleone/blong/compare/blong-v1.8.0...blong-v1.9.0) (2026-03-01)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* upgrade typebox ([6631428](https://github.com/feasibleone/blong/commit/6631428be08fda73571c3e4c623893fad668c25d))
|
|
16
|
+
|
|
3
17
|
## [1.8.0](https://github.com/feasibleone/blong/compare/blong-v1.7.3...blong-v1.8.0) (2026-02-28)
|
|
4
18
|
|
|
5
19
|
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!-- markdownlint-disable MD033 MD041 -->
|
|
2
2
|
<div align="center">
|
|
3
3
|
|
|
4
|
-
[](https://github.com/feasibleone/blong/actions/workflows/release.yaml)
|
|
5
5
|
[](https://www.npmjs.com/package/@feasibleone/blong)
|
|
6
6
|
[](https://github.com/feasibleone/blong)
|
|
7
7
|
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// Generated by dts-bundle-generator v9.5.1
|
|
2
2
|
|
|
3
|
-
import { JavaScriptTypeBuilder, Static, TArray, TBoolean, TFunction, TNever, TObject, TSchema, TString } from '@sinclair/typebox';
|
|
4
3
|
import { SrvRecord } from 'dns';
|
|
5
4
|
import { EventEmitter } from 'events';
|
|
6
5
|
import { Socket, TcpNetConnectOpts } from 'net';
|
|
@@ -11,6 +10,7 @@ import { Duplex } from 'node:stream';
|
|
|
11
10
|
import { Level, LogFn, Logger as PinoLogger } from 'pino';
|
|
12
11
|
import { Readable, Writable } from 'stream';
|
|
13
12
|
import { ConnectionOptions as ConnectionOptions_2, TLSSocket, TLSSocketOptions } from 'tls';
|
|
13
|
+
import { Static, TArray, TBoolean, TFunction, TNever, TObject, TSchema, TString, Type } from 'typebox';
|
|
14
14
|
|
|
15
15
|
export type Method = "GET" | "POST" | "PUT" | "DELETE";
|
|
16
16
|
export interface RequestArgs {
|
|
@@ -17550,7 +17550,7 @@ export type Config<T, C> = {
|
|
|
17550
17550
|
} & T;
|
|
17551
17551
|
export type RemoteMethod = (...params: unknown[]) => Promise<unknown>;
|
|
17552
17552
|
export interface IRemote {
|
|
17553
|
-
remote: (methodName:
|
|
17553
|
+
remote: (methodName: string, options?: object) => RemoteMethod;
|
|
17554
17554
|
dispatch: (...params: unknown[]) => boolean | Promise<unknown>;
|
|
17555
17555
|
start: () => Promise<void>;
|
|
17556
17556
|
stop: () => Promise<void>;
|
|
@@ -17611,7 +17611,7 @@ export interface IRegistry {
|
|
|
17611
17611
|
}
|
|
17612
17612
|
export interface IApi {
|
|
17613
17613
|
id?: string;
|
|
17614
|
-
type:
|
|
17614
|
+
type: typeof Type;
|
|
17615
17615
|
adapter: (id: string) => (api: {
|
|
17616
17616
|
utError: IError;
|
|
17617
17617
|
remote: IRemote;
|
|
@@ -17639,7 +17639,7 @@ export interface IApi {
|
|
|
17639
17639
|
dispatch: (...params: unknown[]) => boolean | Promise<unknown>;
|
|
17640
17640
|
methodId: (name: string) => string;
|
|
17641
17641
|
getPath: (name: string) => string;
|
|
17642
|
-
importMethod: (methodName:
|
|
17642
|
+
importMethod: (methodName: string, options?: object) => (...params: unknown[]) => Promise<unknown>;
|
|
17643
17643
|
attachHandlers: (target: object, patterns: unknown, adapter?: boolean) => unknown;
|
|
17644
17644
|
};
|
|
17645
17645
|
utLog: {
|
|
@@ -17648,7 +17648,7 @@ export interface IApi {
|
|
|
17648
17648
|
handlers?: (api: {
|
|
17649
17649
|
utError: IError;
|
|
17650
17650
|
remote: IRemote;
|
|
17651
|
-
type:
|
|
17651
|
+
type: typeof Type;
|
|
17652
17652
|
}) => {
|
|
17653
17653
|
extends?: string | ((api: {
|
|
17654
17654
|
utError: IError;
|
|
@@ -17750,8 +17750,8 @@ export interface IMeta {
|
|
|
17750
17750
|
};
|
|
17751
17751
|
httpRequest?: {
|
|
17752
17752
|
url: URL | string;
|
|
17753
|
-
state
|
|
17754
|
-
headers:
|
|
17753
|
+
state?: object;
|
|
17754
|
+
headers: Record<string, string>;
|
|
17755
17755
|
};
|
|
17756
17756
|
auth?: {
|
|
17757
17757
|
mlek?: object | "header";
|
|
@@ -17868,9 +17868,7 @@ export interface IModuleConfig<T extends TSchema = TNever> {
|
|
|
17868
17868
|
version: string;
|
|
17869
17869
|
};
|
|
17870
17870
|
url: string;
|
|
17871
|
-
config?:
|
|
17872
|
-
default: Partial<Static<IBaseConfig> & Static<T>>;
|
|
17873
|
-
} & IActivationConfig<Partial<Static<T> & Static<IBaseConfig>>>;
|
|
17871
|
+
config?: IActivationConfig<Partial<Static<T>> & Partial<Static<IBaseConfig>>>;
|
|
17874
17872
|
validation?: T;
|
|
17875
17873
|
children?: (string | (() => Promise<object>))[] | ((layer: ModuleApi) => unknown)[];
|
|
17876
17874
|
}
|
|
@@ -17921,7 +17919,7 @@ export type ChainStep = ((assert: typeof Assert, context: {
|
|
|
17921
17919
|
$meta: IMeta;
|
|
17922
17920
|
} & Record<string, Promise<unknown[]> & ThenableProxy>) => Promise<object>) | object;
|
|
17923
17921
|
export interface ILib {
|
|
17924
|
-
type:
|
|
17922
|
+
type: typeof Type;
|
|
17925
17923
|
error: <T>(errors: T) => Record<keyof T, (params?: unknown, $meta?: IMeta) => ITypedError>;
|
|
17926
17924
|
rename: <T extends object>(object: T, name: string) => T & {
|
|
17927
17925
|
name: string;
|
|
@@ -17939,7 +17937,7 @@ export interface ILib {
|
|
|
17939
17937
|
}
|
|
17940
17938
|
export type ValidationFn = () => GatewaySchema;
|
|
17941
17939
|
export interface IValidationProxy {
|
|
17942
|
-
type:
|
|
17940
|
+
type: typeof Type;
|
|
17943
17941
|
handler: {
|
|
17944
17942
|
[name: string]: ValidationFn;
|
|
17945
17943
|
};
|
|
@@ -18006,9 +18004,11 @@ export type ModuleApi = {
|
|
|
18006
18004
|
} & {
|
|
18007
18005
|
[name: string]: (blong: Definition<Record<string, unknown>, Record<string, unknown>>) => ModuleApi;
|
|
18008
18006
|
};
|
|
18009
|
-
export
|
|
18010
|
-
|
|
18011
|
-
|
|
18007
|
+
export interface SolutionFactory<T extends TSchema = TNever> {
|
|
18008
|
+
(definition: {
|
|
18009
|
+
type: typeof Type;
|
|
18010
|
+
}): IModuleConfig<T> | Promise<IModuleConfig<T>>;
|
|
18011
|
+
}
|
|
18012
18012
|
export declare abstract class Internal {
|
|
18013
18013
|
#private;
|
|
18014
18014
|
protected log?: ReturnType<ILog["logger"]>;
|
|
@@ -18023,14 +18023,17 @@ export declare const handler: <T = Record<string, unknown>, C = AdapterContext>(
|
|
|
18023
18023
|
export declare const library: <T = Record<string, unknown>>(definition: Lib<T>) => Lib<T>;
|
|
18024
18024
|
export declare const validation: (validation: ValidationDefinition) => ValidationDefinition;
|
|
18025
18025
|
export declare const api: (api: ApiDefinition) => ApiDefinition;
|
|
18026
|
-
export declare const validationHandlers: (handlers: Record<string, TFunction
|
|
18026
|
+
export declare const validationHandlers: (handlers: Record<string, TFunction<[
|
|
18027
|
+
TObject<{}>
|
|
18028
|
+
]>>) => ValidationDefinition;
|
|
18027
18029
|
export declare const realm: <T extends TObject>(definition: SolutionFactory<T>) => SolutionFactory<T>;
|
|
18028
18030
|
export declare const server: <T extends TObject>(definition: SolutionFactory<T>) => SolutionFactory<T>;
|
|
18029
18031
|
export declare const browser: <T extends TObject>(definition: SolutionFactory<T>) => SolutionFactory<T>;
|
|
18030
18032
|
export declare const layer: (activation: Record<string, boolean | object>) => Record<string, boolean | object>;
|
|
18031
18033
|
export declare const adapter: <T, C = AdapterContext>(definition: IAdapterFactory<T, C>) => IAdapterFactory<T, C>;
|
|
18032
18034
|
export declare const orchestrator: <T, C = AdapterContext>(definition: IAdapterFactory<T, C>) => IAdapterFactory<T, C>;
|
|
18033
|
-
export
|
|
18035
|
+
export type Kinds = "lib" | "validation" | "api" | "solution" | "server" | "browser" | "adapter" | "orchestrator" | "handler";
|
|
18036
|
+
export declare const kind: (what: {}) => Kinds | undefined;
|
|
18034
18037
|
declare const _default: {
|
|
18035
18038
|
handler: <T = Record<string, unknown>, C = ServerContext>(definition: Definition<T, C>) => Definition<T, C>;
|
|
18036
18039
|
library: <T = Record<string, unknown>>(definition: Lib<T>) => Lib<T>;
|
|
@@ -18041,7 +18044,7 @@ declare const _default: {
|
|
|
18041
18044
|
browser: <T extends TObject>(definition: SolutionFactory<T>) => SolutionFactory<T>;
|
|
18042
18045
|
adapter: <T, C = ServerContext>(definition: IAdapterFactory<T, C>) => IAdapterFactory<T, C>;
|
|
18043
18046
|
orchestrator: <T, C = ServerContext>(definition: IAdapterFactory<T, C>) => IAdapterFactory<T, C>;
|
|
18044
|
-
kind:
|
|
18047
|
+
kind: (what: {}) => Kinds | undefined;
|
|
18045
18048
|
};
|
|
18046
18049
|
|
|
18047
18050
|
export {
|
package/dist/types.js
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
// AppsV1Api,
|
|
3
|
-
// CoreV1Api,
|
|
4
|
-
// NetworkingV1Api,
|
|
5
|
-
// RbacAuthorizationV1Api,
|
|
6
|
-
// Watch,
|
|
7
|
-
// } from '@kubernetes/client-node';
|
|
8
|
-
import { Type, } from '@sinclair/typebox';
|
|
1
|
+
import { Type, } from 'typebox';
|
|
9
2
|
import merge from 'ut-function.merge';
|
|
10
3
|
const Kind = Symbol.for('blong:kind');
|
|
11
4
|
export class Internal {
|
|
@@ -32,7 +25,7 @@ export const validationHandlers = handlers => validation(() => Object.fromEntrie
|
|
|
32
25
|
Object.defineProperty(() => ({
|
|
33
26
|
params: Type.Parameters(handler).items[0],
|
|
34
27
|
result: Type.Awaited(Type.ReturnType(handler)),
|
|
35
|
-
description: handler.description,
|
|
28
|
+
description: 'description' in handler ? handler.description : undefined,
|
|
36
29
|
}), 'name', { value: name }),
|
|
37
30
|
])));
|
|
38
31
|
export const realm = (definition) => Object.defineProperty(definition, Kind, { value: 'solution' });
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../types.ts"],"names":[],"mappings":"AAYA,OAAO,EACH,IAAI,GASP,MAAM,SAAS,CAAC;AAMjB,OAAO,KAAK,MAAM,mBAAmB,CAAC;AAykBtC,MAAM,IAAI,GAAW,MAAM,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;AAE9C,MAAM,OAAgB,QAAQ;IAC1B,IAAI,CAAQ;IACF,GAAG,CAA8B;IAC3C,YAAmB,GAAiB;QAChC,IAAI,CAAC,IAAI,GAAG,GAAG,EAAE,GAAG,CAAC;IACzB,CAAC;IACS,KAAK,GAAkB,CAAC,GAAG,IAA+B,EAAE,EAAE;QACpE,MAAM,MAAM,GAAG,KAAK,CAAqB,GAAG,IAAI,CAAC,CAAC;QAClD,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,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EAAqB,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEzF,eAAe;IACX,OAAO;IACP,OAAO;IACP,UAAU;IACV,GAAG;IACH,KAAK;IACL,MAAM;IACN,OAAO;IACP,OAAO;IACP,YAAY;IACZ,IAAI;CACP,CAAC"}
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"url": "git+https://github.com/feasibleone/blong.git"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"
|
|
13
|
+
"typebox": "^1.1.5",
|
|
14
14
|
"openapi-types": "^12.1.3",
|
|
15
15
|
"pino": "^10.3.1",
|
|
16
16
|
"ut-function.merge": "^1.5.6"
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"@slack/types": "^2.19.0",
|
|
27
27
|
"@slack/webhook": "^7.0.6",
|
|
28
28
|
"@types/request": "^2.48.13",
|
|
29
|
+
"@types/ut-function.merge": "file:./types/ut-function.merge",
|
|
29
30
|
"bson": "^7.2.0",
|
|
30
31
|
"dts-bundle-generator": "^9.5.1",
|
|
31
32
|
"eslint": "~9.39.2",
|
|
@@ -37,11 +38,11 @@
|
|
|
37
38
|
"typescript": "^5.9.3"
|
|
38
39
|
},
|
|
39
40
|
"exports": {
|
|
40
|
-
".": "./
|
|
41
|
+
".": "./types.ts",
|
|
41
42
|
"./types": "./types.ts"
|
|
42
43
|
},
|
|
43
44
|
"type": "module",
|
|
44
|
-
"version": "1.
|
|
45
|
+
"version": "1.9.1",
|
|
45
46
|
"scripts": {
|
|
46
47
|
"build": "heft build --clean;dts-bundle-generator --config dts-gen.config.json",
|
|
47
48
|
"ci-publish": "node ../../common/scripts/install-run-rush-pnpm.js publish --access public --provenance"
|