taon 21.0.52 → 21.0.54
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/browser/package.json +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/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 +19 -0
- package/lib-prod/base-classes/base-angular-service.js +84 -0
- package/lib-prod/base-classes/base-class.js +35 -0
- package/lib-prod/base-classes/{base-context.ts → base-context.js} +13 -15
- package/lib-prod/base-classes/base-controller.js +154 -0
- package/lib-prod/base-classes/base-crud-controller.js +264 -0
- package/lib-prod/base-classes/base-custom-repository.js +9 -0
- package/lib-prod/base-classes/{base-electron-service.ts → base-electron-service.js} +1 -12
- package/lib-prod/base-classes/base-entity.js +22 -0
- package/lib-prod/base-classes/base-file-upload.middleware.js +75 -0
- package/lib-prod/base-classes/base-injector.js +184 -0
- package/lib-prod/base-classes/base-middleware.js +9 -0
- package/lib-prod/base-classes/base-migration.js +20 -0
- package/lib-prod/base-classes/{base-provider.ts → base-provider.js} +2 -2
- package/lib-prod/base-classes/base-repository.js +617 -0
- package/lib-prod/base-classes/base-subscriber-for-entity.js +145 -0
- package/lib-prod/base-classes/{base.ts → base.js} +2 -15
- package/lib-prod/{build-info._auto-generated_.ts → build-info._auto-generated_.js} +1 -2
- package/lib-prod/config/controller-config.js +28 -0
- package/lib-prod/config/controller-options.js +3 -0
- package/lib-prod/config/method-config.js +7 -0
- package/lib-prod/config/param-config.js +3 -0
- package/lib-prod/constants.js +33 -0
- package/lib-prod/context-db-migrations.js +342 -0
- package/lib-prod/create-context.js +217 -0
- package/lib-prod/decorators/classes/controller-decorator.js +17 -0
- package/lib-prod/decorators/classes/entity-decorator.js +28 -0
- package/lib-prod/decorators/classes/middleware-decorator.js +16 -0
- package/lib-prod/decorators/classes/migration-decorator.js +15 -0
- package/lib-prod/decorators/classes/provider-decorator.js +15 -0
- package/lib-prod/decorators/classes/repository-decorator.js +15 -0
- package/lib-prod/decorators/classes/subscriber-decorator.js +15 -0
- package/lib-prod/decorators/decorator-abstract-opt.js +2 -0
- package/lib-prod/decorators/http/http-decorators.js +20 -0
- package/lib-prod/decorators/http/http-methods-decorators.js +102 -0
- package/lib-prod/decorators/http/http-params-decorators.js +42 -0
- package/lib-prod/dependency-injection/di-container.js +30 -0
- package/lib-prod/endpoint-context-storage.js +31 -0
- package/lib-prod/endpoint-context.js +2397 -0
- package/lib-prod/entity-process.js +225 -0
- package/lib-prod/env/{env.angular-node-app.ts → env.angular-node-app.js} +1 -1
- package/lib-prod/env/{env.docs-webapp.ts → env.docs-webapp.js} +1 -1
- package/lib-prod/env/{env.electron-app.ts → env.electron-app.js} +1 -1
- package/lib-prod/env/{env.mobile-app.ts → env.mobile-app.js} +1 -1
- package/lib-prod/env/{env.npm-lib-and-cli-tool.ts → env.npm-lib-and-cli-tool.js} +1 -1
- package/lib-prod/env/{env.vscode-plugin.ts → env.vscode-plugin.js} +1 -1
- package/lib-prod/express-types.js +1 -0
- package/lib-prod/formly/formly.models.js +1 -0
- package/lib-prod/formly/fromly.js +205 -0
- package/lib-prod/formly/type-from-entity.js +51 -0
- package/lib-prod/get-response-value.js +22 -0
- package/lib-prod/global-state/taon-global-state/{index.ts → index.js} +2 -2
- package/lib-prod/global-state/taon-global-state/{taon-global-state.abstract.context.ts → taon-global-state.abstract.context.js} +9 -11
- package/lib-prod/global-state/taon-global-state/taon-global-state.constants.js +7 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.controller.js +42 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.entity.js +35 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.middleware.js +12 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.models.js +44 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.provider.js +12 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.repository.js +46 -0
- package/lib-prod/global-state/taon-global-state/taon-global-state.subscriber.js +22 -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.ts → index.js} +2 -2
- package/lib-prod/global-state/taon-transaction-registry/{taon-transaction-registry.abstract.context.ts → taon-transaction-registry.abstract.context.js} +10 -12
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.constants.js +5 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.js +36 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.entity.js +36 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.js +12 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.models.js +7 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.js +12 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.js +31 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.js +22 -0
- package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.utils.js +5 -0
- package/lib-prod/helpers/class-helpers.js +228 -0
- package/lib-prod/helpers/clone-obj.js +17 -0
- package/lib-prod/helpers/taon-helpers.js +147 -0
- package/lib-prod/{index._auto-generated_.ts → index._auto-generated_.js} +1 -1
- package/lib-prod/index.js +252 -0
- package/lib-prod/{inject.ts → inject.js} +35 -57
- package/lib-prod/migrations/index.js +2 -0
- package/lib-prod/migrations/{migrations_index._auto-generated_.ts → migrations_index._auto-generated_.js} +0 -2
- package/lib-prod/models.js +78 -0
- package/lib-prod/orm/columns.js +64 -0
- package/lib-prod/orm/index.js +56 -0
- package/lib-prod/package.json +1 -1
- package/lib-prod/realtime/realtime-client.js +198 -0
- package/lib-prod/realtime/realtime-core.js +81 -0
- package/lib-prod/realtime/realtime-server.js +237 -0
- package/lib-prod/realtime/realtime-strategy/{index.ts → index.js} +1 -1
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-ipc.js +280 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-mock.js +289 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy-socket-io.js +27 -0
- package/lib-prod/realtime/realtime-strategy/realtime-strategy.js +11 -0
- package/lib-prod/realtime/realtime-subs-manager.js +88 -0
- package/lib-prod/realtime/realtime.models.js +2 -0
- package/lib-prod/symbols.js +108 -0
- package/lib-prod/ui/index.js +1 -0
- package/lib-prod/ui/taon-admin-mode-configuration/index.js +1 -0
- package/lib-prod/validators.js +80 -0
- package/lib-prod.split-namespaces.json +31 -91
- package/package.json +1 -1
- package/websql/package.json +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-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-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-repository.ts +0 -942
- package/lib-prod/base-classes/base-subscriber-for-entity.ts +0 -196
- 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 -3110
- package/lib-prod/entity-process.ts +0 -286
- 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/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/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.ts +0 -323
- 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/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/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
- /package/lib-prod/env/{index.ts → index.js} +0 -0
|
@@ -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,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
|
-
}
|
|
@@ -1,12 +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 { TaonBaseMiddleware } from '../../base-classes/base-middleware';
|
|
5
|
-
import { TaonMiddleware } from '../../decorators/classes/middleware-decorator';
|
|
6
|
-
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';
|
|
7
|
-
//#endregion
|
|
8
|
-
|
|
9
|
-
@TaonMiddleware({
|
|
10
|
-
className: 'TaonGlobalStateMiddleware',
|
|
11
|
-
})
|
|
12
|
-
export class TaonGlobalStateMiddleware extends TaonBaseMiddleware {}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export enum TaonGlobalStateStatus {
|
|
2
|
-
NORMAL = 'normal',
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* no new transactions allowed
|
|
6
|
-
* existing ones may finish
|
|
7
|
-
*/
|
|
8
|
-
DRAINING = 'draining',
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* DB is readonly
|
|
12
|
-
* app is readonly (no writes, no side effects)
|
|
13
|
-
*/
|
|
14
|
-
READONLY = 'readonly',
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Db and app still readonly - migration in progress
|
|
18
|
-
*/
|
|
19
|
-
MIGRATING = 'migrating',
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* emergency stop / maintenance mode
|
|
23
|
-
*/
|
|
24
|
-
FROZEN = 'frozen',
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export const allowedTaonGlobalStatusOrders = {
|
|
28
|
-
[TaonGlobalStateStatus.NORMAL]: [
|
|
29
|
-
TaonGlobalStateStatus.DRAINING,
|
|
30
|
-
TaonGlobalStateStatus.FROZEN,
|
|
31
|
-
],
|
|
32
|
-
[TaonGlobalStateStatus.DRAINING]: [
|
|
33
|
-
TaonGlobalStateStatus.READONLY,
|
|
34
|
-
TaonGlobalStateStatus.FROZEN,
|
|
35
|
-
],
|
|
36
|
-
[TaonGlobalStateStatus.READONLY]: [
|
|
37
|
-
TaonGlobalStateStatus.MIGRATING,
|
|
38
|
-
TaonGlobalStateStatus.NORMAL,
|
|
39
|
-
TaonGlobalStateStatus.FROZEN,
|
|
40
|
-
],
|
|
41
|
-
[TaonGlobalStateStatus.MIGRATING]: [
|
|
42
|
-
TaonGlobalStateStatus.READONLY
|
|
43
|
-
],
|
|
44
|
-
[TaonGlobalStateStatus.FROZEN]: [
|
|
45
|
-
TaonGlobalStateStatus.READONLY,
|
|
46
|
-
TaonGlobalStateStatus.NORMAL,
|
|
47
|
-
],
|
|
48
|
-
};
|
|
@@ -1,16 +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 { TaonBaseProvider } from '../../base-classes/base-provider';
|
|
5
|
-
import { TaonProvider } from '../../decorators/classes/provider-decorator';
|
|
6
|
-
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';
|
|
7
|
-
//#endregion
|
|
8
|
-
|
|
9
|
-
@TaonProvider({
|
|
10
|
-
className: 'TaonGlobalStateProvider',
|
|
11
|
-
})
|
|
12
|
-
export class TaonGlobalStateProvider extends TaonBaseProvider {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
//#region imports
|
|
2
|
-
|
|
3
|
-
import { TaonBaseRepository } from '../../base-classes/base-repository';
|
|
4
|
-
import { TaonRepository } from '../../decorators/classes/repository-decorator';
|
|
5
|
-
import { Raw } from 'taon-typeorm/lib-prod';
|
|
6
|
-
|
|
7
|
-
import { TAON_GLOBAL_STATE } from './taon-global-state.entity';
|
|
8
|
-
import { TaonGlobalStateStatus } from './taon-global-state.models';
|
|
9
|
-
import { TaonGlobalStateUtils__NS__assertAllowedTransition } from './taon-global-state.utils';
|
|
10
|
-
//#endregion
|
|
11
|
-
|
|
12
|
-
@TaonRepository({
|
|
13
|
-
className: 'TaonGlobalStateRepository',
|
|
14
|
-
})
|
|
15
|
-
export class TaonGlobalStateRepository extends TaonBaseRepository<TAON_GLOBAL_STATE> {
|
|
16
|
-
entityClassResolveFn: () => typeof TAON_GLOBAL_STATE = () => TAON_GLOBAL_STATE;
|
|
17
|
-
|
|
18
|
-
async getLastStatus(): Promise<TAON_GLOBAL_STATE> {
|
|
19
|
-
//#region @websqlFunc
|
|
20
|
-
const lastStatus = await this.findOne({
|
|
21
|
-
order: { createdAt: 'DESC' },
|
|
22
|
-
});
|
|
23
|
-
return lastStatus;
|
|
24
|
-
//#endregion
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
async setDraining(secondsBeforeReadonly = 0): Promise<void> {
|
|
28
|
-
//#region @websqlFunc
|
|
29
|
-
await this.transitionTo(TaonGlobalStateStatus.DRAINING);
|
|
30
|
-
if (secondsBeforeReadonly > 0) {
|
|
31
|
-
setTimeout(async () => {
|
|
32
|
-
await this.transitionTo(TaonGlobalStateStatus.READONLY);
|
|
33
|
-
}, secondsBeforeReadonly);
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
async transitionTo(next: TaonGlobalStateStatus): Promise<TAON_GLOBAL_STATE> {
|
|
39
|
-
//#region @websqlFunc
|
|
40
|
-
const current = await this.getLastStatus();
|
|
41
|
-
TaonGlobalStateUtils__NS__assertAllowedTransition(current.status, next);
|
|
42
|
-
const newState = this.create({ status: next });
|
|
43
|
-
await this.save(newState);
|
|
44
|
-
return newState;
|
|
45
|
-
//#endregion
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//#region imports
|
|
2
|
-
|
|
3
|
-
import { TaonBaseSubscriberForEntity } from '../../base-classes/base-subscriber-for-entity';
|
|
4
|
-
import { TaonSubscriber } from '../../decorators/classes/subscriber-decorator';
|
|
5
|
-
import { TAON_GLOBAL_STATE } from './taon-global-state.entity';
|
|
6
|
-
import { TaonGlobalStateProvider } from './taon-global-state.provider';
|
|
7
|
-
//#endregion
|
|
8
|
-
|
|
9
|
-
@TaonSubscriber<TaonGlobalStateSubscriber>({
|
|
10
|
-
className: 'TaonGlobalStateSubscriber',
|
|
11
|
-
// allowedEvents: ['afterUpdate'],
|
|
12
|
-
})
|
|
13
|
-
export class TaonGlobalStateSubscriber extends TaonBaseSubscriberForEntity {
|
|
14
|
-
taonGlobalStateProvider = this.injectProvider(TaonGlobalStateProvider);
|
|
15
|
-
listenTo(): typeof TAON_GLOBAL_STATE {
|
|
16
|
-
return TAON_GLOBAL_STATE;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
allowedTaonGlobalStatusOrders,
|
|
3
|
-
TaonGlobalStateStatus,
|
|
4
|
-
} from './taon-global-state.models';
|
|
5
|
-
|
|
6
|
-
//namespace TaonGlobalStateUtils
|
|
7
|
-
|
|
8
|
-
// export function isActive(state: string): state is TaonGlobalStateStatus {
|
|
9
|
-
// return state === 'active';
|
|
10
|
-
// }
|
|
11
|
-
|
|
12
|
-
export const TaonGlobalStateUtils__NS__assertAllowedTransition = (
|
|
13
|
-
from: TaonGlobalStateStatus,
|
|
14
|
-
to: TaonGlobalStateStatus,
|
|
15
|
-
): void => {
|
|
16
|
-
if (!allowedTaonGlobalStatusOrders[from]?.includes(to)) {
|
|
17
|
-
throw new Error(`Invalid state transition: ${from} → ${to}`);
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
//end of namespace TaonGlobalStateUtils
|
package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.controller.ts
DELETED
|
@@ -1,38 +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, POST } from '../../decorators/http/http-methods-decorators';
|
|
9
|
-
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';
|
|
10
|
-
|
|
11
|
-
import { TAON_TANSACTION_REGISTRY } from './taon-transaction-registry.entity';
|
|
12
|
-
import { TaonTransactionRegistryRepository } from './taon-transaction-registry.repository';
|
|
13
|
-
//#endregion
|
|
14
|
-
|
|
15
|
-
@TaonController({
|
|
16
|
-
className: 'TaonTransactionRegistryController',
|
|
17
|
-
})
|
|
18
|
-
export class TaonTransactionRegistryController extends TaonBaseCrudController<TAON_TANSACTION_REGISTRY> {
|
|
19
|
-
entityClassResolveFn: () => typeof TAON_TANSACTION_REGISTRY = () =>
|
|
20
|
-
TAON_TANSACTION_REGISTRY;
|
|
21
|
-
|
|
22
|
-
taonTransactionRegistryRepository = this.injectCustomRepo(
|
|
23
|
-
TaonTransactionRegistryRepository,
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
//#region methods & getters / hello world
|
|
27
|
-
@POST()
|
|
28
|
-
startTransaction(@Query('serviceName') yourName: string): Taon__NS__Response<TAON_TANSACTION_REGISTRY> {
|
|
29
|
-
//#region @websqlFunc
|
|
30
|
-
return async (req, res) => {
|
|
31
|
-
// TODO @LAST
|
|
32
|
-
// return this.taonTransactionRegistryRepository.startTransaction(yourName);
|
|
33
|
-
return void 0;
|
|
34
|
-
};
|
|
35
|
-
//#endregion
|
|
36
|
-
}
|
|
37
|
-
//#endregion
|
|
38
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
//#region imports
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
CreateDateColumn,
|
|
5
|
-
NumberColumn,
|
|
6
|
-
String100Column,
|
|
7
|
-
String20Column,
|
|
8
|
-
} from '../../orm/columns';
|
|
9
|
-
import { CustomColumn } from '../../orm/columns';
|
|
10
|
-
import { DateTimeColumn } from '../../orm/columns';
|
|
11
|
-
import { StringColumn } from '../../orm/columns';
|
|
12
|
-
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';
|
|
13
|
-
import { TaonBaseAbstractEntity } from '../../base-classes/base-abstract-entity';
|
|
14
|
-
import { TaonEntity } from '../../decorators/classes/entity-decorator';
|
|
15
|
-
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';
|
|
16
|
-
|
|
17
|
-
import { TaonTransactionRegistryDefaultsValues } from './taon-transaction-registry.constants';
|
|
18
|
-
import { TaonTransactionRegistryState } from './taon-transaction-registry.models';
|
|
19
|
-
//#endregion
|
|
20
|
-
|
|
21
|
-
@TaonEntity({
|
|
22
|
-
className: 'TAON_TANSACTION_REGISTRY',
|
|
23
|
-
createTable: true,
|
|
24
|
-
})
|
|
25
|
-
export class TAON_TANSACTION_REGISTRY extends TaonBaseAbstractEntity<TAON_TANSACTION_REGISTRY> {
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Taon worker index
|
|
29
|
-
*/
|
|
30
|
-
//#region @websql
|
|
31
|
-
@NumberColumn()
|
|
32
|
-
//#endregion
|
|
33
|
-
workerIndex: number; // app instance / worker
|
|
34
|
-
|
|
35
|
-
//#region @websql
|
|
36
|
-
@String100Column()
|
|
37
|
-
//#endregion
|
|
38
|
-
contextName: string; // "order-create", "migration", etc.
|
|
39
|
-
|
|
40
|
-
//#region @websql
|
|
41
|
-
@CreateDateColumn()
|
|
42
|
-
//#endregion
|
|
43
|
-
startedAt: Date;
|
|
44
|
-
|
|
45
|
-
//#region @websql
|
|
46
|
-
@DateTimeColumn()
|
|
47
|
-
//#endregion
|
|
48
|
-
finishedAt?: Date;
|
|
49
|
-
|
|
50
|
-
//#region @websql
|
|
51
|
-
@String20Column(TaonTransactionRegistryState.RUNNING)
|
|
52
|
-
//#endregion
|
|
53
|
-
state: TaonTransactionRegistryState;
|
|
54
|
-
}
|
package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.middleware.ts
DELETED
|
@@ -1,12 +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 { TaonBaseMiddleware } from '../../base-classes/base-middleware';
|
|
5
|
-
import { TaonMiddleware } from '../../decorators/classes/middleware-decorator';
|
|
6
|
-
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';
|
|
7
|
-
//#endregion
|
|
8
|
-
|
|
9
|
-
@TaonMiddleware({
|
|
10
|
-
className: 'TaonTransactionRegistryMiddleware',
|
|
11
|
-
})
|
|
12
|
-
export class TaonTransactionRegistryMiddleware extends TaonBaseMiddleware {}
|
package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.provider.ts
DELETED
|
@@ -1,16 +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 { TaonBaseProvider } from '../../base-classes/base-provider';
|
|
5
|
-
import { TaonProvider } from '../../decorators/classes/provider-decorator';
|
|
6
|
-
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';
|
|
7
|
-
//#endregion
|
|
8
|
-
|
|
9
|
-
@TaonProvider({
|
|
10
|
-
className: 'TaonTransactionRegistryProvider',
|
|
11
|
-
})
|
|
12
|
-
export class TaonTransactionRegistryProvider extends TaonBaseProvider {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.repository.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
//#region imports
|
|
2
|
-
|
|
3
|
-
import { TaonBaseRepository } from '../../base-classes/base-repository';
|
|
4
|
-
import { TaonRepository } from '../../decorators/classes/repository-decorator';
|
|
5
|
-
import { Raw } from 'taon-typeorm/lib-prod';
|
|
6
|
-
|
|
7
|
-
import { TAON_TANSACTION_REGISTRY } from './taon-transaction-registry.entity';
|
|
8
|
-
//#endregion
|
|
9
|
-
|
|
10
|
-
@TaonRepository({
|
|
11
|
-
className: 'TaonTransactionRegistryRepository',
|
|
12
|
-
})
|
|
13
|
-
export class TaonTransactionRegistryRepository extends TaonBaseRepository<TAON_TANSACTION_REGISTRY> {
|
|
14
|
-
entityClassResolveFn: () => typeof TAON_TANSACTION_REGISTRY = () => TAON_TANSACTION_REGISTRY;
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* TODO remove this demo example method
|
|
18
|
-
*/
|
|
19
|
-
async countEntitesWithEvenId(): Promise<number> {
|
|
20
|
-
//#region @websqlFunc
|
|
21
|
-
const result = await this.count({
|
|
22
|
-
where: {
|
|
23
|
-
id: Raw(alias => `${alias} % 2 = 0`),
|
|
24
|
-
},
|
|
25
|
-
});
|
|
26
|
-
return result;
|
|
27
|
-
//#endregion
|
|
28
|
-
}
|
|
29
|
-
}
|
package/lib-prod/global-state/taon-transaction-registry/taon-transaction-registry.subscriber.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
//#region imports
|
|
2
|
-
|
|
3
|
-
import { TaonBaseSubscriberForEntity } from '../../base-classes/base-subscriber-for-entity';
|
|
4
|
-
import { TaonSubscriber } from '../../decorators/classes/subscriber-decorator';
|
|
5
|
-
|
|
6
|
-
import { TAON_TANSACTION_REGISTRY } from './taon-transaction-registry.entity';
|
|
7
|
-
import { TaonTransactionRegistryProvider } from './taon-transaction-registry.provider';
|
|
8
|
-
//#endregion
|
|
9
|
-
|
|
10
|
-
@TaonSubscriber<TaonTransactionRegistrySubscriber>({
|
|
11
|
-
className: 'TaonTransactionRegistrySubscriber',
|
|
12
|
-
// allowedEvents: ['afterUpdate'],
|
|
13
|
-
})
|
|
14
|
-
export class TaonTransactionRegistrySubscriber extends TaonBaseSubscriberForEntity {
|
|
15
|
-
taonTransactionRegistryProvider = this.injectProvider(TaonTransactionRegistryProvider);
|
|
16
|
-
|
|
17
|
-
listenTo(): typeof TAON_TANSACTION_REGISTRY {
|
|
18
|
-
return TAON_TANSACTION_REGISTRY;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { TaonTransactionRegistryState } from './taon-transaction-registry.models';
|
|
2
|
-
|
|
3
|
-
//namespace TaonTransactionRegistryUtils
|
|
4
|
-
|
|
5
|
-
export function TaonTransactionRegistryUtils__NS__isActive(state: string): state is TaonTransactionRegistryState {
|
|
6
|
-
return state === 'active';
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
//end of namespace TaonTransactionRegistryUtils
|