Skip to content

Commit 1995b1a

Browse files
committed
Initial commit
0 parents  commit 1995b1a

File tree

100 files changed

+19809
-0
lines changed

Some content is hidden

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

100 files changed

+19809
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
max_line_length = off
13+
trim_trailing_whitespace = false

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.eslintrc.json

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["**/*"],
4+
"plugins": ["@nx"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8+
"rules": {
9+
"@nx/enforce-module-boundaries": [
10+
"error",
11+
{
12+
"enforceBuildableLibDependency": true,
13+
"allow": [],
14+
"depConstraints": [
15+
{
16+
"sourceTag": "*",
17+
"onlyDependOnLibsWithTags": ["*"]
18+
}
19+
]
20+
}
21+
]
22+
}
23+
},
24+
{
25+
"files": ["*.ts", "*.tsx"],
26+
"extends": ["plugin:@nx/typescript"],
27+
"rules": {
28+
"@typescript-eslint/typedef": ["error"]
29+
}
30+
},
31+
{
32+
"files": ["*.js", "*.jsx"],
33+
"extends": ["plugin:@nx/javascript"],
34+
"rules": {}
35+
},
36+
{
37+
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
38+
"env": {
39+
"jest": true
40+
},
41+
"rules": {}
42+
}
43+
]
44+
}

.github/actionlint.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
self-hosted-runner:
2+
labels:
3+
- buildjet-2vcpu-ubuntu-2204
4+
- buildjet-4vcpu-ubuntu-2204
5+
- buildjet-8vcpu-ubuntu-2204

.github/actions/setup/action.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Setup
2+
description: ''
3+
4+
inputs:
5+
node-version:
6+
description: Node.js version
7+
required: true
8+
default: 20.4.0
9+
10+
pnpm-version:
11+
description: pnpm version
12+
required: true
13+
default: 8.7.4
14+
15+
runs:
16+
using: 'composite'
17+
steps:
18+
- uses: pnpm/action-setup@v2
19+
name: Install pnpm
20+
with:
21+
version: ${{ inputs.pnpm-version }}
22+
23+
- uses: actions/setup-node@v3
24+
name: Install Node.js
25+
with:
26+
node-version: ${{ inputs.node-version }}
27+
registry-url: https://registry.npmjs.org
28+
cache: pnpm
29+
30+
- name: Install dependencies
31+
run: pnpm install
32+
shell: bash
33+
env:
34+
CI: 'true'
35+
36+
- name: Set GITHUB_BRANCH and NX_BRANCH environment variable in pull request
37+
if: github.event_name == 'pull_request'
38+
shell: bash
39+
run: |
40+
echo "GITHUB_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
41+
echo "NX_BRANCH=${{ github.head_ref }}" >> $GITHUB_ENV
42+
43+
- name: Set GITHUB_BRANCH and NX_BRANCH environment variable
44+
if: github.event_name != 'pull_request'
45+
shell: bash
46+
run: |
47+
echo "GITHUB_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
48+
echo "NX_BRANCH=${{ github.ref_name }}" >> $GITHUB_ENV
49+
50+
- name: Derive appropriate SHAs for base and head for `nx affected` commands
51+
uses: nrwl/nx-set-shas@v3
52+
53+
- name: Cache Nx
54+
uses: actions/cache@v2
55+
with:
56+
path: node_modules/.cache/nx
57+
key: cache-nx-${{ env.NX_BASE }}-${{ env.NX_HEAD }}
58+
restore-keys: |
59+
cache-nx-2-${{ env.NX_BASE }}-
60+
cache-nx-2-

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
8+
- package-ecosystem: npm
9+
directory: /
10+
schedule:
11+
interval: daily

