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
package/.eslintignore ADDED
@@ -0,0 +1,17 @@
1
+ db/
2
+
3
+ build/
4
+ build-web/
5
+ builder/
6
+ creator/
7
+ docs/
8
+ node_modules/
9
+ output/
10
+
11
+ client/
12
+ tests/
13
+
14
+ create-test-temp/
15
+
16
+ ./HotSite.json
17
+ ./*.config.js
package/.eslintrc.js ADDED
@@ -0,0 +1,11 @@
1
+ module.exports = {
2
+ root: true,
3
+ parser: '@typescript-eslint/parser',
4
+ plugins: [
5
+ '@typescript-eslint',
6
+ ],
7
+ extends: [
8
+ 'eslint:recommended',
9
+ 'plugin:@typescript-eslint/recommended',
10
+ ],
11
+ };
@@ -0,0 +1,199 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "type": "node",
9
+ "name": "Debug Web Server",
10
+ "program": "${workspaceFolder}/build/src/cli.js",
11
+ "request": "launch",
12
+ "skipFiles": [
13
+ "<node_internals>/**"
14
+ ],
15
+ "outputCapture": "std",
16
+ "args": [
17
+ "run",
18
+ "--web-route",
19
+ "/=${workspaceFolder}",
20
+ "--web-dont-redirect-http-to-https",
21
+ "--web-js-url",
22
+ "/build-web/HotStaq.js",
23
+ "--web-serve-hott-files",
24
+ "--web-http-port",
25
+ "8080"
26
+ ]
27
+ },
28
+ {
29
+ "type": "node",
30
+ "name": "Debug API Server",
31
+ "program": "${workspaceFolder}/build/src/cli.js",
32
+ "request": "launch",
33
+ "skipFiles": [
34
+ "<node_internals>/**"
35
+ ],
36
+ "outputCapture": "std",
37
+ "args": [
38
+ "run",
39
+ "--server-type",
40
+ "api",
41
+ "--api-load",
42
+ "HelloWorldAPI=${workspaceFolder}/build/tests/server/HelloWorldAPI.js",
43
+ "--api-dont-redirect-http-to-https",
44
+ "--api-http-port",
45
+ "8181"
46
+ ]
47
+ },
48
+ {
49
+ "type": "node",
50
+ "name": "Debug Web-API Server",
51
+ "program": "${workspaceFolder}/build/src/cli.js",
52
+ "request": "launch",
53
+ "skipFiles": [
54
+ "<node_internals>/**"
55
+ ],
56
+ "outputCapture": "std",
57
+ "args": [
58
+ "run",
59
+ "--server-type",
60
+ "web-api",
61
+ "--api-load",
62
+ "HelloWorldAPI=${workspaceFolder}/build/tests/server/HelloWorldAPI.js",
63
+ "--web-route",
64
+ "/=${workspaceFolder}",
65
+ "--web-dont-redirect-http-to-https",
66
+ "--web-js-url",
67
+ "/build-web/HotStaq.js",
68
+ "--web-serve-hott-files",
69
+ "--web-http-port",
70
+ "8080",
71
+ "--api-dont-redirect-http-to-https",
72
+ "--api-http-port",
73
+ "8181"
74
+ ]
75
+ },
76
+ {
77
+ "type": "node",
78
+ "name": "Debug Web Server - HotSite",
79
+ "program": "${workspaceFolder}/build/src/cli.js",
80
+ "request": "launch",
81
+ "skipFiles": [
82
+ "<node_internals>/**"
83
+ ],
84
+ "outputCapture": "std",
85
+ "args": [
86
+ "run",
87
+ "--hotsite",
88
+ "./tests/hotsite/HotSite.json",
89
+ "--web-dont-redirect-http-to-https",
90
+ "--web-js-url",
91
+ "/build-web/HotStaq.js",
92
+ "--web-http-port",
93
+ "8080"
94
+ ]
95
+ },
96
+ {
97
+ "type": "node",
98
+ "request": "launch",
99
+ "name": "Debug Web Server - Development",
100
+ "program": "${workspaceFolder}/build/src/cli.js",
101
+ "skipFiles": [
102
+ "<node_internals>/**"
103
+ ],
104
+ "outputCapture": "std",
105
+ "args": [
106
+ "run",
107
+ "--web-dont-redirect-http-to-https",
108
+ "--development-mode",
109
+ "--web-js-url",
110
+ "/build-web/HotStaq.js",
111
+ "--web-serve-hott-files",
112
+ "--web-http-port",
113
+ "8080"
114
+ ]
115
+ },
116
+ {
117
+ "type": "node",
118
+ "request": "launch",
119
+ "name": "Build from HotSite",
120
+ "program": "${workspaceFolder}/build/src/cli.js",
121
+ "skipFiles": [
122
+ "<node_internals>/**"
123
+ ],
124
+ "outputCapture": "std",
125
+ "args": [
126
+ "build",
127
+ "--hotsite",
128
+ "./tests/hotsite/HotSite.json",
129
+ "--docker"
130
+ ]
131
+ },
132
+ {
133
+ "type": "node",
134
+ "request": "launch",
135
+ "name": "Create an App",
136
+ "program": "${workspaceFolder}/build/src/cli.js",
137
+ "cwd": "/home/squigglet/temp2/app",
138
+ "skipFiles": [
139
+ "<node_internals>/**"
140
+ ],
141
+ "outputCapture": "std",
142
+ "args": [
143
+ "create",
144
+ "--overwrite-cmd-create-transpile",
145
+ "npm link hotstaq && npm run build",
146
+ "app"
147
+ ]
148
+ },
149
+ {
150
+ "type": "node",
151
+ "request": "launch",
152
+ "name": "Create an App API",
153
+ "program": "${workspaceFolder}/build/src/cli.js",
154
+ "skipFiles": [
155
+ "<node_internals>/**"
156
+ ],
157
+ "outputCapture": "std",
158
+ "args": [
159
+ "create",
160
+ "--type",
161
+ "api",
162
+ "--overwrite-cmd-create-transpile",
163
+ "npm link hotstaq && npm run build",
164
+ "app"
165
+ ]
166
+ },
167
+ {
168
+ "type": "node",
169
+ "request": "launch",
170
+ "name": "Run Tests",
171
+ "skipFiles": [
172
+ "<node_internals>/**"
173
+ ],
174
+ "program": "${workspaceFolder}/node_modules/mocha/bin/mocha",
175
+ "args": [
176
+ "--timeout", "15",
177
+ "--inspect=127.0.0.1:7478",
178
+ "--colors",
179
+ "./build/tests/db/*.js"
180
+ ],
181
+ "attachSimplePort": 7478,
182
+ "cwd": "${workspaceFolder}",
183
+ "env": {
184
+ "HTTP_PORT": "3123",
185
+ "DATABASE_SERVER": "192.168.1.195",
186
+ "DATABASE_PORT": "3310",
187
+ "DATABASE_USERNAME": "5NKVBAt7OrzrumQyQVs",
188
+ "DATABASE_PASSWORD": "1BBrZbKYRUM7oiMA5oY",
189
+ "DATABASE_SCHEMA": "hotstaq",
190
+ "INFLUX_DATABASE_SERVER": "http://192.168.1.195:8088",
191
+ "INFLUX_DATABASE_USERNAME": "5NKVBAt7OrzrumQyQVs",
192
+ "INFLUX_DATABASE_PASSWORD": "1BBrZbKYRUM7oiMA5oY",
193
+ "INFLUX_DATABASE_ORG": "freelight",
194
+ "INFLUX_DATABASE_TOKEN": "Ife0HerzHrloa32PsE4yg4ixA6j7tZFSMRhvBg7akUK2e",
195
+ "INFLUX_DATABASE_SCHEMA": "hotstaq"
196
+ }
197
+ }
198
+ ]
199
+ }
@@ -0,0 +1,2 @@
1
+ {
2
+ }
@@ -0,0 +1,78 @@
1
+ {
2
+ "version": "2.0.0",
3
+ "tasks": [
4
+ {
5
+ "type": "typescript",
6
+ "tsconfig": "tsconfig.json",
7
+ "option": "watch",
8
+ "problemMatcher": [
9
+ "$tsc-watch"
10
+ ],
11
+ "group": "build",
12
+ "runOptions": {
13
+ "instanceLimit": 1
14
+ },
15
+ "label": "Build"
16
+ },
17
+ {
18
+ "type": "shell",
19
+ "group": "build",
20
+ "runOptions": {
21
+ "instanceLimit": 1
22
+ },
23
+ "problemMatcher": [],
24
+ "label": "Build web debug",
25
+ "command": "npx webpack --mode=development --watch"
26
+ },
27
+ {
28
+ "type": "shell",
29
+ "group": "build",
30
+ "runOptions": {
31
+ "instanceLimit": 1
32
+ },
33
+ "problemMatcher": [],
34
+ "label": "Build web tests",
35
+ "command": "npx webpack --mode=development --config=webpack.config.tests.js --watch"
36
+ },
37
+ {
38
+ "type": "process",
39
+ "group": {
40
+ "kind": "build",
41
+ "isDefault": true
42
+ },
43
+ "runOptions": {
44
+ "instanceLimit": 1,
45
+ "runOn": "folderOpen"
46
+ },
47
+ "problemMatcher": [],
48
+ "label": "Build all",
49
+ "dependsOn": [
50
+ "Build",
51
+ "Build web debug",
52
+ "Build web tests"
53
+ ]
54
+ },
55
+ {
56
+ "type": "process",
57
+ "runOptions": {
58
+ "instanceLimit": 1
59
+ },
60
+ "problemMatcher": [],
61
+ "label": "Run Temp DBs",
62
+ "command": "${workspaceFolder}/dbstart.sh",
63
+ "args": [
64
+ ]
65
+ },
66
+ {
67
+ "type": "process",
68
+ "runOptions": {
69
+ "instanceLimit": 1
70
+ },
71
+ "problemMatcher": [],
72
+ "label": "Stop Temp DBs",
73
+ "command": "${workspaceFolder}/dbstop.sh",
74
+ "args": [
75
+ ]
76
+ }
77
+ ]
78
+ }
@@ -0,0 +1,157 @@
1
+ # Contributing to HotStaq
2
+
3
+ Love HotStaq and want to help? Thanks so much, there's something to do for everybody!
4
+
5
+ Please take a moment to review this document in order to make the contribution process easy and effective for everyone involved.
6
+
7
+ Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should reciprocate that respect in addressing your issue or assessing patches and features.
8
+
9
+ ## Using the issue tracker
10
+
11
+ The [issue tracker](https://github.com/OurFreeLight/HotStaq/issues) is
12
+ the preferred channel for [bug reports](#bugs), [features requests](#features)
13
+ and [submitting pull requests](#pull-requests).
14
+
15
+ <a name="bugs"></a>
16
+
17
+ ## Bug reports
18
+
19
+ A bug is a _demonstrable problem_ that is caused by the code in the repository.
20
+ Good bug reports are extremely helpful - thank you!
21
+
22
+ Guidelines for bug reports:
23
+
24
+ 1. **Use the GitHub issue search** &mdash; check if the issue has already been reported.
25
+
26
+ 2. **Check if the issue has been fixed** &mdash; try to reproduce it using the latest `master` or development branch in the repository.
27
+
28
+ 3. **Isolate the problem** &mdash; ideally create a [reduced test case](https://css-tricks.com/reduced-test-cases/) and a live example.
29
+
30
+ 4. **Use the bug report template** &mdash; please fill in the template which appears when you open a new issue.
31
+
32
+ A good bug report shouldn't leave others needing to chase you up for more information. Please try to be as detailed as possible in your report. What is your environment? What steps will reproduce the issue? What browser(s) and OS
33
+ experience the problem? What would you expect to be the outcome? All these details will help people to fix any potential bugs.
34
+
35
+ Example:
36
+
37
+ > ## Description
38
+ > A clear and concise description of what the bug is.
39
+ >
40
+ > Any other information you want to share that is relevant to the issue being
41
+ > reported. This might include the lines of code that you have identified as
42
+ > causing the bug, and potential solutions (and your opinions on their
43
+ > merits).
44
+ >
45
+ > ## Steps to reproduce
46
+ > Steps to reproduce the behavior:
47
+ >
48
+ > 1. This is the first step
49
+ > 2. This is the second step
50
+ > 3. Further steps, etc.
51
+ >
52
+ > (Add link to a demo on https://jsfiddle.net or similar if possible)
53
+ >
54
+ > **Expected behavior**
55
+ > A clear and concise description of what you expected to happen.
56
+ >
57
+ > **Screenshots**
58
+ > If applicable, add screenshots to help explain your problem.
59
+ >
60
+ > ## Versions
61
+ >
62
+ > - HotStaq:
63
+ > - Node/NPM:
64
+ > - Browser:
65
+
66
+ <a name="features"></a>
67
+
68
+ ## Feature requests
69
+
70
+ Feature requests are welcome. But take a moment to find out whether your idea fits with the scope and aims of the project. It's up to _you_ to make a strong case to convince the project's developers of the merits of this feature. Please provide as many details and as much context as possible.
71
+
72
+ There is also a template for feature requests. Please make sure to use it.
73
+
74
+ <a name="pull-requests"></a>
75
+
76
+ ## Pull requests
77
+
78
+ Good pull requests - patches, improvements, new features - are a fantastic
79
+ help. They should remain focused in scope and avoid containing unrelated
80
+ commits.
81
+
82
+ **Please ask first** before embarking on any significant pull request (e.g.
83
+ implementing features, refactoring code, porting to a different language),
84
+ otherwise you risk spending a lot of time working on something that the
85
+ project's developers might not want to merge into the project.
86
+
87
+ Please adhere to the coding conventions used throughout a project (indentation,
88
+ accurate comments, etc.) and any other requirements (such as test coverage).
89
+
90
+ Since the `master` branch is what people actually use in production, we have a
91
+ `dev` branch that unstable changes get merged into first. Only when we
92
+ consider that stable we merge it into the `master` branch and release the
93
+ changes for real.
94
+
95
+ Adhering to the following process is the best way to get your work
96
+ included in the project:
97
+
98
+ 1. [Fork](https://help.github.com/articles/fork-a-repo/) the project, clone your fork, and configure the remotes:
99
+
100
+ ```bash
101
+ # Clone your fork of the repo into the current directory
102
+ git clone https://github.com/<your-username>/HotStaq.git
103
+ # Navigate to the newly cloned directory
104
+ cd HotStaq
105
+ # Assign the original repo to a remote called "upstream"
106
+ git remote add upstream https://github.com/OurFreeLight/HotStaq.git
107
+ ```
108
+
109
+ 2. If you cloned a while ago, get the latest changes from upstream:
110
+
111
+ ```bash
112
+ git checkout dev
113
+ git pull upstream dev
114
+ ```
115
+
116
+ 3. Create a new topic branch (off the `dev` branch) to contain your feature, change, or fix:
117
+
118
+ ```bash
119
+ git checkout -b <topic-branch-name>
120
+ ```
121
+
122
+ 4. Commit your changes in logical chunks. Please adhere to these [git commit message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) or your code is unlikely be merged into the main project. Use Git's [interactive rebase](https://help.github.com/articles/about-git-rebase/) feature to tidy up your commits before making them public.
123
+
124
+ 5. Locally merge (or rebase) the upstream dev branch into your topic branch:
125
+
126
+ ```bash
127
+ git pull [--rebase] upstream dev
128
+ ```
129
+
130
+ 6. Push your topic branch up to your fork:
131
+
132
+ ```bash
133
+ git push origin <topic-branch-name>
134
+ ```
135
+
136
+ 7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
137
+ with a clear title and description.
138
+
139
+ **IMPORTANT**: By submitting a patch, you agree to allow the project
140
+ owners to license your work under the terms of the [MIT License](https://github.com/OurFreeLight/HotStaq/blob/master/LICENSE.md).
141
+
142
+ # Collaborating guidelines
143
+
144
+ You can find the list of all contributors in [README.md](./README.md).
145
+
146
+ There are few basic rules to ensure high quality of the boilerplate:
147
+
148
+ - Before merging, a PR requires at least two approvals from the collaborators unless it's an architectural change, a large feature, etc. If it is, then at least 50% of the core team have to agree to merge it, with every team member having a full veto right. (i.e. every single one can block any PR)
149
+ - A PR should remain open for at least two days before merging (does not apply for trivial contributions like fixing a typo). This way everyone has enough time to look into it.
150
+
151
+ You are always welcome to discuss and propose improvements to this guideline.
152
+
153
+ # Add yourself as a contributor
154
+
155
+ This project follows the [All Contributors specification](https://allcontributors.org/). To add yourself to the table of contributors in the README file, please use the [bot](https://allcontributors.org/docs/en/bot/overview) or the [CLI](https://allcontributors.org/docs/en/cli/overview) as part of your PR.
156
+
157
+ If you've already added yourself to the list and are making a new type of contribution, you can run it again and select the new contribution type.
package/README.md ADDED
@@ -0,0 +1,126 @@
1
+ # HotStaq
2
+ HotStaq is a client-side HTML preprocessor, with a design similar to that of PHP. Tech stacks have grown in size significantly over the years, and it can be hard for small teams to efficiently utilize all the different tech stacks properly. HotStaq helps reduce the headache of maintaining all the various tech while ensuring the application's security and quality.
3
+
4
+ Developers can quickly create their frontend and backends securely while adding their unit tests along the way in code During development, HotStaq developers know they can generate Dockerfiles to easily deploy their application to Kubernetes or Docker Swarm.
5
+
6
+ For more information, please visit: [HotStaq](https://hotstaq.com)
7
+
8
+ ## Getting started
9
+ First you gotta install like so:
10
+ ```console
11
+ npm -g install hotstaq
12
+ ```
13
+
14
+ Now you can create your project by entering:
15
+ ```console
16
+ hotstaq create my-app
17
+ ```
18
+
19
+ Run the development web server:
20
+
21
+ ```console
22
+ cd my-app
23
+
24
+ hotstaq start
25
+ ```
26
+
27
+ Your site starts at `http://localhost:8080`.
28
+
29
+ Open `public/index.hott` and change your landing page. Refresh your browser to see your changes immediately.
30
+
31
+ That's it!
32
+
33
+ ## Running database tests
34
+ Make sure you have Docker installed, then do:
35
+ ```console
36
+ ./dbstart.sh
37
+ ```
38
+
39
+ This will launch the temporary MariaDB and InfluxDB databases.
40
+
41
+ After testing/debugging you can stop them by entering:
42
+ ```console
43
+ ./dbstop.sh
44
+ ```
45
+
46
+ ## Environment Variables
47
+ You can configure how HotStaq starts by using:
48
+ * DATABASE_TYPE
49
+ * Type: string
50
+ * Description: The type of database to use.
51
+ * Accepted values:
52
+ * mysql
53
+ * influx
54
+ * DATABASE_SERVER
55
+ * Type: string
56
+ * Description: The url to the database server to connect to.
57
+ * Accepted values:
58
+ * MySql example: 127.0.0.1
59
+ * Influx example: http://127.0.0.1:8086
60
+ * DATABASE_PORT
61
+ * Type: number
62
+ * Description: The database port to use.
63
+ * Accepted values:
64
+ * Any integer.
65
+ * DATABASE_USERNAME
66
+ * Type: string
67
+ * Description: The database username to use.
68
+ * Accepted values:
69
+ * Any string.
70
+ * DATABASE_PASSWORD
71
+ * Type: string
72
+ * Description: The database password to use.
73
+ * Accepted values:
74
+ * Any string.
75
+ * DATABASE_ORG
76
+ * Type: string
77
+ * Description: The organization that contains the database. For Influx use.
78
+ * Accepted values:
79
+ * Any string.
80
+ * DATABASE_TOKEN
81
+ * Type: string
82
+ * Description: The database token to use. For Influx use.
83
+ * Accepted values:
84
+ * Any string.
85
+ * DATABASE_SCHEMA
86
+ * Type: string
87
+ * Description: The database schema (or bucket) to use.
88
+ * Accepted values:
89
+ * Any string.
90
+ * SELENIUM_REMOTE_SERVER
91
+ * Type: string
92
+ * Description: The remote selenium server to do web browser tests with.
93
+ * Accepted values:
94
+ * Any valid url.
95
+ * SELENIUM_WINDOW_WIDTH
96
+ * Type: number
97
+ * Description: The width of the new browser window.
98
+ * Accepted values:
99
+ * Any integer.
100
+ * SELENIUM_WINDOW_HEIGHT
101
+ * Type: number
102
+ * Description: The height of the new browser window.
103
+ * Accepted values:
104
+ * Any integer.
105
+ * TESTING_DEVTOOLS
106
+ * Type: number
107
+ * Description: Set to 1 if you want chrome to open the dev tools as browser tests start. This is only for testing.
108
+ * Accepted values:
109
+ * 0
110
+ * 1
111
+ * TESTING_REMOTE_SERVER
112
+ * Type: string
113
+ * Description: The remote server to use during browser tests.
114
+ * Accepted values:
115
+ * Any valid url.
116
+
117
+ ## Developing
118
+ To get started developing you'll need to install:
119
+ ```console
120
+ npm -g install typescript webpack-cli@4 typedoc
121
+ ```
122
+
123
+ To run browser tests, you'll need to have the correct version of [chromedriver](https://chromedriver.chromium.org/) installed for the version of Chrome you are running on your machine.
124
+
125
+ ## Possible Future Compiler
126
+ I'd like to create a CLI tool that compresses the entire public html directory into a zip file which can be downloaded and unzipped during runtime by the client's web browser then display the pages. During the compilation phase it would look for vulnerabilities and report them; for example when embedding JS files, if integrity hashes are missing, it would complain.
package/bin/hotstaq ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+
3
+ require ("../build/src/cli.js");
@@ -0,0 +1 @@
1
+ node ../build/src/cli.js %*