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.
Files changed (299) hide show
  1. package/.eslintignore +17 -0
  2. package/.eslintrc.js +11 -0
  3. package/.vscode/launch.json +199 -0
  4. package/.vscode/settings.json +2 -0
  5. package/.vscode/tasks.json +78 -0
  6. package/CONTRIBUTING.md +157 -0
  7. package/README.md +126 -0
  8. package/bin/hotstaq +3 -0
  9. package/bin/hotstaq.cmd +1 -0
  10. package/build/src/Hot.d.ts +167 -0
  11. package/build/src/Hot.d.ts.map +1 -0
  12. package/build/src/Hot.js +365 -0
  13. package/build/src/Hot.js.map +1 -0
  14. package/build/src/HotAPI.d.ts +130 -0
  15. package/build/src/HotAPI.d.ts.map +1 -0
  16. package/build/src/HotAPI.js +353 -0
  17. package/build/src/HotAPI.js.map +1 -0
  18. package/build/src/HotAgentAPI.d.ts +22 -0
  19. package/build/src/HotAgentAPI.d.ts.map +1 -0
  20. package/build/src/HotAgentAPI.js +85 -0
  21. package/build/src/HotAgentAPI.js.map +1 -0
  22. package/build/src/HotAgentRoute.d.ts +17 -0
  23. package/build/src/HotAgentRoute.d.ts.map +1 -0
  24. package/build/src/HotAgentRoute.js +109 -0
  25. package/build/src/HotAgentRoute.js.map +1 -0
  26. package/build/src/HotBuilder.d.ts +52 -0
  27. package/build/src/HotBuilder.d.ts.map +1 -0
  28. package/build/src/HotBuilder.js +239 -0
  29. package/build/src/HotBuilder.js.map +1 -0
  30. package/build/src/HotClient.d.ts +31 -0
  31. package/build/src/HotClient.d.ts.map +1 -0
  32. package/build/src/HotClient.js +19 -0
  33. package/build/src/HotClient.js.map +1 -0
  34. package/build/src/HotComponent.d.ts +118 -0
  35. package/build/src/HotComponent.d.ts.map +1 -0
  36. package/build/src/HotComponent.js +89 -0
  37. package/build/src/HotComponent.js.map +1 -0
  38. package/build/src/HotCreator.d.ts +92 -0
  39. package/build/src/HotCreator.d.ts.map +1 -0
  40. package/build/src/HotCreator.js +465 -0
  41. package/build/src/HotCreator.js.map +1 -0
  42. package/build/src/HotDB.d.ts +69 -0
  43. package/build/src/HotDB.d.ts.map +1 -0
  44. package/build/src/HotDB.js +29 -0
  45. package/build/src/HotDB.js.map +1 -0
  46. package/build/src/HotDBConnectionInterface.d.ts +40 -0
  47. package/build/src/HotDBConnectionInterface.d.ts.map +1 -0
  48. package/build/src/HotDBConnectionInterface.js +3 -0
  49. package/build/src/HotDBConnectionInterface.js.map +1 -0
  50. package/build/src/HotFile.d.ts +134 -0
  51. package/build/src/HotFile.d.ts.map +1 -0
  52. package/build/src/HotFile.js +454 -0
  53. package/build/src/HotFile.js.map +1 -0
  54. package/build/src/HotHTTPServer.d.ts +162 -0
  55. package/build/src/HotHTTPServer.d.ts.map +1 -0
  56. package/build/src/HotHTTPServer.js +863 -0
  57. package/build/src/HotHTTPServer.js.map +1 -0
  58. package/build/src/HotIO.d.ts +39 -0
  59. package/build/src/HotIO.d.ts.map +1 -0
  60. package/build/src/HotIO.js +195 -0
  61. package/build/src/HotIO.js.map +1 -0
  62. package/build/src/HotLog.d.ts +60 -0
  63. package/build/src/HotLog.d.ts.map +1 -0
  64. package/build/src/HotLog.js +126 -0
  65. package/build/src/HotLog.js.map +1 -0
  66. package/build/src/HotPage.d.ts +125 -0
  67. package/build/src/HotPage.d.ts.map +1 -0
  68. package/build/src/HotPage.js +178 -0
  69. package/build/src/HotPage.js.map +1 -0
  70. package/build/src/HotRoute.d.ts +82 -0
  71. package/build/src/HotRoute.d.ts.map +1 -0
  72. package/build/src/HotRoute.js +83 -0
  73. package/build/src/HotRoute.js.map +1 -0
  74. package/build/src/HotRouteMethod.d.ts +129 -0
  75. package/build/src/HotRouteMethod.d.ts.map +1 -0
  76. package/build/src/HotRouteMethod.js +84 -0
  77. package/build/src/HotRouteMethod.js.map +1 -0
  78. package/build/src/HotServer.d.ts +152 -0
  79. package/build/src/HotServer.d.ts.map +1 -0
  80. package/build/src/HotServer.js +109 -0
  81. package/build/src/HotServer.js.map +1 -0
  82. package/build/src/HotSetAsWeb.d.ts +2 -0
  83. package/build/src/HotSetAsWeb.d.ts.map +1 -0
  84. package/build/src/HotSetAsWeb.js +5 -0
  85. package/build/src/HotSetAsWeb.js.map +1 -0
  86. package/build/src/HotStaq.d.ts +601 -0
  87. package/build/src/HotStaq.d.ts.map +1 -0
  88. package/build/src/HotStaq.js +1258 -0
  89. package/build/src/HotStaq.js.map +1 -0
  90. package/build/src/HotStaqWeb.d.ts +18 -0
  91. package/build/src/HotStaqWeb.d.ts.map +1 -0
  92. package/build/src/HotStaqWeb.js +44 -0
  93. package/build/src/HotStaqWeb.js.map +1 -0
  94. package/build/src/HotTestDriver.d.ts +63 -0
  95. package/build/src/HotTestDriver.d.ts.map +1 -0
  96. package/build/src/HotTestDriver.js +187 -0
  97. package/build/src/HotTestDriver.js.map +1 -0
  98. package/build/src/HotTestElement.d.ts +71 -0
  99. package/build/src/HotTestElement.d.ts.map +1 -0
  100. package/build/src/HotTestElement.js +37 -0
  101. package/build/src/HotTestElement.js.map +1 -0
  102. package/build/src/HotTestMap.d.ts +83 -0
  103. package/build/src/HotTestMap.d.ts.map +1 -0
  104. package/build/src/HotTestMap.js +58 -0
  105. package/build/src/HotTestMap.js.map +1 -0
  106. package/build/src/HotTestSeleniumDriver.d.ts +82 -0
  107. package/build/src/HotTestSeleniumDriver.d.ts.map +1 -0
  108. package/build/src/HotTestSeleniumDriver.js +398 -0
  109. package/build/src/HotTestSeleniumDriver.js.map +1 -0
  110. package/build/src/HotTester.d.ts +188 -0
  111. package/build/src/HotTester.d.ts.map +1 -0
  112. package/build/src/HotTester.js +623 -0
  113. package/build/src/HotTester.js.map +1 -0
  114. package/build/src/HotTesterAPI.d.ts +15 -0
  115. package/build/src/HotTesterAPI.d.ts.map +1 -0
  116. package/build/src/HotTesterAPI.js +161 -0
  117. package/build/src/HotTesterAPI.js.map +1 -0
  118. package/build/src/HotTesterMocha.d.ts +50 -0
  119. package/build/src/HotTesterMocha.d.ts.map +1 -0
  120. package/build/src/HotTesterMocha.js +205 -0
  121. package/build/src/HotTesterMocha.js.map +1 -0
  122. package/build/src/HotTesterMochaSelenium.d.ts +70 -0
  123. package/build/src/HotTesterMochaSelenium.d.ts.map +1 -0
  124. package/build/src/HotTesterMochaSelenium.js +257 -0
  125. package/build/src/HotTesterMochaSelenium.js.map +1 -0
  126. package/build/src/HotTesterServer.d.ts +114 -0
  127. package/build/src/HotTesterServer.d.ts.map +1 -0
  128. package/build/src/HotTesterServer.js +575 -0
  129. package/build/src/HotTesterServer.js.map +1 -0
  130. package/build/src/api.d.ts +33 -0
  131. package/build/src/api.d.ts.map +1 -0
  132. package/build/src/api.js +78 -0
  133. package/build/src/api.js.map +1 -0
  134. package/build/src/cli.d.ts +2 -0
  135. package/build/src/cli.d.ts.map +1 -0
  136. package/build/src/cli.js +935 -0
  137. package/build/src/cli.js.map +1 -0
  138. package/build/src/schemas/HotDBInflux.d.ts +63 -0
  139. package/build/src/schemas/HotDBInflux.d.ts.map +1 -0
  140. package/build/src/schemas/HotDBInflux.js +239 -0
  141. package/build/src/schemas/HotDBInflux.js.map +1 -0
  142. package/build/src/schemas/HotDBMigration.d.ts +19 -0
  143. package/build/src/schemas/HotDBMigration.d.ts.map +1 -0
  144. package/build/src/schemas/HotDBMigration.js +15 -0
  145. package/build/src/schemas/HotDBMigration.js.map +1 -0
  146. package/build/src/schemas/HotDBMySQL.d.ts +65 -0
  147. package/build/src/schemas/HotDBMySQL.d.ts.map +1 -0
  148. package/build/src/schemas/HotDBMySQL.js +387 -0
  149. package/build/src/schemas/HotDBMySQL.js.map +1 -0
  150. package/build/src/schemas/HotDBSchema.d.ts +15 -0
  151. package/build/src/schemas/HotDBSchema.d.ts.map +1 -0
  152. package/build/src/schemas/HotDBSchema.js +19 -0
  153. package/build/src/schemas/HotDBSchema.js.map +1 -0
  154. package/build/src/schemas/influx/InfluxSchema.d.ts +14 -0
  155. package/build/src/schemas/influx/InfluxSchema.d.ts.map +1 -0
  156. package/build/src/schemas/influx/InfluxSchema.js +33 -0
  157. package/build/src/schemas/influx/InfluxSchema.js.map +1 -0
  158. package/build/src/schemas/mysql/MySQLSchema.d.ts +39 -0
  159. package/build/src/schemas/mysql/MySQLSchema.d.ts.map +1 -0
  160. package/build/src/schemas/mysql/MySQLSchema.js +151 -0
  161. package/build/src/schemas/mysql/MySQLSchema.js.map +1 -0
  162. package/build/src/schemas/mysql/MySQLSchemaField.d.ts +168 -0
  163. package/build/src/schemas/mysql/MySQLSchemaField.d.ts.map +1 -0
  164. package/build/src/schemas/mysql/MySQLSchemaField.js +260 -0
  165. package/build/src/schemas/mysql/MySQLSchemaField.js.map +1 -0
  166. package/build/src/schemas/mysql/MySQLSchemaTable.d.ts +49 -0
  167. package/build/src/schemas/mysql/MySQLSchemaTable.d.ts.map +1 -0
  168. package/build/src/schemas/mysql/MySQLSchemaTable.js +310 -0
  169. package/build/src/schemas/mysql/MySQLSchemaTable.js.map +1 -0
  170. package/build-web/HotStaq.js +2 -0
  171. package/build-web/HotStaq.min.js +125 -0
  172. package/builder/docker/Dockerfile.linux.gen +42 -0
  173. package/builder/docker/README.md +36 -0
  174. package/builder/docker/app/start.sh +8 -0
  175. package/builder/docker/dockerignore +3 -0
  176. package/builder/docker/scripts/build.bat +11 -0
  177. package/builder/docker/scripts/build.sh +11 -0
  178. package/builder/docker/scripts/start-app.bat +7 -0
  179. package/builder/docker/scripts/start-app.sh +7 -0
  180. package/builder/docker/scripts/stop-app.bat +5 -0
  181. package/builder/docker/scripts/stop-app.sh +5 -0
  182. package/builder/docker-compose/docker-compose.gen.yaml +41 -0
  183. package/builder/docker-compose/env-skeleton +4 -0
  184. package/creator/project/.vscode/launch.json +59 -0
  185. package/creator/project/README.md +20 -0
  186. package/creator/project/gitignore +118 -0
  187. package/creator/project/npmignore +118 -0
  188. package/creator/public/api-test.hott +28 -0
  189. package/creator/public/index.hott +12 -0
  190. package/creator/ts/src/AppAPI.ts +30 -0
  191. package/creator/ts/src/HelloWorld.ts +39 -0
  192. package/creator/ts/src/WebExport.ts +7 -0
  193. package/creator/ts/tsconfig-web.json +73 -0
  194. package/creator/ts/tsconfig.json +73 -0
  195. package/creator/ts/webpack-api.config.js +57 -0
  196. package/dbstart.sh +19 -0
  197. package/dbstop.sh +4 -0
  198. package/docs/.nojekyll +1 -0
  199. package/docs/README.md +128 -0
  200. package/docs/classes/Hot.md +477 -0
  201. package/docs/classes/HotAPI.md +369 -0
  202. package/docs/classes/HotClient.md +95 -0
  203. package/docs/classes/HotComponent.md +279 -0
  204. package/docs/classes/HotDB.md +247 -0
  205. package/docs/classes/HotDBInflux.md +404 -0
  206. package/docs/classes/HotDBMigration.md +80 -0
  207. package/docs/classes/HotDBMySQL.md +310 -0
  208. package/docs/classes/HotDBSchema.md +51 -0
  209. package/docs/classes/HotFile.md +353 -0
  210. package/docs/classes/HotHTTPServer.md +700 -0
  211. package/docs/classes/HotLog.md +162 -0
  212. package/docs/classes/HotPage.md +357 -0
  213. package/docs/classes/HotRoute.md +312 -0
  214. package/docs/classes/HotRouteMethod.md +271 -0
  215. package/docs/classes/HotServer.md +311 -0
  216. package/docs/classes/HotStaq.md +1153 -0
  217. package/docs/classes/HotTestDestination.md +58 -0
  218. package/docs/classes/HotTestDriver.md +332 -0
  219. package/docs/classes/HotTestElement.md +88 -0
  220. package/docs/classes/HotTestElementOptions.md +71 -0
  221. package/docs/classes/HotTestMap.md +92 -0
  222. package/docs/classes/HotTestSeleniumDriver.md +529 -0
  223. package/docs/classes/HotTester.md +653 -0
  224. package/docs/classes/HotTesterAPI.md +493 -0
  225. package/docs/classes/HotTesterMocha.md +843 -0
  226. package/docs/classes/HotTesterMochaSelenium.md +896 -0
  227. package/docs/classes/HotTesterServer.md +633 -0
  228. package/docs/classes/InfluxSchema.md +74 -0
  229. package/docs/classes/MySQLSchema.md +199 -0
  230. package/docs/classes/MySQLSchemaField.md +330 -0
  231. package/docs/classes/MySQLSchemaTable.md +176 -0
  232. package/docs/enums/ConnectionStatus.md +43 -0
  233. package/docs/enums/DeveloperMode.md +38 -0
  234. package/docs/enums/EventExecutionType.md +43 -0
  235. package/docs/enums/HTTPMethod.md +32 -0
  236. package/docs/enums/HotDBGenerationType.md +30 -0
  237. package/docs/enums/HotLogLevel.md +88 -0
  238. package/docs/interfaces/HotDBConnectionInterface.md +116 -0
  239. package/docs/interfaces/HotDestination.md +62 -0
  240. package/docs/interfaces/HotSite.md +187 -0
  241. package/docs/interfaces/HotSiteMapPath.md +37 -0
  242. package/docs/interfaces/HotSiteRoute.md +79 -0
  243. package/docs/interfaces/HotStartOptions.md +115 -0
  244. package/docs/interfaces/HotTestPage.md +44 -0
  245. package/docs/interfaces/HotTestStop.md +62 -0
  246. package/docs/interfaces/IHotComponent.md +135 -0
  247. package/docs/interfaces/IHotStaq.md +118 -0
  248. package/docs/interfaces/IHotTestElement.md +54 -0
  249. package/docs/interfaces/IHotTestElementOptions.md +43 -0
  250. package/docs/interfaces/MySQLResults.md +43 -0
  251. package/docs/interfaces/MySQLSchemaFieldResult.md +75 -0
  252. package/docs/modules.md +162 -0
  253. package/package.json +65 -0
  254. package/selenium-start.sh +7 -0
  255. package/selenium-stop.sh +3 -0
  256. package/src/Hot.ts +319 -0
  257. package/src/HotAPI.ts +378 -0
  258. package/src/HotAgentAPI.ts +43 -0
  259. package/src/HotAgentRoute.ts +44 -0
  260. package/src/HotBuilder.ts +221 -0
  261. package/src/HotClient.ts +40 -0
  262. package/src/HotComponent.ts +158 -0
  263. package/src/HotCreator.ts +482 -0
  264. package/src/HotDB.ts +79 -0
  265. package/src/HotDBConnectionInterface.ts +40 -0
  266. package/src/HotFile.ts +617 -0
  267. package/src/HotHTTPServer.ts +954 -0
  268. package/src/HotIO.ts +128 -0
  269. package/src/HotLog.ts +158 -0
  270. package/src/HotPage.ts +206 -0
  271. package/src/HotRoute.ts +137 -0
  272. package/src/HotRouteMethod.ts +216 -0
  273. package/src/HotServer.ts +211 -0
  274. package/src/HotSetAsWeb.ts +3 -0
  275. package/src/HotStaq.ts +1877 -0
  276. package/src/HotStaqWeb.ts +59 -0
  277. package/src/HotTestDriver.ts +172 -0
  278. package/src/HotTestElement.ts +97 -0
  279. package/src/HotTestMap.ts +130 -0
  280. package/src/HotTestSeleniumDriver.ts +374 -0
  281. package/src/HotTester.ts +697 -0
  282. package/src/HotTesterAPI.ts +126 -0
  283. package/src/HotTesterMocha.ts +133 -0
  284. package/src/HotTesterMochaSelenium.ts +189 -0
  285. package/src/HotTesterServer.ts +551 -0
  286. package/src/api.ts +102 -0
  287. package/src/cli.ts +1147 -0
  288. package/src/schemas/HotDBInflux.ts +211 -0
  289. package/src/schemas/HotDBMigration.ts +24 -0
  290. package/src/schemas/HotDBMySQL.ts +312 -0
  291. package/src/schemas/HotDBSchema.ts +21 -0
  292. package/src/schemas/influx/InfluxSchema.ts +19 -0
  293. package/src/schemas/mysql/MySQLSchema.ts +90 -0
  294. package/src/schemas/mysql/MySQLSchemaField.ts +408 -0
  295. package/src/schemas/mysql/MySQLSchemaTable.ts +353 -0
  296. package/tsconfig-web.json +74 -0
  297. package/tsconfig.json +73 -0
  298. package/webpack.config.js +51 -0
  299. 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/3f2c5d8/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/3f2c5d8/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/3f2c5d8/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/3f2c5d8/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/3f2c5d8/src/schemas/mysql/MySQLSchemaField.ts#L15)
