raiton 3.0.1 → 3.0.2

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.
Files changed (67) hide show
  1. package/build/bin/index.mjs +1 -1
  2. package/package.json +1 -1
  3. package/source/bin/bootstrapper.ts +3 -3
  4. package/source/bin/cli-tools.ts +1 -1
  5. package/source/commands/artifact.command.ts +2 -2
  6. package/source/commands/build.command.ts +2 -2
  7. package/source/commands/develop.command.ts +3 -3
  8. package/source/commands/grafts.command.ts +1 -1
  9. package/source/commands/start.command.ts +3 -3
  10. package/source/core/application.ts +6 -6
  11. package/source/core/builder.ts +7 -7
  12. package/source/core/config/config.ts +2 -2
  13. package/source/core/config/define.ts +2 -2
  14. package/source/core/context.ts +1 -1
  15. package/source/core/controller/builder.ts +5 -5
  16. package/source/core/controller/compiler.ts +5 -5
  17. package/source/core/controller/metadata.ts +2 -2
  18. package/source/core/directories.ts +1 -1
  19. package/source/core/hooks.ts +1 -1
  20. package/source/core/injection/injection.ts +3 -3
  21. package/source/core/middleware/compose.ts +2 -2
  22. package/source/core/middleware/pipeline.ts +2 -2
  23. package/source/core/plugins/plugin.ts +1 -1
  24. package/source/core/plugins/scope.ts +3 -3
  25. package/source/core/raiton.ts +1 -1
  26. package/source/core/router/handler.ts +7 -7
  27. package/source/core/router/matcher.ts +1 -1
  28. package/source/core/router/route.ts +1 -1
  29. package/source/core/router/router.ts +4 -4
  30. package/source/core/server.ts +1 -1
  31. package/source/core/thread.ts +8 -8
  32. package/source/sdk/artifacts.ts +4 -4
  33. package/source/sdk/decorators/controllable.decorator.ts +3 -3
  34. package/source/sdk/decorators/injection.decorator.ts +3 -3
  35. package/source/sdk/decorators/middleware.decorator.ts +2 -2
  36. package/source/sdk/decorators/parametrable.ts +2 -2
  37. package/source/sdk/decorators/routable.decorator.ts +3 -3
  38. package/source/sdk/encryption.ts +1 -1
  39. package/source/sdk/exceptions/http-exception.ts +3 -3
  40. package/source/sdk/parameter-bag.ts +1 -1
  41. package/source/sdk/plugins/body-parser.plugin.ts +3 -3
  42. package/source/sdk/plugins/security/body-limit.ts +2 -2
  43. package/source/sdk/plugins/security/cors.ts +2 -2
  44. package/source/sdk/plugins/security/headers.ts +2 -2
  45. package/source/sdk/plugins/security/method-guard.ts +2 -2
  46. package/source/sdk/plugins/security/rate-limit.ts +2 -2
  47. package/source/sdk/repositories.ts +1 -1
  48. package/source/sdk/responses/error.ts +2 -2
  49. package/source/sdk/responses/helpers.ts +3 -3
  50. package/source/sdk/responses/http-throwable.ts +3 -3
  51. package/source/sdk/responses/http.ts +3 -3
  52. package/source/sdk/runtime/bun/server.ts +1 -1
  53. package/source/sdk/runtime/deno/server.ts +1 -1
  54. package/source/sdk/runtime/index.ts +6 -6
  55. package/source/sdk/runtime/node/server.ts +1 -1
  56. package/source/sdk/runtime/web/server.ts +1 -1
  57. package/source/types/application.ts +1 -1
  58. package/source/types/config.ts +1 -1
  59. package/source/types/controller.ts +3 -3
  60. package/source/types/injection.ts +1 -1
  61. package/source/types/middleware.ts +1 -1
  62. package/source/types/plugin.ts +1 -1
  63. package/source/types/raiton.ts +1 -1
  64. package/source/types/responses.ts +1 -1
  65. package/source/types/router.ts +2 -2
  66. package/source/types/runtime.ts +1 -1
  67. package/source/types/thread.ts +4 -4
@@ -4817,7 +4817,7 @@ var {
4817
4817
  Help
4818
4818
  } = import__.default;
4819
4819
  // package.json
4820
- var version = "3.0.1";
4820
+ var version = "3.0.2";
4821
4821
 
4822
4822
  // source/bin/cli.ts
4823
4823
  var CLI = new Command;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "raiton",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Protorians Raiton Development Kit",
