Skip to content

Commit 8b6e435

Browse files
authored
Merge pull request #251 from kuzzleio/2-dev
Release 2.0.0
2 parents 1d41ae5 + 5ba2000 commit 8b6e435

File tree

228 files changed

+14936
-9296
lines changed

Some content is hidden

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

228 files changed

+14936
-9296
lines changed

.eslintignore

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,3 @@
11
# JS generated files from TS
2-
app.js
3-
app.d.ts
4-
app.js.map
5-
lib/**/*.d.ts
6-
lib/**/*.js.map
7-
lib/**/*.js
8-
features/fixtures/application/**/*.d.ts
9-
features/fixtures/application/**/*.js
10-
features/fixtures/application/**/*.js.map
11-
index.d.ts
12-
index.js
13-
index.js.map
2+
dist/
3+
types/dist/

.eslintrc.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
2-
"root": true,
3-
"parser": "@typescript-eslint/parser",
4-
"plugins": [
5-
"@typescript-eslint"
6-
],
2+
"plugins": ["kuzzle"],
73
"extends": [
8-
"eslint:recommended",
9-
"plugin:@typescript-eslint/eslint-recommended",
10-
"plugin:@typescript-eslint/recommended"
4+
"plugin:kuzzle/default",
5+
"plugin:kuzzle/node",
6+
"plugin:kuzzle/typescript"
117
],
12-
"rules": {
13-
"@typescript-eslint/no-explicit-any": 0,
14-
"@typescript-eslint/explicit-module-boundary-types": 0
15-
}
16-
}
8+
"overrides": [
9+
{
10+
"files": ["**/roles/*.ts", "**/collections/*.ts"],
11+
"rules": {
12+
"sort-keys": ["off"]
13+
}
14+
}
15+
]
16+
}

.github/actions/lint/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ runs:
66
- name: Install deps
77
shell: bash
88
run: |
9-
npm ci
10-
npm run test:lint
9+
npm run docker npm ci
10+
npm run test:lint
11+
npm run build
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
name: Install Packages
2+
description: Install necessary packages inside the CI
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- run: sudo apt remove libunwind-dev libunwind8
8+
shell: bash
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "master", "2-stable"]
6+
pull_request:
7+
branches: [ "master", "2-stable", "2-dev" ]
8+
schedule:
9+
- cron: "14 6 * * 5"
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ javascript ]
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v2
31+
with:
32+
languages: ${{ matrix.language }}
33+
queries: +security-and-quality
34+
35+
- name: Autobuild
36+
uses: github/codeql-action/autobuild@v2
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v2
40+
with:
41+
category: "/language:${{ matrix.language }}"

.github/workflows/pull_request.workflow.yml

Lines changed: 36 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,14 @@ jobs:
77
name: Lint
88
runs-on: ubuntu-18.04
99
steps:
10+
- name: Install SSH key
11+
uses: shimataro/ssh-key-action@v2
12+
with:
13+
key: ${{ secrets.SSH_KEY }}
14+
name: id_rsa
15+
known_hosts: unnecessary
1016
- uses: actions/checkout@v2
17+
- uses: ./.github/actions/remove-libs
1118
- uses: actions/setup-node@v1.4.4
1219
with:
1320
node-version: "14"
@@ -18,31 +25,38 @@ jobs:
1825
runs-on: ubuntu-18.04
1926
needs: [lint]
2027
steps:
28+
- name: Install SSH key
29+
uses: shimataro/ssh-key-action@v2
30+
with:
31+
key: ${{ secrets.SSH_KEY }}
32+
name: id_rsa
33+
known_hosts: unnecessary
2134
- uses: actions/checkout@v2
35+
- uses: ./.github/actions/remove-libs
2236
- uses: actions/setup-node@v1.4.4
2337
with:
2438
node-version: "14"
2539
- uses: ./.github/actions/functional-test
2640

27-
doc-dead-links:
28-
name: Check dead-links
29-
runs-on: ubuntu-latest
30-
steps:
31-
- uses: actions/checkout@v2
32-
with:
33-
fetch-depth: 0
34-
- name: Extract references from context
35-
shell: bash
36-
id: extract-refs
37-
run: |
38-
echo "::set-output name=version::$(git describe --abbrev=0 --tags | cut -d. -f 1)"
39-
echo "::set-output name=repo::$(echo $GITHUB_REPOSITORY | cut -d/ -f 2)"
40-
echo "::set-output name=fw-branch::$(if [ $BASE_BRANCH == master ]; then echo master; else echo develop; fi)"
41-
- uses: convictional/trigger-workflow-and-wait@v1.3.0
42-
with:
43-
owner: kuzzleio
44-
repo: documentation
45-
github_token: ${{ secrets.ACCESS_TOKEN_CI }}
46-
workflow_file_name: dead_links.workflow.yml
47-
ref: ${{ steps.extract-refs.outputs.fw-branch }}
48-
inputs: '{"repo_name": "${{ steps.extract-refs.outputs.repo }}", "branch": "${{ github.head_ref }}", "version": "${{ steps.extract-refs.outputs.version }}"}'
41+
# doc-dead-links:
42+
# name: Check dead-links
43+
# runs-on: ubuntu-latest
44+
# steps:
45+
# - uses: actions/checkout@v2
46+
# with:
47+
# fetch-depth: 0
48+
# - name: Extract references from context
49+
# shell: bash
50+
# id: extract-refs
51+
# run: |
52+
# echo "::set-output name=version::$(git describe --abbrev=0 --tags | cut -d. -f 1)"
53+
# echo "::set-output name=repo::$(echo $GITHUB_REPOSITORY | cut -d/ -f 2)"
54+
# echo "::set-output name=fw-branch::$(if [ $BASE_BRANCH == master ]; then echo master; else echo develop; fi)"
55+
# - uses: convictional/trigger-workflow-and-wait@v1.3.0
56+
# with:
57+
# owner: kuzzleio
58+
# repo: documentation
59+
# github_token: ${{ secrets.ACCESS_TOKEN_CI }}
60+
# workflow_file_name: dead_links.workflow.yml
61+
# ref: ${{ steps.extract-refs.outputs.fw-branch }}
62+
# inputs: '{"repo_name": "${{ steps.extract-refs.outputs.repo }}", "branch": "${{ github.head_ref }}", "version": "${{ steps.extract-refs.outputs.version }}"}'

