@breautek/storm 6.1.0-beta.0 → 6.1.0-beta.2
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/CHANGELOG.md +12 -0
- package/docs/classes/Application.html +16 -16
- package/docs/classes/BackendAuthenticationMiddleware.html +3 -3
- package/docs/classes/CORSMiddleware.html +3 -3
- package/docs/classes/ConfigLoader.html +3 -3
- package/docs/classes/Database.html +2 -2
- package/docs/classes/DatabaseCastObject.html +2 -2
- package/docs/classes/DatabaseConnection.html +19 -19
- package/docs/classes/DatabaseQueryError.html +5 -5
- package/docs/classes/DeadLockError.html +5 -5
- package/docs/classes/DiskSpaceError.html +5 -5
- package/docs/classes/DropTemporaryTableQuery.html +6 -6
- package/docs/classes/DuplicateEntryError.html +5 -5
- package/docs/classes/EntityNotFoundError.html +5 -5
- package/docs/classes/ExpiredTokenError.html +5 -5
- package/docs/classes/Handler.html +2 -2
- package/docs/classes/InternalError.html +5 -5
- package/docs/classes/InvalidCredentialsError.html +5 -5
- package/docs/classes/InvalidValueError.html +5 -5
- package/docs/classes/LineString.html +2 -2
- package/docs/classes/LockWaitTimeoutError.html +5 -5
- package/docs/classes/ManagedDatabaseConnection.html +2 -2
- package/docs/classes/Middleware.html +2 -2
- package/docs/classes/MissingConfigError.html +5 -5
- package/docs/classes/MissingParameterError.html +5 -5
- package/docs/classes/MySQLConnection.html +19 -19
- package/docs/classes/MySQLDatabase.html +2 -2
- package/docs/classes/NotImplementedError.html +5 -5
- package/docs/classes/Point.html +2 -2
- package/docs/classes/Polygon.html +2 -2
- package/docs/classes/Query.html +6 -6
- package/docs/classes/RawError.html +5 -5
- package/docs/classes/RawQuery.html +6 -6
- package/docs/classes/Request.html +2 -2
- package/docs/classes/Response.html +2 -2
- package/docs/classes/ResponseData.html +2 -2
- package/docs/classes/ServiceProvider.html +2 -2
- package/docs/classes/ServiceResponse.html +2 -2
- package/docs/classes/SetSessionVariableQuery.html +6 -6
- package/docs/classes/StormError.html +5 -5
- package/docs/classes/TemporaryTableQuery.html +6 -6
- package/docs/classes/Token.html +2 -2
- package/docs/classes/TokenManager.html +2 -2
- package/docs/classes/Transaction.html +2 -2
- package/docs/classes/UnauthorizedAccessError.html +5 -5
- package/docs/enums/ErrorCode.html +2 -2
- package/docs/enums/ExitCode.html +2 -2
- package/docs/enums/HTTPMethod.html +2 -2
- package/docs/enums/IsolationLevel.html +2 -2
- package/docs/enums/JWTError.html +2 -2
- package/docs/enums/StatusCode.html +2 -2
- package/docs/functions/getInstance.html +1 -1
- package/docs/interfaces/IAdditionalErrorDetails.html +1 -1
- package/docs/interfaces/ICloudwatchConfig.html +2 -2
- package/docs/interfaces/ICloudwatchCredentials.html +2 -2
- package/docs/interfaces/ICloudwatchStreamConfig.html +2 -2
- package/docs/interfaces/IConfig.html +2 -2
- package/docs/interfaces/IDatabaseConfig.html +2 -2
- package/docs/interfaces/IDatabaseConnection.html +2 -2
- package/docs/interfaces/IErrorResponse.html +2 -2
- package/docs/interfaces/IFormData.html +2 -2
- package/docs/interfaces/IHandler.html +2 -2
- package/docs/interfaces/IInsertQueryResult.html +2 -2
- package/docs/interfaces/IJWTVerifyOptions.html +2 -2
- package/docs/interfaces/IParameterMap.html +1 -1
- package/docs/interfaces/IQueryable.html +2 -2
- package/docs/interfaces/IRequestResponse.html +2 -2
- package/docs/interfaces/IServiceHeaders.html +1 -1
- package/docs/interfaces/ISetSessionVariableQueryInput.html +2 -2
- package/docs/interfaces/ITemporaryTableQueryInput.html +2 -2
- package/docs/interfaces/IUpdateQueryResult.html +2 -2
- package/docs/types/IDeleteQueryResult.html +1 -1
- package/docs/types/IHandlerError.html +1 -1
- package/docs/types/IHandlerResponse.html +1 -1
- package/docs/types/TCoordinate.html +1 -1
- package/lib/Application.js +5 -5
- package/lib/Application.js.map +1 -1
- package/lib/ConfigLoader.js +12 -1
- package/lib/ConfigLoader.js.map +1 -1
- package/package.json +2 -2
- package/src/Application.ts +6 -6
- package/src/ConfigLoader.ts +18 -2
package/src/Application.ts
CHANGED
|
@@ -420,7 +420,7 @@ export abstract class Application
|
|
|
420
420
|
filePath = Path.resolve(this.$configDir, 'bt-local-config.json');
|
|
421
421
|
}
|
|
422
422
|
|
|
423
|
-
this.$localConfigPath = filePath;
|
|
423
|
+
this.$localConfigPath = Path.resolve(filePath);
|
|
424
424
|
}
|
|
425
425
|
|
|
426
426
|
return this.$localConfigPath;
|
|
@@ -434,7 +434,7 @@ export abstract class Application
|
|
|
434
434
|
filePath = Path.resolve(this.$configDir, 'bt-config.json');
|
|
435
435
|
}
|
|
436
436
|
|
|
437
|
-
this.$configPath = filePath;
|
|
437
|
+
this.$configPath = Path.resolve(filePath);
|
|
438
438
|
}
|
|
439
439
|
|
|
440
440
|
return this.$configPath;
|
|
@@ -501,12 +501,12 @@ export abstract class Application
|
|
|
501
501
|
let program: Command = this.$program;
|
|
502
502
|
let o: IStormCLIArgs = {};
|
|
503
503
|
|
|
504
|
-
let opts: any = program.opts();
|
|
505
|
-
|
|
506
504
|
if (!program) {
|
|
507
505
|
return o;
|
|
508
506
|
}
|
|
509
507
|
|
|
508
|
+
let opts: any = program.opts();
|
|
509
|
+
|
|
510
510
|
if (opts.bind !== undefined) {
|
|
511
511
|
o.bind = opts.bind;
|
|
512
512
|
}
|
|
@@ -519,11 +519,11 @@ export abstract class Application
|
|
|
519
519
|
o.authentication_header = opts.authentication_header;
|
|
520
520
|
}
|
|
521
521
|
|
|
522
|
-
if (opts.
|
|
522
|
+
if (opts.config !== undefined) {
|
|
523
523
|
o.configFile = opts.config;
|
|
524
524
|
}
|
|
525
525
|
|
|
526
|
-
if (opts.
|
|
526
|
+
if (opts.localConfig !== undefined) {
|
|
527
527
|
o.localConfigFile = opts.localConfig;
|
|
528
528
|
}
|
|
529
529
|
|
package/src/ConfigLoader.ts
CHANGED
|
@@ -271,7 +271,23 @@ export class ConfigLoader<TConfig extends IConfig = IConfig> {
|
|
|
271
271
|
}
|
|
272
272
|
}
|
|
273
273
|
|
|
274
|
-
private $getCmdLineArgs():
|
|
275
|
-
|
|
274
|
+
private $getCmdLineArgs(): Partial<IConfig> {
|
|
275
|
+
let cliArgs: IStormCLIArgs = this.$app.getCmdLineArgs();
|
|
276
|
+
|
|
277
|
+
let out: Partial<IConfig> = {}
|
|
278
|
+
|
|
279
|
+
if (cliArgs.bind !== undefined) {
|
|
280
|
+
out.bind = cliArgs.bind;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
if (cliArgs.port !== undefined) {
|
|
284
|
+
out.port = cliArgs.port;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if (cliArgs.authentication_header !== undefined) {
|
|
288
|
+
out.authentication_header = cliArgs.authentication_header;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
return out;
|
|
276
292
|
}
|
|
277
293
|
}
|