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
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
[hotstaq](../README.md) / [Modules](../modules.md) / HotComponent
|
|
2
|
+
|
|
3
|
+
# Class: HotComponent
|
|
4
|
+
|
|
5
|
+
A component to preprocess.
|
|
6
|
+
|
|
7
|
+
## Implements
|
|
8
|
+
|
|
9
|
+
- [`IHotComponent`](../interfaces/IHotComponent.md)
|
|
10
|
+
|
|
11
|
+
## Table of contents
|
|
12
|
+
|
|
13
|
+
### Constructors
|
|
14
|
+
|
|
15
|
+
- [constructor](HotComponent.md#constructor)
|
|
16
|
+
|
|
17
|
+
### Properties
|
|
18
|
+
|
|
19
|
+
- [api](HotComponent.md#api)
|
|
20
|
+
- [elementOptions](HotComponent.md#elementoptions)
|
|
21
|
+
- [events](HotComponent.md#events)
|
|
22
|
+
- [htmlElement](HotComponent.md#htmlelement)
|
|
23
|
+
- [name](HotComponent.md#name)
|
|
24
|
+
- [processor](HotComponent.md#processor)
|
|
25
|
+
- [tag](HotComponent.md#tag)
|
|
26
|
+
- [type](HotComponent.md#type)
|
|
27
|
+
- [value](HotComponent.md#value)
|
|
28
|
+
|
|
29
|
+
### Methods
|
|
30
|
+
|
|
31
|
+
- [click](HotComponent.md#click)
|
|
32
|
+
- [handleAttributes](HotComponent.md#handleattributes)
|
|
33
|
+
- [onCreated](HotComponent.md#oncreated)
|
|
34
|
+
- [output](HotComponent.md#output)
|
|
35
|
+
|
|
36
|
+
## Constructors
|
|
37
|
+
|
|
38
|
+
### constructor
|
|
39
|
+
|
|
40
|
+
• **new HotComponent**(`copy`, `api?`)
|
|
41
|
+
|
|
42
|
+
#### Parameters
|
|
43
|
+
|
|
44
|
+
| Name | Type | Default value |
|
|
45
|
+
| :------ | :------ | :------ |
|
|
46
|
+
| `copy` | [`HotStaq`](HotStaq.md) \| [`IHotComponent`](../interfaces/IHotComponent.md) | `undefined` |
|
|
47
|
+
| `api` | [`HotAPI`](HotAPI.md) | `null` |
|
|
48
|
+
|
|
49
|
+
#### Defined in
|
|
50
|
+
|
|
51
|
+
[HotComponent.ts:101](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotComponent.ts#L101)
|
|
52
|
+
|
|
53
|
+
## Properties
|
|
54
|
+
|
|
55
|
+
### api
|
|
56
|
+
|
|
57
|
+
• **api**: [`HotAPI`](HotAPI.md)
|
|
58
|
+
|
|
59
|
+
The connected API.
|
|
60
|
+
|
|
61
|
+
#### Implementation of
|
|
62
|
+
|
|
63
|
+
[IHotComponent](../interfaces/IHotComponent.md).[api](../interfaces/IHotComponent.md#api)
|
|
64
|
+
|
|
65
|
+
#### Defined in
|
|
66
|
+
|
|
67
|
+
[HotComponent.ts:77](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotComponent.ts#L77)
|
|
68
|
+
|
|
69
|
+
___
|
|
70
|
+
|
|
71
|
+
### elementOptions
|
|
72
|
+
|
|
73
|
+
• **elementOptions**: `ElementDefinitionOptions`
|
|
74
|
+
|
|
75
|
+
The options to include with registering this component.
|
|
76
|
+
|
|
77
|
+
#### Implementation of
|
|
78
|
+
|
|
79
|
+
[IHotComponent](../interfaces/IHotComponent.md).[elementOptions](../interfaces/IHotComponent.md#elementoptions)
|
|
80
|
+
|
|
81
|
+
#### Defined in
|
|
82
|
+
|
|
83
|
+
[HotComponent.ts:81](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotComponent.ts#L81)
|
|
84
|
+
|
|
85
|
+
___
|
|
86
|
+
|
|
87
|
+
### events
|
|
88
|
+
|
|
89
|
+
• **events**: `Object`
|
|
90
|
+
|
|
91
|
+
The events to trigger.
|
|
92
|
+
|
|
93
|
+
#### Index signature
|
|
94
|
+
|
|
95
|
+
▪ [name: `string`]: { `func`: `Function` ; `options`: `any` ; `type`: `string` }
|
|
96
|
+
|
|
97
|
+
#### Implementation of
|
|
98
|
+
|
|
99
|
+
[IHotComponent](../interfaces/IHotComponent.md).[events](../interfaces/IHotComponent.md#events)
|
|
100
|
+
|
|
101
|
+
#### Defined in
|
|
102
|
+
|
|
103
|
+
[HotComponent.ts:93](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotComponent.ts#L93)
|
|
104
|
+
|
|
105
|
+
___
|
|
106
|
+
|
|
107
|
+
### htmlElement
|
|
108
|
+
|
|
109
|
+
• **htmlElement**: `HTMLElement`
|
|
110
|
+
|
|
111
|
+
The associated HTMLElement.
|
|
112
|
+
|
|
113
|
+
#### Implementation of
|
|
114
|
+
|
|
115
|
+
[IHotComponent](../interfaces/IHotComponent.md).[htmlElement](../interfaces/IHotComponent.md#htmlelement)
|
|
116
|
+
|
|
117
|
+
#### Defined in
|
|
118
|
+
|
|
119
|
+
[HotComponent.ts:65](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotComponent.ts#L65)
|
|
120
|
+
|
|
121
|
+
___
|
|
122
|
+
|
|
123
|
+
### name
|
|
124
|
+
|
|
125
|
+
• **name**: `string`
|
|
126
|
+
|
|
127
|
+
The name of the component.
|
|
128
|
+
|
|
129
|
+
#### Implementation of
|
|
130
|
+
|
|
131
|
+
[IHotComponent](../interfaces/IHotComponent.md).[name](../interfaces/IHotComponent.md#name)
|
|
132
|
+
|
|
133
|
+
#### Defined in
|
|
134
|
+
|
|
135
|
+
[HotComponent.ts:69](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotComponent.ts#L69)
|
|
136
|
+
|
|
137
|
+
___
|
|
138
|
+
|
|
139
|
+
### processor
|
|
140
|
+
|
|
141
|
+
• **processor**: [`HotStaq`](HotStaq.md)
|
|
142
|
+
|
|
143
|
+
The processor to use.
|
|
144
|
+
|
|
145
|
+
#### Implementation of
|
|
146
|
+
|
|
147
|
+
[IHotComponent](../interfaces/IHotComponent.md).[processor](../interfaces/IHotComponent.md#processor)
|
|
148
|
+
|
|
149
|
+
#### Defined in
|
|
150
|
+
|
|
151
|
+
[HotComponent.ts:61](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotComponent.ts#L61)
|
|
152
|
+
|
|
153
|
+
___
|
|
154
|
+
|
|
155
|
+
### tag
|
|
156
|
+
|
|
157
|
+
• **tag**: `string`
|
|
158
|
+
|
|
159
|
+
The name of the tag.
|
|
160
|
+
|
|
161
|
+
#### Implementation of
|
|
162
|
+
|
|
163
|
+
[IHotComponent](../interfaces/IHotComponent.md).[tag](../interfaces/IHotComponent.md#tag)
|
|
164
|
+
|
|
165
|
+
#### Defined in
|
|
166
|
+
|
|
167
|
+
[HotComponent.ts:73](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotComponent.ts#L73)
|
|
168
|
+
|
|
169
|
+
___
|
|
170
|
+
|
|
171
|
+
### type
|
|
172
|
+
|
|
173
|
+
• **type**: `string`
|
|
174
|
+
|
|
175
|
+
The type of component.
|
|
176
|
+
|
|
177
|
+
#### Implementation of
|
|
178
|
+
|
|
179
|
+
[IHotComponent](../interfaces/IHotComponent.md).[type](../interfaces/IHotComponent.md#type)
|
|
180
|
+
|
|
181
|
+
#### Defined in
|
|
182
|
+
|
|
183
|
+
[HotComponent.ts:85](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotComponent.ts#L85)
|
|
184
|
+
|
|
185
|
+
___
|
|
186
|
+
|
|
187
|
+
### value
|
|
188
|
+
|
|
189
|
+
• **value**: `any`
|
|
190
|
+
|
|
191
|
+
The value of the component.
|
|
192
|
+
|
|
193
|
+
#### Implementation of
|
|
194
|
+
|
|
195
|
+
[IHotComponent](../interfaces/IHotComponent.md).[value](../interfaces/IHotComponent.md#value)
|
|
196
|
+
|
|
197
|
+
#### Defined in
|
|
198
|
+
|
|
199
|
+
[HotComponent.ts:89](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotComponent.ts#L89)
|
|
200
|
+
|
|
201
|
+
## Methods
|
|
202
|
+
|
|
203
|
+
### click
|
|
204
|
+
|
|
205
|
+
▸ `Abstract` **click**(): `Promise`<`void`\>
|
|
206
|
+
|
|
207
|
+
Handle a click event.
|
|
208
|
+
|
|
209
|
+
#### Returns
|
|
210
|
+
|
|
211
|
+
`Promise`<`void`\>
|
|
212
|
+
|
|
213
|
+
#### Defined in
|
|
214
|
+
|
|
215
|
+
[HotComponent.ts:152](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotComponent.ts#L152)
|
|
216
|
+
|
|
217
|
+
___
|
|
218
|
+
|
|
219
|
+
### handleAttributes
|
|
220
|
+
|
|
221
|
+
▸ `Optional` **handleAttributes**(`attributes`): `Promise`<`void`\>
|
|
222
|
+
|
|
223
|
+
Handle the attributes manually.
|
|
224
|
+
|
|
225
|
+
#### Parameters
|
|
226
|
+
|
|
227
|
+
| Name | Type |
|
|
228
|
+
| :------ | :------ |
|
|
229
|
+
| `attributes` | `NamedNodeMap` |
|
|
230
|
+
|
|
231
|
+
#### Returns
|
|
232
|
+
|
|
233
|
+
`Promise`<`void`\>
|
|
234
|
+
|
|
235
|
+
#### Defined in
|
|
236
|
+
|
|
237
|
+
[HotComponent.ts:147](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotComponent.ts#L147)
|
|
238
|
+
|
|
239
|
+
___
|
|
240
|
+
|
|
241
|
+
### onCreated
|
|
242
|
+
|
|
243
|
+
▸ **onCreated**(`element`): `Promise`<`any`\>
|
|
244
|
+
|
|
245
|
+
Event that's called when this component is created. This is
|
|
246
|
+
called before output is called. Right after this is called,
|
|
247
|
+
the attributes from the HTMLElement will be processed. If
|
|
248
|
+
the functionality of the attributes processing need to be
|
|
249
|
+
overwritten, use the handleAttributes method to handle them.
|
|
250
|
+
|
|
251
|
+
#### Parameters
|
|
252
|
+
|
|
253
|
+
| Name | Type |
|
|
254
|
+
| :------ | :------ |
|
|
255
|
+
| `element` | `HTMLElement` |
|
|
256
|
+
|
|
257
|
+
#### Returns
|
|
258
|
+
|
|
259
|
+
`Promise`<`any`\>
|
|
260
|
+
|
|
261
|
+
#### Defined in
|
|
262
|
+
|
|
263
|
+
[HotComponent.ts:139](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotComponent.ts#L139)
|
|
264
|
+
|
|
265
|
+
___
|
|
266
|
+
|
|
267
|
+
### output
|
|
268
|
+
|
|
269
|
+
▸ `Abstract` **output**(): `Promise`<`string`\>
|
|
270
|
+
|
|
271
|
+
Output the component.
|
|
272
|
+
|
|
273
|
+
#### Returns
|
|
274
|
+
|
|
275
|
+
`Promise`<`string`\>
|
|
276
|
+
|
|
277
|
+
#### Defined in
|
|
278
|
+
|
|
279
|
+
[HotComponent.ts:157](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotComponent.ts#L157)
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
[hotstaq](../README.md) / [Modules](../modules.md) / HotDB
|
|
2
|
+
|
|
3
|
+
# Class: HotDB<DBType, DBResultType, DBSchema\>
|
|
4
|
+
|
|
5
|
+
The server-side database connection.
|
|
6
|
+
|
|
7
|
+
## Type parameters
|
|
8
|
+
|
|
9
|
+
| Name | Type |
|
|
10
|
+
| :------ | :------ |
|
|
11
|
+
| `DBType` | `any` |
|
|
12
|
+
| `DBResultType` | `any` |
|
|
13
|
+
| `DBSchema` | [`HotDBSchema`](HotDBSchema.md) |
|
|
14
|
+
|
|
15
|
+
## Hierarchy
|
|
16
|
+
|
|
17
|
+
- **`HotDB`**
|
|
18
|
+
|
|
19
|
+
↳ [`HotDBMySQL`](HotDBMySQL.md)
|
|
20
|
+
|
|
21
|
+
↳ [`HotDBInflux`](HotDBInflux.md)
|
|
22
|
+
|
|
23
|
+
## Table of contents
|
|
24
|
+
|
|
25
|
+
### Constructors
|
|
26
|
+
|
|
27
|
+
- [constructor](HotDB.md#constructor)
|
|
28
|
+
|
|
29
|
+
### Properties
|
|
30
|
+
|
|
31
|
+
- [connectionStatus](HotDB.md#connectionstatus)
|
|
32
|
+
- [db](HotDB.md#db)
|
|
33
|
+
- [schema](HotDB.md#schema)
|
|
34
|
+
- [type](HotDB.md#type)
|
|
35
|
+
|
|
36
|
+
### Methods
|
|
37
|
+
|
|
38
|
+
- [connect](HotDB.md#connect)
|
|
39
|
+
- [disconnect](HotDB.md#disconnect)
|
|
40
|
+
- [multiQuery](HotDB.md#multiquery)
|
|
41
|
+
- [query](HotDB.md#query)
|
|
42
|
+
- [queryOne](HotDB.md#queryone)
|
|
43
|
+
- [tableCheck](HotDB.md#tablecheck)
|
|
44
|
+
|
|
45
|
+
## Constructors
|
|
46
|
+
|
|
47
|
+
### constructor
|
|
48
|
+
|
|
49
|
+
• **new HotDB**<`DBType`, `DBResultType`, `DBSchema`\>(`db?`, `type?`, `schema?`)
|
|
50
|
+
|
|
51
|
+
#### Type parameters
|
|
52
|
+
|
|
53
|
+
| Name | Type |
|
|
54
|
+
| :------ | :------ |
|
|
55
|
+
| `DBType` | `any` |
|
|
56
|
+
| `DBResultType` | `any` |
|
|
57
|
+
| `DBSchema` | [`HotDBSchema`](HotDBSchema.md) |
|
|
58
|
+
|
|
59
|
+
#### Parameters
|
|
60
|
+
|
|
61
|
+
| Name | Type | Default value |
|
|
62
|
+
| :------ | :------ | :------ |
|
|
63
|
+
| `db` | `DBType` | `null` |
|
|
64
|
+
| `type` | `string` | `""` |
|
|
65
|
+
| `schema` | `DBSchema` | `null` |
|
|
66
|
+
|
|
67
|
+
#### Defined in
|
|
68
|
+
|
|
69
|
+
[HotDB.ts:37](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotDB.ts#L37)
|
|
70
|
+
|
|
71
|
+
## Properties
|
|
72
|
+
|
|
73
|
+
### connectionStatus
|
|
74
|
+
|
|
75
|
+
• **connectionStatus**: [`ConnectionStatus`](../enums/ConnectionStatus.md)
|
|
76
|
+
|
|
77
|
+
The connection status.
|
|
78
|
+
|
|
79
|
+
#### Defined in
|
|
80
|
+
|
|
81
|
+
[HotDB.ts:30](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotDB.ts#L30)
|
|
82
|
+
|
|
83
|
+
___
|
|
84
|
+
|
|
85
|
+
### db
|
|
86
|
+
|
|
87
|
+
• **db**: `DBType`
|
|
88
|
+
|
|
89
|
+
The connection to the database (or the driver).
|
|
90
|
+
|
|
91
|
+
#### Defined in
|
|
92
|
+
|
|
93
|
+
[HotDB.ts:26](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotDB.ts#L26)
|
|
94
|
+
|
|
95
|
+
___
|
|
96
|
+
|
|
97
|
+
### schema
|
|
98
|
+
|
|
99
|
+
• **schema**: `DBSchema`
|
|
100
|
+
|
|
101
|
+
The db schema. This will generate a database structure
|
|
102
|
+
and keep it maintained as needed.
|
|
103
|
+
|
|
104
|
+
#### Defined in
|
|
105
|
+
|
|
106
|
+
[HotDB.ts:35](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotDB.ts#L35)
|
|
107
|
+
|
|
108
|
+
___
|
|
109
|
+
|
|
110
|
+
### type
|
|
111
|
+
|
|
112
|
+
• **type**: `string`
|
|
113
|
+
|
|
114
|
+
The database type.
|
|
115
|
+
|
|
116
|
+
#### Defined in
|
|
117
|
+
|
|
118
|
+
[HotDB.ts:22](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotDB.ts#L22)
|
|
119
|
+
|
|
120
|
+
## Methods
|
|
121
|
+
|
|
122
|
+
### connect
|
|
123
|
+
|
|
124
|
+
▸ `Abstract` **connect**(`connectionInfo`): `Promise`<`any`[]\>
|
|
125
|
+
|
|
126
|
+
Connect to the database. This will only start connecting
|
|
127
|
+
if db is null.
|
|
128
|
+
|
|
129
|
+
#### Parameters
|
|
130
|
+
|
|
131
|
+
| Name | Type |
|
|
132
|
+
| :------ | :------ |
|
|
133
|
+
| `connectionInfo` | [`HotDBConnectionInterface`](../interfaces/HotDBConnectionInterface.md) |
|
|
134
|
+
|
|
135
|
+
#### Returns
|
|
136
|
+
|
|
137
|
+
`Promise`<`any`[]\>
|
|
138
|
+
|
|
139
|
+
#### Defined in
|
|
140
|
+
|
|
141
|
+
[HotDB.ts:49](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotDB.ts#L49)
|
|
142
|
+
|
|
143
|
+
___
|
|
144
|
+
|
|
145
|
+
### disconnect
|
|
146
|
+
|
|
147
|
+
▸ `Abstract` **disconnect**(): `Promise`<`void`\>
|
|
148
|
+
|
|
149
|
+
Disconnect from the server.
|
|
150
|
+
|
|
151
|
+
#### Returns
|
|
152
|
+
|
|
153
|
+
`Promise`<`void`\>
|
|
154
|
+
|
|
155
|
+
#### Defined in
|
|
156
|
+
|
|
157
|
+
[HotDB.ts:78](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotDB.ts#L78)
|
|
158
|
+
|
|
159
|
+
___
|
|
160
|
+
|
|
161
|
+
### multiQuery
|
|
162
|
+
|
|
163
|
+
▸ `Optional` `Abstract` **multiQuery**(`queryStrings`): `Promise`<`DBResultType`[]\>
|
|
164
|
+
|
|
165
|
+
Make multiple queries.
|
|
166
|
+
|
|
167
|
+
#### Parameters
|
|
168
|
+
|
|
169
|
+
| Name | Type |
|
|
170
|
+
| :------ | :------ |
|
|
171
|
+
| `queryStrings` | `string`[] \| { `query`: `string` ; `values`: `any`[] }[] |
|
|
172
|
+
|
|
173
|
+
#### Returns
|
|
174
|
+
|
|
175
|
+
`Promise`<`DBResultType`[]\>
|
|
176
|
+
|
|
177
|
+
#### Defined in
|
|
178
|
+
|
|
179
|
+
[HotDB.ts:74](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotDB.ts#L74)
|
|
180
|
+
|
|
181
|
+
___
|
|
182
|
+
|
|
183
|
+
### query
|
|
184
|
+
|
|
185
|
+
▸ `Optional` `Abstract` **query**(`queryString`, `values?`): `Promise`<`DBResultType`\>
|
|
186
|
+
|
|
187
|
+
The query to make.
|
|
188
|
+
|
|
189
|
+
#### Parameters
|
|
190
|
+
|
|
191
|
+
| Name | Type |
|
|
192
|
+
| :------ | :------ |
|
|
193
|
+
| `queryString` | `string` |
|
|
194
|
+
| `values?` | `any`[] |
|
|
195
|
+
|
|
196
|
+
#### Returns
|
|
197
|
+
|
|
198
|
+
`Promise`<`DBResultType`\>
|
|
199
|
+
|
|
200
|
+
#### Defined in
|
|
201
|
+
|
|
202
|
+
[HotDB.ts:66](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotDB.ts#L66)
|
|
203
|
+
|
|
204
|
+
___
|
|
205
|
+
|
|
206
|
+
### queryOne
|
|
207
|
+
|
|
208
|
+
▸ `Optional` `Abstract` **queryOne**(`queryString`, `values?`): `Promise`<`DBResultType`\>
|
|
209
|
+
|
|
210
|
+
Make a single query.
|
|
211
|
+
|
|
212
|
+
#### Parameters
|
|
213
|
+
|
|
214
|
+
| Name | Type |
|
|
215
|
+
| :------ | :------ |
|
|
216
|
+
| `queryString` | `string` |
|
|
217
|
+
| `values?` | `any`[] |
|
|
218
|
+
|
|
219
|
+
#### Returns
|
|
220
|
+
|
|
221
|
+
`Promise`<`DBResultType`\>
|
|
222
|
+
|
|
223
|
+
#### Defined in
|
|
224
|
+
|
|
225
|
+
[HotDB.ts:70](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotDB.ts#L70)
|
|
226
|
+
|
|
227
|
+
___
|
|
228
|
+
|
|
229
|
+
### tableCheck
|
|
230
|
+
|
|
231
|
+
▸ `Optional` `Abstract` **tableCheck**(`tableName`): `Promise`<`boolean`\>
|
|
232
|
+
|
|
233
|
+
Checks if the table exists.
|
|
234
|
+
|
|
235
|
+
#### Parameters
|
|
236
|
+
|
|
237
|
+
| Name | Type |
|
|
238
|
+
| :------ | :------ |
|
|
239
|
+
| `tableName` | `string` |
|
|
240
|
+
|
|
241
|
+
#### Returns
|
|
242
|
+
|
|
243
|
+
`Promise`<`boolean`\>
|
|
244
|
+
|
|
245
|
+
#### Defined in
|
|
246
|
+
|
|
247
|
+
[HotDB.ts:62](https://github.com/OurFreeLight/HotStaq/blob/3f2c5d8/src/HotDB.ts#L62)
|