Skip to content

Commit

Permalink
Merge pull request #21 from nats-io/create-server-encode
Browse files Browse the repository at this point in the history
export `encode()` and other functionality that may be required in some experiments
  • Loading branch information
aricart authored Feb 2, 2023
2 parents 778d88d + a9f87d2 commit c92ef1f
Show file tree
Hide file tree
Showing 90 changed files with 1,544 additions and 2,950 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/jwtjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ jobs:
test:
strategy:
matrix:
deno-version: [1.29.2]
deno-version: [1.30.0]
environment: CI
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Use Deno Version ${{ matrix.deno-version }}
uses: denolib/setup-deno@master
uses: denoland/setup-deno@v1.1.1
with:
deno-version: ${{ matrix.deno-version }}
- name: Get nsc
Expand Down
110 changes: 57 additions & 53 deletions docs/assets/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

62 changes: 59 additions & 3 deletions docs/assets/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/* Light */
--light-color-background: #f2f4f8;
--light-color-background-secondary: #eff0f1;
--light-color-warning-text: #222;
--light-color-background-warning: #e6e600;
--light-color-icon-background: var(--light-color-background);
--light-color-accent: #c5c7c9;
--light-color-text: #222;
Expand All @@ -21,6 +23,8 @@
/* Dark */
--dark-color-background: #2b2e33;
--dark-color-background-secondary: #1e2024;
--dark-color-background-warning: #bebe00;
--dark-color-warning-text: #222;
--dark-color-icon-background: var(--dark-color-background-secondary);
--dark-color-accent: #9096a2;
--dark-color-text: #f5f5f5;
Expand All @@ -42,6 +46,8 @@
:root {
--color-background: var(--light-color-background);
--color-background-secondary: var(--light-color-background-secondary);
--color-background-warning: var(--light-color-background-warning);
--color-warning-text: var(--light-color-warning-text);
--color-icon-background: var(--light-color-icon-background);
--color-accent: var(--light-color-accent);
--color-text: var(--light-color-text);
Expand All @@ -64,6 +70,8 @@
:root {
--color-background: var(--dark-color-background);
--color-background-secondary: var(--dark-color-background-secondary);
--color-background-warning: var(--dark-color-background-warning);
--color-warning-text: var(--dark-color-warning-text);
--color-icon-background: var(--dark-color-icon-background);
--color-accent: var(--dark-color-accent);
--color-text: var(--dark-color-text);
Expand Down Expand Up @@ -93,6 +101,8 @@ body {
:root[data-theme="light"] {
--color-background: var(--light-color-background);
--color-background-secondary: var(--light-color-background-secondary);
--color-background-warning: var(--light-color-background-warning);
--color-warning-text: var(--light-color-warning-text);
--color-icon-background: var(--light-color-icon-background);
--color-accent: var(--light-color-accent);
--color-text: var(--light-color-text);
Expand All @@ -113,6 +123,8 @@ body {
:root[data-theme="dark"] {
--color-background: var(--dark-color-background);
--color-background-secondary: var(--dark-color-background-secondary);
--color-background-warning: var(--dark-color-background-warning);
--color-warning-text: var(--dark-color-warning-text);
--color-icon-background: var(--dark-color-icon-background);
--color-accent: var(--dark-color-accent);
--color-text: var(--dark-color-text);
Expand All @@ -130,6 +142,11 @@ body {
--color-scheme: var(--dark-color-scheme);
}

.always-visible,
.always-visible .tsd-signatures {
display: inherit !important;
}

h1,
h2,
h3,
Expand Down Expand Up @@ -825,6 +842,15 @@ input[type="checkbox"]:checked ~ svg .tsd-checkbox-checkmark {
padding-left: 5.5rem;
}

#tsd-sidebar-links a {
margin-top: 0;
margin-bottom: 0.5rem;
line-height: 1.25rem;
}
#tsd-sidebar-links a:last-of-type {
margin-bottom: 0;
}

a.tsd-index-link {
margin: 0.25rem 0;
font-size: 1rem;
Expand Down Expand Up @@ -942,7 +968,7 @@ a.tsd-index-link {
margin: 2rem 0;
}
.tsd-panel-group.tsd-index-group details {
margin: 4rem 0;
margin: 2rem 0;
}

#tsd-search {
Expand Down Expand Up @@ -978,7 +1004,8 @@ a.tsd-index-link {
right: -40px;
}
#tsd-search .field input,
#tsd-search .title {
#tsd-search .title,
#tsd-toolbar-links a {
transition: opacity 0.2s;
}
#tsd-search .results {
Expand Down Expand Up @@ -1022,7 +1049,8 @@ a.tsd-index-link {
top: 0;
opacity: 1;
}
#tsd-search.has-focus .title {
#tsd-search.has-focus .title,
#tsd-search.has-focus #tsd-toolbar-links a {
z-index: 0;
opacity: 0;
}
Expand All @@ -1036,6 +1064,22 @@ a.tsd-index-link {
display: block;
}

#tsd-toolbar-links {
position: absolute;
top: 0;
right: 2rem;
height: 100%;
display: flex;
align-items: center;
justify-content: flex-end;
}
#tsd-toolbar-links a {
margin-left: 1.5rem;
}
#tsd-toolbar-links a:hover {
text-decoration: underline;
}