.github/workflows/push_dev.workflow.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,21 @@ on:
44
push:
55
branches:
66
- 1-dev
7+
- 2-dev
78

89
jobs:
910
lint:
1011
name: Lint
1112
runs-on: ubuntu-18.04
1213
steps:
14+
- name: Install SSH key
15+
uses: shimataro/ssh-key-action@v2
16+
with:
17+
key: ${{ secrets.SSH_KEY }}
18+
name: id_rsa
19+
known_hosts: unnecessary
1320
- uses: actions/checkout@v2
21+
- uses: ./.github/actions/remove-libs
1422
- uses: actions/setup-node@v1.4.4
1523
with:
1624
node-version: "14"
@@ -21,7 +29,14 @@ jobs:
2129
runs-on: ubuntu-18.04
2230
needs: [lint]
2331
steps:
32+
- name: Install SSH key
33+
uses: shimataro/ssh-key-action@v2
34+
with:
35+
key: ${{ secrets.SSH_KEY }}
36+
name: id_rsa
37+
known_hosts: unnecessary
2438
- uses: actions/checkout@v2
39+
- uses: ./.github/actions/remove-libs
2540
- uses: actions/setup-node@v1.4.4
2641
with:
2742
node-version: "14"

.github/workflows/push_master.workflow.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,22 @@ on:
44
push:
55
branches:
66
- master
7+
- 1-stable
8+
- 2-stable
79

810
jobs:
911
lint:
1012
name: Lint
1113
runs-on: ubuntu-18.04
1214
steps:
15+
- name: Install SSH key
16+
uses: shimataro/ssh-key-action@v2
17+
with:
18+
key: ${{ secrets.SSH_KEY }}
19+
name: id_rsa
20+
known_hosts: unnecessary
1321
- uses: actions/checkout@v2
22+
- uses: ./.github/actions/remove-libs
1423
- uses: actions/setup-node@v1.4.4
1524
with:
1625
node-version: "14"
@@ -22,6 +31,13 @@ jobs:
2231
needs: [lint]
2332
steps:
2433
- uses: actions/checkout@v2
34+
- name: Install SSH key
35+
uses: shimataro/ssh-key-action@v2
36+
with:
37+
key: ${{ secrets.SSH_KEY }}
38+
name: id_rsa
39+
known_hosts: unnecessary
40+
- uses: ./.github/actions/remove-libs
2541
- uses: actions/setup-node@v1.4.4
2642
with:
2743
node-version: "14"
@@ -56,6 +72,12 @@ jobs:
5672
runs-on: ubuntu-18.04
5773
needs: [functional-tests]
5874
steps:
75+
- name: Install SSH key
76+
uses: shimataro/ssh-key-action@v2
77+
with:
78+
key: ${{ secrets.SSH_KEY }}
79+
name: id_rsa
80+
known_hosts: unnecessary
5981
- uses: actions/checkout@v2
6082
- name: Cache node modules
6183
uses: actions/cache@v2
@@ -75,8 +97,11 @@ jobs:
7597
with:
7698
node-version: "14.x"
7799
registry-url: "https://registry.npmjs.org"
78-
- run: npm install
79-
- run: npm run build
80-
- run: npm publish
100+
# Deploy plugin
101+
- run: npm install && npm run build && npm publish
102+
env:
103+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
104+
# Deploy types
105+
- run: cd types/ && npm run build && npm publish
81106
env:
82107
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,13 @@ node_modules/
88
*~
99
front.js
1010

11-
# Typescript related files
12-
app.js
13-
app.d.ts
14-
app.js.map
15-
16-
lib/**/*.d.ts
17-
lib/**/*.js.map
18-
lib/**/*.js
19-
20-
features/fixtures/application/**/*.d.ts
21-
features/fixtures/application/**/*.js
22-
features/fixtures/application/**/*.js.map
23-
index.d.ts
24-
index.js
25-
index.js.map
2611

2712
# Doc
2813
doc/framework
2914
frontmatter-errors.json
15+
16+
.vscode
17+
18+
# Typescript related files
19+
dist/
20+
types/dist/

benchmark/benchmark.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async function run () {
4444
await Promise.all(promises);
4545

4646
const time = Date.now() - start;
47-
console.log('Send 5000 req in ', time, 'ms (', 5000 / (time/1000).toFixed(1), ' req/s)')
47+
console.log('Send 5000 req in ', time, 'ms (', 5000 / (time/1000).toFixed(1), ' req/s)');
4848
kuzzle.disconnect();
4949
}
5050
catch (error) {

0 commit comments

Comments
 (0)