taon 19.0.6 → 19.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 +175 -175
- package/bin/start.js +279 -279
- package/bin/taon +6 -6
- package/bin/taon-debug +5 -5
- package/bin/taon-debug-brk +5 -5
- package/browser/README.md +24 -24
- package/browser/fesm2022/taon.mjs +4040 -4072
- package/browser/fesm2022/taon.mjs.map +1 -1
- package/browser/lib/base-classes/base-angular-service.d.ts +14 -0
- package/browser/lib/base-classes/base-custom-repository.d.ts +4 -0
- package/browser/lib/base-classes/base-entity.d.ts +9 -0
- package/browser/lib/base-classes/base-injector.d.ts +15 -9
- package/browser/lib/base-classes/base-repository.d.ts +27 -13
- package/browser/lib/base-classes/base.d.ts +8 -4
- package/browser/lib/create-context.d.ts +2 -1
- package/browser/lib/endpoint-context.d.ts +6 -5
- package/browser/lib/index.d.ts +7 -6
- package/browser/package.json +1 -1
- package/cli.js.map +1 -1
- package/client/README.md +24 -24
- package/client/fesm2022/taon.mjs +4040 -4072
- package/client/fesm2022/taon.mjs.map +1 -1
- package/client/lib/base-classes/base-angular-service.d.ts +14 -0
- package/client/lib/base-classes/base-custom-repository.d.ts +4 -0
- package/client/lib/base-classes/base-entity.d.ts +9 -0
- package/client/lib/base-classes/base-injector.d.ts +15 -9
- package/client/lib/base-classes/base-repository.d.ts +27 -13
- package/client/lib/base-classes/base.d.ts +8 -4
- package/client/lib/create-context.d.ts +2 -1
- package/client/lib/endpoint-context.d.ts +6 -5
- package/client/lib/index.d.ts +7 -6
- package/client/package.json +1 -1
- package/index.js.map +1 -1
- package/lib/base-classes/base-abstract-entity.js.map +1 -1
- package/lib/base-classes/base-angular-service.d.ts +10 -0
- package/lib/base-classes/base-angular-service.js +19 -0
- package/lib/base-classes/base-angular-service.js.map +1 -0
- package/lib/base-classes/base-class.js.map +1 -1
- package/lib/base-classes/base-context.js.map +1 -1
- package/lib/base-classes/base-controller.js.map +1 -1
- package/lib/base-classes/base-crud-controller.js.map +1 -1
- package/lib/base-classes/base-custom-repository.d.ts +3 -0
- package/lib/base-classes/base-custom-repository.js +19 -0
- package/lib/base-classes/base-custom-repository.js.map +1 -0
- package/lib/base-classes/base-entity.d.ts +10 -1
- package/lib/base-classes/base-entity.js +13 -2
- package/lib/base-classes/base-entity.js.map +1 -1
- package/lib/base-classes/base-injector.d.ts +15 -9
- package/lib/base-classes/base-injector.js +19 -17
- package/lib/base-classes/base-injector.js.map +1 -1
- package/lib/base-classes/base-migration.js.map +1 -1
- package/lib/base-classes/base-provider.js.map +1 -1
- package/lib/base-classes/base-repository.d.ts +25 -12
- package/lib/base-classes/base-repository.js +32 -80
- package/lib/base-classes/base-repository.js.map +1 -1
- package/lib/base-classes/base-subscriber-for-entity.js.map +1 -1
- package/lib/base-classes/base-subscriber.d.ts +4 -0
- package/lib/base-classes/base-subscriber.js +25 -0
- package/lib/base-classes/base-subscriber.js.map +1 -0
- package/lib/base-classes/base.d.ts +8 -4
- package/lib/base-classes/base.js +9 -5
- package/lib/base-classes/base.js.map +1 -1
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/build-info._auto-generated_.js.map +1 -1
- package/lib/constants.js.map +1 -1
- package/lib/context-db-migrations.js.map +1 -1
- package/lib/create-context.d.ts +1 -0
- package/lib/create-context.js +1 -5
- package/lib/create-context.js.map +1 -1
- package/lib/decorators/classes/controller-decorator.js.map +1 -1
- package/lib/decorators/classes/entity-decorator.js.map +1 -1
- package/lib/decorators/classes/migration-decorator.js.map +1 -1
- package/lib/decorators/classes/provider-decorator.js.map +1 -1
- package/lib/decorators/classes/repository-decorator.js.map +1 -1
- package/lib/decorators/classes/subscriber-decorator.js.map +1 -1
- package/lib/decorators/http/http-decorators.js.map +1 -1
- package/lib/decorators/http/http-methods-decorators.js.map +1 -1
- package/lib/decorators/http/http-params-decorators.js.map +1 -1
- package/lib/dependency-injection/di-container.js.map +1 -1
- package/lib/endpoint-context.d.ts +8 -5
- package/lib/endpoint-context.js +170 -179
- package/lib/endpoint-context.js.map +1 -1
- package/lib/entity-process.js.map +1 -1
- package/lib/env.js.map +1 -1
- package/lib/formly/formly-group-wrapper-component.js.map +1 -1
- package/lib/formly/formly-repeat-component.js.map +1 -1
- package/lib/formly/formly.models.js.map +1 -1
- package/lib/formly/fromly.js.map +1 -1
- package/lib/formly/type-from-entity.js.map +1 -1
- package/lib/get-response-value.js.map +1 -1
- package/lib/helpers/class-helpers.js.map +1 -1
- package/lib/helpers/taon-helpers.js.map +1 -1
- package/lib/index._auto-generated_.js.map +1 -1
- package/lib/index.d.ts +7 -6
- package/lib/index.js +11 -10
- package/lib/index.js.map +1 -1
- package/lib/inject.js +3 -1
- package/lib/inject.js.map +1 -1
- package/lib/models.js.map +1 -1
- package/lib/orm.d.ts +15 -2
- package/lib/orm.js +41 -3
- package/lib/orm.js.map +1 -1
- package/lib/realtime/realtime-client.js.map +1 -1
- package/lib/realtime/realtime-core.js.map +1 -1
- package/lib/realtime/realtime-server.js.map +1 -1
- package/lib/realtime/realtime-strategy/index.js.map +1 -1
- package/lib/realtime/realtime-strategy/realtime-abstract-mock.d.ts +10 -0
- package/lib/realtime/realtime-strategy/realtime-abstract-mock.js +214 -0
- package/lib/realtime/realtime-strategy/realtime-abstract-mock.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.d.ts +0 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.js +5 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/index.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.d.ts +22 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.js +139 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-namespace.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.d.ts +16 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.js +68 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-main-wrapper.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.d.ts +10 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.js +56 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-namespace.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.d.ts +10 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.js +50 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc-renderer-wrapper.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.d.ts +13 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.js +3 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc-models/realtime-strategy-ipc.models.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-ipc.js.map +1 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.d.ts +2 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.js +6 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/index.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.d.ts +16 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.js +54 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-client.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.d.ts +17 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.js +52 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-namespaces.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.d.ts +11 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.js +39 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-server.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.d.ts +13 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.js +46 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock-socket.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.d.ts +11 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.js +3 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock-models/realtime-strategy-mock.models.js.map +1 -0
- package/lib/realtime/realtime-strategy/realtime-strategy-mock.js.map +1 -1
- package/lib/realtime/realtime-strategy/realtime-strategy-socket-io.js.map +1 -1
- package/lib/realtime/realtime-strategy/realtime-strategy.js.map +1 -1
- package/lib/realtime/realtime-subs-manager.js.map +1 -1
- package/lib/realtime/realtime.models.js.map +1 -1
- package/lib/storage.js.map +1 -1
- package/lib/symbols.js.map +1 -1
- package/lib/ui/directives/firedev-inject-html.directive.d.ts +6 -0
- package/lib/ui/directives/firedev-long-press.directive.d.ts +22 -0
- package/lib/ui/directives/index.js +2 -2
- package/lib/ui/directives/index.js.map +1 -1
- package/lib/ui/directives/view-mode.js.map +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/index.js.map +1 -1
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js +5 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/index.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.component.d.ts +29 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-admin-edit-mode/taon-admin-edit-mode.module.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.d.ts +1 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js +5 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/index.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-db-admin/taon-db-admin.component.d.ts +8 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js +5 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/index.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.component.d.ts +13 -0
- package/lib/ui/taon-admin-mode-configuration/components/taon-file-general-opt/taon-file-general-opt.module.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/index.js.map +1 -1
- package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.d.ts +5 -0
- package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js +3 -0
- package/lib/ui/taon-admin-mode-configuration/models/taon-admin-mode-tabs.js.map +1 -0
- package/lib/ui/taon-admin-mode-configuration/taon-admin-control.service.d.ts +14 -0
- package/lib/ui/taon-admin-mode-configuration/taon-admin-mode-configuration.module.d.ts +2 -0
- package/lib/ui/taon-admin-mode-configuration/taon-admin.models.js.map +1 -1
- package/lib/ui/taon-github-fork-me-corner/index.js +2 -2
- package/lib/ui/taon-github-fork-me-corner/index.js.map +1 -1
- package/lib/ui/taon-github-fork-me-ribbon/index.js +2 -2
- package/lib/ui/taon-github-fork-me-ribbon/index.js.map +1 -1
- package/lib/ui/taon-notifications/index.js.map +1 -1
- package/lib/ui/taon-notifications/taon-notifications.models.js +2 -2
- package/lib/ui/taon-notifications/taon-notifications.models.js.map +1 -1
- package/lib/ui/taon-progress-bar/index.js +2 -2
- package/lib/ui/taon-progress-bar/index.js.map +1 -1
- package/lib/ui/taon-session-passcode/index.js +2 -2
- package/lib/ui/taon-session-passcode/index.js.map +1 -1
- package/lib/ui/taon-table/index.js +2 -2
- package/lib/ui/taon-table/index.js.map +1 -1
- package/lib/ui/taon.models.js.map +1 -1
- package/lib/ui/toan-full-material.module.d.ts +2 -0
- package/lib/validators.js.map +1 -1
- package/migrations/index.js.map +1 -1
- package/migrations/migrations_index._auto-generated_.js.map +1 -1
- package/old-app .js.map +1 -1
- package/package.json +1 -1
- package/playground.js.map +1 -1
- package/tmp-environment.json +3 -3
- package/websql/README.md +24 -24
- package/websql/fesm2022/taon.mjs +4771 -4745
- package/websql/fesm2022/taon.mjs.map +1 -1
- package/websql/lib/base-classes/base-angular-service.d.ts +14 -0
- package/websql/lib/base-classes/base-custom-repository.d.ts +4 -0
- package/websql/lib/base-classes/base-entity.d.ts +9 -0
- package/websql/lib/base-classes/base-injector.d.ts +15 -9
- package/websql/lib/base-classes/base-repository.d.ts +25 -12
- package/websql/lib/base-classes/base.d.ts +8 -4
- package/websql/lib/create-context.d.ts +2 -1
- package/websql/lib/endpoint-context.d.ts +8 -5
- package/websql/lib/index.d.ts +7 -6
- package/websql/lib/orm.d.ts +15 -2
- package/websql/package.json +1 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
import { TaonContext } from '../create-context';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* TODO prevent calling methods when not initialized
|
|
6
|
+
* with init(ctx)
|
|
7
|
+
*/
|
|
8
|
+
export declare abstract class BaseAngularsService {
|
|
9
|
+
protected currentContext: TaonContext;
|
|
10
|
+
init(currentContext: TaonContext): void;
|
|
11
|
+
protected abstract initControllers(): void;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseAngularsService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BaseAngularsService>;
|
|
14
|
+
}
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
+
import { RelationPath } from 'taon-typeorm/browser';
|
|
2
3
|
import { BaseClass } from './base-class';
|
|
3
4
|
export declare abstract class BaseEntity<
|
|
4
5
|
/**
|
|
5
6
|
* type for cloning
|
|
6
7
|
*/
|
|
7
8
|
CloneT extends BaseClass = any> extends BaseClass<CloneT> {
|
|
9
|
+
/**
|
|
10
|
+
* simple check if relation is ok
|
|
11
|
+
*/
|
|
12
|
+
relation(relationName: RelationPath<CloneT>): string;
|
|
13
|
+
/**
|
|
14
|
+
* simple check if relation is ok
|
|
15
|
+
*/
|
|
16
|
+
relations(relationNames: RelationPath<CloneT>[]): string[];
|
|
8
17
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { EndpointContext } from '../endpoint-context';
|
|
3
|
-
import type { BaseRepository } from './base-repository';
|
|
4
3
|
import { BaseClass } from './base-class';
|
|
4
|
+
import { BaseCustomRepository } from './base-custom-repository';
|
|
5
|
+
import type { BaseRepository } from './base-repository';
|
|
5
6
|
export declare class BaseInjector<CloneT extends BaseClass = any> {
|
|
6
7
|
/**
|
|
7
8
|
* for proxy purposes
|
|
@@ -29,14 +30,23 @@ export declare class BaseInjector<CloneT extends BaseClass = any> {
|
|
|
29
30
|
* inject crud repo for entity
|
|
30
31
|
*/
|
|
31
32
|
injectRepo<T>(entityForCrud: new (...args: any[]) => T): BaseRepository<T>;
|
|
32
|
-
injectCustomRepository<T>(cutomRepositoryClass: new (...args: any[]) => T): T;
|
|
33
|
+
injectCustomRepository<T extends BaseCustomRepository>(cutomRepositoryClass: new (...args: any[]) => T): T;
|
|
34
|
+
/**
|
|
35
|
+
* aliast to this.injectRepository()
|
|
36
|
+
*/
|
|
37
|
+
injectCustomRepo<T extends BaseCustomRepository>(cutomRepositoryClass: new (...args: any[]) => T): T;
|
|
33
38
|
/**
|
|
34
|
-
*
|
|
39
|
+
* example usage:
|
|
40
|
+
* ...
|
|
41
|
+
* exampleController = this.injectController(ExampleController);
|
|
42
|
+
* ...
|
|
35
43
|
*/
|
|
36
|
-
injectCustomRepo<T>(cutomRepositoryClass: new (...args: any[]) => T): T;
|
|
37
44
|
injectController<T>(ctor: new (...args: any[]) => T): T;
|
|
38
45
|
/**
|
|
39
|
-
*
|
|
46
|
+
* example usage:
|
|
47
|
+
* ...
|
|
48
|
+
* exampleSubscriber = this.injectSubscriber(ExampleSubscriber)
|
|
49
|
+
* ...
|
|
40
50
|
*/
|
|
41
51
|
injectSubscriber<T>(ctor: new (...args: any[]) => T): T;
|
|
42
52
|
/**
|
|
@@ -52,10 +62,6 @@ export declare class BaseInjector<CloneT extends BaseClass = any> {
|
|
|
52
62
|
* TODO
|
|
53
63
|
*/
|
|
54
64
|
injectContextProvider<T>(ctor: new (...args: any[]) => T): T;
|
|
55
|
-
/**
|
|
56
|
-
* Repositories to init (by controller)
|
|
57
|
-
*/
|
|
58
|
-
protected __repositories_to_init__: BaseRepository<any>[];
|
|
59
65
|
/**
|
|
60
66
|
* Inject: Controllers, Providers, Repositories, Services, etc.
|
|
61
67
|
* TODO addd nest js injecting
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import type
|
|
3
|
-
import type { QueryDeepPartialEntity } from 'taon-typeorm/
|
|
4
|
-
import type { UpsertOptions } from 'taon-typeorm/
|
|
5
|
-
import type { DataSource as DataSourceType } from 'taon-typeorm/browser';
|
|
2
|
+
import { type DeepPartial, type FindManyOptions, type FindOneOptions, type FindOptionsWhere, type InsertResult, type Repository, type SaveOptions, type UpdateResult } from 'taon-typeorm/browser';
|
|
3
|
+
import type { QueryDeepPartialEntity } from 'taon-typeorm/browser';
|
|
4
|
+
import type { UpsertOptions } from 'taon-typeorm/browser';
|
|
5
|
+
import type { DataSource as DataSourceType, QueryRunner, SelectQueryBuilder } from 'taon-typeorm/browser';
|
|
6
6
|
import { MySqlQuerySource } from 'taon-type-sql/browser';
|
|
7
|
-
import {
|
|
7
|
+
import { BaseCustomRepository } from './base-custom-repository';
|
|
8
8
|
export declare abstract class BaseRepository<Entity extends {
|
|
9
9
|
id?: any;
|
|
10
|
-
}> extends
|
|
11
|
-
private __entityClassResolveFn;
|
|
10
|
+
}> extends BaseCustomRepository {
|
|
12
11
|
abstract entityClassResolveFn: () => any;
|
|
13
12
|
constructor(__entityClassResolveFn: () => any);
|
|
14
13
|
private __dbQuery;
|
|
15
14
|
get dbQuery(): MySqlQuerySource;
|
|
16
15
|
get connection(): DataSourceType;
|
|
17
|
-
protected get repository():
|
|
16
|
+
protected get repository(): Repository<Entity>;
|
|
18
17
|
/**
|
|
19
18
|
* target for repository
|
|
20
19
|
*/
|
|
@@ -22,9 +21,8 @@ export declare abstract class BaseRepository<Entity extends {
|
|
|
22
21
|
/**
|
|
23
22
|
* alias to repository
|
|
24
23
|
*/
|
|
25
|
-
protected get repo():
|
|
24
|
+
protected get repo(): Repository<Entity>;
|
|
26
25
|
get repositoryExists(): boolean;
|
|
27
|
-
__init(context?: any): Promise<void>;
|
|
28
26
|
/**
|
|
29
27
|
* Checks if entity has an id.
|
|
30
28
|
* If entity composite compose ids, it will check them all.
|
|
@@ -46,9 +44,20 @@ export declare abstract class BaseRepository<Entity extends {
|
|
|
46
44
|
* -> it will actuall create new entity in db
|
|
47
45
|
* in oposite to typeorm create method
|
|
48
46
|
*/
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Creates a new entity instance.
|
|
49
|
+
*/
|
|
50
|
+
create(): Entity;
|
|
51
|
+
/**
|
|
52
|
+
* Creates new entities and copies all entity properties from given objects into their new entities.
|
|
53
|
+
* Note that it copies only properties that are present in entity schema.
|
|
54
|
+
*/
|
|
55
|
+
create(entityLikeArray: DeepPartial<Entity>[]): Entity[];
|
|
56
|
+
/**
|
|
57
|
+
* Creates a new entity instance and copies all entity properties from this object into a new entity.
|
|
58
|
+
* Note that it copies only properties that are present in entity schema.
|
|
59
|
+
*/
|
|
60
|
+
create(entityLike: DeepPartial<Entity>): Entity;
|
|
52
61
|
bulkSave(items: Entity[], options?: SaveOptions & {
|
|
53
62
|
reload: false;
|
|
54
63
|
}): Promise<Entity[]>;
|
|
@@ -227,6 +236,11 @@ export declare abstract class BaseRepository<Entity extends {
|
|
|
227
236
|
* Raw query execution is supported only by relational databases (MongoDB is not supported).
|
|
228
237
|
*/
|
|
229
238
|
query(query: string, parameters?: any[]): Promise<any>;
|
|
239
|
+
/**
|
|
240
|
+
* Executes a raw SQL query and returns a raw database results.
|
|
241
|
+
* Raw query execution is supported only by relational databases (MongoDB is not supported).
|
|
242
|
+
*/
|
|
243
|
+
createQueryBuilder(alias?: string, queryRunner?: QueryRunner): SelectQueryBuilder<Entity>;
|
|
230
244
|
/**
|
|
231
245
|
* Clears all the data from the given table/collection (truncates/drops it).
|
|
232
246
|
*
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
+
import * as abstractEntity from './base-abstract-entity';
|
|
3
|
+
import * as baseService from './base-angular-service';
|
|
4
|
+
import * as baseClass from './base-class';
|
|
2
5
|
import * as controller from './base-controller';
|
|
3
6
|
import * as crudController from './base-crud-controller';
|
|
7
|
+
import * as customRepository from './base-custom-repository';
|
|
4
8
|
import * as entity from './base-entity';
|
|
5
|
-
import * as
|
|
6
|
-
import * as repository from './base-repository';
|
|
9
|
+
import * as baseMigration from './base-migration';
|
|
7
10
|
import * as provider from './base-provider';
|
|
8
|
-
import * as
|
|
11
|
+
import * as repository from './base-repository';
|
|
9
12
|
import * as baseSubscriberEntity from './base-subscriber-for-entity';
|
|
10
|
-
import * as baseMigration from './base-migration';
|
|
11
13
|
export declare namespace Base {
|
|
12
14
|
export import Controller = controller.BaseController;
|
|
13
15
|
export import CrudController = crudController.BaseCrudController;
|
|
@@ -17,8 +19,10 @@ export declare namespace Base {
|
|
|
17
19
|
export import Provider = provider.BaseProvider;
|
|
18
20
|
export import Class = baseClass.BaseClass;
|
|
19
21
|
export import Repository = repository.BaseRepository;
|
|
22
|
+
export import CustomRepository = customRepository.BaseCustomRepository;
|
|
20
23
|
export import SubscriberForEntity = baseSubscriberEntity.BaseSubscriberForEntity;
|
|
21
24
|
export import Migration = baseMigration.BaseMigration;
|
|
25
|
+
export import AngularService = baseService.BaseAngularsService;
|
|
22
26
|
const Context: {
|
|
23
27
|
types: {
|
|
24
28
|
readonly controllers: any;
|
|
@@ -82,4 +82,5 @@ export declare const createContext: <CTX extends Record<string, object>, CTRL ex
|
|
|
82
82
|
readonly client: import("./realtime/realtime-client").RealtimeClient;
|
|
83
83
|
readonly server: import("./realtime/realtime-server").RealtimeServer;
|
|
84
84
|
};
|
|
85
|
-
};
|
|
85
|
+
};
|
|
86
|
+
export type TaonContext = ReturnType<typeof createContext>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
-
import {
|
|
3
|
-
import type { Application } from 'express';
|
|
2
|
+
import type { Server } from 'http';
|
|
4
3
|
import type { NgZone } from '@angular/core';
|
|
4
|
+
import type { Application } from 'express';
|
|
5
5
|
import { DataSource } from 'taon-typeorm/browser';
|
|
6
|
-
import type { Server } from 'http';
|
|
7
6
|
import type { BaseClass } from './base-classes/base-class';
|
|
8
7
|
import { ContextDbMigrations } from './context-db-migrations';
|
|
8
|
+
import { Models } from './models';
|
|
9
9
|
export declare class EndpointContext {
|
|
10
10
|
private originalConfig;
|
|
11
11
|
private configFn;
|
|
@@ -65,7 +65,7 @@ export declare class EndpointContext {
|
|
|
65
65
|
}): Promise<void>;
|
|
66
66
|
private getAutoGeneratedConfig;
|
|
67
67
|
get ngZone(): any;
|
|
68
|
-
startServer():
|
|
68
|
+
startServer(): Promise<void>;
|
|
69
69
|
displayRoutes(app: any): void;
|
|
70
70
|
get modeAllowsDatabaseCreation(): boolean;
|
|
71
71
|
private cloneClassWithNewMetadata;
|
|
@@ -74,10 +74,11 @@ export declare class EndpointContext {
|
|
|
74
74
|
private getRecrusiveClassesfromContexts;
|
|
75
75
|
getClassInstanceObjBy(classType: Models.ClassType): any;
|
|
76
76
|
private getClassesInstancesArrBy;
|
|
77
|
-
inject<T>(ctor: new (...args: any[]) => T, options
|
|
77
|
+
inject<T>(ctor: new (...args: any[]) => T, options: {
|
|
78
78
|
localInstance?: boolean;
|
|
79
79
|
contextClassInstance?: BaseClass;
|
|
80
80
|
locaInstanceConstructorArgs?: ConstructorParameters<typeof ctor>;
|
|
81
|
+
parentInstanceThatWillGetInjectedStuff: object;
|
|
81
82
|
}): T;
|
|
82
83
|
/**
|
|
83
84
|
* alias for inject
|
package/browser/lib/index.d.ts
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import 'reflect-metadata';
|
|
3
|
-
import
|
|
3
|
+
import { NgZone } from '@angular/core';
|
|
4
4
|
import * as base from './base-classes/base';
|
|
5
5
|
import * as controllerDecorator from './decorators/classes/controller-decorator';
|
|
6
6
|
import * as entityDecorator from './decorators/classes/entity-decorator';
|
|
7
|
+
import * as migrationDecorator from './decorators/classes/migration-decorator';
|
|
7
8
|
import * as providerDecorator from './decorators/classes/provider-decorator';
|
|
8
9
|
import * as repositoryDecorator from './decorators/classes/repository-decorator';
|
|
9
10
|
import * as subscriberDecorator from './decorators/classes/subscriber-decorator';
|
|
10
|
-
import * as
|
|
11
|
-
import * as orm from './orm';
|
|
12
|
-
import * as models from './models';
|
|
11
|
+
import * as http from './decorators/http/http-decorators';
|
|
13
12
|
import * as endpointContext from './endpoint-context';
|
|
13
|
+
import * as models from './models';
|
|
14
|
+
import * as orm from './orm';
|
|
14
15
|
import * as allSymbols from './symbols';
|
|
15
|
-
import { NgZone } from '@angular/core';
|
|
16
16
|
export * from './ui';
|
|
17
17
|
export { EndpointContext } from './endpoint-context';
|
|
18
18
|
export { BaseRepository } from './base-classes/base-repository';
|
|
19
|
+
export { BaseCustomRepository } from './base-classes/base-custom-repository';
|
|
19
20
|
export { BaseController } from './base-classes/base-controller';
|
|
20
21
|
export { BaseProvider } from './base-classes/base-provider';
|
|
21
22
|
export { BaseEntity } from './base-classes/base-entity';
|
|
22
23
|
export { BaseContext } from './base-classes/base-context';
|
|
23
24
|
export { BaseMigration } from './base-classes/base-migration';
|
|
24
|
-
export { createContext } from './create-context';
|
|
25
|
+
export { createContext, TaonContext } from './create-context';
|
|
25
26
|
export { inject } from './inject';
|
|
26
27
|
export { Models } from './models';
|
|
27
28
|
export * from './constants';
|
package/browser/package.json
CHANGED
package/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"cli.js","sourceRoot":"","sources":["c:/Users/darek/projects/npm/taon-dev/taon/src/cli.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,IAAI,QAAQ,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC;AACxC,KAAK;AACL,KAAK;AAGL,IAAI,OAAO,GAAG,QAAQ,CAAC;AACvB,KAAK;AACL,KAAK;AAGE,MAAM,KAAK,GAAG,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,EAAE;IACvD,MAAO,OAAe,CAAC,IAAI,EAAE,aAAa,EAAE,IAAI,CAAC,CAAC;AACpD,CAAC,CAAC;AAFW,QAAA,KAAK,SAEhB;AACF,yBAAyB"}
|
package/client/README.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
# MyLib
|
|
2
|
-
|
|
3
|
-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
|
|
4
|
-
|
|
5
|
-
## Code scaffolding
|
|
6
|
-
|
|
7
|
-
Run `ng generate component component-name --project my-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib`.
|
|
8
|
-
> Note: Don't forget to add `--project my-lib` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
-
|
|
10
|
-
## Build
|
|
11
|
-
|
|
12
|
-
Run `ng build my-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
-
|
|
14
|
-
## Publishing
|
|
15
|
-
|
|
16
|
-
After building your library with `ng build my-lib`, go to the dist folder `cd dist/my-lib` and run `npm publish`.
|
|
17
|
-
|
|
18
|
-
## Running unit tests
|
|
19
|
-
|
|
20
|
-
Run `ng test my-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
-
|
|
22
|
-
## Further help
|
|
23
|
-
|
|
24
|
-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
|
1
|
+
# MyLib
|
|
2
|
+
|
|
3
|
+
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 13.2.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Run `ng generate component component-name --project my-lib` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project my-lib`.
|
|
8
|
+
> Note: Don't forget to add `--project my-lib` or else it will be added to the default project in your `angular.json` file.
|
|
9
|
+
|
|
10
|
+
## Build
|
|
11
|
+
|
|
12
|
+
Run `ng build my-lib` to build the project. The build artifacts will be stored in the `dist/` directory.
|
|
13
|
+
|
|
14
|
+
## Publishing
|
|
15
|
+
|
|
16
|
+
After building your library with `ng build my-lib`, go to the dist folder `cd dist/my-lib` and run `npm publish`.
|
|
17
|
+
|
|
18
|
+
## Running unit tests
|
|
19
|
+
|
|
20
|
+
Run `ng test my-lib` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
|
21
|
+
|
|
22
|
+
## Further help
|
|
23
|
+
|
|
24
|
+
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|