This commit is contained in:
Snider 2022-01-23 20:32:21 +00:00
parent 6682102a83
commit 0bedf7b52b
5 changed files with 39 additions and 51 deletions

View file

@ -1,11 +1,3 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will install Deno then run Deno lint and test.
# For more information see: https://github.com/denoland/setup-deno
name: Deno Build
on:
@ -15,24 +7,40 @@ on:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
build:
env:
DENO_DIR: my_cache_directory
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, macos-11, windows-2019 ]
steps:
- name: Setup repo
uses: actions/checkout@v2
- name: Cache Deno dependencies
uses: actions/cache@v2
with:
path: ${{ env.DENO_DIR }}
key: my_cache_key
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
# Check if the code is formatted according to Deno's default
# formatting conventions.
- run: deno fmt --check
# Uncomment this step to verify the use of 'deno fmt' on each commit.
- name: Verify formatting
run: deno fmt --check
# Scan the code for syntax errors and style issues. If
# you want to use a custom linter configuration you can add a configuration file with --config <myconfig>
- run: deno lint
- name: Run linter
run: deno lint
- name: Run tests
run: deno test -A --unstable
# Run all test files in the repository and collect code coverage. The example
# runs with all permissions, but it is recommended to run with the minimal permissions your program needs (for example --allow-read).
- run: deno test --allow-all --coverage cov/
# This generates a report from the collected coverage in `deno test --coverage`. It is
# stored as a .lcov file which integrates well with services such as Codecov, Coveralls and Travis CI.
- name: Generate coverage report
if: matrix.os == 'ubuntu-20.04'
run: deno coverage --lcov cov > cov.lcov

View file

@ -1,8 +1,15 @@
{
"compilerOptions": {
"allowJs": true,
"lib": ["deno.window", "deno.unstable"],
"strict": true
"target": "esnext",
"lib": [
"dom",
"dom.iterable",
"dom.asynciterable",
"deno.ns",
"deno.window",
"deno.unstable",
"deno.worker"
]
},
"lint": {
"files": {

View file

@ -1,5 +1,5 @@
import { assertEquals } from "https://deno.land/std@0.122.0/testing/asserts.ts";
import {EnchantrixSaltQuasiEntropy} from "./quasi-entropy.ts";
import {EnchantrixEntropyQuasi} from "./quasi.ts";
// Compact form: name and function
Deno.test("IN: Snider OUT: r3dinS", () => {

View file

@ -1,9 +1,7 @@
/**
* Reproducible salts from input without prior knowledge
*
* @example const salt = new EnchantrixSaltQuasiEntropy('Snider').salty()
*/
export class EnchantrixSaltQuasiEntropy {
export class EnchantrixEntropyQuasi {
/**
* Extend to enforce a custom mapping

View file

@ -1,25 +0,0 @@
{
"name": "enchantrix",
"version": "0.0.1",
"license": "EUPL-1.2",
"description": "The Little CryptoSuite that could.",
"homepage": "https://github.com/Snider/enchantrix/wiki",
"bugs": {
"url": "https://github.com/Snider/enchantrix/issues",
"email": "secops@lt.hn"
},
"author": "Snider <snider@lthn>",
"repository": {
"type": "git",
"url": "https://github.com/Snider/enchantrix"
},
"scripts": {
"dev": "deno run --watch --allow-net --allow-env --allow-run --allow-read --allow-write --unstable src/server.ts",
"lint": "deno lint src/",
"test": "deno test src/"
},
"dependencies": {
"openpgp": "^5.0.0",
"pem-ts": "^3.0.0"
}
}