hotstaq 0.5.3
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/.dockerignore +123 -0
- package/.eslintignore +17 -0
- package/.eslintrc.js +11 -0
- package/.vscode/launch.json +201 -0
- package/.vscode/settings.json +2 -0
- package/.vscode/tasks.json +88 -0
- package/CONTRIBUTING.md +157 -0
- package/LICENSE +21 -0
- package/README.md +128 -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 +137 -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 +242 -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 +88 -0
- package/build/src/HotCreator.d.ts.map +1 -0
- package/build/src/HotCreator.js +445 -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/HotGenerator.d.ts +80 -0
- package/build/src/HotGenerator.d.ts.map +1 -0
- package/build/src/HotGenerator.js +342 -0
- package/build/src/HotGenerator.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 +47 -0
- package/build/src/HotIO.d.ts.map +1 -0
- package/build/src/HotIO.js +232 -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 +603 -0
- package/build/src/HotStaq.d.ts.map +1 -0
- package/build/src/HotStaq.js +1260 -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 +86 -0
- package/build/src/HotTestSeleniumDriver.d.ts.map +1 -0
- package/build/src/HotTestSeleniumDriver.js +400 -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 +622 -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 copy.d.ts +2 -0
- package/build/src/api copy.d.ts.map +1 -0
- package/build/src/api copy.js +153 -0
- package/build/src/api copy.js.map +1 -0
- package/build/src/api-web.d.ts +2 -0
- package/build/src/api-web.d.ts.map +1 -0
- package/build/src/api-web.js +45 -0
- package/build/src/api-web.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 +1040 -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 +119 -0
- package/build-web/HotStaqTests_HelloWorldAPI.js +133 -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 +130 -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 +1155 -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 +542 -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 +182 -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 +386 -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 +470 -0
- package/src/HotDB.ts +79 -0
- package/src/HotDBConnectionInterface.ts +40 -0
- package/src/HotFile.ts +617 -0
- package/src/HotGenerator.ts +446 -0
- package/src/HotHTTPServer.ts +954 -0
- package/src/HotIO.ts +160 -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 +1881 -0
- package/src/HotTestDriver.ts +171 -0
- package/src/HotTestElement.ts +97 -0
- package/src/HotTestMap.ts +130 -0
- package/src/HotTestSeleniumDriver.ts +381 -0
- package/src/HotTester.ts +696 -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-web.ts +48 -0
- package/src/api.ts +103 -0
- package/src/cli.ts +1225 -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/temp/HotStaqWeb.ts +59 -0
- package/tsconfig-generator.json +17 -0
- package/tsconfig-web.json +74 -0
- package/tsconfig.json +73 -0
- package/webpack.config.generator.js +41 -0
- package/webpack.config.js +53 -0
- package/webpack.config.tests.js +56 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
[hotstaq](../README.md) / [Modules](../modules.md) / MySQLSchemaFieldResult
|
|
2
|
+
|
|
3
|
+
# Interface: MySQLSchemaFieldResult
|
|
4
|
+
|
|
5
|
+
The resulting data from a generated field.
|
|
6
|
+
|
|
7
|
+
## Table of contents
|
|
8
|
+
|
|
9
|
+
### Properties
|
|
10
|
+
|
|
11
|
+
- [constraint](MySQLSchemaFieldResult.md#constraint)
|
|
12
|
+
- [field](MySQLSchemaFieldResult.md#field)
|
|
13
|
+
- [foreignKey](MySQLSchemaFieldResult.md#foreignkey)
|
|
14
|
+
- [key](MySQLSchemaFieldResult.md#key)
|
|
15
|
+
- [primaryKey](MySQLSchemaFieldResult.md#primarykey)
|
|
16
|
+
|
|
17
|
+
## Properties
|
|
18
|
+
|
|
19
|
+
### constraint
|
|
20
|
+
|
|
21
|
+
• `Optional` **constraint**: `string`
|
|
22
|
+
|
|
23
|
+
The constraint to be added.
|
|
24
|
+
|
|
25
|
+
#### Defined in
|
|
26
|
+
|
|
27
|
+
[schemas/mysql/MySQLSchemaField.ts:23](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/mysql/MySQLSchemaField.ts#L23)
|
|
28
|
+
|
|
29
|
+
___
|
|
30
|
+
|
|
31
|
+
### field
|
|
32
|
+
|
|
33
|
+
• `Optional` **field**: `string`
|
|
34
|
+
|
|
35
|
+
The field to be entered.
|
|
36
|
+
|
|
37
|
+
#### Defined in
|
|
38
|
+
|
|
39
|
+
[schemas/mysql/MySQLSchemaField.ts:11](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/mysql/MySQLSchemaField.ts#L11)
|
|
40
|
+
|
|
41
|
+
___
|
|
42
|
+
|
|
43
|
+
### foreignKey
|
|
44
|
+
|
|
45
|
+
• `Optional` **foreignKey**: `string`
|
|
46
|
+
|
|
47
|
+
The foreign key to be added.
|
|
48
|
+
|
|
49
|
+
#### Defined in
|
|
50
|
+
|
|
51
|
+
[schemas/mysql/MySQLSchemaField.ts:27](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/mysql/MySQLSchemaField.ts#L27)
|
|
52
|
+
|
|
53
|
+
___
|
|
54
|
+
|
|
55
|
+
### key
|
|
56
|
+
|
|
57
|
+
• `Optional` **key**: `string`
|
|
58
|
+
|
|
59
|
+
The key to be added.
|
|
60
|
+
|
|
61
|
+
#### Defined in
|
|
62
|
+
|
|
63
|
+
[schemas/mysql/MySQLSchemaField.ts:19](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/mysql/MySQLSchemaField.ts#L19)
|
|
64
|
+
|
|
65
|
+
___
|
|
66
|
+
|
|
67
|
+
### primaryKey
|
|
68
|
+
|
|
69
|
+
• `Optional` **primaryKey**: `string`
|
|
70
|
+
|
|
71
|
+
The primary key to be added.
|
|
72
|
+
|
|
73
|
+
#### Defined in
|
|
74
|
+
|
|
75
|
+
[schemas/mysql/MySQLSchemaField.ts:15](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/mysql/MySQLSchemaField.ts#L15)
|
package/docs/modules.md
ADDED
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
[hotstaq](README.md) / Modules
|
|
2
|
+
|
|
3
|
+
# hotstaq
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Enumerations
|
|
8
|
+
|
|
9
|
+
- [ConnectionStatus](enums/ConnectionStatus.md)
|
|
10
|
+
- [DeveloperMode](enums/DeveloperMode.md)
|
|
11
|
+
- [EventExecutionType](enums/EventExecutionType.md)
|
|
12
|
+
- [HTTPMethod](enums/HTTPMethod.md)
|
|
13
|
+
- [HotDBGenerationType](enums/HotDBGenerationType.md)
|
|
14
|
+
- [HotLogLevel](enums/HotLogLevel.md)
|
|
15
|
+
|
|
16
|
+
### Classes
|
|
17
|
+
|
|
18
|
+
- [Hot](classes/Hot.md)
|
|
19
|
+
- [HotAPI](classes/HotAPI.md)
|
|
20
|
+
- [HotClient](classes/HotClient.md)
|
|
21
|
+
- [HotComponent](classes/HotComponent.md)
|
|
22
|
+
- [HotDB](classes/HotDB.md)
|
|
23
|
+
- [HotDBInflux](classes/HotDBInflux.md)
|
|
24
|
+
- [HotDBMigration](classes/HotDBMigration.md)
|
|
25
|
+
- [HotDBMySQL](classes/HotDBMySQL.md)
|
|
26
|
+
- [HotDBSchema](classes/HotDBSchema.md)
|
|
27
|
+
- [HotFile](classes/HotFile.md)
|
|
28
|
+
- [HotHTTPServer](classes/HotHTTPServer.md)
|
|
29
|
+
- [HotLog](classes/HotLog.md)
|
|
30
|
+
- [HotPage](classes/HotPage.md)
|
|
31
|
+
- [HotRoute](classes/HotRoute.md)
|
|
32
|
+
- [HotRouteMethod](classes/HotRouteMethod.md)
|
|
33
|
+
- [HotServer](classes/HotServer.md)
|
|
34
|
+
- [HotStaq](classes/HotStaq.md)
|
|
35
|
+
- [HotTestDestination](classes/HotTestDestination.md)
|
|
36
|
+
- [HotTestDriver](classes/HotTestDriver.md)
|
|
37
|
+
- [HotTestElement](classes/HotTestElement.md)
|
|
38
|
+
- [HotTestElementOptions](classes/HotTestElementOptions.md)
|
|
39
|
+
- [HotTestMap](classes/HotTestMap.md)
|
|
40
|
+
- [HotTestSeleniumDriver](classes/HotTestSeleniumDriver.md)
|
|
41
|
+
- [HotTester](classes/HotTester.md)
|
|
42
|
+
- [HotTesterAPI](classes/HotTesterAPI.md)
|
|
43
|
+
- [HotTesterMocha](classes/HotTesterMocha.md)
|
|
44
|
+
- [HotTesterMochaSelenium](classes/HotTesterMochaSelenium.md)
|
|
45
|
+
- [HotTesterServer](classes/HotTesterServer.md)
|
|
46
|
+
- [InfluxSchema](classes/InfluxSchema.md)
|
|
47
|
+
- [MySQLSchema](classes/MySQLSchema.md)
|
|
48
|
+
- [MySQLSchemaField](classes/MySQLSchemaField.md)
|
|
49
|
+
- [MySQLSchemaTable](classes/MySQLSchemaTable.md)
|
|
50
|
+
|
|
51
|
+
### Interfaces
|
|
52
|
+
|
|
53
|
+
- [HotDBConnectionInterface](interfaces/HotDBConnectionInterface.md)
|
|
54
|
+
- [HotDestination](interfaces/HotDestination.md)
|
|
55
|
+
- [HotSite](interfaces/HotSite.md)
|
|
56
|
+
- [HotSiteMapPath](interfaces/HotSiteMapPath.md)
|
|
57
|
+
- [HotSiteRoute](interfaces/HotSiteRoute.md)
|
|
58
|
+
- [HotStartOptions](interfaces/HotStartOptions.md)
|
|
59
|
+
- [HotTestPage](interfaces/HotTestPage.md)
|
|
60
|
+
- [HotTestStop](interfaces/HotTestStop.md)
|
|
61
|
+
- [IHotComponent](interfaces/IHotComponent.md)
|
|
62
|
+
- [IHotStaq](interfaces/IHotStaq.md)
|
|
63
|
+
- [IHotTestElement](interfaces/IHotTestElement.md)
|
|
64
|
+
- [IHotTestElementOptions](interfaces/IHotTestElementOptions.md)
|
|
65
|
+
- [MySQLResults](interfaces/MySQLResults.md)
|
|
66
|
+
- [MySQLSchemaFieldResult](interfaces/MySQLSchemaFieldResult.md)
|
|
67
|
+
|
|
68
|
+
### Type aliases
|
|
69
|
+
|
|
70
|
+
- [APItoLoad](modules.md#apitoload)
|
|
71
|
+
- [HotTestPath](modules.md#hottestpath)
|
|
72
|
+
- [ServerAuthorizationFunction](modules.md#serverauthorizationfunction)
|
|
73
|
+
- [ServerExecutionFunction](modules.md#serverexecutionfunction)
|
|
74
|
+
|
|
75
|
+
## Type aliases
|
|
76
|
+
|
|
77
|
+
### APItoLoad
|
|
78
|
+
|
|
79
|
+
Ƭ **APItoLoad**: `Object`
|
|
80
|
+
|
|
81
|
+
The API to load.
|
|
82
|
+
|
|
83
|
+
#### Type declaration
|
|
84
|
+
|
|
85
|
+
| Name | Type |
|
|
86
|
+
| :------ | :------ |
|
|
87
|
+
| `exportedClassName` | `string` |
|
|
88
|
+
| `path` | `string` |
|
|
89
|
+
|
|
90
|
+
#### Defined in
|
|
91
|
+
|
|
92
|
+
[HotAPI.ts:14](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotAPI.ts#L14)
|
|
93
|
+
|
|
94
|
+
___
|
|
95
|
+
|
|
96
|
+
### HotTestPath
|
|
97
|
+
|
|
98
|
+
Ƭ **HotTestPath**: (`driver`: [`HotTestDriver`](classes/HotTestDriver.md), ...`args`: `any`) => `Promise`<`any`\>
|
|
99
|
+
|
|
100
|
+
#### Type declaration
|
|
101
|
+
|
|
102
|
+
▸ (`driver`, ...`args`): `Promise`<`any`\>
|
|
103
|
+
|
|
104
|
+
Create a test path for later execution.
|
|
105
|
+
|
|
106
|
+
##### Parameters
|
|
107
|
+
|
|
108
|
+
| Name | Type |
|
|
109
|
+
| :------ | :------ |
|
|
110
|
+
| `driver` | [`HotTestDriver`](classes/HotTestDriver.md) |
|
|
111
|
+
| `...args` | `any` |
|
|
112
|
+
|
|
113
|
+
##### Returns
|
|
114
|
+
|
|
115
|
+
`Promise`<`any`\>
|
|
116
|
+
|
|
117
|
+
#### Defined in
|
|
118
|
+
|
|
119
|
+
[HotTestMap.ts:8](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotTestMap.ts#L8)
|
|
120
|
+
|
|
121
|
+
___
|
|
122
|
+
|
|
123
|
+
### ServerAuthorizationFunction
|
|
124
|
+
|
|
125
|
+
Ƭ **ServerAuthorizationFunction**: (`req`: `any`, `res`: `any`, `jsonObj`: `any`, `queryObj`: `any`) => `Promise`<`any`\>
|
|
126
|
+
|
|
127
|
+
#### Type declaration
|
|
128
|
+
|
|
129
|
+
▸ (`req`, `res`, `jsonObj`, `queryObj`): `Promise`<`any`\>
|
|
130
|
+
|
|
131
|
+
A function that will be executed by the server for authorization. Any value
|
|
132
|
+
returned from this function will be passed to the ServerExecutionFunction.
|
|
133
|
+
If an undefined value is returned, this indicates the server was not able
|
|
134
|
+
to authenticate the user, so the ServerExecutionFunction will not be
|
|
135
|
+
executed.
|
|
136
|
+
|
|
137
|
+
##### Parameters
|
|
138
|
+
|
|
139
|
+
| Name | Type |
|
|
140
|
+
| :------ | :------ |
|
|
141
|
+
| `req` | `any` |
|
|
142
|
+
| `res` | `any` |
|
|
143
|
+
| `jsonObj` | `any` |
|
|
144
|
+
| `queryObj` | `any` |
|
|
145
|
+
|
|
146
|
+
##### Returns
|
|
147
|
+
|
|
148
|
+
`Promise`<`any`\>
|
|
149
|
+
|
|
150
|
+
#### Defined in
|
|
151
|
+
|
|
152
|
+
[HotRouteMethod.ts:36](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotRouteMethod.ts#L36)
|
|
153
|
+
|
|
154
|
+
___
|
|
155
|
+
|
|
156
|
+
### ServerExecutionFunction
|
|
157
|
+
|
|
158
|
+
Ƭ **ServerExecutionFunction**: (`req`: `any`, `res`: `any`, `authorizedValue`: `any`, `jsonObj`: `any`, `queryObj`: `any`) => `Promise`<`any`\>
|
|
159
|
+
|
|
160
|
+
#### Type declaration
|
|
161
|
+
|
|
162
|
+
▸ (`req`, `res`, `authorizedValue`, `jsonObj`, `queryObj`): `Promise`<`any`\>
|
|
163
|
+
|
|
164
|
+
A function that will be executed by the server.
|
|
165
|
+
|
|
166
|
+
##### Parameters
|
|
167
|
+
|
|
168
|
+
| Name | Type |
|
|
169
|
+
| :------ | :------ |
|
|
170
|
+
| `req` | `any` |
|
|
171
|
+
| `res` | `any` |
|
|
172
|
+
| `authorizedValue` | `any` |
|
|
173
|
+
| `jsonObj` | `any` |
|
|
174
|
+
| `queryObj` | `any` |
|
|
175
|
+
|
|
176
|
+
##### Returns
|
|
177
|
+
|
|
178
|
+
`Promise`<`any`\>
|
|
179
|
+
|
|
180
|
+
#### Defined in
|
|
181
|
+
|
|
182
|
+
[HotRouteMethod.ts:23](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotRouteMethod.ts#L23)
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "hotstaq",
|
|
3
|
+
"version": "0.5.3",
|
|
4
|
+
"description": "",
|
|
5
|
+
"bin": {
|
|
6
|
+
"hotstaq": "./bin/hotstaq"
|
|
7
|
+
},
|
|
8
|
+
"main": "./build/src/api.js",
|
|
9
|
+
"types": "./build/src/api.d.js",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"test": "hotstaq --hotsite ./tests/hotsite/HotSite.json generate && mocha --timeout 999999 --colors ./build/tests/**/*.js",
|
|
12
|
+
"prepublishOnly": "npm run builddoc && npm run build && npm run buildweb",
|
|
13
|
+
"builddoc": "typedoc --theme markdown --tsconfig ./tsconfig.json --entryPoints './src/api.ts' --readme README.md --out ./docs/ ./src",
|
|
14
|
+
"build": "tsc --build ./tsconfig.json",
|
|
15
|
+
"buildweb": "webpack --mode=production && npx google-closure-compiler --js=./build-web/HotStaq.js --language_out=ECMASCRIPT_2018 --js_output_file=./build-web/HotStaq.min.js",
|
|
16
|
+
"buildwebdebug": "webpack --mode=development"
|
|
17
|
+
},
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/OurFreeLight/HotStaq/issues"
|
|
20
|
+
},
|
|
21
|
+
"author": "FreeLight, Inc",
|
|
22
|
+
"license": "MIT",
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/OurFreeLight/HotStaq.git"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@influxdata/influxdb-client": "^1.20.0",
|
|
29
|
+
"chai": "^4.3.4",
|
|
30
|
+
"commander": "^6.2.1",
|
|
31
|
+
"cross-fetch": "^3.1.4",
|
|
32
|
+
"express": "^4.17.1",
|
|
33
|
+
"form-data": "^3.0.1",
|
|
34
|
+
"formidable": "^1.2.6",
|
|
35
|
+
"fs-extra": "^9.1.0",
|
|
36
|
+
"js-cookie": "^3.0.1",
|
|
37
|
+
"mocha": "^9.1.3",
|
|
38
|
+
"mysql": "^2.18.1",
|
|
39
|
+
"selenium-webdriver": "^4.0.0",
|
|
40
|
+
"validate-npm-package-name": "^3.0.0"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/chai": "^4.2.21",
|
|
44
|
+
"@types/express": "^4.17.13",
|
|
45
|
+
"@types/formidable": "^1.2.4",
|
|
46
|
+
"@types/fs-extra": "^9.0.12",
|
|
47
|
+
"@types/js-cookie": "^2.2.7",
|
|
48
|
+
"@types/mocha": "^7.0.2",
|
|
49
|
+
"@types/mysql": "^2.15.19",
|
|
50
|
+
"@types/node": "^14.17.32",
|
|
51
|
+
"@types/selenium-webdriver": "^4.0.16",
|
|
52
|
+
"@types/validate-npm-package-name": "^3.0.3",
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^5.3.1",
|
|
54
|
+
"@typescript-eslint/parser": "^5.3.1",
|
|
55
|
+
"eslint": "^8.2.0",
|
|
56
|
+
"gulp": "^4.0.2",
|
|
57
|
+
"nyc": "^15.1.0",
|
|
58
|
+
"ts-loader": "^7.0.5",
|
|
59
|
+
"typedoc": "^0.22.10",
|
|
60
|
+
"typedoc-plugin-markdown": "^3.11.3",
|
|
61
|
+
"typescript": "^4.5.4",
|
|
62
|
+
"webpack": "^4.46.0",
|
|
63
|
+
"webpack-cli": "^4.9.1"
|
|
64
|
+
}
|
|
65
|
+
}
|
package/selenium-stop.sh
ADDED
package/src/Hot.ts
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { HotFile } from "./HotFile";
|
|
2
|
+
import { HotPage } from "./HotPage";
|
|
3
|
+
import { HotStaq } from "./HotStaq";
|
|
4
|
+
import { HotAPI } from "./HotAPI";
|
|
5
|
+
import { HotTestElement } from "./HotTestElement";
|
|
6
|
+
|
|
7
|
+
import Cookies from "js-cookie";
|
|
8
|
+
import fetch from "cross-fetch";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The available developer modes.
|
|
12
|
+
*/
|
|
13
|
+
export enum DeveloperMode
|
|
14
|
+
{
|
|
15
|
+
/**
|
|
16
|
+
* The default developer mode. No tests will be executed and
|
|
17
|
+
* any test related data will be ignored.
|
|
18
|
+
*/
|
|
19
|
+
Production,
|
|
20
|
+
/**
|
|
21
|
+
* For use during development/debugging. All test data will
|
|
22
|
+
* be collected and executed if necessary.
|
|
23
|
+
*/
|
|
24
|
+
Development
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* A CSS object to embed.
|
|
29
|
+
*/
|
|
30
|
+
export interface CSSObject
|
|
31
|
+
{
|
|
32
|
+
/**
|
|
33
|
+
* The url to the CSS file to embed.
|
|
34
|
+
*/
|
|
35
|
+
url: string;
|
|
36
|
+
/**
|
|
37
|
+
* The integrity hash to generate during initial compilation.
|
|
38
|
+
*/
|
|
39
|
+
integrityHash: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* The api used during processing.
|
|
44
|
+
*/
|
|
45
|
+
export class Hot
|
|
46
|
+
{
|
|
47
|
+
/**
|
|
48
|
+
* The currently generated page being displayed. This is cleared between every file processed.
|
|
49
|
+
*/
|
|
50
|
+
static CurrentPage: HotPage = null;
|
|
51
|
+
/**
|
|
52
|
+
* The arguments passed.
|
|
53
|
+
*/
|
|
54
|
+
static Arguments: any = null;
|
|
55
|
+
/**
|
|
56
|
+
* The mode in which this application is running. If it's set to development mode, all testing
|
|
57
|
+
* related data will be collected, parsed, and executed if necessary.
|
|
58
|
+
*/
|
|
59
|
+
static DeveloperMode = DeveloperMode;
|
|
60
|
+
/**
|
|
61
|
+
* The mode in which this application is running. If it's set to development mode, all testing
|
|
62
|
+
* related data will be collected, parsed, and executed if necessary.
|
|
63
|
+
*/
|
|
64
|
+
static HotTestElement = HotTestElement;
|
|
65
|
+
/**
|
|
66
|
+
* The mode in which this application is running. If it's set to development mode, all testing
|
|
67
|
+
* related data will be collected, parsed, and executed if necessary.
|
|
68
|
+
*/
|
|
69
|
+
static Mode: DeveloperMode = DeveloperMode.Production;
|
|
70
|
+
/**
|
|
71
|
+
*The current API used on this page. This is cleared between every file processed.
|
|
72
|
+
*/
|
|
73
|
+
static API: HotAPI = null;
|
|
74
|
+
/**
|
|
75
|
+
* The API being used by the tester.
|
|
76
|
+
*/
|
|
77
|
+
static TesterAPI: HotAPI = null;
|
|
78
|
+
/**
|
|
79
|
+
* Contains the buffer to output. This is cleared between every file processed.
|
|
80
|
+
*/
|
|
81
|
+
static Output: string = "";
|
|
82
|
+
/**
|
|
83
|
+
* The data to share across all the different files and pages. This data will be public.
|
|
84
|
+
*/
|
|
85
|
+
static Data: any = {};
|
|
86
|
+
/**
|
|
87
|
+
* The cookies to use between pages.
|
|
88
|
+
*/
|
|
89
|
+
static Cookies: Cookies.CookiesStatic = Cookies;
|
|
90
|
+
/**
|
|
91
|
+
* Any secrets that can be shown publicly. These can be passed from HotSite.json.
|
|
92
|
+
*/
|
|
93
|
+
static PublicSecrets: any = {};
|
|
94
|
+
/**
|
|
95
|
+
* The CSS string to use when echoing out the CSS files.
|
|
96
|
+
*/
|
|
97
|
+
static cssStr: string = `<link rel = "stylesheet" href = "%CSS_FILE%" />`;
|
|
98
|
+
/**
|
|
99
|
+
* The CSS files to use in the current page being generated.
|
|
100
|
+
*
|
|
101
|
+
* @todo Make this a "string | CSSObject" data type so it can also include
|
|
102
|
+
* the integrity hashes as well.
|
|
103
|
+
*/
|
|
104
|
+
static CSS: string[] = [];
|
|
105
|
+
/**
|
|
106
|
+
* The JavaScript files to use in the current page being generated.
|
|
107
|
+
*
|
|
108
|
+
* @todo Make this a "string | JSFileObject" data type so it can also include
|
|
109
|
+
* the integrity hashes as well.
|
|
110
|
+
*/
|
|
111
|
+
static JSFiles: any[] = [];
|
|
112
|
+
/**
|
|
113
|
+
* The JavaScript inline code to use in the current page being generated.
|
|
114
|
+
*/
|
|
115
|
+
static JSScripts: any[] = [];
|
|
116
|
+
/**
|
|
117
|
+
* The JavaScript string to use when echoing out the Scripts files.
|
|
118
|
+
*/
|
|
119
|
+
static jsFileStr: string = `<script type = "text/javascript" src = "%JS_FILE%"></script>`;
|
|
120
|
+
/**
|
|
121
|
+
* The JavaScript string to use when echoing out the Scripts files.
|
|
122
|
+
*/
|
|
123
|
+
static jsScriptsStr: string = `<script type = "text/javascript">%JS_CODE%</script>`;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Retrieve a file and echo out it's contents.
|
|
127
|
+
*/
|
|
128
|
+
static async include (file: HotFile | string, args: any[] = null): Promise<void>
|
|
129
|
+
{
|
|
130
|
+
if (HotStaq.isWeb === true)
|
|
131
|
+
{
|
|
132
|
+
if (typeof (file) === "string")
|
|
133
|
+
{
|
|
134
|
+
const lowerFile: string = file.toLowerCase ();
|
|
135
|
+
|
|
136
|
+
// If the file to be included does not have a nahfam, add it. This
|
|
137
|
+
// will ensure the server sends only the file content.
|
|
138
|
+
if (lowerFile.indexOf (".hott") > -1)
|
|
139
|
+
{
|
|
140
|
+
if (lowerFile.indexOf ("nahfam") < 0)
|
|
141
|
+
file += "?hpserve=nahfam";
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
Hot.echo (await Hot.getFile (file, args));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Run an already loaded file and echo out it's contents.
|
|
151
|
+
*/
|
|
152
|
+
static async runFile (fileName: string, args: any[] = null): Promise<void>
|
|
153
|
+
{
|
|
154
|
+
let file: HotFile = Hot.CurrentPage.processor.getFile (fileName);
|
|
155
|
+
/// @fixme Does the file need to be deep cloned first?
|
|
156
|
+
//let clonedFile: HotFile = new HotFile (Object.assign ({}, file));
|
|
157
|
+
let tempFile: HotFile = file;
|
|
158
|
+
|
|
159
|
+
tempFile.page = this.CurrentPage;
|
|
160
|
+
let content: string = await tempFile.process (args);
|
|
161
|
+
|
|
162
|
+
Hot.echo (content);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Get the content of a file.
|
|
167
|
+
*/
|
|
168
|
+
static async getFile (path: HotFile | string, args: any[] = null): Promise<string>
|
|
169
|
+
{
|
|
170
|
+
let tempFile: HotFile = null;
|
|
171
|
+
|
|
172
|
+
if (typeof (path) === "string")
|
|
173
|
+
{
|
|
174
|
+
tempFile = new HotFile ();
|
|
175
|
+
|
|
176
|
+
if (HotStaq.isWeb === true)
|
|
177
|
+
tempFile.url = path;
|
|
178
|
+
else
|
|
179
|
+
tempFile.localFile = path;
|
|
180
|
+
}
|
|
181
|
+
else
|
|
182
|
+
tempFile = path;
|
|
183
|
+
|
|
184
|
+
await tempFile.load ();
|
|
185
|
+
|
|
186
|
+
tempFile.page = this.CurrentPage;
|
|
187
|
+
let content: string = await tempFile.process (args);
|
|
188
|
+
|
|
189
|
+
return (content);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Make an api call.
|
|
194
|
+
*/
|
|
195
|
+
static async apiCall (route: string, data: any = null, httpMethod: string = "POST"): Promise<any>
|
|
196
|
+
{
|
|
197
|
+
let result: any = null;
|
|
198
|
+
|
|
199
|
+
if (Hot.CurrentPage == null)
|
|
200
|
+
throw new Error ("Current page is null!");
|
|
201
|
+
|
|
202
|
+
if (Hot.CurrentPage.processor == null)
|
|
203
|
+
throw new Error ("Current page's processor is null!");
|
|
204
|
+
|
|
205
|
+
if (Hot.CurrentPage.processor.api == null)
|
|
206
|
+
throw new Error ("Current page's processor api is null!");
|
|
207
|
+
|
|
208
|
+
if (Hot.CurrentPage.processor.api != null)
|
|
209
|
+
result = await Hot.CurrentPage.processor.api.makeCall (route, data, httpMethod);
|
|
210
|
+
|
|
211
|
+
return (result);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Make a HTTP JSON request.
|
|
216
|
+
*
|
|
217
|
+
* @param url The full url to make the HTTP call.
|
|
218
|
+
* @param data The data to JSON.stringify and send.
|
|
219
|
+
* @param httpMethod The HTTP method to use to send the data.
|
|
220
|
+
*
|
|
221
|
+
* @returns The parsed JSON object.
|
|
222
|
+
*/
|
|
223
|
+
static async jsonRequest (url: string, data: any = null, httpMethod: string = "POST"): Promise<any>
|
|
224
|
+
{
|
|
225
|
+
try
|
|
226
|
+
{
|
|
227
|
+
let res: Response = await fetch (url, {
|
|
228
|
+
"method": httpMethod,
|
|
229
|
+
"headers": {
|
|
230
|
+
"Accept": "application/json",
|
|
231
|
+
"Content-Type": "application/json"
|
|
232
|
+
},
|
|
233
|
+
"body": JSON.stringify (data)
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
if (res.ok === false)
|
|
237
|
+
throw new Error (`${res.status}: ${res.statusText}`);
|
|
238
|
+
|
|
239
|
+
let result: any = await res.json ();
|
|
240
|
+
|
|
241
|
+
return (result);
|
|
242
|
+
}
|
|
243
|
+
catch (ex)
|
|
244
|
+
{
|
|
245
|
+
return (JSON.stringify ({ "error": `${ex.message} - Could not fetch ${url}` }));
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Make a HTTP request. This is basically just a wrapper for fetch.
|
|
251
|
+
*
|
|
252
|
+
* @param url The full url to make the HTTP call.
|
|
253
|
+
* @param requestInit The request parameters to send.
|
|
254
|
+
*
|
|
255
|
+
* @returns The HTTP response.
|
|
256
|
+
*/
|
|
257
|
+
static async httpRequest (url: string, requestInit: RequestInit = undefined): Promise<Response>
|
|
258
|
+
{
|
|
259
|
+
let res: Response = await fetch (url, requestInit);
|
|
260
|
+
|
|
261
|
+
return (res);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
/**
|
|
265
|
+
* Echo out some output.
|
|
266
|
+
*/
|
|
267
|
+
static echo (message: string): void
|
|
268
|
+
{
|
|
269
|
+
Hot.Output += message;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Echo out the CSS for the current page being generated.
|
|
274
|
+
*/
|
|
275
|
+
static displayCSS (): void
|
|
276
|
+
{
|
|
277
|
+
for (let iIdx = 0; iIdx < Hot.CSS.length; iIdx++)
|
|
278
|
+
{
|
|
279
|
+
let cssFile: string = Hot.CSS[iIdx];
|
|
280
|
+
let cssOut: string = Hot.cssStr;
|
|
281
|
+
|
|
282
|
+
cssOut = cssOut.replace (/\%CSS_FILE\%/g, cssFile);
|
|
283
|
+
|
|
284
|
+
Hot.echo (cssOut);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* Echo out the JS files for the current page being generated.
|
|
290
|
+
*/
|
|
291
|
+
static displayJSFiles (): void
|
|
292
|
+
{
|
|
293
|
+
for (let iIdx = 0; iIdx < Hot.JSFiles.length; iIdx++)
|
|
294
|
+
{
|
|
295
|
+
let jsFile: string = Hot.JSFiles[iIdx];
|
|
296
|
+
let jsFileOut: string = Hot.jsFileStr;
|
|
297
|
+
|
|
298
|
+
jsFileOut = jsFileOut.replace (/\%JS_FILE\%/g, jsFile);
|
|
299
|
+
|
|
300
|
+
Hot.echo (jsFileOut);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Echo out the JS scripts for the current page being generated.
|
|
306
|
+
*/
|
|
307
|
+
static displayJSScripts (): void
|
|
308
|
+
{
|
|
309
|
+
for (let iIdx = 0; iIdx < Hot.JSScripts.length; iIdx++)
|
|
310
|
+
{
|
|
311
|
+
let jsScript: string = Hot.JSScripts[iIdx];
|
|
312
|
+
let jsScriptOut: string = Hot.jsScriptsStr;
|
|
313
|
+
|
|
314
|
+
jsScriptOut = jsScriptOut.replace (/\%JS_CODE\%/g, jsScript);
|
|
315
|
+
|
|
316
|
+
Hot.echo (jsScriptOut);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|