@@ -0,0 +1,162 @@
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
+ - [HotTestPath](modules.md#hottestpath)
71
+ - [ServerAuthorizationFunction](modules.md#serverauthorizationfunction)
72
+ - [ServerExecutionFunction](modules.md#serverexecutionfunction)
73
+
74
+ ## Type aliases
75
+
76
+ ### HotTestPath
77
+
78
+ Ƭ **HotTestPath**: (`driver`: [`HotTestDriver`](classes/HotTestDriver.md), ...`args`: `any`) => `Promise`<`any`\>
79
+
80
+ #### Type declaration
81
+
82
+ ▸ (`driver`, ...`args`): `Promise`<`any`\>
83
+
84
+ Create a test path for later execution.
85
+
86
+ ##### Parameters
87
+
88
+ | Name | Type |
89
+ | :------ | :------ |
90
+ | `driver` | [`HotTestDriver`](classes/HotTestDriver.md) |
91
+ | `...args` | `any` |
92
+
93
+ ##### Returns
94
+
95
+ `Promise`<`any`\>
96
+
97
+ #### Defined in
98
+
99
+ [HotTestMap.ts:8](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotTestMap.ts#L8)
100
+
101
+ ___
102
+
103
+ ### ServerAuthorizationFunction
104
+
105
+ Ƭ **ServerAuthorizationFunction**: (`req`: `any`, `res`: `any`, `jsonObj`: `any`, `queryObj`: `any`) => `Promise`<`any`\>
106
+
107
+ #### Type declaration
108
+
109
+ ▸ (`req`, `res`, `jsonObj`, `queryObj`): `Promise`<`any`\>
110
+
111
+ A function that will be executed by the server for authorization. Any value
112
+ returned from this function will be passed to the ServerExecutionFunction.
113
+ If an undefined value is returned, this indicates the server was not able
114
+ to authenticate the user, so the ServerExecutionFunction will not be
115
+ executed.
116
+
117
+ ##### Parameters
118
+
119
+ | Name | Type |
120
+ | :------ | :------ |
121
+ | `req` | `any` |
122
+ | `res` | `any` |
123
+ | `jsonObj` | `any` |
124
+ | `queryObj` | `any` |
125
+
126
+ ##### Returns
127
+
128
+ `Promise`<`any`\>
129
+
130
+ #### Defined in
131
+
132
+ [HotRouteMethod.ts:36](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotRouteMethod.ts#L36)
133
+
134
+ ___
135
+
136
+ ### ServerExecutionFunction
137
+
138
+ Ƭ **ServerExecutionFunction**: (`req`: `any`, `res`: `any`, `authorizedValue`: `any`, `jsonObj`: `any`, `queryObj`: `any`) => `Promise`<`any`\>
139
+
140
+ #### Type declaration
141
+
142
+ ▸ (`req`, `res`, `authorizedValue`, `jsonObj`, `queryObj`): `Promise`<`any`\>
143
+
144
+ A function that will be executed by the server.
145
+
146
+ ##### Parameters
147
+
148
+ | Name | Type |
149
+ | :------ | :------ |
150
+ | `req` | `any` |
151
+ | `res` | `any` |
152
+ | `authorizedValue` | `any` |
153
+ | `jsonObj` | `any` |
154
+ | `queryObj` | `any` |
155
+
156
+ ##### Returns
157
+
158
+ `Promise`<`any`\>
159
+
160
+ #### Defined in
161
+
162
+ [HotRouteMethod.ts:23](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotRouteMethod.ts#L23)
package/package.json ADDED
@@ -0,0 +1,65 @@
1
+ {
2
+ "name": "hotstaq",
3
+ "version": "0.5.24",
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": "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
+ }
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env bash
2
+
3
+ VERSION="3"
4
+
5
+ docker rm -f selenium-hotstaq-tests 2>/dev/null || true
6
+
7
+ docker run --name selenium-hotstaq-tests -d -p 4444:4444 --shm-size="2g" selenium/standalone-chrome:$VERSION
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env bash
2
+
3
+ docker rm -f selenium-hotstaq-tests
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.call (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
+ }