hotstaq 0.5.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +17 -0
- package/.eslintrc.js +11 -0
- package/.vscode/launch.json +199 -0
- package/.vscode/settings.json +2 -0
- package/.vscode/tasks.json +78 -0
- package/CONTRIBUTING.md +157 -0
- package/README.md +126 -0
- package/bin/hotstaq +3 -0
- package/bin/hotstaq.cmd +1 -0
- package/build/src/Hot.d.ts +167 -0
- package/build/src/Hot.d.ts.map +1 -0
- package/build/src/Hot.js +365 -0
- package/build/src/Hot.js.map +1 -0
- package/build/src/HotAPI.d.ts +130 -0
- package/build/src/HotAPI.d.ts.map +1 -0
- package/build/src/HotAPI.js +353 -0
- package/build/src/HotAPI.js.map +1 -0
- package/build/src/HotAgentAPI.d.ts +22 -0
- package/build/src/HotAgentAPI.d.ts.map +1 -0
- package/build/src/HotAgentAPI.js +85 -0
- package/build/src/HotAgentAPI.js.map +1 -0
- package/build/src/HotAgentRoute.d.ts +17 -0
- package/build/src/HotAgentRoute.d.ts.map +1 -0
- package/build/src/HotAgentRoute.js +109 -0
- package/build/src/HotAgentRoute.js.map +1 -0
- package/build/src/HotBuilder.d.ts +52 -0
- package/build/src/HotBuilder.d.ts.map +1 -0
- package/build/src/HotBuilder.js +239 -0
- package/build/src/HotBuilder.js.map +1 -0
- package/build/src/HotClient.d.ts +31 -0
- package/build/src/HotClient.d.ts.map +1 -0
- package/build/src/HotClient.js +19 -0
- package/build/src/HotClient.js.map +1 -0
- package/build/src/HotComponent.d.ts +118 -0
- package/build/src/HotComponent.d.ts.map +1 -0
- package/build/src/HotComponent.js +89 -0
- package/build/src/HotComponent.js.map +1 -0
- package/build/src/HotCreator.d.ts +92 -0
- package/build/src/HotCreator.d.ts.map +1 -0
- package/build/src/HotCreator.js +465 -0
- package/build/src/HotCreator.js.map +1 -0
- package/build/src/HotDB.d.ts +69 -0
- package/build/src/HotDB.d.ts.map +1 -0
- package/build/src/HotDB.js +29 -0
- package/build/src/HotDB.js.map +1 -0
- package/build/src/HotDBConnectionInterface.d.ts +40 -0
- package/build/src/HotDBConnectionInterface.d.ts.map +1 -0
- package/build/src/HotDBConnectionInterface.js +3 -0
- package/build/src/HotDBConnectionInterface.js.map +1 -0
- package/build/src/HotFile.d.ts +134 -0
- package/build/src/HotFile.d.ts.map +1 -0
- package/build/src/HotFile.js +454 -0
- package/build/src/HotFile.js.map +1 -0
- package/build/src/HotHTTPServer.d.ts +162 -0
- package/build/src/HotHTTPServer.d.ts.map +1 -0
- package/build/src/HotHTTPServer.js +863 -0
- package/build/src/HotHTTPServer.js.map +1 -0
- package/build/src/HotIO.d.ts +39 -0
- package/build/src/HotIO.d.ts.map +1 -0
- package/build/src/HotIO.js +195 -0
- package/build/src/HotIO.js.map +1 -0
- package/build/src/HotLog.d.ts +60 -0
- package/build/src/HotLog.d.ts.map +1 -0
- package/build/src/HotLog.js +126 -0
- package/build/src/HotLog.js.map +1 -0
- package/build/src/HotPage.d.ts +125 -0
- package/build/src/HotPage.d.ts.map +1 -0
- package/build/src/HotPage.js +178 -0
- package/build/src/HotPage.js.map +1 -0
- package/build/src/HotRoute.d.ts +82 -0
- package/build/src/HotRoute.d.ts.map +1 -0
- package/build/src/HotRoute.js +83 -0
- package/build/src/HotRoute.js.map +1 -0
- package/build/src/HotRouteMethod.d.ts +129 -0
- package/build/src/HotRouteMethod.d.ts.map +1 -0
- package/build/src/HotRouteMethod.js +84 -0
- package/build/src/HotRouteMethod.js.map +1 -0
- package/build/src/HotServer.d.ts +152 -0
- package/build/src/HotServer.d.ts.map +1 -0
- package/build/src/HotServer.js +109 -0
- package/build/src/HotServer.js.map +1 -0
- package/build/src/HotSetAsWeb.d.ts +2 -0
- package/build/src/HotSetAsWeb.d.ts.map +1 -0
- package/build/src/HotSetAsWeb.js +5 -0
- package/build/src/HotSetAsWeb.js.map +1 -0
- package/build/src/HotStaq.d.ts +601 -0
- package/build/src/HotStaq.d.ts.map +1 -0
- package/build/src/HotStaq.js +1258 -0
- package/build/src/HotStaq.js.map +1 -0
- package/build/src/HotStaqWeb.d.ts +18 -0
- package/build/src/HotStaqWeb.d.ts.map +1 -0
- package/build/src/HotStaqWeb.js +44 -0
- package/build/src/HotStaqWeb.js.map +1 -0
- package/build/src/HotTestDriver.d.ts +63 -0
- package/build/src/HotTestDriver.d.ts.map +1 -0
- package/build/src/HotTestDriver.js +187 -0
- package/build/src/HotTestDriver.js.map +1 -0
- package/build/src/HotTestElement.d.ts +71 -0
- package/build/src/HotTestElement.d.ts.map +1 -0
- package/build/src/HotTestElement.js +37 -0
- package/build/src/HotTestElement.js.map +1 -0
- package/build/src/HotTestMap.d.ts +83 -0
- package/build/src/HotTestMap.d.ts.map +1 -0
- package/build/src/HotTestMap.js +58 -0
- package/build/src/HotTestMap.js.map +1 -0
- package/build/src/HotTestSeleniumDriver.d.ts +82 -0
- package/build/src/HotTestSeleniumDriver.d.ts.map +1 -0
- package/build/src/HotTestSeleniumDriver.js +398 -0
- package/build/src/HotTestSeleniumDriver.js.map +1 -0
- package/build/src/HotTester.d.ts +188 -0
- package/build/src/HotTester.d.ts.map +1 -0
- package/build/src/HotTester.js +623 -0
- package/build/src/HotTester.js.map +1 -0
- package/build/src/HotTesterAPI.d.ts +15 -0
- package/build/src/HotTesterAPI.d.ts.map +1 -0
- package/build/src/HotTesterAPI.js +161 -0
- package/build/src/HotTesterAPI.js.map +1 -0
- package/build/src/HotTesterMocha.d.ts +50 -0
- package/build/src/HotTesterMocha.d.ts.map +1 -0
- package/build/src/HotTesterMocha.js +205 -0
- package/build/src/HotTesterMocha.js.map +1 -0
- package/build/src/HotTesterMochaSelenium.d.ts +70 -0
- package/build/src/HotTesterMochaSelenium.d.ts.map +1 -0
- package/build/src/HotTesterMochaSelenium.js +257 -0
- package/build/src/HotTesterMochaSelenium.js.map +1 -0
- package/build/src/HotTesterServer.d.ts +114 -0
- package/build/src/HotTesterServer.d.ts.map +1 -0
- package/build/src/HotTesterServer.js +575 -0
- package/build/src/HotTesterServer.js.map +1 -0
- package/build/src/api.d.ts +33 -0
- package/build/src/api.d.ts.map +1 -0
- package/build/src/api.js +78 -0
- package/build/src/api.js.map +1 -0
- package/build/src/cli.d.ts +2 -0
- package/build/src/cli.d.ts.map +1 -0
- package/build/src/cli.js +935 -0
- package/build/src/cli.js.map +1 -0
- package/build/src/schemas/HotDBInflux.d.ts +63 -0
- package/build/src/schemas/HotDBInflux.d.ts.map +1 -0
- package/build/src/schemas/HotDBInflux.js +239 -0
- package/build/src/schemas/HotDBInflux.js.map +1 -0
- package/build/src/schemas/HotDBMigration.d.ts +19 -0
- package/build/src/schemas/HotDBMigration.d.ts.map +1 -0
- package/build/src/schemas/HotDBMigration.js +15 -0
- package/build/src/schemas/HotDBMigration.js.map +1 -0
- package/build/src/schemas/HotDBMySQL.d.ts +65 -0
- package/build/src/schemas/HotDBMySQL.d.ts.map +1 -0
- package/build/src/schemas/HotDBMySQL.js +387 -0
- package/build/src/schemas/HotDBMySQL.js.map +1 -0
- package/build/src/schemas/HotDBSchema.d.ts +15 -0
- package/build/src/schemas/HotDBSchema.d.ts.map +1 -0
- package/build/src/schemas/HotDBSchema.js +19 -0
- package/build/src/schemas/HotDBSchema.js.map +1 -0
- package/build/src/schemas/influx/InfluxSchema.d.ts +14 -0
- package/build/src/schemas/influx/InfluxSchema.d.ts.map +1 -0
- package/build/src/schemas/influx/InfluxSchema.js +33 -0
- package/build/src/schemas/influx/InfluxSchema.js.map +1 -0
- package/build/src/schemas/mysql/MySQLSchema.d.ts +39 -0
- package/build/src/schemas/mysql/MySQLSchema.d.ts.map +1 -0
- package/build/src/schemas/mysql/MySQLSchema.js +151 -0
- package/build/src/schemas/mysql/MySQLSchema.js.map +1 -0
- package/build/src/schemas/mysql/MySQLSchemaField.d.ts +168 -0
- package/build/src/schemas/mysql/MySQLSchemaField.d.ts.map +1 -0
- package/build/src/schemas/mysql/MySQLSchemaField.js +260 -0
- package/build/src/schemas/mysql/MySQLSchemaField.js.map +1 -0
- package/build/src/schemas/mysql/MySQLSchemaTable.d.ts +49 -0
- package/build/src/schemas/mysql/MySQLSchemaTable.d.ts.map +1 -0
- package/build/src/schemas/mysql/MySQLSchemaTable.js +310 -0
- package/build/src/schemas/mysql/MySQLSchemaTable.js.map +1 -0
- package/build-web/HotStaq.js +2 -0
- package/build-web/HotStaq.min.js +125 -0
- package/builder/docker/Dockerfile.linux.gen +42 -0
- package/builder/docker/README.md +36 -0
- package/builder/docker/app/start.sh +8 -0
- package/builder/docker/dockerignore +3 -0
- package/builder/docker/scripts/build.bat +11 -0
- package/builder/docker/scripts/build.sh +11 -0
- package/builder/docker/scripts/start-app.bat +7 -0
- package/builder/docker/scripts/start-app.sh +7 -0
- package/builder/docker/scripts/stop-app.bat +5 -0
- package/builder/docker/scripts/stop-app.sh +5 -0
- package/builder/docker-compose/docker-compose.gen.yaml +41 -0
- package/builder/docker-compose/env-skeleton +4 -0
- package/creator/project/.vscode/launch.json +59 -0
- package/creator/project/README.md +20 -0
- package/creator/project/gitignore +118 -0
- package/creator/project/npmignore +118 -0
- package/creator/public/api-test.hott +28 -0
- package/creator/public/index.hott +12 -0
- package/creator/ts/src/AppAPI.ts +30 -0
- package/creator/ts/src/HelloWorld.ts +39 -0
- package/creator/ts/src/WebExport.ts +7 -0
- package/creator/ts/tsconfig-web.json +73 -0
- package/creator/ts/tsconfig.json +73 -0
- package/creator/ts/webpack-api.config.js +57 -0
- package/dbstart.sh +19 -0
- package/dbstop.sh +4 -0
- package/docs/.nojekyll +1 -0
- package/docs/README.md +128 -0
- package/docs/classes/Hot.md +477 -0
- package/docs/classes/HotAPI.md +369 -0
- package/docs/classes/HotClient.md +95 -0
- package/docs/classes/HotComponent.md +279 -0
- package/docs/classes/HotDB.md +247 -0
- package/docs/classes/HotDBInflux.md +404 -0
- package/docs/classes/HotDBMigration.md +80 -0
- package/docs/classes/HotDBMySQL.md +310 -0
- package/docs/classes/HotDBSchema.md +51 -0
- package/docs/classes/HotFile.md +353 -0
- package/docs/classes/HotHTTPServer.md +700 -0
- package/docs/classes/HotLog.md +162 -0
- package/docs/classes/HotPage.md +357 -0
- package/docs/classes/HotRoute.md +312 -0
- package/docs/classes/HotRouteMethod.md +271 -0
- package/docs/classes/HotServer.md +311 -0
- package/docs/classes/HotStaq.md +1153 -0
- package/docs/classes/HotTestDestination.md +58 -0
- package/docs/classes/HotTestDriver.md +332 -0
- package/docs/classes/HotTestElement.md +88 -0
- package/docs/classes/HotTestElementOptions.md +71 -0
- package/docs/classes/HotTestMap.md +92 -0
- package/docs/classes/HotTestSeleniumDriver.md +529 -0
- package/docs/classes/HotTester.md +653 -0
- package/docs/classes/HotTesterAPI.md +493 -0
- package/docs/classes/HotTesterMocha.md +843 -0
- package/docs/classes/HotTesterMochaSelenium.md +896 -0
- package/docs/classes/HotTesterServer.md +633 -0
- package/docs/classes/InfluxSchema.md +74 -0
- package/docs/classes/MySQLSchema.md +199 -0
- package/docs/classes/MySQLSchemaField.md +330 -0
- package/docs/classes/MySQLSchemaTable.md +176 -0
- package/docs/enums/ConnectionStatus.md +43 -0
- package/docs/enums/DeveloperMode.md +38 -0
- package/docs/enums/EventExecutionType.md +43 -0
- package/docs/enums/HTTPMethod.md +32 -0
- package/docs/enums/HotDBGenerationType.md +30 -0
- package/docs/enums/HotLogLevel.md +88 -0
- package/docs/interfaces/HotDBConnectionInterface.md +116 -0
- package/docs/interfaces/HotDestination.md +62 -0
- package/docs/interfaces/HotSite.md +187 -0
- package/docs/interfaces/HotSiteMapPath.md +37 -0
- package/docs/interfaces/HotSiteRoute.md +79 -0
- package/docs/interfaces/HotStartOptions.md +115 -0
- package/docs/interfaces/HotTestPage.md +44 -0
- package/docs/interfaces/HotTestStop.md +62 -0
- package/docs/interfaces/IHotComponent.md +135 -0
- package/docs/interfaces/IHotStaq.md +118 -0
- package/docs/interfaces/IHotTestElement.md +54 -0
- package/docs/interfaces/IHotTestElementOptions.md +43 -0
- package/docs/interfaces/MySQLResults.md +43 -0
- package/docs/interfaces/MySQLSchemaFieldResult.md +75 -0
- package/docs/modules.md +162 -0
- package/package.json +65 -0
- package/selenium-start.sh +7 -0
- package/selenium-stop.sh +3 -0
- package/src/Hot.ts +319 -0
- package/src/HotAPI.ts +378 -0
- package/src/HotAgentAPI.ts +43 -0
- package/src/HotAgentRoute.ts +44 -0
- package/src/HotBuilder.ts +221 -0
- package/src/HotClient.ts +40 -0
- package/src/HotComponent.ts +158 -0
- package/src/HotCreator.ts +482 -0
- package/src/HotDB.ts +79 -0
- package/src/HotDBConnectionInterface.ts +40 -0
- package/src/HotFile.ts +617 -0
- package/src/HotHTTPServer.ts +954 -0
- package/src/HotIO.ts +128 -0
- package/src/HotLog.ts +158 -0
- package/src/HotPage.ts +206 -0
- package/src/HotRoute.ts +137 -0
- package/src/HotRouteMethod.ts +216 -0
- package/src/HotServer.ts +211 -0
- package/src/HotSetAsWeb.ts +3 -0
- package/src/HotStaq.ts +1877 -0
- package/src/HotStaqWeb.ts +59 -0
- package/src/HotTestDriver.ts +172 -0
- package/src/HotTestElement.ts +97 -0
- package/src/HotTestMap.ts +130 -0
- package/src/HotTestSeleniumDriver.ts +374 -0
- package/src/HotTester.ts +697 -0
- package/src/HotTesterAPI.ts +126 -0
- package/src/HotTesterMocha.ts +133 -0
- package/src/HotTesterMochaSelenium.ts +189 -0
- package/src/HotTesterServer.ts +551 -0
- package/src/api.ts +102 -0
- package/src/cli.ts +1147 -0
- package/src/schemas/HotDBInflux.ts +211 -0
- package/src/schemas/HotDBMigration.ts +24 -0
- package/src/schemas/HotDBMySQL.ts +312 -0
- package/src/schemas/HotDBSchema.ts +21 -0
- package/src/schemas/influx/InfluxSchema.ts +19 -0
- package/src/schemas/mysql/MySQLSchema.ts +90 -0
- package/src/schemas/mysql/MySQLSchemaField.ts +408 -0
- package/src/schemas/mysql/MySQLSchemaTable.ts +353 -0
- package/tsconfig-web.json +74 -0
- package/tsconfig.json +73 -0
- package/webpack.config.js +51 -0
- package/webpack.config.tests.js +56 -0
package/.eslintignore
ADDED
package/.eslintrc.js
ADDED
|
@@ -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,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
|
+
}
|
package/CONTRIBUTING.md
ADDED
|
@@ -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** — check if the issue has already been reported.
|
|
25
|
+
|
|
26
|
+
2. **Check if the issue has been fixed** — try to reproduce it using the latest `master` or development branch in the repository.
|
|
27
|
+
|
|
28
|
+
3. **Isolate the problem** — 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** — 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
package/bin/hotstaq.cmd
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
node ../build/src/cli.js %*
|