Skip to main content

Hot

hotstaq / Modules / Hot

Class: Hot

The api used during processing.

Table of contents​

Constructors​

Properties​

Methods​

Constructors​

constructor​

• new Hot()

Properties​

API​

â–ª Static API: HotAPI = null

The current API used on this page. This is cleared between every file processed.

Defined in​

Hot.ts:73


Arguments​

â–ª Static Arguments: any = null

The arguments passed.

Defined in​

Hot.ts:54


CSS​

â–ª Static CSS: string[] = []

The CSS files to use in the current page being generated.

todo Make this a "string | CSSObject" data type so it can also include the integrity hashes as well.

Defined in​

Hot.ts:104


Cookies​

â–ª Static Cookies: CookiesStatic<object> = Cookies

The cookies to use between pages.

Defined in​

Hot.ts:89


CurrentPage​

â–ª Static CurrentPage: HotPage = null

The currently generated page being displayed. This is cleared between every file processed.

Defined in​

Hot.ts:50


Data​

â–ª Static Data: any = {}

The data to share across all the different files and pages. This data will be public.

Defined in​

Hot.ts:85


DeveloperMode​

â–ª Static DeveloperMode: typeof DeveloperMode = DeveloperMode

The mode in which this application is running. If it's set to development mode, all testing related data will be collected, parsed, and executed if necessary.

Defined in​

Hot.ts:59


HotTestElement​

â–ª Static HotTestElement: typeof HotTestElement = HotTestElement

The mode in which this application is running. If it's set to development mode, all testing related data will be collected, parsed, and executed if necessary.

Defined in​

Hot.ts:64


JSFiles​

â–ª Static JSFiles: any[] = []

The JavaScript files to use in the current page being generated.

todo Make this a "string | JSFileObject" data type so it can also include the integrity hashes as well.

Defined in​

Hot.ts:111


JSScripts​

â–ª Static JSScripts: any[] = []

The JavaScript inline code to use in the current page being generated.

Defined in​

Hot.ts:115


Mode​

â–ª Static Mode: DeveloperMode = DeveloperMode.Production

The mode in which this application is running. If it's set to development mode, all testing related data will be collected, parsed, and executed if necessary.

Defined in​

Hot.ts:69


Output​

â–ª Static Output: string = ""

Contains the buffer to output. This is cleared between every file processed.

Defined in​

Hot.ts:81


PublicSecrets​

â–ª Static PublicSecrets: any = {}

Any secrets that can be shown publicly. These can be passed from HotSite.json.

Defined in​

Hot.ts:93


TesterAPI​

â–ª Static TesterAPI: HotAPI = null

The API being used by the tester.

Defined in​

Hot.ts:77


cssStr​

â–ª Static cssStr: string

The CSS string to use when echoing out the CSS files.

Defined in​

Hot.ts:97


jsFileStr​

â–ª Static jsFileStr: string

The JavaScript string to use when echoing out the Scripts files.

Defined in​

Hot.ts:119


jsScriptsStr​

â–ª Static jsScriptsStr: string

The JavaScript string to use when echoing out the Scripts files.

Defined in​

Hot.ts:123

Methods​

apiCall​

â–¸ Static apiCall(route, data?, httpMethod?): Promise<any>

Make an api call.

Parameters​

NameTypeDefault value
routestringundefined
dataanynull
httpMethodstring"POST"

Returns​

Promise<any>

Defined in​

Hot.ts:195


displayCSS​

â–¸ Static displayCSS(): void

Echo out the CSS for the current page being generated.

Returns​

void

Defined in​

Hot.ts:275


displayJSFiles​

â–¸ Static displayJSFiles(): void

Echo out the JS files for the current page being generated.

Returns​

void

Defined in​

Hot.ts:291


displayJSScripts​

â–¸ Static displayJSScripts(): void

Echo out the JS scripts for the current page being generated.

Returns​

void

Defined in​

Hot.ts:307


echo​

â–¸ Static echo(message): void

Echo out some output.

Parameters​

NameType
messagestring

Returns​

void

Defined in​

Hot.ts:267


getFile​

â–¸ Static getFile(path, args?): Promise<string>

Get the content of a file.

Parameters​

NameTypeDefault value
pathstring | HotFileundefined
argsany[]null

Returns​

Promise<string>

Defined in​

Hot.ts:168


httpRequest​

â–¸ Static httpRequest(url, requestInit?): Promise<Response>

Make a HTTP request. This is basically just a wrapper for fetch.

Parameters​

NameTypeDefault valueDescription
urlstringundefinedThe full url to make the HTTP call.
requestInitRequestInitundefinedThe request parameters to send.

Returns​

Promise<Response>

The HTTP response.

Defined in​

Hot.ts:257


include​

â–¸ Static include(file, args?): Promise<void>

Retrieve a file and echo out it's contents.

Parameters​

NameTypeDefault value
filestring | HotFileundefined
argsany[]null

Returns​

Promise<void>

Defined in​

Hot.ts:128


jsonRequest​

â–¸ Static jsonRequest(url, data?, httpMethod?): Promise<any>

Make a HTTP JSON request.

Parameters​

NameTypeDefault valueDescription
urlstringundefinedThe full url to make the HTTP call.
dataanynullThe data to JSON.stringify and send.
httpMethodstring"POST"The HTTP method to use to send the data.

Returns​

Promise<any>

The parsed JSON object.

Defined in​

Hot.ts:223


runFile​

â–¸ Static runFile(fileName, args?): Promise<void>

Run an already loaded file and echo out it's contents.

Parameters​

NameTypeDefault value
fileNamestringundefined
argsany[]null

Returns​

Promise<void>

Defined in​

Hot.ts:152