hotstaq 0.5.3
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/.dockerignore +123 -0
- package/.eslintignore +17 -0
- package/.eslintrc.js +11 -0
- package/.vscode/launch.json +201 -0
- package/.vscode/settings.json +2 -0
- package/.vscode/tasks.json +88 -0
- package/CONTRIBUTING.md +157 -0
- package/LICENSE +21 -0
- package/README.md +128 -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 +137 -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 +242 -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 +88 -0
- package/build/src/HotCreator.d.ts.map +1 -0
- package/build/src/HotCreator.js +445 -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/HotGenerator.d.ts +80 -0
- package/build/src/HotGenerator.d.ts.map +1 -0
- package/build/src/HotGenerator.js +342 -0
- package/build/src/HotGenerator.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 +47 -0
- package/build/src/HotIO.d.ts.map +1 -0
- package/build/src/HotIO.js +232 -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 +603 -0
- package/build/src/HotStaq.d.ts.map +1 -0
- package/build/src/HotStaq.js +1260 -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 +86 -0
- package/build/src/HotTestSeleniumDriver.d.ts.map +1 -0
- package/build/src/HotTestSeleniumDriver.js +400 -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 +622 -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 copy.d.ts +2 -0
- package/build/src/api copy.d.ts.map +1 -0
- package/build/src/api copy.js +153 -0
- package/build/src/api copy.js.map +1 -0
- package/build/src/api-web.d.ts +2 -0
- package/build/src/api-web.d.ts.map +1 -0
- package/build/src/api-web.js +45 -0
- package/build/src/api-web.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 +1040 -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 +119 -0
- package/build-web/HotStaqTests_HelloWorldAPI.js +133 -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 +130 -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 +1155 -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 +542 -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 +182 -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 +386 -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 +470 -0
- package/src/HotDB.ts +79 -0
- package/src/HotDBConnectionInterface.ts +40 -0
- package/src/HotFile.ts +617 -0
- package/src/HotGenerator.ts +446 -0
- package/src/HotHTTPServer.ts +954 -0
- package/src/HotIO.ts +160 -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 +1881 -0
- package/src/HotTestDriver.ts +171 -0
- package/src/HotTestElement.ts +97 -0
- package/src/HotTestMap.ts +130 -0
- package/src/HotTestSeleniumDriver.ts +381 -0
- package/src/HotTester.ts +696 -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-web.ts +48 -0
- package/src/api.ts +103 -0
- package/src/cli.ts +1225 -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/temp/HotStaqWeb.ts +59 -0
- package/tsconfig-generator.json +17 -0
- package/tsconfig-web.json +74 -0
- package/tsconfig.json +73 -0
- package/webpack.config.generator.js +41 -0
- package/webpack.config.js +53 -0
- package/webpack.config.tests.js +56 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
[hotstaq](../README.md) / [Modules](../modules.md) / HotDBMySQL
|
|
2
|
+
|
|
3
|
+
# Class: HotDBMySQL
|
|
4
|
+
|
|
5
|
+
The MySQL database connection.
|
|
6
|
+
|
|
7
|
+
## Hierarchy
|
|
8
|
+
|
|
9
|
+
- [`HotDB`](HotDB.md)<`mysql.Connection`, [`MySQLResults`](../interfaces/MySQLResults.md), [`MySQLSchema`](MySQLSchema.md)\>
|
|
10
|
+
|
|
11
|
+
↳ **`HotDBMySQL`**
|
|
12
|
+
|
|
13
|
+
## Table of contents
|
|
14
|
+
|
|
15
|
+
### Constructors
|
|
16
|
+
|
|
17
|
+
- [constructor](HotDBMySQL.md#constructor)
|
|
18
|
+
|
|
19
|
+
### Properties
|
|
20
|
+
|
|
21
|
+
- [connectionStatus](HotDBMySQL.md#connectionstatus)
|
|
22
|
+
- [db](HotDBMySQL.md#db)
|
|
23
|
+
- [schema](HotDBMySQL.md#schema)
|
|
24
|
+
- [type](HotDBMySQL.md#type)
|
|
25
|
+
|
|
26
|
+
### Methods
|
|
27
|
+
|
|
28
|
+
- [connect](HotDBMySQL.md#connect)
|
|
29
|
+
- [dbCheck](HotDBMySQL.md#dbcheck)
|
|
30
|
+
- [disconnect](HotDBMySQL.md#disconnect)
|
|
31
|
+
- [multiQuery](HotDBMySQL.md#multiquery)
|
|
32
|
+
- [query](HotDBMySQL.md#query)
|
|
33
|
+
- [queryOne](HotDBMySQL.md#queryone)
|
|
34
|
+
- [syncMigrationsTableTracker](HotDBMySQL.md#syncmigrationstabletracker)
|
|
35
|
+
- [tableCheck](HotDBMySQL.md#tablecheck)
|
|
36
|
+
|
|
37
|
+
## Constructors
|
|
38
|
+
|
|
39
|
+
### constructor
|
|
40
|
+
|
|
41
|
+
• **new HotDBMySQL**(`db?`, `type?`, `schema?`)
|
|
42
|
+
|
|
43
|
+
#### Parameters
|
|
44
|
+
|
|
45
|
+
| Name | Type | Default value |
|
|
46
|
+
| :------ | :------ | :------ |
|
|
47
|
+
| `db` | `Connection` | `null` |
|
|
48
|
+
| `type` | `string` | `"mysql"` |
|
|
49
|
+
| `schema` | [`MySQLSchema`](MySQLSchema.md) | `null` |
|
|
50
|
+
|
|
51
|
+
#### Overrides
|
|
52
|
+
|
|
53
|
+
[HotDB](HotDB.md).[constructor](HotDB.md#constructor)
|
|
54
|
+
|
|
55
|
+
#### Defined in
|
|
56
|
+
|
|
57
|
+
[schemas/HotDBMySQL.ts:27](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/HotDBMySQL.ts#L27)
|
|
58
|
+
|
|
59
|
+
## Properties
|
|
60
|
+
|
|
61
|
+
### connectionStatus
|
|
62
|
+
|
|
63
|
+
• **connectionStatus**: [`ConnectionStatus`](../enums/ConnectionStatus.md)
|
|
64
|
+
|
|
65
|
+
The connection status.
|
|
66
|
+
|
|
67
|
+
#### Inherited from
|
|
68
|
+
|
|
69
|
+
[HotDB](HotDB.md).[connectionStatus](HotDB.md#connectionstatus)
|
|
70
|
+
|
|
71
|
+
#### Defined in
|
|
72
|
+
|
|
73
|
+
[HotDB.ts:30](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotDB.ts#L30)
|
|
74
|
+
|
|
75
|
+
___
|
|
76
|
+
|
|
77
|
+
### db
|
|
78
|
+
|
|
79
|
+
• **db**: `Connection`
|
|
80
|
+
|
|
81
|
+
The connection to the database (or the driver).
|
|
82
|
+
|
|
83
|
+
#### Inherited from
|
|
84
|
+
|
|
85
|
+
[HotDB](HotDB.md).[db](HotDB.md#db)
|
|
86
|
+
|
|
87
|
+
#### Defined in
|
|
88
|
+
|
|
89
|
+
[HotDB.ts:26](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotDB.ts#L26)
|
|
90
|
+
|
|
91
|
+
___
|
|
92
|
+
|
|
93
|
+
### schema
|
|
94
|
+
|
|
95
|
+
• **schema**: [`MySQLSchema`](MySQLSchema.md)
|
|
96
|
+
|
|
97
|
+
The db schema. This will generate a database structure
|
|
98
|
+
and keep it maintained as needed.
|
|
99
|
+
|
|
100
|
+
#### Inherited from
|
|
101
|
+
|
|
102
|
+
[HotDB](HotDB.md).[schema](HotDB.md#schema)
|
|
103
|
+
|
|
104
|
+
#### Defined in
|
|
105
|
+
|
|
106
|
+
[HotDB.ts:35](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotDB.ts#L35)
|
|
107
|
+
|
|
108
|
+
___
|
|
109
|
+
|
|
110
|
+
### type
|
|
111
|
+
|
|
112
|
+
• **type**: `string`
|
|
113
|
+
|
|
114
|
+
The database type.
|
|
115
|
+
|
|
116
|
+
#### Inherited from
|
|
117
|
+
|
|
118
|
+
[HotDB](HotDB.md).[type](HotDB.md#type)
|
|
119
|
+
|
|
120
|
+
#### Defined in
|
|
121
|
+
|
|
122
|
+
[HotDB.ts:22](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotDB.ts#L22)
|
|
123
|
+
|
|
124
|
+
## Methods
|
|
125
|
+
|
|
126
|
+
### connect
|
|
127
|
+
|
|
128
|
+
▸ **connect**(`connectionInfo`): `Promise`<`any`[]\>
|
|
129
|
+
|
|
130
|
+
Connect to the database.
|
|
131
|
+
|
|
132
|
+
#### Parameters
|
|
133
|
+
|
|
134
|
+
| Name | Type |
|
|
135
|
+
| :------ | :------ |
|
|
136
|
+
| `connectionInfo` | [`HotDBConnectionInterface`](../interfaces/HotDBConnectionInterface.md) |
|
|
137
|
+
|
|
138
|
+
#### Returns
|
|
139
|
+
|
|
140
|
+
`Promise`<`any`[]\>
|
|
141
|
+
|
|
142
|
+
#### Overrides
|
|
143
|
+
|
|
144
|
+
[HotDB](HotDB.md).[connect](HotDB.md#connect)
|
|
145
|
+
|
|
146
|
+
#### Defined in
|
|
147
|
+
|
|
148
|
+
[schemas/HotDBMySQL.ts:35](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/HotDBMySQL.ts#L35)
|
|
149
|
+
|
|
150
|
+
___
|
|
151
|
+
|
|
152
|
+
### dbCheck
|
|
153
|
+
|
|
154
|
+
▸ `Protected` **dbCheck**(): `void`
|
|
155
|
+
|
|
156
|
+
Checks to see if this has a database connection.
|
|
157
|
+
|
|
158
|
+
#### Returns
|
|
159
|
+
|
|
160
|
+
`void`
|
|
161
|
+
|
|
162
|
+
#### Defined in
|
|
163
|
+
|
|
164
|
+
[schemas/HotDBMySQL.ts:65](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/HotDBMySQL.ts#L65)
|
|
165
|
+
|
|
166
|
+
___
|
|
167
|
+
|
|
168
|
+
### disconnect
|
|
169
|
+
|
|
170
|
+
▸ **disconnect**(): `Promise`<`void`\>
|
|
171
|
+
|
|
172
|
+
Disconnect from the server.
|
|
173
|
+
|
|
174
|
+
#### Returns
|
|
175
|
+
|
|
176
|
+
`Promise`<`void`\>
|
|
177
|
+
|
|
178
|
+
#### Overrides
|
|
179
|
+
|
|
180
|
+
[HotDB](HotDB.md).[disconnect](HotDB.md#disconnect)
|
|
181
|
+
|
|
182
|
+
#### Defined in
|
|
183
|
+
|
|
184
|
+
[schemas/HotDBMySQL.ts:306](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/HotDBMySQL.ts#L306)
|
|
185
|
+
|
|
186
|
+
___
|
|
187
|
+
|
|
188
|
+
### multiQuery
|
|
189
|
+
|
|
190
|
+
▸ **multiQuery**(`queryStrings`): `Promise`<[`MySQLResults`](../interfaces/MySQLResults.md)[]\>
|
|
191
|
+
|
|
192
|
+
Make multiple queries. **Warning! This can be a security vulnerability
|
|
193
|
+
if misused! Ideally this should only be used when making changes to tables!
|
|
194
|
+
Additionally, this could overwhelm the server and each command sent is not
|
|
195
|
+
guaranteed to be done in order.**
|
|
196
|
+
|
|
197
|
+
#### Parameters
|
|
198
|
+
|
|
199
|
+
| Name | Type |
|
|
200
|
+
| :------ | :------ |
|
|
201
|
+
| `queryStrings` | `string`[] \| { `query`: `string` ; `values`: `any`[] }[] |
|
|
202
|
+
|
|
203
|
+
#### Returns
|
|
204
|
+
|
|
205
|
+
`Promise`<[`MySQLResults`](../interfaces/MySQLResults.md)[]\>
|
|
206
|
+
|
|
207
|
+
#### Overrides
|
|
208
|
+
|
|
209
|
+
[HotDB](HotDB.md).[multiQuery](HotDB.md#multiquery)
|
|
210
|
+
|
|
211
|
+
#### Defined in
|
|
212
|
+
|
|
213
|
+
[schemas/HotDBMySQL.ts:267](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/HotDBMySQL.ts#L267)
|
|
214
|
+
|
|
215
|
+
___
|
|
216
|
+
|
|
217
|
+
### query
|
|
218
|
+
|
|
219
|
+
▸ **query**(`queryString`, `values?`): `Promise`<[`MySQLResults`](../interfaces/MySQLResults.md)\>
|
|
220
|
+
|
|
221
|
+
The query to make.
|
|
222
|
+
|
|
223
|
+
#### Parameters
|
|
224
|
+
|
|
225
|
+
| Name | Type | Default value |
|
|
226
|
+
| :------ | :------ | :------ |
|
|
227
|
+
| `queryString` | `string` | `undefined` |
|
|
228
|
+
| `values` | `any`[] | `[]` |
|
|
229
|
+
|
|
230
|
+
#### Returns
|
|
231
|
+
|
|
232
|
+
`Promise`<[`MySQLResults`](../interfaces/MySQLResults.md)\>
|
|
233
|
+
|
|
234
|
+
#### Overrides
|
|
235
|
+
|
|
236
|
+
[HotDB](HotDB.md).[query](HotDB.md#query)
|
|
237
|
+
|
|
238
|
+
#### Defined in
|
|
239
|
+
|
|
240
|
+
[schemas/HotDBMySQL.ts:218](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/HotDBMySQL.ts#L218)
|
|
241
|
+
|
|
242
|
+
___
|
|
243
|
+
|
|
244
|
+
### queryOne
|
|
245
|
+
|
|
246
|
+
▸ **queryOne**(`queryString`, `values?`): `Promise`<[`MySQLResults`](../interfaces/MySQLResults.md)\>
|
|
247
|
+
|
|
248
|
+
Make a single query. If there are no results, null will be in MySQLResults.results
|
|
249
|
+
|
|
250
|
+
#### Parameters
|
|
251
|
+
|
|
252
|
+
| Name | Type | Default value |
|
|
253
|
+
| :------ | :------ | :------ |
|
|
254
|
+
| `queryString` | `string` | `undefined` |
|
|
255
|
+
| `values` | `any`[] | `[]` |
|
|
256
|
+
|
|
257
|
+
#### Returns
|
|
258
|
+
|
|
259
|
+
`Promise`<[`MySQLResults`](../interfaces/MySQLResults.md)\>
|
|
260
|
+
|
|
261
|
+
#### Overrides
|
|
262
|
+
|
|
263
|
+
[HotDB](HotDB.md).[queryOne](HotDB.md#queryone)
|
|
264
|
+
|
|
265
|
+
#### Defined in
|
|
266
|
+
|
|
267
|
+
[schemas/HotDBMySQL.ts:237](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/HotDBMySQL.ts#L237)
|
|
268
|
+
|
|
269
|
+
___
|
|
270
|
+
|
|
271
|
+
### syncMigrationsTableTracker
|
|
272
|
+
|
|
273
|
+
▸ **syncMigrationsTableTracker**(): `Promise`<`void`\>
|
|
274
|
+
|
|
275
|
+
Sync the migrations table tracker. This keeps track of all database table migrations.
|
|
276
|
+
If the "migrations" table is missing, it will be created.
|
|
277
|
+
|
|
278
|
+
#### Returns
|
|
279
|
+
|
|
280
|
+
`Promise`<`void`\>
|
|
281
|
+
|
|
282
|
+
#### Defined in
|
|
283
|
+
|
|
284
|
+
[schemas/HotDBMySQL.ts:177](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/HotDBMySQL.ts#L177)
|
|
285
|
+
|
|
286
|
+
___
|
|
287
|
+
|
|
288
|
+
### tableCheck
|
|
289
|
+
|
|
290
|
+
▸ **tableCheck**(`tableName`): `Promise`<`boolean`\>
|
|
291
|
+
|
|
292
|
+
Checks if the table exists.
|
|
293
|
+
|
|
294
|
+
#### Parameters
|
|
295
|
+
|
|
296
|
+
| Name | Type |
|
|
297
|
+
| :------ | :------ |
|
|
298
|
+
| `tableName` | `string` |
|
|
299
|
+
|
|
300
|
+
#### Returns
|
|
301
|
+
|
|
302
|
+
`Promise`<`boolean`\>
|
|
303
|
+
|
|
304
|
+
#### Overrides
|
|
305
|
+
|
|
306
|
+
[HotDB](HotDB.md).[tableCheck](HotDB.md#tablecheck)
|
|
307
|
+
|
|
308
|
+
#### Defined in
|
|
309
|
+
|
|
310
|
+
[schemas/HotDBMySQL.ts:191](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/HotDBMySQL.ts#L191)
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
[hotstaq](../README.md) / [Modules](../modules.md) / HotDBSchema
|
|
2
|
+
|
|
3
|
+
# Class: HotDBSchema
|
|
4
|
+
|
|
5
|
+
The parent database schema.
|
|
6
|
+
|
|
7
|
+
## Hierarchy
|
|
8
|
+
|
|
9
|
+
- **`HotDBSchema`**
|
|
10
|
+
|
|
11
|
+
↳ [`MySQLSchema`](MySQLSchema.md)
|
|
12
|
+
|
|
13
|
+
↳ [`InfluxSchema`](InfluxSchema.md)
|
|
14
|
+
|
|
15
|
+
## Table of contents
|
|
16
|
+
|
|
17
|
+
### Constructors
|
|
18
|
+
|
|
19
|
+
- [constructor](HotDBSchema.md#constructor)
|
|
20
|
+
|
|
21
|
+
### Properties
|
|
22
|
+
|
|
23
|
+
- [name](HotDBSchema.md#name)
|
|
24
|
+
|
|
25
|
+
## Constructors
|
|
26
|
+
|
|
27
|
+
### constructor
|
|
28
|
+
|
|
29
|
+
• **new HotDBSchema**(`name`)
|
|
30
|
+
|
|
31
|
+
#### Parameters
|
|
32
|
+
|
|
33
|
+
| Name | Type |
|
|
34
|
+
| :------ | :------ |
|
|
35
|
+
| `name` | `string` |
|
|
36
|
+
|
|
37
|
+
#### Defined in
|
|
38
|
+
|
|
39
|
+
[schemas/HotDBSchema.ts:17](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/HotDBSchema.ts#L17)
|
|
40
|
+
|
|
41
|
+
## Properties
|
|
42
|
+
|
|
43
|
+
### name
|
|
44
|
+
|
|
45
|
+
• **name**: `string`
|
|
46
|
+
|
|
47
|
+
The name of this schema.
|
|
48
|
+
|
|
49
|
+
#### Defined in
|
|
50
|
+
|
|
51
|
+
[schemas/HotDBSchema.ts:15](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/schemas/HotDBSchema.ts#L15)
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
[hotstaq](../README.md) / [Modules](../modules.md) / HotFile
|
|
2
|
+
|
|
3
|
+
# Class: HotFile
|
|
4
|
+
|
|
5
|
+
A file to process.
|
|
6
|
+
|
|
7
|
+
## Implements
|
|
8
|
+
|
|
9
|
+
- `IHotFile`
|
|
10
|
+
|
|
11
|
+
## Table of contents
|
|
12
|
+
|
|
13
|
+
### Constructors
|
|
14
|
+
|
|
15
|
+
- [constructor](HotFile.md#constructor)
|
|
16
|
+
|
|
17
|
+
### Properties
|
|
18
|
+
|
|
19
|
+
- [content](HotFile.md#content)
|
|
20
|
+
- [localFile](HotFile.md#localfile)
|
|
21
|
+
- [name](HotFile.md#name)
|
|
22
|
+
- [page](HotFile.md#page)
|
|
23
|
+
- [throwAllErrors](HotFile.md#throwallerrors)
|
|
24
|
+
- [url](HotFile.md#url)
|
|
25
|
+
|
|
26
|
+
### Methods
|
|
27
|
+
|
|
28
|
+
- [getContent](HotFile.md#getcontent)
|
|
29
|
+
- [load](HotFile.md#load)
|
|
30
|
+
- [loadLocalFile](HotFile.md#loadlocalfile)
|
|
31
|
+
- [loadUrl](HotFile.md#loadurl)
|
|
32
|
+
- [process](HotFile.md#process)
|
|
33
|
+
- [setContent](HotFile.md#setcontent)
|
|
34
|
+
- [httpGet](HotFile.md#httpget)
|
|
35
|
+
- [processContent](HotFile.md#processcontent)
|
|
36
|
+
- [processNestedContent](HotFile.md#processnestedcontent)
|
|
37
|
+
|
|
38
|
+
## Constructors
|
|
39
|
+
|
|
40
|
+
### constructor
|
|
41
|
+
|
|
42
|
+
• **new HotFile**(`copy?`)
|
|
43
|
+
|
|
44
|
+
#### Parameters
|
|
45
|
+
|
|
46
|
+
| Name | Type |
|
|
47
|
+
| :------ | :------ |
|
|
48
|
+
| `copy` | `IHotFile` |
|
|
49
|
+
|
|
50
|
+
#### Defined in
|
|
51
|
+
|
|
52
|
+
[HotFile.ts:70](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L70)
|
|
53
|
+
|
|
54
|
+
## Properties
|
|
55
|
+
|
|
56
|
+
### content
|
|
57
|
+
|
|
58
|
+
• **content**: `string`
|
|
59
|
+
|
|
60
|
+
The content of the file to process.
|
|
61
|
+
|
|
62
|
+
#### Implementation of
|
|
63
|
+
|
|
64
|
+
IHotFile.content
|
|
65
|
+
|
|
66
|
+
#### Defined in
|
|
67
|
+
|
|
68
|
+
[HotFile.ts:64](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L64)
|
|
69
|
+
|
|
70
|
+
___
|
|
71
|
+
|
|
72
|
+
### localFile
|
|
73
|
+
|
|
74
|
+
• **localFile**: `string`
|
|
75
|
+
|
|
76
|
+
The path to the local file to get.
|
|
77
|
+
|
|
78
|
+
#### Implementation of
|
|
79
|
+
|
|
80
|
+
IHotFile.localFile
|
|
81
|
+
|
|
82
|
+
#### Defined in
|
|
83
|
+
|
|
84
|
+
[HotFile.ts:60](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L60)
|
|
85
|
+
|
|
86
|
+
___
|
|
87
|
+
|
|
88
|
+
### name
|
|
89
|
+
|
|
90
|
+
• **name**: `string`
|
|
91
|
+
|
|
92
|
+
The name of the file.
|
|
93
|
+
|
|
94
|
+
#### Implementation of
|
|
95
|
+
|
|
96
|
+
IHotFile.name
|
|
97
|
+
|
|
98
|
+
#### Defined in
|
|
99
|
+
|
|
100
|
+
[HotFile.ts:52](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L52)
|
|
101
|
+
|
|
102
|
+
___
|
|
103
|
+
|
|
104
|
+
### page
|
|
105
|
+
|
|
106
|
+
• **page**: [`HotPage`](HotPage.md)
|
|
107
|
+
|
|
108
|
+
The parent page.
|
|
109
|
+
|
|
110
|
+
#### Implementation of
|
|
111
|
+
|
|
112
|
+
IHotFile.page
|
|
113
|
+
|
|
114
|
+
#### Defined in
|
|
115
|
+
|
|
116
|
+
[HotFile.ts:48](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L48)
|
|
117
|
+
|
|
118
|
+
___
|
|
119
|
+
|
|
120
|
+
### throwAllErrors
|
|
121
|
+
|
|
122
|
+
• **throwAllErrors**: `boolean`
|
|
123
|
+
|
|
124
|
+
Force all errors to be thrown.
|
|
125
|
+
|
|
126
|
+
#### Implementation of
|
|
127
|
+
|
|
128
|
+
IHotFile.throwAllErrors
|
|
129
|
+
|
|
130
|
+
#### Defined in
|
|
131
|
+
|
|
132
|
+
[HotFile.ts:68](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L68)
|
|
133
|
+
|
|
134
|
+
___
|
|
135
|
+
|
|
136
|
+
### url
|
|
137
|
+
|
|
138
|
+
• **url**: `string`
|
|
139
|
+
|
|
140
|
+
The url to the file to get.
|
|
141
|
+
|
|
142
|
+
#### Implementation of
|
|
143
|
+
|
|
144
|
+
IHotFile.url
|
|
145
|
+
|
|
146
|
+
#### Defined in
|
|
147
|
+
|
|
148
|
+
[HotFile.ts:56](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L56)
|
|
149
|
+
|
|
150
|
+
## Methods
|
|
151
|
+
|
|
152
|
+
### getContent
|
|
153
|
+
|
|
154
|
+
▸ **getContent**(): `string`
|
|
155
|
+
|
|
156
|
+
Get the content of this file.
|
|
157
|
+
|
|
158
|
+
#### Returns
|
|
159
|
+
|
|
160
|
+
`string`
|
|
161
|
+
|
|
162
|
+
#### Defined in
|
|
163
|
+
|
|
164
|
+
[HotFile.ts:91](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L91)
|
|
165
|
+
|
|
166
|
+
___
|
|
167
|
+
|
|
168
|
+
### load
|
|
169
|
+
|
|
170
|
+
▸ **load**(): `Promise`<`string`\>
|
|
171
|
+
|
|
172
|
+
Load the contents of the file.
|
|
173
|
+
|
|
174
|
+
#### Returns
|
|
175
|
+
|
|
176
|
+
`Promise`<`string`\>
|
|
177
|
+
|
|
178
|
+
#### Defined in
|
|
179
|
+
|
|
180
|
+
[HotFile.ts:154](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L154)
|
|
181
|
+
|
|
182
|
+
___
|
|
183
|
+
|
|
184
|
+
### loadLocalFile
|
|
185
|
+
|
|
186
|
+
▸ **loadLocalFile**(): `Promise`<`string`\>
|
|
187
|
+
|
|
188
|
+
Load content from a local file.
|
|
189
|
+
|
|
190
|
+
#### Returns
|
|
191
|
+
|
|
192
|
+
`Promise`<`string`\>
|
|
193
|
+
|
|
194
|
+
#### Defined in
|
|
195
|
+
|
|
196
|
+
[HotFile.ts:131](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L131)
|
|
197
|
+
|
|
198
|
+
___
|
|
199
|
+
|
|
200
|
+
### loadUrl
|
|
201
|
+
|
|
202
|
+
▸ **loadUrl**(): `Promise`<`string`\>
|
|
203
|
+
|
|
204
|
+
Load content from a url.
|
|
205
|
+
|
|
206
|
+
#### Returns
|
|
207
|
+
|
|
208
|
+
`Promise`<`string`\>
|
|
209
|
+
|
|
210
|
+
#### Defined in
|
|
211
|
+
|
|
212
|
+
[HotFile.ts:121](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L121)
|
|
213
|
+
|
|
214
|
+
___
|
|
215
|
+
|
|
216
|
+
### process
|
|
217
|
+
|
|
218
|
+
▸ **process**(`args?`): `Promise`<`string`\>
|
|
219
|
+
|
|
220
|
+
Process the content in this file. This treats each file as one large JavaScript
|
|
221
|
+
file. Any text outside of the <* *> areas will be treated as:
|
|
222
|
+
|
|
223
|
+
Hot.echo ("text");
|
|
224
|
+
|
|
225
|
+
**`fixme`** The regex's in the offContent functions need to be fixed. There's several
|
|
226
|
+
test cases where they will fail.
|
|
227
|
+
|
|
228
|
+
#### Parameters
|
|
229
|
+
|
|
230
|
+
| Name | Type | Default value |
|
|
231
|
+
| :------ | :------ | :------ |
|
|
232
|
+
| `args` | `any` | `null` |
|
|
233
|
+
|
|
234
|
+
#### Returns
|
|
235
|
+
|
|
236
|
+
`Promise`<`string`\>
|
|
237
|
+
|
|
238
|
+
#### Defined in
|
|
239
|
+
|
|
240
|
+
[HotFile.ts:330](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L330)
|
|
241
|
+
|
|
242
|
+
___
|
|
243
|
+
|
|
244
|
+
### setContent
|
|
245
|
+
|
|
246
|
+
▸ **setContent**(`content`): `void`
|
|
247
|
+
|
|
248
|
+
Set the content of this file.
|
|
249
|
+
|
|
250
|
+
#### Parameters
|
|
251
|
+
|
|
252
|
+
| Name | Type |
|
|
253
|
+
| :------ | :------ |
|
|
254
|
+
| `content` | `string` |
|
|
255
|
+
|
|
256
|
+
#### Returns
|
|
257
|
+
|
|
258
|
+
`void`
|
|
259
|
+
|
|
260
|
+
#### Defined in
|
|
261
|
+
|
|
262
|
+
[HotFile.ts:83](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L83)
|
|
263
|
+
|
|
264
|
+
___
|
|
265
|
+
|
|
266
|
+
### httpGet
|
|
267
|
+
|
|
268
|
+
▸ `Static` **httpGet**(`url`): `Promise`<`string`\>
|
|
269
|
+
|
|
270
|
+
Make a HTTP get request.
|
|
271
|
+
|
|
272
|
+
#### Parameters
|
|
273
|
+
|
|
274
|
+
| Name | Type |
|
|
275
|
+
| :------ | :------ |
|
|
276
|
+
| `url` | `string` |
|
|
277
|
+
|
|
278
|
+
#### Returns
|
|
279
|
+
|
|
280
|
+
`Promise`<`string`\>
|
|
281
|
+
|
|
282
|
+
#### Defined in
|
|
283
|
+
|
|
284
|
+
[HotFile.ts:99](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L99)
|
|
285
|
+
|
|
286
|
+
___
|
|
287
|
+
|
|
288
|
+
### processContent
|
|
289
|
+
|
|
290
|
+
▸ `Static` **processContent**(`content`, `contentRegex`, `contentProcessor`, `offContentProcessor`, `numRemoveFromBeginning?`, `numRemoveFromEnd?`): `string`
|
|
291
|
+
|
|
292
|
+
Process string content. This will take in a regular expression and
|
|
293
|
+
parse the content based on the regex. When the regex content is found
|
|
294
|
+
contentProcessor will be executed with the regex content found. When
|
|
295
|
+
the regex content is not found, offContentProcessor will be called with
|
|
296
|
+
the content outside of the regex.
|
|
297
|
+
|
|
298
|
+
#### Parameters
|
|
299
|
+
|
|
300
|
+
| Name | Type | Default value | Description |
|
|
301
|
+
| :------ | :------ | :------ | :------ |
|
|
302
|
+
| `content` | `string` | `undefined` | The content to parse. |
|
|
303
|
+
| `contentRegex` | `RegExp` | `undefined` | The regex to use to parse the content. |
|
|
304
|
+
| `contentProcessor` | (`regexFound`: `string`) => `string` | `undefined` | The content found inside the regex. |
|
|
305
|
+
| `offContentProcessor` | (`offContent`: `string`) => `string` | `undefined` | The content found outside of the regex. |
|
|
306
|
+
| `numRemoveFromBeginning` | `number` | `2` | The number of characters to remove from the beginning of the found content. |
|
|
307
|
+
| `numRemoveFromEnd` | `number` | `2` | The number of characters to remove from the end of the found content. |
|
|
308
|
+
|
|
309
|
+
#### Returns
|
|
310
|
+
|
|
311
|
+
`string`
|
|
312
|
+
|
|
313
|
+
#### Defined in
|
|
314
|
+
|
|
315
|
+
[HotFile.ts:183](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L183)
|
|
316
|
+
|
|
317
|
+
___
|
|
318
|
+
|
|
319
|
+
### processNestedContent
|
|
320
|
+
|
|
321
|
+
▸ `Static` **processNestedContent**(`content`, `startChars`, `endChars`, `triggerChar`, `contentProcessor`, `offContentProcessor`, `numRemoveFromBeginning?`, `numRemoveFromEnd?`): `string`
|
|
322
|
+
|
|
323
|
+
Process any content that could have nested values. This will
|
|
324
|
+
take in a regular expression and
|
|
325
|
+
parse the content based on the regex. When the regex content is found
|
|
326
|
+
contentProcessor will be executed with the regex content found. When
|
|
327
|
+
the regex content is not found, offContentProcessor will be called with
|
|
328
|
+
the content outside of the regex.
|
|
329
|
+
|
|
330
|
+
**`fixme`** Needs to be able to ignore any characters found inside comments
|
|
331
|
+
or a string. For example, if the following is used ```${"Test }"}``` It
|
|
332
|
+
will error out.
|
|
333
|
+
|
|
334
|
+
#### Parameters
|
|
335
|
+
|
|
336
|
+
| Name | Type | Default value | Description |
|
|
337
|
+
| :------ | :------ | :------ | :------ |
|
|
338
|
+
| `content` | `string` | `undefined` | The content to parse. |
|
|
339
|
+
| `startChars` | `string` | `undefined` | - |
|
|
340
|
+
| `endChars` | `string` | `undefined` | - |
|
|
341
|
+
| `triggerChar` | `string` | `undefined` | - |
|
|
342
|
+
| `contentProcessor` | (`regexFound`: `string`) => `string` | `undefined` | The content found inside the regex. |
|
|
343
|
+
| `offContentProcessor` | (`offContent`: `string`) => `string` | `undefined` | The content found outside of the regex. |
|
|
344
|
+
| `numRemoveFromBeginning` | `number` | `2` | The number of characters to remove from the beginning of the found content. |
|
|
345
|
+
| `numRemoveFromEnd` | `number` | `1` | The number of characters to remove from the end of the found content. |
|
|
346
|
+
|
|
347
|
+
#### Returns
|
|
348
|
+
|
|
349
|
+
`string`
|
|
350
|
+
|
|
351
|
+
#### Defined in
|
|
352
|
+
|
|
353
|
+
[HotFile.ts:241](https://github.com/OurFreeLight/HotStaq/blob/b031357/src/HotFile.ts#L241)
|