@venizia/ignis-boot 0.2.0-6 → 0.2.0-8
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/README.md +87 -158
- package/dist/cjs/cli.d.ts +3 -0
- package/dist/cjs/cli.d.ts.map +1 -0
- package/dist/cjs/cli.js +50 -0
- package/dist/cjs/cli.js.map +1 -0
- package/dist/cjs/generator/common/constants.d.ts +39 -0
- package/dist/cjs/generator/common/constants.d.ts.map +1 -0
- package/dist/cjs/generator/common/constants.js +76 -0
- package/dist/cjs/generator/common/constants.js.map +1 -0
- package/dist/{esm → cjs/generator}/common/index.d.ts +1 -1
- package/dist/cjs/generator/common/index.d.ts.map +1 -0
- package/dist/cjs/{common → generator/common}/index.js +1 -1
- package/dist/cjs/generator/common/index.js.map +1 -0
- package/dist/cjs/generator/common/types.d.ts +13 -0
- package/dist/cjs/generator/common/types.d.ts.map +1 -0
- package/dist/cjs/generator/common/types.js +3 -0
- package/dist/cjs/generator/common/types.js.map +1 -0
- package/dist/cjs/generator/emitter.d.ts +16 -0
- package/dist/cjs/generator/emitter.d.ts.map +1 -0
- package/dist/cjs/generator/emitter.js +53 -0
- package/dist/cjs/generator/emitter.js.map +1 -0
- package/dist/cjs/generator/index.d.ts +24 -0
- package/dist/cjs/generator/index.d.ts.map +1 -0
- package/dist/cjs/generator/index.js +55 -0
- package/dist/cjs/generator/index.js.map +1 -0
- package/dist/cjs/generator/scanner.d.ts +18 -0
- package/dist/cjs/generator/scanner.d.ts.map +1 -0
- package/dist/cjs/generator/scanner.js +173 -0
- package/dist/cjs/generator/scanner.js.map +1 -0
- package/dist/cjs/index.d.ts +1 -6
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/cli.d.ts +3 -0
- package/dist/esm/cli.d.ts.map +1 -0
- package/dist/esm/cli.js +48 -0
- package/dist/esm/cli.js.map +1 -0
- package/dist/esm/generator/common/constants.d.ts +39 -0
- package/dist/esm/generator/common/constants.d.ts.map +1 -0
- package/dist/esm/generator/common/constants.js +70 -0
- package/dist/esm/generator/common/constants.js.map +1 -0
- package/dist/{cjs → esm/generator}/common/index.d.ts +1 -1
- package/dist/esm/generator/common/index.d.ts.map +1 -0
- package/dist/esm/{common → generator/common}/index.js +1 -1
- package/dist/esm/generator/common/index.js.map +1 -0
- package/dist/esm/generator/common/types.d.ts +13 -0
- package/dist/esm/generator/common/types.d.ts.map +1 -0
- package/dist/esm/generator/common/types.js +2 -0
- package/dist/esm/generator/common/types.js.map +1 -0
- package/dist/esm/generator/emitter.d.ts +16 -0
- package/dist/esm/generator/emitter.d.ts.map +1 -0
- package/dist/esm/generator/emitter.js +49 -0
- package/dist/esm/generator/emitter.js.map +1 -0
- package/dist/esm/generator/index.d.ts +24 -0
- package/dist/esm/generator/index.d.ts.map +1 -0
- package/dist/esm/generator/index.js +36 -0
- package/dist/esm/generator/index.js.map +1 -0
- package/dist/esm/generator/scanner.d.ts +18 -0
- package/dist/esm/generator/scanner.d.ts.map +1 -0
- package/dist/esm/generator/scanner.js +166 -0
- package/dist/esm/generator/scanner.js.map +1 -0
- package/dist/esm/index.d.ts +1 -6
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -6
- package/dist/esm/index.js.map +1 -1
- package/package.json +26 -45
- package/dist/cjs/base/base-artifact-booter.d.ts +0 -18
- package/dist/cjs/base/base-artifact-booter.d.ts.map +0 -1
- package/dist/cjs/base/base-artifact-booter.js +0 -85
- package/dist/cjs/base/base-artifact-booter.js.map +0 -1
- package/dist/cjs/base/index.d.ts +0 -2
- package/dist/cjs/base/index.d.ts.map +0 -1
- package/dist/cjs/base/index.js +0 -18
- package/dist/cjs/base/index.js.map +0 -1
- package/dist/cjs/boot.mixin.d.ts +0 -65
- package/dist/cjs/boot.mixin.d.ts.map +0 -1
- package/dist/cjs/boot.mixin.js +0 -29
- package/dist/cjs/boot.mixin.js.map +0 -1
- package/dist/cjs/booters/controller.booter.d.ts +0 -10
- package/dist/cjs/booters/controller.booter.d.ts.map +0 -1
- package/dist/cjs/booters/controller.booter.js +0 -45
- package/dist/cjs/booters/controller.booter.js.map +0 -1
- package/dist/cjs/booters/datasource.booter.d.ts +0 -10
- package/dist/cjs/booters/datasource.booter.d.ts.map +0 -1
- package/dist/cjs/booters/datasource.booter.js +0 -45
- package/dist/cjs/booters/datasource.booter.js.map +0 -1
- package/dist/cjs/booters/index.d.ts +0 -5
- package/dist/cjs/booters/index.d.ts.map +0 -1
- package/dist/cjs/booters/index.js +0 -21
- package/dist/cjs/booters/index.js.map +0 -1
- package/dist/cjs/booters/repository.booter.d.ts +0 -10
- package/dist/cjs/booters/repository.booter.d.ts.map +0 -1
- package/dist/cjs/booters/repository.booter.js +0 -45
- package/dist/cjs/booters/repository.booter.js.map +0 -1
- package/dist/cjs/booters/service.booter.d.ts +0 -10
- package/dist/cjs/booters/service.booter.d.ts.map +0 -1
- package/dist/cjs/booters/service.booter.js +0 -45
- package/dist/cjs/booters/service.booter.js.map +0 -1
- package/dist/cjs/bootstrapper.d.ts +0 -14
- package/dist/cjs/bootstrapper.d.ts.map +0 -1
- package/dist/cjs/bootstrapper.js +0 -121
- package/dist/cjs/bootstrapper.js.map +0 -1
- package/dist/cjs/common/constants.d.ts +0 -6
- package/dist/cjs/common/constants.d.ts.map +0 -1
- package/dist/cjs/common/constants.js +0 -10
- package/dist/cjs/common/constants.js.map +0 -1
- package/dist/cjs/common/index.d.ts.map +0 -1
- package/dist/cjs/common/index.js.map +0 -1
- package/dist/cjs/common/types.d.ts +0 -52
- package/dist/cjs/common/types.d.ts.map +0 -1
- package/dist/cjs/common/types.js +0 -5
- package/dist/cjs/common/types.js.map +0 -1
- package/dist/cjs/utilities/boot.utility.d.ts +0 -9
- package/dist/cjs/utilities/boot.utility.d.ts.map +0 -1
- package/dist/cjs/utilities/boot.utility.js +0 -51
- package/dist/cjs/utilities/boot.utility.js.map +0 -1
- package/dist/cjs/utilities/index.d.ts +0 -2
- package/dist/cjs/utilities/index.d.ts.map +0 -1
- package/dist/cjs/utilities/index.js +0 -18
- package/dist/cjs/utilities/index.js.map +0 -1
- package/dist/esm/base/base-artifact-booter.d.ts +0 -18
- package/dist/esm/base/base-artifact-booter.d.ts.map +0 -1
- package/dist/esm/base/base-artifact-booter.js +0 -81
- package/dist/esm/base/base-artifact-booter.js.map +0 -1
- package/dist/esm/base/index.d.ts +0 -2
- package/dist/esm/base/index.d.ts.map +0 -1
- package/dist/esm/base/index.js +0 -2
- package/dist/esm/base/index.js.map +0 -1
- package/dist/esm/boot.mixin.d.ts +0 -65
- package/dist/esm/boot.mixin.d.ts.map +0 -1
- package/dist/esm/boot.mixin.js +0 -25
- package/dist/esm/boot.mixin.js.map +0 -1
- package/dist/esm/booters/controller.booter.d.ts +0 -10
- package/dist/esm/booters/controller.booter.d.ts.map +0 -1
- package/dist/esm/booters/controller.booter.js +0 -42
- package/dist/esm/booters/controller.booter.js.map +0 -1
- package/dist/esm/booters/datasource.booter.d.ts +0 -10
- package/dist/esm/booters/datasource.booter.d.ts.map +0 -1
- package/dist/esm/booters/datasource.booter.js +0 -42
- package/dist/esm/booters/datasource.booter.js.map +0 -1
- package/dist/esm/booters/index.d.ts +0 -5
- package/dist/esm/booters/index.d.ts.map +0 -1
- package/dist/esm/booters/index.js +0 -5
- package/dist/esm/booters/index.js.map +0 -1
- package/dist/esm/booters/repository.booter.d.ts +0 -10
- package/dist/esm/booters/repository.booter.d.ts.map +0 -1
- package/dist/esm/booters/repository.booter.js +0 -42
- package/dist/esm/booters/repository.booter.js.map +0 -1
- package/dist/esm/booters/service.booter.d.ts +0 -10
- package/dist/esm/booters/service.booter.d.ts.map +0 -1
- package/dist/esm/booters/service.booter.js +0 -42
- package/dist/esm/booters/service.booter.js.map +0 -1
- package/dist/esm/bootstrapper.d.ts +0 -14
- package/dist/esm/bootstrapper.d.ts.map +0 -1
- package/dist/esm/bootstrapper.js +0 -118
- package/dist/esm/bootstrapper.js.map +0 -1
- package/dist/esm/common/constants.d.ts +0 -6
- package/dist/esm/common/constants.d.ts.map +0 -1
- package/dist/esm/common/constants.js +0 -6
- package/dist/esm/common/constants.js.map +0 -1
- package/dist/esm/common/index.d.ts.map +0 -1
- package/dist/esm/common/index.js.map +0 -1
- package/dist/esm/common/types.d.ts +0 -52
- package/dist/esm/common/types.d.ts.map +0 -1
- package/dist/esm/common/types.js +0 -2
- package/dist/esm/common/types.js.map +0 -1
- package/dist/esm/utilities/boot.utility.d.ts +0 -9
- package/dist/esm/utilities/boot.utility.d.ts.map +0 -1
- package/dist/esm/utilities/boot.utility.js +0 -46
- package/dist/esm/utilities/boot.utility.js.map +0 -1
- package/dist/esm/utilities/index.d.ts +0 -2
- package/dist/esm/utilities/index.d.ts.map +0 -1
- package/dist/esm/utilities/index.js +0 -2
- package/dist/esm/utilities/index.js.map +0 -1
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { TConstValue, ValueOrPromise } from '@venizia/ignis-helpers';
|
|
2
|
-
import { Container } from '@venizia/ignis-inversion';
|
|
3
|
-
import { BootPhases } from './constants';
|
|
4
|
-
export interface IArtifactOptions {
|
|
5
|
-
dirs?: string[];
|
|
6
|
-
extensions?: string[];
|
|
7
|
-
isNested?: boolean;
|
|
8
|
-
glob?: string;
|
|
9
|
-
}
|
|
10
|
-
export interface IBootOptions {
|
|
11
|
-
controllers?: IArtifactOptions;
|
|
12
|
-
services?: IArtifactOptions;
|
|
13
|
-
repositories?: IArtifactOptions;
|
|
14
|
-
datasources?: IArtifactOptions;
|
|
15
|
-
[artifactType: string]: IArtifactOptions | undefined;
|
|
16
|
-
}
|
|
17
|
-
export type TBootPhase = TConstValue<typeof BootPhases>;
|
|
18
|
-
export declare const BOOT_PHASES: TBootPhase[];
|
|
19
|
-
export interface IApplication extends Container {
|
|
20
|
-
getProjectRoot(): string;
|
|
21
|
-
}
|
|
22
|
-
export interface IBootableApplication {
|
|
23
|
-
boot(): Promise<IBootReport>;
|
|
24
|
-
}
|
|
25
|
-
export interface IBooterOptions {
|
|
26
|
-
scope: string;
|
|
27
|
-
root: string;
|
|
28
|
-
artifactOptions: IArtifactOptions;
|
|
29
|
-
}
|
|
30
|
-
export interface IBooter {
|
|
31
|
-
configure(): ValueOrPromise<void>;
|
|
32
|
-
discover(): ValueOrPromise<void>;
|
|
33
|
-
load(): ValueOrPromise<void>;
|
|
34
|
-
}
|
|
35
|
-
export interface IBootExecutionOptions {
|
|
36
|
-
phases?: TBootPhase[];
|
|
37
|
-
booters?: string[];
|
|
38
|
-
}
|
|
39
|
-
export interface IBootstrapper {
|
|
40
|
-
boot(opts: IBootExecutionOptions): Promise<IBootReport>;
|
|
41
|
-
}
|
|
42
|
-
export interface IBootPhaseReport {
|
|
43
|
-
phase: TBootPhase;
|
|
44
|
-
durationMs: number;
|
|
45
|
-
}
|
|
46
|
-
export interface IBootReport {
|
|
47
|
-
/** Class names of the booters that actually ran, in execution order. */
|
|
48
|
-
booters: string[];
|
|
49
|
-
phases: IBootPhaseReport[];
|
|
50
|
-
totalDurationMs: number;
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,WAAW,CAAC,EAAE,gBAAg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
package/dist/cjs/common/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":";;;AAqBa,QAAA,WAAW,GAAiB,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AnyType } from '@venizia/ignis-helpers';
|
|
2
|
-
export declare const discoverFiles: (opts: {
|
|
3
|
-
pattern: string;
|
|
4
|
-
root: string;
|
|
5
|
-
}) => Promise<string[]>;
|
|
6
|
-
export declare const loadClasses: (opts: {
|
|
7
|
-
files: string[];
|
|
8
|
-
}) => Promise<AnyType[]>;
|
|
9
|
-
//# sourceMappingURL=boot.utility.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boot.utility.d.ts","sourceRoot":"","sources":["../../../src/utilities/boot.utility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA6B,MAAM,wBAAwB,CAAC;AAG5E,eAAO,MAAM,aAAa,EAAE,CAAC,IAAI,EAAE;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,KAAK,OAAO,CAAC,MAAM,EAAE,CAarB,CAAC;AAgBF,eAAO,MAAM,WAAW,EAAE,CAAC,IAAI,EAAE;IAAE,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,KAAK,OAAO,CAAC,OAAO,EAAE,CAmBzE,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadClasses = exports.discoverFiles = void 0;
|
|
4
|
-
const ignis_helpers_1 = require("@venizia/ignis-helpers");
|
|
5
|
-
const glob_1 = require("glob");
|
|
6
|
-
const discoverFiles = async (opts) => {
|
|
7
|
-
const { pattern, root } = opts;
|
|
8
|
-
try {
|
|
9
|
-
const discovered = await (0, glob_1.glob)(pattern, { cwd: root, absolute: true });
|
|
10
|
-
return discovered;
|
|
11
|
-
}
|
|
12
|
-
catch (error) {
|
|
13
|
-
const errorMessage = error.message ?? 'Unknown error';
|
|
14
|
-
throw (0, ignis_helpers_1.getError)({
|
|
15
|
-
message: `Failed to discover files with pattern: ${pattern} | Error: ${errorMessage}`,
|
|
16
|
-
cause: error,
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
exports.discoverFiles = discoverFiles;
|
|
21
|
-
const collectExportedClasses = (opts) => {
|
|
22
|
-
const collected = [];
|
|
23
|
-
for (const exported of Object.values(opts.module)) {
|
|
24
|
-
if (!(0, ignis_helpers_1.isClass)(exported)) {
|
|
25
|
-
continue;
|
|
26
|
-
}
|
|
27
|
-
collected.push(exported);
|
|
28
|
-
}
|
|
29
|
-
return collected;
|
|
30
|
-
};
|
|
31
|
-
const loadClasses = async (opts) => {
|
|
32
|
-
const { files } = opts;
|
|
33
|
-
const classes = [];
|
|
34
|
-
for (const file of files) {
|
|
35
|
-
try {
|
|
36
|
-
const module = await import(file);
|
|
37
|
-
classes.push(...collectExportedClasses({ module }));
|
|
38
|
-
}
|
|
39
|
-
catch (error) {
|
|
40
|
-
const errorMessage = error.message ?? 'Unknown error';
|
|
41
|
-
// Without the cause, the stack of the module that actually threw - the real diagnosis - is gone.
|
|
42
|
-
throw (0, ignis_helpers_1.getError)({
|
|
43
|
-
message: `Failed to load file: ${file} | Error: ${errorMessage}`,
|
|
44
|
-
cause: error,
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return classes;
|
|
49
|
-
};
|
|
50
|
-
exports.loadClasses = loadClasses;
|
|
51
|
-
//# sourceMappingURL=boot.utility.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boot.utility.js","sourceRoot":"","sources":["../../../src/utilities/boot.utility.ts"],"names":[],"mappings":";;;AAAA,0DAA4E;AAC5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AAI,CAAC,GAAG,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QACtD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,YAAY,GAAI,KAAe,CAAC,OAAO,IAAI,eAAe,CAAC;YACjE,iGAAiG;YACjG,MAAM,IAAA,wBAAQ,EAAC;gBACb,OAAO,EAAE,wBAAwB,IAAI,aAAa,YAAY,EAAE;gBAChE,KAAK,EAAE,KAAK;aACb,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAnBW,QAAA,WAAW,eAmBtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utilities/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./boot.utility"), exports);
|
|
18
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utilities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iDAA+B"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { IArtifactOptions, IBooter, IBooterOptions } from '../common/types';
|
|
2
|
-
import { BaseHelper } from '@venizia/ignis-helpers';
|
|
3
|
-
import { TClass } from '@venizia/ignis-inversion';
|
|
4
|
-
export declare abstract class BaseArtifactBooter extends BaseHelper implements IBooter {
|
|
5
|
-
protected root: string;
|
|
6
|
-
protected artifactOptions: IArtifactOptions;
|
|
7
|
-
protected discoveredFiles: string[];
|
|
8
|
-
protected loadedClasses: TClass<any>[];
|
|
9
|
-
protected abstract getDefaultDirs(): string[];
|
|
10
|
-
protected abstract getDefaultExtensions(): string[];
|
|
11
|
-
protected abstract bind(): Promise<void>;
|
|
12
|
-
constructor(opts: IBooterOptions);
|
|
13
|
-
protected getPattern(): string;
|
|
14
|
-
configure(): Promise<void>;
|
|
15
|
-
discover(): Promise<void>;
|
|
16
|
-
load(): Promise<void>;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=base-artifact-booter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-artifact-booter.d.ts","sourceRoot":"","sources":["../../../src/base/base-artifact-booter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE3E,OAAO,EAAE,UAAU,EAAY,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAElD,8BAAsB,kBAAmB,SAAQ,UAAW,YAAW,OAAO;IAC5E,SAAS,CAAC,IAAI,EAAE,MAAM,CAAM;IAC5B,SAAS,CAAC,eAAe,EAAE,gBAAgB,CAAM;IACjD,SAAS,CAAC,eAAe,EAAE,MAAM,EAAE,CAAM;IACzC,SAAS,CAAC,aAAa,EAAE,MAAM,CAAC,GAAG,CAAC,EAAE,CAAM;IAE5C,SAAS,CAAC,QAAQ,CAAC,cAAc,IAAI,MAAM,EAAE;IAC7C,SAAS,CAAC,QAAQ,CAAC,oBAAoB,IAAI,MAAM,EAAE;IACnD,SAAS,CAAC,QAAQ,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;gBAE5B,IAAI,EAAE,cAAc;IAOhC,SAAS,CAAC,UAAU,IAAI,MAAM;IA+BxB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAY1B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAsBzB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAiB5B"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { discoverFiles, loadClasses } from '../utilities';
|
|
2
|
-
import { BaseHelper, getError } from '@venizia/ignis-helpers';
|
|
3
|
-
export class BaseArtifactBooter extends BaseHelper {
|
|
4
|
-
constructor(opts) {
|
|
5
|
-
super({ scope: opts.scope });
|
|
6
|
-
this.root = '';
|
|
7
|
-
this.artifactOptions = {};
|
|
8
|
-
this.discoveredFiles = [];
|
|
9
|
-
this.loadedClasses = [];
|
|
10
|
-
this.artifactOptions = opts.artifactOptions;
|
|
11
|
-
this.root = opts.root;
|
|
12
|
-
}
|
|
13
|
-
getPattern() {
|
|
14
|
-
if (this.artifactOptions.glob) {
|
|
15
|
-
return this.artifactOptions.glob;
|
|
16
|
-
}
|
|
17
|
-
if (!this.artifactOptions.dirs?.length) {
|
|
18
|
-
throw getError({
|
|
19
|
-
message: `[getPattern] No directories specified for artifact discovery`,
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
if (!this.artifactOptions.extensions?.length) {
|
|
23
|
-
throw getError({
|
|
24
|
-
message: `[${this.scope}][getPattern] No file extensions specified for artifact discovery`,
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
const dirs = this.artifactOptions.dirs.join(',');
|
|
28
|
-
const exts = this.artifactOptions.extensions
|
|
29
|
-
.map(e => (e.startsWith('.') ? e.slice(1) : e))
|
|
30
|
-
.join(',');
|
|
31
|
-
const nested = this.artifactOptions.isNested ? '{**/*,*}' : '*'; // NOTE: only suports one level of nesting now
|
|
32
|
-
if (this.artifactOptions.dirs.length > 1 || this.artifactOptions.extensions.length > 1) {
|
|
33
|
-
return `{${dirs}}/${nested}.{${exts}}`;
|
|
34
|
-
}
|
|
35
|
-
return `${dirs}/${nested}.${exts}`;
|
|
36
|
-
}
|
|
37
|
-
async configure() {
|
|
38
|
-
// No trailing `...this.artifactOptions` spread: a key that EXISTS holding undefined (what `dirs: process.env.APP_DIRS?.split(',')` produces) would overwrite the just-computed default and getPattern() would throw.
|
|
39
|
-
this.artifactOptions = {
|
|
40
|
-
dirs: this.artifactOptions?.dirs ?? this.getDefaultDirs(),
|
|
41
|
-
extensions: this.artifactOptions?.extensions ?? this.getDefaultExtensions(),
|
|
42
|
-
isNested: this.artifactOptions?.isNested ?? true,
|
|
43
|
-
glob: this.artifactOptions?.glob,
|
|
44
|
-
};
|
|
45
|
-
this.logger.for(this.configure.name).debug(`Configured: %j`, this.artifactOptions);
|
|
46
|
-
}
|
|
47
|
-
async discover() {
|
|
48
|
-
const pattern = this.getPattern();
|
|
49
|
-
try {
|
|
50
|
-
this.discoveredFiles = [];
|
|
51
|
-
this.discoveredFiles = await discoverFiles({ root: this.root, pattern });
|
|
52
|
-
this.logger
|
|
53
|
-
.for(this.discover.name)
|
|
54
|
-
.debug(`Root: %s | Using pattern: %s | Discovered file: %j`, this.root, pattern, this.discoveredFiles);
|
|
55
|
-
}
|
|
56
|
-
catch (error) {
|
|
57
|
-
throw getError({
|
|
58
|
-
message: `[discover] Failed to discover files using pattern: ${pattern} | Error: ${error?.message}`,
|
|
59
|
-
cause: error,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
async load() {
|
|
64
|
-
if (!this.discoveredFiles.length) {
|
|
65
|
-
this.logger.for(this.load.name).debug(`No files discovered to load.`);
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
try {
|
|
69
|
-
this.loadedClasses = [];
|
|
70
|
-
this.loadedClasses = await loadClasses({ files: this.discoveredFiles });
|
|
71
|
-
await this.bind();
|
|
72
|
-
}
|
|
73
|
-
catch (error) {
|
|
74
|
-
throw getError({
|
|
75
|
-
message: `[load] Failed to load classes from discovered files | Error: ${error?.message}`,
|
|
76
|
-
cause: error,
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=base-artifact-booter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base-artifact-booter.js","sourceRoot":"","sources":["../../../src/base/base-artifact-booter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAG9D,MAAM,OAAgB,kBAAmB,SAAQ,UAAU;IAUzD,YAAY,IAAoB;QAC9B,KAAK,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;QAVrB,SAAI,GAAW,EAAE,CAAC;QAClB,oBAAe,GAAqB,EAAE,CAAC;QACvC,oBAAe,GAAa,EAAE,CAAC;QAC/B,kBAAa,GAAkB,EAAE,CAAC;QAS1C,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;QAC5C,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACxB,CAAC;IAES,UAAU;QAClB,IAAI,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;QACnC,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,CAAC;YACvC,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,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC;YACxE,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC;QACpB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,QAAQ,CAAC;gBACb,OAAO,EAAE,gEAAiE,KAAe,EAAE,OAAO,EAAE;gBACpG,KAAK,EAAE,KAAK;aACb,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF"}
|
package/dist/esm/base/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/base/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
package/dist/esm/base/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/base/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC"}
|
package/dist/esm/boot.mixin.d.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { IBootOptions, IBootReport } from './common/types';
|
|
2
|
-
import { TMixinTarget } from '@venizia/ignis-helpers';
|
|
3
|
-
import { Container } from '@venizia/ignis-inversion';
|
|
4
|
-
export declare const BootMixin: <T extends TMixinTarget<Container>>(baseClass: T) => {
|
|
5
|
-
new (...args: any[]): {
|
|
6
|
-
bootOptions?: IBootOptions | undefined;
|
|
7
|
-
projectRoot?: string;
|
|
8
|
-
boot(): Promise<IBootReport>;
|
|
9
|
-
instantiate: <T_1>(cls: import("@venizia/ignis-inversion").TClass<T_1>) => T_1;
|
|
10
|
-
getMetadataRegistry: () => import("@venizia/ignis-inversion").MetadataRegistry;
|
|
11
|
-
bind: <T_1>(opts: {
|
|
12
|
-
key: import("@venizia/ignis-inversion").TBindingKey;
|
|
13
|
-
}) => import("@venizia/ignis-inversion").Binding<T_1>;
|
|
14
|
-
isBound: (opts: {
|
|
15
|
-
key: import("@venizia/ignis-inversion").TBindingKey;
|
|
16
|
-
}) => boolean;
|
|
17
|
-
getBinding: <T_1>(opts: {
|
|
18
|
-
key: import("@venizia/ignis-inversion").TBindingKey | {
|
|
19
|
-
namespace: string;
|
|
20
|
-
key: string;
|
|
21
|
-
};
|
|
22
|
-
}) => import("@venizia/ignis-inversion").TNullable<import("@venizia/ignis-inversion").Binding<T_1>>;
|
|
23
|
-
unbind: (opts: {
|
|
24
|
-
key: import("@venizia/ignis-inversion").TBindingKey;
|
|
25
|
-
}) => boolean;
|
|
26
|
-
set: <T_1>(opts: {
|
|
27
|
-
binding: import("@venizia/ignis-inversion").Binding<T_1>;
|
|
28
|
-
}) => void;
|
|
29
|
-
get: {
|
|
30
|
-
<T_1>(opts: {
|
|
31
|
-
key: import("@venizia/ignis-inversion").TBindingKey | {
|
|
32
|
-
namespace: string;
|
|
33
|
-
key: string;
|
|
34
|
-
};
|
|
35
|
-
isOptional?: false;
|
|
36
|
-
}): T_1;
|
|
37
|
-
<T_1>(opts: {
|
|
38
|
-
key: import("@venizia/ignis-inversion").TBindingKey | {
|
|
39
|
-
namespace: string;
|
|
40
|
-
key: string;
|
|
41
|
-
};
|
|
42
|
-
isOptional?: boolean;
|
|
43
|
-
}): T_1 | undefined;
|
|
44
|
-
};
|
|
45
|
-
gets: <T_1 extends unknown[]>(opts: {
|
|
46
|
-
bindings: { [K in keyof T_1]: {
|
|
47
|
-
key: import("@venizia/ignis-inversion").TBindingKey | {
|
|
48
|
-
namespace: string;
|
|
49
|
-
key: string;
|
|
50
|
-
};
|
|
51
|
-
isOptional?: boolean;
|
|
52
|
-
}; };
|
|
53
|
-
}) => { [K in keyof T_1]: T_1[K] | undefined; };
|
|
54
|
-
resolve: <T_1>(cls: import("@venizia/ignis-inversion").TClass<T_1>) => T_1;
|
|
55
|
-
findByTag: <T_1 = any>(opts: {
|
|
56
|
-
tag: string;
|
|
57
|
-
exclude?: Array<string> | Set<string>;
|
|
58
|
-
}) => import("@venizia/ignis-inversion").Binding<T_1>[];
|
|
59
|
-
clear: () => void;
|
|
60
|
-
reset: () => void;
|
|
61
|
-
scope: string;
|
|
62
|
-
identifier: string;
|
|
63
|
-
};
|
|
64
|
-
} & T;
|
|
65
|
-
//# sourceMappingURL=boot.mixin.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boot.mixin.d.ts","sourceRoot":"","sources":["../../src/boot.mixin.ts"],"names":[],"mappings":"AAGA,OAAO,EAAwB,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAiB,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAEpE,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,YAAY,CAAC,SAAS,CAAC,EAAE,WAAW,CAAC;kBAEhD,GAAG,EAAE;sBAaZ,YAAY,GAAG,SAAS;sBACxB,MAAM;gBAEZ,OAAO,CAAC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;0BARwB,CAAC;;;;;;;0BAKlD,CAAC;;;;;;;;;0BAOA,CAAC;;;;;;mBAOwD,CAAC;;;;;;;KADjE,CAAC"}
|
package/dist/esm/boot.mixin.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
// Never '@venizia/ignis-boot' here: importing the package from inside itself resolves through its own dist, so the source would depend on a build of itself.
|
|
2
|
-
import { ControllerBooter, DatasourceBooter, RepositoryBooter, ServiceBooter } from './booters';
|
|
3
|
-
import { Bootstrapper } from './bootstrapper';
|
|
4
|
-
import { BindingScopes } from '@venizia/ignis-inversion';
|
|
5
|
-
export const BootMixin = (baseClass) => {
|
|
6
|
-
class Mixed extends baseClass {
|
|
7
|
-
constructor(...args) {
|
|
8
|
-
super(...args);
|
|
9
|
-
this.bind({ key: '@app/instance' }).toProvider(() => this);
|
|
10
|
-
this.bind({ key: 'booter.DatasourceBooter' }).toClass(DatasourceBooter).setTags('booter');
|
|
11
|
-
this.bind({ key: 'booter.RepositoryBooter' }).toClass(RepositoryBooter).setTags('booter');
|
|
12
|
-
this.bind({ key: 'booter.ServiceBooter' }).toClass(ServiceBooter).setTags('booter');
|
|
13
|
-
this.bind({ key: 'booter.ControllerBooter' }).toClass(ControllerBooter).setTags('booter');
|
|
14
|
-
this.bind({ key: 'bootstrapper' }).toClass(Bootstrapper).setScope(BindingScopes.SINGLETON);
|
|
15
|
-
}
|
|
16
|
-
boot() {
|
|
17
|
-
this.bind({ key: '@app/boot-options' }).toValue(this.bootOptions ?? {});
|
|
18
|
-
this.bind({ key: '@app/project_root' }).toValue(this.projectRoot ?? process.cwd());
|
|
19
|
-
const bootstrapper = this.get({ key: 'bootstrapper' });
|
|
20
|
-
return bootstrapper.boot({});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return Mixed;
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=boot.mixin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"boot.mixin.js","sourceRoot":"","sources":["../../src/boot.mixin.ts"],"names":[],"mappings":"AAAA,6JAA6J;AAC7J,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAChG,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAAE,aAAa,EAAa,MAAM,0BAA0B,CAAC;AAEpE,MAAM,CAAC,MAAM,SAAS,GAAG,CAAoC,SAAY,EAAE,EAAE;IAC3E,MAAM,KAAM,SAAQ,SAAS;QAC3B,YAAY,GAAG,IAAW;YACxB,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;YAEf,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;YAE3D,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,yBAAy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
-
import { IApplication, IBootOptions } from '../common';
|
|
3
|
-
export declare class ControllerBooter extends BaseArtifactBooter {
|
|
4
|
-
private readonly application;
|
|
5
|
-
constructor(root: string, application: IApplication, bootOptions: IBootOptions);
|
|
6
|
-
protected getDefaultDirs(): string[];
|
|
7
|
-
protected getDefaultExtensions(): string[];
|
|
8
|
-
protected bind(): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=controller.booter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"controller.booter.d.ts","sourceRoot":"","sources":["../../../src/booters/controller.booter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGtD,qBAAa,gBAAiB,SAAQ,kBAAkB;IAGlB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBADxB,IAAI,EAAE,MAAM,EACC,WAAW,EAAE,YAAY,EACtC,WAAW,EAAE,YAAY;cAK9C,cAAc,IAAI,MAAM,EAAE;cAI1B,oBAAoB,IAAI,MAAM,EAAE;cAI1B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAO/C"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
-
};
|
|
13
|
-
var ControllerBooter_1;
|
|
14
|
-
import { BaseArtifactBooter } from '../base/base-artifact-booter';
|
|
15
|
-
import { BindingKeys, inject } from '@venizia/ignis-inversion';
|
|
16
|
-
let ControllerBooter = ControllerBooter_1 = class ControllerBooter extends BaseArtifactBooter {
|
|
17
|
-
constructor(root, application, bootOptions) {
|
|
18
|
-
super({ scope: ControllerBooter_1.name, root, artifactOptions: bootOptions.controllers ?? {} });
|
|
19
|
-
this.application = application;
|
|
20
|
-
}
|
|
21
|
-
getDefaultDirs() {
|
|
22
|
-
return ['controllers'];
|
|
23
|
-
}
|
|
24
|
-
getDefaultExtensions() {
|
|
25
|
-
return ['.controller.js'];
|
|
26
|
-
}
|
|
27
|
-
async bind() {
|
|
28
|
-
for (const cls of this.loadedClasses) {
|
|
29
|
-
const key = BindingKeys.build({ namespace: 'controllers', key: cls.name });
|
|
30
|
-
this.application.bind({ key }).toClass(cls).setTags('controllers');
|
|
31
|
-
this.logger.for(this.bind.name).debug('Bound key: %s', key);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
ControllerBooter = ControllerBooter_1 = __decorate([
|
|
36
|
-
__param(0, inject({ key: '@app/project_root' })),
|
|
37
|
-
__param(1, inject({ key: '@app/instance' })),
|
|
38
|
-
__param(2, inject({ key: '@app/boot-options' })),
|
|
39
|
-
__metadata("design:paramtypes", [String, Object, Object])
|
|
40
|
-
], ControllerBooter);
|
|
41
|
-
export { ControllerBooter };
|
|
42
|
-
//# sourceMappingURL=controller.booter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"controller.booter.js","sourceRoot":"","sources":["../../../src/booters/controller.booter.ts"],"names":[],"mappings":";;;;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AAG,EAAE,mBAAmB,EAAE,CAAC,CAAA;;GAJ5B,gBAAgB,CAwB5B"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BaseArtifactBooter } from '../base/base-artifact-booter';
|
|
2
|
-
import { IApplication, IBootOptions } from '../common';
|
|
3
|
-
export declare class DatasourceBooter extends BaseArtifactBooter {
|
|
4
|
-
private readonly application;
|
|
5
|
-
constructor(root: string, application: IApplication, bootOptions: IBootOptions);
|
|
6
|
-
protected getDefaultDirs(): string[];
|
|
7
|
-
protected getDefaultExtensions(): string[];
|
|
8
|
-
protected bind(): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=datasource.booter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datasource.booter.d.ts","sourceRoot":"","sources":["../../../src/booters/datasource.booter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGtD,qBAAa,gBAAiB,SAAQ,kBAAkB;IAGlB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBADxB,IAAI,EAAE,MAAM,EACC,WAAW,EAAE,YAAY,EACtC,WAAW,EAAE,YAAY;cAK9C,cAAc,IAAI,MAAM,EAAE;cAI1B,oBAAoB,IAAI,MAAM,EAAE;cAI1B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAO/C"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
-
};
|
|
13
|
-
var DatasourceBooter_1;
|
|
14
|
-
import { BaseArtifactBooter } from '../base/base-artifact-booter';
|
|
15
|
-
import { BindingKeys, inject } from '@venizia/ignis-inversion';
|
|
16
|
-
let DatasourceBooter = DatasourceBooter_1 = class DatasourceBooter extends BaseArtifactBooter {
|
|
17
|
-
constructor(root, application, bootOptions) {
|
|
18
|
-
super({ scope: DatasourceBooter_1.name, root, artifactOptions: bootOptions.datasources ?? {} });
|
|
19
|
-
this.application = application;
|
|
20
|
-
}
|
|
21
|
-
getDefaultDirs() {
|
|
22
|
-
return ['datasources'];
|
|
23
|
-
}
|
|
24
|
-
getDefaultExtensions() {
|
|
25
|
-
return ['.datasource.js'];
|
|
26
|
-
}
|
|
27
|
-
async bind() {
|
|
28
|
-
for (const cls of this.loadedClasses) {
|
|
29
|
-
const key = BindingKeys.build({ namespace: 'datasources', key: cls.name });
|
|
30
|
-
this.application.bind({ key }).toClass(cls).setTags('datasources').setScope('singleton');
|
|
31
|
-
this.logger.for(this.bind.name).debug('Bound key: %s', key);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
DatasourceBooter = DatasourceBooter_1 = __decorate([
|
|
36
|
-
__param(0, inject({ key: '@app/project_root' })),
|
|
37
|
-
__param(1, inject({ key: '@app/instance' })),
|
|
38
|
-
__param(2, inject({ key: '@app/boot-options' })),
|
|
39
|
-
__metadata("design:paramtypes", [String, Object, Object])
|
|
40
|
-
], DatasourceBooter);
|
|
41
|
-
export { DatasourceBooter };
|
|
42
|
-
//# sourceMappingURL=datasource.booter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datasource.booter.js","sourceRoot":"","sources":["../../../src/booters/datasource.booter.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAE/D,IAAa,gBAAgB,wBAA7B,MAAa,gBAAiB,SAAQ,kBAAkB;IACtD,YACwC,IAAY,EACC,WAAyB,EACtC,WAAyB;QAE/D,KAAK,CAAC,EAAE,KAAK,EAAE,kBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,CAAC,WAAW,IAAI,EAAE,EAAE,CAAC,CAAC;QAH3C,gBAAW,GAAX,WAAW,CAAc;IAI9E,CAAC;IAEkB,cAAc;QAC/B,OAAO,CAAC,aAAa,CAAC,CAAC;IACzB,CAAC;IAEkB,oBAAoB;QACrC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC5B,CAAC;IAEkB,KAAK,CAAC,IAAI;QAC3B,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACrC,MAAM,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;YAC3E,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;YACzF,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;CACF,CAAA;AAxBY,gBAAgB;IAExB,WAAA,MAAM,CAAC,EAAE,GAAG,EAAE,mBAAmB,EAAE,CAAC,CAAA;IACpC,WAAA,MAAM,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC,CAAA;IAChC,WAAA,MAAM,CAAC,EAAE,GAAG,EAAE,mBAAmB,EAAE,CAAC,CAAA;;GAJ5B,gBAAgB,CAwB5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/booters/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/booters/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BaseArtifactBooter } from '../base/base-artifact-booter';
|
|
2
|
-
import { IApplication, IBootOptions } from '../common';
|
|
3
|
-
export declare class RepositoryBooter extends BaseArtifactBooter {
|
|
4
|
-
protected application: IApplication;
|
|
5
|
-
constructor(root: string, application: IApplication, bootOptions: IBootOptions);
|
|
6
|
-
protected getDefaultDirs(): string[];
|
|
7
|
-
protected getDefaultExtensions(): string[];
|
|
8
|
-
protected bind(): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=repository.booter.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repository.booter.d.ts","sourceRoot":"","sources":["../../../src/booters/repository.booter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGtD,qBAAa,gBAAiB,SAAQ,kBAAkB;IAGlB,SAAS,CAAC,WAAW,EAAE,YAAY;gBAD/B,IAAI,EAAE,MAAM,EACN,WAAW,EAAE,YAAY,EAC/B,WAAW,EAAE,YAAY;cAK9C,cAAc,IAAI,MAAM,EAAE;cAI1B,oBAAoB,IAAI,MAAM,EAAE;cAI1B,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAO/C"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
-
};
|
|
13
|
-
var RepositoryBooter_1;
|
|
14
|
-
import { BaseArtifactBooter } from '../base/base-artifact-booter';
|
|
15
|
-
import { BindingKeys, inject } from '@venizia/ignis-inversion';
|
|
16
|
-
let RepositoryBooter = RepositoryBooter_1 = class RepositoryBooter extends BaseArtifactBooter {
|
|
17
|
-
constructor(root, application, bootOptions) {
|
|
18
|
-
super({ scope: RepositoryBooter_1.name, root, artifactOptions: bootOptions.repositories ?? {} });
|
|
19
|
-
this.application = application;
|
|
20
|
-
}
|
|
21
|
-
getDefaultDirs() {
|
|
22
|
-
return ['repositories'];
|
|
23
|
-
}
|
|
24
|
-
getDefaultExtensions() {
|
|
25
|
-
return ['.repository.js'];
|
|
26
|
-
}
|
|
27
|
-
async bind() {
|
|
28
|
-
for (const cls of this.loadedClasses) {
|
|
29
|
-
const key = BindingKeys.build({ namespace: 'repositories', key: cls.name });
|
|
30
|
-
this.application.bind({ key }).toClass(cls).setTags('repositories');
|
|
31
|
-
this.logger.for(this.bind.name).debug('Bound key: %s', key);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
RepositoryBooter = RepositoryBooter_1 = __decorate([
|
|
36
|
-
__param(0, inject({ key: '@app/project_root' })),
|
|
37
|
-
__param(1, inject({ key: '@app/instance' })),
|
|
38
|
-
__param(2, inject({ key: '@app/boot-options' })),
|
|
39
|
-
__metadata("design:paramtypes", [String, Object, Object])
|
|
40
|
-
], RepositoryBooter);
|
|
41
|
-
export { RepositoryBooter };
|
|
42
|
-
//# sourceMappingURL=repository.booter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"repository.booter.js","sourceRoot":"","sources":["../../../src/booters/repository.booter.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAE/D,IAAa,gBAAgB,wBAA7B,MAAa,gBAAiB,SAAQ,kBAAkB;IACtD,YACwC,IAAY,EACN,WAAyB,EAC/B,WAAyB;QAE/D,KAAK,CAAC,EAAE,KAAK,EAAE,kBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,CAAC,YAAY,IAAI,EAAE,EAAE,CAAC,CAAC;QAHnD,gBAAW,GAAX,WAAW,CAAc;IAIvE,CAAC;IAEkB,cAAc;QAC/B,OAAO,CAAC,cAAc,CAAC,CAAC;IAC1B,CAAC;IAEkB,oBAAoB;QACrC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC5B,CAAC;IAEkB,KAAK,CAAC,IAAI;QAC3B,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACrC,MAAM,GAAG,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,EAAE,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;YAC5E,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;YACpE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;QAC9D,CAAC;IACH,CAAC;CACF,CAAA;AAxBY,gBAAgB;IAExB,WAAA,MAAM,CAAC,EAAE,GAAG,EAAE,mBAAmB,EAAE,CAAC,CAAA;IACpC,WAAA,MAAM,CAAC,EAAE,GAAG,EAAE,eAAe,EAAE,CAAC,CAAA;IAChC,WAAA,MAAM,CAAC,EAAE,GAAG,EAAE,mBAAmB,EAAE,CAAC,CAAA;;GAJ5B,gBAAgB,CAwB5B"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BaseArtifactBooter } from '../base/base-artifact-booter';
|
|
2
|
-
import { IApplication, IBootOptions } from '../common';
|
|
3
|
-
export declare class ServiceBooter extends BaseArtifactBooter {
|
|
4
|
-
protected application: IApplication;
|
|
5
|
-
constructor(root: string, application: IApplication, bootOptions: IBootOptions);
|
|
6
|
-
protected getDefaultDirs(): string[];
|
|
7
|
-
protected getDefaultExtensions(): string[];
|
|
8
|
-
protected bind(): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=service.booter.d.ts.map
|