@rockster/core 0.0.1
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/cache/cache-cleaner.d.ts +7 -0
- package/cache/cache-cleaner.js +28 -0
- package/cache/cache.controller.d.ts +10 -0
- package/cache/cache.controller.js +53 -0
- package/cache/constants.d.ts +5 -0
- package/cache/constants.js +6 -0
- package/cache/decorators/index.d.ts +2 -0
- package/cache/decorators/index.js +18 -0
- package/cache/decorators/inject-cache.decorator.d.ts +1 -0
- package/cache/decorators/inject-cache.decorator.js +14 -0
- package/cache/decorators/key-value.d.ts +2 -0
- package/cache/decorators/key-value.js +40 -0
- package/cache/functions/get-cache.d.ts +1 -0
- package/cache/functions/get-cache.js +8 -0
- package/cache/functions/get-key.-handle.d.ts +2 -0
- package/cache/functions/get-key.-handle.js +23 -0
- package/cache/index.d.ts +3 -0
- package/cache/index.js +19 -0
- package/cache/interfaces/cache-instance.d.ts +4 -0
- package/cache/interfaces/cache-instance.js +2 -0
- package/cache/interfaces/cache-key-options.d.ts +6 -0
- package/cache/interfaces/cache-key-options.js +2 -0
- package/cache/interfaces/cache-options.d.ts +12 -0
- package/cache/interfaces/cache-options.js +2 -0
- package/cache/interfaces/get-key-value-handle.d.ts +1 -0
- package/cache/interfaces/get-key-value-handle.js +2 -0
- package/cache/interfaces/index.d.ts +4 -0
- package/cache/interfaces/index.js +20 -0
- package/command/constants.d.ts +4 -0
- package/command/constants.js +7 -0
- package/command/decorators/index.d.ts +6 -0
- package/command/decorators/index.js +22 -0
- package/command/decorators/only-modify.decorator.d.ts +1 -0
- package/command/decorators/only-modify.decorator.js +14 -0
- package/command/decorators/post-action.decorator.d.ts +2 -0
- package/command/decorators/post-action.decorator.js +26 -0
- package/command/decorators/post-content.decorator.d.ts +1 -0
- package/command/decorators/post-content.decorator.js +11 -0
- package/command/decorators/read-only.decorator.d.ts +1 -0
- package/command/decorators/read-only.decorator.js +14 -0
- package/command/decorators/remove-action.decorator.d.ts +2 -0
- package/command/decorators/remove-action.decorator.js +27 -0
- package/command/decorators/remove-content.decorator.d.ts +1 -0
- package/command/decorators/remove-content.decorator.js +11 -0
- package/command/functions/execute-post.d.ts +2 -0
- package/command/functions/execute-post.js +50 -0
- package/command/functions/execute-remove.d.ts +4 -0
- package/command/functions/execute-remove.js +50 -0
- package/command/interfaces/command-property.d.ts +7 -0
- package/command/interfaces/command-property.js +2 -0
- package/command/interfaces/index.d.ts +5 -0
- package/command/interfaces/index.js +21 -0
- package/command/interfaces/post-action-options.d.ts +23 -0
- package/command/interfaces/post-action-options.js +2 -0
- package/command/interfaces/post-content.d.ts +8 -0
- package/command/interfaces/post-content.js +2 -0
- package/command/interfaces/remove-aciton-options.d.ts +23 -0
- package/command/interfaces/remove-aciton-options.js +2 -0
- package/command/interfaces/remove-content.d.ts +5 -0
- package/command/interfaces/remove-content.js +2 -0
- package/command/services/post-action-builder.d.ts +19 -0
- package/command/services/post-action-builder.js +219 -0
- package/command/services/remove-action-builder.d.ts +14 -0
- package/command/services/remove-action-builder.js +165 -0
- package/command/utils/deep-merge-keep-undefined.d.ts +1 -0
- package/command/utils/deep-merge-keep-undefined.js +18 -0
- package/common/entities/base-entity.d.ts +7 -0
- package/common/entities/base-entity.js +47 -0
- package/common/index.d.ts +1 -0
- package/common/index.js +17 -0
- package/common/interfaces/enum/index.d.ts +3 -0
- package/common/interfaces/enum/index.js +19 -0
- package/common/interfaces/enum/object-type.d.ts +12 -0
- package/common/interfaces/enum/object-type.js +16 -0
- package/common/interfaces/enum/property-type.d.ts +7 -0
- package/common/interfaces/enum/property-type.js +11 -0
- package/common/interfaces/enum/request-status.d.ts +3 -0
- package/common/interfaces/enum/request-status.js +7 -0
- package/common/interfaces/get-type-callback.d.ts +2 -0
- package/common/interfaces/get-type-callback.js +2 -0
- package/common/interfaces/index.d.ts +2 -0
- package/common/interfaces/index.js +18 -0
- package/common/models/executed-response.d.ts +3 -0
- package/common/models/executed-response.js +22 -0
- package/controllers/constants.d.ts +11 -0
- package/controllers/constants.js +14 -0
- package/controllers/controller.controller.d.ts +19 -0
- package/controllers/controller.controller.js +50 -0
- package/controllers/decorators/actions/action-content.decorator.d.ts +2 -0
- package/controllers/decorators/actions/action-content.decorator.js +20 -0
- package/controllers/decorators/actions/action.decorator.d.ts +2 -0
- package/controllers/decorators/actions/action.decorator.js +28 -0
- package/controllers/decorators/actions/index.d.ts +2 -0
- package/controllers/decorators/actions/index.js +18 -0
- package/controllers/decorators/controller.decorator.d.ts +3 -0
- package/controllers/decorators/controller.decorator.js +32 -0
- package/controllers/decorators/http-methods/custom-response.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/custom-response.decorator.js +14 -0
- package/controllers/decorators/http-methods/delete.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/delete.decorator.js +16 -0
- package/controllers/decorators/http-methods/from-body.decorator.d.ts +3 -0
- package/controllers/decorators/http-methods/from-body.decorator.js +24 -0
- package/controllers/decorators/http-methods/from-headers.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/from-headers.decorator.js +21 -0
- package/controllers/decorators/http-methods/from-params.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/from-params.decorator.js +21 -0
- package/controllers/decorators/http-methods/from-query.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/from-query.decorator.js +21 -0
- package/controllers/decorators/http-methods/get.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/get.decorator.js +16 -0
- package/controllers/decorators/http-methods/http-req.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/http-req.decorator.js +10 -0
- package/controllers/decorators/http-methods/index.d.ts +12 -0
- package/controllers/decorators/http-methods/index.js +28 -0
- package/controllers/decorators/http-methods/patch.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/patch.decorator.js +16 -0
- package/controllers/decorators/http-methods/post.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/post.decorator.js +16 -0
- package/controllers/decorators/http-methods/put.decorator.d.ts +1 -0
- package/controllers/decorators/http-methods/put.decorator.js +16 -0
- package/controllers/decorators/http-methods/response-type.decorator.d.ts +6 -0
- package/controllers/decorators/http-methods/response-type.decorator.js +19 -0
- package/controllers/decorators/index.d.ts +5 -0
- package/controllers/decorators/index.js +21 -0
- package/controllers/decorators/no-auth.decorator.d.ts +1 -0
- package/controllers/decorators/no-auth.decorator.js +11 -0
- package/controllers/decorators/request-context.decorator.d.ts +1 -0
- package/controllers/decorators/request-context.decorator.js +11 -0
- package/controllers/decorators/session.decorator.d.ts +1 -0
- package/controllers/decorators/session.decorator.js +10 -0
- package/controllers/index.d.ts +2 -0
- package/controllers/index.js +18 -0
- package/controllers/interfaces/action-options.d.ts +31 -0
- package/controllers/interfaces/action-options.js +2 -0
- package/controllers/interfaces/content-options.d.ts +5 -0
- package/controllers/interfaces/content-options.js +2 -0
- package/controllers/interfaces/controller-object.d.ts +7 -0
- package/controllers/interfaces/controller-object.js +2 -0
- package/controllers/interfaces/controller-options.d.ts +4 -0
- package/controllers/interfaces/controller-options.js +2 -0
- package/controllers/interfaces/controller-property.d.ts +34 -0
- package/controllers/interfaces/controller-property.js +2 -0
- package/controllers/interfaces/enum/index.d.ts +1 -0
- package/controllers/interfaces/enum/index.js +17 -0
- package/controllers/interfaces/enum/request-interceptor.d.ts +3 -0
- package/controllers/interfaces/enum/request-interceptor.js +6 -0
- package/controllers/interfaces/get-only-data.d.ts +3 -0
- package/controllers/interfaces/get-only-data.js +2 -0
- package/controllers/interfaces/index.d.ts +9 -0
- package/controllers/interfaces/index.js +25 -0
- package/controllers/interfaces/on-before-validation-data.d.ts +4 -0
- package/controllers/interfaces/on-before-validation-data.js +2 -0
- package/controllers/interfaces/response-options.d.ts +5 -0
- package/controllers/interfaces/response-options.js +3 -0
- package/controllers/services/default-action-builder.d.ts +14 -0
- package/controllers/services/default-action-builder.js +166 -0
- package/controllers/services/restful-action-builder.d.ts +11 -0
- package/controllers/services/restful-action-builder.js +132 -0
- package/core/core.controller.d.ts +41 -0
- package/core/core.controller.js +208 -0
- package/core/functions/bootstrap.d.ts +3 -0
- package/core/functions/bootstrap.js +13 -0
- package/core/functions/create-action.d.ts +2 -0
- package/core/functions/create-action.js +18 -0
- package/core/functions/create-interceptor.d.ts +12 -0
- package/core/functions/create-interceptor.js +76 -0
- package/core/functions/format-message.d.ts +2 -0
- package/core/functions/format-message.js +7 -0
- package/core/functions/get-action-path.d.ts +1 -0
- package/core/functions/get-action-path.js +7 -0
- package/core/functions/get-env.d.ts +11 -0
- package/core/functions/get-env.js +19 -0
- package/core/functions/get-node-key.d.ts +1 -0
- package/core/functions/get-node-key.js +7 -0
- package/core/functions/get-other-types.d.ts +2 -0
- package/core/functions/get-other-types.js +19 -0
- package/core/index.d.ts +10 -0
- package/core/index.js +26 -0
- package/core/interfaces/action-def.d.ts +16 -0
- package/core/interfaces/action-def.js +2 -0
- package/core/interfaces/action-docs.d.ts +10 -0
- package/core/interfaces/action-docs.js +2 -0
- package/core/interfaces/core-options.d.ts +32 -0
- package/core/interfaces/core-options.js +2 -0
- package/core/interfaces/docs-options.d.ts +3 -0
- package/core/interfaces/docs-options.js +2 -0
- package/core/interfaces/enum/connect-type.d.ts +4 -0
- package/core/interfaces/enum/connect-type.js +8 -0
- package/core/interfaces/enum/index.d.ts +1 -0
- package/core/interfaces/enum/index.js +17 -0
- package/core/interfaces/format-message-options.d.ts +6 -0
- package/core/interfaces/format-message-options.js +2 -0
- package/core/interfaces/forms-options.d.ts +3 -0
- package/core/interfaces/forms-options.js +2 -0
- package/core/interfaces/index.d.ts +23 -0
- package/core/interfaces/index.js +39 -0
- package/core/interfaces/interceptor.d.ts +38 -0
- package/core/interfaces/interceptor.js +7 -0
- package/core/interfaces/locale-options.d.ts +5 -0
- package/core/interfaces/locale-options.js +2 -0
- package/core/interfaces/mapper.d.ts +3 -0
- package/core/interfaces/mapper.js +2 -0
- package/core/interfaces/object-docs.d.ts +5 -0
- package/core/interfaces/object-docs.js +3 -0
- package/core/interfaces/object.d.ts +15 -0
- package/core/interfaces/object.js +2 -0
- package/core/interfaces/pending-action.d.ts +10 -0
- package/core/interfaces/pending-action.js +2 -0
- package/core/interfaces/property-docs.d.ts +5 -0
- package/core/interfaces/property-docs.js +2 -0
- package/core/interfaces/property.d.ts +9 -0
- package/core/interfaces/property.js +2 -0
- package/core/interfaces/request-callback-handle.d.ts +3 -0
- package/core/interfaces/request-callback-handle.js +2 -0
- package/core/interfaces/request-callback.d.ts +4 -0
- package/core/interfaces/request-callback.js +2 -0
- package/core/interfaces/request-callbacks.d.ts +5 -0
- package/core/interfaces/request-callbacks.js +2 -0
- package/core/interfaces/request-context.d.ts +28 -0
- package/core/interfaces/request-context.js +2 -0
- package/core/interfaces/request-data.d.ts +6 -0
- package/core/interfaces/request-data.js +2 -0
- package/core/interfaces/router-options.d.ts +5 -0
- package/core/interfaces/router-options.js +2 -0
- package/core/interfaces/sanitizer.d.ts +4 -0
- package/core/interfaces/sanitizer.js +2 -0
- package/core/interfaces/storage-options.d.ts +6 -0
- package/core/interfaces/storage-options.js +2 -0
- package/core/interfaces/translations-options.d.ts +7 -0
- package/core/interfaces/translations-options.js +2 -0
- package/core/interfaces/transport-options.d.ts +3 -0
- package/core/interfaces/transport-options.js +2 -0
- package/core/services/context-builder.d.ts +15 -0
- package/core/services/context-builder.js +91 -0
- package/core/services/locale-service.d.ts +13 -0
- package/core/services/locale-service.js +71 -0
- package/core/services/node-control.service.d.ts +5 -0
- package/core/services/node-control.service.js +46 -0
- package/core/services/object-loader.d.ts +10 -0
- package/core/services/object-loader.js +27 -0
- package/core/services/request-executor.d.ts +9 -0
- package/core/services/request-executor.js +108 -0
- package/core/services/request-router.d.ts +15 -0
- package/core/services/request-router.js +127 -0
- package/database/contexts/index.d.ts +1 -0
- package/database/contexts/index.js +17 -0
- package/database/contexts/transaction-context.d.ts +6 -0
- package/database/contexts/transaction-context.js +5 -0
- package/database/database.controller.d.ts +20 -0
- package/database/database.controller.js +92 -0
- package/database/decorators/column.decorator.d.ts +72 -0
- package/database/decorators/column.decorator.js +9 -0
- package/database/decorators/entity.decorator.d.ts +2 -0
- package/database/decorators/entity.decorator.js +10 -0
- package/database/decorators/id-generated.decorator.d.ts +30 -0
- package/database/decorators/id-generated.decorator.js +76 -0
- package/database/decorators/id.decorator.d.ts +13 -0
- package/database/decorators/id.decorator.js +27 -0
- package/database/decorators/index.d.ts +13 -0
- package/database/decorators/index.js +29 -0
- package/database/decorators/inject-data-source.decorator.d.ts +1 -0
- package/database/decorators/inject-data-source.decorator.js +13 -0
- package/database/decorators/inject-repository.decorator.d.ts +2 -0
- package/database/decorators/inject-repository.decorator.js +17 -0
- package/database/decorators/protect-context-column.decorator.d.ts +3 -0
- package/database/decorators/protect-context-column.decorator.js +11 -0
- package/database/decorators/protect-entity.decorator.d.ts +4 -0
- package/database/decorators/protect-entity.decorator.js +12 -0
- package/database/decorators/protect-key-column.decorator.d.ts +2 -0
- package/database/decorators/protect-key-column.decorator.js +11 -0
- package/database/decorators/protect-target-column.decorator.d.ts +3 -0
- package/database/decorators/protect-target-column.decorator.js +11 -0
- package/database/decorators/protected-entity.decorator.d.ts +8 -0
- package/database/decorators/protected-entity.decorator.js +25 -0
- package/database/decorators/relation.decorator.d.ts +3 -0
- package/database/decorators/relation.decorator.js +13 -0
- package/database/decorators/virtual-column.decorator.d.ts +4 -0
- package/database/decorators/virtual-column.decorator.js +16 -0
- package/database/environment.d.ts +21 -0
- package/database/environment.js +25 -0
- package/database/exports/index.d.ts +1 -0
- package/database/exports/index.js +17 -0
- package/database/exports/typeorm.d.ts +1 -0
- package/database/exports/typeorm.js +9 -0
- package/database/extensions/select-query-builder.d.ts +11 -0
- package/database/extensions/select-query-builder.js +21 -0
- package/database/functions/column-decorator.d.ts +6 -0
- package/database/functions/column-decorator.js +31 -0
- package/database/functions/create-entity.d.ts +7 -0
- package/database/functions/create-entity.js +51 -0
- package/database/functions/create-new-class.d.ts +1 -0
- package/database/functions/create-new-class.js +16 -0
- package/database/functions/entity-decorator.d.ts +3 -0
- package/database/functions/entity-decorator.js +29 -0
- package/database/functions/execute-if-not-exists-column.d.ts +3 -0
- package/database/functions/execute-if-not-exists-column.js +16 -0
- package/database/functions/execute-if-not-exists-table.d.ts +3 -0
- package/database/functions/execute-if-not-exists-table.js +14 -0
- package/database/functions/find-relation.d.ts +3 -0
- package/database/functions/find-relation.js +43 -0
- package/database/functions/generate-id.d.ts +2 -0
- package/database/functions/generate-id.js +14 -0
- package/database/functions/get-column-type.d.ts +3 -0
- package/database/functions/get-column-type.js +18 -0
- package/database/functions/get-id-property.d.ts +3 -0
- package/database/functions/get-id-property.js +14 -0
- package/database/functions/get-name-by-strategy.d.ts +6 -0
- package/database/functions/get-name-by-strategy.js +9 -0
- package/database/functions/get-primitive-type.d.ts +3 -0
- package/database/functions/get-primitive-type.js +8 -0
- package/database/functions/get-relations.d.ts +2 -0
- package/database/functions/get-relations.js +12 -0
- package/database/functions/has-update.d.ts +2 -0
- package/database/functions/has-update.js +7 -0
- package/database/functions/inject-repository-handle.d.ts +2 -0
- package/database/functions/inject-repository-handle.js +36 -0
- package/database/functions/object-to-jsonb.d.ts +1 -0
- package/database/functions/object-to-jsonb.js +36 -0
- package/database/functions/register-column.d.ts +7 -0
- package/database/functions/register-column.js +16 -0
- package/database/functions/register-entity.d.ts +5 -0
- package/database/functions/register-entity.js +8 -0
- package/database/functions/register-generated-id.d.ts +6 -0
- package/database/functions/register-generated-id.js +8 -0
- package/database/functions/register-id.d.ts +7 -0
- package/database/functions/register-id.js +8 -0
- package/database/functions/register-relation.d.ts +8 -0
- package/database/functions/register-relation.js +12 -0
- package/database/functions/relation-decorator.d.ts +4 -0
- package/database/functions/relation-decorator.js +74 -0
- package/database/functions/use-protector.d.ts +2 -0
- package/database/functions/use-protector.js +10 -0
- package/database/functions/use-repository.d.ts +2 -0
- package/database/functions/use-repository.js +10 -0
- package/database/functions/use-transaction.d.ts +1 -0
- package/database/functions/use-transaction.js +12 -0
- package/database/index.d.ts +16 -0
- package/database/index.js +32 -0
- package/database/interfaces/base-columns-name-override.d.ts +6 -0
- package/database/interfaces/base-columns-name-override.js +2 -0
- package/database/interfaces/column-def.d.ts +26 -0
- package/database/interfaces/column-def.js +2 -0
- package/database/interfaces/connection.options.d.ts +15 -0
- package/database/interfaces/connection.options.js +2 -0
- package/database/interfaces/direact-alias.d.ts +1 -0
- package/database/interfaces/direact-alias.js +2 -0
- package/database/interfaces/entity-object.d.ts +15 -0
- package/database/interfaces/entity-object.js +2 -0
- package/database/interfaces/entity-options.d.ts +15 -0
- package/database/interfaces/entity-options.js +2 -0
- package/database/interfaces/entity-property.d.ts +19 -0
- package/database/interfaces/entity-property.js +2 -0
- package/database/interfaces/enum/column-def-type.d.ts +5 -0
- package/database/interfaces/enum/column-def-type.js +9 -0
- package/database/interfaces/enum/index.d.ts +5 -0
- package/database/interfaces/enum/index.js +21 -0
- package/database/interfaces/enum/naming-strategy-type.d.ts +5 -0
- package/database/interfaces/enum/naming-strategy-type.js +9 -0
- package/database/interfaces/enum/nano-id-alphabet-type.d.ts +14 -0
- package/database/interfaces/enum/nano-id-alphabet-type.js +18 -0
- package/database/interfaces/enum/order-by-direction.d.ts +4 -0
- package/database/interfaces/enum/order-by-direction.js +8 -0
- package/database/interfaces/enum/primary-strategy-type.d.ts +5 -0
- package/database/interfaces/enum/primary-strategy-type.js +9 -0
- package/database/interfaces/enum/relation-path-type.d.ts +4 -0
- package/database/interfaces/enum/relation-path-type.js +8 -0
- package/database/interfaces/execute-callback.d.ts +3 -0
- package/database/interfaces/execute-callback.js +2 -0
- package/database/interfaces/id-column-def.d.ts +6 -0
- package/database/interfaces/id-column-def.js +2 -0
- package/database/interfaces/index.d.ts +17 -0
- package/database/interfaces/index.js +33 -0
- package/database/interfaces/inverse-alias.d.ts +5 -0
- package/database/interfaces/inverse-alias.js +2 -0
- package/database/interfaces/nano-id-column-options.d.ts +12 -0
- package/database/interfaces/nano-id-column-options.js +2 -0
- package/database/interfaces/path.d.ts +43 -0
- package/database/interfaces/path.js +2 -0
- package/database/interfaces/protector.d.ts +51 -0
- package/database/interfaces/protector.js +2 -0
- package/database/interfaces/register-one-to-many-handle.d.ts +3 -0
- package/database/interfaces/register-one-to-many-handle.js +2 -0
- package/database/interfaces/register-one-to-many.d.ts +6 -0
- package/database/interfaces/register-one-to-many.js +2 -0
- package/database/interfaces/relation-def.d.ts +8 -0
- package/database/interfaces/relation-def.js +2 -0
- package/database/interfaces/relation-path.d.ts +10 -0
- package/database/interfaces/relation-path.js +2 -0
- package/database/interfaces/relation.options.d.ts +9 -0
- package/database/interfaces/relation.options.js +2 -0
- package/database/interfaces/repository.d.ts +8 -0
- package/database/interfaces/repository.js +2 -0
- package/database/migrations/1737637321043-UUIDVarcharMigration.d.ts +5 -0
- package/database/migrations/1737637321043-UUIDVarcharMigration.js +81 -0
- package/database/migrations/use-uuid-varchar-migration.d.ts +2 -0
- package/database/migrations/use-uuid-varchar-migration.js +10 -0
- package/database/services/paths-builder.d.ts +12 -0
- package/database/services/paths-builder.js +82 -0
- package/database/services/protect-builder.d.ts +59 -0
- package/database/services/protect-builder.js +523 -0
- package/database/services/repository.service.d.ts +14 -0
- package/database/services/repository.service.js +75 -0
- package/forms/entities/form.d.ts +8 -0
- package/forms/entities/form.js +61 -0
- package/forms/entities/property.d.ts +7 -0
- package/forms/entities/property.js +51 -0
- package/forms/forms.controller.d.ts +8 -0
- package/forms/forms.controller.js +59 -0
- package/forms/interfaces/form-item.d.ts +5 -0
- package/forms/interfaces/form-item.js +2 -0
- package/forms/interfaces/form.d.ts +8 -0
- package/forms/interfaces/form.js +2 -0
- package/forms/interfaces/property.d.ts +6 -0
- package/forms/interfaces/property.js +2 -0
- package/forms/migrations/1725969116484-CreateFormsTables.d.ts +5 -0
- package/forms/migrations/1725969116484-CreateFormsTables.js +38 -0
- package/forms/models/form-load.request.d.ts +3 -0
- package/forms/models/form-load.request.js +21 -0
- package/forms/queries/form.query.d.ts +1 -0
- package/forms/queries/form.query.js +9 -0
- package/forms/queries/property.query.d.ts +1 -0
- package/forms/queries/property.query.js +9 -0
- package/forms/requests/form.request.d.ts +14 -0
- package/forms/requests/form.request.js +83 -0
- package/forms/requests/property.request.d.ts +8 -0
- package/forms/requests/property.request.js +65 -0
- package/forms/services/form.service.d.ts +20 -0
- package/forms/services/form.service.js +64 -0
- package/forms/services/property.service.d.ts +6 -0
- package/forms/services/property.service.js +30 -0
- package/forms/utils/build-form-validator.d.ts +11 -0
- package/forms/utils/build-form-validator.js +30 -0
- package/forms/utils/get-form-items.d.ts +2 -0
- package/forms/utils/get-form-items.js +20 -0
- package/global.d.ts +52 -0
- package/global.js +50 -0
- package/http/http.controller.d.ts +25 -0
- package/http/http.controller.js +137 -0
- package/http/index.d.ts +2 -0
- package/http/index.js +18 -0
- package/http/interfaces/csrf.options.d.ts +11 -0
- package/http/interfaces/csrf.options.js +2 -0
- package/http/interfaces/http-request.d.ts +6 -0
- package/http/interfaces/http-request.js +2 -0
- package/http/interfaces/http-response.d.ts +4 -0
- package/http/interfaces/http-response.js +3 -0
- package/http/interfaces/http-settings.d.ts +13 -0
- package/http/interfaces/http-settings.js +2 -0
- package/http/interfaces/http-use.d.ts +6 -0
- package/http/interfaces/http-use.js +2 -0
- package/http/interfaces/index.d.ts +6 -0
- package/http/interfaces/index.js +22 -0
- package/http/interfaces/route.d.ts +10 -0
- package/http/interfaces/route.js +2 -0
- package/index.d.ts +44 -0
- package/index.js +65 -0
- package/jobs/constants.d.ts +2 -0
- package/jobs/constants.js +4 -0
- package/jobs/decorators/index.d.ts +1 -0
- package/jobs/decorators/index.js +17 -0
- package/jobs/decorators/job.decorator.d.ts +11 -0
- package/jobs/decorators/job.decorator.js +26 -0
- package/jobs/interfaces/index.d.ts +3 -0
- package/jobs/interfaces/index.js +19 -0
- package/jobs/interfaces/job-data.d.ts +13 -0
- package/jobs/interfaces/job-data.js +2 -0
- package/jobs/interfaces/job-executor.d.ts +3 -0
- package/jobs/interfaces/job-executor.js +2 -0
- package/jobs/interfaces/job-object.d.ts +6 -0
- package/jobs/interfaces/job-object.js +2 -0
- package/jobs/interfaces/job.options.d.ts +1 -0
- package/jobs/interfaces/job.options.js +2 -0
- package/jobs/jobs.controller.d.ts +18 -0
- package/jobs/jobs.controller.js +122 -0
- package/module/decorators/index.d.ts +4 -0
- package/module/decorators/index.js +20 -0
- package/module/decorators/module.decorator.d.ts +2 -0
- package/module/decorators/module.decorator.js +16 -0
- package/module/decorators/on-after-app-start.d.ts +1 -0
- package/module/decorators/on-after-app-start.js +11 -0
- package/module/decorators/on-after-database-init.d.ts +1 -0
- package/module/decorators/on-after-database-init.js +11 -0
- package/module/decorators/on-module-init.d.ts +1 -0
- package/module/decorators/on-module-init.js +11 -0
- package/module/index.d.ts +3 -0
- package/module/index.js +19 -0
- package/module/interfaces/index.d.ts +3 -0
- package/module/interfaces/index.js +19 -0
- package/module/interfaces/module-events.d.ts +5 -0
- package/module/interfaces/module-events.js +2 -0
- package/module/interfaces/module-object.d.ts +7 -0
- package/module/interfaces/module-object.js +2 -0
- package/module/interfaces/module-options.d.ts +8 -0
- package/module/interfaces/module-options.js +2 -0
- package/module/module.controller.d.ts +31 -0
- package/module/module.controller.js +159 -0
- package/package.json +70 -0
- package/query/constants.d.ts +2 -0
- package/query/constants.js +5 -0
- package/query/decorators/index.d.ts +1 -0
- package/query/decorators/index.js +17 -0
- package/query/decorators/query-content.decorator.d.ts +1 -0
- package/query/decorators/query-content.decorator.js +11 -0
- package/query/functions/add-join.d.ts +5 -0
- package/query/functions/add-join.js +37 -0
- package/query/functions/create-query-builder.d.ts +4 -0
- package/query/functions/create-query-builder.js +54 -0
- package/query/functions/create-query.d.ts +5 -0
- package/query/functions/create-query.js +96 -0
- package/query/functions/describe-query-filter.d.ts +7 -0
- package/query/functions/describe-query-filter.js +298 -0
- package/query/functions/execute-query.d.ts +11 -0
- package/query/functions/execute-query.js +74 -0
- package/query/functions/get-column-path.d.ts +2 -0
- package/query/functions/get-column-path.js +14 -0
- package/query/functions/get-native-select.d.ts +2 -0
- package/query/functions/get-native-select.js +9 -0
- package/query/functions/load-properties.d.ts +19 -0
- package/query/functions/load-properties.js +138 -0
- package/query/functions/map-query-property-to-column-name.d.ts +3 -0
- package/query/functions/map-query-property-to-column-name.js +17 -0
- package/query/functions/replace-property-key-to-column-name.d.ts +1 -0
- package/query/functions/replace-property-key-to-column-name.js +10 -0
- package/query/interfaces/index.d.ts +3 -0
- package/query/interfaces/index.js +19 -0
- package/query/interfaces/query-action-options.d.ts +14 -0
- package/query/interfaces/query-action-options.js +2 -0
- package/query/interfaces/query-object.d.ts +10 -0
- package/query/interfaces/query-object.js +2 -0
- package/query/interfaces/query.d.ts +54 -0
- package/query/interfaces/query.js +2 -0
- package/query/models/base-query-response.d.ts +12 -0
- package/query/models/base-query-response.js +41 -0
- package/query/services/query-action-builder.d.ts +14 -0
- package/query/services/query-action-builder.js +145 -0
- package/security/auth.controller.d.ts +8 -0
- package/security/auth.controller.js +68 -0
- package/security/constants.d.ts +0 -0
- package/security/constants.js +2 -0
- package/security/env.d.ts +7 -0
- package/security/env.js +8 -0
- package/security/functions/add-protect.d.ts +2 -0
- package/security/functions/add-protect.js +10 -0
- package/security/functions/add-protected.d.ts +3 -0
- package/security/functions/add-protected.js +23 -0
- package/security/functions/create-authorization.d.ts +2 -0
- package/security/functions/create-authorization.js +12 -0
- package/security/functions/find-auth-context.d.ts +3 -0
- package/security/functions/find-auth-context.js +25 -0
- package/security/functions/is-auth-enabled.d.ts +1 -0
- package/security/functions/is-auth-enabled.js +7 -0
- package/security/functions/use-auth.d.ts +1 -0
- package/security/functions/use-auth.js +8 -0
- package/security/index.d.ts +3 -0
- package/security/index.js +19 -0
- package/security/interceptors/index.d.ts +1 -0
- package/security/interceptors/index.js +17 -0
- package/security/interceptors/is-authorized.interceptor.d.ts +2 -0
- package/security/interceptors/is-authorized.interceptor.js +34 -0
- package/security/interfaces/auth-controller.d.ts +7 -0
- package/security/interfaces/auth-controller.js +2 -0
- package/security/interfaces/auth-object.d.ts +6 -0
- package/security/interfaces/auth-object.js +2 -0
- package/security/interfaces/auth-property.d.ts +4 -0
- package/security/interfaces/auth-property.js +2 -0
- package/security/interfaces/authorization-schema.d.ts +26 -0
- package/security/interfaces/authorization-schema.js +2 -0
- package/security/interfaces/index.d.ts +6 -0
- package/security/interfaces/index.js +22 -0
- package/security/interfaces/security-options.d.ts +8 -0
- package/security/interfaces/security-options.js +2 -0
- package/security/interfaces/ssl-certificate.d.ts +4 -0
- package/security/interfaces/ssl-certificate.js +2 -0
- package/security/models/auth-context-data.d.ts +4 -0
- package/security/models/auth-context-data.js +25 -0
- package/security/models/auth-context.d.ts +9 -0
- package/security/models/auth-context.js +48 -0
- package/security/models/auth-key.d.ts +7 -0
- package/security/models/auth-key.js +36 -0
- package/security/models/get-user-permissions-payload.d.ts +4 -0
- package/security/models/get-user-permissions-payload.js +21 -0
- package/security/models/get-user-permissions-response.d.ts +3 -0
- package/security/models/get-user-permissions-response.js +22 -0
- package/security/models/set-user-permissions-payload.d.ts +5 -0
- package/security/models/set-user-permissions-payload.js +26 -0
- package/security/requests/security.request.d.ts +14 -0
- package/security/requests/security.request.js +75 -0
- package/security/services/authorization.service.d.ts +11 -0
- package/security/services/authorization.service.js +60 -0
- package/storage/entities/metadata.entity.d.ts +19 -0
- package/storage/entities/metadata.entity.js +86 -0
- package/storage/entities/storage.entity.d.ts +6 -0
- package/storage/entities/storage.entity.js +32 -0
- package/storage/env.d.ts +9 -0
- package/storage/env.js +9 -0
- package/storage/functions/index.d.ts +1 -0
- package/storage/functions/index.js +17 -0
- package/storage/functions/set-storage-settings.d.ts +2 -0
- package/storage/functions/set-storage-settings.js +13 -0
- package/storage/index.d.ts +2 -0
- package/storage/index.js +18 -0
- package/storage/interfaces/directory-metadata.d.ts +6 -0
- package/storage/interfaces/directory-metadata.js +2 -0
- package/storage/interfaces/enum/gcp-credentials-type.d.ts +3 -0
- package/storage/interfaces/enum/gcp-credentials-type.js +7 -0
- package/storage/interfaces/enum/index.d.ts +3 -0
- package/storage/interfaces/enum/index.js +19 -0
- package/storage/interfaces/enum/metadata-type.d.ts +4 -0
- package/storage/interfaces/enum/metadata-type.js +8 -0
- package/storage/interfaces/enum/storage-type.d.ts +3 -0
- package/storage/interfaces/enum/storage-type.js +7 -0
- package/storage/interfaces/file-metadata.d.ts +12 -0
- package/storage/interfaces/file-metadata.js +2 -0
- package/storage/interfaces/index.d.ts +7 -0
- package/storage/interfaces/index.js +23 -0
- package/storage/interfaces/metadata.d.ts +18 -0
- package/storage/interfaces/metadata.js +2 -0
- package/storage/interfaces/storage-controller.d.ts +13 -0
- package/storage/interfaces/storage-controller.js +2 -0
- package/storage/interfaces/storage-settings.d.ts +16 -0
- package/storage/interfaces/storage-settings.js +2 -0
- package/storage/interfaces/storage.d.ts +7 -0
- package/storage/interfaces/storage.js +2 -0
- package/storage/services/routes.service.d.ts +31 -0
- package/storage/services/routes.service.js +384 -0
- package/storage/services/storage.service.d.ts +10 -0
- package/storage/services/storage.service.js +92 -0
- package/storage/storage.controller.d.ts +10 -0
- package/storage/storage.controller.js +49 -0
- package/tasks/constants.d.ts +12 -0
- package/tasks/constants.js +21 -0
- package/tasks/decorators/index.d.ts +1 -0
- package/tasks/decorators/index.js +17 -0
- package/tasks/decorators/task.decorator.d.ts +2 -0
- package/tasks/decorators/task.decorator.js +45 -0
- package/tasks/functions/create-task-message-find.d.ts +3 -0
- package/tasks/functions/create-task-message-find.js +23 -0
- package/tasks/functions/create-task-message-model.d.ts +3 -0
- package/tasks/functions/create-task-message-model.js +11 -0
- package/tasks/functions/create-task-message-receptor.d.ts +3 -0
- package/tasks/functions/create-task-message-receptor.js +23 -0
- package/tasks/functions/create-task-message-retry.d.ts +3 -0
- package/tasks/functions/create-task-message-retry.js +22 -0
- package/tasks/functions/create-task-message-schema.d.ts +182 -0
- package/tasks/functions/create-task-message-schema.js +20 -0
- package/tasks/functions/create-task-message-trigger.d.ts +2 -0
- package/tasks/functions/create-task-message-trigger.js +18 -0
- package/tasks/functions/create-task-naming.d.ts +2 -0
- package/tasks/functions/create-task-naming.js +31 -0
- package/tasks/functions/generate-entity-id.d.ts +1 -0
- package/tasks/functions/generate-entity-id.js +5 -0
- package/tasks/functions/get-check-table-exists-script.d.ts +1 -0
- package/tasks/functions/get-check-table-exists-script.js +12 -0
- package/tasks/functions/get-create-table-partition-script.d.ts +2 -0
- package/tasks/functions/get-create-table-partition-script.js +10 -0
- package/tasks/functions/get-create-table-script.d.ts +1 -0
- package/tasks/functions/get-create-table-script.js +22 -0
- package/tasks/functions/get-database-connection-name.d.ts +1 -0
- package/tasks/functions/get-database-connection-name.js +8 -0
- package/tasks/functions/get-database-uri.d.ts +1 -0
- package/tasks/functions/get-database-uri.js +8 -0
- package/tasks/functions/get-partitions-of-table-script.d.ts +1 -0
- package/tasks/functions/get-partitions-of-table-script.js +10 -0
- package/tasks/functions/get-pending-task-script.d.ts +2 -0
- package/tasks/functions/get-pending-task-script.js +19 -0
- package/tasks/functions/parse-task-message-search.d.ts +20 -0
- package/tasks/functions/parse-task-message-search.js +62 -0
- package/tasks/functions/throw-task-error.d.ts +1 -0
- package/tasks/functions/throw-task-error.js +7 -0
- package/tasks/index.d.ts +3 -0
- package/tasks/index.js +19 -0
- package/tasks/interfaces/index.d.ts +6 -0
- package/tasks/interfaces/index.js +22 -0
- package/tasks/interfaces/task-naming.d.ts +11 -0
- package/tasks/interfaces/task-naming.js +2 -0
- package/tasks/interfaces/task-object.d.ts +17 -0
- package/tasks/interfaces/task-object.js +2 -0
- package/tasks/interfaces/task-post-intercept.d.ts +8 -0
- package/tasks/interfaces/task-post-intercept.js +2 -0
- package/tasks/interfaces/task-runner.d.ts +6 -0
- package/tasks/interfaces/task-runner.js +2 -0
- package/tasks/interfaces/task-search-intercept.d.ts +4 -0
- package/tasks/interfaces/task-search-intercept.js +2 -0
- package/tasks/interfaces/task-settings.d.ts +15 -0
- package/tasks/interfaces/task-settings.js +2 -0
- package/tasks/models/task-error.d.ts +8 -0
- package/tasks/models/task-error.js +40 -0
- package/tasks/models/task-message-find.d.ts +3 -0
- package/tasks/models/task-message-find.js +21 -0
- package/tasks/models/task-message.d.ts +13 -0
- package/tasks/models/task-message.js +57 -0
- package/tasks/requests/task.request.d.ts +17 -0
- package/tasks/requests/task.request.js +71 -0
- package/tasks/services/task-manager.service.d.ts +10 -0
- package/tasks/services/task-manager.service.js +60 -0
- package/tasks/services/task-runner.service.d.ts +16 -0
- package/tasks/services/task-runner.service.js +88 -0
- package/tasks/tasks.controller.d.ts +19 -0
- package/tasks/tasks.controller.js +75 -0
- package/translations/entities/translation-config.entity.d.ts +9 -0
- package/translations/entities/translation-config.entity.js +65 -0
- package/translations/entities/translation-values.entity.d.ts +10 -0
- package/translations/entities/translation-values.entity.js +53 -0
- package/translations/env.d.ts +2 -0
- package/translations/env.js +7 -0
- package/translations/functions/check-can-use.d.ts +1 -0
- package/translations/functions/check-can-use.js +10 -0
- package/translations/functions/create-translation-config.d.ts +3 -0
- package/translations/functions/create-translation-config.js +19 -0
- package/translations/functions/create-translation-values.d.ts +3 -0
- package/translations/functions/create-translation-values.js +22 -0
- package/translations/functions/get-translation-config.d.ts +3 -0
- package/translations/functions/get-translation-config.js +14 -0
- package/translations/interfaces/translation-config.d.ts +8 -0
- package/translations/interfaces/translation-config.js +2 -0
- package/translations/interfaces/translation-values.d.ts +9 -0
- package/translations/interfaces/translation-values.js +2 -0
- package/translations/interfaces/translator-handle.d.ts +4 -0
- package/translations/interfaces/translator-handle.js +2 -0
- package/translations/migrations/1723760669185-CreateTranslationTables.d.ts +5 -0
- package/translations/migrations/1723760669185-CreateTranslationTables.js +43 -0
- package/translations/models/get-values.request.d.ts +5 -0
- package/translations/models/get-values.request.js +25 -0
- package/translations/models/get-values.response.d.ts +4 -0
- package/translations/models/get-values.response.js +20 -0
- package/translations/queries/translation-config.query.d.ts +1 -0
- package/translations/queries/translation-config.query.js +9 -0
- package/translations/queries/translation-values.query.d.ts +1 -0
- package/translations/queries/translation-values.query.js +16 -0
- package/translations/requests/translation.request.d.ts +16 -0
- package/translations/requests/translation.request.js +99 -0
- package/translations/services/translations.service.d.ts +11 -0
- package/translations/services/translations.service.js +56 -0
- package/translations/services/translator.service.d.ts +11 -0
- package/translations/services/translator.service.js +56 -0
- package/translations/translations.controller.d.ts +8 -0
- package/translations/translations.controller.js +57 -0
- package/transport/entities/transport-client.d.ts +12 -0
- package/transport/entities/transport-client.js +67 -0
- package/transport/entities/transport-gateway-status.d.ts +9 -0
- package/transport/entities/transport-gateway-status.js +51 -0
- package/transport/entities/transport-gateway.d.ts +6 -0
- package/transport/entities/transport-gateway.js +35 -0
- package/transport/environment.d.ts +4 -0
- package/transport/environment.js +6 -0
- package/transport/index.d.ts +2 -0
- package/transport/index.js +18 -0
- package/transport/interfaces/index.d.ts +1 -0
- package/transport/interfaces/index.js +17 -0
- package/transport/interfaces/transport-module-options.d.ts +14 -0
- package/transport/interfaces/transport-module-options.js +8 -0
- package/transport/transport.module.d.ts +5 -0
- package/transport/transport.module.js +38 -0
- package/web-socket/constants.d.ts +1 -0
- package/web-socket/constants.js +4 -0
- package/web-socket/functions/encode-message.d.ts +2 -0
- package/web-socket/functions/encode-message.js +14 -0
- package/web-socket/functions/get-fake-http-context.d.ts +26 -0
- package/web-socket/functions/get-fake-http-context.js +55 -0
- package/web-socket/functions/get-ip-address.d.ts +1 -0
- package/web-socket/functions/get-ip-address.js +23 -0
- package/web-socket/functions/parse-message.d.ts +1 -0
- package/web-socket/functions/parse-message.js +10 -0
- package/web-socket/index.d.ts +5 -0
- package/web-socket/index.js +21 -0
- package/web-socket/interfaces/client.d.ts +15 -0
- package/web-socket/interfaces/client.js +2 -0
- package/web-socket/interfaces/enum/client-type.d.ts +4 -0
- package/web-socket/interfaces/enum/client-type.js +8 -0
- package/web-socket/interfaces/enum/index.d.ts +3 -0
- package/web-socket/interfaces/enum/index.js +19 -0
- package/web-socket/interfaces/enum/message-type.d.ts +6 -0
- package/web-socket/interfaces/enum/message-type.js +10 -0
- package/web-socket/interfaces/enum/ws-connection-type.d.ts +4 -0
- package/web-socket/interfaces/enum/ws-connection-type.js +8 -0
- package/web-socket/interfaces/index.d.ts +4 -0
- package/web-socket/interfaces/index.js +20 -0
- package/web-socket/interfaces/message.d.ts +30 -0
- package/web-socket/interfaces/message.js +2 -0
- package/web-socket/interfaces/ws-connection.d.ts +4 -0
- package/web-socket/interfaces/ws-connection.js +2 -0
- package/web-socket/web-socket.controller.d.ts +25 -0
- package/web-socket/web-socket.controller.js +184 -0
- package/workers/functions/decode-message.d.ts +2 -0
- package/workers/functions/decode-message.js +7 -0
- package/workers/functions/dispatch-task.d.ts +2 -0
- package/workers/functions/dispatch-task.js +23 -0
- package/workers/functions/encode-message.d.ts +2 -0
- package/workers/functions/encode-message.js +7 -0
- package/workers/interfaces/enum/index.d.ts +1 -0
- package/workers/interfaces/enum/index.js +17 -0
- package/workers/interfaces/enum/worker-message-type.d.ts +6 -0
- package/workers/interfaces/enum/worker-message-type.js +10 -0
- package/workers/interfaces/index.d.ts +3 -0
- package/workers/interfaces/index.js +19 -0
- package/workers/interfaces/worker-data.d.ts +9 -0
- package/workers/interfaces/worker-data.js +2 -0
- package/workers/interfaces/worker-message.d.ts +20 -0
- package/workers/interfaces/worker-message.js +2 -0
- package/workers/workers.controller.d.ts +6 -0
- package/workers/workers.controller.js +72 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Instantiable } from "@rockster/common";
|
|
2
|
+
import { IRequestContext } from "./request-context";
|
|
3
|
+
import { PendingAction } from "./pending-action";
|
|
4
|
+
import { IActionDocs } from "./action-docs";
|
|
5
|
+
export type ActionHandle = {
|
|
6
|
+
(action: PendingAction, context: IRequestContext): Promise<void>;
|
|
7
|
+
};
|
|
8
|
+
export type ActionDef = {
|
|
9
|
+
objectClass: Instantiable;
|
|
10
|
+
path: string;
|
|
11
|
+
name: string;
|
|
12
|
+
onBefore?: ActionHandle;
|
|
13
|
+
execute: ActionHandle;
|
|
14
|
+
secure: boolean;
|
|
15
|
+
docs?: IActionDocs;
|
|
16
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { CacheOptions } from "../../cache/interfaces/cache-options";
|
|
2
|
+
import { ConnectionOptions } from "../../database/interfaces/connection.options";
|
|
3
|
+
import { HttpSettings } from "../../http/interfaces";
|
|
4
|
+
import { RouterOptions } from "./router-options";
|
|
5
|
+
import { DocsOptions } from "./docs-options";
|
|
6
|
+
import { LocaleOptions } from "./locale-options";
|
|
7
|
+
import { StorageOptions } from "./storage-options";
|
|
8
|
+
import { SecurityOptions } from "../../security/interfaces/security-options";
|
|
9
|
+
import { TranslationsOptions } from "./translations-options";
|
|
10
|
+
import { FormsOptions } from "./forms-options";
|
|
11
|
+
import { ITransportOptions } from "./transport-options";
|
|
12
|
+
export type OnCreateHttpServer = {
|
|
13
|
+
(httpSettings: HttpSettings): Promise<void> | void;
|
|
14
|
+
};
|
|
15
|
+
export type CoreOptions = {
|
|
16
|
+
name: string;
|
|
17
|
+
database: ConnectionOptions;
|
|
18
|
+
router?: RouterOptions;
|
|
19
|
+
cache?: CacheOptions;
|
|
20
|
+
onCreateHttpServer?: OnCreateHttpServer;
|
|
21
|
+
onRequestError?: (error: Error) => void;
|
|
22
|
+
port?: number;
|
|
23
|
+
transaction?: boolean;
|
|
24
|
+
docs?: DocsOptions;
|
|
25
|
+
locale?: LocaleOptions;
|
|
26
|
+
storage?: StorageOptions;
|
|
27
|
+
security?: SecurityOptions;
|
|
28
|
+
workers?: boolean | number;
|
|
29
|
+
translations?: TranslationsOptions;
|
|
30
|
+
forms?: FormsOptions;
|
|
31
|
+
transport?: ITransportOptions;
|
|
32
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConnectType = void 0;
|
|
4
|
+
var ConnectType;
|
|
5
|
+
(function (ConnectType) {
|
|
6
|
+
ConnectType["router"] = "router";
|
|
7
|
+
ConnectType["member"] = "member";
|
|
8
|
+
})(ConnectType || (exports.ConnectType = ConnectType = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './connect-type';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./connect-type"), exports);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from './enum';
|
|
2
|
+
export * from './action-def';
|
|
3
|
+
export * from './action-docs';
|
|
4
|
+
export * from './core-options';
|
|
5
|
+
export * from './docs-options';
|
|
6
|
+
export * from './format-message-options';
|
|
7
|
+
export * from './interceptor';
|
|
8
|
+
export * from './locale-options';
|
|
9
|
+
export * from './mapper';
|
|
10
|
+
export * from './object-docs';
|
|
11
|
+
export * from './object';
|
|
12
|
+
export * from './pending-action';
|
|
13
|
+
export * from './property-docs';
|
|
14
|
+
export * from './property';
|
|
15
|
+
export * from './request-callback-handle';
|
|
16
|
+
export * from './request-callback';
|
|
17
|
+
export * from './request-callbacks';
|
|
18
|
+
export * from './request-context';
|
|
19
|
+
export * from './request-data';
|
|
20
|
+
export * from './router-options';
|
|
21
|
+
export * from './sanitizer';
|
|
22
|
+
export * from './storage-options';
|
|
23
|
+
export * from './translations-options';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./enum"), exports);
|
|
18
|
+
__exportStar(require("./action-def"), exports);
|
|
19
|
+
__exportStar(require("./action-docs"), exports);
|
|
20
|
+
__exportStar(require("./core-options"), exports);
|
|
21
|
+
__exportStar(require("./docs-options"), exports);
|
|
22
|
+
__exportStar(require("./format-message-options"), exports);
|
|
23
|
+
__exportStar(require("./interceptor"), exports);
|
|
24
|
+
__exportStar(require("./locale-options"), exports);
|
|
25
|
+
__exportStar(require("./mapper"), exports);
|
|
26
|
+
__exportStar(require("./object-docs"), exports);
|
|
27
|
+
__exportStar(require("./object"), exports);
|
|
28
|
+
__exportStar(require("./pending-action"), exports);
|
|
29
|
+
__exportStar(require("./property-docs"), exports);
|
|
30
|
+
__exportStar(require("./property"), exports);
|
|
31
|
+
__exportStar(require("./request-callback-handle"), exports);
|
|
32
|
+
__exportStar(require("./request-callback"), exports);
|
|
33
|
+
__exportStar(require("./request-callbacks"), exports);
|
|
34
|
+
__exportStar(require("./request-context"), exports);
|
|
35
|
+
__exportStar(require("./request-data"), exports);
|
|
36
|
+
__exportStar(require("./router-options"), exports);
|
|
37
|
+
__exportStar(require("./sanitizer"), exports);
|
|
38
|
+
__exportStar(require("./storage-options"), exports);
|
|
39
|
+
__exportStar(require("./translations-options"), exports);
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Instantiable } from "@rockster/common";
|
|
2
|
+
import { IRequestContext } from "./request-context";
|
|
3
|
+
import { PendingAction } from "./pending-action";
|
|
4
|
+
import { PropertyNote } from "@rockster/class-memory";
|
|
5
|
+
import { IControllerProperty } from "../../controllers/interfaces";
|
|
6
|
+
import { HttpRequest } from "../../http/interfaces/http-request";
|
|
7
|
+
import { HttpResponse } from "../../http/interfaces/http-response";
|
|
8
|
+
export declare const commonInterceptor: {
|
|
9
|
+
onBeforeExecute: string;
|
|
10
|
+
onAfterExecute: string;
|
|
11
|
+
};
|
|
12
|
+
export type InterceptorExecutorArgs<Extra = any, Params = any> = {
|
|
13
|
+
action?: PendingAction;
|
|
14
|
+
context?: IRequestContext;
|
|
15
|
+
property?: PropertyNote<IControllerProperty>;
|
|
16
|
+
extra?: Extra;
|
|
17
|
+
params?: Params;
|
|
18
|
+
req?: HttpRequest;
|
|
19
|
+
res?: HttpResponse;
|
|
20
|
+
result?: any;
|
|
21
|
+
};
|
|
22
|
+
export type InterceptorExecutor = {
|
|
23
|
+
intercept(args: InterceptorExecutorArgs): Promise<any>;
|
|
24
|
+
};
|
|
25
|
+
export type Interceptor = {
|
|
26
|
+
name: string;
|
|
27
|
+
filters: string[];
|
|
28
|
+
executor: Instantiable<InterceptorExecutor>;
|
|
29
|
+
instance?: InterceptorExecutor;
|
|
30
|
+
waitWhenIsAfter?: boolean;
|
|
31
|
+
};
|
|
32
|
+
export type InterceptorExecute = {
|
|
33
|
+
name: string;
|
|
34
|
+
params?: any;
|
|
35
|
+
};
|
|
36
|
+
export type ExecuteInterceptorHandle = {
|
|
37
|
+
(args: InterceptorExecutorArgs, isAfter?: boolean): Promise<void>;
|
|
38
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IModuleObject } from "../../module";
|
|
2
|
+
import { IEntityObject } from "../../database";
|
|
3
|
+
import { IAuthObject } from "../../security";
|
|
4
|
+
import { IControllerObject } from "../../controllers/interfaces";
|
|
5
|
+
import { ObjectType } from "../../common";
|
|
6
|
+
import { InterceptorExecute } from "./interceptor";
|
|
7
|
+
import { IQueryObject } from "../../query/interfaces";
|
|
8
|
+
import { IJobObject } from "../../jobs/interfaces";
|
|
9
|
+
import { ITaskObject } from "../../tasks/interfaces/task-object";
|
|
10
|
+
export interface IObject {
|
|
11
|
+
type: ObjectType;
|
|
12
|
+
initialized?: boolean;
|
|
13
|
+
interceptors?: InterceptorExecute[];
|
|
14
|
+
}
|
|
15
|
+
export type Object = IObject & (IModuleObject | IEntityObject | IAuthObject | IControllerObject | IQueryObject | IJobObject | ITaskObject);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Dictionary } from "@rockster/common";
|
|
2
|
+
import { ActionDef } from "./action-def";
|
|
3
|
+
export type PendingAction = {
|
|
4
|
+
action: ActionDef;
|
|
5
|
+
path: string;
|
|
6
|
+
property: string;
|
|
7
|
+
dependencies: Dictionary<string>;
|
|
8
|
+
requestRef: string;
|
|
9
|
+
annotations: Dictionary<any>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ICommandProperty } from "../../command/interfaces/command-property";
|
|
2
|
+
import { IEntityProperty } from "../../database/interfaces/entity-property";
|
|
3
|
+
import { IControllerProperty } from "../../controllers/interfaces/controller-property";
|
|
4
|
+
import { IAuthProperty } from "../../security/interfaces/auth-property";
|
|
5
|
+
import { InterceptorExecute } from "./interceptor";
|
|
6
|
+
export interface IProperty {
|
|
7
|
+
interceptors?: InterceptorExecute[];
|
|
8
|
+
}
|
|
9
|
+
export type Property = IProperty & (IEntityProperty | IAuthProperty | IControllerProperty | ICommandProperty);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Dictionary } from "@rockster/common";
|
|
2
|
+
import { PendingAction } from "./pending-action";
|
|
3
|
+
import { EntityManager } from "typeorm";
|
|
4
|
+
import { IncomingHttpHeaders } from "http";
|
|
5
|
+
import { RequestCallbacks } from "./request-callbacks";
|
|
6
|
+
import { RequestCallbackHandle } from "./request-callback-handle";
|
|
7
|
+
import { Client } from "../../web-socket";
|
|
8
|
+
import { HttpRequest } from "../../http";
|
|
9
|
+
export type OnEndRequest = {
|
|
10
|
+
(action: string, handle: RequestCallbackHandle): Promise<void> | void;
|
|
11
|
+
};
|
|
12
|
+
export type CurrentSession<T = unknown> = {
|
|
13
|
+
userId: string;
|
|
14
|
+
} & T;
|
|
15
|
+
export interface IRequestContext<Session = CurrentSession> {
|
|
16
|
+
response: Dictionary<any>;
|
|
17
|
+
request: Dictionary<any>;
|
|
18
|
+
pendings: PendingAction[];
|
|
19
|
+
isAuthenticated?: boolean;
|
|
20
|
+
session?: Session;
|
|
21
|
+
entityManager?: EntityManager;
|
|
22
|
+
headers?: IncomingHttpHeaders;
|
|
23
|
+
callbacks: RequestCallbacks;
|
|
24
|
+
onSuccess: OnEndRequest;
|
|
25
|
+
onError: OnEndRequest;
|
|
26
|
+
wsClient?: Client;
|
|
27
|
+
httpRequest?: HttpRequest;
|
|
28
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IRequestContext } from "../interfaces";
|
|
2
|
+
import { IncomingHttpHeaders } from "http";
|
|
3
|
+
import { HttpRequest } from "../../http";
|
|
4
|
+
export type ContextBuildOptions = {
|
|
5
|
+
body: any;
|
|
6
|
+
headers: IncomingHttpHeaders;
|
|
7
|
+
httpRequest?: HttpRequest;
|
|
8
|
+
};
|
|
9
|
+
export declare class ContextBuilder {
|
|
10
|
+
build({ body, headers, httpRequest }: ContextBuildOptions): IRequestContext;
|
|
11
|
+
protected describe(value: string): {
|
|
12
|
+
path: string;
|
|
13
|
+
property: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.ContextBuilder = void 0;
|
|
10
|
+
const class_injector_1 = require("@rockster/class-injector");
|
|
11
|
+
const common_1 = require("@rockster/common");
|
|
12
|
+
let ContextBuilder = class ContextBuilder {
|
|
13
|
+
build({ body, headers, httpRequest }) {
|
|
14
|
+
const properties = Object.getOwnPropertyNames(body);
|
|
15
|
+
const pendings = [];
|
|
16
|
+
let isAuthenticated = false;
|
|
17
|
+
for (const property of properties) {
|
|
18
|
+
const value = this
|
|
19
|
+
.describe(property);
|
|
20
|
+
const action = core
|
|
21
|
+
.actionsByPath[value.path];
|
|
22
|
+
if (!action) {
|
|
23
|
+
throw new common_1.NotFoundError({
|
|
24
|
+
message: property
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
if (action.secure) {
|
|
28
|
+
isAuthenticated = true;
|
|
29
|
+
}
|
|
30
|
+
pendings.push({
|
|
31
|
+
action: action,
|
|
32
|
+
path: value.path,
|
|
33
|
+
property: value.property,
|
|
34
|
+
dependencies: {},
|
|
35
|
+
requestRef: property,
|
|
36
|
+
annotations: {}
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
const callbacks = {
|
|
40
|
+
success: [],
|
|
41
|
+
error: []
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
pendings: pendings,
|
|
45
|
+
isAuthenticated: isAuthenticated,
|
|
46
|
+
request: body,
|
|
47
|
+
response: {},
|
|
48
|
+
headers: headers,
|
|
49
|
+
callbacks,
|
|
50
|
+
httpRequest,
|
|
51
|
+
onError(name, handle) {
|
|
52
|
+
callbacks.error.push({
|
|
53
|
+
name: name,
|
|
54
|
+
handle: handle
|
|
55
|
+
});
|
|
56
|
+
},
|
|
57
|
+
onSuccess(name, handle) {
|
|
58
|
+
callbacks.success.push({
|
|
59
|
+
name: name,
|
|
60
|
+
handle: handle
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
describe(value) {
|
|
66
|
+
let path = '';
|
|
67
|
+
let property = '';
|
|
68
|
+
let currentValue = '';
|
|
69
|
+
for (const char of value) {
|
|
70
|
+
switch (char) {
|
|
71
|
+
case '(':
|
|
72
|
+
path += currentValue;
|
|
73
|
+
currentValue = '';
|
|
74
|
+
break;
|
|
75
|
+
case ')':
|
|
76
|
+
property += currentValue;
|
|
77
|
+
break;
|
|
78
|
+
default:
|
|
79
|
+
currentValue += char;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
path: path,
|
|
84
|
+
property
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
exports.ContextBuilder = ContextBuilder;
|
|
89
|
+
exports.ContextBuilder = ContextBuilder = __decorate([
|
|
90
|
+
(0, class_injector_1.Injectable)()
|
|
91
|
+
], ContextBuilder);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IntlShape } from "@formatjs/intl";
|
|
2
|
+
import { Dictionary, Locale } from "@rockster/common";
|
|
3
|
+
import { FormatMessageOptions } from "../interfaces";
|
|
4
|
+
export declare class LocaleService {
|
|
5
|
+
private static _default;
|
|
6
|
+
protected get default(): Locale;
|
|
7
|
+
private static _cache;
|
|
8
|
+
protected get cache(): import("@formatjs/intl").IntlCache;
|
|
9
|
+
private static _memory;
|
|
10
|
+
protected get memory(): Dictionary<IntlShape<string>>;
|
|
11
|
+
init(): void;
|
|
12
|
+
formatMessage({ locale, messageKey, replaces }: FormatMessageOptions): string;
|
|
13
|
+
}
|