-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
17,807 additions
and
13,224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"node": "8" | ||
}, | ||
"modules": false | ||
} | ||
] | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,69 @@ | ||
module.exports = { | ||
'env': { | ||
'node': true, | ||
'mocha': true, | ||
'es6': true | ||
env: { | ||
node: true, | ||
mocha: true, | ||
es6: true, | ||
}, | ||
'extends': 'eslint:recommended', | ||
'parserOptions': { | ||
'sourceType': 'module', | ||
"ecmaVersion": 8 | ||
ignorePatterns: ['src/test/*.*'], | ||
overrides: [], | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier', // This should be the last entry. | ||
], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint', 'simple-import-sort'], | ||
parserOptions: { | ||
sourceType: 'module', | ||
ecmaVersion: 8, | ||
}, | ||
'rules': { | ||
'indent': [ | ||
rules: { | ||
'no-console': ['error'], | ||
// "no-var": ["error"], | ||
'comma-dangle': 0, | ||
'prefer-const': 0, | ||
// "quotes": ["error", "double"], | ||
'comma-spacing': 0, // ["error", { before: false, after: true }], | ||
'semi-spacing': 0, // ["warn", { before: false, after: true }], | ||
'space-before-blocks': 0, // ["warn", "always"], | ||
'switch-colon-spacing': ['warn', { after: true, before: false }], | ||
'keyword-spacing': 0, // ["warn", { before: true, after: true }], | ||
'template-curly-spacing': 0, // ["error", "never"], | ||
'rest-spread-spacing': 0, // ["error", "never"], | ||
'no-multi-spaces': 0, // ["warn", { ignoreEOLComments: false }], | ||
|
||
'simple-import-sort/imports': 'error', | ||
'simple-import-sort/exports': 'error', | ||
indent: 'off', | ||
'linebreak-style': ['error', 'unix'], | ||
semi: ['error', 'never'], | ||
'spaced-comment': [ | ||
'error', | ||
2, | ||
'always', | ||
{ | ||
'FunctionDeclaration': { 'parameters': 'first' }, | ||
'FunctionExpression': { 'parameters': 'first' }, | ||
'CallExpression': { 'arguments': 'first' }, | ||
'ArrayExpression': 'first', | ||
'ObjectExpression': 'first' | ||
} | ||
line: { | ||
markers: ['/'], | ||
exceptions: ['-', '+'], | ||
}, | ||
block: { | ||
markers: ['!'], | ||
exceptions: ['*'], | ||
balanced: true, | ||
}, | ||
}, | ||
], | ||
'linebreak-style': [ | ||
'error', | ||
(process.platform === 'win32' ? 'windows' : 'unix') // all windows platforms are denoted by win32 | ||
], | ||
'semi': ['error', 'never'], | ||
'spaced-comment': ['error', 'always', { | ||
'line': { | ||
'markers': ['/'], | ||
'exceptions': ['-', '+'] | ||
}, | ||
'block': { | ||
'markers': ['!'], | ||
'exceptions': ['*'], | ||
'balanced': true | ||
} | ||
}] | ||
} | ||
'@typescript-eslint/no-explicit-any': ['warn'], | ||
|
||
'@typescript-eslint/prefer-optional-chain': 0, // ["warn"], | ||
'no-empty-function': 0, | ||
'@typescript-eslint/no-empty-function': 0, // ["warn"], | ||
'@typescript-eslint/no-var-requires': 0, | ||
'@typescript-eslint/no-this-alias': 0, | ||
'@typescript-eslint/no-empty-interface': ['warn'], | ||
|
||
'@typescript-eslint/no-array-constructor': ['off'], | ||
|
||
'no-extra-parens': 0, | ||
'@typescript-eslint/no-extra-parens': 0, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,73 @@ | ||
name: CI - Linux | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
style: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
cache: 'npm' | ||
|
||
- run: npm ci | ||
|
||
- run: npm run format-check | ||
- run: npm run lint | ||
|
||
build: | ||
name: Build on node lts | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
cache: 'npm' | ||
|
||
- run: npm ci | ||
|
||
- run: npm run build | ||
|
||
- run: npm run browserify | ||
|
||
test: | ||
name: Test on node ${{ matrix.node_version }} and ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 1 | ||
max-parallel: 3 | ||
matrix: | ||
node_version: [12.x, 14.x, 16.x, 17.x, 18.x, 19.x] | ||
os: [ubuntu-latest] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
with: | ||
fetch-depth: 0 | ||
ref: '' | ||
- uses: actions/checkout@v3 | ||
- name: Use Node.js ${{ matrix.node_version }} | ||
uses: actions/setup-node@v1 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.node_version }} | ||
- name: Start Server -> Run Unit and Functional Tests ( install, lint, browserify, test) | ||
cache: 'npm' | ||
|
||
- run: npm i | ||
|
||
- name: Start Server -> Run Unit and Functional Tests (test) | ||
env: | ||
CI: true | ||
MINIO_CI_CD: true | ||
MINT_MODE: full | ||
SERVER_ENDPOINT: localhost:9000 | ||
MINIO_ROOT_USER: minio | ||
MINIO_ROOT_PASSWORD: minio123 | ||
MINIO_KMS_SECRET_KEY: "my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=" | ||
MINIO_KMS_SECRET_KEY: 'my-minio-key:OSMM+vkKUTCvQs9YL/CVMIMt43HFhkUpqJxTmGl6rYw=' | ||
ACCESS_KEY: minio | ||
SECRET_KEY: minio123 | ||
ENABLE_HTTPS: 0 | ||
run: | | ||
wget --quiet -O /tmp/minio https://dl.min.io/server/minio/release/linux-amd64/minio | ||
chmod +x /tmp/minio | ||
/tmp/minio -C /tmp/minio-config server /tmp/data{1...4} & | ||
npm install | ||
npm run lint | ||
npm run browserify | ||
npm run test | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ node_modules | |
|
||
/dist/ | ||
yarn.lock | ||
/.parcel-cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
spec: 'src/test/**/*.mjs', | ||
exit: true, | ||
reporter: 'spec', | ||
ui: 'bdd', | ||
timeout: 5000, | ||
require: ['dotenv/config'], | ||
'node-option': ['experimental-specifier-resolution=node', 'loader=ts-node/esm'], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/dist/ | ||
*.md | ||
/examples/ |
Oops, something went wrong.