Skip to content

Commit f08ffb3

Browse files
committed
chore(codestyle): apply prettier codestyle everywhere
1 parent fae7746 commit f08ffb3

267 files changed

Lines changed: 194013 additions & 21854 deletions

File tree

Some content is hidden

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

‎.devcontainer/devcontainer.json‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,22 @@
1111
}
1212
},
1313
"runArgs": ["--name=tei-publisher-jinks-dev"],
14-
"forwardPorts": [ 8080, 8001, 8443 ],
14+
"forwardPorts": [8080, 8001, 8443],
1515
"customizations": {
1616
"vscode": {
17-
"extensions": [ "exist-db.existdb-vscode", "42crunch.vscode-openapi", "redhat.vscode-xml" ]
17+
"extensions": [
18+
"exist-db.existdb-vscode",
19+
"42crunch.vscode-openapi",
20+
"redhat.vscode-xml"
21+
]
1822
}
1923
},
2024
"overrideCommand": false,
21-
"postCreateCommand": [
22-
"${containerWorkspaceFolder}/.devcontainer/init.sh"
23-
],
25+
"postCreateCommand": ["${containerWorkspaceFolder}/.devcontainer/init.sh"],
2426

2527
"features": {
2628
"ghcr.io/devcontainers/features/node:1": {
2729
"version": "lts"
2830
}
2931
}
30-
}
32+
}

‎.github/dependabot.yml‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
version: 2
22
updates:
3-
- package-ecosystem: npm
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
time: "03:00"
8-
open-pull-requests-limit: 10
9-
- package-ecosystem: "github-actions"
10-
directory: "/"
11-
schedule:
12-
interval: "weekly"
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "03:00"
8+
open-pull-requests-limit: 10
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
interval: "weekly"

‎.github/workflows/build.yml‎

Lines changed: 167 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -5,170 +5,170 @@ name: Build and Test
55
on: [push]
66

