@teipublisher/pb-components 3.6.4 → 3.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,6 +27,13 @@ jobs:
27
27
  run:
28
28
  npm ci
29
29
  npm run build:production
30
+ - name: Set up Java
31
+ uses: actions/setup-java@v5
32
+ with:
33
+ distribution: temurin
34
+ java-version: 11
35
+ - name: Generate tei-publisher app with Jinks
36
+ run: ci/setup-tei-publisher-app.sh
30
37
  - name: Build docker image
31
38
  run: docker build -t exist-db -f Dockerfile .
32
39
  - name: Start docker image
@@ -57,6 +64,13 @@ jobs:
57
64
  run:
58
65
  npm ci
59
66
  npm run build:production
67
+ - name: Set up Java
68
+ uses: actions/setup-java@v5
69
+ with:
70
+ distribution: temurin
71
+ java-version: 11
72
+ - name: Generate tei-publisher app with Jinks
73
+ run: ci/setup-tei-publisher-app.sh
60
74
  - name: Build docker image
61
75
  run: docker build -t exist-db -f Dockerfile .
62
76
  - name: Start docker image
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## [3.6.5](https://github.com/eeditiones/tei-publisher-components/compare/v3.6.4...v3.6.5) (2026-07-14)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **pb-page:** detect API version via /api/version on Jinks apps ([ee074fd](https://github.com/eeditiones/tei-publisher-components/commit/ee074fd6fd730ee059e1c440ee5db265b16129ec))
7
+ * **pb-view,pb-grid:** state management: preserve current page/chapter when creating new pb-view ([f86779f](https://github.com/eeditiones/tei-publisher-components/commit/f86779f5ad30c73f7266e2cbe22cba399e297630))
8
+
1
9
  ## [3.6.4](https://github.com/eeditiones/tei-publisher-components/compare/v3.6.3...v3.6.4) (2026-07-03)
2
10
 
3
11
 
package/Dockerfile CHANGED
@@ -1,52 +1,63 @@
1
1
  ARG EXIST_VERSION=release
2
2
  ARG BUILD=local
3
- ARG PUBLISHER_VERSION=9.1.1
3
+ ARG ROUTER_VERSION=1.12.1
4
4
 
5
5
  # START STAGE 1
6
6
  FROM ghcr.io/eeditiones/builder:latest AS builder
7
7
 
8
- ARG ROUTER_VERSION=1.10.0
9
- ARG PUBLISHER_VERSION
8
+ ARG ROUTER_VERSION
10
9
 
11
- # Build tei-publisher-app
12
- RUN git clone https://github.com/eeditiones/tei-publisher-app.git \
13
- && cd tei-publisher-app \
14
- && git checkout v${PUBLISHER_VERSION} \
15
- # if you prefer to have webcomponents included locally, comment out following line and
16
- # enable the ones below
17
- && sed -i 's/$config:webcomponents :=.*;/$config:webcomponents := "local";/' modules/config.xqm \
18
- && ant -Dnpm=npm xar-local
10
+ WORKDIR /tmp
11
+
12
+ # Build EXPATH dependencies required by the generated tei-publisher app
13
+ RUN git clone --depth 1 https://github.com/eeditiones/jinks-templates.git \
14
+ && cd jinks-templates \
15
+ && ant
19
16
 
17
+ RUN git clone --depth 1 https://github.com/eeditiones/tei-publisher-lib.git \
18
+ && cd tei-publisher-lib \
19
+ && ant
20
+
21
+ # tei-publisher-app XAR is generated before docker build by ci/setup-tei-publisher-app.sh
22
+ # using Jinks main + ci/tp_config.json (see .github/workflows/node.js.yml).
23
+ COPY tei-publisher-app/tei-publisher.xar /tmp/tei-publisher.xar
24
+ RUN mkdir -p tei-publisher-app \
25
+ && cd tei-publisher-app \
26
+ && jar xf /tmp/tei-publisher.xar \
27
+ && mkdir -p resources/lib resources/scripts resources/i18n/common
20
28
  WORKDIR /tmp/tei-publisher-app
21
29
 
30
+ # Inject the webcomponents built in this repo (tp_config.json sets script.webcomponents=local)
31
+ COPY dist/*.js resources/lib/
22
32
  COPY dist/*.js resources/scripts/
23
33
  COPY i18n/common/* resources/i18n/common/
24
34
 
25
- RUN ant
35
+ RUN ant xar
26
36
 
27
37
  WORKDIR /tmp
28
38
 
29
39
  ADD http://exist-db.org/exist/apps/public-repo/public/roaster-${ROUTER_VERSION}.xar 001.xar
30
- ADD https://github.com/eeditiones/tei-publisher-lib/releases/latest/download/tei-publisher-lib.xar 002.xar
31
40
 
32
41
  FROM duncdrum/existdb:${EXIST_VERSION} AS build_local
33
42
 
34
43
  ARG USR=root
35
44
  USER ${USR}
36
45
 
37
- ONBUILD COPY --from=builder /tmp/tei-publisher-app/build/*.xar /exist/autodeploy/
38
46
  ONBUILD COPY --from=builder /tmp/*.xar /exist/autodeploy/
47
+ ONBUILD COPY --from=builder /tmp/jinks-templates/build/*.xar /exist/autodeploy/004.xar
48
+ ONBUILD COPY --from=builder /tmp/tei-publisher-lib/build/*.xar /exist/autodeploy/005.xar
49
+ ONBUILD COPY --from=builder /tmp/tei-publisher-app/build/*.xar /exist/autodeploy/006.xar
39
50
 
40
51
  # TODO(DP): Tagging scheme add EXIST_VERSION to the tag
41
- FROM ghcr.io/jinntec/base:main AS build_prod
52
+ FROM ghcr.io/jinntec/base:main AS build_prod
42
53
 
43
54
  ARG USR=nonroot
44
55
  USER ${USR}
45
56
 
46
- # Copy EXPATH dependencies
47
- ONBUILD COPY --from=builder --chown=${USR} /tmp/tei-publisher-app/build/*.xar /exist/autodeploy/
48
- ONBUILD COPY --from=builder --chown=${USR} /tmp/*.xar /exist/autodeploy/
49
-
57
+ ONBUILD COPY --from=builder /tmp/*.xar /exist/autodeploy/
58
+ ONBUILD COPY --from=builder /tmp/jinks-templates/build/*.xar /exist/autodeploy/004.xar
59
+ ONBUILD COPY --from=builder /tmp/tei-publisher-lib/build/*.xar /exist/autodeploy/005.xar
60
+ ONBUILD COPY --from=builder /tmp/tei-publisher-app/build/*.xar /exist/autodeploy/006.xar
50
61
 
51
62
  FROM build_${BUILD}
52
63
 
@@ -55,8 +66,6 @@ USER ${USR}
55
66
 
56
67
  WORKDIR /exist
57
68
 
58
- # ARG ADMIN_PASS=none
59
-
60
69
  ARG CACHE_MEM
61
70
  ARG MAX_BROKER
62
71
  ARG JVM_MAX_RAM_PERCENTAGE
@@ -72,26 +81,6 @@ ENV JDK_JAVA_OPTIONS="\
72
81
  -Dteipublisher.context-path=${CONTEXT_PATH} \
73
82
  -Dteipublisher.proxy-caching=${PROXY_CACHING}"
74
83
 
75
- # ENV JAVA_TOOL_OPTIONS="\
76
- # -Dfile.encoding=UTF8 \
77
- # -Dsun.jnu.encoding=UTF-8 \
78
- # -Djava.awt.headless=true \
79
- # -Dorg.exist.db-connection.cacheSize=${CACHE_MEM:-256}M \
80
- # -Dorg.exist.db-connection.pool.max=${MAX_BROKER:-20} \
81
- # -Dlog4j.configurationFile=/exist/etc/log4j2.xml \
82
- # -Dexist.home=/exist \
83
- # -Dexist.configurationFile=/exist/etc/conf.xml \
84
- # -Djetty.home=/exist \
85
- # -Dexist.jetty.config=/exist/etc/jetty/standard.enabled-jetty-configs \
86
- # -Dteipublisher.ner-endpoint=${NER_ENDPOINT} \
87
- # -Dteipublisher.context-path=${CONTEXT_PATH} \
88
- # -Dteipublisher.proxy-caching=${PROXY_CACHING} \
89
- # -XX:+UseG1GC \
90
- # -XX:+UseStringDeduplication \
91
- # -XX:+UseContainerSupport \
92
- # -XX:MaxRAMPercentage=${JVM_MAX_RAM_PERCENTAGE:-75.0} \
93
- # -XX:+ExitOnOutOfMemoryError"
94
-
95
84
  # pre-populate the database by launching it once and change default pw
96
85
  RUN [ "java", "org.exist.start.Main", "client", "--no-gui", "-l", "-u", "admin", "-P", "" ]
97
86
 
@@ -0,0 +1,70 @@
1
+ #!/usr/bin/env bash
2
+ # Generate tei-publisher-app with Jinks for CI and local Docker builds.
3
+ # Uses the latest jinks main branch (profiles) and ci/tp_config.json.
4
+ # Downloads the deployed app as a XAR (jinks update --sync only fetches changed
5
+ # files, not the full Ant project including build.xml).
6
+ set -euo pipefail
7
+
8
+ JINKS_REF="${JINKS_REF:-main}"
9
+ JINKS_IMAGE="${JINKS_IMAGE:-ghcr.io/eeditiones/jinks:latest}"
10
+ JINKS_SERVER="${JINKS_SERVER:-http://localhost:8080/exist/apps/jinks}"
11
+ CONTAINER_NAME="${JINKS_CONTAINER_NAME:-jinks-server-ci}"
12
+ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
13
+ APP_DIR="$ROOT/tei-publisher-app"
14
+ JINKS_SRC="$(mktemp -d /tmp/jinks-src.XXXXXX)"
15
+
16
+ cleanup() {
17
+ docker rm -f "$CONTAINER_NAME" 2>/dev/null || true
18
+ rm -rf "$JINKS_SRC"
19
+ }
20
+ trap cleanup EXIT
21
+
22
+ if lsof -Pi :8080 -sTCP:LISTEN -t >/dev/null 2>&1; then
23
+ echo "Error: port 8080 is already in use. Stop the service or set JINKS_CONTAINER_NAME to use another setup."
24
+ lsof -Pi :8080 -sTCP:LISTEN
25
+ exit 1
26
+ fi
27
+
28
+ echo "Cloning jinks (${JINKS_REF})..."
29
+ git clone --depth 1 -b "$JINKS_REF" https://github.com/eeditiones/jinks.git "$JINKS_SRC"
30
+ echo "Building jinks XAR..."
31
+ (cd "$JINKS_SRC" && ant)
32
+
33
+ echo "Starting Jinks server (${JINKS_IMAGE})..."
34
+ docker pull "$JINKS_IMAGE"
35
+ docker run -d --name "$CONTAINER_NAME" -p 8080:8080 \
36
+ -v "$JINKS_SRC/build:/exist/autodeploy" \
37
+ "$JINKS_IMAGE"
38
+
39
+ echo "Waiting for Jinks API..."
40
+ for i in $(seq 1 120); do
41
+ if curl -sf "${JINKS_SERVER}/api/configurations" >/dev/null 2>&1; then
42
+ echo "Jinks is ready."
43
+ break
44
+ fi
45
+ if [ "$i" -eq 120 ]; then
46
+ echo "Timeout waiting for Jinks."
47
+ docker logs "$CONTAINER_NAME" 2>&1 | tail -50
48
+ exit 1
49
+ fi
50
+ sleep 2
51
+ done
52
+
53
+ echo "Creating tei-publisher app..."
54
+ npx --yes @teipublisher/jinks-cli create -q -c "$ROOT/ci/tp_config.json" -s "$JINKS_SERVER"
55
+
56
+ echo "Downloading tei-publisher app XAR..."
57
+ rm -rf "$APP_DIR"
58
+ mkdir -p "$APP_DIR"
59
+ (
60
+ cd "$APP_DIR"
61
+ npx --yes @teipublisher/jinks-cli run tei-publisher download -s "$JINKS_SERVER"
62
+ )
63
+
64
+ if [ ! -f "$APP_DIR/tei-publisher.xar" ]; then
65
+ echo "Error: tei-publisher.xar was not downloaded."
66
+ ls -la "$APP_DIR"
67
+ exit 1
68
+ fi
69
+
70
+ echo "tei-publisher-app ready at ${APP_DIR}"
@@ -0,0 +1,31 @@
1
+ {
2
+ "label": "TEI Publisher Documentation and Demo",
3
+ "id": "http://existsolutions.com/apps/tei-publisher",
4
+ "extends": [
5
+ "base10",
6
+ "markdown",
7
+ "demo-data",
8
+ "theme-base10",
9
+ "jats",
10
+ "docbook",
11
+ "iiif",
12
+ "playground",
13
+ "landing-page",
14
+ "docs",
15
+ "docker",
16
+ "ci",
17
+ "docx",
18
+ "upload"
19
+ ],
20
+ "version": "10.0.0",
21
+ "pkg": {
22
+ "abbrev": "tei-publisher"
23
+ },
24
+ "defaults": {
25
+ "site-root": "/exist/apps/tei-publisher"
26
+ },
27
+ "script": {
28
+ "webcomponents": "local"
29
+ },
30
+ "description": "TEI Publisher provides a flexible and sustainable toolbox which enables scholars with limited technical skills to publish their material without forcing it into a one-size-fits-all framework."
31
+ }