taon 21.0.51 → 21.0.53
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/bin/taon +5 -5
- package/bin/taon-debug +5 -5
- package/bin/taon-debug-brk +4 -4
- package/browser/fesm2022/taon-browser.mjs +11 -1
- package/browser/fesm2022/taon-browser.mjs.map +1 -1
- package/browser/package.json +1 -1
- package/browser-prod/fesm2022/taon-browser.mjs +11 -1
- package/browser-prod/fesm2022/taon-browser.mjs.map +1 -1
- package/browser-prod/package.json +1 -1
- package/icon-menu-taon.svg +15 -15
- package/lib/build-info._auto-generated_.d.ts +1 -1
- package/lib/build-info._auto-generated_.js +1 -1
- package/lib/endpoint-context.d.ts +1 -1
- package/lib/endpoint-context.js +11 -6
- package/lib/endpoint-context.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/ui/index.js +2 -2
- package/lib/ui/taon-admin-mode-configuration/index.js +2 -2
- package/lib-prod/base-classes/base-abstract-entity.js +33 -0
- package/lib-prod/base-classes/base-angular-service.js +56 -0
- package/lib-prod/base-classes/base-class.js +37 -0
- package/lib-prod/base-classes/base-context.js +21 -0
- package/lib-prod/base-classes/base-controller.js +162 -0
- package/lib-prod/base-classes/base-crud-controller.js +235 -0
- package/lib-prod/base-classes/base-custom-repository.js +20 -0
- package/lib-prod/base-classes/base-electron-service.js +0 -0
- package/lib-prod/base-classes/base-entity.js +32 -0
- package/lib-prod/base-classes/base-file-upload.middleware.js +78 -0
- package/lib-prod/base-classes/base-injector.js +202 -0
- package/lib-prod/base-classes/base-middleware.js +6 -0
- package/lib-prod/base-classes/base-migration.js +23 -0
- package/lib-prod/base-classes/base-provider.js +6 -0
- package/lib-prod/base-classes/base-repository.js +589 -0
- package/lib-prod/base-classes/base-subscriber-for-entity.js +154 -0
- package/lib-prod/base-classes/base.js +0 -0
- package/lib-prod/build-info._auto-generated_.js +14 -0
- package/lib-prod/config/controller-config.js +28 -0
- package/lib-prod/config/controller-options.js +6 -0
- package/lib-prod/config/method-config.js +9 -0
- package/lib-prod/config/param-config.js +9 -0
- package/lib-prod/constants.js +29 -0
- package/lib-prod/context-db-migrations.js +339 -0
- package/lib-prod/create-context.js +152 -0
- package/lib-prod/decorators/classes/controller-decorator.js +21 -0
- package/lib-prod/decorators/classes/entity-decorator.js +49 -0
- package/lib-prod/decorators/classes/middleware-decorator.js +26 -0
- package/lib-prod/decorators/classes/migration-decorator.js +24 -0
- package/lib-prod/decorators/classes/provider-decorator.js +25 -0
- package/lib-prod/decorators/classes/repository-decorator.js +24 -0
- package/lib-prod/decorators/classes/subscriber-decorator.js +25 -0
- package/lib-prod/decorators/decorator-abstract-opt.js +5 -0
- package/lib-prod/decorators/http/http-decorators.js +5 -0
- package/lib-prod/decorators/http/http-methods-decorators.js +144 -0
- package/lib-prod/decorators/http/http-params-decorators.js +68 -0
- package/lib-prod/dependency-injection/di-container.js +31 -0
- package/lib-prod/endpoint-context-storage.js +36 -0
- package/lib-prod/endpoint-context.js +2033 -0
- package/lib-prod/entity-process.js +214 -0
- package/lib-prod/env/env.angular-node-app.js +130 -0
- package/lib-prod/env/env.docs-webapp.js +130 -0
- package/lib-prod/env/env.electron-app.js +130 -0
- package/lib-prod/env/env.mobile-app.js +130 -0
- package/lib-prod/env/env.npm-lib-and-cli-tool.js +130 -0
- package/lib-prod/env/env.vscode-plugin.js +130 -0
- package/lib-prod/env/index.js +6 -0
- package/lib-prod/express-types.js +0 -0
- package/lib-prod/formly/formly.models.js +0 -0
- package/lib-prod/formly/fromly.js +184 -0
- package/lib-prod/formly/type-from-entity.js +58 -0
- package/lib-prod/get-response-value.js +19 -0
- package/lib-prod/global-state/taon-global-state/index.js +5 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.js +20 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.constants.js +10 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js +48 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.entity.js +48 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.js +22 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.models.js +34 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.provider.js +22 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js +47 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.js +29 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.js +11 -0
- package/lib-prod/global-state/taon-transaction-registry/index.js +10 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.js +22 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.js +8 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js +41 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.js +56 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.js +22 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.js +10 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.js +22 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.js +36 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.js +29 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js +6 -0
- package/lib-prod/helpers/class-helpers.js +195 -0
- package/lib-prod/helpers/clone-obj.js +21 -0
- package/lib-prod/helpers/taon-helpers.js +129 -0
- package/lib-prod/index._auto-generated_.js +0 -0
- package/lib-prod/index.js +231 -0
- package/lib-prod/inject.js +34 -0
- package/lib-prod/migrations/index.js +1 -0
- package/lib-prod/migrations/migrations_index._auto-generated_.js +0 -0
- package/lib-prod/models.js +109 -0
- package/lib-prod/orm/columns.js +124 -0
- package/lib-prod/orm/index.js +1 -0
- package/lib-prod/package.json +1 -1
- package/lib-prod/realtime/realtime-client.js +196 -0
- package/lib-prod/realtime/realtime-core.js +82 -0
- package/lib-prod/realtime/realtime-server.js +252 -0
- package/lib-prod/realtime/realtime-strategy/index.js +4 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js +226 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js +262 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.js +21 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy.js +14 -0
- package/lib-prod/realtime/realtime-subs-manager.js +96 -0
- package/lib-prod/realtime/realtime.models.js +0 -0
- package/lib-prod/symbols.js +109 -0
- package/lib-prod/ui/index.js +5 -0
- package/lib-prod/ui/taon-admin-mode-configuration/index.js +5 -0
- package/lib-prod/validators.js +74 -0
- package/package.json +1 -1
- package/websql/fesm2022/taon-websql.mjs +11 -1
- package/websql/fesm2022/taon-websql.mjs.map +1 -1
- package/websql/package.json +1 -1
- package/websql-prod/fesm2022/taon-websql.mjs +11 -1
- package/websql-prod/fesm2022/taon-websql.mjs.map +1 -1
- package/websql-prod/package.json +1 -1
- package/lib-prod/base-classes/base-abstract-entity.ts +0 -34
- package/lib-prod/base-classes/base-angular-service.ts +0 -107
- package/lib-prod/base-classes/base-class.ts +0 -46
- package/lib-prod/base-classes/base-context.ts +0 -21
- package/lib-prod/base-classes/base-controller.ts +0 -240
- package/lib-prod/base-classes/base-crud-controller.ts +0 -298
- package/lib-prod/base-classes/base-custom-repository.ts +0 -10
- package/lib-prod/base-classes/base-electron-service.ts +0 -60
- package/lib-prod/base-classes/base-entity.ts +0 -28
- package/lib-prod/base-classes/base-file-upload.middleware.ts +0 -92
- package/lib-prod/base-classes/base-injector.ts +0 -278
- package/lib-prod/base-classes/base-middleware.ts +0 -71
- package/lib-prod/base-classes/base-migration.ts +0 -26
- package/lib-prod/base-classes/base-provider.ts +0 -8
- package/lib-prod/base-classes/base-repository.ts +0 -942
- package/lib-prod/base-classes/base-subscriber-for-entity.ts +0 -196
- package/lib-prod/base-classes/base.ts +0 -31
- package/lib-prod/build-info._auto-generated_.ts +0 -27
- package/lib-prod/config/controller-config.ts +0 -58
- package/lib-prod/config/controller-options.ts +0 -19
- package/lib-prod/config/method-config.ts +0 -55
- package/lib-prod/config/param-config.ts +0 -16
- package/lib-prod/constants.ts +0 -63
- package/lib-prod/context-db-migrations.ts +0 -488
- package/lib-prod/create-context.ts +0 -345
- package/lib-prod/decorators/classes/controller-decorator.ts +0 -25
- package/lib-prod/decorators/classes/entity-decorator.ts +0 -57
- package/lib-prod/decorators/classes/middleware-decorator.ts +0 -29
- package/lib-prod/decorators/classes/migration-decorator.ts +0 -27
- package/lib-prod/decorators/classes/provider-decorator.ts +0 -28
- package/lib-prod/decorators/classes/repository-decorator.ts +0 -26
- package/lib-prod/decorators/classes/subscriber-decorator.ts +0 -28
- package/lib-prod/decorators/decorator-abstract-opt.ts +0 -4
- package/lib-prod/decorators/http/http-decorators.ts +0 -26
- package/lib-prod/decorators/http/http-methods-decorators.ts +0 -275
- package/lib-prod/decorators/http/http-params-decorators.ts +0 -105
- package/lib-prod/dependency-injection/di-container.ts +0 -39
- package/lib-prod/endpoint-context-storage.ts +0 -47
- package/lib-prod/endpoint-context.ts +0 -3105
- package/lib-prod/entity-process.ts +0 -286
- package/lib-prod/env/env.angular-node-app.ts +0 -66
- package/lib-prod/env/env.docs-webapp.ts +0 -66
- package/lib-prod/env/env.electron-app.ts +0 -66
- package/lib-prod/env/env.mobile-app.ts +0 -66
- package/lib-prod/env/env.npm-lib-and-cli-tool.ts +0 -66
- package/lib-prod/env/env.vscode-plugin.ts +0 -66
- package/lib-prod/env/index.ts +0 -6
- package/lib-prod/express-types.ts +0 -4
- package/lib-prod/formly/formly.models.ts +0 -7
- package/lib-prod/formly/fromly.ts +0 -261
- package/lib-prod/formly/type-from-entity.ts +0 -80
- package/lib-prod/get-response-value.ts +0 -30
- package/lib-prod/global-state/taon-global-state/index.ts +0 -6
- package/lib-prod/global-state/taon-global-state/taon-global-state.abstract.context.ts +0 -21
- package/lib-prod/global-state/taon-global-state/taon-global-state.constants.ts +0 -9
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.ts +0 -44
- package/lib-prod/global-state/taon-global-state/taon-global-state.entity.ts +0 -40
- package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.ts +0 -12
- package/lib-prod/global-state/taon-global-state/taon-global-state.models.ts +0 -48
- package/lib-prod/global-state/taon-global-state/taon-global-state.provider.ts +0 -16
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.ts +0 -47
- package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.ts +0 -18
- package/lib-prod/global-state/taon-global-state/taon-global-state.utils.ts +0 -21
- package/lib-prod/global-state/taon-transaction-registry/index.ts +0 -11
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.abstract.context.ts +0 -23
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.ts +0 -7
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.ts +0 -38
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.ts +0 -54
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.ts +0 -12
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.ts +0 -6
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.ts +0 -16
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.ts +0 -29
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.ts +0 -20
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.ts +0 -9
- package/lib-prod/helpers/class-helpers.ts +0 -315
- package/lib-prod/helpers/clone-obj.ts +0 -24
- package/lib-prod/helpers/taon-helpers.ts +0 -181
- package/lib-prod/index._auto-generated_.ts +0 -5
- package/lib-prod/index.ts +0 -323
- package/lib-prod/inject.ts +0 -111
- package/lib-prod/lib-info.md +0 -8
- package/lib-prod/migrations/index.ts +0 -2
- package/lib-prod/migrations/migrations-info.md +0 -6
- package/lib-prod/migrations/migrations_index._auto-generated_.ts +0 -5
- package/lib-prod/models.ts +0 -427
- package/lib-prod/orm/columns.ts +0 -121
- package/lib-prod/orm/index.ts +0 -62
- package/lib-prod/realtime/realtime-client.ts +0 -288
- package/lib-prod/realtime/realtime-core.ts +0 -134
- package/lib-prod/realtime/realtime-server.ts +0 -398
- package/lib-prod/realtime/realtime-strategy/index.ts +0 -4
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.ts +0 -344
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.ts +0 -349
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.ts +0 -30
- package/lib-prod/realtime/realtime-strategy/realtime-strategy.ts +0 -21
- package/lib-prod/realtime/realtime-subs-manager.ts +0 -127
- package/lib-prod/realtime/realtime.models.ts +0 -33
- package/lib-prod/symbols.ts +0 -136
- package/lib-prod/ui/index.ts +0 -1
- package/lib-prod/ui/taon-admin-mode-configuration/index.ts +0 -1
- package/lib-prod/validators.ts +0 -103
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// THIS FILE IS GENERATED - DO NOT MODIFY
|
|
2
|
-
export const ENV_VSCODE_PLUGIN_WEBSITE_DOMAIN = 'docs.taon.dev';
|
|
3
|
-
export const ENV_VSCODE_PLUGIN_WEBSITE_TITLE = 'Taon';
|
|
4
|
-
export const ENV_VSCODE_PLUGIN_WEBSITE_USE_DOMAIN = true;
|
|
5
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_TARGET_ARTIFACT = 'vscode-plugin';
|
|
6
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_ENV_NAME = '__';
|
|
7
|
-
export const ENV_VSCODE_PLUGIN_CONTAINER_ONLY = undefined;
|
|
8
|
-
export const ENV_VSCODE_PLUGIN_CONTAINER_END = undefined;
|
|
9
|
-
export const ENV_VSCODE_PLUGIN_CONTAINER_START = undefined;
|
|
10
|
-
export const ENV_VSCODE_PLUGIN_CONTAINER_SKIP_RELEASED = undefined;
|
|
11
|
-
export const ENV_VSCODE_PLUGIN_CONTAINER_SKIP = undefined;
|
|
12
|
-
export const ENV_VSCODE_PLUGIN_INIT_BRANDING = undefined;
|
|
13
|
-
export const ENV_VSCODE_PLUGIN_INIT_STRUCT = undefined;
|
|
14
|
-
export const ENV_VSCODE_PLUGIN_BUILD_PWA_DISABLE_SERVICE_WORKER = undefined;
|
|
15
|
-
export const ENV_VSCODE_PLUGIN_BUILD_PWA_NAME = undefined;
|
|
16
|
-
export const ENV_VSCODE_PLUGIN_BUILD_PWA_SHORT_NAME = undefined;
|
|
17
|
-
export const ENV_VSCODE_PLUGIN_BUILD_PWA_START_URL = undefined;
|
|
18
|
-
export const ENV_VSCODE_PLUGIN_BUILD_ELECTRON_SHOW_DEV_TOOLS = undefined;
|
|
19
|
-
export const ENV_VSCODE_PLUGIN_BUILD_SSR = undefined;
|
|
20
|
-
export const ENV_VSCODE_PLUGIN_BUILD_WEBSQL = undefined;
|
|
21
|
-
export const ENV_VSCODE_PLUGIN_BUILD_PROD = undefined;
|
|
22
|
-
export const ENV_VSCODE_PLUGIN_BUILD_OVERRIDE_OUTPUT_PATH = undefined;
|
|
23
|
-
export const ENV_VSCODE_PLUGIN_BUILD_BASE_HREF = undefined;
|
|
24
|
-
export const ENV_VSCODE_PLUGIN_BUILD_WATCH = undefined;
|
|
25
|
-
export const ENV_VSCODE_PLUGIN_BUILD_GEN_ONLY_CLIENT_CODE = undefined;
|
|
26
|
-
export const ENV_VSCODE_PLUGIN_LOADING_PRE_ANGULAR_BOOTSTRAP_LOADER = undefined;
|
|
27
|
-
export const ENV_VSCODE_PLUGIN_LOADING_PRE_ANGULAR_BOOTSTRAP_BACKGROUND = undefined;
|
|
28
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_CLI_MINIFY = undefined;
|
|
29
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_CLI_INCLUDE_NODE_MODULES = undefined;
|
|
30
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_CLI_UGLIFY = undefined;
|
|
31
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_CLI_OBSCURE = undefined;
|
|
32
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_CLI_COMPRESS = undefined;
|
|
33
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_NODE_BACKEND_APP_MINIFY = undefined;
|
|
34
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_LIB_REMOVE_DTS = undefined;
|
|
35
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_LIB_OBSCURE_FILE_BY_FILE = undefined;
|
|
36
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_LIB_UGLIFY_FILE_BY_FILE = undefined;
|
|
37
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_LIB_INCLUDE_SOURCE_MAPS = undefined;
|
|
38
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_LIB_COMPRESS = undefined;
|
|
39
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_LIB_DO_NOT_INCLUDE_LIB_FILES = undefined;
|
|
40
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_RESOLVED_NEW_VERSION = undefined;
|
|
41
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_RELEASE_VERSION_BUMP_TYPE = undefined;
|
|
42
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_ENV_NUMBER = undefined;
|
|
43
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_INSTALL_LOCALLY = undefined;
|
|
44
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_REMOVE_RELEASE_OUTPUT_AFTER_LOCAL_INSTALL = undefined;
|
|
45
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_RELEASE_TYPE = undefined;
|
|
46
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_AUTO_RELEASE_USING_CONFIG = undefined;
|
|
47
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_AUTO_RELEASE_TASK_NAME = undefined;
|
|
48
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_TAON_INSTANCE_IP = undefined;
|
|
49
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_SKIP_NPM_PUBLISH = undefined;
|
|
50
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_SKIP_DEPLOY = undefined;
|
|
51
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_SKIP_TAG_GIT_PUSH = undefined;
|
|
52
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_SKIP_RELEASE_QUESTION = undefined;
|
|
53
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_SKIP_RESOLVING_GIT_CHANGES = undefined;
|
|
54
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_SKIP_CODE_CUTTING = undefined;
|
|
55
|
-
export const ENV_VSCODE_PLUGIN_RELEASE_SKIP_BUILDING_ARTIFACTS = undefined;
|
|
56
|
-
export const ENV_VSCODE_PLUGIN_COPY_TO_MANAGER_BEFORE_COPY_HOOK = undefined;
|
|
57
|
-
export const ENV_VSCODE_PLUGIN_COPY_TO_MANAGER_COPY_TO_LOCATIONS = undefined;
|
|
58
|
-
export const ENV_VSCODE_PLUGIN_COPY_TO_MANAGER_COPY_TO_PROJECTS = undefined;
|
|
59
|
-
export const ENV_VSCODE_PLUGIN_COPY_TO_MANAGER_SKIP = undefined;
|
|
60
|
-
export const ENV_VSCODE_PLUGIN_PURPOSE = undefined;
|
|
61
|
-
export const ENV_VSCODE_PLUGIN_RECURSIVE_ACTION = undefined;
|
|
62
|
-
export const ENV_VSCODE_PLUGIN_IS_CI_PROCESS = undefined;
|
|
63
|
-
export const ENV_VSCODE_PLUGIN_DOCKER_ADDITIONAL_CONTAINER = undefined;
|
|
64
|
-
export const ENV_VSCODE_PLUGIN_DOCKER_SKIP_START_IN_ORDER = undefined;
|
|
65
|
-
export const ENV_VSCODE_PLUGIN_DOCKER_SKIP_USING_MYSQL_DB = undefined;
|
|
66
|
-
// THIS FILE IS GENERATED - DO NOT MODIFY
|
package/lib-prod/env/index.ts
DELETED
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
import { FormlyFieldConfig } from '@ngx-formly/core';
|
|
2
|
-
import { Mapping__NS__decode, Mapping__NS__DefaultModelWithMapping, Mapping__NS__encode, Mapping__NS__getModelsMapping, Mapping__NS__Mapping, Mapping__NS__ModelValue } from 'ng2-rest/lib-prod';
|
|
3
|
-
import { ___NS__add, ___NS__after, ___NS__ary, ___NS__assign, ___NS__assignIn, ___NS__assignInWith, ___NS__assignWith, ___NS__at, ___NS__attempt, ___NS__before, ___NS__bind, ___NS__bindAll, ___NS__bindKey, ___NS__camelCase, ___NS__capitalize, ___NS__castArray, ___NS__ceil, ___NS__chain, ___NS__chunk, ___NS__clamp, ___NS__clone, ___NS__cloneDeep, ___NS__cloneDeepWith, ___NS__cloneWith, ___NS__compact, ___NS__concat, ___NS__cond, ___NS__conforms, ___NS__conformsTo, ___NS__constant, ___NS__countBy, ___NS__create, ___NS__curry, ___NS__curryRight, ___NS__debounce, ___NS__deburr, ___NS__defaults, ___NS__defaultsDeep, ___NS__defaultTo, ___NS__defer, ___NS__delay, ___NS__difference, ___NS__differenceBy, ___NS__differenceWith, ___NS__divide, ___NS__drop, ___NS__dropRight, ___NS__dropRightWhile, ___NS__dropWhile, ___NS__each, ___NS__eachRight, ___NS__endsWith, ___NS__entries, ___NS__entriesIn, ___NS__eq, ___NS__escape, ___NS__escapeRegExp, ___NS__every, ___NS__extend, ___NS__extendWith, ___NS__fill, ___NS__filter, ___NS__find, ___NS__findIndex, ___NS__findKey, ___NS__findLast, ___NS__findLastIndex, ___NS__findLastKey, ___NS__first, ___NS__flatMap, ___NS__flatMapDeep, ___NS__flatMapDepth, ___NS__flatten, ___NS__flattenDeep, ___NS__flattenDepth, ___NS__flip, ___NS__floor, ___NS__flow, ___NS__flowRight, ___NS__forEach, ___NS__forEachRight, ___NS__forIn, ___NS__forInRight, ___NS__forOwn, ___NS__forOwnRight, ___NS__fromPairs, ___NS__functions, ___NS__functionsIn, ___NS__get, ___NS__groupBy, ___NS__gt, ___NS__gte, ___NS__has, ___NS__hasIn, ___NS__head, ___NS__identity, ___NS__includes, ___NS__indexOf, ___NS__initial, ___NS__inRange, ___NS__intersection, ___NS__intersectionBy, ___NS__intersectionWith, ___NS__invert, ___NS__invertBy, ___NS__invoke, ___NS__invokeMap, ___NS__isArguments, ___NS__isArray, ___NS__isArrayBuffer, ___NS__isArrayLike, ___NS__isArrayLikeObject, ___NS__isBoolean, ___NS__isBuffer, ___NS__isDate, ___NS__isElement, ___NS__isEmpty, ___NS__isEqual, ___NS__isEqualWith, ___NS__isError, ___NS__isFinite, ___NS__isFunction, ___NS__isInteger, ___NS__isLength, ___NS__isMap, ___NS__isMatch, ___NS__isMatchWith, ___NS__isNaN, ___NS__isNative, ___NS__isNil, ___NS__isNull, ___NS__isNumber, ___NS__isObject, ___NS__isObjectLike, ___NS__isPlainObject, ___NS__isRegExp, ___NS__isSafeInteger, ___NS__isSet, ___NS__isString, ___NS__isSymbol, ___NS__isTypedArray, ___NS__isUndefined, ___NS__isWeakMap, ___NS__isWeakSet, ___NS__iteratee, ___NS__join, ___NS__kebabCase, ___NS__keyBy, ___NS__keys, ___NS__keysIn, ___NS__last, ___NS__lastIndexOf, ___NS__lowerCase, ___NS__lowerFirst, ___NS__lt, ___NS__lte, ___NS__map, ___NS__mapKeys, ___NS__mapValues, ___NS__matches, ___NS__matchesProperty, ___NS__max, ___NS__maxBy, ___NS__mean, ___NS__meanBy, ___NS__memoize, ___NS__merge, ___NS__mergeWith, ___NS__method, ___NS__methodOf, ___NS__min, ___NS__minBy, ___NS__mixin, ___NS__multiply, ___NS__negate, ___NS__noop, ___NS__now, ___NS__nth, ___NS__nthArg, ___NS__omit, ___NS__omitBy, ___NS__once, ___NS__orderBy, ___NS__over, ___NS__overArgs, ___NS__overEvery, ___NS__overSome, ___NS__pad, ___NS__padEnd, ___NS__padStart, ___NS__parseInt, ___NS__partial, ___NS__partialRight, ___NS__partition, ___NS__pick, ___NS__pickBy, ___NS__property, ___NS__propertyOf, ___NS__pull, ___NS__pullAll, ___NS__pullAllBy, ___NS__pullAllWith, ___NS__pullAt, ___NS__random, ___NS__range, ___NS__rangeRight, ___NS__rearg, ___NS__reduce, ___NS__reduceRight, ___NS__reject, ___NS__remove, ___NS__repeat, ___NS__replace, ___NS__rest, ___NS__result, ___NS__reverse, ___NS__round, ___NS__sample, ___NS__sampleSize, ___NS__set, ___NS__setWith, ___NS__shuffle, ___NS__size, ___NS__slice, ___NS__snakeCase, ___NS__some, ___NS__sortBy, ___NS__sortedIndex, ___NS__sortedIndexBy, ___NS__sortedIndexOf, ___NS__sortedLastIndex, ___NS__sortedLastIndexBy, ___NS__sortedLastIndexOf, ___NS__sortedUniq, ___NS__sortedUniqBy, ___NS__split, ___NS__spread, ___NS__startCase, ___NS__startsWith, ___NS__stubArray, ___NS__stubFalse, ___NS__stubObject, ___NS__stubString, ___NS__stubTrue, ___NS__subtract, ___NS__sum, ___NS__sumBy, ___NS__tail, ___NS__take, ___NS__takeRight, ___NS__takeRightWhile, ___NS__takeWhile, ___NS__tap, ___NS__template, ___NS__templateSettings, ___NS__throttle, ___NS__thru, ___NS__times, ___NS__toArray, ___NS__toFinite, ___NS__toInteger, ___NS__toLength, ___NS__toLower, ___NS__toNumber, ___NS__toPairs, ___NS__toPairsIn, ___NS__toPath, ___NS__toPlainObject, ___NS__toSafeInteger, ___NS__toString, ___NS__toUpper, ___NS__transform, ___NS__trim, ___NS__trimEnd, ___NS__trimStart, ___NS__truncate, ___NS__unary, ___NS__unescape, ___NS__union, ___NS__unionBy, ___NS__unionWith, ___NS__uniq, ___NS__uniqBy, ___NS__uniqueId, ___NS__uniqWith, ___NS__unset, ___NS__unzip, ___NS__unzipWith, ___NS__update, ___NS__updateWith, ___NS__upperCase, ___NS__upperFirst, ___NS__values, ___NS__valuesIn, ___NS__without, ___NS__words, ___NS__wrap, ___NS__xor, ___NS__xorBy, ___NS__xorWith, ___NS__zip, ___NS__zipObject, ___NS__zipObjectDeep, ___NS__zipWith } from 'tnp-core/lib-prod';
|
|
4
|
-
import { CoreModels__NS__BaseProjectType, CoreModels__NS__BaseProjectTypeArr, CoreModels__NS__CfontAlign, CoreModels__NS__CfontStyle, CoreModels__NS__ClassNameStaticProperty, CoreModels__NS__ContentType, CoreModels__NS__ContentTypeKeys, CoreModels__NS__CoreLibCategory, CoreModels__NS__CutableFileExt, CoreModels__NS__DatabaseType, CoreModels__NS__EnvironmentName, CoreModels__NS__EnvironmentNameTaon, CoreModels__NS__ExecuteOptions, CoreModels__NS__FileEvent, CoreModels__NS__FileExtension, CoreModels__NS__FrameworkVersion, CoreModels__NS__GlobalDependencies, CoreModels__NS__HttpMethod, CoreModels__NS__ImageFileExtension, CoreModels__NS__ImageFileExtensionArr, CoreModels__NS__InstalationType, CoreModels__NS__InstalationTypeArr, CoreModels__NS__LibType, CoreModels__NS__localhostDomain, CoreModels__NS__localhostIp127, CoreModels__NS__ManifestIcon, CoreModels__NS__MediaType, CoreModels__NS__MediaTypeAllArr, CoreModels__NS__MimeType, CoreModels__NS__mimeTypes, CoreModels__NS__MimeTypesObj, CoreModels__NS__NewFactoryType, CoreModels__NS__NpmInstallOptions, CoreModels__NS__NpmSpecialVersions, CoreModels__NS__OrignalClassKey, CoreModels__NS__OutFolder, CoreModels__NS__Package, CoreModels__NS__ParamType, CoreModels__NS__parentLocation, CoreModels__NS__pathToChildren, CoreModels__NS__Position, CoreModels__NS__PreReleaseVersionTag, CoreModels__NS__PROGRESS_DATA_TYPE, CoreModels__NS__PUSHTYPE, CoreModels__NS__PwaManifest, CoreModels__NS__ReleaseVersionType, CoreModels__NS__ReleaseVersionTypeEnum, CoreModels__NS__RunOptions, CoreModels__NS__Size, CoreModels__NS__SPECIAL_APP_READY_MESSAGE, CoreModels__NS__SPECIAL_WORKER_READY_MESSAGE, CoreModels__NS__tagForTaskName, CoreModels__NS__TaonHttpErrorCustomProp, CoreModels__NS__TsUsage, CoreModels__NS__UIFramework, CoreModels__NS__UploadedBackendFile, CoreModels__NS__VSCodeSettings } from 'tnp-core/lib-prod';
|
|
5
|
-
import { CLASS } from 'typescript-class-helpers/lib-prod';
|
|
6
|
-
|
|
7
|
-
import { FormlyInputType } from './formly.models';
|
|
8
|
-
import { findTypeForEntity } from './type-from-entity';
|
|
9
|
-
|
|
10
|
-
export function getFromlyConfigFor(
|
|
11
|
-
target: Function,
|
|
12
|
-
options: {
|
|
13
|
-
formType?: CoreModels__NS__UIFramework;
|
|
14
|
-
keysPathesToInclude?: string[];
|
|
15
|
-
keysPathesToExclude?: string[];
|
|
16
|
-
parentModel?: string;
|
|
17
|
-
relativePath?: string;
|
|
18
|
-
level?: number;
|
|
19
|
-
maxLevel?: number;
|
|
20
|
-
} = {},
|
|
21
|
-
) {
|
|
22
|
-
const {
|
|
23
|
-
formType = 'material',
|
|
24
|
-
keysPathesToExclude = [],
|
|
25
|
-
keysPathesToInclude = [],
|
|
26
|
-
parentModel,
|
|
27
|
-
relativePath = '',
|
|
28
|
-
level = 0,
|
|
29
|
-
maxLevel = 4,
|
|
30
|
-
} = options;
|
|
31
|
-
|
|
32
|
-
if (level === maxLevel) {
|
|
33
|
-
return [];
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
const mapping: Mapping__NS__Mapping = Mapping__NS__getModelsMapping(target);
|
|
37
|
-
// console.log('mapping', mapping)
|
|
38
|
-
const fieldNames = CLASS.describeProperites(target);
|
|
39
|
-
const checkExclude =
|
|
40
|
-
___NS__isArray(keysPathesToExclude) && keysPathesToExclude.length > 0;
|
|
41
|
-
const checkInclude =
|
|
42
|
-
___NS__isArray(keysPathesToInclude) && keysPathesToInclude.length > 0;
|
|
43
|
-
if (checkExclude && checkInclude) {
|
|
44
|
-
throw new Error(
|
|
45
|
-
`In Taon function getFromlyConfigFor(...) please use keysPathesToInclude or keysPathesToExclude, `,
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
// if (checkInclude) {
|
|
49
|
-
// console.log('check include', keysPathesToExclude)
|
|
50
|
-
// }
|
|
51
|
-
|
|
52
|
-
// if (checkExclude) {
|
|
53
|
-
// console.log('check exclude', keysPathesToExclude)
|
|
54
|
-
// }
|
|
55
|
-
|
|
56
|
-
let fields: FormlyFieldConfig[] = [];
|
|
57
|
-
|
|
58
|
-
//#region input to push
|
|
59
|
-
function inputToPush(
|
|
60
|
-
key: string,
|
|
61
|
-
type: FormlyInputType,
|
|
62
|
-
model: string,
|
|
63
|
-
inptToPushOptions?: {
|
|
64
|
-
targetChild?: Function;
|
|
65
|
-
selectOptions?: any[];
|
|
66
|
-
},
|
|
67
|
-
) {
|
|
68
|
-
const { targetChild, selectOptions } = inptToPushOptions || {};
|
|
69
|
-
// console.log(`key(${key}) type: ${type} | model: ${model} targetChild: ${targetChild && targetChild.name}`)
|
|
70
|
-
let res: FormlyFieldConfig;
|
|
71
|
-
if (type === 'repeat') {
|
|
72
|
-
const fieldGroup = getFromlyConfigFor(targetChild, {
|
|
73
|
-
formType,
|
|
74
|
-
keysPathesToInclude,
|
|
75
|
-
keysPathesToExclude,
|
|
76
|
-
relativePath: `${relativePath}.${key}`,
|
|
77
|
-
level: level + 1,
|
|
78
|
-
maxLevel,
|
|
79
|
-
});
|
|
80
|
-
if (fieldGroup.length > 0) {
|
|
81
|
-
res = {
|
|
82
|
-
key,
|
|
83
|
-
type,
|
|
84
|
-
defaultValue: [],
|
|
85
|
-
fieldArray: {
|
|
86
|
-
fieldGroupClassName: 'row',
|
|
87
|
-
templateOptions: {
|
|
88
|
-
label: `Add new ${___NS__startCase(key)}`,
|
|
89
|
-
},
|
|
90
|
-
fieldGroup,
|
|
91
|
-
},
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
} else if (type === 'group') {
|
|
95
|
-
const fieldGroup = getFromlyConfigFor(targetChild, {
|
|
96
|
-
formType,
|
|
97
|
-
keysPathesToInclude,
|
|
98
|
-
keysPathesToExclude,
|
|
99
|
-
parentModel: model,
|
|
100
|
-
relativePath: `${relativePath}.${key}`,
|
|
101
|
-
level: level + 1,
|
|
102
|
-
maxLevel,
|
|
103
|
-
});
|
|
104
|
-
if (fieldGroup.length > 0) {
|
|
105
|
-
res = {
|
|
106
|
-
fieldGroupClassName: 'row',
|
|
107
|
-
templateOptions: {
|
|
108
|
-
label: `${___NS__startCase(key)}`,
|
|
109
|
-
},
|
|
110
|
-
wrappers: ['groupwrap'],
|
|
111
|
-
fieldGroup,
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
} else {
|
|
115
|
-
res = {
|
|
116
|
-
key,
|
|
117
|
-
model,
|
|
118
|
-
type,
|
|
119
|
-
defaultValue: !___NS__isUndefined(target.prototype[key])
|
|
120
|
-
? target.prototype[key]
|
|
121
|
-
: undefined,
|
|
122
|
-
templateOptions: {
|
|
123
|
-
label: ___NS__isString(model)
|
|
124
|
-
? `${model
|
|
125
|
-
.split('.')
|
|
126
|
-
.map(l => ___NS__startCase(l))
|
|
127
|
-
.join(' / ')} / ${___NS__startCase(key)}`
|
|
128
|
-
: ___NS__startCase(key),
|
|
129
|
-
options: selectOptions,
|
|
130
|
-
},
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
if (res) {
|
|
134
|
-
Object.keys(res).forEach(key =>
|
|
135
|
-
res[key] === undefined ? delete res[key] : '',
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
return res;
|
|
139
|
-
}
|
|
140
|
-
//#endregion
|
|
141
|
-
|
|
142
|
-
//#region is allowed path
|
|
143
|
-
function isAlowedPath(key: string) {
|
|
144
|
-
let isAlowed = true;
|
|
145
|
-
const matchPath = relativePath === '' ? key : `${relativePath}:${key}`;
|
|
146
|
-
if (checkExclude) {
|
|
147
|
-
if (keysPathesToExclude.includes(matchPath)) {
|
|
148
|
-
// console.log(`Not allowed key: ${key}`)
|
|
149
|
-
isAlowed = false;
|
|
150
|
-
} else {
|
|
151
|
-
isAlowed = true;
|
|
152
|
-
}
|
|
153
|
-
} else if (checkInclude) {
|
|
154
|
-
if (keysPathesToInclude.includes(matchPath)) {
|
|
155
|
-
// console.log(`Allowed key: ${key}`)
|
|
156
|
-
isAlowed = true;
|
|
157
|
-
} else {
|
|
158
|
-
isAlowed = false;
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
// console.log(`Is allowed;${matchPath} `, isAlowed)
|
|
162
|
-
return isAlowed;
|
|
163
|
-
}
|
|
164
|
-
//#endregion
|
|
165
|
-
|
|
166
|
-
const simpleResolved = [];
|
|
167
|
-
|
|
168
|
-
//#region resolve simple types
|
|
169
|
-
function resolveSimpleTypes() {
|
|
170
|
-
for (const key in target.prototype) {
|
|
171
|
-
if (
|
|
172
|
-
target.prototype.hasOwnProperty(key) &&
|
|
173
|
-
!___NS__isFunction(target.prototype[key])
|
|
174
|
-
) {
|
|
175
|
-
if (!isAlowedPath(key)) {
|
|
176
|
-
continue;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (!___NS__isUndefined(mapping[key])) {
|
|
180
|
-
continue;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
const element = target.prototype[key];
|
|
184
|
-
let type: FormlyInputType = 'input';
|
|
185
|
-
if (___NS__isBoolean(element)) {
|
|
186
|
-
type = 'switch';
|
|
187
|
-
} else if (___NS__isDate(element)) {
|
|
188
|
-
type = 'datepicker';
|
|
189
|
-
} else if (___NS__isFunction(target['getOptionsFor'])) {
|
|
190
|
-
var selectOptions = target['getOptionsFor'](key);
|
|
191
|
-
if (!___NS__isUndefined(selectOptions)) {
|
|
192
|
-
type = 'select';
|
|
193
|
-
}
|
|
194
|
-
} else if (___NS__isFunction(target.prototype?.getOptionsFor)) {
|
|
195
|
-
var selectOptions = target.prototype?.getOptionsFor(key);
|
|
196
|
-
if (!___NS__isUndefined(selectOptions)) {
|
|
197
|
-
type = 'select';
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
fields.push(inputToPush(key, type, parentModel, { selectOptions }));
|
|
201
|
-
simpleResolved.push(key);
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
//#endregion
|
|
206
|
-
|
|
207
|
-
//#region resolve complex types
|
|
208
|
-
function resolveComplexTypes() {
|
|
209
|
-
fieldNames
|
|
210
|
-
.filter(key => !simpleResolved.includes(key))
|
|
211
|
-
.forEach(key => {
|
|
212
|
-
if (isAlowedPath(key) && !___NS__isUndefined(mapping[key])) {
|
|
213
|
-
let className = mapping[key];
|
|
214
|
-
const isArray = ___NS__isArray(className);
|
|
215
|
-
className = isArray ? ___NS__first(className) : className;
|
|
216
|
-
|
|
217
|
-
if (className === 'Date') {
|
|
218
|
-
fields.push(inputToPush(key, 'datepicker', parentModel));
|
|
219
|
-
} else {
|
|
220
|
-
const targetChild = CLASS.getBy(className);
|
|
221
|
-
|
|
222
|
-
if (targetChild) {
|
|
223
|
-
const ftype = findTypeForEntity(targetChild, isArray);
|
|
224
|
-
|
|
225
|
-
if (ftype) {
|
|
226
|
-
fields = fields.concat(
|
|
227
|
-
inputToPush(key, ftype.name as any, key),
|
|
228
|
-
);
|
|
229
|
-
} else {
|
|
230
|
-
if (isArray) {
|
|
231
|
-
fields = fields.concat(
|
|
232
|
-
inputToPush(key, 'repeat', key, { targetChild }),
|
|
233
|
-
);
|
|
234
|
-
} else {
|
|
235
|
-
fields = fields.concat(
|
|
236
|
-
inputToPush(key, 'group', key, { targetChild }),
|
|
237
|
-
);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
});
|
|
244
|
-
}
|
|
245
|
-
//#endregion
|
|
246
|
-
|
|
247
|
-
function generate() {
|
|
248
|
-
resolveSimpleTypes();
|
|
249
|
-
// console.log('after simple', fields);
|
|
250
|
-
resolveComplexTypes();
|
|
251
|
-
// console.log('after complext', fields);
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
generate();
|
|
255
|
-
return fields.filter(f => !!f);
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
export type FormlyArrayTransformFn = (
|
|
259
|
-
fieldsArray: FormlyFieldConfig[],
|
|
260
|
-
fieldObject?: { [propKey: string]: FormlyFieldConfig },
|
|
261
|
-
) => FormlyFieldConfig[];
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { ClassHelpers__NS__asyncHandler, ClassHelpers__NS__ensureClassConfig, ClassHelpers__NS__ensureMethodConfig, ClassHelpers__NS__getClassConfig, ClassHelpers__NS__getClassFnFromObject, ClassHelpers__NS__getControllerConfigs, ClassHelpers__NS__getFullInternalName, ClassHelpers__NS__getMethodsNames, ClassHelpers__NS__getName, ClassHelpers__NS__getOrginalClass, ClassHelpers__NS__getUniqueKey, ClassHelpers__NS__hasParentClassWithName, ClassHelpers__NS__isContextClassObject, ClassHelpers__NS__setName } from '../helpers/class-helpers';
|
|
2
|
-
import { ___NS__add, ___NS__after, ___NS__ary, ___NS__assign, ___NS__assignIn, ___NS__assignInWith, ___NS__assignWith, ___NS__at, ___NS__attempt, ___NS__before, ___NS__bind, ___NS__bindAll, ___NS__bindKey, ___NS__camelCase, ___NS__capitalize, ___NS__castArray, ___NS__ceil, ___NS__chain, ___NS__chunk, ___NS__clamp, ___NS__clone, ___NS__cloneDeep, ___NS__cloneDeepWith, ___NS__cloneWith, ___NS__compact, ___NS__concat, ___NS__cond, ___NS__conforms, ___NS__conformsTo, ___NS__constant, ___NS__countBy, ___NS__create, ___NS__curry, ___NS__curryRight, ___NS__debounce, ___NS__deburr, ___NS__defaults, ___NS__defaultsDeep, ___NS__defaultTo, ___NS__defer, ___NS__delay, ___NS__difference, ___NS__differenceBy, ___NS__differenceWith, ___NS__divide, ___NS__drop, ___NS__dropRight, ___NS__dropRightWhile, ___NS__dropWhile, ___NS__each, ___NS__eachRight, ___NS__endsWith, ___NS__entries, ___NS__entriesIn, ___NS__eq, ___NS__escape, ___NS__escapeRegExp, ___NS__every, ___NS__extend, ___NS__extendWith, ___NS__fill, ___NS__filter, ___NS__find, ___NS__findIndex, ___NS__findKey, ___NS__findLast, ___NS__findLastIndex, ___NS__findLastKey, ___NS__first, ___NS__flatMap, ___NS__flatMapDeep, ___NS__flatMapDepth, ___NS__flatten, ___NS__flattenDeep, ___NS__flattenDepth, ___NS__flip, ___NS__floor, ___NS__flow, ___NS__flowRight, ___NS__forEach, ___NS__forEachRight, ___NS__forIn, ___NS__forInRight, ___NS__forOwn, ___NS__forOwnRight, ___NS__fromPairs, ___NS__functions, ___NS__functionsIn, ___NS__get, ___NS__groupBy, ___NS__gt, ___NS__gte, ___NS__has, ___NS__hasIn, ___NS__head, ___NS__identity, ___NS__includes, ___NS__indexOf, ___NS__initial, ___NS__inRange, ___NS__intersection, ___NS__intersectionBy, ___NS__intersectionWith, ___NS__invert, ___NS__invertBy, ___NS__invoke, ___NS__invokeMap, ___NS__isArguments, ___NS__isArray, ___NS__isArrayBuffer, ___NS__isArrayLike, ___NS__isArrayLikeObject, ___NS__isBoolean, ___NS__isBuffer, ___NS__isDate, ___NS__isElement, ___NS__isEmpty, ___NS__isEqual, ___NS__isEqualWith, ___NS__isError, ___NS__isFinite, ___NS__isFunction, ___NS__isInteger, ___NS__isLength, ___NS__isMap, ___NS__isMatch, ___NS__isMatchWith, ___NS__isNaN, ___NS__isNative, ___NS__isNil, ___NS__isNull, ___NS__isNumber, ___NS__isObject, ___NS__isObjectLike, ___NS__isPlainObject, ___NS__isRegExp, ___NS__isSafeInteger, ___NS__isSet, ___NS__isString, ___NS__isSymbol, ___NS__isTypedArray, ___NS__isUndefined, ___NS__isWeakMap, ___NS__isWeakSet, ___NS__iteratee, ___NS__join, ___NS__kebabCase, ___NS__keyBy, ___NS__keys, ___NS__keysIn, ___NS__last, ___NS__lastIndexOf, ___NS__lowerCase, ___NS__lowerFirst, ___NS__lt, ___NS__lte, ___NS__map, ___NS__mapKeys, ___NS__mapValues, ___NS__matches, ___NS__matchesProperty, ___NS__max, ___NS__maxBy, ___NS__mean, ___NS__meanBy, ___NS__memoize, ___NS__merge, ___NS__mergeWith, ___NS__method, ___NS__methodOf, ___NS__min, ___NS__minBy, ___NS__mixin, ___NS__multiply, ___NS__negate, ___NS__noop, ___NS__now, ___NS__nth, ___NS__nthArg, ___NS__omit, ___NS__omitBy, ___NS__once, ___NS__orderBy, ___NS__over, ___NS__overArgs, ___NS__overEvery, ___NS__overSome, ___NS__pad, ___NS__padEnd, ___NS__padStart, ___NS__parseInt, ___NS__partial, ___NS__partialRight, ___NS__partition, ___NS__pick, ___NS__pickBy, ___NS__property, ___NS__propertyOf, ___NS__pull, ___NS__pullAll, ___NS__pullAllBy, ___NS__pullAllWith, ___NS__pullAt, ___NS__random, ___NS__range, ___NS__rangeRight, ___NS__rearg, ___NS__reduce, ___NS__reduceRight, ___NS__reject, ___NS__remove, ___NS__repeat, ___NS__replace, ___NS__rest, ___NS__result, ___NS__reverse, ___NS__round, ___NS__sample, ___NS__sampleSize, ___NS__set, ___NS__setWith, ___NS__shuffle, ___NS__size, ___NS__slice, ___NS__snakeCase, ___NS__some, ___NS__sortBy, ___NS__sortedIndex, ___NS__sortedIndexBy, ___NS__sortedIndexOf, ___NS__sortedLastIndex, ___NS__sortedLastIndexBy, ___NS__sortedLastIndexOf, ___NS__sortedUniq, ___NS__sortedUniqBy, ___NS__split, ___NS__spread, ___NS__startCase, ___NS__startsWith, ___NS__stubArray, ___NS__stubFalse, ___NS__stubObject, ___NS__stubString, ___NS__stubTrue, ___NS__subtract, ___NS__sum, ___NS__sumBy, ___NS__tail, ___NS__take, ___NS__takeRight, ___NS__takeRightWhile, ___NS__takeWhile, ___NS__tap, ___NS__template, ___NS__templateSettings, ___NS__throttle, ___NS__thru, ___NS__times, ___NS__toArray, ___NS__toFinite, ___NS__toInteger, ___NS__toLength, ___NS__toLower, ___NS__toNumber, ___NS__toPairs, ___NS__toPairsIn, ___NS__toPath, ___NS__toPlainObject, ___NS__toSafeInteger, ___NS__toString, ___NS__toUpper, ___NS__transform, ___NS__trim, ___NS__trimEnd, ___NS__trimStart, ___NS__truncate, ___NS__unary, ___NS__unescape, ___NS__union, ___NS__unionBy, ___NS__unionWith, ___NS__uniq, ___NS__uniqBy, ___NS__uniqueId, ___NS__uniqWith, ___NS__unset, ___NS__unzip, ___NS__unzipWith, ___NS__update, ___NS__updateWith, ___NS__upperCase, ___NS__upperFirst, ___NS__values, ___NS__valuesIn, ___NS__without, ___NS__words, ___NS__wrap, ___NS__xor, ___NS__xorBy, ___NS__xorWith, ___NS__zip, ___NS__zipObject, ___NS__zipObjectDeep, ___NS__zipWith } from 'tnp-core/lib-prod';
|
|
3
|
-
|
|
4
|
-
export function findTypeForEntity(entity: Function, isArray: boolean = false) {
|
|
5
|
-
if (!___NS__isArray(RegisterComponentType.prototype.types)) {
|
|
6
|
-
RegisterComponentType.prototype.types = [];
|
|
7
|
-
}
|
|
8
|
-
return getRegisteredComponents().find(
|
|
9
|
-
c => c.entity === entity && c.isArray === isArray,
|
|
10
|
-
);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type FormlyEntityType = {
|
|
14
|
-
name: string;
|
|
15
|
-
component: Function;
|
|
16
|
-
entity?: Function;
|
|
17
|
-
isArray?: boolean;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export function typeFromEntity(
|
|
21
|
-
component: Function,
|
|
22
|
-
entity?: Function | Function[],
|
|
23
|
-
) {
|
|
24
|
-
const isArray = ___NS__isArray(entity);
|
|
25
|
-
if (isArray) {
|
|
26
|
-
entity = ___NS__first(entity as any);
|
|
27
|
-
}
|
|
28
|
-
let name = ClassHelpers__NS__getName(component);
|
|
29
|
-
let res = { name, component, entity, isArray };
|
|
30
|
-
// console.log(res);
|
|
31
|
-
return res;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export function typeFromName(component: Function, name: string) {
|
|
35
|
-
let res = { name, component };
|
|
36
|
-
return res;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function RegisterComponentTypeForEntity(entity: Function | Function[]) {
|
|
40
|
-
if (!___NS__isArray(RegisterComponentType.prototype.types)) {
|
|
41
|
-
RegisterComponentType.prototype.types = [];
|
|
42
|
-
}
|
|
43
|
-
return function (
|
|
44
|
-
target: any,
|
|
45
|
-
propertyKey: string,
|
|
46
|
-
descriptor: PropertyDescriptor,
|
|
47
|
-
) {
|
|
48
|
-
RegisterComponentType.prototype.types.push(typeFromEntity(target, entity));
|
|
49
|
-
} as any;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function RegisterComponentType(
|
|
53
|
-
className: string,
|
|
54
|
-
...optionslNames: string[]
|
|
55
|
-
) {
|
|
56
|
-
if (!___NS__isArray(RegisterComponentType.prototype.types)) {
|
|
57
|
-
RegisterComponentType.prototype.types = [];
|
|
58
|
-
}
|
|
59
|
-
return function (
|
|
60
|
-
target: any,
|
|
61
|
-
propertyKey: string,
|
|
62
|
-
descriptor: PropertyDescriptor,
|
|
63
|
-
) {
|
|
64
|
-
ClassHelpers__NS__setName(target, className);
|
|
65
|
-
RegisterComponentType.prototype.types.push(typeFromEntity(target));
|
|
66
|
-
optionslNames.forEach(name => {
|
|
67
|
-
RegisterComponentType.prototype.types.push(typeFromName(target, name));
|
|
68
|
-
});
|
|
69
|
-
} as any;
|
|
70
|
-
}
|
|
71
|
-
// RegisterComponentType.prototype.types = []
|
|
72
|
-
|
|
73
|
-
export function getRegisteredComponents() {
|
|
74
|
-
let registered = RegisterComponentType.prototype.types as FormlyEntityType[];
|
|
75
|
-
if (!Array.isArray(registered)) {
|
|
76
|
-
return [];
|
|
77
|
-
}
|
|
78
|
-
// console.log(registered)
|
|
79
|
-
return registered;
|
|
80
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Helpers__NS___fixCommand, Helpers__NS__bigMaxBuffer, Helpers__NS__checkProcess, Helpers__NS__cleanExit, Helpers__NS__clearConsole, Helpers__NS__command, Helpers__NS__commandOutputAsString, Helpers__NS__commandOutputAsStringAsync, Helpers__NS__compilationWrapper, Helpers__NS__contain, Helpers__NS__createFolder, Helpers__NS__createSymLink, Helpers__NS__error, Helpers__NS__execute, Helpers__NS__exists, Helpers__NS__filesFrom, Helpers__NS__foldersFrom, Helpers__NS__getFilesFrom, Helpers__NS__getFoldersFrom, Helpers__NS__getIsBrowser, Helpers__NS__getIsElectron, Helpers__NS__getIsNode, Helpers__NS__getIsRunningInGitBash, Helpers__NS__getIsSupportedTaonTerminal, Helpers__NS__getIsVerboseMode, Helpers__NS__getIsWebSQL, Helpers__NS__getIsWsl, Helpers__NS__getStdio, Helpers__NS__hideNodeWarnings, Helpers__NS__info, Helpers__NS__isBlob, Helpers__NS__isBuffer, Helpers__NS__isClass, Helpers__NS__isExistedSymlink, Helpers__NS__isFile, Helpers__NS__isFolder, Helpers__NS__isRunningInDocker, Helpers__NS__isRunningInLinuxGraphicsCapableEnvironment, Helpers__NS__isSymlinkFileExitedOrUnexisted, Helpers__NS__isSymlinkThatMatchesUrl, Helpers__NS__isUnexistedLink, Helpers__NS__killOnPort, Helpers__NS__killProcess, Helpers__NS__killProcessByPort, Helpers__NS__linksToFolderFrom, Helpers__NS__linksToFoldersFrom, Helpers__NS__log, Helpers__NS__logError, Helpers__NS__logInfo, Helpers__NS__logProc, Helpers__NS__logSuccess, Helpers__NS__logWarn, Helpers__NS__mediaTypeFromSrc, Helpers__NS__mkdirp, Helpers__NS__modifyLineByLine, Helpers__NS__msgCacheClear, Helpers__NS__openFolderInFileExplorer, Helpers__NS__parse, Helpers__NS__pathContainLink, Helpers__NS__questionYesNo, Helpers__NS__readFile, Helpers__NS__readJson, Helpers__NS__readJson5, Helpers__NS__readJsonC, Helpers__NS__relative, Helpers__NS__remove, Helpers__NS__removeEmptyLineFromString, Helpers__NS__removeFileIfExists, Helpers__NS__removeFolderIfExists, Helpers__NS__removeIfExists, Helpers__NS__removeSlashAtBegin, Helpers__NS__removeSlashAtEnd, Helpers__NS__removeSymlinks, Helpers__NS__renderError, Helpers__NS__replaceLinesInFile, Helpers__NS__run, Helpers__NS__runAsyncIn, Helpers__NS__runSyncIn, Helpers__NS__runSyncOrAsync, Helpers__NS__sleep, Helpers__NS__stopApplication, Helpers__NS__stringify, Helpers__NS__success, Helpers__NS__taskDone, Helpers__NS__taskStarted, Helpers__NS__throwError, Helpers__NS__timeout, Helpers__NS__tryCatchError, Helpers__NS__tryReadFile, Helpers__NS__tryRemoveDir, Helpers__NS__values, Helpers__NS__wait, Helpers__NS__warn, Helpers__NS__writeFile, Helpers__NS__writeJson, Helpers__NS__writeJson5, Helpers__NS__writeJsonC } from 'tnp-core/lib-prod';
|
|
2
|
-
|
|
3
|
-
import { ExpressRequest, ExpressResponse } from './express-types';
|
|
4
|
-
import { TaonHelpers__NS__defaultType, TaonHelpers__NS__fillUpTo, TaonHelpers__NS__firstStringOrElemFromArray, TaonHelpers__NS__getExpressPath, TaonHelpers__NS__ipcKeyNameRequest, TaonHelpers__NS__ipcKeyNameResponse, TaonHelpers__NS__isGoodPath, TaonHelpers__NS__isPlainFileOrFolder, TaonHelpers__NS__parseJSONwithStringJSONs, TaonHelpers__NS__tryTransformParam, TaonHelpers__NS__websqlMocks } from './helpers/taon-helpers';
|
|
5
|
-
import { Models__NS__ClassType, Models__NS__ClassTypeKey, Models__NS__ConnectionOptionsLogs, Models__NS__ContextOptions, Models__NS__DatabaseConfig, Models__NS__DatabaseConfigTypeOrm, Models__NS__DatabasesFolder, Models__NS__DBRecreateMode, Models__NS__FrameworkMode, Models__NS__Http__NS__AsyncResponse, Models__NS__Http__NS__AuthCallBack, Models__NS__Http__NS__ClientAction, Models__NS__Http__NS__ContextENDPOINT, Models__NS__Http__NS__ExpressContext, Models__NS__Http__NS__FormlyFromType, Models__NS__Http__NS__MixResponse, Models__NS__Http__NS__Response, Models__NS__Http__NS__ResponseFuncOpt, Models__NS__Http__NS__SyncResponse, Models__NS__Http__NS__SyncResponseFunc, Models__NS__ISession, Models__NS__MiddlewareType, Models__NS__StartParams, Models__NS__TaonCtxCloneParams, Models__NS__TaonInitializeParams } from './models';
|
|
6
|
-
|
|
7
|
-
export const getResponseValue = <T>(
|
|
8
|
-
response: Models__NS__Http__NS__Response<T>,
|
|
9
|
-
options?: { req: ExpressRequest<any>; res: ExpressResponse<any> },
|
|
10
|
-
): Promise<T> => {
|
|
11
|
-
//#region @websqlFunc
|
|
12
|
-
const { req, res } = options || {};
|
|
13
|
-
return new Promise<T>(async (resolve, reject) => {
|
|
14
|
-
//#region @websql
|
|
15
|
-
|
|
16
|
-
if (typeof response === 'function') {
|
|
17
|
-
const asyncResponse: Models__NS__Http__NS__AsyncResponse<T> = response as any;
|
|
18
|
-
try {
|
|
19
|
-
const result = await asyncResponse(req, res);
|
|
20
|
-
resolve(result as any);
|
|
21
|
-
} catch (e) {
|
|
22
|
-
reject(e);
|
|
23
|
-
}
|
|
24
|
-
} else {
|
|
25
|
-
reject(`[taon] Not recognized type of response ${response}`);
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
});
|
|
29
|
-
//#endregion
|
|
30
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
//#region imports
|
|
2
|
-
|
|
3
|
-
import { createContext } from '../../create-context';
|
|
4
|
-
import { TAON_GLOBAL_STATE } from './taon-global-state.entity';
|
|
5
|
-
import { TaonGlobalStateController } from './taon-global-state.controller';
|
|
6
|
-
import { TaonGlobalStateRepository } from './taon-global-state.repository';
|
|
7
|
-
import { TaonGlobalStateProvider } from './taon-global-state.provider';
|
|
8
|
-
import { TaonGlobalStateMiddleware } from './taon-global-state.middleware';
|
|
9
|
-
import { TaonGlobalStateSubscriber } from './taon-global-state.subscriber';
|
|
10
|
-
//#endregion
|
|
11
|
-
|
|
12
|
-
export const TaonGlobalStateContext = createContext(() => ({
|
|
13
|
-
contextName: 'TaonGlobalStateContext',
|
|
14
|
-
abstract: true,
|
|
15
|
-
entities: { TAON_GLOBAL_STATE },
|
|
16
|
-
controllers: { TaonGlobalStateController },
|
|
17
|
-
repositories: { TaonGlobalStateRepository },
|
|
18
|
-
providers: { TaonGlobalStateProvider },
|
|
19
|
-
middlewares: { TaonGlobalStateMiddleware },
|
|
20
|
-
subscribers: { TaonGlobalStateSubscriber },
|
|
21
|
-
}));
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { TAON_GLOBAL_STATE } from './taon-global-state.entity';
|
|
2
|
-
import { TaonGlobalStateStatus } from './taon-global-state.models';
|
|
3
|
-
|
|
4
|
-
export const TaonGlobalStateDefaultsValues = {
|
|
5
|
-
description: '',
|
|
6
|
-
version: 0,
|
|
7
|
-
id: void 0,
|
|
8
|
-
status: TaonGlobalStateStatus.NORMAL,
|
|
9
|
-
} as Partial<TAON_GLOBAL_STATE>;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
//#region imports
|
|
2
|
-
|
|
3
|
-
import { Taon__NS__createContext, Taon__NS__createContextTemplate, Taon__NS__error, Taon__NS__getResponseValue, Taon__NS__init, Taon__NS__inject, Taon__NS__isBrowser, Taon__NS__isElectron, Taon__NS__isNode, Taon__NS__isWebSQL, Taon__NS__removeLoader, Taon__NS__Response, Taon__NS__ResponseHtml, Taon__NS__StartParams } from '../../index';
|
|
4
|
-
import { ClassHelpers__NS__asyncHandler, ClassHelpers__NS__ensureClassConfig, ClassHelpers__NS__ensureMethodConfig, ClassHelpers__NS__getClassConfig, ClassHelpers__NS__getClassFnFromObject, ClassHelpers__NS__getControllerConfigs, ClassHelpers__NS__getFullInternalName, ClassHelpers__NS__getMethodsNames, ClassHelpers__NS__getName, ClassHelpers__NS__getOrginalClass, ClassHelpers__NS__getUniqueKey, ClassHelpers__NS__hasParentClassWithName, ClassHelpers__NS__isContextClassObject, ClassHelpers__NS__setName } from '../../helpers/class-helpers';
|
|
5
|
-
import { TaonController } from '../../decorators/classes/controller-decorator';
|
|
6
|
-
import { TaonBaseCrudController } from '../../base-classes/base-crud-controller';
|
|
7
|
-
import { Query } from '../../decorators/http/http-params-decorators';
|
|
8
|
-
import { GET } from '../../decorators/http/http-methods-decorators';
|
|
9
|
-
import { PUT } from '../../decorators/http/http-methods-decorators';
|
|
10
|
-
import { POST } from '../../decorators/http/http-methods-decorators';
|
|
11
|
-
import { ___NS__add, ___NS__after, ___NS__ary, ___NS__assign, ___NS__assignIn, ___NS__assignInWith, ___NS__assignWith, ___NS__at, ___NS__attempt, ___NS__before, ___NS__bind, ___NS__bindAll, ___NS__bindKey, ___NS__camelCase, ___NS__capitalize, ___NS__castArray, ___NS__ceil, ___NS__chain, ___NS__chunk, ___NS__clamp, ___NS__clone, ___NS__cloneDeep, ___NS__cloneDeepWith, ___NS__cloneWith, ___NS__compact, ___NS__concat, ___NS__cond, ___NS__conforms, ___NS__conformsTo, ___NS__constant, ___NS__countBy, ___NS__create, ___NS__curry, ___NS__curryRight, ___NS__debounce, ___NS__deburr, ___NS__defaults, ___NS__defaultsDeep, ___NS__defaultTo, ___NS__defer, ___NS__delay, ___NS__difference, ___NS__differenceBy, ___NS__differenceWith, ___NS__divide, ___NS__drop, ___NS__dropRight, ___NS__dropRightWhile, ___NS__dropWhile, ___NS__each, ___NS__eachRight, ___NS__endsWith, ___NS__entries, ___NS__entriesIn, ___NS__eq, ___NS__escape, ___NS__escapeRegExp, ___NS__every, ___NS__extend, ___NS__extendWith, ___NS__fill, ___NS__filter, ___NS__find, ___NS__findIndex, ___NS__findKey, ___NS__findLast, ___NS__findLastIndex, ___NS__findLastKey, ___NS__first, ___NS__flatMap, ___NS__flatMapDeep, ___NS__flatMapDepth, ___NS__flatten, ___NS__flattenDeep, ___NS__flattenDepth, ___NS__flip, ___NS__floor, ___NS__flow, ___NS__flowRight, ___NS__forEach, ___NS__forEachRight, ___NS__forIn, ___NS__forInRight, ___NS__forOwn, ___NS__forOwnRight, ___NS__fromPairs, ___NS__functions, ___NS__functionsIn, ___NS__get, ___NS__groupBy, ___NS__gt, ___NS__gte, ___NS__has, ___NS__hasIn, ___NS__head, ___NS__identity, ___NS__includes, ___NS__indexOf, ___NS__initial, ___NS__inRange, ___NS__intersection, ___NS__intersectionBy, ___NS__intersectionWith, ___NS__invert, ___NS__invertBy, ___NS__invoke, ___NS__invokeMap, ___NS__isArguments, ___NS__isArray, ___NS__isArrayBuffer, ___NS__isArrayLike, ___NS__isArrayLikeObject, ___NS__isBoolean, ___NS__isBuffer, ___NS__isDate, ___NS__isElement, ___NS__isEmpty, ___NS__isEqual, ___NS__isEqualWith, ___NS__isError, ___NS__isFinite, ___NS__isFunction, ___NS__isInteger, ___NS__isLength, ___NS__isMap, ___NS__isMatch, ___NS__isMatchWith, ___NS__isNaN, ___NS__isNative, ___NS__isNil, ___NS__isNull, ___NS__isNumber, ___NS__isObject, ___NS__isObjectLike, ___NS__isPlainObject, ___NS__isRegExp, ___NS__isSafeInteger, ___NS__isSet, ___NS__isString, ___NS__isSymbol, ___NS__isTypedArray, ___NS__isUndefined, ___NS__isWeakMap, ___NS__isWeakSet, ___NS__iteratee, ___NS__join, ___NS__kebabCase, ___NS__keyBy, ___NS__keys, ___NS__keysIn, ___NS__last, ___NS__lastIndexOf, ___NS__lowerCase, ___NS__lowerFirst, ___NS__lt, ___NS__lte, ___NS__map, ___NS__mapKeys, ___NS__mapValues, ___NS__matches, ___NS__matchesProperty, ___NS__max, ___NS__maxBy, ___NS__mean, ___NS__meanBy, ___NS__memoize, ___NS__merge, ___NS__mergeWith, ___NS__method, ___NS__methodOf, ___NS__min, ___NS__minBy, ___NS__mixin, ___NS__multiply, ___NS__negate, ___NS__noop, ___NS__now, ___NS__nth, ___NS__nthArg, ___NS__omit, ___NS__omitBy, ___NS__once, ___NS__orderBy, ___NS__over, ___NS__overArgs, ___NS__overEvery, ___NS__overSome, ___NS__pad, ___NS__padEnd, ___NS__padStart, ___NS__parseInt, ___NS__partial, ___NS__partialRight, ___NS__partition, ___NS__pick, ___NS__pickBy, ___NS__property, ___NS__propertyOf, ___NS__pull, ___NS__pullAll, ___NS__pullAllBy, ___NS__pullAllWith, ___NS__pullAt, ___NS__random, ___NS__range, ___NS__rangeRight, ___NS__rearg, ___NS__reduce, ___NS__reduceRight, ___NS__reject, ___NS__remove, ___NS__repeat, ___NS__replace, ___NS__rest, ___NS__result, ___NS__reverse, ___NS__round, ___NS__sample, ___NS__sampleSize, ___NS__set, ___NS__setWith, ___NS__shuffle, ___NS__size, ___NS__slice, ___NS__snakeCase, ___NS__some, ___NS__sortBy, ___NS__sortedIndex, ___NS__sortedIndexBy, ___NS__sortedIndexOf, ___NS__sortedLastIndex, ___NS__sortedLastIndexBy, ___NS__sortedLastIndexOf, ___NS__sortedUniq, ___NS__sortedUniqBy, ___NS__split, ___NS__spread, ___NS__startCase, ___NS__startsWith, ___NS__stubArray, ___NS__stubFalse, ___NS__stubObject, ___NS__stubString, ___NS__stubTrue, ___NS__subtract, ___NS__sum, ___NS__sumBy, ___NS__tail, ___NS__take, ___NS__takeRight, ___NS__takeRightWhile, ___NS__takeWhile, ___NS__tap, ___NS__template, ___NS__templateSettings, ___NS__throttle, ___NS__thru, ___NS__times, ___NS__toArray, ___NS__toFinite, ___NS__toInteger, ___NS__toLength, ___NS__toLower, ___NS__toNumber, ___NS__toPairs, ___NS__toPairsIn, ___NS__toPath, ___NS__toPlainObject, ___NS__toSafeInteger, ___NS__toString, ___NS__toUpper, ___NS__transform, ___NS__trim, ___NS__trimEnd, ___NS__trimStart, ___NS__truncate, ___NS__unary, ___NS__unescape, ___NS__union, ___NS__unionBy, ___NS__unionWith, ___NS__uniq, ___NS__uniqBy, ___NS__uniqueId, ___NS__uniqWith, ___NS__unset, ___NS__unzip, ___NS__unzipWith, ___NS__update, ___NS__updateWith, ___NS__upperCase, ___NS__upperFirst, ___NS__values, ___NS__valuesIn, ___NS__without, ___NS__words, ___NS__wrap, ___NS__xor, ___NS__xorBy, ___NS__xorWith, ___NS__zip, ___NS__zipObject, ___NS__zipObjectDeep, ___NS__zipWith, Utils__NS__binary__NS__base64toBlob, Utils__NS__binary__NS__base64toBuffer, Utils__NS__binary__NS__base64toDbBinaryFormat, Utils__NS__binary__NS__blobToArrayBuffer, Utils__NS__binary__NS__blobToBase64, Utils__NS__binary__NS__blobToBuffer, Utils__NS__binary__NS__blobToFile, Utils__NS__binary__NS__blobToJson, Utils__NS__binary__NS__blobToText, Utils__NS__binary__NS__bufferToBase64, Utils__NS__binary__NS__bufferToBlob, Utils__NS__binary__NS__bufferToText, Utils__NS__binary__NS__dbBinaryFormatToBase64, Utils__NS__binary__NS__dbBinaryFormatToText, Utils__NS__binary__NS__fileToBlob, Utils__NS__binary__NS__fileToText, Utils__NS__binary__NS__getBlobFrom, Utils__NS__binary__NS__jsonToBlob, Utils__NS__binary__NS__textToBlob, Utils__NS__binary__NS__textToBuffer, Utils__NS__binary__NS__textToDbBinaryFormat, Utils__NS__binary__NS__textToFile, Utils__NS__camelize, Utils__NS__css__NS__numValue, Utils__NS__DbBinaryFormat, Utils__NS__DbBinaryFormatEnum, Utils__NS__DbBinaryFormatForBackend, Utils__NS__DbBinaryFormatForBrowser, Utils__NS__escapeStringForRegEx, Utils__NS__fullDate, Utils__NS__fullDateTime, Utils__NS__getFreePort, Utils__NS__removeChalkSpecialChars, Utils__NS__requireUncached, Utils__NS__sortKeys, Utils__NS__uniqArray, Utils__NS__wait, Utils__NS__waitMilliseconds, UtilsOs__NS__commandExistsAsync, UtilsOs__NS__commandExistsSync, UtilsOs__NS__detectEditor, UtilsOs__NS__Editor, UtilsOs__NS__EDITOR_PROCESSES, UtilsOs__NS__EditorArr, UtilsOs__NS__EditorProcess, UtilsOs__NS__getEditorSettingsJsonPath, UtilsOs__NS__getRealHomeDir, UtilsOs__NS__isBrowser, UtilsOs__NS__isDockerAvailable, UtilsOs__NS__isElectron, UtilsOs__NS__isNode, UtilsOs__NS__isNodeVersionOk, UtilsOs__NS__isPortInUse, UtilsOs__NS__isRunningInBrowser, UtilsOs__NS__isRunningInCliMode, UtilsOs__NS__isRunningInDocker, UtilsOs__NS__isRunningInElectron, UtilsOs__NS__isRunningInLinuxGraphicsCapableEnvironment, UtilsOs__NS__isRunningInMochaTest, UtilsOs__NS__isRunningInNode, UtilsOs__NS__isRunningInOsWithGraphicsCapableEnvironment, UtilsOs__NS__isRunningInSSRMode, UtilsOs__NS__isRunningInVscodeExtension, UtilsOs__NS__isRunningInWebSQL, UtilsOs__NS__isRunningInWindows, UtilsOs__NS__isRunningInWindowsCmd, UtilsOs__NS__isRunningInWindowsPowerShell, UtilsOs__NS__isRunningInWsl, UtilsOs__NS__isRunningNodeDebugger, UtilsOs__NS__isSSRMode, UtilsOs__NS__isVscodeExtension, UtilsOs__NS__isWebSQL, UtilsOs__NS__killAllEditor, UtilsOs__NS__openFolderInFileExplorer, UtilsOs__NS__openFolderInVSCode, UtilsOs__NS__pipxNestedPackageExists, UtilsOs__NS__pipxPackageExists, UtilsOs__NS__pythonModuleExists, UtilsOs__NS__UnknownEditor, UtilsTerminal__NS__clearConsole, UtilsTerminal__NS__confirm, UtilsTerminal__NS__drawBigText, UtilsTerminal__NS__getTerminalHeight, UtilsTerminal__NS__input, UtilsTerminal__NS__isVerboseModeTaon, UtilsTerminal__NS__multiselect, UtilsTerminal__NS__multiselectActionAndExecute, UtilsTerminal__NS__pipeEnterToStdin, UtilsTerminal__NS__pressAnyKey, UtilsTerminal__NS__pressAnyKeyToContinueAsync, UtilsTerminal__NS__pressAnyKeyToTryAgainErrorOccurred, UtilsTerminal__NS__pressKeyAndContinueSync, UtilsTerminal__NS__previewLongList, UtilsTerminal__NS__previewLongListGitLogLike, UtilsTerminal__NS__select, UtilsTerminal__NS__selectActionAndExecute, UtilsTerminal__NS__SelectChoice, UtilsTerminal__NS__SelectChoiceValue, UtilsTerminal__NS__wait, UtilsTerminal__NS__waitForUserAnyKey, UtilsTerminal__NS__waitMilliseconds } from 'tnp-core/lib-prod';
|
|
12
|
-
|
|
13
|
-
import { TAON_GLOBAL_STATE } from './taon-global-state.entity';
|
|
14
|
-
import { TaonGlobalStateRepository } from './taon-global-state.repository';
|
|
15
|
-
import { TaonGlobalStateStatus } from './taon-global-state.models';
|
|
16
|
-
//#endregion
|
|
17
|
-
|
|
18
|
-
@TaonController({
|
|
19
|
-
className: 'TaonGlobalStateController',
|
|
20
|
-
})
|
|
21
|
-
export class TaonGlobalStateController extends TaonBaseCrudController<TAON_GLOBAL_STATE> {
|
|
22
|
-
entityClassResolveFn: () => typeof TAON_GLOBAL_STATE = () => TAON_GLOBAL_STATE;
|
|
23
|
-
|
|
24
|
-
taonGlobalStateRepository = this.injectCustomRepo(TaonGlobalStateRepository);
|
|
25
|
-
|
|
26
|
-
@GET()
|
|
27
|
-
getStatus(): Taon__NS__Response<TaonGlobalStateStatus> {
|
|
28
|
-
return async () => {
|
|
29
|
-
//#region @websqlFunc
|
|
30
|
-
const stateEntity = await this.taonGlobalStateRepository.getLastStatus();
|
|
31
|
-
return stateEntity.status;
|
|
32
|
-
//#endregion
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
@POST()
|
|
37
|
-
setDraining(
|
|
38
|
-
@Query('secondsBeforeReadonly') secondsBeforeReadonly = 0,
|
|
39
|
-
): Taon__NS__Response<void> {
|
|
40
|
-
return async () => {
|
|
41
|
-
await this.taonGlobalStateRepository.setDraining(secondsBeforeReadonly);
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
//#region imports
|
|
2
|
-
|
|
3
|
-
import { CreateDateColumn, CustomColumn } from '../../orm/columns';
|
|
4
|
-
import { ___NS__add, ___NS__after, ___NS__ary, ___NS__assign, ___NS__assignIn, ___NS__assignInWith, ___NS__assignWith, ___NS__at, ___NS__attempt, ___NS__before, ___NS__bind, ___NS__bindAll, ___NS__bindKey, ___NS__camelCase, ___NS__capitalize, ___NS__castArray, ___NS__ceil, ___NS__chain, ___NS__chunk, ___NS__clamp, ___NS__clone, ___NS__cloneDeep, ___NS__cloneDeepWith, ___NS__cloneWith, ___NS__compact, ___NS__concat, ___NS__cond, ___NS__conforms, ___NS__conformsTo, ___NS__constant, ___NS__countBy, ___NS__create, ___NS__curry, ___NS__curryRight, ___NS__debounce, ___NS__deburr, ___NS__defaults, ___NS__defaultsDeep, ___NS__defaultTo, ___NS__defer, ___NS__delay, ___NS__difference, ___NS__differenceBy, ___NS__differenceWith, ___NS__divide, ___NS__drop, ___NS__dropRight, ___NS__dropRightWhile, ___NS__dropWhile, ___NS__each, ___NS__eachRight, ___NS__endsWith, ___NS__entries, ___NS__entriesIn, ___NS__eq, ___NS__escape, ___NS__escapeRegExp, ___NS__every, ___NS__extend, ___NS__extendWith, ___NS__fill, ___NS__filter, ___NS__find, ___NS__findIndex, ___NS__findKey, ___NS__findLast, ___NS__findLastIndex, ___NS__findLastKey, ___NS__first, ___NS__flatMap, ___NS__flatMapDeep, ___NS__flatMapDepth, ___NS__flatten, ___NS__flattenDeep, ___NS__flattenDepth, ___NS__flip, ___NS__floor, ___NS__flow, ___NS__flowRight, ___NS__forEach, ___NS__forEachRight, ___NS__forIn, ___NS__forInRight, ___NS__forOwn, ___NS__forOwnRight, ___NS__fromPairs, ___NS__functions, ___NS__functionsIn, ___NS__get, ___NS__groupBy, ___NS__gt, ___NS__gte, ___NS__has, ___NS__hasIn, ___NS__head, ___NS__identity, ___NS__includes, ___NS__indexOf, ___NS__initial, ___NS__inRange, ___NS__intersection, ___NS__intersectionBy, ___NS__intersectionWith, ___NS__invert, ___NS__invertBy, ___NS__invoke, ___NS__invokeMap, ___NS__isArguments, ___NS__isArray, ___NS__isArrayBuffer, ___NS__isArrayLike, ___NS__isArrayLikeObject, ___NS__isBoolean, ___NS__isBuffer, ___NS__isDate, ___NS__isElement, ___NS__isEmpty, ___NS__isEqual, ___NS__isEqualWith, ___NS__isError, ___NS__isFinite, ___NS__isFunction, ___NS__isInteger, ___NS__isLength, ___NS__isMap, ___NS__isMatch, ___NS__isMatchWith, ___NS__isNaN, ___NS__isNative, ___NS__isNil, ___NS__isNull, ___NS__isNumber, ___NS__isObject, ___NS__isObjectLike, ___NS__isPlainObject, ___NS__isRegExp, ___NS__isSafeInteger, ___NS__isSet, ___NS__isString, ___NS__isSymbol, ___NS__isTypedArray, ___NS__isUndefined, ___NS__isWeakMap, ___NS__isWeakSet, ___NS__iteratee, ___NS__join, ___NS__kebabCase, ___NS__keyBy, ___NS__keys, ___NS__keysIn, ___NS__last, ___NS__lastIndexOf, ___NS__lowerCase, ___NS__lowerFirst, ___NS__lt, ___NS__lte, ___NS__map, ___NS__mapKeys, ___NS__mapValues, ___NS__matches, ___NS__matchesProperty, ___NS__max, ___NS__maxBy, ___NS__mean, ___NS__meanBy, ___NS__memoize, ___NS__merge, ___NS__mergeWith, ___NS__method, ___NS__methodOf, ___NS__min, ___NS__minBy, ___NS__mixin, ___NS__multiply, ___NS__negate, ___NS__noop, ___NS__now, ___NS__nth, ___NS__nthArg, ___NS__omit, ___NS__omitBy, ___NS__once, ___NS__orderBy, ___NS__over, ___NS__overArgs, ___NS__overEvery, ___NS__overSome, ___NS__pad, ___NS__padEnd, ___NS__padStart, ___NS__parseInt, ___NS__partial, ___NS__partialRight, ___NS__partition, ___NS__pick, ___NS__pickBy, ___NS__property, ___NS__propertyOf, ___NS__pull, ___NS__pullAll, ___NS__pullAllBy, ___NS__pullAllWith, ___NS__pullAt, ___NS__random, ___NS__range, ___NS__rangeRight, ___NS__rearg, ___NS__reduce, ___NS__reduceRight, ___NS__reject, ___NS__remove, ___NS__repeat, ___NS__replace, ___NS__rest, ___NS__result, ___NS__reverse, ___NS__round, ___NS__sample, ___NS__sampleSize, ___NS__set, ___NS__setWith, ___NS__shuffle, ___NS__size, ___NS__slice, ___NS__snakeCase, ___NS__some, ___NS__sortBy, ___NS__sortedIndex, ___NS__sortedIndexBy, ___NS__sortedIndexOf, ___NS__sortedLastIndex, ___NS__sortedLastIndexBy, ___NS__sortedLastIndexOf, ___NS__sortedUniq, ___NS__sortedUniqBy, ___NS__split, ___NS__spread, ___NS__startCase, ___NS__startsWith, ___NS__stubArray, ___NS__stubFalse, ___NS__stubObject, ___NS__stubString, ___NS__stubTrue, ___NS__subtract, ___NS__sum, ___NS__sumBy, ___NS__tail, ___NS__take, ___NS__takeRight, ___NS__takeRightWhile, ___NS__takeWhile, ___NS__tap, ___NS__template, ___NS__templateSettings, ___NS__throttle, ___NS__thru, ___NS__times, ___NS__toArray, ___NS__toFinite, ___NS__toInteger, ___NS__toLength, ___NS__toLower, ___NS__toNumber, ___NS__toPairs, ___NS__toPairsIn, ___NS__toPath, ___NS__toPlainObject, ___NS__toSafeInteger, ___NS__toString, ___NS__toUpper, ___NS__transform, ___NS__trim, ___NS__trimEnd, ___NS__trimStart, ___NS__truncate, ___NS__unary, ___NS__unescape, ___NS__union, ___NS__unionBy, ___NS__unionWith, ___NS__uniq, ___NS__uniqBy, ___NS__uniqueId, ___NS__uniqWith, ___NS__unset, ___NS__unzip, ___NS__unzipWith, ___NS__update, ___NS__updateWith, ___NS__upperCase, ___NS__upperFirst, ___NS__values, ___NS__valuesIn, ___NS__without, ___NS__words, ___NS__wrap, ___NS__xor, ___NS__xorBy, ___NS__xorWith, ___NS__zip, ___NS__zipObject, ___NS__zipObjectDeep, ___NS__zipWith } from 'tnp-core/lib-prod';
|
|
5
|
-
|
|
6
|
-
import { TaonGlobalStateDefaultsValues } from './taon-global-state.constants';
|
|
7
|
-
import { TaonGlobalStateStatus } from './taon-global-state.models';
|
|
8
|
-
import { TaonBaseEntity } from '../../base-classes/base-entity';
|
|
9
|
-
import { TaonBaseAbstractEntity } from '../../base-classes/base-abstract-entity';
|
|
10
|
-
import { TaonEntity } from '../../decorators/classes/entity-decorator';
|
|
11
|
-
//#endregion
|
|
12
|
-
|
|
13
|
-
@TaonEntity({
|
|
14
|
-
className: 'TAON_GLOBAL_STATE',
|
|
15
|
-
createTable: true,
|
|
16
|
-
})
|
|
17
|
-
export class TAON_GLOBAL_STATE extends TaonBaseAbstractEntity<TAON_GLOBAL_STATE> {
|
|
18
|
-
//#region @websql
|
|
19
|
-
@CustomColumn({
|
|
20
|
-
type: 'varchar',
|
|
21
|
-
length: 20,
|
|
22
|
-
nullable: false,
|
|
23
|
-
default: TaonGlobalStateDefaultsValues.status,
|
|
24
|
-
})
|
|
25
|
-
//#endregion
|
|
26
|
-
status?: TaonGlobalStateStatus;
|
|
27
|
-
|
|
28
|
-
//#region @websql
|
|
29
|
-
@CreateDateColumn()
|
|
30
|
-
//#endregion
|
|
31
|
-
createdAt: Date;
|
|
32
|
-
|
|
33
|
-
//#region @websql
|
|
34
|
-
@CustomColumn({
|
|
35
|
-
type: 'int',
|
|
36
|
-
nullable: true,
|
|
37
|
-
})
|
|
38
|
-
//#endregion
|
|
39
|
-
secondsBeforeReadonly: Date;
|
|
40
|
-
}
|