@adaas/a-concept 0.0.60 → 0.0.62
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/dist/index.d.ts +4 -4
- package/dist/index.js +5 -5
- package/dist/index.js.map +1 -1
- package/dist/src/base/A-Config/A-Config.container.js +2 -2
- package/dist/src/base/A-Config/A-Config.container.js.map +1 -1
- package/dist/src/base/A-Config/A-Config.context.js +3 -3
- package/dist/src/base/A-Config/A-Config.context.js.map +1 -1
- package/dist/src/base/A-Config/components/ENVConfigReader.component.js +1 -5
- package/dist/src/base/A-Config/components/ENVConfigReader.component.js.map +1 -1
- package/dist/src/base/A-Config/components/FileConfigReader.component.js +2 -1
- package/dist/src/base/A-Config/components/FileConfigReader.component.js.map +1 -1
- package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.d.ts +2 -1
- package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.js +9 -2
- package/dist/src/decorators/A-Feature/A-Feature-Define.decorator.js.map +1 -1
- package/dist/src/{base/A-Command/A_Command.entity.d.ts → global/A-Command/A-Command.class.d.ts} +72 -10
- package/dist/src/{base/A-Command/A_Command.entity.js → global/A-Command/A-Command.class.js} +119 -46
- package/dist/src/global/A-Command/A-Command.class.js.map +1 -0
- package/dist/src/{base/A-Command/A_Command.constants.js → global/A-Command/A-Command.constants.js} +1 -1
- package/dist/src/global/A-Command/A-Command.constants.js.map +1 -0
- package/dist/src/global/A-Command/A-Command.meta.d.ts +11 -0
- package/dist/src/global/A-Command/A-Command.meta.js +18 -0
- package/dist/src/global/A-Command/A-Command.meta.js.map +1 -0
- package/dist/src/global/A-Command/A-Command.types.d.ts +43 -0
- package/dist/src/global/A-Command/A-Command.types.js +10 -0
- package/dist/src/global/A-Command/A-Command.types.js.map +1 -0
- package/dist/src/{base → global}/A-Command/context/A_Command.context.d.ts +1 -1
- package/dist/src/{base → global}/A-Command/context/A_Command.context.js +1 -1
- package/dist/src/global/A-Command/context/A_Command.context.js.map +1 -0
- package/dist/src/global/A-Concept/A_Concept.class.js +2 -0
- package/dist/src/global/A-Concept/A_Concept.class.js.map +1 -1
- package/dist/src/global/A-Concept/A_Concept.types.d.ts +10 -0
- package/dist/src/global/A-Concept/A_Concept.types.js.map +1 -1
- package/dist/src/global/A-Context/A-Context.class.d.ts +3 -1
- package/dist/src/global/A-Context/A-Context.class.js +16 -6
- package/dist/src/global/A-Context/A-Context.class.js.map +1 -1
- package/dist/src/global/A-Entity/A-Entity.class.js +1 -4
- package/dist/src/global/A-Entity/A-Entity.class.js.map +1 -1
- package/dist/src/global/A-Feature/A-FeatureCaller.class.d.ts +4 -3
- package/dist/src/global/A-Feature/A-FeatureCaller.class.js.map +1 -1
- package/dist/src/global/A-Scope/A-Scope.class.d.ts +15 -1
- package/dist/src/global/A-Scope/A-Scope.class.js +59 -5
- package/dist/src/global/A-Scope/A-Scope.class.js.map +1 -1
- package/dist/src/global/A-Scope/A-Scope.types.d.ts +7 -0
- package/dist/src/global/A-Stage/A-Stage.class.d.ts +1 -1
- package/index.ts +4 -4
- package/package.json +2 -2
- package/src/base/A-Config/A-Config.container.ts +2 -2
- package/src/base/A-Config/A-Config.context.ts +6 -3
- package/src/base/A-Config/components/ENVConfigReader.component.ts +1 -6
- package/src/base/A-Config/components/FileConfigReader.component.ts +2 -1
- package/src/decorators/A-Feature/A-Feature-Define.decorator.ts +13 -6
- package/src/{base/A-Command/A_Command.entity.ts → global/A-Command/A-Command.class.ts} +149 -35
- package/src/global/A-Command/A-Command.meta.ts +22 -0
- package/src/global/A-Command/A-Command.types.ts +71 -0
- package/src/global/A-Concept/A_Concept.class.ts +3 -0
- package/src/global/A-Concept/A_Concept.types.ts +10 -0
- package/src/global/A-Context/A-Context.class.ts +23 -5
- package/src/global/A-Entity/A-Entity.class.ts +1 -4
- package/src/global/A-Feature/A-FeatureCaller.class.ts +4 -3
- package/src/global/A-Scope/A-Scope.class.ts +77 -9
- package/src/global/A-Scope/A-Scope.types.ts +7 -0
- package/tests/A-Command.test.ts +16 -13
- package/tests/A-Component.test.ts +2 -0
- package/tests/A-Concept.test.ts +112 -0
- package/tests/A-Config.test.ts +72 -6
- package/tests/A-Entity.test.ts +2 -0
- package/tests/A-Feature.test.ts +2 -0
- package/tests/A-Scope.test.ts +47 -4
- package/tests/test.setup.ts +30 -0
- package/dist/src/base/A-Command/A_Command.constants.js.map +0 -1
- package/dist/src/base/A-Command/A_Command.entity.js.map +0 -1
- package/dist/src/base/A-Command/A_Command.types.d.ts +0 -15
- package/dist/src/base/A-Command/A_Command.types.js +0 -3
- package/dist/src/base/A-Command/A_Command.types.js.map +0 -1
- package/dist/src/base/A-Command/context/A_Command.context.js.map +0 -1
- package/src/base/A-Command/A_Command.types.ts +0 -34
- /package/dist/src/{base/A-Command/A_Command.constants.d.ts → global/A-Command/A-Command.constants.d.ts} +0 -0
- /package/src/{base/A-Command/A_Command.constants.ts → global/A-Command/A-Command.constants.ts} +0 -0
- /package/src/{base → global}/A-Command/context/A_Command.context.ts +0 -0
package/tests/A-Config.test.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import './test.setup';
|
|
2
|
+
|
|
1
3
|
import { A_ConfigLoader } from "@adaas/a-concept/base/A-Config/A-Config.container";
|
|
2
4
|
import { A_Config } from "@adaas/a-concept/base/A-Config/A-Config.context";
|
|
3
5
|
import { ENVConfigReader } from "@adaas/a-concept/base/A-Config/components/ENVConfigReader.component";
|
|
6
|
+
import { FileConfigReader } from "@adaas/a-concept/base/A-Config/components/FileConfigReader.component";
|
|
4
7
|
import { A_CONSTANTS__DEFAULT_ENV_VARIABLES } from "@adaas/a-concept/constants/env.constants";
|
|
5
8
|
import { A_Context } from "@adaas/a-concept/global/A-Context/A-Context.class";
|
|
6
|
-
import
|
|
9
|
+
import fs from 'fs';
|
|
7
10
|
|
|
8
11
|
jest.retryTimes(0);
|
|
9
12
|
|
|
@@ -26,8 +29,8 @@ describe('A-Config tests', () => {
|
|
|
26
29
|
expect(config.get('TEST_VAR2')).toBeUndefined();
|
|
27
30
|
});
|
|
28
31
|
it('Should Allow to create a config object with ENV values', async () => {
|
|
29
|
-
process.env['
|
|
30
|
-
process.env['
|
|
32
|
+
process.env['TEST_VAR1'] = 'env1';
|
|
33
|
+
process.env['TEST_VAR2'] = 'env2';
|
|
31
34
|
|
|
32
35
|
const config = new A_Config({
|
|
33
36
|
variables: ['TEST_VAR1', 'TEST_VAR2'] as const,
|
|
@@ -50,12 +53,12 @@ describe('A-Config tests', () => {
|
|
|
50
53
|
expect(config.get('TEST_VAR1')).toBe('env1');
|
|
51
54
|
expect(config.get('TEST_VAR2')).toBe('env2');
|
|
52
55
|
|
|
53
|
-
delete process.env['
|
|
54
|
-
delete process.env['
|
|
56
|
+
delete process.env['TEST_VAR1'];
|
|
57
|
+
delete process.env['TEST_VAR2'];
|
|
55
58
|
});
|
|
56
59
|
it('Should not Change Names of default env variables', async () => {
|
|
57
60
|
process.env[A_CONSTANTS__DEFAULT_ENV_VARIABLES.A_CONCEPT_NAMESPACE] = 'my-project';
|
|
58
|
-
process.env['
|
|
61
|
+
process.env['TEST_VAR2'] = 'env2';
|
|
59
62
|
|
|
60
63
|
A_Context.reset();
|
|
61
64
|
|
|
@@ -103,4 +106,67 @@ describe('A-Config tests', () => {
|
|
|
103
106
|
|
|
104
107
|
}).toThrowError();
|
|
105
108
|
});
|
|
109
|
+
it('Should Allow to create a config object with variables from File', async () => {
|
|
110
|
+
|
|
111
|
+
// 1. create a config file
|
|
112
|
+
fs.writeFileSync('a-concept.conf.json', JSON.stringify({
|
|
113
|
+
testVar1: 'env1',
|
|
114
|
+
testVar2: 'env2'
|
|
115
|
+
}, null, 4));
|
|
116
|
+
|
|
117
|
+
const config = new A_Config({
|
|
118
|
+
variables: ['TEST_VAR1', 'TEST_VAR2'] as const,
|
|
119
|
+
defaults: {
|
|
120
|
+
TEST_VAR1: 'default1',
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
const configLoader = new A_ConfigLoader({
|
|
125
|
+
name: 'test-config-loader',
|
|
126
|
+
fragments: [config],
|
|
127
|
+
components: [FileConfigReader]
|
|
128
|
+
})
|
|
129
|
+
|
|
130
|
+
await configLoader.prepare(config as any);
|
|
131
|
+
await configLoader.readVariables(config as any);
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
expect(config.get('TEST_VAR1')).toBe('env1');
|
|
136
|
+
expect(config.get('TEST_VAR1')).toBe('env1');
|
|
137
|
+
|
|
138
|
+
// 3. delete the config file
|
|
139
|
+
fs.unlinkSync('a-concept.conf.json');
|
|
140
|
+
});
|
|
141
|
+
it('Should Allow to create a config object with variables from File with different variable cases', async () => {
|
|
142
|
+
|
|
143
|
+
// 1. create a config file
|
|
144
|
+
fs.writeFileSync('a-concept.conf.json', JSON.stringify({
|
|
145
|
+
testVar2: 'env2'
|
|
146
|
+
}, null, 4));
|
|
147
|
+
|
|
148
|
+
const config = new A_Config({
|
|
149
|
+
variables: ['testVar1', 'testVar2'] as const,
|
|
150
|
+
defaults: {
|
|
151
|
+
testVar1: 'default1',
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
|
|
155
|
+
const configLoader = new A_ConfigLoader({
|
|
156
|
+
name: 'test-config-loader',
|
|
157
|
+
fragments: [config],
|
|
158
|
+
components: [FileConfigReader]
|
|
159
|
+
})
|
|
160
|
+
|
|
161
|
+
await configLoader.prepare(config as any);
|
|
162
|
+
await configLoader.readVariables(config as any);
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
expect(config.get('testVar1')).toBe('default1');
|
|
167
|
+
expect(config.get('testVar2')).toBe('env2');
|
|
168
|
+
|
|
169
|
+
// 3. delete the config file
|
|
170
|
+
fs.unlinkSync('a-concept.conf.json');
|
|
171
|
+
});
|
|
106
172
|
});
|
package/tests/A-Entity.test.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import './test.setup';
|
|
2
|
+
|
|
1
3
|
import { A_CONSTANTS__DEFAULT_ENV_VARIABLES } from "@adaas/a-concept/constants/env.constants";
|
|
2
4
|
import { A_Context } from "@adaas/a-concept/global/A-Context/A-Context.class";
|
|
3
5
|
import { A_Entity } from "@adaas/a-concept/global/A-Entity/A-Entity.class";
|
package/tests/A-Feature.test.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import './test.setup';
|
|
2
|
+
|
|
1
3
|
import { A_Inject } from "@adaas/a-concept/decorators/A-Inject/A-Inject.decorator";
|
|
2
4
|
import { A_Component } from "@adaas/a-concept/global/A-Component/A-Component.class";
|
|
3
5
|
import { A_Feature } from "@adaas/a-concept/global/A-Feature/A-Feature.class";
|
package/tests/A-Scope.test.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import './test.setup';
|
|
2
|
+
|
|
3
|
+
import { A_Command } from "@adaas/a-concept/global/A-Command/A-Command.class";
|
|
2
4
|
import { A_Component } from "@adaas/a-concept/global/A-Component/A-Component.class";
|
|
3
5
|
import { A_Entity } from "@adaas/a-concept/global/A-Entity/A-Entity.class";
|
|
4
6
|
import { A_Scope } from "@adaas/a-concept/global/A-Scope/A-Scope.class";
|
|
@@ -161,22 +163,63 @@ describe('A-Scope tests', () => {
|
|
|
161
163
|
|
|
162
164
|
});
|
|
163
165
|
it('Should allow to resolve A-Entity by classname', async () => {
|
|
164
|
-
class
|
|
166
|
+
class MyEntity extends A_Entity<{ foo: string }> {
|
|
165
167
|
public foo!: string;
|
|
166
168
|
|
|
167
169
|
fromUndefined(): void {
|
|
168
170
|
super.fromUndefined();
|
|
169
171
|
this.foo = 'bar';
|
|
170
172
|
}
|
|
173
|
+
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const scope = new A_Scope({ name: 'TestScope' });
|
|
177
|
+
scope.register(MyEntity);
|
|
178
|
+
|
|
179
|
+
const resolved = scope.resolveConstructor<MyEntity>('my_entity');
|
|
180
|
+
const resolved2 = scope.resolveConstructor<MyEntity>('my-entity');
|
|
181
|
+
const resolved3 = scope.resolveConstructor<MyEntity>('MyEntity');
|
|
182
|
+
expect(resolved).toBe(MyEntity);
|
|
183
|
+
expect(resolved2).toBe(MyEntity);
|
|
184
|
+
expect(resolved3).toBe(MyEntity);
|
|
185
|
+
|
|
186
|
+
expect(() => {
|
|
187
|
+
scope.resolveConstructor<MyEntity>('my__entity');
|
|
188
|
+
}).toThrow();
|
|
189
|
+
|
|
190
|
+
const instance = new resolved();
|
|
191
|
+
|
|
192
|
+
expect(instance).toBeInstanceOf(MyEntity);
|
|
193
|
+
expect(instance.foo).toBe('bar');
|
|
194
|
+
|
|
195
|
+
});
|
|
196
|
+
it('Should allow to resolve A-Command by classname', async () => {
|
|
197
|
+
class MyCommand extends A_Command<{ foo: string }, { bar: string }> {
|
|
198
|
+
public foo!: string;
|
|
199
|
+
|
|
200
|
+
fromNew(newCommand: { foo: string; }): void {
|
|
201
|
+
super.fromNew(newCommand);
|
|
202
|
+
this.foo = newCommand.foo;
|
|
203
|
+
}
|
|
204
|
+
|
|
171
205
|
}
|
|
172
206
|
|
|
173
207
|
const scope = new A_Scope({ name: 'TestScope' });
|
|
174
208
|
scope.register(MyCommand);
|
|
175
209
|
|
|
176
|
-
const resolved = scope.resolveConstructor<MyCommand>('
|
|
210
|
+
const resolved = scope.resolveConstructor<MyCommand>('my-command');
|
|
211
|
+
const resolved2 = scope.resolveConstructor<MyCommand>('my_command');
|
|
212
|
+
const resolved3 = scope.resolveConstructor<MyCommand>('MyCommand');
|
|
177
213
|
expect(resolved).toBe(MyCommand);
|
|
214
|
+
expect(resolved2).toBe(MyCommand);
|
|
215
|
+
expect(resolved3).toBe(MyCommand);
|
|
178
216
|
|
|
179
|
-
|
|
217
|
+
expect(() => {
|
|
218
|
+
scope.resolveConstructor<MyCommand>('my--command');
|
|
219
|
+
}).toThrow();
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
const instance = new resolved({ foo: 'bar' });
|
|
180
223
|
|
|
181
224
|
expect(instance).toBeInstanceOf(MyCommand);
|
|
182
225
|
expect(instance.foo).toBe('bar');
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { A_Context } from '@adaas/a-concept/global/A-Context/A-Context.class';
|
|
2
|
+
import fs from 'fs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Base hooks for tests
|
|
6
|
+
*/
|
|
7
|
+
beforeAll(async () => {
|
|
8
|
+
|
|
9
|
+
return Promise.resolve();
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
afterAll(async () => {
|
|
13
|
+
try {
|
|
14
|
+
fs.unlinkSync('a-concept.conf.json');
|
|
15
|
+
|
|
16
|
+
} catch (error) {
|
|
17
|
+
|
|
18
|
+
}
|
|
19
|
+
return Promise.resolve();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
beforeEach(async () => {
|
|
23
|
+
A_Context.reset();
|
|
24
|
+
return Promise.resolve();
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
afterEach(async () => {
|
|
28
|
+
A_Context.reset();
|
|
29
|
+
return Promise.resolve();
|
|
30
|
+
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A_Command.constants.js","sourceRoot":"","sources":["../../../../src/base/A-Command/A_Command.constants.ts"],"names":[],"mappings":";;;AAEA,IAAY,6BAKX;AALD,WAAY,6BAA6B;IACrC,4DAA2B,CAAA;IAC3B,4DAA2B,CAAA;IAC3B,wDAAuB,CAAA;IACvB,kDAAiB,CAAA;AACrB,CAAC,EALW,6BAA6B,6CAA7B,6BAA6B,QAKxC;AAED,IAAY,8BAIX;AAJD,WAAY,8BAA8B;IACtC,qDAAmB,CAAA;IACnB,uDAAqB,CAAA;IACrB,+CAAa,CAAA;AACjB,CAAC,EAJW,8BAA8B,8CAA9B,8BAA8B,QAIzC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A_Command.entity.js","sourceRoot":"","sources":["../../../../src/base/A-Command/A_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B,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,EACtE,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,SAAS,EAChE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,IACrF;IACL,CAAC;IAAA,CAAC;CAEL;AArRD,8BAqRC;AAhKS;IADL,2BAAS,CAAC,MAAM,EAAE;iCAUlB;AAMK;IADL,2BAAS,CAAC,MAAM,EAAE;iCAOlB;AAOK;IADL,2BAAS,CAAC,MAAM,EAAE;iCAOlB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { A_TYPES__Entity_JSON } from "../../global/A-Entity/A-Entity.types";
|
|
2
|
-
import { A_Command } from "./A_Command.entity";
|
|
3
|
-
import { A_CONSTANTS__A_Command_Status } from "./A_Command.constants";
|
|
4
|
-
import { A_TYPES__Error } from "@adaas/a-utils";
|
|
5
|
-
export type A_TYPES__Command_Constructor = {};
|
|
6
|
-
export type A_TYPES__Command_Serialized<ResultType extends Record<string, any> = Record<string, any>> = {
|
|
7
|
-
code: string;
|
|
8
|
-
status: A_CONSTANTS__A_Command_Status;
|
|
9
|
-
startedAt?: string;
|
|
10
|
-
endedAt?: string;
|
|
11
|
-
duration?: number;
|
|
12
|
-
result?: ResultType;
|
|
13
|
-
errors?: Array<A_TYPES__Error>;
|
|
14
|
-
} & A_TYPES__Entity_JSON;
|
|
15
|
-
export type A_TYPES__Command_Listener<T extends Record<string, any> = Record<string, any>> = (command?: A_Command<any, T>) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A_Command.types.js","sourceRoot":"","sources":["../../../../src/base/A-Command/A_Command.types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"A_Command.context.js","sourceRoot":"","sources":["../../../../../src/base/A-Command/context/A_Command.context.ts"],"names":[],"mappings":";;;AAAA,0FAAiF;AAIjF,MAAa,gBAEX,SAAQ,6BAAU;IAchB;;;OAGG;IACH,YAAY,gBAAmB,EAAO;QAClC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC;QACtD,IAAI,CAAC,OAAO,GAAG,IAAI,GAAG,EAAE,CAAC;IAC7B,CAAC;IAGD,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IAC5D,CAAC;IAGD;;;;;OAKG;IACH,mBAAmB,CACf,YAA4B;QAE5B,OAAO,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,KAAc;QAChB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;IAED;;;;;OAKG;IACH,IAAI;IACA;;OAEG;IACH,GAAM;IACN;;OAEG;IACH,KAAW;QAEX,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;IACjC,CAAC;IAGD;;;;OAIG;IACH,IAAI,CAAC,GAAY;QACb,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAC;IAED;;OAEG;IACH,KAAK;QACD,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;IACzB,CAAC;IAGD;;;;;;OAMG;IACH,MAAM;QACF,MAAM,GAAG,GAAwB,EAAE,CAAC;QAEpC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;YAChC,GAAG,CAAC,GAAa,CAAC;gBACd,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,QAAQ,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,MAAM,KAAK,UAAU;oBAClG,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE;oBAChB,CAAC,CAAC,KAAK,CAAC;QACpB,CAAC,CAAC,CAAA;QAEF,OAAO,GAAG,CAAC;IACf,CAAC;CACJ;AA7GD,4CA6GC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { A_TYPES__Entity_JSON } from "@adaas/a-concept/global/A-Entity/A-Entity.types";
|
|
2
|
-
import { A_CommandContext } from "./context/A_Command.context";
|
|
3
|
-
import { A_Command } from "./A_Command.entity";
|
|
4
|
-
import { A_CONSTANTS__A_Command_Status } from "./A_Command.constants";
|
|
5
|
-
import { A_Error, A_TYPES__Error } from "@adaas/a-utils";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export type A_TYPES__Command_Constructor = {
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export type A_TYPES__Command_Serialized<
|
|
15
|
-
ResultType extends Record<string, any> = Record<string, any>
|
|
16
|
-
> = {
|
|
17
|
-
code: string;
|
|
18
|
-
status: A_CONSTANTS__A_Command_Status;
|
|
19
|
-
|
|
20
|
-
startedAt?: string;
|
|
21
|
-
endedAt?: string;
|
|
22
|
-
duration?: number;
|
|
23
|
-
|
|
24
|
-
result?: ResultType;
|
|
25
|
-
errors?: Array<A_TYPES__Error>;
|
|
26
|
-
|
|
27
|
-
} & A_TYPES__Entity_JSON
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
export type A_TYPES__Command_Listener<
|
|
33
|
-
T extends Record<string, any> = Record<string, any>
|
|
34
|
-
> = (command?: A_Command<any, T>) => void;
|
|
File without changes
|
/package/src/{base/A-Command/A_Command.constants.ts → global/A-Command/A-Command.constants.ts}
RENAMED
|
File without changes
|
|
File without changes
|