77
jobs:
8-
build:
9-
runs-on: ubuntu-latest
10-
continue-on-error: ${{ matrix.experimental }}
11-
env:
12-
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13-
14-
strategy:
15-
fail-fast: false
16-
matrix:
17-
# 7.0.0-SNAPSHOT and 6.4.0 created
18-
exist-version: [6.4.0, release]
19-
java-version: [11]
20-
experimental: [false]
21-
include:
22-
- exist-version: latest
23-
java-version: 21
24-
experimental: true
25-
- exist-version: release
26-
java-version: 11
27-
experimental: true
28-
webcomponents-version: next
29-
30-
steps:
31-
# Checkout code
32-
- uses: actions/checkout@v6
33-
34-
# Speed up apt-get installs
35-
- name: Disable man-db to make package install and removal faster
36-
run: |
37-
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
38-
sudo dpkg-reconfigure man-db
39-
40-
- name: Install Test Dependencies
41-
run: |
42-
sudo apt-get update
43-
sudo apt-get install -y libxml2-utils bats
44-
45-
# sanity check
46-
- name: Ensure all XML files are well-formed
47-
run: |
48-
xmllint --noout \
49-
$(find . -type f -name '*.xml')
50-
51-
- name: Validate ODD files
52-
working-directory: profiles/base10/resources/odd
53-
run: |
54-
errors=0
55-
total=0
56-
while IFS= read -r odd_file; do
57-
total=$((total + 1))
58-
relative_path="${odd_file#../../../}"
59-
output=$(xmllint --noout --schema teipublisher_odds.xsd "$odd_file" 2>&1 | grep -v "Schemas parser warning" | grep -v "^$")
60-
exit_code=$?
61-
if [ $exit_code -eq 0 ]; then
62-
echo "✓ $relative_path"
63-
else
64-
echo "✗ $relative_path"
65-
echo "$output" | sed 's/^/ /'
66-
errors=$((errors + 1))
67-
fi
68-
done < <(find ../../../profiles -name "*.odd" -type f)
69-
echo "Validated $total ODD file(s)"
70-
if [ $errors -gt 0 ]; then
71-
echo "Validation failed: $errors error(s) found"
72-
exit 1
73-
fi
74-
echo "All ODD files validated successfully"
75-
76-
# Install webcomponents version for testing (only when specified in matrix)
77-
- name: Setup Node.js
78-
if: matrix.webcomponents-version != ''
79-
uses: actions/setup-node@v6
80-
with:
81-
node-version: "24"
82-
cache: npm
83-
- name: Install dependencies
84-
if: matrix.webcomponents-version != ''
85-
run: npm ci
86-
- name: Install webcomponents version
87-
if: matrix.webcomponents-version != ''
88-
run: npm install @teipublisher/pb-components@${{ matrix.webcomponents-version }}
89-
90-
# Build
91-
- name: Install Java
92-
uses: actions/setup-java@v5
93-
with:
94-
distribution: 'temurin'
95-
java-version: ${{ matrix.java-version }}
96-
- run: ant
97-
98-
# For private repos use secret org token
99-
- name: authenticate gh cli
100-
timeout-minutes: 1
101-
run: gh auth status
102-
103-
- name: Add Expath Dependency
104-
working-directory: build/
105-
run: |
106-
gh release download -R eeditiones/jinks-templates -p '*.xar' -O '_jinks-tmpl.xar'
107-
# Pinned Roaster to 1.11.0 because of a regression with pb-components. The login endpoint is called with
108-
# a wrong username/password, causing the user to be logged out.
109-
gh release download -R eeditiones/roaster -p 'roaster-*.xar' -O '_roaster.xar' v1.11.0
110-
gh release download -R eeditiones/tei-publisher-lib -p '*.xar' -O '_tp-lib.xar'
111-
gh release download -R eXist-db/templating -p '*.xar' -O '_templating.xar'
112-
gh release download -R eXist-db/expath-crypto-module -p '*.xar' -O '_crypto.xar'
113-
gh release download -R eXistSolutions/exist-jwt -p '*.xar' -O '_jwt.xar'
114-
115-
- name: Check Contents
116-
working-directory: build/
117-
run: ls
118-
119-
# Install
120-
- name: Start exist-ci containers
121-
run: |
122-
docker run -dit -p 8080:8080 -v ${{ github.workspace }}/build:/exist/autodeploy \
123-
--name exist --rm --health-interval=1s --health-start-period=2s \
124-
duncdrum/existdb:${{ matrix.exist-version }}-slim
125-
126-
- name: Wait for server to start
127-
timeout-minutes: 1
128-
run: |
129-
echo "Waiting for server to start..."
130-
until docker logs exist 2>&1 | grep -q "Server has started"; do
131-
echo "Still waiting..."
132-
sleep 4
133-
done
134-
135-
# Test
136-
- name: Run smoke test
137-
run: bats --tap test/*.bats
138-
139-
- name: debug logs
140-
if: failure()
141-
run: docker logs exist | grep 'ERROR'
142-
143-
- name: Copy logs on failure
144-
if: failure()
145-
run: |
146-
echo "Copying logs..."
147-
docker cp exist:/exist/logs/exist.log ./exist.log
148-
149-
- name: Upload logs artifact
150-
if: failure()
151-
uses: actions/upload-artifact@v6
152-
with:
153-
name: jinks-exist-${{ matrix.exist-version }}-log
154-
path: exist.log
155-
156-
- name: Run Cypress e2e test
157-
if: matrix.experimental != true
158-
uses: cypress-io/github-action@v7
159-
with:
160-
browser: firefox
161-
162-
- name: Run Cypress e2e test (expect fail)
163-
if: matrix.experimental == true
164-
continue-on-error: true
165-
uses: cypress-io/github-action@v7
166-
with:
167-
browser: firefox
168-
169-
- name: Upload cypress sceenshots
170-
if: failure()
171-
uses: actions/upload-artifact@v6
172-
with:
173-
name: CiM-exist-${{ matrix.exist-version }}-${{ matrix.webcomponents-version || 'default' }}-screenshots
174-
path: test/cypress/screenshots/
8+
build:
9+
runs-on: ubuntu-latest
10+
continue-on-error: ${{ matrix.experimental }}
11+
env:
12+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
# 7.0.0-SNAPSHOT and 6.4.0 created
18+
exist-version: [6.4.0, release]
19+
java-version: [11]
20+
experimental: [false]
21+
include:
22+
- exist-version: latest
23+
java-version: 21
24+
experimental: true
25+
- exist-version: release
26+
java-version: 11
27+
experimental: true
28+
webcomponents-version: next
29+
30+
steps:
31+
# Checkout code
32+
- uses: actions/checkout@v6
33+
34+
# Speed up apt-get installs
35+
- name: Disable man-db to make package install and removal faster
36+
run: |
37+
echo 'set man-db/auto-update false' | sudo debconf-communicate >/dev/null
38+
sudo dpkg-reconfigure man-db
39+
40+
- name: Install Test Dependencies
41+
run: |
42+
sudo apt-get update
43+
sudo apt-get install -y libxml2-utils bats
44+
45+
# sanity check
46+
- name: Ensure all XML files are well-formed
47+
run: |
48+
xmllint --noout \
49+
$(find . -type f -name '*.xml')
50+
51+
- name: Validate ODD files
52+
working-directory: profiles/base10/resources/odd
53+
run: |
54+
errors=0
55+
total=0
56+
while IFS= read -r odd_file; do
57+
total=$((total + 1))
58+
relative_path="${odd_file#../../../}"
59+
output=$(xmllint --noout --schema teipublisher_odds.xsd "$odd_file" 2>&1 | grep -v "Schemas parser warning" | grep -v "^$")
60+
exit_code=$?
61+
if [ $exit_code -eq 0 ]; then
62+
echo "✓ $relative_path"
63+
else
64+
echo "✗ $relative_path"
65+
echo "$output" | sed 's/^/ /'
66+
errors=$((errors + 1))
67+
fi
68+
done < <(find ../../../profiles -name "*.odd" -type f)
69+
echo "Validated $total ODD file(s)"
70+
if [ $errors -gt 0 ]; then
71+
echo "Validation failed: $errors error(s) found"
72+
exit 1
73+
fi
74+
echo "All ODD files validated successfully"
75+
76+
# Install webcomponents version for testing (only when specified in matrix)
77+
- name: Setup Node.js
78+
if: matrix.webcomponents-version != ''
79+
uses: actions/setup-node@v6
80+
with:
81+
node-version: "24"
82+
cache: npm
83+
- name: Install dependencies
84+
if: matrix.webcomponents-version != ''
85+
run: npm ci
86+
- name: Install webcomponents version
87+
if: matrix.webcomponents-version != ''
88+
run: npm install @teipublisher/pb-components@${{ matrix.webcomponents-version }}
89+
90+
# Build
91+
- name: Install Java
92+
uses: actions/setup-java@v5
93+
with:
94+
distribution: "temurin"
95+
java-version: ${{ matrix.java-version }}
96+
- run: ant
97+
98+
# For private repos use secret org token
99+
- name: authenticate gh cli
100+
timeout-minutes: 1
101+
run: gh auth status
102+
103+
- name: Add Expath Dependency
104+
working-directory: build/
105+
run: |
106+
gh release download -R eeditiones/jinks-templates -p '*.xar' -O '_jinks-tmpl.xar'
107+
# Pinned Roaster to 1.11.0 because of a regression with pb-components. The login endpoint is called with
108+
# a wrong username/password, causing the user to be logged out.
109+
gh release download -R eeditiones/roaster -p 'roaster-*.xar' -O '_roaster.xar' v1.11.0
110+
gh release download -R eeditiones/tei-publisher-lib -p '*.xar' -O '_tp-lib.xar'
111+
gh release download -R eXist-db/templating -p '*.xar' -O '_templating.xar'
112+
gh release download -R eXist-db/expath-crypto-module -p '*.xar' -O '_crypto.xar'
113+
gh release download -R eXistSolutions/exist-jwt -p '*.xar' -O '_jwt.xar'
114+
115+
- name: Check Contents
116+
working-directory: build/
117+
run: ls
118+
119+
# Install
120+
- name: Start exist-ci containers
121+
run: |
122+
docker run -dit -p 8080:8080 -v ${{ github.workspace }}/build:/exist/autodeploy \
123+
--name exist --rm --health-interval=1s --health-start-period=2s \
124+
duncdrum/existdb:${{ matrix.exist-version }}-slim
125+
126+
- name: Wait for server to start
127+
timeout-minutes: 1
128+
run: |
129+
echo "Waiting for server to start..."
130+
until docker logs exist 2>&1 | grep -q "Server has started"; do
131+
echo "Still waiting..."
132+
sleep 4
133+
done
134+
135+
# Test
136+
- name: Run smoke test
137+
run: bats --tap test/*.bats
138+
139+
- name: debug logs
140+
if: failure()
141+
run: docker logs exist | grep 'ERROR'
142+
143+
- name: Copy logs on failure
144+
if: failure()
145+
run: |
146+
echo "Copying logs..."
147+
docker cp exist:/exist/logs/exist.log ./exist.log
148+
149+
- name: Upload logs artifact
150+
if: failure()
151+
uses: actions/upload-artifact@v6
152+
with:
153+
name: jinks-exist-${{ matrix.exist-version }}-log
154+
path: exist.log
155+
156+
- name: Run Cypress e2e test
157+
if: matrix.experimental != true
158+
uses: cypress-io/github-action@v7
159+
with:
160+
browser: firefox
161+
162+
- name: Run Cypress e2e test (expect fail)
163+
if: matrix.experimental == true
164+
continue-on-error: true
165+
uses: cypress-io/github-action@v7
166+
with:
167+
browser: firefox
168+
169+
- name: Upload cypress sceenshots
170+
if: failure()
171+
uses: actions/upload-artifact@v6
172+
with:
173+
name: CiM-exist-${{ matrix.exist-version }}-${{ matrix.webcomponents-version || 'default' }}-screenshots
174+
path: test/cypress/screenshots/

0 commit comments

Comments
 (0)