hotstaq 0.5.24
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.
- package/.eslintignore +17 -0
- package/.eslintrc.js +11 -0
- package/.vscode/launch.json +199 -0
- package/.vscode/settings.json +2 -0
- package/.vscode/tasks.json +78 -0
- package/CONTRIBUTING.md +157 -0
- package/README.md +126 -0
- package/bin/hotstaq +3 -0
- package/bin/hotstaq.cmd +1 -0
- package/build/src/Hot.d.ts +167 -0
- package/build/src/Hot.d.ts.map +1 -0
- package/build/src/Hot.js +365 -0
- package/build/src/Hot.js.map +1 -0
- package/build/src/HotAPI.d.ts +130 -0
- package/build/src/HotAPI.d.ts.map +1 -0
- package/build/src/HotAPI.js +353 -0
- package/build/src/HotAPI.js.map +1 -0
- package/build/src/HotAgentAPI.d.ts +22 -0
- package/build/src/HotAgentAPI.d.ts.map +1 -0
- package/build/src/HotAgentAPI.js +85 -0
- package/build/src/HotAgentAPI.js.map +1 -0
- package/build/src/HotAgentRoute.d.ts +17 -0
- package/build/src/HotAgentRoute.d.ts.map +1 -0
- package/build/src/HotAgentRoute.js +109 -0
- package/build/src/HotAgentRoute.js.map +1 -0
- package/build/src/HotBuilder.d.ts +52 -0
- package/build/src/HotBuilder.d.ts.map +1 -0
- package/build/src/HotBuilder.js +239 -0
- package/build/src/HotBuilder.js.map +1 -0
- package/build/src/HotClient.d.ts +31 -0
- package/build/src/HotClient.d.ts.map +1 -0
- package/build/src/HotClient.js +19 -0
- package/build/src/HotClient.js.map +1 -0
- package/build/src/HotComponent.d.ts +118 -0
- package/build/src/HotComponent.d.ts.map +1 -0
- package/build/src/HotComponent.js +89 -0
- package/build/src/HotComponent.js.map +1 -0
- package/build/src/HotCreator.d.ts +92 -0
- package/build/src/HotCreator.d.ts.map +1 -0
- package/build/src/HotCreator.js +465 -0
- package/build/src/HotCreator.js.map +1 -0
- package/build/src/HotDB.d.ts +69 -0
- package/build/src/HotDB.d.ts.map +1 -0
- package/build/src/HotDB.js +29 -0
- package/build/src/HotDB.js.map +1 -0
- package/build/src/HotDBConnectionInterface.d.ts +40 -0
- package/build/src/HotDBConnectionInterface.d.ts.map +1 -0
- package/build/src/HotDBConnectionInterface.js +3 -0
- package/build/src/HotDBConnectionInterface.js.map +1 -0
- package/build/src/HotFile.d.ts +134 -0
- package/build/src/HotFile.d.ts.map +1 -0
- package/build/src/HotFile.js +454 -0
- package/build/src/HotFile.js.map +1 -0
- package/build/src/HotHTTPServer.d.ts +162 -0
- package/build/src/HotHTTPServer.d.ts.map +1 -0
- package/build/src/HotHTTPServer.js +863 -0
- package/build/src/HotHTTPServer.js.map +1 -0
- package/build/src/HotIO.d.ts +39 -0
- package/build/src/HotIO.d.ts.map +1 -0
- package/build/src/HotIO.js +195 -0
- package/build/src/HotIO.js.map +1 -0
- package/build/src/HotLog.d.ts +60 -0
- package/build/src/HotLog.d.ts.map +1 -0
- package/build/src/HotLog.js +126 -0
- package/build/src/HotLog.js.map +1 -0
- package/build/src/HotPage.d.ts +125 -0
- package/build/src/HotPage.d.ts.map +1 -0
- package/build/src/HotPage.js +178 -0
- package/build/src/HotPage.js.map +1 -0
- package/build/src/HotRoute.d.ts +82 -0
- package/build/src/HotRoute.d.ts.map +1 -0
- package/build/src/HotRoute.js +83 -0
- package/build/src/HotRoute.js.map +1 -0
- package/build/src/HotRouteMethod.d.ts +129 -0
- package/build/src/HotRouteMethod.d.ts.map +1 -0
- package/build/src/HotRouteMethod.js +84 -0
- package/build/src/HotRouteMethod.js.map +1 -0
- package/build/src/HotServer.d.ts +152 -0
- package/build/src/HotServer.d.ts.map +1 -0
- package/build/src/HotServer.js +109 -0
- package/build/src/HotServer.js.map +1 -0
- package/build/src/HotSetAsWeb.d.ts +2 -0
- package/build/src/HotSetAsWeb.d.ts.map +1 -0
- package/build/src/HotSetAsWeb.js +5 -0
- package/build/src/HotSetAsWeb.js.map +1 -0
- package/build/src/HotStaq.d.ts +601 -0
- package/build/src/HotStaq.d.ts.map +1 -0
- package/build/src/HotStaq.js +1258 -0
- package/build/src/HotStaq.js.map +1 -0
- package/build/src/HotStaqWeb.d.ts +18 -0
- package/build/src/HotStaqWeb.d.ts.map +1 -0
- package/build/src/HotStaqWeb.js +44 -0
- package/build/src/HotStaqWeb.js.map +1 -0
- package/build/src/HotTestDriver.d.ts +63 -0
- package/build/src/HotTestDriver.d.ts.map +1 -0
- package/build/src/HotTestDriver.js +187 -0
- package/build/src/HotTestDriver.js.map +1 -0
- package/build/src/HotTestElement.d.ts +71 -0
- package/build/src/HotTestElement.d.ts.map +1 -0
- package/build/src/HotTestElement.js +37 -0
- package/build/src/HotTestElement.js.map +1 -0
- package/build/src/HotTestMap.d.ts +83 -0
- package/build/src/HotTestMap.d.ts.map +1 -0
- package/build/src/HotTestMap.js +58 -0
- package/build/src/HotTestMap.js.map +1 -0
- package/build/src/HotTestSeleniumDriver.d.ts +82 -0
- package/build/src/HotTestSeleniumDriver.d.ts.map +1 -0
- package/build/src/HotTestSeleniumDriver.js +398 -0
- package/build/src/HotTestSeleniumDriver.js.map +1 -0
- package/build/src/HotTester.d.ts +188 -0
- package/build/src/HotTester.d.ts.map +1 -0
- package/build/src/HotTester.js +623 -0
- package/build/src/HotTester.js.map +1 -0
- package/build/src/HotTesterAPI.d.ts +15 -0
- package/build/src/HotTesterAPI.d.ts.map +1 -0
- package/build/src/HotTesterAPI.js +161 -0
- package/build/src/HotTesterAPI.js.map +1 -0
- package/build/src/HotTesterMocha.d.ts +50 -0
- package/build/src/HotTesterMocha.d.ts.map +1 -0
- package/build/src/HotTesterMocha.js +205 -0
- package/build/src/HotTesterMocha.js.map +1 -0
- package/build/src/HotTesterMochaSelenium.d.ts +70 -0
- package/build/src/HotTesterMochaSelenium.d.ts.map +1 -0
- package/build/src/HotTesterMochaSelenium.js +257 -0
- package/build/src/HotTesterMochaSelenium.js.map +1 -0
- package/build/src/HotTesterServer.d.ts +114 -0
- package/build/src/HotTesterServer.d.ts.map +1 -0
- package/build/src/HotTesterServer.js +575 -0
- package/build/src/HotTesterServer.js.map +1 -0
- package/build/src/api.d.ts +33 -0
- package/build/src/api.d.ts.map +1 -0
- package/build/src/api.js +78 -0
- package/build/src/api.js.map +1 -0
- package/build/src/cli.d.ts +2 -0
- package/build/src/cli.d.ts.map +1 -0
- package/build/src/cli.js +935 -0
- package/build/src/cli.js.map +1 -0
- package/build/src/schemas/HotDBInflux.d.ts +63 -0
- package/build/src/schemas/HotDBInflux.d.ts.map +1 -0
- package/build/src/schemas/HotDBInflux.js +239 -0
- package/build/src/schemas/HotDBInflux.js.map +1 -0
- package/build/src/schemas/HotDBMigration.d.ts +19 -0
- package/build/src/schemas/HotDBMigration.d.ts.map +1 -0
- package/build/src/schemas/HotDBMigration.js +15 -0
- package/build/src/schemas/HotDBMigration.js.map +1 -0
- package/build/src/schemas/HotDBMySQL.d.ts +65 -0
- package/build/src/schemas/HotDBMySQL.d.ts.map +1 -0
- package/build/src/schemas/HotDBMySQL.js +387 -0
- package/build/src/schemas/HotDBMySQL.js.map +1 -0
- package/build/src/schemas/HotDBSchema.d.ts +15 -0
- package/build/src/schemas/HotDBSchema.d.ts.map +1 -0
- package/build/src/schemas/HotDBSchema.js +19 -0
- package/build/src/schemas/HotDBSchema.js.map +1 -0
- package/build/src/schemas/influx/InfluxSchema.d.ts +14 -0
- package/build/src/schemas/influx/InfluxSchema.d.ts.map +1 -0
- package/build/src/schemas/influx/InfluxSchema.js +33 -0
- package/build/src/schemas/influx/InfluxSchema.js.map +1 -0
- package/build/src/schemas/mysql/MySQLSchema.d.ts +39 -0
- package/build/src/schemas/mysql/MySQLSchema.d.ts.map +1 -0
- package/build/src/schemas/mysql/MySQLSchema.js +151 -0
- package/build/src/schemas/mysql/MySQLSchema.js.map +1 -0
- package/build/src/schemas/mysql/MySQLSchemaField.d.ts +168 -0
- package/build/src/schemas/mysql/MySQLSchemaField.d.ts.map +1 -0
- package/build/src/schemas/mysql/MySQLSchemaField.js +260 -0
- package/build/src/schemas/mysql/MySQLSchemaField.js.map +1 -0
- package/build/src/schemas/mysql/MySQLSchemaTable.d.ts +49 -0
- package/build/src/schemas/mysql/MySQLSchemaTable.d.ts.map +1 -0
- package/build/src/schemas/mysql/MySQLSchemaTable.js +310 -0
- package/build/src/schemas/mysql/MySQLSchemaTable.js.map +1 -0
- package/build-web/HotStaq.js +2 -0
- package/build-web/HotStaq.min.js +125 -0
- package/builder/docker/Dockerfile.linux.gen +42 -0
- package/builder/docker/README.md +36 -0
- package/builder/docker/app/start.sh +8 -0
- package/builder/docker/dockerignore +3 -0
- package/builder/docker/scripts/build.bat +11 -0
- package/builder/docker/scripts/build.sh +11 -0
- package/builder/docker/scripts/start-app.bat +7 -0
- package/builder/docker/scripts/start-app.sh +7 -0
- package/builder/docker/scripts/stop-app.bat +5 -0
- package/builder/docker/scripts/stop-app.sh +5 -0
- package/builder/docker-compose/docker-compose.gen.yaml +41 -0
- package/builder/docker-compose/env-skeleton +4 -0
- package/creator/project/.vscode/launch.json +59 -0
- package/creator/project/README.md +20 -0
- package/creator/project/gitignore +118 -0
- package/creator/project/npmignore +118 -0
- package/creator/public/api-test.hott +28 -0
- package/creator/public/index.hott +12 -0
- package/creator/ts/src/AppAPI.ts +30 -0
- package/creator/ts/src/HelloWorld.ts +39 -0
- package/creator/ts/src/WebExport.ts +7 -0
- package/creator/ts/tsconfig-web.json +73 -0
- package/creator/ts/tsconfig.json +73 -0
- package/creator/ts/webpack-api.config.js +57 -0
- package/dbstart.sh +19 -0
- package/dbstop.sh +4 -0
- package/docs/.nojekyll +1 -0
- package/docs/README.md +128 -0
- package/docs/classes/Hot.md +477 -0
- package/docs/classes/HotAPI.md +369 -0
- package/docs/classes/HotClient.md +95 -0
- package/docs/classes/HotComponent.md +279 -0
- package/docs/classes/HotDB.md +247 -0
- package/docs/classes/HotDBInflux.md +404 -0
- package/docs/classes/HotDBMigration.md +80 -0
- package/docs/classes/HotDBMySQL.md +310 -0
- package/docs/classes/HotDBSchema.md +51 -0
- package/docs/classes/HotFile.md +353 -0
- package/docs/classes/HotHTTPServer.md +700 -0
- package/docs/classes/HotLog.md +162 -0
- package/docs/classes/HotPage.md +357 -0
- package/docs/classes/HotRoute.md +312 -0
- package/docs/classes/HotRouteMethod.md +271 -0
- package/docs/classes/HotServer.md +311 -0
- package/docs/classes/HotStaq.md +1153 -0
- package/docs/classes/HotTestDestination.md +58 -0
- package/docs/classes/HotTestDriver.md +332 -0
- package/docs/classes/HotTestElement.md +88 -0
- package/docs/classes/HotTestElementOptions.md +71 -0
- package/docs/classes/HotTestMap.md +92 -0
- package/docs/classes/HotTestSeleniumDriver.md +529 -0
- package/docs/classes/HotTester.md +653 -0
- package/docs/classes/HotTesterAPI.md +493 -0
- package/docs/classes/HotTesterMocha.md +843 -0
- package/docs/classes/HotTesterMochaSelenium.md +896 -0
- package/docs/classes/HotTesterServer.md +633 -0
- package/docs/classes/InfluxSchema.md +74 -0
- package/docs/classes/MySQLSchema.md +199 -0
- package/docs/classes/MySQLSchemaField.md +330 -0
- package/docs/classes/MySQLSchemaTable.md +176 -0
- package/docs/enums/ConnectionStatus.md +43 -0
- package/docs/enums/DeveloperMode.md +38 -0
- package/docs/enums/EventExecutionType.md +43 -0
- package/docs/enums/HTTPMethod.md +32 -0
- package/docs/enums/HotDBGenerationType.md +30 -0
- package/docs/enums/HotLogLevel.md +88 -0
- package/docs/interfaces/HotDBConnectionInterface.md +116 -0
- package/docs/interfaces/HotDestination.md +62 -0
- package/docs/interfaces/HotSite.md +187 -0
- package/docs/interfaces/HotSiteMapPath.md +37 -0
- package/docs/interfaces/HotSiteRoute.md +79 -0
- package/docs/interfaces/HotStartOptions.md +115 -0
- package/docs/interfaces/HotTestPage.md +44 -0
- package/docs/interfaces/HotTestStop.md +62 -0
- package/docs/interfaces/IHotComponent.md +135 -0
- package/docs/interfaces/IHotStaq.md +118 -0
- package/docs/interfaces/IHotTestElement.md +54 -0
- package/docs/interfaces/IHotTestElementOptions.md +43 -0
- package/docs/interfaces/MySQLResults.md +43 -0
- package/docs/interfaces/MySQLSchemaFieldResult.md +75 -0
- package/docs/modules.md +162 -0
- package/package.json +65 -0
- package/selenium-start.sh +7 -0
- package/selenium-stop.sh +3 -0
- package/src/Hot.ts +319 -0
- package/src/HotAPI.ts +378 -0
- package/src/HotAgentAPI.ts +43 -0
- package/src/HotAgentRoute.ts +44 -0
- package/src/HotBuilder.ts +221 -0
- package/src/HotClient.ts +40 -0
- package/src/HotComponent.ts +158 -0
- package/src/HotCreator.ts +482 -0
- package/src/HotDB.ts +79 -0
- package/src/HotDBConnectionInterface.ts +40 -0
- package/src/HotFile.ts +617 -0
- package/src/HotHTTPServer.ts +954 -0
- package/src/HotIO.ts +128 -0
- package/src/HotLog.ts +158 -0
- package/src/HotPage.ts +206 -0
- package/src/HotRoute.ts +137 -0
- package/src/HotRouteMethod.ts +216 -0
- package/src/HotServer.ts +211 -0
- package/src/HotSetAsWeb.ts +3 -0
- package/src/HotStaq.ts +1877 -0
- package/src/HotStaqWeb.ts +59 -0
- package/src/HotTestDriver.ts +172 -0
- package/src/HotTestElement.ts +97 -0
- package/src/HotTestMap.ts +130 -0
- package/src/HotTestSeleniumDriver.ts +374 -0
- package/src/HotTester.ts +697 -0
- package/src/HotTesterAPI.ts +126 -0
- package/src/HotTesterMocha.ts +133 -0
- package/src/HotTesterMochaSelenium.ts +189 -0
- package/src/HotTesterServer.ts +551 -0
- package/src/api.ts +102 -0
- package/src/cli.ts +1147 -0
- package/src/schemas/HotDBInflux.ts +211 -0
- package/src/schemas/HotDBMigration.ts +24 -0
- package/src/schemas/HotDBMySQL.ts +312 -0
- package/src/schemas/HotDBSchema.ts +21 -0
- package/src/schemas/influx/InfluxSchema.ts +19 -0
- package/src/schemas/mysql/MySQLSchema.ts +90 -0
- package/src/schemas/mysql/MySQLSchemaField.ts +408 -0
- package/src/schemas/mysql/MySQLSchemaTable.ts +353 -0
- package/tsconfig-web.json +74 -0
- package/tsconfig.json +73 -0
- package/webpack.config.js +51 -0
- package/webpack.config.tests.js +56 -0
package/docs/README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
hotstaq / [Modules](modules.md)
|
|
2
|
+
|
|
3
|
+
# HotStaq
|
|
4
|
+
HotStaq is a client-side HTML preprocessor, with a design similar to that of PHP. Tech stacks have grown in size significantly over the years, and it can be hard for small teams to efficiently utilize all the different tech stacks properly. HotStaq helps reduce the headache of maintaining all the various tech while ensuring the application's security and quality.
|
|
5
|
+
|
|
6
|
+
Developers can quickly create their frontend and backends securely while adding their unit tests along the way in code During development, HotStaq developers know they can generate Dockerfiles to easily deploy their application to Kubernetes or Docker Swarm.
|
|
7
|
+
|
|
8
|
+
For more information, please visit: [HotStaq](https://hotstaq.com)
|
|
9
|
+
|
|
10
|
+
## Getting started
|
|
11
|
+
First you gotta install like so:
|
|
12
|
+
```console
|
|
13
|
+
npm -g install hotstaq
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Now you can create your project by entering:
|
|
17
|
+
```console
|
|
18
|
+
hotstaq create my-app
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Run the development web server:
|
|
22
|
+
|
|
23
|
+
```console
|
|
24
|
+
cd my-app
|
|
25
|
+
|
|
26
|
+
hotstaq start
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Your site starts at `http://localhost:8080`.
|
|
30
|
+
|
|
31
|
+
Open `public/index.hott` and change your landing page. Refresh your browser to see your changes immediately.
|
|
32
|
+
|
|
33
|
+
That's it!
|
|
34
|
+
|
|
35
|
+
## Running database tests
|
|
36
|
+
Make sure you have Docker installed, then do:
|
|
37
|
+
```console
|
|
38
|
+
./dbstart.sh
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
This will launch the temporary MariaDB and InfluxDB databases.
|
|
42
|
+
|
|
43
|
+
After testing/debugging you can stop them by entering:
|
|
44
|
+
```console
|
|
45
|
+
./dbstop.sh
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Environment Variables
|
|
49
|
+
You can configure how HotStaq starts by using:
|
|
50
|
+
* DATABASE_TYPE
|
|
51
|
+
* Type: string
|
|
52
|
+
* Description: The type of database to use.
|
|
53
|
+
* Accepted values:
|
|
54
|
+
* mysql
|
|
55
|
+
* influx
|
|
56
|
+
* DATABASE_SERVER
|
|
57
|
+
* Type: string
|
|
58
|
+
* Description: The url to the database server to connect to.
|
|
59
|
+
* Accepted values:
|
|
60
|
+
* MySql example: 127.0.0.1
|
|
61
|
+
* Influx example: http://127.0.0.1:8086
|
|
62
|
+
* DATABASE_PORT
|
|
63
|
+
* Type: number
|
|
64
|
+
* Description: The database port to use.
|
|
65
|
+
* Accepted values:
|
|
66
|
+
* Any integer.
|
|
67
|
+
* DATABASE_USERNAME
|
|
68
|
+
* Type: string
|
|
69
|
+
* Description: The database username to use.
|
|
70
|
+
* Accepted values:
|
|
71
|
+
* Any string.
|
|
72
|
+
* DATABASE_PASSWORD
|
|
73
|
+
* Type: string
|
|
74
|
+
* Description: The database password to use.
|
|
75
|
+
* Accepted values:
|
|
76
|
+
* Any string.
|
|
77
|
+
* DATABASE_ORG
|
|
78
|
+
* Type: string
|
|
79
|
+
* Description: The organization that contains the database. For Influx use.
|
|
80
|
+
* Accepted values:
|
|
81
|
+
* Any string.
|
|
82
|
+
* DATABASE_TOKEN
|
|
83
|
+
* Type: string
|
|
84
|
+
* Description: The database token to use. For Influx use.
|
|
85
|
+
* Accepted values:
|
|
86
|
+
* Any string.
|
|
87
|
+
* DATABASE_SCHEMA
|
|
88
|
+
* Type: string
|
|
89
|
+
* Description: The database schema (or bucket) to use.
|
|
90
|
+
* Accepted values:
|
|
91
|
+
* Any string.
|
|
92
|
+
* SELENIUM_REMOTE_SERVER
|
|
93
|
+
* Type: string
|
|
94
|
+
* Description: The remote selenium server to do web browser tests with.
|
|
95
|
+
* Accepted values:
|
|
96
|
+
* Any valid url.
|
|
97
|
+
* SELENIUM_WINDOW_WIDTH
|
|
98
|
+
* Type: number
|
|
99
|
+
* Description: The width of the new browser window.
|
|
100
|
+
* Accepted values:
|
|
101
|
+
* Any integer.
|
|
102
|
+
* SELENIUM_WINDOW_HEIGHT
|
|
103
|
+
* Type: number
|
|
104
|
+
* Description: The height of the new browser window.
|
|
105
|
+
* Accepted values:
|
|
106
|
+
* Any integer.
|
|
107
|
+
* TESTING_DEVTOOLS
|
|
108
|
+
* Type: number
|
|
109
|
+
* Description: Set to 1 if you want chrome to open the dev tools as browser tests start. This is only for testing.
|
|
110
|
+
* Accepted values:
|
|
111
|
+
* 0
|
|
112
|
+
* 1
|
|
113
|
+
* TESTING_REMOTE_SERVER
|
|
114
|
+
* Type: string
|
|
115
|
+
* Description: The remote server to use during browser tests.
|
|
116
|
+
* Accepted values:
|
|
117
|
+
* Any valid url.
|
|
118
|
+
|
|
119
|
+
## Developing
|
|
120
|
+
To get started developing you'll need to install:
|
|
121
|
+
```console
|
|
122
|
+
npm -g install typescript webpack-cli@4 typedoc
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
To run browser tests, you'll need to have the correct version of [chromedriver](https://chromedriver.chromium.org/) installed for the version of Chrome you are running on your machine.
|
|
126
|
+
|
|
127
|
+
## Possible Future Compiler
|
|
128
|
+
I'd like to create a CLI tool that compresses the entire public html directory into a zip file which can be downloaded and unzipped during runtime by the client's web browser then display the pages. During the compilation phase it would look for vulnerabilities and report them; for example when embedding JS files, if integrity hashes are missing, it would complain.
|
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
[hotstaq](../README.md) / [Modules](../modules.md) / Hot
|
|
2
|
+
|
|
3
|
+
# Class: Hot
|
|
4
|
+
|
|
5
|
+
The api used during processing.
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Constructors
|
|
10
|
+
|
|
11
|
+
- [constructor](Hot.md#constructor)
|
|
12
|
+
|
|
13
|
+
### Properties
|
|
14
|
+
|
|
15
|
+
- [API](Hot.md#api)
|
|
16
|
+
- [Arguments](Hot.md#arguments)
|
|
17
|
+
- [CSS](Hot.md#css)
|
|
18
|
+
- [Cookies](Hot.md#cookies)
|
|
19
|
+
- [CurrentPage](Hot.md#currentpage)
|
|
20
|
+
- [Data](Hot.md#data)
|
|
21
|
+
- [DeveloperMode](Hot.md#developermode)
|
|
22
|
+
- [HotTestElement](Hot.md#hottestelement)
|
|
23
|
+
- [JSFiles](Hot.md#jsfiles)
|
|
24
|
+
- [JSScripts](Hot.md#jsscripts)
|
|
25
|
+
- [Mode](Hot.md#mode)
|
|
26
|
+
- [Output](Hot.md#output)
|
|
27
|
+
- [PublicSecrets](Hot.md#publicsecrets)
|
|
28
|
+
- [TesterAPI](Hot.md#testerapi)
|
|
29
|
+
- [cssStr](Hot.md#cssstr)
|
|
30
|
+
- [jsFileStr](Hot.md#jsfilestr)
|
|
31
|
+
- [jsScriptsStr](Hot.md#jsscriptsstr)
|
|
32
|
+
|
|
33
|
+
### Methods
|
|
34
|
+
|
|
35
|
+
- [apiCall](Hot.md#apicall)
|
|
36
|
+
- [displayCSS](Hot.md#displaycss)
|
|
37
|
+
- [displayJSFiles](Hot.md#displayjsfiles)
|
|
38
|
+
- [displayJSScripts](Hot.md#displayjsscripts)
|
|
39
|
+
- [echo](Hot.md#echo)
|
|
40
|
+
- [getFile](Hot.md#getfile)
|
|
41
|
+
- [httpRequest](Hot.md#httprequest)
|
|
42
|
+
- [include](Hot.md#include)
|
|
43
|
+
- [jsonRequest](Hot.md#jsonrequest)
|
|
44
|
+
- [runFile](Hot.md#runfile)
|
|
45
|
+
|
|
46
|
+
## Constructors
|
|
47
|
+
|
|
48
|
+
### constructor
|
|
49
|
+
|
|
50
|
+
• **new Hot**()
|
|
51
|
+
|
|
52
|
+
## Properties
|
|
53
|
+
|
|
54
|
+
### API
|
|
55
|
+
|
|
56
|
+
▪ `Static` **API**: [`HotAPI`](HotAPI.md) = `null`
|
|
57
|
+
|
|
58
|
+
The current API used on this page. This is cleared between every file processed.
|
|
59
|
+
|
|
60
|
+
#### Defined in
|
|
61
|
+
|
|
62
|
+
[Hot.ts:73](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L73)
|
|
63
|
+
|
|
64
|
+
___
|
|
65
|
+
|
|
66
|
+
### Arguments
|
|
67
|
+
|
|
68
|
+
▪ `Static` **Arguments**: `any` = `null`
|
|
69
|
+
|
|
70
|
+
The arguments passed.
|
|
71
|
+
|
|
72
|
+
#### Defined in
|
|
73
|
+
|
|
74
|
+
[Hot.ts:54](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L54)
|
|
75
|
+
|
|
76
|
+
___
|
|
77
|
+
|
|
78
|
+
### CSS
|
|
79
|
+
|
|
80
|
+
▪ `Static` **CSS**: `string`[] = `[]`
|
|
81
|
+
|
|
82
|
+
The CSS files to use in the current page being generated.
|
|
83
|
+
|
|
84
|
+
**`todo`** Make this a "string | CSSObject" data type so it can also include
|
|
85
|
+
the integrity hashes as well.
|
|
86
|
+
|
|
87
|
+
#### Defined in
|
|
88
|
+
|
|
89
|
+
[Hot.ts:104](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L104)
|
|
90
|
+
|
|
91
|
+
___
|
|
92
|
+
|
|
93
|
+
### Cookies
|
|
94
|
+
|
|
95
|
+
▪ `Static` **Cookies**: `CookiesStatic`<`object`\> = `Cookies`
|
|
96
|
+
|
|
97
|
+
The cookies to use between pages.
|
|
98
|
+
|
|
99
|
+
#### Defined in
|
|
100
|
+
|
|
101
|
+
[Hot.ts:89](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L89)
|
|
102
|
+
|
|
103
|
+
___
|
|
104
|
+
|
|
105
|
+
### CurrentPage
|
|
106
|
+
|
|
107
|
+
▪ `Static` **CurrentPage**: [`HotPage`](HotPage.md) = `null`
|
|
108
|
+
|
|
109
|
+
The currently generated page being displayed. This is cleared between every file processed.
|
|
110
|
+
|
|
111
|
+
#### Defined in
|
|
112
|
+
|
|
113
|
+
[Hot.ts:50](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L50)
|
|
114
|
+
|
|
115
|
+
___
|
|
116
|
+
|
|
117
|
+
### Data
|
|
118
|
+
|
|
119
|
+
▪ `Static` **Data**: `any` = `{}`
|
|
120
|
+
|
|
121
|
+
The data to share across all the different files and pages. This data will be public.
|
|
122
|
+
|
|
123
|
+
#### Defined in
|
|
124
|
+
|
|
125
|
+
[Hot.ts:85](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L85)
|
|
126
|
+
|
|
127
|
+
___
|
|
128
|
+
|
|
129
|
+
### DeveloperMode
|
|
130
|
+
|
|
131
|
+
▪ `Static` **DeveloperMode**: typeof [`DeveloperMode`](../enums/DeveloperMode.md) = `DeveloperMode`
|
|
132
|
+
|
|
133
|
+
The mode in which this application is running. If it's set to development mode, all testing
|
|
134
|
+
related data will be collected, parsed, and executed if necessary.
|
|
135
|
+
|
|
136
|
+
#### Defined in
|
|
137
|
+
|
|
138
|
+
[Hot.ts:59](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L59)
|
|
139
|
+
|
|
140
|
+
___
|
|
141
|
+
|
|
142
|
+
### HotTestElement
|
|
143
|
+
|
|
144
|
+
▪ `Static` **HotTestElement**: typeof [`HotTestElement`](HotTestElement.md) = `HotTestElement`
|
|
145
|
+
|
|
146
|
+
The mode in which this application is running. If it's set to development mode, all testing
|
|
147
|
+
related data will be collected, parsed, and executed if necessary.
|
|
148
|
+
|
|
149
|
+
#### Defined in
|
|
150
|
+
|
|
151
|
+
[Hot.ts:64](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L64)
|
|
152
|
+
|
|
153
|
+
___
|
|
154
|
+
|
|
155
|
+
### JSFiles
|
|
156
|
+
|
|
157
|
+
▪ `Static` **JSFiles**: `any`[] = `[]`
|
|
158
|
+
|
|
159
|
+
The JavaScript files to use in the current page being generated.
|
|
160
|
+
|
|
161
|
+
**`todo`** Make this a "string | JSFileObject" data type so it can also include
|
|
162
|
+
the integrity hashes as well.
|
|
163
|
+
|
|
164
|
+
#### Defined in
|
|
165
|
+
|
|
166
|
+
[Hot.ts:111](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L111)
|
|
167
|
+
|
|
168
|
+
___
|
|
169
|
+
|
|
170
|
+
### JSScripts
|
|
171
|
+
|
|
172
|
+
▪ `Static` **JSScripts**: `any`[] = `[]`
|
|
173
|
+
|
|
174
|
+
The JavaScript inline code to use in the current page being generated.
|
|
175
|
+
|
|
176
|
+
#### Defined in
|
|
177
|
+
|
|
178
|
+
[Hot.ts:115](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L115)
|
|
179
|
+
|
|
180
|
+
___
|
|
181
|
+
|
|
182
|
+
### Mode
|
|
183
|
+
|
|
184
|
+
▪ `Static` **Mode**: [`DeveloperMode`](../enums/DeveloperMode.md) = `DeveloperMode.Production`
|
|
185
|
+
|
|
186
|
+
The mode in which this application is running. If it's set to development mode, all testing
|
|
187
|
+
related data will be collected, parsed, and executed if necessary.
|
|
188
|
+
|
|
189
|
+
#### Defined in
|
|
190
|
+
|
|
191
|
+
[Hot.ts:69](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L69)
|
|
192
|
+
|
|
193
|
+
___
|
|
194
|
+
|
|
195
|
+
### Output
|
|
196
|
+
|
|
197
|
+
▪ `Static` **Output**: `string` = `""`
|
|
198
|
+
|
|
199
|
+
Contains the buffer to output. This is cleared between every file processed.
|
|
200
|
+
|
|
201
|
+
#### Defined in
|
|
202
|
+
|
|
203
|
+
[Hot.ts:81](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L81)
|
|
204
|
+
|
|
205
|
+
___
|
|
206
|
+
|
|
207
|
+
### PublicSecrets
|
|
208
|
+
|
|
209
|
+
▪ `Static` **PublicSecrets**: `any` = `{}`
|
|
210
|
+
|
|
211
|
+
Any secrets that can be shown publicly. These can be passed from HotSite.json.
|
|
212
|
+
|
|
213
|
+
#### Defined in
|
|
214
|
+
|
|
215
|
+
[Hot.ts:93](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L93)
|
|
216
|
+
|
|
217
|
+
___
|
|
218
|
+
|
|
219
|
+
### TesterAPI
|
|
220
|
+
|
|
221
|
+
▪ `Static` **TesterAPI**: [`HotAPI`](HotAPI.md) = `null`
|
|
222
|
+
|
|
223
|
+
The API being used by the tester.
|
|
224
|
+
|
|
225
|
+
#### Defined in
|
|
226
|
+
|
|
227
|
+
[Hot.ts:77](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L77)
|
|
228
|
+
|
|
229
|
+
___
|
|
230
|
+
|
|
231
|
+
### cssStr
|
|
232
|
+
|
|
233
|
+
▪ `Static` **cssStr**: `string`
|
|
234
|
+
|
|
235
|
+
The CSS string to use when echoing out the CSS files.
|
|
236
|
+
|
|
237
|
+
#### Defined in
|
|
238
|
+
|
|
239
|
+
[Hot.ts:97](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L97)
|
|
240
|
+
|
|
241
|
+
___
|
|
242
|
+
|
|
243
|
+
### jsFileStr
|
|
244
|
+
|
|
245
|
+
▪ `Static` **jsFileStr**: `string`
|
|
246
|
+
|
|
247
|
+
The JavaScript string to use when echoing out the Scripts files.
|
|
248
|
+
|
|
249
|
+
#### Defined in
|
|
250
|
+
|
|
251
|
+
[Hot.ts:119](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L119)
|
|
252
|
+
|
|
253
|
+
___
|
|
254
|
+
|
|
255
|
+
### jsScriptsStr
|
|
256
|
+
|
|
257
|
+
▪ `Static` **jsScriptsStr**: `string`
|
|
258
|
+
|
|
259
|
+
The JavaScript string to use when echoing out the Scripts files.
|
|
260
|
+
|
|
261
|
+
#### Defined in
|
|
262
|
+
|
|
263
|
+
[Hot.ts:123](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L123)
|
|
264
|
+
|
|
265
|
+
## Methods
|
|
266
|
+
|
|
267
|
+
### apiCall
|
|
268
|
+
|
|
269
|
+
▸ `Static` **apiCall**(`route`, `data?`, `httpMethod?`): `Promise`<`any`\>
|
|
270
|
+
|
|
271
|
+
Make an api call.
|
|
272
|
+
|
|
273
|
+
#### Parameters
|
|
274
|
+
|
|
275
|
+
| Name | Type | Default value |
|
|
276
|
+
| :------ | :------ | :------ |
|
|
277
|
+
| `route` | `string` | `undefined` |
|
|
278
|
+
| `data` | `any` | `null` |
|
|
279
|
+
| `httpMethod` | `string` | `"POST"` |
|
|
280
|
+
|
|
281
|
+
#### Returns
|
|
282
|
+
|
|
283
|
+
`Promise`<`any`\>
|
|
284
|
+
|
|
285
|
+
#### Defined in
|
|
286
|
+
|
|
287
|
+
[Hot.ts:195](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L195)
|
|
288
|
+
|
|
289
|
+
___
|
|
290
|
+
|
|
291
|
+
### displayCSS
|
|
292
|
+
|
|
293
|
+
▸ `Static` **displayCSS**(): `void`
|
|
294
|
+
|
|
295
|
+
Echo out the CSS for the current page being generated.
|
|
296
|
+
|
|
297
|
+
#### Returns
|
|
298
|
+
|
|
299
|
+
`void`
|
|
300
|
+
|
|
301
|
+
#### Defined in
|
|
302
|
+
|
|
303
|
+
[Hot.ts:275](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L275)
|
|
304
|
+
|
|
305
|
+
___
|
|
306
|
+
|
|
307
|
+
### displayJSFiles
|
|
308
|
+
|
|
309
|
+
▸ `Static` **displayJSFiles**(): `void`
|
|
310
|
+
|
|
311
|
+
Echo out the JS files for the current page being generated.
|
|
312
|
+
|
|
313
|
+
#### Returns
|
|
314
|
+
|
|
315
|
+
`void`
|
|
316
|
+
|
|
317
|
+
#### Defined in
|
|
318
|
+
|
|
319
|
+
[Hot.ts:291](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L291)
|
|
320
|
+
|
|
321
|
+
___
|
|
322
|
+
|
|
323
|
+
### displayJSScripts
|
|
324
|
+
|
|
325
|
+
▸ `Static` **displayJSScripts**(): `void`
|
|
326
|
+
|
|
327
|
+
Echo out the JS scripts for the current page being generated.
|
|
328
|
+
|
|
329
|
+
#### Returns
|
|
330
|
+
|
|
331
|
+
`void`
|
|
332
|
+
|
|
333
|
+
#### Defined in
|
|
334
|
+
|
|
335
|
+
[Hot.ts:307](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L307)
|
|
336
|
+
|
|
337
|
+
___
|
|
338
|
+
|
|
339
|
+
### echo
|
|
340
|
+
|
|
341
|
+
▸ `Static` **echo**(`message`): `void`
|
|
342
|
+
|
|
343
|
+
Echo out some output.
|
|
344
|
+
|
|
345
|
+
#### Parameters
|
|
346
|
+
|
|
347
|
+
| Name | Type |
|
|
348
|
+
| :------ | :------ |
|
|
349
|
+
| `message` | `string` |
|
|
350
|
+
|
|
351
|
+
#### Returns
|
|
352
|
+
|
|
353
|
+
`void`
|
|
354
|
+
|
|
355
|
+
#### Defined in
|
|
356
|
+
|
|
357
|
+
[Hot.ts:267](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L267)
|
|
358
|
+
|
|
359
|
+
___
|
|
360
|
+
|
|
361
|
+
### getFile
|
|
362
|
+
|
|
363
|
+
▸ `Static` **getFile**(`path`, `args?`): `Promise`<`string`\>
|
|
364
|
+
|
|
365
|
+
Get the content of a file.
|
|
366
|
+
|
|
367
|
+
#### Parameters
|
|
368
|
+
|
|
369
|
+
| Name | Type | Default value |
|
|
370
|
+
| :------ | :------ | :------ |
|
|
371
|
+
| `path` | `string` \| [`HotFile`](HotFile.md) | `undefined` |
|
|
372
|
+
| `args` | `any`[] | `null` |
|
|
373
|
+
|
|
374
|
+
#### Returns
|
|
375
|
+
|
|
376
|
+
`Promise`<`string`\>
|
|
377
|
+
|
|
378
|
+
#### Defined in
|
|
379
|
+
|
|
380
|
+
[Hot.ts:168](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L168)
|
|
381
|
+
|
|
382
|
+
___
|
|
383
|
+
|
|
384
|
+
### httpRequest
|
|
385
|
+
|
|
386
|
+
▸ `Static` **httpRequest**(`url`, `requestInit?`): `Promise`<`Response`\>
|
|
387
|
+
|
|
388
|
+
Make a HTTP request. This is basically just a wrapper for fetch.
|
|
389
|
+
|
|
390
|
+
#### Parameters
|
|
391
|
+
|
|
392
|
+
| Name | Type | Default value | Description |
|
|
393
|
+
| :------ | :------ | :------ | :------ |
|
|
394
|
+
| `url` | `string` | `undefined` | The full url to make the HTTP call. |
|
|
395
|
+
| `requestInit` | `RequestInit` | `undefined` | The request parameters to send. |
|
|
396
|
+
|
|
397
|
+
#### Returns
|
|
398
|
+
|
|
399
|
+
`Promise`<`Response`\>
|
|
400
|
+
|
|
401
|
+
The HTTP response.
|
|
402
|
+
|
|
403
|
+
#### Defined in
|
|
404
|
+
|
|
405
|
+
[Hot.ts:257](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L257)
|
|
406
|
+
|
|
407
|
+
___
|
|
408
|
+
|
|
409
|
+
### include
|
|
410
|
+
|
|
411
|
+
▸ `Static` **include**(`file`, `args?`): `Promise`<`void`\>
|
|
412
|
+
|
|
413
|
+
Retrieve a file and echo out it's contents.
|
|
414
|
+
|
|
415
|
+
#### Parameters
|
|
416
|
+
|
|
417
|
+
| Name | Type | Default value |
|
|
418
|
+
| :------ | :------ | :------ |
|
|
419
|
+
| `file` | `string` \| [`HotFile`](HotFile.md) | `undefined` |
|
|
420
|
+
| `args` | `any`[] | `null` |
|
|
421
|
+
|
|
422
|
+
#### Returns
|
|
423
|
+
|
|
424
|
+
`Promise`<`void`\>
|
|
425
|
+
|
|
426
|
+
#### Defined in
|
|
427
|
+
|
|
428
|
+
[Hot.ts:128](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L128)
|
|
429
|
+
|
|
430
|
+
___
|
|
431
|
+
|
|
432
|
+
### jsonRequest
|
|
433
|
+
|
|
434
|
+
▸ `Static` **jsonRequest**(`url`, `data?`, `httpMethod?`): `Promise`<`any`\>
|
|
435
|
+
|
|
436
|
+
Make a HTTP JSON request.
|
|
437
|
+
|
|
438
|
+
#### Parameters
|
|
439
|
+
|
|
440
|
+
| Name | Type | Default value | Description |
|
|
441
|
+
| :------ | :------ | :------ | :------ |
|
|
442
|
+
| `url` | `string` | `undefined` | The full url to make the HTTP call. |
|
|
443
|
+
| `data` | `any` | `null` | The data to JSON.stringify and send. |
|
|
444
|
+
| `httpMethod` | `string` | `"POST"` | The HTTP method to use to send the data. |
|
|
445
|
+
|
|
446
|
+
#### Returns
|
|
447
|
+
|
|
448
|
+
`Promise`<`any`\>
|
|
449
|
+
|
|
450
|
+
The parsed JSON object.
|
|
451
|
+
|
|
452
|
+
#### Defined in
|
|
453
|
+
|
|
454
|
+
[Hot.ts:223](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L223)
|
|
455
|
+
|
|
456
|
+
___
|
|
457
|
+
|
|
458
|
+
### runFile
|
|
459
|
+
|
|
460
|
+
▸ `Static` **runFile**(`fileName`, `args?`): `Promise`<`void`\>
|
|
461
|
+
|
|
462
|
+
Run an already loaded file and echo out it's contents.
|
|
463
|
+
|
|
464
|
+
#### Parameters
|
|
465
|
+
|
|
466
|
+
| Name | Type | Default value |
|
|
467
|
+
| :------ | :------ | :------ |
|
|
468
|
+
| `fileName` | `string` | `undefined` |
|
|
469
|
+
| `args` | `any`[] | `null` |
|
|
470
|
+
|
|
471
|
+
#### Returns
|
|
472
|
+
|
|
473
|
+
`Promise`<`void`\>
|
|
474
|
+
|
|
475
|
+
#### Defined in
|
|
476
|
+
|
|
477
|
+
[Hot.ts:152](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/Hot.ts#L152)
|