@@ -1,7 +1,7 @@
1
1
  import {Command} from 'commander';
2
- import {RaitonCommands, RaitonConfig} from "@/core";
3
- import {getPackageRoot} from "@/sdk";
4
- import {CliTools} from "@/bin/cli-tools";
2
+ import {RaitonCommands, RaitonConfig} from "../core";
3
+ import {getPackageRoot} from "../sdk";
4
+ import {CliTools} from "./cli-tools";
5
5
 
6
6
 
7
7
  export default async function bootstrapper(cli: Command) {
@@ -1,5 +1,5 @@
1
1
  import {spawn} from 'node:child_process';
2
- import {isBunUsed, isDenoUsed} from "@/bin/constants";
2
+ import {isBunUsed, isDenoUsed} from "./constants";
3
3
 
4
4
 
5
5
  export class CliTools {
@@ -1,6 +1,6 @@
1
- import {RaitonCommand, RaitonBuilder} from "@/core";
1
+ import {RaitonCommand, RaitonBuilder} from "../core";
2
2
  import {Logger} from "@protorians/logger";
3
- import type {BuildCommandOptions} from "@/types";
3
+ import type {BuildCommandOptions} from "../types";
4
4
 
5
5
 
6
6
  export default class ArtifactCommand extends RaitonCommand {
@@ -1,6 +1,6 @@
1
- import {RaitonCommand, RaitonBuilder} from "@/core";
1
+ import {RaitonCommand, RaitonBuilder} from "../core";
2
2
  import {LBadge, Logger} from "@protorians/logger";
3
- import type {BuildCommandOptions} from "@/types";
3
+ import type {BuildCommandOptions} from "../types";
4
4
 
5
5
 
6
6
  export default class BuildCommand extends RaitonCommand {
@@ -1,8 +1,8 @@
1
- import {Raiton, RaitonCommand} from "@/core";
1
+ import {Raiton, RaitonCommand} from "../core";
2
2
  import {ChildProcess, ChildProcessWithoutNullStreams} from 'node:child_process';
3
3
  import {Logger} from "@protorians/logger";
4
- import {EventMessageEnum} from "@/sdk";
5
- import {CliTools} from "@/bin/cli-tools";
4
+ import {EventMessageEnum} from "../sdk";
5
+ import {CliTools} from "../bin/cli-tools";
6
6
  import path from "node:path";
7
7
 
8
8
  export default class DevelopCommand extends RaitonCommand {
@@ -1,4 +1,4 @@
1
- import {RaitonCommand} from "@/core";
1
+ import {RaitonCommand} from "../core";
2
2
 
3
3
 
4
4
  export default class GraftsCommand extends RaitonCommand {
@@ -1,7 +1,7 @@
1
- import {RaitonCommand} from "@/core";
1
+ import {RaitonCommand} from "../core";
2
2
  import {ChildProcess} from 'node:child_process';
3
- import {Raiton} from "@/core/raiton";
4
- import {CliTools} from "@/bin/cli-tools";
3
+ import {Raiton} from "../core/raiton";
4
+ import {CliTools} from "../bin/cli-tools";
5
5
  import path from "node:path";
6
6
 
7
7
  export default class StartCommand extends RaitonCommand {
@@ -1,11 +1,11 @@
1
- import {PluginScope} from '@/core/plugins/scope'
1
+ import {PluginScope} from './plugins/scope'
2
2
  import {RequestContext} from './context'
3
- import {ApplicationConfig, ApplicationInterface} from "@/types/application";
4
- import {HttpMethod} from "@/sdk";
5
- import {RouteHandler} from "@/types";
3
+ import {ApplicationConfig, ApplicationInterface} from "../types/application";
4
+ import {HttpMethod} from "../sdk";
5
+ import {RouteHandler} from "../types";
6
6
  import {Logger} from "@protorians/logger";
7
- import {RaitonConfig} from "@/core/config";
8
- import {Artifacts} from "@/sdk/artifacts";
7
+ import {RaitonConfig} from "./config";
8
+ import {Artifacts} from "../sdk/artifacts";
9
9
 
10
10
  export class Application implements ApplicationInterface {
11
11
  private root: PluginScope
@@ -2,16 +2,16 @@ import {RaitonConfig} from "./config";
2
2
  import path from "node:path";
3
3
  import {RaitonDirectories} from "./directories";
4
4
  import fs, {WatchEventType} from "node:fs";
5
- import type {BuilderConfig, BuilderInterface,} from "@/types";
5
+ import type {BuilderConfig, BuilderInterface,} from "../types";
6
6
  import {RaitonThread} from "./thread";
7
- import {Raiton} from "@/core/raiton";
8
- import {isControllerArtifact, isServiceArtifact} from "@/sdk";
9
- import {ControllerBuilder} from "@/core/controller";
7
+ import {Raiton} from "./raiton";
8
+ import {isControllerArtifact, isServiceArtifact} from "../sdk";
9
+ import {ControllerBuilder} from "./controller";
10
10
  import {watch} from "fs";
11
11
  import {LBadge, Logger} from "@protorians/logger";
12
- import {Throwable} from "@/sdk/exceptions";
13
- import {Injection} from "@/core/injection";
14
- import {Artifacts} from "@/sdk/artifacts";
12
+ import {Throwable} from "../sdk/exceptions";
13
+ import {Injection} from "./injection";
14
+ import {Artifacts} from "../sdk/artifacts";
15
15
 
16
16
  export class RaitonBuilder implements BuilderInterface {
17
17
  protected _source: string | null = null;
@@ -1,8 +1,8 @@
1
1
  import path from "node:path";
2
2
  import fs from "node:fs";
3
- import {Configurable} from "@/types";
3
+ import {Configurable} from "../../types";
4
4
  import {Logger} from "@protorians/logger";
5
- import {Raiton} from "@/core/raiton";
5
+ import {Raiton} from "../raiton";
6
6
 
7
7
  export class RaitonConfig {
8
8
  static readonly current: Map<keyof Configurable, Configurable[keyof Configurable]> = new Map();
@@ -1,5 +1,5 @@
1
- import {Configurable} from "@/types/config";
2
- import {JsonUtil} from "@/sdk/utilities";
1
+ import {Configurable} from "../../types/config";
2
+ import {JsonUtil} from "../../sdk/utilities";
3
3
 
4
4
  export async function defineConfig(config?: Configurable) {
5
5
  const workdir = process.cwd();
@@ -1,7 +1,7 @@
1
1
  import type {
2
2
  RuntimeRequestInterface,
3
3
  RuntimeReplyInterface
4
- } from '@/types'
4
+ } from '../types'
5
5
 
6
6
  export class RequestContext {
7
7
  public state: Record<string, any> = {}
@@ -1,10 +1,10 @@
1
1
  import fs from "node:fs";
2
- import {BuilderHMRDeclaration} from "@/types";
2
+ import {BuilderHMRDeclaration} from "../../types";
3
3
  import {LBadge, Logger} from "@protorians/logger";
4
- import {compileController} from "@/core/controller/compiler";
5
- import {RaitonThread} from "@/core/thread";
6
- import {Injection} from "@/core/injection";
7
- import {isControllerArtifact} from "@/sdk";
4
+ import {compileController} from "./compiler";
5
+ import {RaitonThread} from "../thread";
6
+ import {Injection} from "../injection";
7
+ import {isControllerArtifact} from "../../sdk";
8
8
  import path from "node:path";
9
9
 
10
10
  export class ControllerBuilder {
@@ -1,8 +1,8 @@
1
- import {ApplicationInterface} from "@/types/application";
2
- import {getControllerMetadata} from "@/core";
3
- import {createHandler} from "@/core/router";
4
- import {Injection} from "@/core/injection";
5
- import {ControllerMetaInterface} from "@/types";
1
+ import {ApplicationInterface} from "../../types/application";
2
+ import {getControllerMetadata} from "..";
3
+ import {createHandler} from "../router";
4
+ import {Injection} from "../injection";
5
+ import {ControllerMetaInterface} from "../../types";
6
6
 
7
7
  export function compileController(
8
8
  ControllerClass: any,
@@ -1,5 +1,5 @@
1
- import {ControllerMetaInterface} from "@/types";
2
- import {METADATA_KEYS} from "@/sdk";
1
+ import {ControllerMetaInterface} from "../../types";
2
+ import {METADATA_KEYS} from "../../sdk";
3
3
  import "reflect-metadata";
4
4
 
5
5
  export function getControllerMetadata(target: any): ControllerMetaInterface {
@@ -1,6 +1,6 @@
1
1
  import path from "node:path";
2
2
  import {RaitonConfig} from "./config";
3
- import {Raiton} from "@/core/raiton";
3
+ import {Raiton} from "./raiton";
4
4
 
5
5
 
6
6
  export class RaitonDirectories {
@@ -1,4 +1,4 @@
1
- import {HookName, HookHandler} from '@/types'
1
+ import {HookName, HookHandler} from '../types'
2
2
 
3
3
  export class HookStore {
4
4
  private hooks = new Map<HookName, HookHandler[]>()
@@ -1,9 +1,9 @@
1
1
  import "reflect-metadata";
2
- import type {IConstructor, ContainerDefinitionInterface} from "@/types";
2
+ import type {IConstructor, ContainerDefinitionInterface} from "../../types";
3
3
  import {LifetimeEnum, TextUtility} from "@protorians/core";
4
4
  import {Logger} from "@protorians/logger";
5
- import {METADATA_KEYS} from "@/sdk/constants";
6
- import {Throwable} from "@/sdk/exceptions";
5
+ import {METADATA_KEYS} from "../../sdk/constants";
6
+ import {Throwable} from "../../sdk/exceptions";
7
7
 
8
8
  const camelCase = TextUtility.camelCase;
9
9
 
@@ -1,5 +1,5 @@
1
- import {MiddlewareType} from '@/types'
2
- import {Throwable} from "@/sdk/exceptions";
1
+ import {MiddlewareType} from '../../types'
2
+ import {Throwable} from "../../sdk/exceptions";
3
3
 
4
4
  export function middlewareCompose(middlewares: MiddlewareType[]) {
5
5
  return function (request: any) {
@@ -1,5 +1,5 @@
1
- import { MiddlewareType } from '@/types'
2
- import { middlewareCompose } from '@/core'
1
+ import { MiddlewareType } from '../../types'
2
+ import { middlewareCompose } from '..'
3
3
 
4
4
  export class MiddlewarePipeline {
5
5
  private stack: MiddlewareType[] = []
@@ -1,4 +1,4 @@
1
- import { Plugin, PluginFn } from '@/types'
1
+ import { Plugin, PluginFn } from '../../types'
2
2
 
3
3
  export function definePlugin(
4
4
  setup: PluginFn,
@@ -1,6 +1,6 @@
1
- import {HookStore} from '@/core/hooks'
2
- import {MiddlewarePipeline} from '@/core/middleware'
3
- import {Route, Router} from '@/core/router'
1
+ import {HookStore} from '../hooks'
2
+ import {MiddlewarePipeline} from '../middleware'
3
+ import {Route, Router} from '../router'
4
4
 
5
5
  export class PluginScope {
6
6
  public hooks: HookStore
@@ -1,4 +1,4 @@
1
- import {RaitonSignalMap, ThreadInterface} from "@/types";
1
+ import {RaitonSignalMap, ThreadInterface} from "../types";
2
2
  import {ISignalStack, Signal} from "@protorians/core";
3
3
 
4
4
 
@@ -1,11 +1,11 @@
1
- import {ControllerMetaInterface, MiddlewareCallable, ParamMetaInterface, RouteMetaInterface} from "@/types";
2
- import {METADATA_KEYS, Parametrable} from "@/sdk";
1
+ import {ControllerMetaInterface, MiddlewareCallable, ParamMetaInterface, RouteMetaInterface} from "../../types";
2
+ import {METADATA_KEYS, Parametrable} from "../../sdk";
3
3
  import {Logger} from "@protorians/logger";
4
- import {middlewareCompose, Raiton} from "@/core";
5
- import {DataTransferObject} from "@/sdk/data-transfer-object";
6
- import {Throwable} from "@/sdk/exceptions/throwable";
7
- import {HttpException} from "@/sdk/exceptions";
8
- import {ThrowableResponse} from "@/sdk/responses/http-throwable";
4
+ import {middlewareCompose, Raiton} from "..";
5
+ import {DataTransferObject} from "../../sdk/data-transfer-object";
6
+ import {Throwable} from "../../sdk/exceptions/throwable";
7
+ import {HttpException} from "../../sdk/exceptions";
8
+ import {ThrowableResponse} from "../../sdk/responses/http-throwable";
9
9
 
10
10
  export function createHandler(
11
11
  instance: any,
@@ -1,4 +1,4 @@
1
- import {Route} from '@/core/router'
1
+ import {Route} from '.'
2
2
 
3
3
  export class RouteMatcher {
4
4
  protected routes = new Map<string, Route>()
@@ -1,4 +1,4 @@
1
- import type {RouteDefinition} from '@/types/router'
1
+ import type {RouteDefinition} from '../../types/router'
2
2
 
3
3
  export class Route {
4
4
  method: string
@@ -1,7 +1,7 @@
1
- import {RouteHandler} from '@/types'
2
- import {HttpMethod} from "@/sdk/enums";
3
- import {Route} from '@/core/router/route'
4
- import {RouteMatcher} from '@/core/router/matcher'
1
+ import {RouteHandler} from '../../types'
2
+ import {HttpMethod} from "../../sdk/enums";
3
+ import {Route} from './route'
4
+ import {RouteMatcher} from './matcher'
5
5
 
6
6
  export class Router {
7
7
  private matcher = new RouteMatcher()
@@ -1,4 +1,4 @@
1
- import type {ServerInterface, ServerOptions} from "@/types";
1
+ import type {ServerInterface, ServerOptions} from "../types";
2
2
 
3
3
 
4
4
  export class Server implements ServerInterface {
@@ -6,17 +6,17 @@ import type {
6
6
  ThreadOptions,
7
7
  ThreadSetupOptions,
8
8
  ThreadWaitCallable,
9
- } from "@/types";
10
- import {EventMessageEnum, RuntimeType} from "@/sdk/enums";
9
+ } from "../types";
10
+ import {EventMessageEnum, RuntimeType} from "../sdk/enums";
11
11
  import {ProcessUtility} from "@protorians/core";
12
12
  import {until} from "./process.util";
13
- import {ApplicationInterface} from "@/types/application";
14
- import {Runtime} from "@/sdk/runtime";
13
+ import {ApplicationInterface} from "../types/application";
14
+ import {Runtime} from "../sdk/runtime";
15
15
  import {LBadge, Logger} from "@protorians/logger";
16
- import {ControllerBuilder} from "@/core/controller";
17
- import {bodyParserPlugin} from "@/sdk/plugins/body-parser.plugin";
18
- import {Injection} from "@/core/injection/injection";
19
- import {Throwable} from "@/sdk/exceptions";
16
+ import {ControllerBuilder} from "./controller";
17
+ import {bodyParserPlugin} from "../sdk/plugins/body-parser.plugin";
18
+ import {Injection} from "./injection/injection";
19
+ import {Throwable} from "../sdk/exceptions";
20
20
  import os from "os";
21
21
 
22
22
 
@@ -1,8 +1,8 @@
1
- import {Injection} from "@/core/injection";
1
+ import {Injection} from "../core/injection";
2
2
  import {Logger} from "@protorians/logger";
3
- import type {IConstructor} from "@/types";
4
- import {Raiton} from "@/core/raiton";
5
- import {isArtifact, isControllerArtifact} from "@/sdk/utilities";
3
+ import type {IConstructor} from "../types";
4
+ import {Raiton} from "../core/raiton";
5
+ import {isArtifact, isControllerArtifact} from "./utilities";
6
6
 
7
7
  export class Artifacts {
8
8
 
@@ -1,7 +1,7 @@
1
- import {getControllerMetadata} from "@/core/controller";
2
- import {Injectable} from "@/sdk";
1
+ import {getControllerMetadata} from "../../core/controller";
2
+ import {Injectable} from "..";
3
3
  import {LifetimeEnum} from "@protorians/core";
4
- import {ControllerDecoratorCallable} from "@/types";
4
+ import {ControllerDecoratorCallable} from "../../types";
5
5
 
6
6
  export function Controllable(prefix = '') {
7
7
  return (target: any) => {
@@ -1,9 +1,9 @@
1
1
  import "reflect-metadata";
2
- import type {IConstructor} from "@/types/contruct";
3
- import {Injection} from "@/core/injection";
2
+ import type {IConstructor} from "../../types/contruct";
3
+ import {Injection} from "../../core/injection";
4
4
  import {LifetimeEnum} from "@protorians/core";
5
5
  import {Logger} from "@protorians/logger";
6
- import {METADATA_KEYS} from "@/sdk/constants";
6
+ import {METADATA_KEYS} from "../constants";
7
7
 
8
8
 
9
9
  export function Injectable(lifetime?: LifetimeEnum, name?: string, scope?: any) {
@@ -1,5 +1,5 @@
1
- import {MiddlewareCallable} from "@/types";
2
- import {getControllerMetadata} from "@/core";
1
+ import {MiddlewareCallable} from "../../types";
2
+ import {getControllerMetadata} from "../../core";
3
3
 
4
4
 
5
5
  export function Middleware(middleware: MiddlewareCallable) {
@@ -1,6 +1,6 @@
1
1
  import "reflect-metadata";
2
- import type {Context, ParamMetaInterface} from "@/types";
3
- import {METADATA_KEYS, Parametrable} from "@/sdk";
2
+ import type {Context, ParamMetaInterface} from "../../types";
3
+ import {METADATA_KEYS, Parametrable} from "..";
4
4
 
5
5
  function createRouteParametrableDecorator(type: ParamMetaInterface['type'], callable?: (context: Context) => any) {
6
6
  return (key?: string) => {
@@ -1,6 +1,6 @@
1
- import {getControllerMetadata} from "@/core";
2
- import {HttpMethod} from "@/sdk";
3
- import {ControllerMetaInterface, RouteDecoratorCallable, RouteMetaInterface} from "@/types";
1
+ import {getControllerMetadata} from "../../core";
2
+ import {HttpMethod} from "..";
3
+ import {ControllerMetaInterface, RouteDecoratorCallable, RouteMetaInterface} from "../../types";
4
4
 
5
5
 
6
6
  function stabilizeRoute(meta: ControllerMetaInterface, {path, method, propertyKey}: Partial<RouteMetaInterface>) {
@@ -2,7 +2,7 @@ import crypto from "node:crypto";
2
2
  import argon2, {Options} from "argon2";
3
3
  import {HashAlgoEnum, PasswordAlgoEnum} from "./enums";
4
4
  import bcrypt from "bcrypt";
5
- import {IDerivationOptions, IEncryptionResult, IScryptOptions} from "@/types";
5
+ import {IDerivationOptions, IEncryptionResult, IScryptOptions} from "../types";
6
6
 
7
7
  export class Encryption {
8
8
  static get algos() {
@@ -1,6 +1,6 @@
1
- import {HttpStatus} from "@/sdk/enums/http-status.enum";
2
- import {Raiton} from "@/core";
3
- import {HttpResponseBaseInterface} from "@/types";
1
+ import {HttpStatus} from "../enums/http-status.enum";
2
+ import {Raiton} from "../../core";
3
+ import {HttpResponseBaseInterface} from "../../types";
4
4
 
5
5
  export class HttpException extends Error {
6
6
 
@@ -1,4 +1,4 @@
1
- import {ParseableEntriesType, ParseablePrimitiveType} from "@/types";
1
+ import {ParseableEntriesType, ParseablePrimitiveType} from "../types";
2
2
  import {stabilizeJson} from "./utilities";
3
3
  import {DynamicParameter, IDynamicParameters, IDynamicProps, IParameter,} from "@protorians/parameters";
4
4
 
@@ -1,7 +1,7 @@
1
- import type {MiddlewareParameters, Plugin} from "@/types";
2
- import {RequestContext} from "@/core/context";
1
+ import type {MiddlewareParameters, Plugin} from "../../types";
2
+ import {RequestContext} from "../../core/context";
3
3
  import {Logger} from "@protorians/logger";
4
- import {tryParseJson} from "@/sdk/utilities/json.util";
4
+ import {tryParseJson} from "../utilities/json.util";
5
5
 
6
6
  export function bodyParserPlugin(): Plugin {
7
7
  return {
@@ -1,5 +1,5 @@
1
- import {definePlugin} from "@/core/plugins";
2
- import {MiddlewareParameters} from "@/types";
1
+ import {definePlugin} from "../../../core/plugins";
2
+ import {MiddlewareParameters} from "../../../types";
3
3
 
4
4
 
5
5
  export const secureBodyLimit = (maxBytes = 1_000_000) =>
@@ -1,5 +1,5 @@
1
- import {definePlugin} from "@/core/plugins";
2
- import {Context, MiddlewareParameters, NextCallable} from "@/types";
1
+ import {definePlugin} from "../../../core/plugins";
2
+ import {Context, MiddlewareParameters, NextCallable} from "../../../types";
3
3
 
4
4
  export interface CorsOptions {
5
5
  origin?: string | string[]
@@ -1,5 +1,5 @@
1
- import {definePlugin} from "@/core/plugins";
2
- import {Context, MiddlewareParameters, NextCallable} from "@/types";
1
+ import {definePlugin} from "../../../core/plugins";
2
+ import {Context, MiddlewareParameters, NextCallable} from "../../../types";
3
3
 
4
4
 
5
5
  export const secureHeaders = definePlugin((scope) => {
@@ -1,5 +1,5 @@
1
- import {definePlugin} from "@/core/plugins";
2
- import {Context, MiddlewareParameters, NextCallable} from "@/types";
1
+ import {definePlugin} from "../../../core/plugins";
2
+ import {Context, MiddlewareParameters, NextCallable} from "../../../types";
3
3
 
4
4
 
5
5
  export const secureMethodGuard = (allowed: string[]) =>
@@ -1,5 +1,5 @@
1
- import {definePlugin} from "@/core/plugins";
2
- import {Context, MiddlewareParameters, NextCallable} from "@/types";
1
+ import {definePlugin} from "../../../core/plugins";
2
+ import {Context, MiddlewareParameters, NextCallable} from "../../../types";
3
3
 
4
4
 
5
5
  export interface RateLimitOptions {
@@ -1,4 +1,4 @@
1
- import {Throwable} from "@/sdk/exceptions";
1
+ import {Throwable} from "./exceptions";
2
2
 
3
3
 
4
4
  export class DelegateRepository {
@@ -1,5 +1,5 @@
1
- import type {ErrorResponseInterface} from "@/types";
2
- import {HttpResponse} from "@/sdk/responses/http";
1
+ import type {ErrorResponseInterface} from "../../types";
2
+ import {HttpResponse} from "./http";
3
3
 
4
4
 
5
5
  export class HttpErrorResponse {
@@ -1,6 +1,6 @@
1
- import {HttpResponse, HttpStatus} from "@/sdk";
2
- import {HttpResponseInterface} from "@/types";
3
- import {Raiton} from "@/core";
1
+ import {HttpResponse, HttpStatus} from "..";
2
+ import {HttpResponseInterface} from "../../types";
3
+ import {Raiton} from "../../core";
4
4
 
5
5
 
6
6
  export function RaitonResponses(
@@ -1,6 +1,6 @@
1
- import {HttpResponseInterface} from "@/types";
2
- import {HttpStatus} from "@/sdk/enums";
3
- import {Raiton} from "@/core";
1
+ import {HttpResponseInterface} from "../../types";
2
+ import {HttpStatus} from "../enums";
3
+ import {Raiton} from "../../core";
4
4
 
5
5
 
6
6
  export class ThrowableResponse extends Error {
@@ -1,6 +1,6 @@
1
- import {HttpResponseInterface} from "@/types";
2
- import {HttpStatus} from "@/sdk/enums";
3
- import {ThrowableResponse} from "@/sdk/responses";
1
+ import {HttpResponseInterface} from "../../types";
2
+ import {HttpStatus} from "../enums";
3
+ import {ThrowableResponse} from ".";
4
4
 
5
5
 
6
6
  export class HttpResponse {
@@ -1,4 +1,4 @@
1
- import {RuntimeAdapterInterface} from '@/types'
1
+ import {RuntimeAdapterInterface} from '../../../types'
2
2
 
3
3
  export const bunRuntime: RuntimeAdapterInterface = {
4
4
  createServer(handler) {
@@ -1,4 +1,4 @@
1
- import {RuntimeAdapterInterface} from '@/types'
1
+ import {RuntimeAdapterInterface} from '../../../types'
2
2
 
3
3
  export const denoRuntime: RuntimeAdapterInterface = {
4
4
  createServer(handler) {
@@ -1,9 +1,9 @@
1
- import type {RuntimeAdapterInterface, RuntimeHandlerCallable, RuntimeInterface, RuntimeServerInterface} from "@/types";
2
- import {RuntimeType} from "@/sdk/enums/runtime.enum";
3
- import {nodeRuntime} from "@/sdk/runtime/node/server";
4
- import {bunRuntime} from "@/sdk/runtime/bun/server";
5
- import {denoRuntime} from "@/sdk/runtime/deno/server";
6
- import {webRuntime} from "@/sdk/runtime/web/server";
1
+ import type {RuntimeAdapterInterface, RuntimeHandlerCallable, RuntimeInterface, RuntimeServerInterface} from "../../types";
2
+ import {RuntimeType} from "../enums/runtime.enum";
3
+ import {nodeRuntime} from "./node/server";
4
+ import {bunRuntime} from "./bun/server";
5
+ import {denoRuntime} from "./deno/server";
6
+ import {webRuntime} from "./web/server";
7
7
 
8
8
 
9
9
  export class Runtime implements RuntimeInterface {
@@ -3,7 +3,7 @@ import {
3
3
  RuntimeAdapterInterface,
4
4
  RuntimeRequestInterface,
5
5
  RuntimeReplyInterface
6
- } from '@/types'
6
+ } from '../../../types'
7
7
 
8
8
  export const nodeRuntime: RuntimeAdapterInterface = {
9
9
  createServer(handler) {
@@ -1,4 +1,4 @@
1
- import {RuntimeAdapterInterface, RuntimeReplyInterface, RuntimeRequestInterface} from '@/types'
1
+ import {RuntimeAdapterInterface, RuntimeReplyInterface, RuntimeRequestInterface} from '../../../types'
2
2
 
3
3
  export const webRuntime: RuntimeAdapterInterface = {
4
4
  createServer(handler) {
@@ -1,4 +1,4 @@
1
- import {HttpMethod} from "@/sdk";
1
+ import {HttpMethod} from "../sdk";
2
2
 
3
3
  export interface ApplicationConfig {
4
4
  workdir?: string;
@@ -1,4 +1,4 @@
1
- import type {ArtifactsConfig} from "@/types/artifact";
1
+ import type {ArtifactsConfig} from "./artifact";
2
2
 
3
3
  export interface Configurable {
4
4
  rootDir: string;
@@ -1,6 +1,6 @@
1
- import {HttpMethod, Parametrable} from "@/sdk/enums";
2
- import {Context} from "@/types/core";
3
- import {MiddlewareCallable, MiddlewareType} from "@/types/middleware";
1
+ import {HttpMethod, Parametrable} from "../sdk/enums";
2
+ import {Context} from "./core";
3
+ import {MiddlewareCallable, MiddlewareType} from "./middleware";
4
4
 
5
5
  export interface ControllerMetaInterface {
6
6
  prefix?: string;
@@ -1,4 +1,4 @@
1
- import {IConstructor} from "@/types/contruct";
1
+ import {IConstructor} from "./contruct";
2
2
  import {LifetimeEnum} from "@protorians/core";
3
3
 
4
4
 
@@ -1,4 +1,4 @@
1
- import {RequestContext} from "@/core/context";
1
+ import {RequestContext} from "../core/context";
2
2
 
3
3
 
4
4
  export type NextCallable = () => Promise<void>
@@ -1,4 +1,4 @@
1
- import {PluginScope} from "@/core/plugins/scope";
1
+ import {PluginScope} from "../core/plugins/scope";
2
2
 
3
3
  export type PluginFn = (
4
4
  scope: PluginScope
@@ -1,4 +1,4 @@
1
- import {BuilderHMRDeclaration} from "@/types/builder";
1
+ import {BuilderHMRDeclaration} from "./builder";
2
2
 
3
3
  export interface RaitonSignalMap {
4
4
  ready?: undefined;
@@ -1,4 +1,4 @@
1
- import {HttpStatus} from "@/sdk/enums/http-status.enum";
1
+ import {HttpStatus} from "../sdk/enums/http-status.enum";
2
2
 
3
3
  export interface HttpResponseBaseInterface {
4
4
  message: string;
@@ -1,5 +1,5 @@
1
- import {RequestContext} from "@/core/context";
2
- import {HttpMethod} from "@/sdk";
1
+ import {RequestContext} from "../core/context";
2
+ import {HttpMethod} from "../sdk";
3
3
 
4
4
  export type RouteHandler = (ctx: RequestContext) => Promise<any> | any
5
5
 
@@ -1,4 +1,4 @@
1
- import {RuntimeType} from "@/sdk/enums/runtime.enum";
1
+ import {RuntimeType} from "../sdk/enums/runtime.enum";
2
2
 
3
3
  export interface RuntimeServerInterface {
4
4
  listen(port: number, hostname?: string): Promise<void>
@@ -1,7 +1,7 @@
1
- import {BuilderInterface} from "@/types/builder";
2
- import {RuntimeAdapterInterface} from "@/types/runtime";
3
- import {ApplicationInterface} from "@/types/application";
4
- import {RuntimeType} from "@/sdk/enums/runtime.enum";
1
+ import {BuilderInterface} from "./builder";
2
+ import {RuntimeAdapterInterface} from "./runtime";
3
+ import {ApplicationInterface} from "./application";
4
+ import {RuntimeType} from "../sdk/enums/runtime.enum";
5
5
 
6
6
  export interface ThreadSetupOptions {
7
7
  application: ApplicationInterface;