@jwn-js/common 2.0.3 → 2.0.7
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/Memcached.d.ts +20 -3
- package/Memcached.js +40 -0
- package/docs/assets/search.js +1 -1
- package/docs/classes/ApiError.html +1 -1
- package/docs/classes/AsyncJwt.html +1 -1
- package/docs/classes/Controller.html +2 -2
- package/docs/classes/Jwt.html +1 -1
- package/docs/classes/Memcached.html +20 -6
- package/docs/classes/Model.html +1 -1
- package/docs/classes/Server.html +1 -1
- package/docs/classes/Ssr.html +1 -1
- package/docs/classes/Web.html +3 -3
- package/docs/index.html +1 -1
- package/docs/interfaces/ApiErrorMessage.html +1 -1
- package/docs/interfaces/ContextSsr.html +1 -1
- package/docs/interfaces/ContextWeb.html +1 -1
- package/docs/interfaces/OptionsSsr.html +1 -1
- package/docs/interfaces/OptionsWeb.html +1 -1
- package/docs/interfaces/Route.html +1 -1
- package/docs/interfaces/Schema.html +1 -1
- package/docs/interfaces/ServerHandler.html +1 -1
- package/docs/interfaces/ServerOptions.html +1 -1
- package/docs/interfaces/ServerWebsocket.html +1 -1
- package/docs/modules.html +1 -1
- package/index.d.ts +41 -7
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ServerWebsocket | @jwn-js/common - v2.0.
|
|
1
|
+
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ServerWebsocket | @jwn-js/common - v2.0.7</title><meta name="description" content="Documentation for @jwn-js/common - v2.0.7"/><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 async src="../assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base=".."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@jwn-js/common - v2.0.7</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><ul class="tsd-breadcrumb"><li><a href="../modules.html">@jwn-js/common - v2.0.7</a></li><li><a href="ServerWebsocket.html">ServerWebsocket</a></li></ul><h1>Interface ServerWebsocket</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>types</dt><dd></dd></dl></div></section><section class="tsd-panel tsd-hierarchy"><h3>Hierarchy</h3><ul class="tsd-hierarchy"><li><span class="target">ServerWebsocket</span></li></ul></section><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Properties</h3><ul class="tsd-index-list"><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ServerWebsocket.html#behavior" class="tsd-kind-icon">behavior</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ServerWebsocket.html#method" class="tsd-kind-icon">method</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ServerWebsocket.html#pattern" class="tsd-kind-icon">pattern</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Properties</h2><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="behavior" class="tsd-anchor"></a><h3>behavior</h3><div class="tsd-signature tsd-kind-icon">behavior<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">WebSocketBehavior</span></div><aside class="tsd-sources"><ul><li>Defined in src/Server/Server.ts:28</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="method" class="tsd-anchor"></a><h3>method</h3><div class="tsd-signature tsd-kind-icon">method<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"ws"</span></div><aside class="tsd-sources"><ul><li>Defined in src/Server/Server.ts:26</li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-interface"><a id="pattern" class="tsd-anchor"></a><h3><span class="tsd-flag ts-flagOptional">Optional</span> pattern</h3><div class="tsd-signature tsd-kind-icon">pattern<span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">RecognizedString</span></div><aside class="tsd-sources"><ul><li>Defined in src/Server/Server.ts:27</li></ul></aside></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class=""><a href="../modules.html">Exports</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="current tsd-kind-interface"><a href="ServerWebsocket.html" class="tsd-kind-icon">Server<wbr/>Websocket</a><ul><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ServerWebsocket.html#behavior" class="tsd-kind-icon">behavior</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ServerWebsocket.html#method" class="tsd-kind-icon">method</a></li><li class="tsd-kind-property tsd-parent-kind-interface"><a href="ServerWebsocket.html#pattern" class="tsd-kind-icon">pattern</a></li></ul></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
package/docs/modules.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@jwn-js/common - v2.0.3</title><meta name="description" content="Documentation for @jwn-js/common - v2.0.3"/><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 async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">@jwn-js/common - v2.0.3</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>@jwn-js/common - v2.0.3</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Classes</h3><ul class="tsd-index-list"><li class="tsd-kind-class"><a href="classes/ApiError.html" class="tsd-kind-icon">Api<wbr/>Error</a></li><li class="tsd-kind-class"><a href="classes/AsyncJwt.html" class="tsd-kind-icon">Async<wbr/>Jwt</a></li><li class="tsd-kind-class"><a href="classes/Controller.html" class="tsd-kind-icon">Controller</a></li><li class="tsd-kind-class"><a href="classes/Jwt.html" class="tsd-kind-icon">Jwt</a></li><li class="tsd-kind-class"><a href="classes/Memcached.html" class="tsd-kind-icon">Memcached</a></li><li class="tsd-kind-class"><a href="classes/Model.html" class="tsd-kind-icon">Model</a></li><li class="tsd-kind-class"><a href="classes/Server.html" class="tsd-kind-icon">Server</a></li><li class="tsd-kind-class"><a href="classes/Ssr.html" class="tsd-kind-icon">Ssr</a></li><li class="tsd-kind-class"><a href="classes/Web.html" class="tsd-kind-icon">Web</a></li></ul></section><section class="tsd-index-section "><h3>Interfaces</h3><ul class="tsd-index-list"><li class="tsd-kind-interface"><a href="interfaces/ApiErrorMessage.html" class="tsd-kind-icon">Api<wbr/>Error<wbr/>Message</a></li><li class="tsd-kind-interface tsd-is-external"><a href="interfaces/ContextSsr.html" class="tsd-kind-icon">Context<wbr/>Ssr</a></li><li class="tsd-kind-interface"><a href="interfaces/ContextWeb.html" class="tsd-kind-icon">Context<wbr/>Web</a></li><li class="tsd-kind-interface"><a href="interfaces/OptionsSsr.html" class="tsd-kind-icon">Options<wbr/>Ssr</a></li><li class="tsd-kind-interface"><a href="interfaces/OptionsWeb.html" class="tsd-kind-icon">Options<wbr/>Web</a></li><li class="tsd-kind-interface"><a href="interfaces/Route.html" class="tsd-kind-icon">Route</a></li><li class="tsd-kind-interface"><a href="interfaces/Schema.html" class="tsd-kind-icon">Schema</a></li><li class="tsd-kind-interface"><a href="interfaces/ServerHandler.html" class="tsd-kind-icon">Server<wbr/>Handler</a></li><li class="tsd-kind-interface"><a href="interfaces/ServerOptions.html" class="tsd-kind-icon">Server<wbr/>Options</a></li><li class="tsd-kind-interface"><a href="interfaces/ServerWebsocket.html" class="tsd-kind-icon">Server<wbr/>Websocket</a></li></ul></section><section class="tsd-index-section "><h3>Type aliases</h3><ul class="tsd-index-list"><li class="tsd-kind-type-alias"><a href="modules.html#ServerRoutes" class="tsd-kind-icon">Server<wbr/>Routes</a></li></ul></section><section class="tsd-index-section "><h3>Variables</h3><ul class="tsd-index-list"><li class="tsd-kind-variable"><a href="modules.html#helpers" class="tsd-kind-icon">helpers</a></li></ul></section><section class="tsd-index-section "><h3>Functions</h3><ul class="tsd-index-list"><li class="tsd-kind-function"><a href="modules.html#action" class="tsd-kind-icon">action</a></li><li class="tsd-kind-function"><a href="modules.html#body" class="tsd-kind-icon">body</a></li><li class="tsd-kind-function"><a href="modules.html#codeToStatus" class="tsd-kind-icon">code<wbr/>To<wbr/>Status</a></li><li class="tsd-kind-function"><a href="modules.html#config" class="tsd-kind-icon">config</a></li><li class="tsd-kind-function"><a href="modules.html#connection" class="tsd-kind-icon">connection</a></li><li class="tsd-kind-function"><a href="modules.html#context" class="tsd-kind-icon">context</a></li><li class="tsd-kind-function"><a href="modules.html#controller" class="tsd-kind-icon">controller</a></li><li class="tsd-kind-function"><a href="modules.html#cookies" class="tsd-kind-icon">cookies</a></li><li class="tsd-kind-function"><a href="modules.html#db" class="tsd-kind-icon">db</a></li><li class="tsd-kind-function"><a href="modules.html#headers" class="tsd-kind-icon">headers</a></li><li class="tsd-kind-function"><a href="modules.html#home" class="tsd-kind-icon">home</a></li><li class="tsd-kind-function"><a href="modules.html#hostname" class="tsd-kind-icon">hostname</a></li><li class="tsd-kind-function"><a href="modules.html#http" class="tsd-kind-icon">http</a></li><li class="tsd-kind-function"><a href="modules.html#init" class="tsd-kind-icon">init</a></li><li class="tsd-kind-function"><a href="modules.html#json" class="tsd-kind-icon">json</a></li><li class="tsd-kind-function"><a href="modules.html#logerror" class="tsd-kind-icon">logerror</a></li><li class="tsd-kind-function"><a href="modules.html#method" class="tsd-kind-icon">method</a></li><li class="tsd-kind-function tsd-has-type-parameter"><a href="modules.html#mixin" class="tsd-kind-icon">mixin</a></li><li class="tsd-kind-function tsd-has-type-parameter"><a href="modules.html#mount" class="tsd-kind-icon">mount</a></li><li class="tsd-kind-function"><a href="modules.html#pool" class="tsd-kind-icon">pool</a></li><li class="tsd-kind-function"><a href="modules.html#protocol" class="tsd-kind-icon">protocol</a></li><li class="tsd-kind-function"><a href="modules.html#request" class="tsd-kind-icon">request</a></li><li class="tsd-kind-function"><a href="modules.html#stream" class="tsd-kind-icon">stream</a></li><li class="tsd-kind-function"><a href="modules.html#subaction" class="tsd-kind-icon">subaction</a></li><li class="tsd-kind-function"><a href="modules.html#url" class="tsd-kind-icon">url</a></li><li class="tsd-kind-function"><a href="modules.html#xml" class="tsd-kind-icon">xml</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Type aliases</h2><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="ServerRoutes" class="tsd-anchor"></a><h3>Server<wbr/>Routes</h3><div class="tsd-signature tsd-kind-icon">Server<wbr/>Routes<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><a href="interfaces/ServerHandler.html" class="tsd-signature-type" data-tsd-kind="Interface">ServerHandler</a><span class="tsd-signature-symbol"> | </span><a href="interfaces/ServerWebsocket.html" class="tsd-signature-type" data-tsd-kind="Interface">ServerWebsocket</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">CallableFunction</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in src/Server/Server.ts:37</li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>types</dt><dd></dd></dl></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Variables</h2><section class="tsd-panel tsd-member tsd-kind-variable"><a id="helpers" class="tsd-anchor"></a><h3>helpers</h3><div class="tsd-signature tsd-kind-icon">helpers<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>cookieParse<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>str<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</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><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>cookieString<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>extensions<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span>getExt<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>jsonBody<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>res<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpResponse</span>, req<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpRequest</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>jwtDecode<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>jwt<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-symbol">{ </span>body<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span>head<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">; </span>multipartBody<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>res<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpResponse</span>, req<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpRequest</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Options</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>rawBody<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>res<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpResponse</span>, req<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpRequest</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>readConfig<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>jsonfile<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>readConfigSync<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>jsonfile<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span>staticBody<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>res<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpResponse</span>, req<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpRequest</span>, base<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>streamBody<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>res<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpResponse</span>, req<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpRequest</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">Stream</span><span class="tsd-signature-symbol">; </span>urlencodedBody<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>res<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpResponse</span>, req<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpRequest</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in src/index.ts:37</li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>exports</dt><dd></dd></dl></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>cookie<wbr/>Parse<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>str<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</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><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>str<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</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><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"><div class="lead">
|
|
1
|
+
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@jwn-js/common - v2.0.7</title><meta name="description" content="Documentation for @jwn-js/common - v2.0.7"/><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 async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">@jwn-js/common - v2.0.7</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>@jwn-js/common - v2.0.7</h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Classes</h3><ul class="tsd-index-list"><li class="tsd-kind-class"><a href="classes/ApiError.html" class="tsd-kind-icon">Api<wbr/>Error</a></li><li class="tsd-kind-class"><a href="classes/AsyncJwt.html" class="tsd-kind-icon">Async<wbr/>Jwt</a></li><li class="tsd-kind-class"><a href="classes/Controller.html" class="tsd-kind-icon">Controller</a></li><li class="tsd-kind-class"><a href="classes/Jwt.html" class="tsd-kind-icon">Jwt</a></li><li class="tsd-kind-class"><a href="classes/Memcached.html" class="tsd-kind-icon">Memcached</a></li><li class="tsd-kind-class"><a href="classes/Model.html" class="tsd-kind-icon">Model</a></li><li class="tsd-kind-class"><a href="classes/Server.html" class="tsd-kind-icon">Server</a></li><li class="tsd-kind-class"><a href="classes/Ssr.html" class="tsd-kind-icon">Ssr</a></li><li class="tsd-kind-class"><a href="classes/Web.html" class="tsd-kind-icon">Web</a></li></ul></section><section class="tsd-index-section "><h3>Interfaces</h3><ul class="tsd-index-list"><li class="tsd-kind-interface"><a href="interfaces/ApiErrorMessage.html" class="tsd-kind-icon">Api<wbr/>Error<wbr/>Message</a></li><li class="tsd-kind-interface tsd-is-external"><a href="interfaces/ContextSsr.html" class="tsd-kind-icon">Context<wbr/>Ssr</a></li><li class="tsd-kind-interface"><a href="interfaces/ContextWeb.html" class="tsd-kind-icon">Context<wbr/>Web</a></li><li class="tsd-kind-interface"><a href="interfaces/OptionsSsr.html" class="tsd-kind-icon">Options<wbr/>Ssr</a></li><li class="tsd-kind-interface"><a href="interfaces/OptionsWeb.html" class="tsd-kind-icon">Options<wbr/>Web</a></li><li class="tsd-kind-interface"><a href="interfaces/Route.html" class="tsd-kind-icon">Route</a></li><li class="tsd-kind-interface"><a href="interfaces/Schema.html" class="tsd-kind-icon">Schema</a></li><li class="tsd-kind-interface"><a href="interfaces/ServerHandler.html" class="tsd-kind-icon">Server<wbr/>Handler</a></li><li class="tsd-kind-interface"><a href="interfaces/ServerOptions.html" class="tsd-kind-icon">Server<wbr/>Options</a></li><li class="tsd-kind-interface"><a href="interfaces/ServerWebsocket.html" class="tsd-kind-icon">Server<wbr/>Websocket</a></li></ul></section><section class="tsd-index-section "><h3>Type aliases</h3><ul class="tsd-index-list"><li class="tsd-kind-type-alias"><a href="modules.html#ServerRoutes" class="tsd-kind-icon">Server<wbr/>Routes</a></li></ul></section><section class="tsd-index-section "><h3>Variables</h3><ul class="tsd-index-list"><li class="tsd-kind-variable"><a href="modules.html#helpers" class="tsd-kind-icon">helpers</a></li></ul></section><section class="tsd-index-section "><h3>Functions</h3><ul class="tsd-index-list"><li class="tsd-kind-function"><a href="modules.html#action" class="tsd-kind-icon">action</a></li><li class="tsd-kind-function"><a href="modules.html#body" class="tsd-kind-icon">body</a></li><li class="tsd-kind-function"><a href="modules.html#codeToStatus" class="tsd-kind-icon">code<wbr/>To<wbr/>Status</a></li><li class="tsd-kind-function"><a href="modules.html#config" class="tsd-kind-icon">config</a></li><li class="tsd-kind-function"><a href="modules.html#connection" class="tsd-kind-icon">connection</a></li><li class="tsd-kind-function"><a href="modules.html#context" class="tsd-kind-icon">context</a></li><li class="tsd-kind-function"><a href="modules.html#controller" class="tsd-kind-icon">controller</a></li><li class="tsd-kind-function"><a href="modules.html#cookies" class="tsd-kind-icon">cookies</a></li><li class="tsd-kind-function"><a href="modules.html#db" class="tsd-kind-icon">db</a></li><li class="tsd-kind-function"><a href="modules.html#headers" class="tsd-kind-icon">headers</a></li><li class="tsd-kind-function"><a href="modules.html#home" class="tsd-kind-icon">home</a></li><li class="tsd-kind-function"><a href="modules.html#hostname" class="tsd-kind-icon">hostname</a></li><li class="tsd-kind-function"><a href="modules.html#http" class="tsd-kind-icon">http</a></li><li class="tsd-kind-function"><a href="modules.html#init" class="tsd-kind-icon">init</a></li><li class="tsd-kind-function"><a href="modules.html#json" class="tsd-kind-icon">json</a></li><li class="tsd-kind-function"><a href="modules.html#logerror" class="tsd-kind-icon">logerror</a></li><li class="tsd-kind-function"><a href="modules.html#method" class="tsd-kind-icon">method</a></li><li class="tsd-kind-function tsd-has-type-parameter"><a href="modules.html#mixin" class="tsd-kind-icon">mixin</a></li><li class="tsd-kind-function tsd-has-type-parameter"><a href="modules.html#mount" class="tsd-kind-icon">mount</a></li><li class="tsd-kind-function"><a href="modules.html#pool" class="tsd-kind-icon">pool</a></li><li class="tsd-kind-function"><a href="modules.html#protocol" class="tsd-kind-icon">protocol</a></li><li class="tsd-kind-function"><a href="modules.html#request" class="tsd-kind-icon">request</a></li><li class="tsd-kind-function"><a href="modules.html#stream" class="tsd-kind-icon">stream</a></li><li class="tsd-kind-function"><a href="modules.html#subaction" class="tsd-kind-icon">subaction</a></li><li class="tsd-kind-function"><a href="modules.html#url" class="tsd-kind-icon">url</a></li><li class="tsd-kind-function"><a href="modules.html#xml" class="tsd-kind-icon">xml</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Type aliases</h2><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="ServerRoutes" class="tsd-anchor"></a><h3>Server<wbr/>Routes</h3><div class="tsd-signature tsd-kind-icon">Server<wbr/>Routes<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><a href="interfaces/ServerHandler.html" class="tsd-signature-type" data-tsd-kind="Interface">ServerHandler</a><span class="tsd-signature-symbol"> | </span><a href="interfaces/ServerWebsocket.html" class="tsd-signature-type" data-tsd-kind="Interface">ServerWebsocket</a><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">CallableFunction</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">[]</span></div><aside class="tsd-sources"><ul><li>Defined in src/Server/Server.ts:37</li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>types</dt><dd></dd></dl></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Variables</h2><section class="tsd-panel tsd-member tsd-kind-variable"><a id="helpers" class="tsd-anchor"></a><h3>helpers</h3><div class="tsd-signature tsd-kind-icon">helpers<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>cookieParse<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>str<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</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><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>cookieString<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>extensions<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">; </span>getExt<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>path<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span>jsonBody<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>res<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpResponse</span>, req<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpRequest</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>jwtDecode<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>jwt<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-symbol">{ </span>body<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span>head<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol">; </span>multipartBody<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>res<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpResponse</span>, req<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpRequest</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Options</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>rawBody<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>res<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpResponse</span>, req<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpRequest</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>readConfig<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>jsonfile<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>readConfigSync<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>jsonfile<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">; </span>staticBody<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>res<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpResponse</span>, req<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpRequest</span>, base<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">; </span>streamBody<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>res<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpResponse</span>, req<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpRequest</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">Stream</span><span class="tsd-signature-symbol">; </span>urlencodedBody<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>res<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpResponse</span>, req<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">HttpRequest</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> }</span><span class="tsd-signature-symbol"> = ...</span></div><aside class="tsd-sources"><ul><li>Defined in src/index.ts:37</li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>exports</dt><dd></dd></dl></div><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5>cookie<wbr/>Parse<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>str<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</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><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>str<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</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><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"><div class="lead">
|
|
2
2
|
<p>Parse coockie string to object</p>
|
|
3
3
|
</div></div><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>str: <span class="tsd-signature-type">string</span></h5><div class="tsd-comment tsd-typography"><div class="lead">
|
|
4
4
|
</div></div></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4></li></ul></li></ul></li><li class="tsd-parameter"><h5>cookie<wbr/>String<span class="tsd-signature-symbol">: </span><span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">string</span></h5><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-literal"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>name<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span>, value<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><div class="tsd-comment tsd-typography"><div class="lead">
|
package/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { HttpResponse, HttpRequest } from 'uWebSockets.js';
|
|
|
6
6
|
export { ApiError, ApiErrorMessage } from './ApiError';
|
|
7
7
|
export { Server, Handler as ServerHandler, Options as ServerOptions, Routes as ServerRoutes, WebSocket as ServerWebsocket, codeToStatus } from './Server';
|
|
8
8
|
export { Jwt } from './Jwt';
|
|
9
|
+
import { Memcached as Memcached$1 } from './Memcached';
|
|
9
10
|
export { Memcached } from './Memcached';
|
|
10
11
|
import { Client } from 'memjs';
|
|
11
12
|
import { Query } from 'buildmsql';
|
|
@@ -65,7 +66,7 @@ declare class AsyncJwt {
|
|
|
65
66
|
declare function staticBody(res: HttpResponse, req: HttpRequest, base: string): Promise<void>;
|
|
66
67
|
|
|
67
68
|
declare class Memcached {
|
|
68
|
-
memjs: Client;
|
|
69
|
+
memjs: Client | null;
|
|
69
70
|
specialHeaders: Record<string, any>;
|
|
70
71
|
maxKeyLength: number;
|
|
71
72
|
debug: number;
|
|
@@ -77,9 +78,26 @@ declare class Memcached {
|
|
|
77
78
|
* @param maxKeyLength - max key length
|
|
78
79
|
* @param debug
|
|
79
80
|
*/
|
|
80
|
-
constructor(memjs: Client, specialHeaders?: {
|
|
81
|
+
constructor(memjs: Client | null, specialHeaders?: {
|
|
81
82
|
'x-cache': string;
|
|
82
83
|
}, maxKeyLength?: number, debug?: number);
|
|
84
|
+
/**
|
|
85
|
+
* Set value to memcache
|
|
86
|
+
* @param key string key
|
|
87
|
+
* @param value value
|
|
88
|
+
* @param expires expiers in second
|
|
89
|
+
*/
|
|
90
|
+
setValue(key: string, value: string | Buffer, expires: number | undefined | null): Promise<void>;
|
|
91
|
+
/**
|
|
92
|
+
* Get value from memory
|
|
93
|
+
* @param key string key
|
|
94
|
+
*/
|
|
95
|
+
getValue(key: string): Promise<null | Buffer>;
|
|
96
|
+
/**
|
|
97
|
+
* Delete value
|
|
98
|
+
* @param key
|
|
99
|
+
*/
|
|
100
|
+
deleteValue(key: string): Promise<boolean>;
|
|
83
101
|
/**
|
|
84
102
|
* Set page to cache
|
|
85
103
|
* @param url https://yur.site.net
|
|
@@ -91,7 +109,7 @@ declare class Memcached {
|
|
|
91
109
|
/**
|
|
92
110
|
* Get Page and headers
|
|
93
111
|
* @param url https://your.site.net
|
|
94
|
-
* @
|
|
112
|
+
* @returns {data, headers}
|
|
95
113
|
*/
|
|
96
114
|
getPage(url: string): Promise<null | {
|
|
97
115
|
data: Buffer;
|
|
@@ -228,7 +246,11 @@ interface OptionsWeb {
|
|
|
228
246
|
readonly config: Config$1;
|
|
229
247
|
readonly db: Record<string, Query>;
|
|
230
248
|
readonly schema?: Schema;
|
|
231
|
-
readonly stack?:
|
|
249
|
+
readonly stack?: {
|
|
250
|
+
memcached?: Memcached;
|
|
251
|
+
redis?: any;
|
|
252
|
+
[key: string]: any;
|
|
253
|
+
};
|
|
232
254
|
readonly [key: string]: any;
|
|
233
255
|
}
|
|
234
256
|
interface Response$1 {
|
|
@@ -266,7 +288,11 @@ interface ActionsParmas$1 {
|
|
|
266
288
|
interface ContextWeb$1 extends ActionsParmas$1 {
|
|
267
289
|
readonly config: Config$1;
|
|
268
290
|
readonly db: Record<string, Query>;
|
|
269
|
-
readonly stack:
|
|
291
|
+
readonly stack: {
|
|
292
|
+
memcached?: Memcached;
|
|
293
|
+
redis?: any;
|
|
294
|
+
[key: string]: any;
|
|
295
|
+
};
|
|
270
296
|
[key: string]: any;
|
|
271
297
|
}
|
|
272
298
|
/**
|
|
@@ -414,7 +440,11 @@ interface ActionsParmas {
|
|
|
414
440
|
interface ContextWeb extends ActionsParmas {
|
|
415
441
|
readonly config: Config;
|
|
416
442
|
readonly db: Record<string, Query>;
|
|
417
|
-
readonly stack:
|
|
443
|
+
readonly stack: {
|
|
444
|
+
memcached?: Memcached;
|
|
445
|
+
redis?: any;
|
|
446
|
+
[key: string]: any;
|
|
447
|
+
};
|
|
418
448
|
[key: string]: any;
|
|
419
449
|
}
|
|
420
450
|
interface ContextWebController extends ContextWeb {
|
|
@@ -590,7 +620,11 @@ declare class Controller {
|
|
|
590
620
|
getSubaction(): ContextWebController["subaction"];
|
|
591
621
|
getHome(): Query;
|
|
592
622
|
getPool(key?: string): Query;
|
|
593
|
-
getStack():
|
|
623
|
+
getStack(): {
|
|
624
|
+
[key: string]: any;
|
|
625
|
+
memcached?: Memcached$1 | undefined;
|
|
626
|
+
redis?: any;
|
|
627
|
+
};
|
|
594
628
|
setResponseHeader(key: string, value: string): void;
|
|
595
629
|
}
|
|
596
630
|
|