nesoi 3.0.9 → 3.0.10
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/lib/compiler/apps/monolyth/monolyth_compiler.d.ts +1 -1
- package/lib/compiler/apps/monolyth/monolyth_compiler.js +7 -7
- package/lib/elements/blocks/machine/machine.builder.js +12 -1
- package/lib/elements/blocks/machine/machine.schema.d.ts +2 -1
- package/lib/elements/blocks/machine/machine.schema.js +2 -1
- package/lib/elements/edge/controller/adapters/controller_adapter.d.ts +3 -1
- package/lib/elements/edge/controller/adapters/controller_adapter.js +2 -1
- package/lib/elements/edge/controller/controller.config.d.ts +3 -2
- package/lib/elements/edge/controller/controller.d.ts +3 -3
- package/lib/elements/edge/controller/controller.js +3 -3
- package/lib/elements/entities/bucket/adapters/bucket_adapter.d.ts +2 -1
- package/lib/elements/entities/bucket/bucket.config.d.ts +3 -3
- package/lib/elements/entities/bucket/bucket.d.ts +3 -2
- package/lib/elements/entities/bucket/bucket.js +4 -4
- package/lib/engine/apps/app.config.d.ts +12 -11
- package/lib/engine/apps/app.d.ts +11 -22
- package/lib/engine/apps/app.js +9 -9
- package/lib/engine/apps/inline.app.d.ts +9 -8
- package/lib/engine/apps/inline.app.js +24 -24
- package/lib/engine/apps/monolyth/monolyth.app.d.ts +5 -5
- package/lib/engine/apps/monolyth/monolyth.app.js +6 -6
- package/lib/engine/apps/service.d.ts +30 -0
- package/lib/engine/apps/service.js +15 -0
- package/lib/engine/auth/authn.d.ts +10 -1
- package/lib/engine/auth/zero.authn_provider.d.ts +7 -3
- package/lib/engine/auth/zero.authn_provider.js +9 -2
- package/lib/engine/cli/cli.d.ts +2 -2
- package/lib/engine/cli/cli.js +1 -1
- package/lib/engine/cli/ui.js +1 -1
- package/lib/engine/daemon.d.ts +11 -11
- package/lib/engine/daemon.js +18 -18
- package/lib/engine/dependency.d.ts +2 -1
- package/lib/engine/dependency.js +18 -0
- package/lib/engine/module.d.ts +6 -4
- package/lib/engine/module.js +25 -10
- package/lib/engine/transaction/nodes/bucket.trx_node.js +1 -2
- package/lib/engine/transaction/nodes/bucket_query.trx_node.js +5 -10
- package/lib/engine/transaction/nodes/job.trx_node.js +2 -4
- package/lib/engine/transaction/nodes/machine.trx_node.js +2 -4
- package/lib/engine/transaction/nodes/queue.trx_node.js +1 -2
- package/lib/engine/transaction/nodes/resource.trx_node.js +2 -4
- package/lib/engine/transaction/trx.d.ts +6 -4
- package/lib/engine/transaction/trx.js +2 -1
- package/lib/engine/transaction/trx_engine.config.d.ts +2 -2
- package/lib/engine/transaction/trx_engine.d.ts +4 -3
- package/lib/engine/transaction/trx_engine.js +20 -17
- package/lib/engine/transaction/trx_node.d.ts +4 -2
- package/lib/engine/transaction/trx_node.js +13 -1
- package/lib/engine/tree.js +6 -17
- package/lib/schema.d.ts +1 -1
- package/package.json +2 -3
- package/tools/joaquin/job.js +2 -2
- package/tools/joaquin/message.js +2 -2
- package/tools/joaquin/mock.d.ts +6 -6
- package/tsconfig.build.tsbuildinfo +1 -1
- package/lib/adapters/postgres/src/migrator/csv.d.ts +0 -7
- package/lib/adapters/postgres/src/migrator/csv.js +0 -72
- package/lib/adapters/postgres/src/migrator/database.d.ts +0 -34
- package/lib/adapters/postgres/src/migrator/database.js +0 -88
- package/lib/adapters/postgres/src/migrator/generator/generator.d.ts +0 -22
- package/lib/adapters/postgres/src/migrator/generator/generator.js +0 -326
- package/lib/adapters/postgres/src/migrator/generator/migration.d.ts +0 -66
- package/lib/adapters/postgres/src/migrator/generator/migration.js +0 -249
- package/lib/adapters/postgres/src/migrator/generator/provider.d.ts +0 -19
- package/lib/adapters/postgres/src/migrator/generator/provider.js +0 -74
- package/lib/adapters/postgres/src/migrator/index.d.ts +0 -47
- package/lib/adapters/postgres/src/migrator/index.js +0 -22
- package/lib/adapters/postgres/src/migrator/runner/runner.d.ts +0 -17
- package/lib/adapters/postgres/src/migrator/runner/runner.js +0 -249
- package/lib/adapters/postgres/src/migrator/runner/status.d.ts +0 -17
- package/lib/adapters/postgres/src/migrator/runner/status.js +0 -55
- package/lib/adapters/postgres/src/postgres.bucket_adapter.d.ts +0 -42
- package/lib/adapters/postgres/src/postgres.bucket_adapter.js +0 -294
- package/lib/adapters/postgres/src/postgres.cli.d.ts +0 -76
- package/lib/adapters/postgres/src/postgres.cli.js +0 -207
- package/lib/adapters/postgres/src/postgres.config.d.ts +0 -5
- package/lib/adapters/postgres/src/postgres.config.js +0 -2
- package/lib/adapters/postgres/src/postgres.nql.d.ts +0 -16
- package/lib/adapters/postgres/src/postgres.nql.js +0 -123
- package/lib/adapters/postgres/src/postgres.provider.d.ts +0 -18
- package/lib/adapters/postgres/src/postgres.provider.js +0 -77
- package/lib/adapters/postgres/test/postgres.bucket_adapter.test.d.ts +0 -1
- package/lib/adapters/postgres/test/postgres.bucket_adapter.test.js +0 -210
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { $Module, $Space } from "../../schema";
|
|
2
2
|
import { Module } from '../module';
|
|
3
3
|
import { AnyTrxNode, TrxNode, TrxNodeStatus } from './trx_node';
|
|
4
|
-
import { TrxEngineOrigin } from './trx_engine';
|
|
4
|
+
import { AnyTrxEngine, TrxEngineOrigin } from './trx_engine';
|
|
5
5
|
import { AnyUsers, AuthnRequest } from '../auth/authn';
|
|
6
6
|
import { NesoiDatetime } from '../data/datetime';
|
|
7
|
+
import { NesoiError } from '../data/error';
|
|
7
8
|
type TrxOrigin = TrxEngineOrigin | `trx:${string}`;
|
|
8
9
|
type TrxState = 'open' | 'ok' | 'error';
|
|
9
10
|
/**
|
|
@@ -17,9 +18,9 @@ export declare class TrxStatus<Output> {
|
|
|
17
18
|
end?: NesoiDatetime | undefined;
|
|
18
19
|
state?: TrxState | undefined;
|
|
19
20
|
output?: Output | undefined;
|
|
20
|
-
error?:
|
|
21
|
+
error?: NesoiError.BaseError | undefined;
|
|
21
22
|
nodes: TrxNodeStatus[];
|
|
22
|
-
constructor(id: string, origin: TrxOrigin, start: NesoiDatetime, end?: NesoiDatetime | undefined, state?: TrxState | undefined, output?: Output | undefined, error?:
|
|
23
|
+
constructor(id: string, origin: TrxOrigin, start: NesoiDatetime, end?: NesoiDatetime | undefined, state?: TrxState | undefined, output?: Output | undefined, error?: NesoiError.BaseError | undefined, nodes?: TrxNodeStatus[]);
|
|
23
24
|
summary(): string;
|
|
24
25
|
}
|
|
25
26
|
/**
|
|
@@ -27,6 +28,7 @@ export declare class TrxStatus<Output> {
|
|
|
27
28
|
* @subcategory Transaction
|
|
28
29
|
*/
|
|
29
30
|
export declare class Trx<S extends $Space, M extends $Module, Authn extends AnyUsers> {
|
|
31
|
+
engine: AnyTrxEngine;
|
|
30
32
|
private module;
|
|
31
33
|
id: string;
|
|
32
34
|
private origin;
|
|
@@ -35,7 +37,7 @@ export declare class Trx<S extends $Space, M extends $Module, Authn extends AnyU
|
|
|
35
37
|
start: NesoiDatetime;
|
|
36
38
|
end?: NesoiDatetime;
|
|
37
39
|
ctx: Record<string, any>;
|
|
38
|
-
constructor(module: Module<S, M>, origin: TrxOrigin, authn?: {
|
|
40
|
+
constructor(engine: AnyTrxEngine, module: Module<S, M>, origin: TrxOrigin, authn?: {
|
|
39
41
|
tokens: AuthnRequest<any>;
|
|
40
42
|
users: Authn;
|
|
41
43
|
}, id?: string, root?: TrxNode<S, M, Authn>, nodes?: Record<string, TrxNode<S, M, Authn>>);
|
|
@@ -54,7 +54,8 @@ exports.TrxStatus = TrxStatus;
|
|
|
54
54
|
* @subcategory Transaction
|
|
55
55
|
*/
|
|
56
56
|
class Trx {
|
|
57
|
-
constructor(module, origin, authn, id, root, nodes) {
|
|
57
|
+
constructor(engine, module, origin, authn, id, root, nodes) {
|
|
58
|
+
this.engine = engine;
|
|
58
59
|
this.start = datetime_1.NesoiDatetime.now();
|
|
59
60
|
this.ctx = {};
|
|
60
61
|
this.module = module;
|
|
@@ -4,10 +4,10 @@ import { AnyTrx, Trx } from './trx';
|
|
|
4
4
|
import { AnyUsers } from '../auth/authn';
|
|
5
5
|
import { TrxNode, TrxNodeStatus } from './trx_node';
|
|
6
6
|
export type TrxEngineWrapFn<S extends $Space, M extends $Module> = (trx: TrxNode<S, M, any>) => Promise<TrxNodeStatus>;
|
|
7
|
-
export type TrxEngineConfig<S extends $Space, M extends $Module, Authn extends AnyUsers,
|
|
7
|
+
export type TrxEngineConfig<S extends $Space, M extends $Module, Authn extends AnyUsers, Services extends Record<string, any>> = {
|
|
8
8
|
/**
|
|
9
9
|
* Adapter used to store transactions of this module.
|
|
10
10
|
*/
|
|
11
11
|
adapter?: (schema: M) => BucketAdapter<AnyTrx>;
|
|
12
|
-
wrap?: <T extends Trx<S, M, Authn>>(trx: T, fn: TrxEngineWrapFn<S, M>,
|
|
12
|
+
wrap?: <T extends Trx<S, M, Authn>>(trx: T, fn: TrxEngineWrapFn<S, M>, services: Services) => Promise<any>;
|
|
13
13
|
};
|
|
@@ -4,6 +4,7 @@ import { Trx } from './trx';
|
|
|
4
4
|
import { TrxNode, TrxNodeStatus } from './trx_node';
|
|
5
5
|
import { AnyAuthnProviders, AuthnRequest } from '../auth/authn';
|
|
6
6
|
import { TrxEngineConfig } from './trx_engine.config';
|
|
7
|
+
import { IService } from '../apps/service';
|
|
7
8
|
export type TrxEngineOrigin = `app:${string}`;
|
|
8
9
|
/**
|
|
9
10
|
* @category Engine
|
|
@@ -14,17 +15,17 @@ export declare class TrxEngine<S extends $Space, M extends $Module, Authn extend
|
|
|
14
15
|
private module;
|
|
15
16
|
private authnProviders?;
|
|
16
17
|
private config?;
|
|
17
|
-
private
|
|
18
|
+
private services;
|
|
18
19
|
/**
|
|
19
20
|
* Transaction used to read/write transactions on the adapter
|
|
20
21
|
*/
|
|
21
22
|
private innerTrx;
|
|
22
23
|
private adapter;
|
|
23
|
-
constructor(origin: TrxEngineOrigin, module: Module<S, M>, authnProviders?: Authn | undefined, config?: TrxEngineConfig<S, M, any, any> | undefined,
|
|
24
|
+
constructor(origin: TrxEngineOrigin, module: Module<S, M>, authnProviders?: Authn | undefined, config?: TrxEngineConfig<S, M, any, any> | undefined, services?: Record<string, IService>);
|
|
24
25
|
getModule(): Module<S, M>;
|
|
25
26
|
get(id?: string): Promise<Trx<S, M, any>>;
|
|
26
27
|
trx(fn: (trx: TrxNode<S, M, any>) => Promise<TrxNodeStatus>, authn?: AuthnRequest<keyof Authn>): Promise<import("./trx").TrxStatus<any>>;
|
|
27
|
-
|
|
28
|
+
authenticate(node: TrxNode<S, M, any>, request?: AuthnRequest<keyof Authn>): Promise<void>;
|
|
28
29
|
private commit;
|
|
29
30
|
private rollback;
|
|
30
31
|
}
|
|
@@ -11,13 +11,13 @@ const memory_bucket_adapter_1 = require("../../elements/entities/bucket/adapters
|
|
|
11
11
|
* @subcategory Transaction
|
|
12
12
|
*/
|
|
13
13
|
class TrxEngine {
|
|
14
|
-
constructor(origin, module, authnProviders, config,
|
|
14
|
+
constructor(origin, module, authnProviders, config, services = {}) {
|
|
15
15
|
this.origin = origin;
|
|
16
16
|
this.module = module;
|
|
17
17
|
this.authnProviders = authnProviders;
|
|
18
18
|
this.config = config;
|
|
19
|
-
this.
|
|
20
|
-
this.innerTrx = new trx_1.Trx(this.module, `trx:${origin}`);
|
|
19
|
+
this.services = services;
|
|
20
|
+
this.innerTrx = new trx_1.Trx(this, this.module, `trx:${origin}`);
|
|
21
21
|
this.adapter = config?.adapter?.(module.schema) || new memory_bucket_adapter_1.MemoryBucketAdapter({}, {});
|
|
22
22
|
}
|
|
23
23
|
getModule() {
|
|
@@ -26,7 +26,7 @@ class TrxEngine {
|
|
|
26
26
|
async get(id) {
|
|
27
27
|
let trx = undefined;
|
|
28
28
|
if (!id) {
|
|
29
|
-
trx = new trx_1.Trx(this.module, this.origin);
|
|
29
|
+
trx = new trx_1.Trx(this, this.module, this.origin);
|
|
30
30
|
log_1.Log.info('module', this.module.name, `Begin ${(0, log_1.scopeTag)('trx', trx.id)} @ ${(0, log_1.anyScopeTag)(this.origin)}`);
|
|
31
31
|
return this.adapter.create(this.innerTrx.root, trx);
|
|
32
32
|
}
|
|
@@ -37,7 +37,7 @@ class TrxEngine {
|
|
|
37
37
|
}
|
|
38
38
|
else {
|
|
39
39
|
log_1.Log.info('module', this.module.name, `Chain ${(0, log_1.scopeTag)('trx', id)} @ ${(0, log_1.anyScopeTag)(this.origin)}`);
|
|
40
|
-
trx = new trx_1.Trx(this.module, this.origin, undefined, id);
|
|
40
|
+
trx = new trx_1.Trx(this, this.module, this.origin, undefined, id);
|
|
41
41
|
return this.adapter.create(this.innerTrx.root, trx);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -46,13 +46,10 @@ class TrxEngine {
|
|
|
46
46
|
async trx(fn, authn) {
|
|
47
47
|
const trx = await this.get(undefined);
|
|
48
48
|
try {
|
|
49
|
-
|
|
50
|
-
if (users) {
|
|
51
|
-
trx_node_1.TrxNode.addAuthn(trx.root, authn, users);
|
|
52
|
-
}
|
|
49
|
+
await this.authenticate(trx.root, authn);
|
|
53
50
|
let output;
|
|
54
51
|
if (this.config?.wrap) {
|
|
55
|
-
output = await this.config?.wrap(trx, fn, this.
|
|
52
|
+
output = await this.config?.wrap(trx, fn, this.services);
|
|
56
53
|
}
|
|
57
54
|
else {
|
|
58
55
|
output = await fn(trx.root);
|
|
@@ -65,19 +62,25 @@ class TrxEngine {
|
|
|
65
62
|
return trx.status();
|
|
66
63
|
}
|
|
67
64
|
// authentication
|
|
68
|
-
async authenticate(
|
|
65
|
+
async authenticate(node, request = {}) {
|
|
69
66
|
if (!this.authnProviders) {
|
|
70
67
|
throw error_1.NesoiError.Authn.NoProvidersRegisteredForModule(this.module.name);
|
|
71
68
|
}
|
|
72
69
|
const users = {};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
70
|
+
const tokens = {};
|
|
71
|
+
for (const providerName in this.authnProviders) {
|
|
72
|
+
const provider = this.authnProviders[providerName];
|
|
73
|
+
const reqToken = request[providerName];
|
|
74
|
+
if (provider.eager || reqToken) {
|
|
75
|
+
if (!provider) {
|
|
76
|
+
throw error_1.NesoiError.Authn.NoProviderRegisteredForModule(this.module.name, providerName);
|
|
77
|
+
}
|
|
78
|
+
const { user, token } = await provider.authenticate({ trx: node, token: reqToken });
|
|
79
|
+
users[providerName] = user;
|
|
80
|
+
tokens[providerName] = token;
|
|
77
81
|
}
|
|
78
|
-
users[provider] = await this.authnProviders[provider].authenticate({ trx, token });
|
|
79
82
|
}
|
|
80
|
-
|
|
83
|
+
trx_node_1.TrxNode.addAuthn(node, tokens, users);
|
|
81
84
|
}
|
|
82
85
|
//
|
|
83
86
|
async commit(trx, output) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { $Module, $Space } from "../../schema";
|
|
2
|
+
import { NesoiError } from '../data/error';
|
|
2
3
|
import { AnyModule, VirtualModuleDef } from '../module';
|
|
3
4
|
import { AnyTrx } from './trx';
|
|
4
5
|
import { BucketTrxNode } from './nodes/bucket.trx_node';
|
|
@@ -18,7 +19,7 @@ export type TrxNodeStatus = {
|
|
|
18
19
|
action?: string;
|
|
19
20
|
input?: Record<string, any>;
|
|
20
21
|
output?: Record<string, any>;
|
|
21
|
-
error?:
|
|
22
|
+
error?: NesoiError.BaseError;
|
|
22
23
|
nodes: TrxNodeStatus[];
|
|
23
24
|
app: number;
|
|
24
25
|
};
|
|
@@ -47,7 +48,7 @@ export declare class TrxNode<Space extends $Space, M extends $Module, Authn exte
|
|
|
47
48
|
} | undefined, id?: string);
|
|
48
49
|
static open(node: AnyTrxNode, action: string, input: Record<string, any>): Promise<void>;
|
|
49
50
|
static ok(node: AnyTrxNode, output?: Record<string, any>): Promise<void>;
|
|
50
|
-
static error(node: AnyTrxNode, error: any): Promise<
|
|
51
|
+
static error(node: AnyTrxNode, error: any): Promise<any>;
|
|
51
52
|
message<Raw extends M['#input']['#raw'], Msg extends $Message = M['messages'][Raw['$'] & keyof M['messages']]>(raw: Raw): Promise<M['#input']['#parsed']>;
|
|
52
53
|
value<K extends keyof M['constants']['values']>(key: K): M["constants"]["values"][K]["value"];
|
|
53
54
|
enum<EnumName extends KeysOfUnion<Space['modules'][keyof Space['modules']]['constants']['enums']>>(name: EnumName): Enum<M['constants']['enums'][EnumName]>;
|
|
@@ -57,6 +58,7 @@ export declare class TrxNode<Space extends $Space, M extends $Module, Authn exte
|
|
|
57
58
|
resource<Name extends keyof M['resources'], Resource extends M['resources'][Name]>(name: Name): ResourceTrxNode<M, Resource>;
|
|
58
59
|
machine<Name extends keyof M['machines'], Machine extends M['machines'][Name]>(name: Name): MachineTrxNode<M, Machine>;
|
|
59
60
|
queue<Name extends keyof M['queues'], Queue extends M['queues'][Name]>(name: Name): QueueTrxNode<M, Queue>;
|
|
61
|
+
authenticate(authnRequest: AuthnRequest<keyof Authn>): Promise<TrxNode<$Space, $Module, Authn>>;
|
|
60
62
|
token<U extends keyof Authn & keyof M['#authn']>(provider: U): M['#authn'][U];
|
|
61
63
|
user<U extends keyof Authn & keyof M['#authn']>(provider: U): M['#authn'][U];
|
|
62
64
|
virtual<T>(def: VirtualModuleDef, fn: ($: AnyTrxNode) => T | Promise<T>): Promise<T>;
|
|
@@ -51,8 +51,15 @@ class TrxNode {
|
|
|
51
51
|
}
|
|
52
52
|
static async error(node, error) {
|
|
53
53
|
node.state = 'error';
|
|
54
|
-
|
|
54
|
+
if (error instanceof error_1.NesoiError.BaseError) {
|
|
55
|
+
error.message = i18n_1.i18n.error(error, node.trx.root.module.daemon);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
error = new error_1.NesoiError.BaseError('UnknownError', error.toString());
|
|
59
|
+
}
|
|
60
|
+
node.error = error;
|
|
55
61
|
node.time.end = datetime_1.NesoiDatetime.now();
|
|
62
|
+
return error;
|
|
56
63
|
}
|
|
57
64
|
// Entities
|
|
58
65
|
async message(raw) {
|
|
@@ -121,6 +128,11 @@ class TrxNode {
|
|
|
121
128
|
return new queue_trx_node_1.QueueTrxNode(this, queue);
|
|
122
129
|
}
|
|
123
130
|
// Authentication
|
|
131
|
+
async authenticate(authnRequest) {
|
|
132
|
+
const newNode = new TrxNode(this.scope, this.trx, this, this.module, this.authn);
|
|
133
|
+
await this.trx.engine.authenticate(newNode, authnRequest);
|
|
134
|
+
return newNode;
|
|
135
|
+
}
|
|
124
136
|
token(provider) {
|
|
125
137
|
if (!this.authn?.tokens) {
|
|
126
138
|
throw error_1.NesoiError.Authn.NoUsersAuthenticatedForTrxNode(this.globalId);
|
package/lib/engine/tree.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ModuleTree = void 0;
|
|
4
|
+
const dependency_1 = require("./dependency");
|
|
4
5
|
const error_1 = require("../compiler/error");
|
|
5
6
|
const log_1 = require("./util/log");
|
|
6
7
|
const string_1 = require("./util/string");
|
|
@@ -253,23 +254,11 @@ class ModuleTree {
|
|
|
253
254
|
*/
|
|
254
255
|
getSchema(node) {
|
|
255
256
|
const mod = this.modules[node.module];
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
return mod.schema.buckets[node.name];
|
|
262
|
-
if (node.type === 'message')
|
|
263
|
-
return mod.schema.messages[node.name];
|
|
264
|
-
if (node.type === 'job')
|
|
265
|
-
return mod.schema.jobs[node.name];
|
|
266
|
-
if (node.type === 'resource')
|
|
267
|
-
return mod.schema.resources[node.name];
|
|
268
|
-
if (node.type === 'machine')
|
|
269
|
-
return mod.schema.machines[node.name];
|
|
270
|
-
if (node.type === 'controller')
|
|
271
|
-
return mod.schema.controllers[node.name];
|
|
272
|
-
throw error_1.CompilerError.UnmetDependency('tree', node.name);
|
|
257
|
+
const schema = dependency_1.$Dependency.resolve(mod.schema, node);
|
|
258
|
+
if (!schema) {
|
|
259
|
+
throw error_1.CompilerError.UnmetDependency('tree', node.name);
|
|
260
|
+
}
|
|
261
|
+
return schema;
|
|
273
262
|
}
|
|
274
263
|
/**
|
|
275
264
|
* Return a list of all nodes of all modules on the tree.
|
package/lib/schema.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export type $Module = {
|
|
|
44
44
|
};
|
|
45
45
|
'#input': $Message;
|
|
46
46
|
'#authn': AnyUsers;
|
|
47
|
-
'#
|
|
47
|
+
'#services': Record<string, any>;
|
|
48
48
|
};
|
|
49
49
|
export type ModuleName<$ extends $Space> = keyof $['modules'];
|
|
50
50
|
export type MessageName<$ extends $Module> = keyof $['messages'];
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nesoi",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.10",
|
|
4
4
|
"description": "Declarative framework for data-driven applications",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/nesoi-org/nesoi.git"
|
|
8
8
|
},
|
|
9
9
|
"keywords": [
|
|
10
|
-
"nesoi"
|
|
11
|
-
"postgresql"
|
|
10
|
+
"nesoi"
|
|
12
11
|
],
|
|
13
12
|
"author": "Hugo Aboud",
|
|
14
13
|
"license": "MIT",
|
package/tools/joaquin/job.js
CHANGED
|
@@ -34,8 +34,8 @@ function expectJob(def) {
|
|
|
34
34
|
try {
|
|
35
35
|
const status = await promise;
|
|
36
36
|
expect(status.state).toEqual('error');
|
|
37
|
-
expect(status.error)
|
|
38
|
-
.
|
|
37
|
+
expect(status.error?.name)
|
|
38
|
+
.toEqual(errorObj.name);
|
|
39
39
|
}
|
|
40
40
|
catch (e) {
|
|
41
41
|
expect(e.toString())
|
package/tools/joaquin/message.js
CHANGED
|
@@ -33,8 +33,8 @@ function expectMessage(def) {
|
|
|
33
33
|
const status = await promise;
|
|
34
34
|
status.forEach(st => {
|
|
35
35
|
expect(st.state).toEqual('error');
|
|
36
|
-
expect(st.error)
|
|
37
|
-
.
|
|
36
|
+
expect(st.error?.name)
|
|
37
|
+
.toEqual(errorObj.name);
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
catch (e) {
|
package/tools/joaquin/mock.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { $Bucket, $Message, $Module, $Space } from "../../
|
|
2
|
-
import { Daemon } from "../../
|
|
3
|
-
import { NesoiDate } from "../../
|
|
4
|
-
import { NesoiDatetime } from "../../
|
|
5
|
-
import { NesoiDecimal } from "../../
|
|
6
|
-
import { DeepPartial } from "../../
|
|
1
|
+
import { $Bucket, $Message, $Module, $Space } from "../../lib/elements";
|
|
2
|
+
import { Daemon } from "../../lib/engine/daemon";
|
|
3
|
+
import { NesoiDate } from "../../lib/engine/data/date";
|
|
4
|
+
import { NesoiDatetime } from "../../lib/engine/data/datetime";
|
|
5
|
+
import { NesoiDecimal } from "../../lib/engine/data/decimal";
|
|
6
|
+
import { DeepPartial } from "../../lib/engine/util/deep";
|
|
7
7
|
export declare class BucketMockObj<$ extends $Bucket, T> {
|
|
8
8
|
private module;
|
|
9
9
|
private bucketName;
|