.github/workflows/build-test-lint.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
on:
2+
workflow_call:
3+
inputs:
4+
skip:
5+
default: ''
6+
required: false
7+
type: string
8+
9+
env:
10+
NX_CLOUD_ENCRYPTION_KEY: ${{ secrets.NX_CLOUD_ENCRYPTION_KEY }}
11+
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
12+
NX_VERBOSE_LOGGING: ${{ secrets.NX_VERBOSE_LOGGING }}
13+
NX_SKIP_NX_CACHE: ${{ secrets.NX_SKIP_NX_CACHE }}
14+
NX_TASKS_RUNNER: ${{ secrets.NX_TASKS_RUNNER }}
15+
NX_PERF_LOGGING: ${{ secrets.NX_PERF_LOGGING }}
16+
17+
permissions:
18+
contents: read
19+
actions: read
20+
pull-requests: read
21+
id-token: write
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
if: contains(inputs.skip, 'build') == false
27+
steps:
28+
- uses: actions/checkout@v3
29+
with:
30+
fetch-depth: 0
31+
32+
- name: Setup
33+
id: setup
34+
uses: ./.github/actions/setup
35+
36+
- name: Run affected builds
37+
run: pnpm nx affected:build
38+
39+
test:
40+
runs-on: ubuntu-latest
41+
if: contains(inputs.skip, 'test') == false
42+
steps:
43+
- uses: actions/checkout@v3
44+
with:
45+
fetch-depth: 0
46+
47+
- name: Setup
48+
id: setup
49+
uses: ./.github/actions/setup
50+
51+
- name: Run affected tests
52+
run: pnpm nx affected:test
53+
54+
lint:
55+
runs-on: ubuntu-latest
56+
if: contains(inputs.skip, 'lint') == false
57+
steps:
58+
- uses: actions/checkout@v3
59+
with:
60+
fetch-depth: 0
61+
62+
- name: Setup
63+
id: setup
64+
uses: ./.github/actions/setup
65+
66+
- name: Run affected linting
67+
run: pnpm nx affected:lint

.github/workflows/commitlint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
on:
2+
pull_request:
3+
types: [synchronize, edited, opened]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
lint:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Setup
18+
uses: ./.github/actions/setup
19+
20+
- name: Lint commit messages
21+
run: pnpm commitlint --from $BASE_SHA --to $HEAD_SHA --verbose
22+
env:
23+
BASE_SHA: ${{ github.event.pull_request.base.sha }}
24+
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
25+
26+
- name: Lint pull request title
27+
run: echo $PR_TITLE | yarn commitlint --verbose
28+
env:
29+
PR_TITLE: ${{ github.event.pull_request.title }}