.tsd-signature {
margin: 0 0 1rem 0;
padding: 1rem 0.5rem;
Expand Down Expand Up @@ -1124,6 +1168,7 @@ ul.tsd-type-parameter-list h5 {
display: flex;
justify-content: space-between;
height: 2.5rem;
margin: 0 auto;
}
.tsd-page-toolbar .table-cell {
position: relative;
Expand All @@ -1133,6 +1178,11 @@ ul.tsd-type-parameter-list h5 {
.tsd-page-toolbar .table-cell:first-child {
width: 100%;
}
.tsd-page-toolbar .tsd-toolbar-icon {
box-sizing: border-box;
line-height: 0;
padding: 12px 0;
}

.tsd-page-toolbar--hide {
transform: translateY(-100%);
Expand Down Expand Up @@ -1204,6 +1254,12 @@ img {
text-decoration: line-through;
}

.warning {
padding: 1rem;
color: var(--color-warning-text);
background: var(--color-background-warning);
}

* {
scrollbar-width: thin;
scrollbar-color: var(--color-accent) var(--color-icon-background);
Expand Down
Binary file removed docs/assets/widgets.png
Binary file not shown.
Binary file removed docs/assets/widgets@2x.png
Binary file not shown.
18 changes: 13 additions & 5 deletions docs/classes/Base64Codec.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>Base64Codec | nats-jwt</title><meta name="description" content="Documentation for nats-jwt"/><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.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
<div class="tsd-toolbar-contents container">
<div class="table-cell" id="tsd-search" data-base="..">
<div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
<div class="field">
<div id="tsd-toolbar-links"></div></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">nats-jwt</a></div>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
<div class="container container-main">
<div class="col-8 col-content">
<div class="tsd-page-title">
Expand All @@ -16,7 +18,9 @@ <h1>Class Base64Codec</h1></div>
<section class="tsd-panel tsd-hierarchy">
<h4>Hierarchy</h4>
<ul class="tsd-hierarchy">
<li><span class="target">Base64Codec</span></li></ul></section>
<li><span class="target">Base64Codec</span></li></ul></section><aside class="tsd-sources">
<ul>
<li>Defined in base64.ts:14</li></ul></aside>
<section class="tsd-panel-group tsd-index-group">
<section class="tsd-panel tsd-index-panel">
<details class="tsd-index-content tsd-index-accordion" open><summary class="tsd-accordion-summary tsd-index-summary">
Expand Down Expand Up @@ -53,7 +57,9 @@ <h4 class="tsd-parameters-title">Parameters</h4>
<h5>s: <span class="tsd-signature-type">string</span></h5></li>
<li>
<h5>binary: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Uint8Array</span></h4></li></ul></section>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Uint8Array</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in base64.ts:23</li></ul></aside></li></ul></section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class"><a id="encode" class="tsd-anchor"></a>
<h3 class="tsd-anchor-link"><code class="tsd-tag ts-flagStatic">Static</code> <span>encode</span><a href="#encode" aria-label="Permalink" class="tsd-anchor-icon"><svg class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><use href="#icon-anchor-a"></use><use href="#icon-anchor-b"></use><use href="#icon-anchor-c"></use></svg></a></h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
Expand All @@ -64,7 +70,9 @@ <h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameter-list">
<li>
<h5>bytes: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">Uint8Array</span></h5></li></ul></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></section></section></div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><aside class="tsd-sources">
<ul>
<li>Defined in base64.ts:15</li></ul></aside></li></ul></section></section></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
Expand Down
Loading

0 comments on commit c92ef1f

Please sign in to comment.