Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3936eca
fixed tests
spicemc Oct 21, 2022
e29f885
fixed transform signature
spicemc Oct 21, 2022
618738e
Merge pull request #1 from spicemc/fix/tests
spicemc Oct 21, 2022
8eecad0
express,express-session,cookie updated
spicemc Oct 21, 2022
e877166
glob updated
spicemc Oct 21, 2022
3037e4a
types for express, express-session updated
spicemc Oct 21, 2022
4936a05
fixed tests. upgraded dependencies. class-transformer fixes. test tsc…
spicemc Oct 22, 2022
88209f1
Merge pull request #2 from spicemc/update/dependencies
spicemc Oct 22, 2022
8904059
refactored negative parameter is required test
spicemc Oct 22, 2022
8e20494
adjust some project info
spicemc Oct 25, 2022
46a10af
fix httpCode type
spicemc Oct 26, 2022
1a2bbea
update/linter: packages updated. new config files.
spicemc Oct 26, 2022
fae3aa5
Merge pull request #3 from spicemc/update/linter
spicemc Oct 26, 2022
ec230ba
prettier updated
spicemc Oct 26, 2022
d278ea5
Fix/linter errors (#4)
spicemc Nov 4, 2022
97eca3c
update/github-workflows (#5)
spicemc Nov 5, 2022
c226de4
Update/dev dependencies (#6)
spicemc Nov 11, 2022
bf8d3a8
body-parser updated
spicemc Nov 12, 2022
92541f7
release version 1.0.0
spicemc Nov 12, 2022
766aaa2
types path changed to relative (#7)
spicemc Nov 12, 2022
9549792
release v1.0.1
spicemc Nov 12, 2022
d2c5aee
replaced path
spicemc Nov 12, 2022
d214d58
readded Authorized decorator overload
spicemc Nov 12, 2022
d88ceac
readme updated
spicemc Nov 12, 2022
4e84e6f
Update lock-closed-issues-workflow.yml
spicemc Nov 15, 2022
f8526c8
Adjustments to contribute back
spicemc Nov 24, 2022
8410dcf
revert base project README
spicemc Nov 24, 2022
256cb8d
reverted github project url
spicemc Nov 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
types path changed to relative (#7)
  • Loading branch information
spicemc authored Nov 12, 2022
commit 766aaa26209fe1a6658c1fda23286a6464a22c70
2 changes: 1 addition & 1 deletion src/Action.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Callable } from '@rce/types/Types';
import { Callable } from './types/Types';

/**
* Controller action properties.
Expand Down
2 changes: 1 addition & 1 deletion src/ActionParameterHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { AuthorizationRequiredError } from './error/AuthorizationRequiredError';
import { CurrentUserCheckerNotDefinedError } from './error/CurrentUserCheckerNotDefinedError';
import { isPromiseLike } from './util/isPromiseLike';
import { InvalidParamError } from './error/ParamNormalizationError';
import { Newable } from '@rce/types/Types';
import { Newable } from './types/Types';

/**
* Handles action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/RoutingControllers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { InterceptorMetadata } from './metadata/InterceptorMetadata';
import { RoutingControllersOptions } from './RoutingControllersOptions';
import { isPromiseLike } from './util/isPromiseLike';
import { runInSequence } from './util/runInSequence';
import { Newable } from '@rce/types/Types';
import { Newable } from './types/Types';

/**
* Registers controllers and middlewares in the given server framework.
Expand Down
2 changes: 1 addition & 1 deletion src/RoutingControllersOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ClassTransformOptions } from 'class-transformer';
import { ValidatorOptions } from 'class-validator';
import { AuthorizationChecker } from './AuthorizationChecker';
import { CurrentUserChecker } from './CurrentUserChecker';
import { Newable } from '@rce/types/Types';
import { Newable } from './types/Types';

/**
* Routing controller initialization options.
Expand Down
2 changes: 1 addition & 1 deletion src/container.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Action } from './Action';
import { Newable } from '@rce/types/Types';
import { Newable } from './types/Types';

/**
* Container options.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/All.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getMetadataArgsStorage } from '../index';
import { ControllerOptions } from '../decorator-options/ControllerOptions';
import { Newable } from '@rce/types/Types';
import { Newable } from '../types/Types';

type AllFunction = (object: Newable, methodName: string) => void;

Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Authorized.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../types/Types';

type AuthorizedFunction = (clsOrObject: any, method?: string) => void;

Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Body.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BodyOptions } from '../decorator-options/BodyOptions';
import { getMetadataArgsStorage } from '../index';
import { Newable } from '@rce/types/Types';
import { Newable } from '../types/Types';

type BodyFunction = (object: Newable, methodName: string, index: number) => void;

Expand Down
2 changes: 1 addition & 1 deletion src/decorator/BodyParam.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ParamOptions } from '../decorator-options/ParamOptions';
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Takes partial data of the request body.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/ContentType.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Sets response Content-Type.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Controller.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getMetadataArgsStorage } from '../index';
import { ControllerOptions } from '../decorator-options/ControllerOptions';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Defines a class as a controller.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/CookieParam.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ParamOptions } from '../decorator-options/ParamOptions';
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Injects a request's cookie value to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/CookieParams.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Injects all request's cookies to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Ctx.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Injects a Koa's Context object to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/CurrentUser.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Injects currently authorized user.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Delete.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HandlerOptions } from '../decorator-options/HandlerOptions';
import { getMetadataArgsStorage } from '../index';
import { DecoratorFunction } from '@rce/types/Types';
import { DecoratorFunction } from '../types/Types';

/**
* Registers a controller method to be executed when DELETE request comes on a given route.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Get.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HandlerOptions } from '../decorator-options/HandlerOptions';
import { getMetadataArgsStorage } from '../index';
import { DecoratorFunction } from '@rce/types/Types';
import { DecoratorFunction } from '../types/Types';

/**
* Registers an action to be executed when GET request comes on a given route.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Head.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HandlerOptions } from '../decorator-options/HandlerOptions';
import { getMetadataArgsStorage } from '../index';
import { DecoratorFunction } from '@rce/types/Types';
import { DecoratorFunction } from '../types/Types';

/**
* Registers an action to be executed when HEAD request comes on a given route.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Header.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Sets response header.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/HeaderParam.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ParamOptions } from '../decorator-options/ParamOptions';
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Injects a request's http header value to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/HeaderParams.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Injects all request's http headers to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/HttpCode.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Sets response HTTP status code.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Interceptor.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Registers a global interceptor.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/JsonController.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getMetadataArgsStorage } from '../index';
import { ControllerOptions } from '../decorator-options/ControllerOptions';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Defines a class as a JSON controller. If JSON controller is used, then all controller actions will return
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Location.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Sets Location header with given value to the response.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Method.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HandlerOptions } from '../decorator-options/HandlerOptions';
import { getMetadataArgsStorage } from '../index';
import { ActionType } from '../metadata/types/ActionType';
import { DecoratorFunction } from '@rce/types/Types';
import { DecoratorFunction } from '../types/Types';

/**
* Registers an action to be executed when request with specified method comes on a given route.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Middleware.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../types/Types';

/**
* Marks given class as a middleware.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/OnNull.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { DecoratorFunction, Newable } from '@rce/types/Types';
import { DecoratorFunction, Newable } from '../types/Types';

/**
* Used to set specific HTTP status code when result returned by a controller action is equal to null.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/OnUndefined.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { DecoratorFunction, Newable } from '@rce/types/Types';
import { DecoratorFunction, Newable } from '../types/Types';

/**
* Used to set specific HTTP status code when result returned by a controller action is equal to undefined.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Param.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Injects a request's route parameter value to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Params.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ParamOptions } from '../decorator-options/ParamOptions';
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Injects all request's route parameters to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Patch.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HandlerOptions } from '../decorator-options/HandlerOptions';
import { getMetadataArgsStorage } from '../index';
import { DecoratorFunction } from '@rce/types/Types';
import { DecoratorFunction } from '../types/Types';

/**
* Registers an action to be executed when PATCH request comes on a given route.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Post.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HandlerOptions } from '../decorator-options/HandlerOptions';
import { getMetadataArgsStorage } from '../index';
import { DecoratorFunction } from '@rce/types/Types';
import { DecoratorFunction } from '../types/Types';

/**
* Registers an action to be executed when POST request comes on a given route.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Put.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { HandlerOptions } from '../decorator-options/HandlerOptions';
import { getMetadataArgsStorage } from '../index';
import { DecoratorFunction } from '@rce/types/Types';
import { DecoratorFunction } from '../types/Types';

/**
* Registers an action to be executed when PUT request comes on a given route.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/QueryParam.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ParamOptions } from '../decorator-options/ParamOptions';
import { getMetadataArgsStorage } from '../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../types/Types';

/**
* Injects a request's query parameter value to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/QueryParams.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ParamOptions } from '../decorator-options/ParamOptions';
import { getMetadataArgsStorage } from '../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../types/Types';

/**
* Injects all request's query parameters to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Redirect.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../types/Types';

/**
* Sets Redirect header with given value to the response.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Render.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../types/Types';

/**
* Specifies a template to be rendered by a controller action.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Req.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../types/Types';

/**
* Injects a Request object to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Res.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../types/Types';

/**
* Injects a Response object to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/ResponseClassTransformOptions.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { getMetadataArgsStorage } from '../index';
import { ClassTransformOptions } from 'class-transformer';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Options to be set to class-transformer for the result of the response.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/Session.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ParamOptions } from '../decorator-options/ParamOptions';
import { getMetadataArgsStorage } from '../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../types/Types';

/**
* Injects a Session object to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/SessionParam.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ParamOptions } from '../decorator-options/ParamOptions';
import { getMetadataArgsStorage } from '../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../types/Types';

/**
* Injects a Session object property to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/State.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../types/Types';

/**
* Injects a State object to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/UploadedFile.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { UploadOptions } from '../decorator-options/UploadOptions';
import { getMetadataArgsStorage } from '../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../types/Types';

/**
* Injects an uploaded file object to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/UploadedFiles.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { UploadOptions } from '../decorator-options/UploadOptions';
import { getMetadataArgsStorage } from '../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../types/Types';

/**
* Injects all uploaded files to the controller action parameter.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/UseAfter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Specifies a given middleware to be used for controller or controller action AFTER the action executes.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/UseBefore.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getMetadataArgsStorage } from '../index';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Specifies a given middleware to be used for controller or controller action BEFORE the action executes.
Expand Down
2 changes: 1 addition & 1 deletion src/decorator/UseInterceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { getMetadataArgsStorage } from '../index';
import { Action } from '../Action';
import { ClassConstructor } from 'class-transformer';
import { InterceptorInterface } from '../InterceptorInterface';
import { Newable, Callable } from '@rce/types/Types';
import { Newable, Callable } from '../types/Types';

/**
* Specifies a given interceptor middleware or interceptor function to be used for controller or controller action.
Expand Down
2 changes: 1 addition & 1 deletion src/driver/BaseDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { ActionMetadata } from '../metadata/ActionMetadata';
import { ParamMetadata } from '../metadata/ParamMetadata';
import { MiddlewareMetadata } from '../metadata/MiddlewareMetadata';
import { Action } from '../Action';
import { ClassType } from '@rce/types/Types';
import { ClassType } from '../types/Types';

/**
* Base driver functionality for all other drivers.
Expand Down
2 changes: 1 addition & 1 deletion src/driver/express/ExpressDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { isPromiseLike } from '../../util/isPromiseLike';
import { getFromContainer } from '../../container';
import { AuthorizationRequiredError } from '../../error/AuthorizationRequiredError';
import { NotFoundError } from '../../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../../types/Types';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const cookie = require('cookie');
Expand Down
2 changes: 1 addition & 1 deletion src/driver/koa/KoaDriver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { getFromContainer } from '../../container';
import { RoleChecker } from '../../RoleChecker';
import { AuthorizationRequiredError } from '../../error/AuthorizationRequiredError';
import { HttpError, NotFoundError } from '../../index';
import { Callable } from '@rce/types/Types';
import { Callable } from '../../types/Types';

// eslint-disable-next-line @typescript-eslint/no-var-requires
const cookie = require('cookie');
Expand Down
Loading