@breautek/storm 8.4.0 → 8.6.0
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 +15 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/highlight.css +16 -16
- package/docs/assets/main.js +5 -5
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +251 -229
- package/docs/classes/Application.html +173 -173
- package/docs/classes/BackendAuthenticationMiddleware.html +5 -5
- package/docs/classes/CORSMiddleware.html +10 -10
- package/docs/classes/ConfigLoader.html +5 -5
- package/docs/classes/Database.html +13 -13
- package/docs/classes/DatabaseCastObject.html +5 -5
- package/docs/classes/DatabaseConnection.html +48 -48
- package/docs/classes/DatabaseQueryError.html +26 -22
- package/docs/classes/DeadLockError.html +27 -23
- package/docs/classes/DiskSpaceError.html +22 -22
- package/docs/classes/DropTemporaryTableQuery.html +20 -17
- package/docs/classes/DuplicateEntryError.html +22 -22
- package/docs/classes/EntityNotFoundError.html +22 -22
- package/docs/classes/ExpiredTokenError.html +22 -22
- package/docs/classes/Handler.html +14 -14
- package/docs/classes/InternalError.html +22 -22
- package/docs/classes/InvalidCredentialsError.html +22 -22
- package/docs/classes/InvalidValueError.html +22 -22
- package/docs/classes/LineString.html +5 -5
- package/docs/classes/LockWaitTimeoutError.html +27 -23
- package/docs/classes/ManagedDatabaseConnection.html +27 -24
- package/docs/classes/Middleware.html +4 -4
- package/docs/classes/MissingConfigError.html +22 -22
- package/docs/classes/MissingParameterError.html +22 -22
- package/docs/classes/MySQLConnection.html +50 -50
- package/docs/classes/MySQLDatabase.html +14 -14
- package/docs/classes/NotImplementedError.html +22 -22
- package/docs/classes/Point.html +5 -5
- package/docs/classes/Polygon.html +5 -5
- package/docs/classes/Query.html +20 -17
- package/docs/classes/RawError.html +23 -23
- package/docs/classes/RawQuery.html +20 -17
- package/docs/classes/Request.html +19 -19
- package/docs/classes/Response.html +12 -12
- package/docs/classes/ResponseData.html +8 -8
- package/docs/classes/ServiceProvider.html +16 -16
- package/docs/classes/ServiceResponse.html +6 -6
- package/docs/classes/SetSessionVariableQuery.html +20 -17
- package/docs/classes/StormError.html +22 -22
- package/docs/classes/TemporaryTableQuery.html +20 -17
- package/docs/classes/TimeoutError.html +23 -23
- package/docs/classes/Token.html +3 -3
- package/docs/classes/TokenManager.html +5 -5
- package/docs/classes/Transaction.html +9 -9
- package/docs/classes/UnauthorizedAccessError.html +22 -22
- package/docs/enums/ErrorCode.html +10 -10
- package/docs/enums/ExitCode.html +3 -3
- package/docs/enums/HTTPMethod.html +5 -5
- package/docs/enums/IsolationLevel.html +5 -5
- package/docs/enums/JWTError.html +3 -3
- package/docs/enums/StatusCode.html +49 -49
- package/docs/enums/TransactionAccessLevel.html +4 -0
- package/docs/functions/getInstance.html +2 -2
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +1 -1
- package/docs/interfaces/IAdditionalErrorDetails.html +1 -1
- package/docs/interfaces/IAuthTokenData.html +4 -4
- package/docs/interfaces/ICloudwatchConfig.html +4 -4
- package/docs/interfaces/ICloudwatchCredentials.html +3 -3
- package/docs/interfaces/ICloudwatchStreamConfig.html +3 -3
- package/docs/interfaces/IConfig.html +10 -10
- package/docs/interfaces/IDatabaseConfig.html +7 -7
- package/docs/interfaces/IDatabaseConnection.html +22 -19
- package/docs/interfaces/IDatabasePosition.html +4 -4
- package/docs/interfaces/IErrorResponse.html +6 -6
- package/docs/interfaces/IFormData.html +3 -3
- package/docs/interfaces/IHandler.html +2 -2
- package/docs/interfaces/IInsertQueryResult.html +4 -4
- package/docs/interfaces/IJWTVerifyOptions.html +2 -2
- package/docs/interfaces/IOKPacket.html +10 -10
- package/docs/interfaces/IParameterMap.html +1 -1
- package/docs/interfaces/IQueryable.html +7 -7
- package/docs/interfaces/IRequestResponse.html +3 -3
- package/docs/interfaces/IServiceHeaders.html +1 -1
- package/docs/interfaces/ISetSessionVariableQueryInput.html +3 -3
- package/docs/interfaces/IStormCLIArgs.html +7 -7
- package/docs/interfaces/ITemporaryTableQueryInput.html +3 -3
- package/docs/interfaces/IUpdateQueryResult.html +3 -3
- package/docs/interfaces/formidable.EmitData.html +5 -0
- package/docs/interfaces/formidable.EventData.html +8 -0
- package/docs/interfaces/formidable.File.html +25 -0
- package/docs/interfaces/formidable.FileJSON.html +19 -0
- package/docs/interfaces/formidable.Options.html +88 -0
- package/docs/interfaces/formidable.Part.html +148 -0
- package/docs/modules/formidable.html +1 -1
- package/docs/types/IDeleteQueryResult.html +1 -1
- package/docs/types/IHandlerError.html +2 -2
- package/docs/types/IHandlerResponse.html +2 -2
- package/docs/types/IStoredProcedureResult.html +3 -3
- package/docs/types/TCoordinate.html +1 -1
- package/docs/types/formidable.BufferEncoding.html +1 -0
- package/docs/types/formidable.DefaultOptions.html +1 -0
- package/docs/types/formidable.EnabledPlugins.html +1 -0
- package/docs/types/formidable.EventNames.html +15 -0
- package/docs/types/formidable.Fields.html +1 -0
- package/docs/types/formidable.Files.html +1 -0
- package/docs/types/formidable.MappedParsers.html +1 -0
- package/docs/types/formidable.Plugin.html +1 -0
- package/docs/types/formidable.PluginFunction.html +1 -0
- package/docs/types/formidable.Plugins.html +1 -0
- package/docs/variables/formidable.html +1 -0
- package/lib/DatabaseQueryError.d.ts +6 -0
- package/lib/DatabaseQueryError.js +8 -0
- package/lib/DatabaseQueryError.js.map +1 -1
- package/lib/IDatabaseConnection.d.ts +5 -1
- package/lib/ManagedDatabaseConnection.d.ts +2 -1
- package/lib/ManagedDatabaseConnection.js +2 -2
- package/lib/ManagedDatabaseConnection.js.map +1 -1
- package/lib/MySQLConnection.d.ts +2 -1
- package/lib/MySQLConnection.js +7 -5
- package/lib/MySQLConnection.js.map +1 -1
- package/lib/Query.d.ts +2 -0
- package/lib/Query.js +2 -0
- package/lib/Query.js.map +1 -1
- package/lib/Transaction.d.ts +3 -1
- package/lib/Transaction.js +4 -2
- package/lib/Transaction.js.map +1 -1
- package/lib/TransactionAccessLevel.d.ts +7 -0
- package/lib/TransactionAccessLevel.js +27 -0
- package/lib/TransactionAccessLevel.js.map +1 -0
- package/lib/api.d.ts +1 -0
- package/lib/api.js +4 -2
- package/lib/api.js.map +1 -1
- package/lib/private/StartTransactionQuery.d.ts +8 -1
- package/lib/private/StartTransactionQuery.js +11 -2
- package/lib/private/StartTransactionQuery.js.map +1 -1
- package/package.json +15 -15
- package/src/DatabaseQueryError.ts +9 -0
- package/src/IDatabaseConnection.ts +6 -1
- package/src/ManagedDatabaseConnection.ts +3 -2
- package/src/MySQLConnection.ts +9 -8
- package/src/Query.ts +2 -0
- package/src/Transaction.ts +5 -2
- package/src/TransactionAccessLevel.ts +23 -0
- package/src/api.ts +1 -0
- package/src/private/StartTransactionQuery.ts +22 -4
- package/docs/variables/formidable-1.html +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Files | @breautek/storm</title><meta name="description" content="Documentation for @breautek/storm"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@breautek/storm</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/formidable.html">formidable</a></li><li><a href="" aria-current="page">Files</a></li></ul><h1>Type Alias Files<U></h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Files</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-signature-keyword">readonly</span> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-type-parameter">Prop</span> <span class="tsd-signature-keyword">in</span> <a class="tsd-signature-type tsd-kind-type-parameter" href="#u">U</a><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">?:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../interfaces/formidable.File.html" class="tsd-signature-type tsd-kind-interface">File</a><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">}</span></div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="u"><span class="tsd-kind-type-parameter">U</span> <span class="tsd-signature-keyword">extends</span> <span class="tsd-signature-type">string</span> = <span class="tsd-signature-type">string</span></span></li></ul></section><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/formidable/index.d.ts:204</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">@breautek/storm</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>MappedParsers | @breautek/storm</title><meta name="description" content="Documentation for @breautek/storm"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@breautek/storm</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/formidable.html">formidable</a></li><li><a href="" aria-current="page">MappedParsers</a></li></ul><h1>Type Alias MappedParsers</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">MappedParsers</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-type-parameter">P</span> <span class="tsd-signature-keyword">in</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">parsers</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">parsers</span><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type tsd-kind-type-parameter">P</span><span class="tsd-signature-symbol">]</span> <span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/formidable/index.d.ts:297</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">@breautek/storm</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Plugin | @breautek/storm</title><meta name="description" content="Documentation for @breautek/storm"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@breautek/storm</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/formidable.html">formidable</a></li><li><a href="" aria-current="page">Plugin</a></li></ul><h1>Type Alias Plugin</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Plugin</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">keyof</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-signature-symbol">[</span><span class="tsd-kind-type-parameter">K</span> <span class="tsd-signature-keyword">in</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="formidable.Plugins.html" class="tsd-signature-type tsd-kind-type-alias">Plugins</a><span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">]</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type tsd-kind-type-parameter">K</span> <span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/formidable/index.d.ts:303</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">@breautek/storm</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>PluginFunction | @breautek/storm</title><meta name="description" content="Documentation for @breautek/storm"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@breautek/storm</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/formidable.html">formidable</a></li><li><a href="" aria-current="page">PluginFunction</a></li></ul><h1>Type Alias PluginFunction</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">PluginFunction</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><br/> <span class="tsd-kind-parameter">formidable</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Formidable</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../interfaces/formidable.Options.html" class="tsd-signature-type tsd-kind-interface">Options</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">void</span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-is-external"><li class="tsd-signature" id="__type"><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">formidable</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Formidable</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../interfaces/formidable.Options.html" class="tsd-signature-type tsd-kind-interface">Options</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span></li><li class="tsd-description"><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">formidable</span>: <span class="tsd-signature-type">Formidable</span></span></li><li><span><span class="tsd-kind-parameter">options</span>: <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../interfaces/formidable.Options.html" class="tsd-signature-type tsd-kind-interface">Options</a><span class="tsd-signature-symbol">></span></span></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/formidable/index.d.ts:295</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">@breautek/storm</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Plugins | @breautek/storm</title><meta name="description" content="Documentation for @breautek/storm"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@breautek/storm</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="../modules/formidable.html">formidable</a></li><li><a href="" aria-current="page">Plugins</a></li></ul><h1>Type Alias Plugins</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">Plugins</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">[</span><span class="tsd-signature-type">"octetstream"</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">"querystring"</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">"multipart"</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">"json"</span><span class="tsd-signature-symbol">]</span></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/formidable/index.d.ts:301</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">@breautek/storm</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>formidable | @breautek/storm</title><meta name="description" content="Documentation for @breautek/storm"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script><script async src="../assets/hierarchy.js" id="tsd-hierarchy-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@breautek/storm</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">formidable</a></li></ul><h1>Variable formidable</h1></div><div class="tsd-signature"><span class="tsd-kind-variable">formidable</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-namespace">default</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">default</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">defaultOptions</span><span class="tsd-signature-symbol">:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.DefaultOptions.html" class="tsd-signature-type tsd-kind-type-alias">DefaultOptions</a><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">enabledPlugins</span><span class="tsd-signature-symbol">:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.EnabledPlugins.html" class="tsd-signature-type tsd-kind-type-alias">EnabledPlugins</a><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">errors</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">FormidableError</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">FormidableError</span> <span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"aborted"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"missingPlugin"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"pluginFunction"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"noParser"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"uninitializedParser"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"filenameNotString"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"maxFieldsSizeExceeded"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"maxFieldsExceeded"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"smallerThanMinFileSize"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"biggerThanMaxFileSize"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"noEmptyFiles"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"missingContentType"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"malformedMultipart"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"missingMultipartBoundary"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"unknownTransferEncoding"</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">File</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">PersistentFile</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">formidable</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../interfaces/formidable.Options.html" class="tsd-signature-type tsd-kind-interface">Options</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">IncomingForm</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">Formidable</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">IncomingForm</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">IncomingForm</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">IncomingForm</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">parsers</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">__module</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">PersistentFile</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">PersistentFile</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">plugins</span><span class="tsd-signature-symbol">:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.EnabledPlugins.html" class="tsd-signature-type tsd-kind-type-alias">EnabledPlugins</a><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">VolatileFile</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">VolatileFile</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../interfaces/formidable.Options.html" class="tsd-signature-type tsd-kind-interface">Options</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IncomingForm</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">&</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.MappedParsers.html" class="tsd-signature-type tsd-kind-type-alias">MappedParsers</a><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">defaultOptions</span><span class="tsd-signature-symbol">:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.DefaultOptions.html" class="tsd-signature-type tsd-kind-type-alias">DefaultOptions</a><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">DummyParser</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">DummyParser</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">enabledPlugins</span><span class="tsd-signature-symbol">:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.EnabledPlugins.html" class="tsd-signature-type tsd-kind-type-alias">EnabledPlugins</a><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">errors</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">FormidableError</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">FormidableError</span> <span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"aborted"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"missingPlugin"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"pluginFunction"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"noParser"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"uninitializedParser"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"filenameNotString"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"maxFieldsSizeExceeded"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"maxFieldsExceeded"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"smallerThanMinFileSize"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"biggerThanMaxFileSize"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"noEmptyFiles"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"missingContentType"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"malformedMultipart"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"missingMultipartBoundary"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"unknownTransferEncoding"</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">File</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">PersistentFile</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">formidable</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../interfaces/formidable.Options.html" class="tsd-signature-type tsd-kind-interface">Options</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">IncomingForm</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">Formidable</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">IncomingForm</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">IncomingForm</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">IncomingForm</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">JSONParser</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">JSONParser</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">MultipartParser</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">MultipartParser</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">OctetStreamParser</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">OctetStreamParser</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">parsers</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">__module</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">PersistentFile</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">PersistentFile</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">plugins</span><span class="tsd-signature-symbol">:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.EnabledPlugins.html" class="tsd-signature-type tsd-kind-type-alias">EnabledPlugins</a><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">QuerystringParser</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">QuerystringParser</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">StreamingQuerystring</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">StreamingQuerystring</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">VolatileFile</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">VolatileFile</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5 id="default-1"><span class="tsd-kind-property">default</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{</span><br/> <span class="tsd-kind-property">defaultOptions</span><span class="tsd-signature-symbol">:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.DefaultOptions.html" class="tsd-signature-type tsd-kind-type-alias">DefaultOptions</a><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">enabledPlugins</span><span class="tsd-signature-symbol">:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.EnabledPlugins.html" class="tsd-signature-type tsd-kind-type-alias">EnabledPlugins</a><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">errors</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">FormidableError</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">FormidableError</span> <span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"aborted"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"missingPlugin"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"pluginFunction"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"noParser"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"uninitializedParser"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"filenameNotString"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"maxFieldsSizeExceeded"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"maxFieldsExceeded"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"smallerThanMinFileSize"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"biggerThanMaxFileSize"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"noEmptyFiles"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"missingContentType"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"malformedMultipart"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"missingMultipartBoundary"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"unknownTransferEncoding"</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">File</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">PersistentFile</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">formidable</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../interfaces/formidable.Options.html" class="tsd-signature-type tsd-kind-interface">Options</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">IncomingForm</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">Formidable</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">IncomingForm</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">IncomingForm</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">IncomingForm</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">parsers</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">__module</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">PersistentFile</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">PersistentFile</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">plugins</span><span class="tsd-signature-symbol">:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.EnabledPlugins.html" class="tsd-signature-type tsd-kind-type-alias">EnabledPlugins</a><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-kind-property">VolatileFile</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">VolatileFile</span><span class="tsd-signature-symbol">;</span><br/> <span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../interfaces/formidable.Options.html" class="tsd-signature-type tsd-kind-interface">Options</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">IncomingForm</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">&</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.MappedParsers.html" class="tsd-signature-type tsd-kind-type-alias">MappedParsers</a></h5></li><li class="tsd-parameter"><h5 id="defaultoptions-1"><span class="tsd-kind-property">defaultOptions</span><span class="tsd-signature-symbol">: </span><a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.DefaultOptions.html" class="tsd-signature-type tsd-kind-type-alias">DefaultOptions</a></h5></li><li class="tsd-parameter"><h5 id="dummyparser"><span class="tsd-kind-property">DummyParser</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">DummyParser</span></h5></li><li class="tsd-parameter"><h5 id="enabledplugins"><span class="tsd-kind-property">enabledPlugins</span><span class="tsd-signature-symbol">: </span><a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.EnabledPlugins.html" class="tsd-signature-type tsd-kind-type-alias">EnabledPlugins</a></h5></li><li class="tsd-parameter"><h5 id="errors"><span class="tsd-kind-property">errors</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">FormidableError</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">FormidableError</span> <span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">&</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"aborted"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"missingPlugin"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"pluginFunction"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"noParser"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"uninitializedParser"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"filenameNotString"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"maxFieldsSizeExceeded"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"maxFieldsExceeded"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"smallerThanMinFileSize"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"biggerThanMaxFileSize"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"noEmptyFiles"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"missingContentType"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"malformedMultipart"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"missingMultipartBoundary"</span><br/> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">"unknownTransferEncoding"</span><span class="tsd-signature-symbol">,</span><br/> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">></span></h5></li><li class="tsd-parameter"><h5 id="file"><span class="tsd-kind-property">File</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">PersistentFile</span></h5></li><li class="tsd-parameter"><h5 id="formidable"><span class="tsd-kind-property">formidable</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">options</span><span class="tsd-signature-symbol">?:</span> <a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../interfaces/formidable.Options.html" class="tsd-signature-type tsd-kind-interface">Options</a><span class="tsd-signature-symbol">)</span> <span class="tsd-signature-symbol">=></span> <span class="tsd-signature-type">IncomingForm</span></h5></li><li class="tsd-parameter"><h5 id="formidable-1"><span class="tsd-kind-property">Formidable</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">IncomingForm</span></h5></li><li class="tsd-parameter"><h5 id="incomingform"><span class="tsd-kind-property">IncomingForm</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">IncomingForm</span></h5></li><li class="tsd-parameter"><h5 id="jsonparser"><span class="tsd-kind-property">JSONParser</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">JSONParser</span></h5></li><li class="tsd-parameter"><h5 id="multipartparser"><span class="tsd-kind-property">MultipartParser</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">MultipartParser</span></h5></li><li class="tsd-parameter"><h5 id="octetstreamparser"><span class="tsd-kind-property">OctetStreamParser</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">OctetStreamParser</span></h5></li><li class="tsd-parameter"><h5 id="parsers"><span class="tsd-kind-property">parsers</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">__module</span></h5></li><li class="tsd-parameter"><h5 id="persistentfile"><span class="tsd-kind-property">PersistentFile</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">PersistentFile</span></h5></li><li class="tsd-parameter"><h5 id="plugins"><span class="tsd-kind-property">plugins</span><span class="tsd-signature-symbol">: </span><a href="../modules/formidable.html" class="tsd-signature-type tsd-kind-namespace">formidable</a><span class="tsd-signature-symbol">.</span><a href="../types/formidable.EnabledPlugins.html" class="tsd-signature-type tsd-kind-type-alias">EnabledPlugins</a></h5></li><li class="tsd-parameter"><h5 id="querystringparser"><span class="tsd-kind-property">QuerystringParser</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">QuerystringParser</span></h5></li><li class="tsd-parameter"><h5 id="streamingquerystring"><span class="tsd-kind-property">StreamingQuerystring</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">StreamingQuerystring</span></h5></li><li class="tsd-parameter"><h5 id="volatilefile"><span class="tsd-kind-property">VolatileFile</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-keyword">typeof</span> <span class="tsd-signature-type">VolatileFile</span></h5></li></ul></div><aside class="tsd-sources"><ul><li>Defined in node_modules/@types/formidable/index.d.ts:10</li><li>Defined in node_modules/@types/formidable/index.d.ts:314</li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../index.html">@breautek/storm</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
|
|
@@ -7,6 +7,12 @@ export declare class DatabaseQueryError extends StormError<{
|
|
|
7
7
|
constructor(query: string, error: any);
|
|
8
8
|
getMessage(): string;
|
|
9
9
|
getCode(): number;
|
|
10
|
+
/**
|
|
11
|
+
* If the underlying error is a database error, then
|
|
12
|
+
* returns the database error code as sting.
|
|
13
|
+
* @since 8.5.0
|
|
14
|
+
*/
|
|
15
|
+
getDBErrorCode(): string | null;
|
|
10
16
|
getHTTPCode(): StatusCode;
|
|
11
17
|
getLocaleCode(): string;
|
|
12
18
|
}
|
|
@@ -31,6 +31,14 @@ class DatabaseQueryError extends StormError_1.StormError {
|
|
|
31
31
|
getCode() {
|
|
32
32
|
return 0;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* If the underlying error is a database error, then
|
|
36
|
+
* returns the database error code as sting.
|
|
37
|
+
* @since 8.5.0
|
|
38
|
+
*/
|
|
39
|
+
getDBErrorCode() {
|
|
40
|
+
return this.getPrivateDetails()?.error?.code || null;
|
|
41
|
+
}
|
|
34
42
|
getHTTPCode() {
|
|
35
43
|
return StatusCode_1.StatusCode.INTERNAL_ERROR;
|
|
36
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatabaseQueryError.js","sourceRoot":"","sources":["../src/DatabaseQueryError.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,6CAAwC;AACxC,6CAAwC;AAExC,MAAa,kBAAmB,SAAQ,uBAGtC;IACE,YAAmB,KAAa,EAAE,KAAU;QACxC,KAAK,CAAC;YACF,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,KAAK;SACf,CAAC,CAAC;IACP,CAAC;IAEM,UAAU;QACb,OAAO,uBAAuB,CAAC;IACnC,CAAC;IAEM,OAAO;QACV,OAAO,CAAC,CAAC;IACb,CAAC;IAEM,WAAW;QACd,OAAO,uBAAU,CAAC,cAAc,CAAC;IACrC,CAAC;IAEe,aAAa;QACzB,OAAO,uCAAuC,CAAC;IACnD,CAAC;CACJ;
|
|
1
|
+
{"version":3,"file":"DatabaseQueryError.js","sourceRoot":"","sources":["../src/DatabaseQueryError.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAEF,6CAAwC;AACxC,6CAAwC;AAExC,MAAa,kBAAmB,SAAQ,uBAGtC;IACE,YAAmB,KAAa,EAAE,KAAU;QACxC,KAAK,CAAC;YACF,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,KAAK;SACf,CAAC,CAAC;IACP,CAAC;IAEM,UAAU;QACb,OAAO,uBAAuB,CAAC;IACnC,CAAC;IAEM,OAAO;QACV,OAAO,CAAC,CAAC;IACb,CAAC;IAED;;;;OAIG;IACI,cAAc;QACjB,OAAO,IAAI,CAAC,iBAAiB,EAAE,EAAE,KAAK,EAAE,IAAI,IAAI,IAAI,CAAC;IACzD,CAAC;IAEM,WAAW;QACd,OAAO,uBAAU,CAAC,cAAc,CAAC;IACrC,CAAC;IAEe,aAAa;QACzB,OAAO,uCAAuC,CAAC;IACnD,CAAC;CACJ;AAnCD,gDAmCC"}
|
|
@@ -2,6 +2,7 @@ import { Readable } from 'stream';
|
|
|
2
2
|
import { IQueryable } from './IQueryable';
|
|
3
3
|
import { IsolationLevel } from './IsolationLevel';
|
|
4
4
|
import { IDatabasePosition } from './IDatabasePosition';
|
|
5
|
+
import { TransactionAccessLevel } from './TransactionAccessLevel';
|
|
5
6
|
export interface IDatabaseConnection {
|
|
6
7
|
setInstantiationStack(stack: string): void;
|
|
7
8
|
getInstantiationStack(): string;
|
|
@@ -10,10 +11,13 @@ export interface IDatabaseConnection {
|
|
|
10
11
|
setTimeout(timeout: number): void;
|
|
11
12
|
getTimeout(): number;
|
|
12
13
|
query(query: IQueryable<any>, params?: any): Promise<any>;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated - Streaming queries does not support post processing, creating a confusing API
|
|
16
|
+
*/
|
|
13
17
|
stream(query: IQueryable<any>, params?: any, streamOptions?: any): Readable;
|
|
14
18
|
close(forceClose?: boolean): Promise<void>;
|
|
15
19
|
isClosed(): boolean;
|
|
16
|
-
startTransaction(level?: IsolationLevel): Promise<void>;
|
|
20
|
+
startTransaction(level?: IsolationLevel, accessLevel?: TransactionAccessLevel): Promise<void>;
|
|
17
21
|
isTransaction(): boolean;
|
|
18
22
|
commit(): Promise<void>;
|
|
19
23
|
rollback(): Promise<void>;
|
|
@@ -4,6 +4,7 @@ import { Query } from './Query';
|
|
|
4
4
|
import { IsolationLevel } from './IsolationLevel';
|
|
5
5
|
import { IDatabasePosition } from './IDatabasePosition';
|
|
6
6
|
import { IQueryable } from './IQueryable';
|
|
7
|
+
import { TransactionAccessLevel } from './TransactionAccessLevel';
|
|
7
8
|
export declare class ManagedDatabaseConnection implements IDatabaseConnection {
|
|
8
9
|
private $connection;
|
|
9
10
|
/**
|
|
@@ -30,7 +31,7 @@ export declare class ManagedDatabaseConnection implements IDatabaseConnection {
|
|
|
30
31
|
query(query: Query, params?: any): Promise<any>;
|
|
31
32
|
stream(query: Query, params?: any, streamOptions?: any): Readable;
|
|
32
33
|
close(forceClose?: boolean): Promise<void>;
|
|
33
|
-
startTransaction(isolationLevel?: IsolationLevel): Promise<void>;
|
|
34
|
+
startTransaction(isolationLevel?: IsolationLevel, accessLevel?: TransactionAccessLevel): Promise<void>;
|
|
34
35
|
isTransaction(): boolean;
|
|
35
36
|
commit(): Promise<void>;
|
|
36
37
|
rollback(): Promise<void>;
|
|
@@ -140,11 +140,11 @@ class ManagedDatabaseConnection {
|
|
|
140
140
|
}
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
|
-
startTransaction(isolationLevel) {
|
|
143
|
+
startTransaction(isolationLevel, accessLevel) {
|
|
144
144
|
return new Promise((resolve, reject) => {
|
|
145
145
|
this.$getConnection().then((connection) => {
|
|
146
146
|
if (!this.isManaged()) {
|
|
147
|
-
connection.startTransaction(isolationLevel).then(resolve).catch(reject);
|
|
147
|
+
connection.startTransaction(isolationLevel, accessLevel).then(resolve).catch(reject);
|
|
148
148
|
}
|
|
149
149
|
else {
|
|
150
150
|
resolve();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ManagedDatabaseConnection.js","sourceRoot":"","sources":["../src/ManagedDatabaseConnection.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAGF,yCAAuC;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AC;YAChD,CAAC;YAED,OAAO,CAAC,IAAI,CAAC,CAAC,UAA+B,EAAE,EAAE;gBAC7C,IAAI,0BAA0B,EAAE,CAAC;oBAC7B,UAAU,CAAC,qBAAqB,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;gBAC5D,CAAC;gBACD,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;gBAC9B,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC9B,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACrB,CAAC,CAAC,CAAC;IACP,CAAC;IAEM,MAAM;QACT,IAAI,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;YACvB,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC;QACrC,CAAC;aACI,CAAC;YACF,OAAO,IAAI,CAAC;QAChB,CAAC;IACL,CAAC;CACJ;AAtOD,8DAsOC"}
|
package/lib/MySQLConnection.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { Readable } from 'stream';
|
|
|
4
4
|
import { IsolationLevel } from './IsolationLevel';
|
|
5
5
|
import { IDatabasePosition } from './IDatabasePosition';
|
|
6
6
|
import { IQueryable } from './IQueryable';
|
|
7
|
+
import { TransactionAccessLevel } from './TransactionAccessLevel';
|
|
7
8
|
export declare class MySQLConnection extends DatabaseConnection<MySQL.PoolConnection> {
|
|
8
9
|
private $transaction;
|
|
9
10
|
private $opened;
|
|
@@ -21,7 +22,7 @@ export declare class MySQLConnection extends DatabaseConnection<MySQL.PoolConnec
|
|
|
21
22
|
getCurrentDatabasePosition(): Promise<IDatabasePosition>;
|
|
22
23
|
protected _query(query: string, params?: any): Promise<any>;
|
|
23
24
|
protected _stream(query: string, params?: any, streamOptions?: any): Readable;
|
|
24
|
-
startTransaction(isolationLevel?: IsolationLevel): Promise<void>;
|
|
25
|
+
startTransaction(isolationLevel?: IsolationLevel, accessLevel?: TransactionAccessLevel): Promise<void>;
|
|
25
26
|
endTransaction(requiresRollback?: boolean): Promise<void>;
|
|
26
27
|
rollback(): Promise<void>;
|
|
27
28
|
commit(): Promise<void>;
|
package/lib/MySQLConnection.js
CHANGED
|
@@ -31,6 +31,7 @@ const LockWaitTimeoutError_1 = require("./LockWaitTimeoutError");
|
|
|
31
31
|
const GetSlavePositionQuery_1 = require("./private/GetSlavePositionQuery");
|
|
32
32
|
const GetMasterPositionQuery_1 = require("./private/GetMasterPositionQuery");
|
|
33
33
|
const queryFormatter_1 = require("./mysql/queryFormatter");
|
|
34
|
+
const TransactionAccessLevel_1 = require("./TransactionAccessLevel");
|
|
34
35
|
const DEFAULT_HIGH_WATERMARK = 512; // in number of result objects
|
|
35
36
|
const TAG = 'MySQLConnection';
|
|
36
37
|
const SQL_FORMATTING_OPTIONS = {
|
|
@@ -47,7 +48,6 @@ const SQL_FORMATTING_OPTIONS = {
|
|
|
47
48
|
dataTypeCase: 'upper',
|
|
48
49
|
functionCase: 'upper'
|
|
49
50
|
};
|
|
50
|
-
let startTransactionQuery = new StartTransactionQuery_1.StartTransactionQuery();
|
|
51
51
|
let commitQuery = new CommitQuery_1.CommitQuery();
|
|
52
52
|
let rollbackQuery = new RollbackQuery_1.RollbackQuery();
|
|
53
53
|
class MySQLConnection extends DatabaseConnection_1.DatabaseConnection {
|
|
@@ -160,9 +160,9 @@ class MySQLConnection extends DatabaseConnection_1.DatabaseConnection {
|
|
|
160
160
|
(0, instance_1.getInstance)().getLogger().trace(TAG, SQLFormatter.format(queryObject.sql, SQL_FORMATTING_OPTIONS));
|
|
161
161
|
return queryObject.stream(streamOptions);
|
|
162
162
|
}
|
|
163
|
-
async startTransaction(isolationLevel) {
|
|
164
|
-
if (this.isReadOnly()) {
|
|
165
|
-
throw new Error('A readonly connection cannot start a transaction.');
|
|
163
|
+
async startTransaction(isolationLevel, accessLevel = TransactionAccessLevel_1.TransactionAccessLevel.RW) {
|
|
164
|
+
if (this.isReadOnly() && accessLevel === TransactionAccessLevel_1.TransactionAccessLevel.RW) {
|
|
165
|
+
throw new Error('A readonly connection cannot start a read/write transaction.');
|
|
166
166
|
}
|
|
167
167
|
if (this.isTransaction()) {
|
|
168
168
|
throw new Error('Connection is already in a transaction.');
|
|
@@ -172,7 +172,9 @@ class MySQLConnection extends DatabaseConnection_1.DatabaseConnection {
|
|
|
172
172
|
if (isolationLevel) {
|
|
173
173
|
await new SetIsolationLevelQuery_1.SetIsolationLevelQuery(isolationLevel).execute(this);
|
|
174
174
|
}
|
|
175
|
-
await
|
|
175
|
+
await new StartTransactionQuery_1.StartTransactionQuery({
|
|
176
|
+
accessLevel: accessLevel
|
|
177
|
+
}).execute(this);
|
|
176
178
|
}
|
|
177
179
|
catch (ex) {
|
|
178
180
|
this.$transaction = false;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MySQLConnection.js","sourceRoot":"","sources":["../src/MySQLConnection.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;;AAEF,6DAAwD;AACxD,6DAAwD;AACxD,yCAAuC;
|
|
1
|
+
{"version":3,"file":"MySQLConnection.js","sourceRoot":"","sources":["../src/MySQLConnection.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;;AAEF,6DAAwD;AACxD,6DAAwD;AACxD,yCAAuC;AAGvC,2EAAwE;AACxE,uDAAoD;AACpD,2DAAwD;AACxD,oEAA8C;AAE9C,mDAA4C;AAE5C,mDAAgD;AAEhD,6EAAwE;AACxE,iEAA8D;AAG9D,2EAAwE;AACxE,6EAA0E;AAE1E,2DAAwD;AACxD,qEAAkE;AAElE,MAAM,sBAAsB,GAAW,GAAG,CAAC,CAAC,8BAA8B;AAC1E,MAAM,GAAG,GAAW,iBAAiB,CAAC;AAEtC,MAAM,sBAAsB,GAA+B;IACvD,QAAQ,EAAE,CAAC;IACX,WAAW,EAAE,OAAO;IACpB,cAAc,EAAE,UAAU;IAC1B,OAAO,EAAE,KAAK;IACd,WAAW,EAAE,UAAU;IACvB,sBAAsB,EAAE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AAM,EAAE,CAAC,OAAO,EAAE,CAAC;gBACxB,OAAO,EAAE,CAAC;YACd,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AArOD,0CAqOC"}
|
package/lib/Query.d.ts
CHANGED
|
@@ -39,6 +39,8 @@ export declare abstract class Query<TQueryParameters = any, TQueryResultSet = an
|
|
|
39
39
|
/**
|
|
40
40
|
* Override to augment/manipulate the returned result set.
|
|
41
41
|
*
|
|
42
|
+
* @deprecated - Streaming queries does not support post processing, creating a confusing API
|
|
43
|
+
*
|
|
42
44
|
* @param connection The connection object used for this query execution. Useful if further queries are required.
|
|
43
45
|
* @param resultset The original result set
|
|
44
46
|
*/
|
package/lib/Query.js
CHANGED
|
@@ -65,6 +65,8 @@ class Query {
|
|
|
65
65
|
/**
|
|
66
66
|
* Override to augment/manipulate the returned result set.
|
|
67
67
|
*
|
|
68
|
+
* @deprecated - Streaming queries does not support post processing, creating a confusing API
|
|
69
|
+
*
|
|
68
70
|
* @param connection The connection object used for this query execution. Useful if further queries are required.
|
|
69
71
|
* @param resultset The original result set
|
|
70
72
|
*/
|
package/lib/Query.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Query.js","sourceRoot":"","sources":["../src/Query.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAKF,MAAsB,KAAK;IAGvB,YAAmB,UAA6B;QAC5C,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,aAAa;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACI,qBAAqB;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAIM,QAAQ,CAAC,UAA+B;QAC3C,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAED;;;;;;OAMG;IACI,UAAU,CAAC,UAA+B;QAC7C,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED;;;;;;;;;;;OAWG;IACI,WAAW,CAAC,UAA+B;QAC9C,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED
|
|
1
|
+
{"version":3,"file":"Query.js","sourceRoot":"","sources":["../src/Query.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAKF,MAAsB,KAAK;IAGvB,YAAmB,UAA6B;QAC5C,IAAI,CAAC,OAAO,GAAG,UAAU,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,aAAa;QAChB,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED;;;;OAIG;IACI,qBAAqB;QACxB,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAIM,QAAQ,CAAC,UAA+B;QAC3C,OAAO,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC;IAED;;;;;;OAMG;IACI,UAAU,CAAC,UAA+B;QAC7C,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED;;;;;;;;;;;OAWG;IACI,WAAW,CAAC,UAA+B;QAC9C,OAAO,OAAO,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;IAED;;;;;;;OAOG;IACI,KAAK,CAAC,aAAa,CAAC,UAA+B,EAAE,SAA0B;QAClF,wEAAwE;QACxE,OAAO,OAAO,CAAC,OAAO,CAAC,SAAgB,CAAC,CAAC;IAC7C,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,UAA+B;QAChD,OAAO,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAClC,CAAC;CACJ;AAxED,sBAwEC"}
|
package/lib/Transaction.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { IDatabaseConnection } from './IDatabaseConnection';
|
|
|
2
2
|
import { IQueryable } from './IQueryable';
|
|
3
3
|
import { Application } from './Application';
|
|
4
4
|
import { IsolationLevel } from './IsolationLevel';
|
|
5
|
+
import { TransactionAccessLevel } from './TransactionAccessLevel';
|
|
5
6
|
export type ITransactionExecutor = (connection: IDatabaseConnection) => Promise<void>;
|
|
6
7
|
/**
|
|
7
8
|
* A class encapsulating an entire transaction from beginning to commitment.
|
|
@@ -19,7 +20,8 @@ export declare class Transaction implements IQueryable<void> {
|
|
|
19
20
|
private $application;
|
|
20
21
|
private $isolationLevel;
|
|
21
22
|
private $executor;
|
|
22
|
-
|
|
23
|
+
private $accessLevel;
|
|
24
|
+
constructor(app: Application, executor: ITransactionExecutor, retryLimit?: number, isolationLevel?: IsolationLevel, accessLevel?: TransactionAccessLevel);
|
|
23
25
|
onPreQuery(connection: IDatabaseConnection): Promise<void>;
|
|
24
26
|
onPostQuery(connection: IDatabaseConnection): Promise<void>;
|
|
25
27
|
getQuery(connection: IDatabaseConnection): string;
|
package/lib/Transaction.js
CHANGED
|
@@ -21,6 +21,7 @@ const InternalError_1 = require("./InternalError");
|
|
|
21
21
|
const DeadLockError_1 = require("./DeadLockError");
|
|
22
22
|
const InvalidValueError_1 = require("./InvalidValueError");
|
|
23
23
|
const LockWaitTimeoutError_1 = require("./LockWaitTimeoutError");
|
|
24
|
+
const TransactionAccessLevel_1 = require("./TransactionAccessLevel");
|
|
24
25
|
const TAG = 'Transaction';
|
|
25
26
|
/**
|
|
26
27
|
* A class encapsulating an entire transaction from beginning to commitment.
|
|
@@ -34,7 +35,7 @@ const TAG = 'Transaction';
|
|
|
34
35
|
* on the same connection.
|
|
35
36
|
*/
|
|
36
37
|
class Transaction {
|
|
37
|
-
constructor(app, executor, retryLimit = Infinity, isolationLevel = IsolationLevel_1.IsolationLevel.REPEATABLE_READ) {
|
|
38
|
+
constructor(app, executor, retryLimit = Infinity, isolationLevel = IsolationLevel_1.IsolationLevel.REPEATABLE_READ, accessLevel = TransactionAccessLevel_1.TransactionAccessLevel.RW) {
|
|
38
39
|
this.$application = app;
|
|
39
40
|
this.$executor = executor;
|
|
40
41
|
if (retryLimit === null || retryLimit === undefined) {
|
|
@@ -45,6 +46,7 @@ class Transaction {
|
|
|
45
46
|
}
|
|
46
47
|
this.$retryLimit = retryLimit;
|
|
47
48
|
this.$isolationLevel = isolationLevel;
|
|
49
|
+
this.$accessLevel = accessLevel;
|
|
48
50
|
}
|
|
49
51
|
async onPreQuery(connection) { }
|
|
50
52
|
async onPostQuery(connection) { }
|
|
@@ -65,7 +67,7 @@ class Transaction {
|
|
|
65
67
|
do {
|
|
66
68
|
attemptCount++;
|
|
67
69
|
this.$application.getLogger().info(TAG, `Starting transaction attempt ${attemptCount} of ${this.$retryLimit === Infinity ? 'Infinity' : this.$retryLimit.toString()}`);
|
|
68
|
-
await connection.startTransaction(this.$isolationLevel);
|
|
70
|
+
await connection.startTransaction(this.$isolationLevel, this.$accessLevel);
|
|
69
71
|
try {
|
|
70
72
|
await this.$executor(connection);
|
|
71
73
|
await connection.commit();
|
package/lib/Transaction.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.js","sourceRoot":"","sources":["../src/Transaction.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAKF,qDAAkD;AAClD,mDAAgD;AAChD,mDAAgD;AAChD,2DAAwD;AACxD,iEAA8D;
|
|
1
|
+
{"version":3,"file":"Transaction.js","sourceRoot":"","sources":["../src/Transaction.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;EAcE;;;AAKF,qDAAkD;AAClD,mDAAgD;AAChD,mDAAgD;AAChD,2DAAwD;AACxD,iEAA8D;AAC9D,qEAAkE;AAElE,MAAM,GAAG,GAAW,aAAa,CAAC;AAIlC;;;;;;;;;;GAUG;AACH,MAAa,WAAW;IAOpB,YAAmB,GAAgB,EAAE,QAA8B,EAAE,aAAqB,QAAQ,EAAE,iBAAiC,+BAAc,CAAC,eAAe,EAAE,cAAsC,+CAAsB,CAAC,EAAE;QAChO,IAAI,CAAC,YAAY,GAAG,GAAG,CAAC;QACxB,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