.github/workflows/docs.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
# Specify to run a workflow manually from the Actions tab on GitHub
6+
workflow_dispatch:
7+
8+
permissions:
9+
id-token: write
10+
pages: write
11+
12+
env:
13+
INSTANCE: Writerside/${{ github.event.repository.name }}
14+
ARTIFACT: webHelp${{ github.event.repository.name }}2-all.zip
15+
DOCKER_VERSION: 232.10165.1
16+
ALGOLIA_ARTIFACT: algolia-indexes-${{ github.event.repository.name }}.zip
17+
ALGOLIA_APP_NAME: Deepkit GraphQL
18+
ALGOLIA_INDEX_NAME: docs
19+
ALGOLIA_KEY: ${{ secrets.ALGOLIA_ADMIN_KEY }}
20+
CONFIG_JSON_PRODUCT: ${{ github.event.repository.name }}
21+
CONFIG_JSON_VERSION: 1.0
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v3
30+
31+
- name: Build Writerside docs using Docker
32+
uses: JetBrains/writerside-github-action@v4
33+
with:
34+
instance: ${{ env.INSTANCE }}
35+
artifact: ${{ env.ARTIFACT }}
36+
docker-version: ${{ env.DOCKER_VERSION }}
37+
38+
- name: Upload documentation
39+
uses: actions/upload-artifact@v3
40+
with:
41+
name: docs
42+
path: |
43+
artifacts/${{ env.ARTIFACT }}
44+
artifacts/report.json
45+
retention-days: 7
46+
47+
- name: Upload algolia-indexes
48+
uses: actions/upload-artifact@v3
49+
with:
50+
name: algolia-indexes
51+
path: artifacts/${{ env.ALGOLIA_ARTIFACT }}
52+
retention-days: 7
53+
54+
test:
55+
needs: build
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Download artifacts
59+
uses: actions/download-artifact@v1
60+
with:
61+
name: docs
62+
path: artifacts
63+
64+
- name: Test documentation
65+
uses: JetBrains/writerside-checker-action@v1
66+
with:
67+
instance: ${{ env.INSTANCE }}
68+
69+
deploy:
70+
environment:
71+
name: github-pages
72+
url: ${{ steps.deployment.outputs.page_url }}
73+
needs: test
74+
runs-on: ubuntu-latest
75+
steps:
76+
- name: Download artifact
77+
uses: actions/download-artifact@v3
78+
with:
79+
name: docs
80+
81+
- name: Unzip artifact
82+
uses: montudor/action-zip@v1
83+
with:
84+
args: unzip -qq ${{ env.ARTIFACT }} -d dir
85+
86+
- name: Setup Pages
87+
uses: actions/configure-pages@v2
88+
89+
- name: Upload artifact
90+
uses: actions/upload-pages-artifact@v1
91+
with:
92+
path: dir
93+
94+
- name: Deploy to GitHub Pages
95+
id: deployment
96+
uses: actions/deploy-pages@v1
97+
98+
publish-indexes:
99+
needs: build
100+
runs-on: ubuntu-latest
101+
container:
102+
image: registry.jetbrains.team/p/writerside/builder/algolia-publisher:2.0.32-2
103+
steps:
104+
- uses: actions/checkout@v3
105+
106+
- uses: actions/download-artifact@v3
107+
with:
108+
name: algolia-indexes
109+
110+
- uses: montudor/action-zip@v1
111+
with:
112+
args: unzip -qq ${{ env.ALGOLIA_ARTIFACT }} -d algolia-indexes
113+
114+
- run: |
115+
env "algolia-key=${{env.ALGOLIA_KEY}}" java -jar /opt/builder/help-publication-agent.jar \
116+
update-index \
117+
--application-name ${{env.ALGOLIA_APP_NAME}} \
118+
--index-name ${{env.ALGOLIA_INDEX_NAME}} \
119+
--product ${{env.CONFIG_JSON_PRODUCT}} \
120+
--version ${{env.CONFIG_JSON_VERSION}} \
121+
--index-directory algolia-indexes/ \
122+
2>&1 | tee algolia-update-index-log.txt

.github/workflows/pr.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
on:
2+
pull_request:
3+
4+
concurrency:
5+
group: ${{ github.workflow }}-${{ github.ref }}
6+
cancel-in-progress: true
7+
8+
env:
9+
NX_VERBOSE_LOGGING: ${{ secrets.NX_VERBOSE_LOGGING }}
10+
NX_SKIP_NX_CACHE: ${{ secrets.NX_SKIP_NX_CACHE }}
11+
NX_TASKS_RUNNER: ${{ secrets.NX_TASKS_RUNNER }}
12+
NX_PERF_LOGGING: ${{ secrets.NX_PERF_LOGGING }}
13+
NX_CLOUD_ENCRYPTION_KEY: ${{ secrets.NX_CLOUD_ENCRYPTION_KEY }}
14+
NX_CLOUD_AUTH_TOKEN: ${{ secrets.NX_CLOUD_AUTH_TOKEN }}
15+
16+
permissions:
17+
actions: write
18+
contents: read
19+
pull-requests: write
20+
id-token: write
21+
22+
jobs:
23+
build-test-lint:
24+
uses: ./.github/workflows/build-test-lint.yml
25+
secrets: inherit
26+
with:
27+
skip: lint

0 commit comments

Comments
 (0)