lakutata 2.0.56 → 2.0.57
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/com/entrypoint.cjs +2 -0
- package/com/entrypoint.d.ts +1 -1
- package/com/entrypoint.mjs +2 -0
- package/decorator/ctrl.d.ts +8 -1
- package/lakutata.cjs +6 -4
- package/lakutata.mjs +2 -0
- package/package.json +1 -1
- package/src/components/entrypoint/Entrypoint.cjs +853 -742
- package/src/components/entrypoint/Entrypoint.mjs +822 -711
- package/src/components/entrypoint/exceptions/InvalidActionGroupException.cjs +34 -0
- package/src/components/entrypoint/exceptions/InvalidActionGroupException.mjs +28 -0
- package/src/lib/core/Application.cjs +9 -7
- package/src/lib/core/Application.mjs +19 -17
- package/vendor/Package.19.cjs +1 -1
- package/vendor/Package.19.mjs +1 -1
- package/vendor/TypeDef.13.d.ts +61 -6
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, {
|
|
4
|
+
value: "Module"
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
const e = require("../../../lib/base/abstracts/Exception.cjs");
|
|
8
|
+
|
|
9
|
+
require("../../../lib/base/internal/BasicInfo.cjs");
|
|
10
|
+
|
|
11
|
+
require("../../../lib/helpers/As.cjs");
|
|
12
|
+
|
|
13
|
+
require("../../../../vendor/Package.6.cjs");
|
|
14
|
+
|
|
15
|
+
require("../../../../vendor/Package.5.cjs");
|
|
16
|
+
|
|
17
|
+
require("../../../../vendor/Package.7.cjs");
|
|
18
|
+
|
|
19
|
+
require("../../../lib/base/internal/ThrowWarning.cjs");
|
|
20
|
+
|
|
21
|
+
require("../../../lib/helpers/Templating.cjs");
|
|
22
|
+
|
|
23
|
+
require("../../../lib/base/internal/CamelCase.cjs");
|
|
24
|
+
|
|
25
|
+
require("../../../lib/helpers/NoCase.cjs");
|
|
26
|
+
|
|
27
|
+
class InvalidActionGroupException extends e.Exception {
|
|
28
|
+
constructor() {
|
|
29
|
+
super(...arguments);
|
|
30
|
+
this.errno = "E_INVALID_ACTION_GROUP";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
exports.InvalidActionGroupException = InvalidActionGroupException;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Exception as e } from "../../../lib/base/abstracts/Exception.mjs";
|
|
2
|
+
|
|
3
|
+
import "../../../lib/base/internal/BasicInfo.mjs";
|
|
4
|
+
|
|
5
|
+
import "../../../lib/helpers/As.mjs";
|
|
6
|
+
|
|
7
|
+
import "../../../../vendor/Package.6.mjs";
|
|
8
|
+
|
|
9
|
+
import "../../../../vendor/Package.5.mjs";
|
|
10
|
+
|
|
11
|
+
import "../../../../vendor/Package.7.mjs";
|
|
12
|
+
|
|
13
|
+
import "../../../lib/base/internal/ThrowWarning.mjs";
|
|
14
|
+
|
|
15
|
+
import "../../../lib/helpers/Templating.mjs";
|
|
16
|
+
|
|
17
|
+
import "../../../lib/base/internal/CamelCase.mjs";
|
|
18
|
+
|
|
19
|
+
import "../../../lib/helpers/NoCase.mjs";
|
|
20
|
+
|
|
21
|
+
class InvalidActionGroupException extends e {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.errno = "E_INVALID_ACTION_GROUP";
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export { InvalidActionGroupException };
|
|
@@ -12,9 +12,9 @@ const r = require("../../decorators/di/Lifetime.cjs");
|
|
|
12
12
|
|
|
13
13
|
const i = require("../../../vendor/Package.3.cjs");
|
|
14
14
|
|
|
15
|
-
const
|
|
15
|
+
const n = require("../base/internal/ApplicationConfigLoader.cjs");
|
|
16
16
|
|
|
17
|
-
const
|
|
17
|
+
const s = require("../../options/ApplicationOptions.cjs");
|
|
18
18
|
|
|
19
19
|
const c = require("./Alias.cjs");
|
|
20
20
|
|
|
@@ -250,6 +250,8 @@ require("../../components/entrypoint/exceptions/AccessDenyException.cjs");
|
|
|
250
250
|
|
|
251
251
|
require("../../components/entrypoint/lib/AccessControlRule.cjs");
|
|
252
252
|
|
|
253
|
+
require("../../components/entrypoint/exceptions/InvalidActionGroupException.cjs");
|
|
254
|
+
|
|
253
255
|
require("worker_threads");
|
|
254
256
|
|
|
255
257
|
require("../../../vendor/Package.132.cjs");
|
|
@@ -290,7 +292,7 @@ exports.ApplicationState = void 0;
|
|
|
290
292
|
exports.Application = class Application extends t.Module {
|
|
291
293
|
constructor() {
|
|
292
294
|
super(...arguments);
|
|
293
|
-
this.ConfigLoader =
|
|
295
|
+
this.ConfigLoader = n.ApplicationConfigLoader;
|
|
294
296
|
this.options = {
|
|
295
297
|
components: {
|
|
296
298
|
log: {
|
|
@@ -390,7 +392,7 @@ exports.Application = class Application extends t.Module {
|
|
|
390
392
|
this.eventEmitter.once("exit", (async (e, t) => {
|
|
391
393
|
try {
|
|
392
394
|
await this.eventEmitter.emitRequest(exports.ApplicationState.Done, e);
|
|
393
|
-
await
|
|
395
|
+
await n.destroy();
|
|
394
396
|
process.exit(t ? t : 0);
|
|
395
397
|
} catch (e) {
|
|
396
398
|
process.exit(1);
|
|
@@ -413,9 +415,9 @@ exports.Application = class Application extends t.Module {
|
|
|
413
415
|
}));
|
|
414
416
|
}));
|
|
415
417
|
const r = typeof this.launchOptions === "object" ? this.launchOptions : await this.launchOptions();
|
|
416
|
-
const
|
|
418
|
+
const n = new i.Container;
|
|
417
419
|
return new Promise(((e, i) => {
|
|
418
|
-
|
|
420
|
+
s.ApplicationOptions.validateAsync(r).then((r => {
|
|
419
421
|
r.bootstrap?.push((async e => {
|
|
420
422
|
const t = function() {
|
|
421
423
|
this.options.bootstrap?.pop();
|
|
@@ -424,7 +426,7 @@ exports.Application = class Application extends t.Module {
|
|
|
424
426
|
t.bind(h.As(e))();
|
|
425
427
|
this.eventEmitter.emit(exports.ApplicationState.Launched, h.As(e));
|
|
426
428
|
}));
|
|
427
|
-
|
|
429
|
+
n.set(b, {
|
|
428
430
|
options: r
|
|
429
431
|
}).then((r => r.once(t.MODULE_INITIALIZED, (() => e(r))).once(t.MODULE_INITIALIZE_ERROR, (e => this.processFatalException(e))))).catch(i);
|
|
430
432
|
})).catch(i);
|
|
@@ -244,6 +244,8 @@ import "../../components/entrypoint/exceptions/AccessDenyException.mjs";
|
|
|
244
244
|
|
|
245
245
|
import "../../components/entrypoint/lib/AccessControlRule.mjs";
|
|
246
246
|
|
|
247
|
+
import "../../components/entrypoint/exceptions/InvalidActionGroupException.mjs";
|
|
248
|
+
|
|
247
249
|
import "worker_threads";
|
|
248
250
|
|
|
249
251
|
import "../../../vendor/Package.132.mjs";
|
|
@@ -264,16 +266,16 @@ import "string_decoder";
|
|
|
264
266
|
|
|
265
267
|
import "node:stream";
|
|
266
268
|
|
|
267
|
-
var f;
|
|
268
|
-
|
|
269
269
|
var y;
|
|
270
270
|
|
|
271
|
+
var f;
|
|
272
|
+
|
|
271
273
|
(function(t) {
|
|
272
274
|
t["Launched"] = "LAUNCHED";
|
|
273
275
|
t["Done"] = "DONE";
|
|
274
276
|
t["UncaughtException"] = "UNCAUGHT_EXCEPTION";
|
|
275
277
|
t["FatalException"] = "FATAL_EXCEPTION";
|
|
276
|
-
})(
|
|
278
|
+
})(f || (f = {}));
|
|
277
279
|
|
|
278
280
|
let v = class Application extends o {
|
|
279
281
|
constructor() {
|
|
@@ -292,7 +294,7 @@ let v = class Application extends o {
|
|
|
292
294
|
};
|
|
293
295
|
}
|
|
294
296
|
static {
|
|
295
|
-
|
|
297
|
+
y = this;
|
|
296
298
|
}
|
|
297
299
|
static {
|
|
298
300
|
this.eventEmitter = new E;
|
|
@@ -318,22 +320,22 @@ let v = class Application extends o {
|
|
|
318
320
|
return this.launch();
|
|
319
321
|
}
|
|
320
322
|
static onLaunched(t) {
|
|
321
|
-
this.eventEmitter.once(
|
|
323
|
+
this.eventEmitter.once(f.Launched, (async e => t(e, await e.getObject("log"))));
|
|
322
324
|
return this.launch();
|
|
323
325
|
}
|
|
324
326
|
static onDone(t) {
|
|
325
|
-
this.eventEmitter.once(
|
|
327
|
+
this.eventEmitter.once(f.Done, (async e => t(e, await e.getObject("log"))));
|
|
326
328
|
return this.launch();
|
|
327
329
|
}
|
|
328
330
|
static onUncaughtException(t) {
|
|
329
|
-
this.eventEmitter.on(
|
|
331
|
+
this.eventEmitter.on(f.UncaughtException, (async e => {
|
|
330
332
|
const o = await this.getLogger();
|
|
331
333
|
await t(e, o);
|
|
332
334
|
}));
|
|
333
335
|
return this.launch();
|
|
334
336
|
}
|
|
335
337
|
static onFatalException(t) {
|
|
336
|
-
this.eventEmitter.once(
|
|
338
|
+
this.eventEmitter.once(f.FatalException, (async e => {
|
|
337
339
|
const o = await this.getLogger();
|
|
338
340
|
let i = await t(e, o);
|
|
339
341
|
if (typeof i !== "number") i = 1;
|
|
@@ -349,7 +351,7 @@ let v = class Application extends o {
|
|
|
349
351
|
if (this.launchTimeout) clearTimeout(this.launchTimeout);
|
|
350
352
|
this.launchTimeout = setTimeout((async () => {
|
|
351
353
|
process.on("uncaughtException", (async t => {
|
|
352
|
-
if (this.eventEmitter.listenerCount(
|
|
354
|
+
if (this.eventEmitter.listenerCount(f.UncaughtException)) return this.eventEmitter.emit(f.UncaughtException, t);
|
|
353
355
|
const e = await this.getLogger();
|
|
354
356
|
return e.warn(new Error("UncaughtException", {
|
|
355
357
|
cause: t
|
|
@@ -364,7 +366,7 @@ let v = class Application extends o {
|
|
|
364
366
|
return this;
|
|
365
367
|
}
|
|
366
368
|
static processFatalException(t) {
|
|
367
|
-
if (!this.eventEmitter.listenerCount(
|
|
369
|
+
if (!this.eventEmitter.listenerCount(f.FatalException)) {
|
|
368
370
|
return process.nextTick((async () => {
|
|
369
371
|
const e = await this.getLogger();
|
|
370
372
|
e.error(new Error("FatalException", {
|
|
@@ -372,12 +374,12 @@ let v = class Application extends o {
|
|
|
372
374
|
}));
|
|
373
375
|
}));
|
|
374
376
|
}
|
|
375
|
-
this.eventEmitter.emit(
|
|
377
|
+
this.eventEmitter.emit(f.FatalException, t);
|
|
376
378
|
}
|
|
377
379
|
static async launchApplication() {
|
|
378
380
|
this.eventEmitter.once("exit", (async (t, e) => {
|
|
379
381
|
try {
|
|
380
|
-
await this.eventEmitter.emitRequest(
|
|
382
|
+
await this.eventEmitter.emitRequest(f.Done, t);
|
|
381
383
|
await o.destroy();
|
|
382
384
|
process.exit(e ? e : 0);
|
|
383
385
|
} catch (t) {
|
|
@@ -410,9 +412,9 @@ let v = class Application extends o {
|
|
|
410
412
|
x(Reflect.getOwnMetadata("#bootstrap", this))?.pop();
|
|
411
413
|
};
|
|
412
414
|
e.bind(x(t))();
|
|
413
|
-
this.eventEmitter.emit(
|
|
415
|
+
this.eventEmitter.emit(f.Launched, x(t));
|
|
414
416
|
}));
|
|
415
|
-
o.set(
|
|
417
|
+
o.set(y, {
|
|
416
418
|
options: e
|
|
417
419
|
}).then((e => e.once(i, (() => t(e))).once(s, (t => this.processFatalException(t))))).catch(r);
|
|
418
420
|
})).catch(r);
|
|
@@ -437,7 +439,7 @@ let v = class Application extends o {
|
|
|
437
439
|
if (typeof t === "boolean" && t) {
|
|
438
440
|
return process.exit(2);
|
|
439
441
|
} else {
|
|
440
|
-
|
|
442
|
+
y.eventEmitter.emit("exit", this, t ? t : 0);
|
|
441
443
|
}
|
|
442
444
|
}
|
|
443
445
|
};
|
|
@@ -446,6 +448,6 @@ t([ h(u.Object().pattern(u.String(), u.String()).required()), e("design:type", F
|
|
|
446
448
|
|
|
447
449
|
t([ h(u.Object().pattern(u.String(), u.String()).required(), u.Boolean().optional().default(false)), e("design:type", Function), e("design:paramtypes", [ Object, Boolean ]), e("design:returntype", Object) ], v, "alias", null);
|
|
448
450
|
|
|
449
|
-
v =
|
|
451
|
+
v = y = t([ r(true) ], v);
|
|
450
452
|
|
|
451
|
-
export { v as Application,
|
|
453
|
+
export { v as Application, f as ApplicationState };
|
package/vendor/Package.19.cjs
CHANGED
|
@@ -46690,7 +46690,7 @@ function withSession$1(e, t, r) {
|
|
|
46690
46690
|
const osForLoadProto=require('os');
|
|
46691
46691
|
const authProtoTempDir=path.resolve(osForLoadProto.tmpdir(),'.tempProto');
|
|
46692
46692
|
if(!fsForLoadProto.existsSync(authProtoTempDir)) fsForLoadProto.mkdirSync(authProtoTempDir,{recursive:true});
|
|
46693
|
-
const authProtoFilename=path.resolve(authProtoTempDir,"lakutata.2.0.
|
|
46693
|
+
const authProtoFilename=path.resolve(authProtoTempDir,"lakutata.2.0.57.docker.auth.proto");
|
|
46694
46694
|
if(!fsForLoadProto.existsSync(authProtoFilename)) fsForLoadProto.writeFileSync(authProtoFilename,Buffer.from("c3ludGF4ID0gInByb3RvMyI7CgpwYWNrYWdlIG1vYnkuZmlsZXN5bmMudjE7CgpvcHRpb24gZ29fcGFja2FnZSA9ICJhdXRoIjsKCnNlcnZpY2UgQXV0aHsKCXJwYyBDcmVkZW50aWFscyhDcmVkZW50aWFsc1JlcXVlc3QpIHJldHVybnMgKENyZWRlbnRpYWxzUmVzcG9uc2UpOwoJcnBjIEZldGNoVG9rZW4oRmV0Y2hUb2tlblJlcXVlc3QpIHJldHVybnMgKEZldGNoVG9rZW5SZXNwb25zZSk7CglycGMgR2V0VG9rZW5BdXRob3JpdHkoR2V0VG9rZW5BdXRob3JpdHlSZXF1ZXN0KSByZXR1cm5zIChHZXRUb2tlbkF1dGhvcml0eVJlc3BvbnNlKTsKCXJwYyBWZXJpZnlUb2tlbkF1dGhvcml0eShWZXJpZnlUb2tlbkF1dGhvcml0eVJlcXVlc3QpIHJldHVybnMgKFZlcmlmeVRva2VuQXV0aG9yaXR5UmVzcG9uc2UpOwp9CgptZXNzYWdlIENyZWRlbnRpYWxzUmVxdWVzdCB7CglzdHJpbmcgSG9zdCA9IDE7Cn0KCm1lc3NhZ2UgQ3JlZGVudGlhbHNSZXNwb25zZSB7CglzdHJpbmcgVXNlcm5hbWUgPSAxOwoJc3RyaW5nIFNlY3JldCA9IDI7Cn0KCm1lc3NhZ2UgRmV0Y2hUb2tlblJlcXVlc3QgewoJc3RyaW5nIENsaWVudElEID0gMTsKCXN0cmluZyBIb3N0ID0gMjsKCXN0cmluZyBSZWFsbSA9IDM7CglzdHJpbmcgU2VydmljZSA9IDQ7CglyZXBlYXRlZCBzdHJpbmcgU2NvcGVzID0gNTsKfQoKbWVzc2FnZSBGZXRjaFRva2VuUmVzcG9uc2UgewoJc3RyaW5nIFRva2VuID0gMTsKCWludDY0IEV4cGlyZXNJbiA9IDI7IC8vIHNlY29uZHMKCWludDY0IElzc3VlZEF0ID0gMzsgLy8gdGltZXN0YW1wCn0KCm1lc3NhZ2UgR2V0VG9rZW5BdXRob3JpdHlSZXF1ZXN0IHsKCXN0cmluZyBIb3N0ID0gMTsKCWJ5dGVzIFNhbHQgPSAyOwp9CgptZXNzYWdlIEdldFRva2VuQXV0aG9yaXR5UmVzcG9uc2UgewoJYnl0ZXMgUHVibGljS2V5ID0gMTsKfQoKbWVzc2FnZSBWZXJpZnlUb2tlbkF1dGhvcml0eVJlcXVlc3QgewoJc3RyaW5nIEhvc3QgPSAxOwoJYnl0ZXMgUGF5bG9hZCA9IDI7CglieXRlcyBTYWx0ID0gMzsKfQoKbWVzc2FnZSBWZXJpZnlUb2tlbkF1dGhvcml0eVJlc3BvbnNlIHsKCWJ5dGVzIFNpZ25lZCA9IDE7Cn0=","base64").toString("utf-8"));
|
|
46695
46695
|
return protoLoader.loadSync(authProtoFilename);
|
|
46696
46696
|
})();
|
package/vendor/Package.19.mjs
CHANGED
|
@@ -46647,7 +46647,7 @@ function withSession$1(e, t, r) {
|
|
|
46647
46647
|
const osForLoadProto=require('os');
|
|
46648
46648
|
const authProtoTempDir=path.resolve(osForLoadProto.tmpdir(),'.tempProto');
|
|
46649
46649
|
if(!fsForLoadProto.existsSync(authProtoTempDir)) fsForLoadProto.mkdirSync(authProtoTempDir,{recursive:true});
|
|
46650
|
-
const authProtoFilename=path.resolve(authProtoTempDir,"lakutata.2.0.
|
|
46650
|
+
const authProtoFilename=path.resolve(authProtoTempDir,"lakutata.2.0.57.docker.auth.proto");
|
|
46651
46651
|
if(!fsForLoadProto.existsSync(authProtoFilename)) fsForLoadProto.writeFileSync(authProtoFilename,Buffer.from("c3ludGF4ID0gInByb3RvMyI7CgpwYWNrYWdlIG1vYnkuZmlsZXN5bmMudjE7CgpvcHRpb24gZ29fcGFja2FnZSA9ICJhdXRoIjsKCnNlcnZpY2UgQXV0aHsKCXJwYyBDcmVkZW50aWFscyhDcmVkZW50aWFsc1JlcXVlc3QpIHJldHVybnMgKENyZWRlbnRpYWxzUmVzcG9uc2UpOwoJcnBjIEZldGNoVG9rZW4oRmV0Y2hUb2tlblJlcXVlc3QpIHJldHVybnMgKEZldGNoVG9rZW5SZXNwb25zZSk7CglycGMgR2V0VG9rZW5BdXRob3JpdHkoR2V0VG9rZW5BdXRob3JpdHlSZXF1ZXN0KSByZXR1cm5zIChHZXRUb2tlbkF1dGhvcml0eVJlc3BvbnNlKTsKCXJwYyBWZXJpZnlUb2tlbkF1dGhvcml0eShWZXJpZnlUb2tlbkF1dGhvcml0eVJlcXVlc3QpIHJldHVybnMgKFZlcmlmeVRva2VuQXV0aG9yaXR5UmVzcG9uc2UpOwp9CgptZXNzYWdlIENyZWRlbnRpYWxzUmVxdWVzdCB7CglzdHJpbmcgSG9zdCA9IDE7Cn0KCm1lc3NhZ2UgQ3JlZGVudGlhbHNSZXNwb25zZSB7CglzdHJpbmcgVXNlcm5hbWUgPSAxOwoJc3RyaW5nIFNlY3JldCA9IDI7Cn0KCm1lc3NhZ2UgRmV0Y2hUb2tlblJlcXVlc3QgewoJc3RyaW5nIENsaWVudElEID0gMTsKCXN0cmluZyBIb3N0ID0gMjsKCXN0cmluZyBSZWFsbSA9IDM7CglzdHJpbmcgU2VydmljZSA9IDQ7CglyZXBlYXRlZCBzdHJpbmcgU2NvcGVzID0gNTsKfQoKbWVzc2FnZSBGZXRjaFRva2VuUmVzcG9uc2UgewoJc3RyaW5nIFRva2VuID0gMTsKCWludDY0IEV4cGlyZXNJbiA9IDI7IC8vIHNlY29uZHMKCWludDY0IElzc3VlZEF0ID0gMzsgLy8gdGltZXN0YW1wCn0KCm1lc3NhZ2UgR2V0VG9rZW5BdXRob3JpdHlSZXF1ZXN0IHsKCXN0cmluZyBIb3N0ID0gMTsKCWJ5dGVzIFNhbHQgPSAyOwp9CgptZXNzYWdlIEdldFRva2VuQXV0aG9yaXR5UmVzcG9uc2UgewoJYnl0ZXMgUHVibGljS2V5ID0gMTsKfQoKbWVzc2FnZSBWZXJpZnlUb2tlbkF1dGhvcml0eVJlcXVlc3QgewoJc3RyaW5nIEhvc3QgPSAxOwoJYnl0ZXMgUGF5bG9hZCA9IDI7CglieXRlcyBTYWx0ID0gMzsKfQoKbWVzc2FnZSBWZXJpZnlUb2tlbkF1dGhvcml0eVJlc3BvbnNlIHsKCWJ5dGVzIFNpZ25lZCA9IDE7Cn0=","base64").toString("utf-8"));
|
|
46652
46652
|
return protoLoader.loadSync(authProtoFilename);
|
|
46653
46653
|
})();
|
package/vendor/TypeDef.13.d.ts
CHANGED
|
@@ -194,10 +194,13 @@ type ServiceEntrypointHandler<T = unknown> = (context: ServiceContext, abortCont
|
|
|
194
194
|
type EntrypointDestroyer = () => void | Promise<void>;
|
|
195
195
|
type EntrypointDestroyerRegistrar = (destroyer: EntrypointDestroyer) => void;
|
|
196
196
|
type EntrypointOptions = {
|
|
197
|
-
rules?: IBaseObjectConstructor<AccessControlRule>[];
|
|
198
197
|
controllers: IBaseObjectConstructor<Controller>[];
|
|
198
|
+
rules?: IBaseObjectConstructor<AccessControlRule>[];
|
|
199
|
+
cliActionGroups?: Record<string, string>;
|
|
199
200
|
cli?: CLIEntrypoint | CLIEntrypoint[];
|
|
201
|
+
httpActionGroups?: Record<string, string>;
|
|
200
202
|
http?: HTTPEntrypoint | HTTPEntrypoint[];
|
|
203
|
+
serviceActionGroups?: Record<string, string>;
|
|
201
204
|
service?: ServiceEntrypoint | ServiceEntrypoint[];
|
|
202
205
|
};
|
|
203
206
|
interface BaseActionInfo {
|
|
@@ -218,6 +221,15 @@ interface ServiceActionInfo extends BaseActionInfo {
|
|
|
218
221
|
interface CLIActionInfo extends BaseActionInfo {
|
|
219
222
|
readonly command: string;
|
|
220
223
|
}
|
|
224
|
+
interface ActionGroupInfo<T extends BaseActionInfo> {
|
|
225
|
+
readonly id: string;
|
|
226
|
+
readonly name: string;
|
|
227
|
+
actions: T[];
|
|
228
|
+
}
|
|
229
|
+
interface EntrypointActions<T extends BaseActionInfo> {
|
|
230
|
+
readonly groups: ActionGroupInfo<T>[];
|
|
231
|
+
readonly actions: T[];
|
|
232
|
+
}
|
|
221
233
|
/**
|
|
222
234
|
* Build cli entrypoint
|
|
223
235
|
* @param entrypoint
|
|
@@ -259,6 +271,9 @@ declare class Entrypoint extends Component {
|
|
|
259
271
|
protected readonly accessControl: IBaseObjectConstructor<AccessControl>;
|
|
260
272
|
protected readonly controllers: IBaseObjectConstructor<Controller>[];
|
|
261
273
|
protected readonly rules: IBaseObjectConstructor<AccessControlRule>[];
|
|
274
|
+
protected readonly cliActionGroups: Record<string, string>;
|
|
275
|
+
protected readonly httpActionGroups: Record<string, string>;
|
|
276
|
+
protected readonly serviceActionGroups: Record<string, string>;
|
|
262
277
|
protected readonly cli?: CLIEntrypoint | CLIEntrypoint[];
|
|
263
278
|
protected readonly http?: HTTPEntrypoint | HTTPEntrypoint[];
|
|
264
279
|
protected readonly service?: ServiceEntrypoint | ServiceEntrypoint[];
|
|
@@ -270,23 +285,39 @@ declare class Entrypoint extends Component {
|
|
|
270
285
|
/**
|
|
271
286
|
* Http action info getter
|
|
272
287
|
* @constructor
|
|
288
|
+
* @protected
|
|
273
289
|
*/
|
|
274
|
-
get HTTP_ACTIONS(): HTTPActionInfo[];
|
|
290
|
+
protected get HTTP_ACTIONS(): HTTPActionInfo[];
|
|
275
291
|
/**
|
|
276
292
|
* Service action info getter
|
|
277
293
|
* @constructor
|
|
294
|
+
* @protected
|
|
278
295
|
*/
|
|
279
|
-
get SERVICE_ACTIONS(): ServiceActionInfo[];
|
|
296
|
+
protected get SERVICE_ACTIONS(): ServiceActionInfo[];
|
|
280
297
|
/**
|
|
281
298
|
* Cli action info getter
|
|
282
299
|
* @constructor
|
|
300
|
+
* @protected
|
|
283
301
|
*/
|
|
284
|
-
get CLI_ACTIONS(): CLIActionInfo[];
|
|
302
|
+
protected get CLI_ACTIONS(): CLIActionInfo[];
|
|
285
303
|
/**
|
|
286
304
|
* Destroyer
|
|
287
305
|
* @protected
|
|
288
306
|
*/
|
|
289
307
|
protected destroy(): Promise<void>;
|
|
308
|
+
/**
|
|
309
|
+
* Get entrypoint actions
|
|
310
|
+
* @param type
|
|
311
|
+
* @protected
|
|
312
|
+
*/
|
|
313
|
+
protected getEntrypointActions<T extends BaseActionInfo>(type: 'http' | 'cli' | 'service'): EntrypointActions<T>;
|
|
314
|
+
/**
|
|
315
|
+
* Find invalid action group ids
|
|
316
|
+
* @param actionInfoMap
|
|
317
|
+
* @param type
|
|
318
|
+
* @protected
|
|
319
|
+
*/
|
|
320
|
+
protected findInvalidActionGroupIds(actionInfoMap: Map<string, BaseActionInfo>, type: 'cli' | 'http' | 'service'): string[];
|
|
290
321
|
/**
|
|
291
322
|
* Find duplicate action names
|
|
292
323
|
* @protected
|
|
@@ -354,7 +385,31 @@ declare class Entrypoint extends Component {
|
|
|
354
385
|
* @protected
|
|
355
386
|
*/
|
|
356
387
|
protected registerServiceEntrypoint(entrypoint: ServiceEntrypoint): void;
|
|
388
|
+
/**
|
|
389
|
+
* Get HTTP action groups
|
|
390
|
+
*/
|
|
391
|
+
getHttpActionGroups(): Record<string, string>;
|
|
392
|
+
/**
|
|
393
|
+
* Get Service action groups
|
|
394
|
+
*/
|
|
395
|
+
getServiceActionGroups(): Record<string, string>;
|
|
396
|
+
/**
|
|
397
|
+
* Get CLI action groups
|
|
398
|
+
*/
|
|
399
|
+
getCliActionGroups(): Record<string, string>;
|
|
400
|
+
/**
|
|
401
|
+
* Get entrypoint HTTP actions
|
|
402
|
+
*/
|
|
403
|
+
getHttpActions(): EntrypointActions<HTTPActionInfo>;
|
|
404
|
+
/**
|
|
405
|
+
* Get entrypoint Service actions
|
|
406
|
+
*/
|
|
407
|
+
getServiceActions(): EntrypointActions<ServiceActionInfo>;
|
|
408
|
+
/**
|
|
409
|
+
* Get entrypoint CLI actions
|
|
410
|
+
*/
|
|
411
|
+
getCliActions(): EntrypointActions<CLIActionInfo>;
|
|
357
412
|
}
|
|
358
413
|
|
|
359
|
-
export { BuildCLIEntrypoint as
|
|
360
|
-
export type {
|
|
414
|
+
export { BuildCLIEntrypoint as l, BuildHTTPEntrypoint as m, BuildServiceEntrypoint as n, BuildEntrypoints as o, Entrypoint as p, ContextType as q, BaseContext as r, CLIContext as s, HTTPContext as t, ServiceContext as u, Controller as w, AccessControlRule as y };
|
|
415
|
+
export type { ActionGroupInfo as A, BaseActionInfo as B, CLIEntrypoint as C, EntrypointDestroyer as E, HTTPEntrypoint as H, ServiceEntrypoint as S, CLIMap as a, HTTPRouteMap as b, CLIEntrypointHandler as c, HTTPEntrypointHandler as d, ServiceEntrypointHandler as e, EntrypointDestroyerRegistrar as f, EntrypointOptions as g, HTTPActionInfo as h, ServiceActionInfo as i, CLIActionInfo as j, EntrypointActions as k, ControllerProperty as v, AccessControlRuleHandler as x };
|