Skip to content

Commit

Permalink
Merge branch 'client-refactoring' into 'master'
Browse files Browse the repository at this point in the history
Client refactoring

See merge request MatrixAI/Engineering/Polykey/js-polykey!184
  • Loading branch information
CMCDragonkai committed Oct 25, 2021
2 parents 791dee8 + b98d562 commit edd4e3f
Show file tree
Hide file tree
Showing 397 changed files with 54,130 additions and 48,491 deletions.
61 changes: 57 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"commonjs": true,
"es6": true,
"node": true,
"jest": true,
"jasmine": true
"jest": true
},
"parser": "@typescript-eslint/parser",
"extends": [
Expand All @@ -19,23 +18,77 @@
"sourceType": "module",
"ecmaVersion": 2020
},
"globals": {
"fail": "readonly"
},
"rules": {
"linebreak-style": ["error", "unix"],
"no-empty": 1,
"no-undef": 1,
"no-useless-catch": 1,
"no-prototype-builtins": 1,
"no-constant-condition": 0,
"no-useless-escape" : 0,
"no-console": "error",
"eqeqeq": ["error", "smart"],
"capitalized-comments": [
"warn",
"always",
{
"ignoreInlineComments": true,
"ignoreConsecutiveComments": true
}
],
"@typescript-eslint/no-namespace": 0,
"@typescript-eslint/no-explicit-any": 0,
"@typescript-eslint/explicit-module-boundary-types": 0,
"@typescript-eslint/no-unused-vars": "warn",
"@typescript-eslint/no-unused-vars": [
"warn",
{
"varsIgnorePattern": "^_",
"argsIgnorePattern": "^_"
}
],
"@typescript-eslint/no-inferrable-types": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"@typescript-eslint/no-this-alias": 0,
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/ban-ts-comment": 0,
"@typescript-eslint/no-empty-function": 0,
"no-useless-escape" : 0
"@typescript-eslint/no-empty-interface": 0,
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "default",
"format": ["camelCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allowSingleOrDouble"
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allowSingleOrDouble"
},
{
"selector": "parameter",
"format": ["camelCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allowSingleOrDouble"
},
{
"selector": "typeLike",
"format": ["PascalCase"],
"trailingUnderscore": "allowSingleOrDouble"
},
{
"selector": "objectLiteralProperty",
"format": null
},
{
"selector": "typeProperty",
"format": null
}
]
}
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
.env*
!.env.example
/result*
/src/certs/*.key

# Logs
logs
Expand Down
34 changes: 31 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,71 @@ variables:
stages:
- check
- build
- release

image: registry.gitlab.com/matrixai/engineering/maintenance/gitlab-runner

lint:
stage: check
interruptible: true
script:
- >
nix-shell -I nixpkgs=./pkgs.nix --packages nodejs --run '
npm install;
npm run lint;
'
interruptible: true
test:
stage: check
interruptible: true
script:
- >
nix-shell -I nixpkgs=./pkgs.nix --packages nodejs --run '
npm install;
npm run test;
'
interruptible: true
nix-dry:
stage: check
interruptible: true
script:
- nix-build -v -v --dry-run ./release.nix --attr application
- nix-build -v -v --dry-run ./release.nix --attr docker
interruptible: true
- nix-build -v -v --dry-run ./release.nix --attr package.linux.x64.elf
- nix-build -v -v --dry-run ./release.nix --attr package.windows.x64.exe
- nix-build -v -v --dry-run ./release.nix --attr package.macos.x64.macho

nix:
stage: build
interruptible: true
script:
- >
nix-build ./release.nix
--max-jobs $(nproc)
--attr application
--attr docker
only:
- master

packages:
stage: release
interruptible: true
script:
- >
nix-shell -I nixpkgs=./pkgs.nix --packages git gitAndTools.gh --run '
builds="$(nix-build \
--max-jobs $(nproc) --cores $(nproc) \
./release.nix \
--attr package.linux.x64.elf \
--attr package.windows.x64.exe \
--attr package.macos.x64.macho)";
commit="$(git rev-parse --short HEAD)";
gh release \
create "$commit" $builds \
--title "Build-$(date -u +"%Y-%m-%dT%H:%M:%SZ")" \
--prerelease \
--notes "" \
--repo MatrixAI/js-polykey;
'
only:
- master
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
.*
/nix
/pkgs.nix
/default.nix
/shell.nix
/release.nix
/babel.config.js
/CONTRIBUTING.md
/jest.config.js
/tsconfig.json
/tsconfig.build.json
/src
/tests
/tmp
48 changes: 0 additions & 48 deletions CONTRIBUTING.md

This file was deleted.

Loading

0 comments on commit edd4e3f

Please sign in to comment.