Hot
Class: Hot
The api used during processing.
Table of contents​
Constructors​
Properties​
- API
- Arguments
- CSS
- Cookies
- CurrentPage
- Data
- DeveloperMode
- HotTestElement
- JSFiles
- JSScripts
- Mode
- Output
- PublicSecrets
- TesterAPI
- cssStr
- jsFileStr
- jsScriptsStr
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​
Arguments​
â–ª Static Arguments: any = null
The arguments passed.
Defined in​
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​
Cookies​
â–ª Static Cookies: CookiesStatic<object> = Cookies
The cookies to use between pages.
Defined in​
CurrentPage​
â–ª Static CurrentPage: HotPage = null
The currently generated page being displayed. This is cleared between every file processed.
Defined in​
Data​
â–ª Static Data: any = {}
The data to share across all the different files and pages. This data will be public.
Defined in​
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​
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​
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​
JSScripts​
â–ª Static JSScripts: any[] = []
The JavaScript inline code to use in the current page being generated.
Defined in​
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​
Output​
â–ª Static Output: string = ""
Contains the buffer to output. This is cleared between every file processed.
Defined in​
PublicSecrets​
â–ª Static PublicSecrets: any = {}
Any secrets that can be shown publicly. These can be passed from HotSite.json.
Defined in​
TesterAPI​
â–ª Static TesterAPI: HotAPI = null
The API being used by the tester.
Defined in​
cssStr​
â–ª Static cssStr: string
The CSS string to use when echoing out the CSS files.
Defined in​
jsFileStr​
â–ª Static jsFileStr: string
The JavaScript string to use when echoing out the Scripts files.
Defined in​
jsScriptsStr​
â–ª Static jsScriptsStr: string
The JavaScript string to use when echoing out the Scripts files.
Defined in​
Methods​
apiCall​
â–¸ Static apiCall(route, data?, httpMethod?): Promise<any>
Make an api call.
Parameters​
| Name | Type | Default value |
|---|---|---|
route | string | undefined |
data | any | null |
httpMethod | string | "POST" |
Returns​
Promise<any>
Defined in​
displayCSS​
â–¸ Static displayCSS(): void
Echo out the CSS for the current page being generated.
Returns​
void
Defined in​
displayJSFiles​
â–¸ Static displayJSFiles(): void
Echo out the JS files for the current page being generated.
Returns​
void
Defined in​
displayJSScripts​
â–¸ Static displayJSScripts(): void
Echo out the JS scripts for the current page being generated.
Returns​
void
Defined in​
echo​
â–¸ Static echo(message): void
Echo out some output.
Parameters​
| Name | Type |
|---|---|
message | string |
Returns​
void
Defined in​
getFile​
â–¸ Static getFile(path, args?): Promise<string>
Get the content of a file.
Parameters​
| Name | Type | Default value |
|---|---|---|
path | string | HotFile | undefined |
args | any[] | null |
Returns​
Promise<string>
Defined in​
httpRequest​
â–¸ Static httpRequest(url, requestInit?): Promise<Response>
Make a HTTP request. This is basically just a wrapper for fetch.
Parameters​
| Name | Type | Default value | Description |
|---|---|---|---|
url | string | undefined | The full url to make the HTTP call. |
requestInit | RequestInit | undefined | The request parameters to send. |
Returns​
Promise<Response>
The HTTP response.
Defined in​
include​
â–¸ Static include(file, args?): Promise<void>
Retrieve a file and echo out it's contents.
Parameters​
| Name | Type | Default value |
|---|---|---|
file | string | HotFile | undefined |
args | any[] | null |
Returns​
Promise<void>
Defined in​
jsonRequest​
â–¸ Static jsonRequest(url, data?, httpMethod?): Promise<any>
Make a HTTP JSON request.
Parameters​
| Name | Type | Default value | Description |
|---|---|---|---|
url | string | undefined | The full url to make the HTTP call. |
data | any | null | The data to JSON.stringify and send. |
httpMethod | string | "POST" | The HTTP method to use to send the data. |
Returns​
Promise<any>
The parsed JSON object.
Defined in​
runFile​
â–¸ Static runFile(fileName, args?): Promise<void>
Run an already loaded file and echo out it's contents.
Parameters​
| Name | Type | Default value |
|---|---|---|
fileName | string | undefined |
args | any[] | null |
Returns​
Promise<void>