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,118 @@
1
+ build/
2
+ build-web/
3
+
4
+ # Logs
5
+ logs
6
+ *.log
7
+ npm-debug.log*
8
+ yarn-debug.log*
9
+ yarn-error.log*
10
+ lerna-debug.log*
11
+
12
+ # Diagnostic reports (https://nodejs.org/api/report.html)
13
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14
+
15
+ # Runtime data
16
+ pids
17
+ *.pid
18
+ *.seed
19
+ *.pid.lock
20
+
21
+ # Directory for instrumented libs generated by jscoverage/JSCover
22
+ lib-cov
23
+
24
+ # Coverage directory used by tools like istanbul
25
+ coverage
26
+ *.lcov
27
+
28
+ # nyc test coverage
29
+ .nyc_output
30
+
31
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
32
+ .grunt
33
+
34
+ # Bower dependency directory (https://bower.io/)
35
+ bower_components
36
+
37
+ # node-waf configuration
38
+ .lock-wscript
39
+
40
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
41
+ build/Release
42
+
43
+ # Dependency directories
44
+ node_modules/
45
+ jspm_packages/
46
+
47
+ # Snowpack dependency directory (https://snowpack.dev/)
48
+ web_modules/
49
+
50
+ # TypeScript cache
51
+ *.tsbuildinfo
52
+
53
+ # Optional npm cache directory
54
+ .npm
55
+
56
+ # Optional eslint cache
57
+ .eslintcache
58
+
59
+ # Microbundle cache
60
+ .rpt2_cache/
61
+ .rts2_cache_cjs/
62
+ .rts2_cache_es/
63
+ .rts2_cache_umd/
64
+
65
+ # Optional REPL history
66
+ .node_repl_history
67
+
68
+ # Output of 'npm pack'
69
+ *.tgz
70
+
71
+ # Yarn Integrity file
72
+ .yarn-integrity
73
+
74
+ # dotenv environment variables file
75
+ .env
76
+ .env.test
77
+
78
+ # parcel-bundler cache (https://parceljs.org/)
79
+ .cache
80
+ .parcel-cache
81
+
82
+ # Next.js build output
83
+ .next
84
+
85
+ # Nuxt.js build / generate output
86
+ .nuxt
87
+ dist
88
+
89
+ # Gatsby files
90
+ .cache/
91
+ # Comment in the public line in if your project uses Gatsby and not Next.js
92
+ # https://nextjs.org/blog/next-9-1#public-directory-support
93
+ # public
94
+
95
+ # vuepress build output
96
+ .vuepress/dist
97
+
98
+ # Serverless directories
99
+ .serverless/
100
+
101
+ # FuseBox cache
102
+ .fusebox/
103
+
104
+ # DynamoDB Local files
105
+ .dynamodb/
106
+
107
+ # TernJS port file
108
+ .tern-port
109
+
110
+ # Stores VSCode versions used for testing VSCode extensions
111
+ .vscode-test
112
+
113
+ # yarn v2
114
+
115
+ .yarn/cache
116
+ .yarn/unplugged
117
+ .yarn/build-state.yml
118
+ .pnp.*
@@ -0,0 +1,118 @@
1
+ build/
2
+ build-web/
3
+
4
+ # Logs
5
+ logs
6
+ *.log
7
+ npm-debug.log*
8
+ yarn-debug.log*
9
+ yarn-error.log*
10
+ lerna-debug.log*
11
+
12
+ # Diagnostic reports (https://nodejs.org/api/report.html)
13
+ report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14
+
15
+ # Runtime data
16
+ pids
17
+ *.pid
18
+ *.seed
19
+ *.pid.lock
20
+
21
+ # Directory for instrumented libs generated by jscoverage/JSCover
22
+ lib-cov
23
+
24
+ # Coverage directory used by tools like istanbul
25
+ coverage
26
+ *.lcov
27
+
28
+ # nyc test coverage
29
+ .nyc_output
30
+
31
+ # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
32
+ .grunt
33
+
34
+ # Bower dependency directory (https://bower.io/)
35
+ bower_components
36
+
37
+ # node-waf configuration
38
+ .lock-wscript
39
+
40
+ # Compiled binary addons (https://nodejs.org/api/addons.html)
41
+ build/Release
42
+
43
+ # Dependency directories
44
+ node_modules/
45
+ jspm_packages/
46
+
47
+ # Snowpack dependency directory (https://snowpack.dev/)
48
+ web_modules/
49
+
50
+ # TypeScript cache
51
+ *.tsbuildinfo
52
+
53
+ # Optional npm cache directory
54
+ .npm
55
+
56
+ # Optional eslint cache
57
+ .eslintcache
58
+
59
+ # Microbundle cache
60
+ .rpt2_cache/
61
+ .rts2_cache_cjs/
62
+ .rts2_cache_es/
63
+ .rts2_cache_umd/
64
+
65
+ # Optional REPL history
66
+ .node_repl_history
67
+
68
+ # Output of 'npm pack'
69
+ *.tgz
70
+
71
+ # Yarn Integrity file
72
+ .yarn-integrity
73
+
74
+ # dotenv environment variables file
75
+ .env
76
+ .env.test
77
+
78
+ # parcel-bundler cache (https://parceljs.org/)
79
+ .cache
80
+ .parcel-cache
81
+
82
+ # Next.js build output
83
+ .next
84
+
85
+ # Nuxt.js build / generate output
86
+ .nuxt
87
+ dist
88
+
89
+ # Gatsby files
90
+ .cache/
91
+ # Comment in the public line in if your project uses Gatsby and not Next.js
92
+ # https://nextjs.org/blog/next-9-1#public-directory-support
93
+ # public
94
+
95
+ # vuepress build output
96
+ .vuepress/dist
97
+
98
+ # Serverless directories
99
+ .serverless/
100
+
101
+ # FuseBox cache
102
+ .fusebox/
103
+
104
+ # DynamoDB Local files
105
+ .dynamodb/
106
+
107
+ # TernJS port file
108
+ .tern-port
109
+
110
+ # Stores VSCode versions used for testing VSCode extensions
111
+ .vscode-test
112
+
113
+ # yarn v2
114
+
115
+ .yarn/cache
116
+ .yarn/unplugged
117
+ .yarn/build-state.yml
118
+ .pnp.*
@@ -0,0 +1,28 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+ <title>HotStaq site</title>
6
+
7
+ <script type = "text/javascript">
8
+ async function sendMessage ()
9
+ {
10
+ const msg = document.getElementById ("message");
11
+ let msgStr = msg.value;
12
+
13
+ let result = await Hot.apiCall ('/v1/hello_world/echo', { message: msgStr });
14
+ const response = document.getElementById ("response");
15
+ response.value = result;
16
+ }
17
+ </script>
18
+ </head>
19
+
20
+ <body>
21
+ HotStaq API test site! <br />
22
+ Send a message to the Hello World API in this box.<br />
23
+ <textarea id = "message">hi</textarea><button onclick = "sendMessage ();">Send</button><br />
24
+ API response will echo your message here:<br />
25
+ <textarea id = "response"></textarea>
26
+ </body>
27
+
28
+ </html>
@@ -0,0 +1,12 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+
4
+ <head>
5
+ <title>HotStaq site</title>
6
+ </head>
7
+
8
+ <body>
9
+ HotStaq test site!
10
+ </body>
11
+
12
+ </html>
@@ -0,0 +1,30 @@
1
+ import { HotAPI, HotServer, HotClient, HotRoute,
2
+ HotRouteMethod, MySQLSchema,
3
+ ServerAuthorizationFunction, HotStaq } from "hotstaq";
4
+ import { HelloWorld } from "./HelloWorld";
5
+
6
+ /**
7
+ * The App's API and routes.
8
+ */
9
+ export class AppAPI extends HotAPI
10
+ {
11
+ constructor (baseUrl: string, connection: HotServer | HotClient = null, db: any = null)
12
+ {
13
+ super(baseUrl, connection, db);
14
+
15
+ this.onPreRegister = async (): Promise<boolean> =>
16
+ {
17
+ // Setup and connect to the database here.
18
+
19
+ return (true);
20
+ };
21
+ this.onPostRegister = async (): Promise<boolean> =>
22
+ {
23
+ // Sync database tables here.
24
+
25
+ return (true);
26
+ };
27
+
28
+ this.addRoute (new HelloWorld (this));
29
+ }
30
+ }
@@ -0,0 +1,39 @@
1
+ import { HotRoute, HTTPMethod, HotDBMySQL, MySQLSchema, MySQLResults,
2
+ MySQLSchemaTable, MySQLSchemaField, ConnectionStatus, HotStaq,
3
+ HotServer, HotRouteMethod, ServerAuthorizationFunction } from "hotstaq";
4
+ import { AppAPI } from "./AppAPI";
5
+
6
+ /**
7
+ * Hello world route.
8
+ */
9
+ export class HelloWorld extends HotRoute
10
+ {
11
+ constructor (api: AppAPI)
12
+ {
13
+ super (api.connection, "hello_world");
14
+
15
+ this.addMethod (new HotRouteMethod (this, "hi", this._hi,
16
+ HTTPMethod.POST));
17
+ this.addMethod (new HotRouteMethod (this, "echo", this._echo,
18
+ HTTPMethod.POST));
19
+ }
20
+
21
+ /**
22
+ * Say hi.
23
+ */
24
+ protected async _hi (req: any, res: any, authorizedValue: any, jsonObj: any, queryObj: any): Promise<any>
25
+ {
26
+ return ("hello");
27
+ }
28
+
29
+ /**
30
+ * Will echo whatever message the user sends.
31
+ */
32
+ protected async _echo (req: any, res: any, authorizedValue: any, jsonObj: any, queryObj: any): Promise<any>
33
+ {
34
+ if (jsonObj.message == null)
35
+ throw new Error ("No message received!");
36
+
37
+ return (jsonObj.message);
38
+ }
39
+ }
@@ -0,0 +1,7 @@
1
+ import { AppAPI } from "./AppAPI";
2
+ import { HelloWorld } from "./HelloWorld";
3
+
4
+ export {
5
+ AppAPI,
6
+ HelloWorld
7
+ };
@@ -0,0 +1,73 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Basic Options */
4
+ // "incremental": true, /* Enable incremental compilation */
5
+ "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
6
+ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
7
+ "lib": [
8
+ "ES6",
9
+ "DOM"
10
+ ], /* Specify library files to be included in the compilation. */
11
+ // "allowJs": true, /* Allow javascript files to be compiled. */
12
+ // "checkJs": true, /* Report errors in .js files. */
13
+ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
14
+ "declaration": true, /* Generates corresponding '.d.ts' file. */
15
+ "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
16
+ "sourceMap": true, /* Generates corresponding '.map' file. */
17
+ // "outFile": "./", /* Concatenate and emit output to single file. */
18
+ "outDir": "./build/", /* Redirect output structure to the directory. */
19
+ // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
20
+ // "composite": true, /* Enable project compilation */
21
+ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
22
+ // "removeComments": true, /* Do not emit comments to output. */
23
+ // "noEmit": true, /* Do not emit outputs. */
24
+ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
25
+ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
26
+ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
27
+
28
+ /* Strict Type-Checking Options */
29
+ //"strict": true, /* Enable all strict type-checking options. */
30
+ "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
31
+ // "strictNullChecks": true, /* Enable strict null checks. */
32
+ // "strictFunctionTypes": true, /* Enable strict checking of function types. */
33
+ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
34
+ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
35
+ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
36
+ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
37
+
38
+ /* Additional Checks */
39
+ // "noUnusedLocals": true, /* Report errors on unused locals. */
40
+ // "noUnusedParameters": true, /* Report errors on unused parameters. */
41
+ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
42
+ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
43
+
44
+ /* Module Resolution Options */
45
+ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
46
+ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
47
+ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
48
+ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
49
+ // "typeRoots": [], /* List of folders to include type definitions from. */
50
+ // "types": [], /* Type declaration files to be included in compilation. */
51
+ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
52
+ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
53
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
54
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
55
+
56
+ /* Source Map Options */
57
+ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
58
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
59
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
60
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
61
+
62
+ /* Experimental Options */
63
+ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
64
+ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
65
+ },
66
+ "include": [
67
+ "./src/",
68
+ "./tests/"
69
+ ],
70
+ "exclude": [
71
+ "./node_modules/"
72
+ ]
73
+ }
@@ -0,0 +1,73 @@
1
+ {
2
+ "compilerOptions": {
3
+ /* Basic Options */
4
+ // "incremental": true, /* Enable incremental compilation */
5
+ "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */
6
+ "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
7
+ "lib": [
8
+ "ES6",
9
+ "DOM"
10
+ ], /* Specify library files to be included in the compilation. */
11
+ // "allowJs": true, /* Allow javascript files to be compiled. */
12
+ // "checkJs": true, /* Report errors in .js files. */
13
+ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
14
+ "declaration": true, /* Generates corresponding '.d.ts' file. */
15
+ "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
16
+ "sourceMap": true, /* Generates corresponding '.map' file. */
17
+ // "outFile": "./", /* Concatenate and emit output to single file. */
18
+ "outDir": "./build/", /* Redirect output structure to the directory. */
19
+ // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
20
+ // "composite": true, /* Enable project compilation */
21
+ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
22
+ // "removeComments": true, /* Do not emit comments to output. */
23
+ // "noEmit": true, /* Do not emit outputs. */
24
+ // "importHelpers": true, /* Import emit helpers from 'tslib'. */
25
+ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
26
+ // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
27
+
28
+ /* Strict Type-Checking Options */
29
+ //"strict": true, /* Enable all strict type-checking options. */
30
+ "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
31
+ // "strictNullChecks": true, /* Enable strict null checks. */
32
+ // "strictFunctionTypes": true, /* Enable strict checking of function types. */
33
+ // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
34
+ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
35
+ // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
36
+ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
37
+
38
+ /* Additional Checks */
39
+ // "noUnusedLocals": true, /* Report errors on unused locals. */
40
+ // "noUnusedParameters": true, /* Report errors on unused parameters. */
41
+ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
42
+ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
43
+
44
+ /* Module Resolution Options */
45
+ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
46
+ // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
47
+ // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
48
+ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
49
+ // "typeRoots": [], /* List of folders to include type definitions from. */
50
+ // "types": [], /* Type declaration files to be included in compilation. */
51
+ // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
52
+ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
53
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
54
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
55
+
56
+ /* Source Map Options */
57
+ // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
58
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
59
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
60
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
61
+
62
+ /* Experimental Options */
63
+ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
64
+ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
65
+ },
66
+ "include": [
67
+ "./src/",
68
+ "./tests/"
69
+ ],
70
+ "exclude": [
71
+ "./node_modules/"
72
+ ]
73
+ }
@@ -0,0 +1,57 @@
1
+ const webpack = require ("webpack");
2
+ const CopyPlugin = require ("copy-webpack-plugin");
3
+
4
+ const fs = require ("fs");
5
+ const ppath = require ("path");
6
+
7
+ const packageStr = fs.readFileSync (process.cwd () + "/package.json").toString ();
8
+ const packageJSON = JSON.parse (packageStr);
9
+ let packageVersion = packageJSON.version.toString ();
10
+
11
+ module.exports = {
12
+ entry: "./src/WebExport.ts",
13
+ devtool: "inline-source-map",
14
+ target: "web",
15
+ module: {
16
+ rules: [{
17
+ test: new RegExp ("\.tsx?$"),
18
+ use: [{
19
+ loader: "ts-loader",
20
+ options: {
21
+ transpileOnly: true,
22
+ configFile: "tsconfig-web.json"
23
+ }
24
+ }],
25
+ exclude: /node_modules/
26
+ }]
27
+ },
28
+ plugins: [
29
+ new webpack.DefinePlugin ({
30
+ __VERSION__: `\"${packageVersion}\"`
31
+ }),
32
+ new CopyPlugin ({
33
+ patterns: [
34
+ { from: `${process.cwd ()}/build-web/${APPNAME}.js`,
35
+ to: `${process.cwd ()}/public/js/${APPNAME}.js` }
36
+ ]
37
+ })
38
+ ],
39
+ resolve: {
40
+ extensions: [".tsx", ".ts", ".js"]
41
+ },
42
+ node: {
43
+ fs: "empty",
44
+ crypto: "empty",
45
+ stream: "empty",
46
+ Utils: "empty"
47
+ },
48
+ externals: {
49
+ hotstaq: "HotStaqWeb"
50
+ },
51
+ output: {
52
+ filename: "${APPNAME}.js",
53
+ path: ppath.resolve (process.cwd (), "build-web"),
54
+ library: "${APPNAME}Web",
55
+ libraryTarget: "umd"
56
+ }
57
+ };
package/dbstart.sh ADDED
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env bash
2
+
3
+ RUN_DAEMON="-d"
4
+ MARIADB_DB_PORT=3310
5
+ INFLUX_DB_PORT=8088
6
+
7
+ RUN_DAEMON_OPT=$1
8
+
9
+ if [ "$RUN_DAEMON_OPT" == "no-daemon" ]; then
10
+ RUN_DAEMON=""
11
+ fi
12
+
13
+ docker rm -f mariadb-hotstaq-tests 2>/dev/null || true
14
+ docker rm -f influxdb-hotstaq-tests 2>/dev/null || true
15
+
16
+ docker run ${RUN_DAEMON} --name="mariadb-hotstaq-tests" -p ${MARIADB_DB_PORT}:3306 -e MYSQL_ROOT_PASSWORD=cdO1KjwiC8ksOqCV1s0 -e MYSQL_DATABASE=hotstaq -e MYSQL_USER=5NKVBAt7OrzrumQyQVs -e MYSQL_PASSWORD=1BBrZbKYRUM7oiMA5oY mariadb:10.6
17
+
18
+ docker run ${RUN_DAEMON} --name="influxdb-hotstaq-tests" -p ${INFLUX_DB_PORT}:8086 -e DOCKER_INFLUXDB_INIT_MODE=setup -e DOCKER_INFLUXDB_INIT_ORG=freelight -e DOCKER_INFLUXDB_INIT_BUCKET=hotstaq -e DOCKER_INFLUXDB_INIT_USERNAME=5NKVBAt7OrzrumQyQVs -e DOCKER_INFLUXDB_INIT_PASSWORD=1BBrZbKYRUM7oiMA5oY -e DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=Ife0HerzHrloa32PsE4yg4ixA6j7tZFSMRhvBg7akUK2e influxdb:2.0
19
+ sleep 5
package/dbstop.sh ADDED
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env bash
2
+
3
+ docker rm -f mariadb-hotstaq-tests
4
+ docker rm -f influxdb-hotstaq-tests
package/docs/.nojekyll ADDED
@@ -0,0 +1 @@
1
+ TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.