Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Upgrading @matrixai/async-init, @matrixai/async-locks, @matrixai/db, @matrixai/errors, @matrixai/workers, Node.js and integrating @matrixai/resources #366

Closed
wants to merge 78 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
78f819f
WIP
CMCDragonkai Mar 28, 2022
ff47a34
WIP
CMCDragonkai Mar 28, 2022
def75ea
WIP
CMCDragonkai Mar 29, 2022
b7139af
WIP
CMCDragonkai Mar 29, 2022
eba4ab5
WIP
CMCDragonkai Mar 31, 2022
1513517
WIP
CMCDragonkai Mar 31, 2022
56e6ca1
WIP
CMCDragonkai Apr 1, 2022
1450920
WIP
CMCDragonkai Apr 5, 2022
36d70de
WIP
CMCDragonkai Apr 5, 2022
9f3908c
WIP
CMCDragonkai Apr 6, 2022
efa964b
build: upgrade to Node v16
emmacasolin Apr 26, 2022
98b9c0f
build: updating core libraries
emmacasolin Apr 26, 2022
54dc620
wip: all errors extend `AbstractError<T>` and descriptions are static
emmacasolin Apr 26, 2022
891b526
feat: using `cause` property to establish error chain
emmacasolin Apr 27, 2022
a8817fc
feat: static descriptions and exit codes for all errors
emmacasolin Apr 27, 2022
4756866
fix: validation errors are forced to use `void` as `cause`
emmacasolin May 2, 2022
6886dc9
wip: gRPC error serialisation and deserialisation including error chain
emmacasolin May 2, 2022
c6a1f43
feat: error serialisation/deserialisation over gRPC incorporating err…
emmacasolin May 3, 2022
e9545c4
feat: added logger to service handlers
emmacasolin May 4, 2022
ad979c9
syntax: removing index imports
emmacasolin May 4, 2022
2fcc0a6
wip: integrating db changes into ACL
emmacasolin May 7, 2022
2032541
fix: changing `es6` to `es2021` in `./eslintrc`
emmacasolin May 9, 2022
d1ff637
wip: integrating db changes into ACL
emmacasolin May 9, 2022
21fdb85
wip: integrating db changes into vaults
tegefaulkes May 10, 2022
d9f2d9c
wip: integrating db changes into Notifications
tegefaulkes May 11, 2022
bb4c55c
wip: integrating db changes into `Discovery`
tegefaulkes May 11, 2022
4f0dc78
fixin: fix into `wip: integrating db changes into Notifications`
tegefaulkes May 12, 2022
7830d7c
fixin: NotificationsManager.ts
tegefaulkes May 12, 2022
4f4a54b
fixin: vaults domain changes
tegefaulkes May 12, 2022
2b4b97e
fixin: discovery changes
tegefaulkes May 12, 2022
435b37e
wip: integrating db changes into `Sigchain`
tegefaulkes May 12, 2022
5e3e7b7
build: updated dependencies and added incremental build
emmacasolin May 13, 2022
f98cd10
fix: integrating db changes into sessions
emmacasolin May 13, 2022
e521dc6
fix: ACL tests passing
emmacasolin May 13, 2022
a5856c4
fix: keymanager tests passing
emmacasolin May 13, 2022
7515290
fix: git tests passing
emmacasolin May 13, 2022
86a2323
fix: NodeGraph tests passing
emmacasolin May 13, 2022
d2f7db4
wip: adding transactions to service handlers
emmacasolin May 13, 2022
edc53c9
fixin: fixing up vaults domain tests
tegefaulkes May 13, 2022
152cc45
fix: fix for `GRPCServer` `http2Servers` hack
tegefaulkes May 13, 2022
be6103e
fixin: ACL linting
tegefaulkes May 13, 2022
50e72d4
fixin: client linting
tegefaulkes May 13, 2022
d2c7f1d
fixin: gestalts linting
tegefaulkes May 13, 2022
fba5473
fixin: nodes linting
tegefaulkes May 13, 2022
2111d47
fixin: identities linting
tegefaulkes May 13, 2022
4618fd2
fixin: sessions linting
tegefaulkes May 13, 2022
63a1d7e
fixin: git linting
tegefaulkes May 13, 2022
2b6c909
fixin: test linting
tegefaulkes May 13, 2022
6ed8c69
fixin: fixing `NotificationsManager` tests
tegefaulkes May 13, 2022
4efb6c3
fix: sigchain test fixes
emmacasolin May 16, 2022
3aa7819
fixin: Small test fixes
tegefaulkes May 16, 2022
4ee7f9b
fix: Small fix for NotificationsManager tests
tegefaulkes May 16, 2022
b687c43
fix: Small fix for Discovery tests
tegefaulkes May 16, 2022
5297219
fix: removing sigchain.transaction
tegefaulkes May 17, 2022
720587b
fix: added locking back into sigchain
emmacasolin May 17, 2022
b7dd7f1
style: lint
emmacasolin May 17, 2022
edc25fd
fix: added locking back into notifications
emmacasolin May 17, 2022
776ef99
style: lint
emmacasolin May 17, 2022
faf0306
fix: discovery test fixes
emmacasolin May 17, 2022
074cf24
fix: fix for `NodeConnection.test.ts` not running
emmacasolin May 17, 2022
a011f65
refactor: replacing `Mutex` with `Lock` for Proxy
emmacasolin May 17, 2022
8b0d78f
style: lint
emmacasolin May 17, 2022
452e92e
fix: fixing vaultManager tests
tegefaulkes May 17, 2022
728b999
test: fixing client tests
tegefaulkes May 17, 2022
f736cfa
test: fixes for agent tests
tegefaulkes May 17, 2022
74b16fc
test: fixes for grpc tests
tegefaulkes May 17, 2022
378663a
wip: error serialisation/deserialisation + metadata
emmacasolin May 18, 2022
9598123
wip: in progress fixes for bin command testing
tegefaulkes May 18, 2022
1ac018a
linting
tegefaulkes May 18, 2022
2e7fb8e
remove: temp fixes to allow building/testing
tegefaulkes May 18, 2022
6dc7fdb
feat: adding transactions to agent service handlers
tegefaulkes May 18, 2022
162d84b
fix: toError deserialisation
emmacasolin May 19, 2022
a55538d
feat: adding metadata of sending node to errors
emmacasolin May 19, 2022
b465657
WIP fixing bin tests
tegefaulkes May 19, 2022
17d4cc0
feat: adding transactions to client service handlers
tegefaulkes May 19, 2022
e0328e0
feat: NodeId in ErrorPolykeyRemote data now encoded
emmacasolin May 20, 2022
8dd56a0
wip: fixes for proxy tests
tegefaulkes May 20, 2022
e5c74b5
feat: updated `NodeConnectionManager`'s resourceAcquire to handle err…
tegefaulkes May 20, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"es2021": true,
"node": true,
"jest": true
},
Expand All @@ -11,26 +11,24 @@
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier",
"prettier/@typescript-eslint"
"prettier"
],
"plugins": [
"import"
],
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module",
"ecmaVersion": 2020
"sourceType": "module"
},
"rules": {
"linebreak-style": ["error", "unix"],
"no-empty": 1,
"no-undef": 0,
"no-useless-catch": 1,
"no-prototype-builtins": 1,
"no-constant-condition": 0,
"no-useless-escape" : 0,
"no-console": "error",
"require-yield": 0,
"eqeqeq": ["error", "smart"],
"spaced-comment": [
"warn",
Expand Down Expand Up @@ -121,6 +119,12 @@
"leadingUnderscore": "allow",
"trailingUnderscore": "allowSingleOrDouble"
},
{
"selector": "function",
"format": ["camelCase", "PascalCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allowSingleOrDouble"
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
/docs
/benches
/builds
/dist/tsbuildinfo
39 changes: 30 additions & 9 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ runCommandNoCC
, callPackage
, jq
}:

let
Expand All @@ -11,20 +12,40 @@ let
packageName = utils.node2nixDev.packageName;
}
''
mkdir -p $out/lib/node_modules/${utils.node2nixDev.packageName}
mkdir -p "$out/lib/node_modules/${utils.node2nixDev.packageName}"
# copy the package.json
cp ${utils.node2nixDev}/lib/node_modules/${utils.node2nixDev.packageName}/package.json $out/lib/node_modules/${utils.node2nixDev.packageName}/
cp \
"${utils.node2nixDev}/lib/node_modules/${utils.node2nixDev.packageName}/package.json" \
"$out/lib/node_modules/${utils.node2nixDev.packageName}/"
# copy the dist
cp -r ${utils.node2nixDev}/lib/node_modules/${utils.node2nixDev.packageName}/dist $out/lib/node_modules/${utils.node2nixDev.packageName}/
cp -r \
"${utils.node2nixDev}/lib/node_modules/${utils.node2nixDev.packageName}/dist" \
"$out/lib/node_modules/${utils.node2nixDev.packageName}/"
# copy over the production dependencies
if [ -d "${utils.node2nixProd}/lib/node_modules" ]; then
cp -r ${utils.node2nixProd}/lib/node_modules $out/lib/node_modules/${utils.node2nixDev.packageName}/
cp -r \
"${utils.node2nixProd}/lib/node_modules" \
"$out/lib/node_modules/${utils.node2nixDev.packageName}/"
fi
# create symlink to the deployed executable folder, if applicable
if [ -d "${utils.node2nixDev}/lib/node_modules/.bin" ]; then
cp -r ${utils.node2nixDev}/lib/node_modules/.bin $out/lib/node_modules/
ln -s $out/lib/node_modules/.bin $out/bin
# symlink bin executables
if [ \
"$(${jq}/bin/jq 'has("bin")' "$out/lib/node_modules/${utils.node2nixDev.packageName}/package.json")" \
== \
"true" \
]; then
mkdir -p "$out/bin"
while IFS= read -r bin_name && IFS= read -r bin_path; do
# make files executable
chmod a+x "$out/lib/node_modules/${utils.node2nixDev.packageName}/$bin_path"
# create the symlink
ln -s \
"../lib/node_modules/${utils.node2nixDev.packageName}/$bin_path" \
"$out/bin/$bin_name"
done < <(
${jq}/bin/jq -r 'select(.bin != null) | .bin | to_entries[] | (.key, .value)' \
"$out/lib/node_modules/${utils.node2nixDev.packageName}/package.json"
)
fi
'';
'';
in
drv
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const os = require('os');
const path = require('path');
const fs = require('fs');
const process = require('process');
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig');

const moduleNameMapper = pathsToModuleNameMapper(
Expand Down
Loading