Skip to content

Commit

Permalink
Merge pull request #23 from nats-io/create-server
Browse files Browse the repository at this point in the history
Export missing functionality, regenerate doc, and update build dependencies
  • Loading branch information
aricart authored Feb 2, 2023
2 parents 21db1ea + ea23490 commit 9b08b6f
Show file tree
Hide file tree
Showing 25 changed files with 350 additions and 2,257 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:

strategy:
matrix:
deno-version: [1.29.1]
deno-version: [1.30.0]

steps:
- name: checkout project
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: setup deno ${{ matrix.deno-version }}
uses: denolib/setup-deno@master
uses: denoland/setup-deno@v1.1.1
with:
deno-version: ${{ matrix.deno-version }}

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ jobs:

strategy:
matrix:
deno-version: [1.29.1]
deno-version: [1.30.0]
node-version: [14.x, 16.x, 18.x, 19.x]

steps:
- name: checkout nkeys
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: setup deno ${{ matrix.deno-version }}
uses: denolib/setup-deno@master
uses: denoland/setup-deno@v1.1.1
with:
deno-version: ${{ matrix.deno-version }}

Expand Down
34 changes: 20 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# nkeys.js


A public-key signature system based on Ed25519 for the [NATS ecosystem system](https://nats.io) for JavaScript.
A public-key signature system based on Ed25519 for the
[NATS ecosystem system](https://nats.io) for JavaScript.

[![license](https://img.shields.io/github/license/nats-io/ts-nats.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![nkeys.js](https://github.com/aricart/nkeys.js/workflows/nkeys.js/badge.svg)](https://github.com/aricart/nkeys.js/actions)
Expand All @@ -11,33 +11,37 @@ A public-key signature system based on Ed25519 for the [NATS ecosystem system](h
The nkeys.js library works in Deno, Node.js, and the browser!

## Installation

For your Deno projects:

```javascript
import { createUser, fromPublic, fromSeed } from "https://deno.land/x/nkeys.js/modules/esm/mod.ts";
import {
createUser,
fromPublic,
fromSeed,
} from "https://deno.land/x/nkeys.js/modules/esm/mod.ts";
```

On node, and browsers you can get a build from npm:

```bash
npm install nkeys.js
```

In your node projects:
```javascript
const {createUser, fromSeed, fromPublic} = require("nkeys.js");

```javascript
const { createUser, fromSeed, fromPublic } = require("nkeys.js");
```

On your browser projects, make available the `node/nkeys.js/nkeys.mjs`, and then

```javascript
import {
createUser,
fromPublic,
fromSeed,
} from "https://host/path/nkeys.mjs";
import { createUser, fromPublic, fromSeed } from "https://host/path/nkeys.mjs";
```


## Basic Usage

The [documentation is here](https://nats-io.github.io/nkeys.js/)

```typescript
Expand Down Expand Up @@ -95,9 +99,11 @@ priv.clear();

## Supported Node Versions

Our support policy for Nodejs versions follows [Nodejs release support](https://github.com/nodejs/Release).
We will support and build nkeys.js on even-numbered Nodejs versions that are current or in LTS.
Our support policy for Nodejs versions follows
[Nodejs release support](https://github.com/nodejs/Release). We will support and
build nkeys.js on even-numbered Nodejs versions that are current or in LTS.

## License

Unless otherwise noted, the NATS source files are distributed under the Apache Version 2.0 license found in the LICENSE file.
Unless otherwise noted, the NATS source files are distributed under the Apache
Version 2.0 license found in the LICENSE file.
20 changes: 10 additions & 10 deletions dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

This file lists the dependencies used in this repository.

| Dependency | License |
|-|-|
| @types/node - 14.0.26 | MIT |
| tweetnacl@1.0.3 | Unilicense |
| https://deno.land/std@0.75.0 | MIT License |
| https://github.com/dr-useless/tweetnacl-deno | Unilicense |
| Dev Dependencies Fanout (267) | |
| ava@3.12.1 | MIT |
| typedoc@0.19.1 | Apache-2.0 |
| typescript@4.0.2 | Apache-2.0 |
| Dependency | License |
| -------------------------------------------- | ----------- |
| @types/node - 14.0.26 | MIT |
| tweetnacl@1.0.3 | Unilicense |
| https://deno.land/std@0.75.0 | MIT License |
| https://github.com/dr-useless/tweetnacl-deno | Unilicense |
| Dev Dependencies Fanout (267) | |
| ava@3.12.1 | MIT |
| typedoc@0.19.1 | Apache-2.0 |
| typescript@4.0.2 | Apache-2.0 |
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.
Loading

0 comments on commit 9b08b6f

Please sign in to comment.