Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Mandarine

import { Mandarine } from "https://raw.githubusercontent.com/mandarineorg/mandarinets/master/main-core/Mandarine.ns.ts";

This namespace contains all the essentials for mandarine to work Gnerally, global functionings are added to this namespace in order to be easily accesible across Mandarine

§Namespace

Mandarine.ApplicationContext

Refers to the Application Context. The application context is used to manipulate elemental behaviors of Mandarine It is a singleton class

Mandarine.Components

Contains the different properties different stereotypes/components take

Mandarine.Defaults

Contains the default information Mandarine needs to work.

Mandarine.Global

Handles the interaction with the global environment of Mandarine Mandarine uses a global environment to store and manipulate essential information to work

Mandarine.MandarineCore

Refers to all the elements part of the core.

Mandarine.MandarineCore.Decorators

Core Decorators

Mandarine.MandarineCore.Internals

§Classes

Mandarine.MandarineCore.MandarineMicroserviceManager
Mandarine.MandarineCore.MandarineResourceHandlerRegistry

Class responsible for storing resource handlers

Mandarine.MandarineCore.MandarineTemplateManager

§Enums

Mandarine.MandarineCore.ComponentTypes

List of all recognizable mandarine components.

Mandarine.MandarineCore.NativeComponents

List of all native components by Mandarine

Mandarine.MandarineCore.ValueScopes

§Variables

Mandarine.AsyncFunction

Used to verify that a method is async

Mandarine.Defaults.MandarineDefaultConfiguration
Mandarine.Defaults.MandarineDefaultCorsOptions
Mandarine.Defaults.MandarineDefaultInitialProperties
Mandarine.Defaults.MandarineDefaultSessionContainer
Mandarine.Defaults.mandarinePropertiesFile
Mandarine.logger
Mandarine.MandarineCore.Internals.getEnv
Mandarine.MandarineCore.Internals.getTimersManager
Mandarine.readFile

Mandarine File System

Mandarine.readFileSync
Mandarine.readTextFile
Mandarine.readTextFileSync

§Functions

Mandarine.Global.getComponentsRegistry

Get the Components' registry from Mandarine's global environment

Mandarine.Global.getEntityManager

Get the entity manager to manipulate the current DB connection

Mandarine.Global.getInternalProps
Mandarine.Global.getMandarineConfiguration

Get the properties mandarine is using. If no properties are set by the user then it gets the default properties.

Mandarine.Global.getMandarineDotEnv

Read .env file located under the current working directory and adds its values to Deno.env

Mandarine.Global.getMandarineGlobal

Get the global environment based on interface @MandarineGlobalInterface

Mandarine.Global.getMandarineInitialProps

Get the properties (MandarineJsonProperties) from mandarine.json

Mandarine.Global.getMicroserviceManager

Get the microservice manager

Mandarine.Global.getMiddleware

Get the list of registered middlewares Middleware are added to the global environment in order to not request the DI container every time there is an HTTP Request

Mandarine.Global.getNativeComponentsRegistry
Mandarine.Global.getResourceHandlerRegistry

Get the resource handler registry for incoming requests.

Mandarine.Global.getSessionContainer

Get the instance of the Session Container

Mandarine.Global.getTemplateManager

Get the entity manager to manipulate the current DB connection

Mandarine.Global.initializeDefaultSessionContainer

Initializes the Session Container. The session container is used to determine the configuration of Mandarine's sessions

Mandarine.Global.initializeMandarineGlobal

Initializes Mandarine Global Environment.

Mandarine.Global.initializeMiddleware

Initializes the middleware list in the global environment.

Mandarine.Global.initializeNativeComponents

Initializes the middleware list in the global environment.

Mandarine.Global.initializeSecurityInternals

Initializes the core modules of Mandarine's security core.

Mandarine.Global.readConfigByDots

Read Mandarine's configuration by dots

Mandarine.Global.setConfiguration

Set a new configuration for the mandarine properties If properties are ignored, it will set the default values.

§Interfaces

Mandarine.ApplicationContext.ApplicationContextMetadata

Stats/Metadata of Mandarine's core. This includes information such as: When Mandarine was started, number of templates, controller, and others.

Mandarine.ApplicationContext.IApplicationContext

Interface used by the ApplicationContext class. Such class contains the necessary bridges for Mandarine's core to work

Mandarine.Components.CatchComponent

Interface that provides with the necessary fields for configuration in a Mandarine-powered component stereotype of Catch

Mandarine.Components.MiddlewareComponent

Interface that provides with the necessary fields for configuration in a Mandarine-powered component stereotype of Middleware

Mandarine.EnvironmentalReference

${MY_VAR} will be considered an environmental reference. The environmental reference will be parsed by CommonUtils.getEnvironmentalReferences and CommonUtils.getEnvironmentalReferences will return an array of EnvironmentalReference

Mandarine.Global.MandarineGlobalInterface

Contains all the Global objects that Mandarine uses

Mandarine.MandarineCore.ComponentCommonInterface

Refers to the essentials of a component class for the Mandarine Engine.

Mandarine.MandarineCore.ComponentMetadataContext

Contains the metadata information of the component. This information is initialized when a component decorator is used

Mandarine.MandarineCore.ComponentRegistryContext

Refers to the context of the component inside the DI container. When a request is made to the DI container, this is what the request returns.

Mandarine.MandarineCore.Cookies
Mandarine.MandarineCore.Decorators.EventListener
Mandarine.MandarineCore.Decorators.MicroserviceProperty
Mandarine.MandarineCore.Decorators.ScheduledTask
Mandarine.MandarineCore.Decorators.Timer
Mandarine.MandarineCore.Decorators.Value
Mandarine.MandarineCore.Decorators.WebSocketProperty
Mandarine.MandarineCore.IComponentsRegistry

Refers to the Components' Registry The components' registry is used to communicate the mandarine engine & DI layer This is possibly the most important class for mandarine to work. All components are registered inside this class

Mandarine.MandarineCore.IMicroserviceManager
Mandarine.MandarineCore.Internals.CoreTimers
Mandarine.MandarineCore.IResourceHandler

Handlers the information of a resource handler that will be processed.

Mandarine.MandarineCore.IResourceHandlerRegistry

Refers to the resource handler registry. All the resource handlers either initialized by the user or by Mandarine will be located here.

Mandarine.MandarineCore.ITemplatesManager

Refers to the templates' registry. All the templates that are read and initialized at mandarine compile time are registed inside the templates registry When an user requests a renderable endpoint, the templates' registry will get requested in order to get the template.

Mandarine.MandarineCore.MandarineNativeComponent

List of necessary fields for a Native Component

Mandarine.MandarineCore.MicroserviceItem
Mandarine.MandarineCore.NativeComponentsProperties

Properties used by the native components registry. This interface provides mandarine with the management of native components in the core.

Mandarine.MandarineCore.TimerMetadataContext

Context for Tasks that are timer-like.

Mandarine.MandarineInitialProperties

Structure for mandarine.json If mandarine.json is present, some behaviors of the Mandarine starter can be altered such as the location of the properties.json file

Mandarine.Properties

Structure of Mandarine Properties. Mandarine uses these properties to determine how it should work Custom Properties must extend Mandarine.Properties

§Type Aliases

Mandarine.IniFile
Mandarine.MandarineCore.Decorators.MicroserviceWorkerProperties
Mandarine.MandarineCore.Decorators.WebSocketValidProperties
Mandarine.MandarineCore.Internals.CoreTimersType
Mandarine.MandarineCore.MicroserviceStatus