Skip to content

Commit b24bd10

Browse files
TypeScript migration (#13)
* WIP ammend .gitignore for a start! * Add new configuration files from typescript-demo * remove unecessary files mostly just config files from js project * update config files to be in line with JavaScript-Demo/typescript * Add ts files and begin src migration * Update shell.nix with typescript dev dependencies * Fix package.json errors * Add initial fields and types * Create README.md Just a WIP for now * Update nix environment files from JavaScript Demo * update meta info * Initial migration from ava to jest * remove redundant js files * update typescript and fix type errors * persist node2nix output * WIP: typescript migration * WIP: change webpack config * WIP: rename iv to initVector * WIP * WIP: move tests back to /test and reference new /tmdDir * WIP * WIP: rename to test/ to tests/ * WIP: update package-lock.json * Moving virtualfs to dependencies as it should not be bundled by default * WIP: change main and module to correct target * WIP: update package.json Co-authored-by: Roger Qiu <[email protected]>
1 parent 8acc113 commit b24bd10

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+32778
-5956
lines changed

.babelrc

Lines changed: 0 additions & 17 deletions
This file was deleted.

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ end_of_line = lf
55
indent_style = space
66
indent_size = 2
77
insert_final_newline = true
8-
trim_trailing_whitespace = true
8+
trim_trailing_whitespace = true

.flowconfig

Lines changed: 0 additions & 11 deletions
This file was deleted.

.gitignore

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
/.env
22
/result
33
/result-*
4+
.idea/*
45

56
# Logs
67
logs
78
*.log
89
npm-debug.log*
910
yarn-debug.log*
1011
yarn-error.log*
12+
lerna-debug.log*
13+
14+
# Diagnostic reports (https://nodejs.org/api/report.html)
15+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
1116

1217
# Runtime data
1318
pids
@@ -20,11 +25,12 @@ lib-cov
2025

2126
# Coverage directory used by tools like istanbul
2227
coverage
28+
*.lcov
2329

2430
# nyc test coverage
2531
.nyc_output
2632

27-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
33+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
2834
.grunt
2935

3036
# Bower dependency directory (https://bower.io/)
@@ -40,15 +46,24 @@ build/Release
4046
node_modules/
4147
jspm_packages/
4248

43-
# TypeScript v1 declaration files
44-
typings/
49+
# Snowpack dependency directory (https://snowpack.dev/)
50+
web_modules/
51+
52+
# TypeScript cache
53+
*.tsbuildinfo
4554

4655
# Optional npm cache directory
4756
.npm
4857

4958
# Optional eslint cache
5059
.eslintcache
5160

61+
# Microbundle cache
62+
.rpt2_cache/
63+
.rts2_cache_cjs/
64+
.rts2_cache_es/
65+
.rts2_cache_umd/
66+
5267
# Optional REPL history
5368
.node_repl_history
5469

@@ -60,18 +75,46 @@ typings/
6075

6176
# dotenv environment variables file
6277
.env
78+
.env.test
6379

6480
# parcel-bundler cache (https://parceljs.org/)
6581
.cache
82+
.parcel-cache
6683

67-
# next.js build output
84+
# Next.js build output
6885
.next
6986

70-
# nuxt.js build output
87+
# Nuxt.js build / generate output
7188
.nuxt
89+
dist
90+
91+
# Gatsby files
92+
.cache/
93+
# Comment in the public line in if your project uses Gatsby and not Next.js
94+
# https://nextjs.org/blog/next-9-1#public-directory-support
95+
# public
7296

7397
# vuepress build output
7498
.vuepress/dist
7599

76100
# Serverless directories
77-
.serverless
101+
.serverless/
102+
103+
# FuseBox cache
104+
.fusebox/
105+
106+
# DynamoDB Local files
107+
.dynamodb/
108+
109+
# TernJS port file
110+
.tern-port
111+
112+
# Stores VSCode versions used for testing VSCode extensions
113+
.vscode-test
114+
115+
# yarn v2
116+
117+
.yarn/cache
118+
.yarn/unplugged
119+
.yarn/build-state.yml
120+
.pnp.*

.npmignore

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
/pkgs.nix
33
/default.nix
44
/shell.nix
5-
/rollup.config.js
5+
/nix
6+
/webpack.config.js
7+
/tsconfig.json
68
/doc
79
/src
8-
/test
10+
/tests

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#Overview
2+
This library provides an Encrypted File System (EFS)
3+
4+
##Functionality
5+
- Keys are never decrypted on disk
6+
- Uses Asymmetric and Symmetric Encryption
7+
- Allows choice of algorithm for encryption/decryption
8+
9+
10+
#Getting Started
11+
##Building from source
12+
TODO: Write instructions
13+
##
14+
15+
#Development
16+
TODO: Write instructions
17+
18+
#Testing
19+
This library uses [Jest](https://jestjs.io/) for testing.

bin/javascript-demo.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

default.nix

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,8 @@
1-
{
2-
pkgs ? import ./pkgs.nix,
3-
nodeVersion ? "8_x"
4-
}:
5-
with pkgs;
6-
let
7-
nodejs = lib.getAttrFromPath
8-
(lib.splitString "." ("nodejs-" + nodeVersion))
9-
pkgs;
10-
nodePackages = lib.getAttrFromPath
11-
(lib.splitString "." ("nodePackages_" + nodeVersion))
12-
pkgs;
13-
in
14-
stdenv.mkDerivation {
15-
name = "javascript-demo";
16-
version = "0.0.1";
17-
src = lib.cleanSourceWith {
18-
filter = (path: type:
19-
! (builtins.any
20-
(r: (builtins.match r (builtins.baseNameOf path)) != null)
21-
[
22-
"node_modules"
23-
"\.env"
24-
])
25-
);
26-
src = lib.cleanSource attrs.src;
27-
};
28-
buildInputs = [ nodejs dos2unix ];
29-
checkInputs = [ flow ];
30-
}
1+
{ pkgs, nix-gitignore }:
2+
3+
let
4+
drv = (import ./nix/default.nix { inherit pkgs; }).package;
5+
in
6+
drv.overrideAttrs (attrs: {
7+
src = nix-gitignore.gitignoreSource [] attrs.src;
8+
})

dist/Cryptor.js

Lines changed: 92 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/Cryptor.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)