@breautek/storm 6.1.0-beta.3 → 6.1.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/docs/assets/search.js +1 -1
  3. package/docs/classes/Application.html +19 -17
  4. package/docs/classes/BackendAuthenticationMiddleware.html +3 -3
  5. package/docs/classes/CORSMiddleware.html +3 -3
  6. package/docs/classes/ConfigLoader.html +3 -3
  7. package/docs/classes/Database.html +2 -2
  8. package/docs/classes/DatabaseCastObject.html +2 -2
  9. package/docs/classes/DatabaseConnection.html +19 -19
  10. package/docs/classes/DatabaseQueryError.html +5 -5
  11. package/docs/classes/DeadLockError.html +5 -5
  12. package/docs/classes/DiskSpaceError.html +5 -5
  13. package/docs/classes/DropTemporaryTableQuery.html +6 -6
  14. package/docs/classes/DuplicateEntryError.html +5 -5
  15. package/docs/classes/EntityNotFoundError.html +5 -5
  16. package/docs/classes/ExpiredTokenError.html +5 -5
  17. package/docs/classes/Handler.html +2 -2
  18. package/docs/classes/InternalError.html +5 -5
  19. package/docs/classes/InvalidCredentialsError.html +5 -5
  20. package/docs/classes/InvalidValueError.html +5 -5
  21. package/docs/classes/LineString.html +2 -2
  22. package/docs/classes/LockWaitTimeoutError.html +5 -5
  23. package/docs/classes/ManagedDatabaseConnection.html +2 -2
  24. package/docs/classes/Middleware.html +2 -2
  25. package/docs/classes/MissingConfigError.html +5 -5
  26. package/docs/classes/MissingParameterError.html +5 -5
  27. package/docs/classes/MySQLConnection.html +19 -19
  28. package/docs/classes/MySQLDatabase.html +2 -2
  29. package/docs/classes/NotImplementedError.html +5 -5
  30. package/docs/classes/Point.html +2 -2
  31. package/docs/classes/Polygon.html +2 -2
  32. package/docs/classes/Query.html +6 -6
  33. package/docs/classes/RawError.html +5 -5
  34. package/docs/classes/RawQuery.html +6 -6
  35. package/docs/classes/Request.html +2 -2
  36. package/docs/classes/Response.html +2 -2
  37. package/docs/classes/ResponseData.html +2 -2
  38. package/docs/classes/ServiceProvider.html +2 -2
  39. package/docs/classes/ServiceResponse.html +2 -2
  40. package/docs/classes/SetSessionVariableQuery.html +6 -6
  41. package/docs/classes/StormError.html +5 -5
  42. package/docs/classes/TemporaryTableQuery.html +6 -6
  43. package/docs/classes/Token.html +2 -2
  44. package/docs/classes/TokenManager.html +2 -2
  45. package/docs/classes/Transaction.html +2 -2
  46. package/docs/classes/UnauthorizedAccessError.html +5 -5
  47. package/docs/enums/ErrorCode.html +2 -2
  48. package/docs/enums/ExitCode.html +2 -2
  49. package/docs/enums/HTTPMethod.html +2 -2
  50. package/docs/enums/IsolationLevel.html +2 -2
  51. package/docs/enums/JWTError.html +2 -2
  52. package/docs/enums/StatusCode.html +2 -2
  53. package/docs/functions/getInstance.html +1 -1
  54. package/docs/interfaces/IAdditionalErrorDetails.html +1 -1
  55. package/docs/interfaces/ICloudwatchConfig.html +2 -2
  56. package/docs/interfaces/ICloudwatchCredentials.html +2 -2
  57. package/docs/interfaces/ICloudwatchStreamConfig.html +2 -2
  58. package/docs/interfaces/IConfig.html +2 -2
  59. package/docs/interfaces/IDatabaseConfig.html +2 -2
  60. package/docs/interfaces/IDatabaseConnection.html +2 -2
  61. package/docs/interfaces/IErrorResponse.html +2 -2
  62. package/docs/interfaces/IFormData.html +2 -2
  63. package/docs/interfaces/IHandler.html +2 -2
  64. package/docs/interfaces/IInsertQueryResult.html +2 -2
  65. package/docs/interfaces/IJWTVerifyOptions.html +2 -2
  66. package/docs/interfaces/IParameterMap.html +1 -1
  67. package/docs/interfaces/IQueryable.html +2 -2
  68. package/docs/interfaces/IRequestResponse.html +2 -2
  69. package/docs/interfaces/IServiceHeaders.html +1 -1
  70. package/docs/interfaces/ISetSessionVariableQueryInput.html +2 -2
  71. package/docs/interfaces/ITemporaryTableQueryInput.html +2 -2
  72. package/docs/interfaces/IUpdateQueryResult.html +2 -2
  73. package/docs/types/IDeleteQueryResult.html +1 -1
  74. package/docs/types/IHandlerError.html +1 -1
  75. package/docs/types/IHandlerResponse.html +1 -1
  76. package/docs/types/TCoordinate.html +1 -1
  77. package/lib/Application.d.ts +6 -0
  78. package/lib/Application.js +11 -1
  79. package/lib/Application.js.map +1 -1
  80. package/lib/ConfigLoader.js +1 -1
  81. package/lib/ConfigLoader.js.map +1 -1
  82. package/package.json +1 -1
  83. package/src/Application.ts +13 -1
  84. package/src/ConfigLoader.ts +1 -1
@@ -44,6 +44,7 @@ export interface IStormCLIArgs {
44
44
  authentication_header?: string;
45
45
  configFile?: string;
46
46
  localConfigFile?: string;
47
+ custom: Record<string, any>;
47
48
  }
48
49
 
49
50
  const TAG: string = 'Application';
@@ -317,6 +318,14 @@ export abstract class Application
317
318
  return this.$program;
318
319
  }
319
320
 
321
+ /**
322
+ * Override this method to map CLI args to customConfig
323
+ * @param args
324
+ */
325
+ public getConfigFromCLIArgs(args: any): Record<string, any> {
326
+ return {};
327
+ }
328
+
320
329
  /**
321
330
  * The maximum size limit for incoming requests that this service needs to handle.
322
331
  */
@@ -499,13 +508,16 @@ export abstract class Application
499
508
  */
500
509
  public getCmdLineArgs(): IStormCLIArgs {
501
510
  let program: Command = this.$program;
502
- let o: IStormCLIArgs = {};
511
+ let o: IStormCLIArgs = {
512
+ custom: null
513
+ };
503
514
 
504
515
  if (!program) {
505
516
  return o;
506
517
  }
507
518
 
508
519
  let opts: any = program.opts();
520
+ o.custom = opts;
509
521
 
510
522
  if (opts.bind !== undefined) {
511
523
  o.bind = opts.bind;
@@ -74,7 +74,7 @@ export class ConfigLoader<TConfig extends IConfig = IConfig> {
74
74
  }
75
75
 
76
76
  // This will pull all custom configurations into customConfig
77
- config.customConfig = MergeChange.merge(config.customConfig, this.$app.getCmdLineArgs());
77
+ config.customConfig = MergeChange.merge(config.customConfig, this.$app.getConfigFromCLIArgs(this.$app.getCmdLineArgs()));
78
78
 
79
79
  if (config.log.level === null) {
80
80
  config.log.level = defaults.log.level;