Compare commits

..

37 Commits

Author SHA1 Message Date
4df6e2601a chore(docs): update danny mail draft
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 1m8s
Build & Deploy / 🧪 QA (push) Successful in 2m54s
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Successful in 5m27s
Build & Deploy / 🏗️ Build (push) Successful in 4m29s
Build & Deploy / 🚀 Deploy (push) Successful in 47s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-05-13 18:33:02 +02:00
569b876944 feat(seo): implement AI SEO and structured data schema
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 49s
Build & Deploy / 🧪 QA (push) Successful in 2m27s
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Successful in 3m28s
Build & Deploy / 🏗️ Build (push) Successful in 3m13s
Build & Deploy / 🚀 Deploy (push) Successful in 47s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
- Add robust JSON-LD schema generators (LocalBusiness, FAQ, Service, Event)
- Refactor JsonLd component to use @graph pattern for merging global/local schemas
- Create FaqBlock component with automatic FAQPage schema injection
- Inject specific JSON-LD schemas into mdx pages (home, kompetenzen, messen)
- Add structured AI SEO content (hard facts, stats, clear definitions)
2026-05-13 14:23:24 +02:00
1f905bc86d fix: insert real legacy projects into map
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 54s
Build & Deploy / 🧪 QA (push) Successful in 2m32s
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Successful in 3m48s
Build & Deploy / 🏗️ Build (push) Successful in 3m17s
Build & Deploy / 🚀 Deploy (push) Successful in 47s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-13 13:29:49 +02:00
8fcd68cf19 fix: english translation parity, remove hallucinated map projects, fix next.config syntax
Some checks failed
Build & Deploy / 🔍 Prepare (push) Failing after 1m10s
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Failing after 1m11s
Build & Deploy / 🧪 QA (push) Has been skipped
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 32s
2026-05-13 13:25:46 +02:00
66f28d8af2 chore(observability): port Sentry and memory optimizations from klz-2026
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 56s
Build & Deploy / 🧪 QA (push) Successful in 2m9s
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Failing after 3m30s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
2026-05-13 13:21:07 +02:00
351c27f7d4 fix(ui): adjust grid breakpoints on map and pointer events on footer
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 1m6s
Build & Deploy / 🧪 QA (push) Successful in 2m31s
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Successful in 6m16s
Build & Deploy / 🏗️ Build (push) Successful in 3m47s
Build & Deploy / 🚀 Deploy (push) Successful in 47s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-13 11:48:34 +02:00
56012fd0d6 feat(ui): modernize company timeline with icons and giant typography
Some checks failed
Build & Deploy / 🔍 Prepare (push) Has been cancelled
Build & Deploy / 🧪 QA (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Successful in 6m6s
2026-05-13 11:46:40 +02:00
220e03bed4 feat(ui): redesign germany map to modern dark split layout 2026-05-13 11:44:53 +02:00
1c317db747 fix(ui): add explicit cursor-pointer to core interactive elements to bypass tailwind v4 layer conflicts 2026-05-13 11:23:11 +02:00
33f64272d7 fix: restore hover states and cursor-pointer for all tiles
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 1m11s
Build & Deploy / 🧪 QA (push) Failing after 1m2s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 3s
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Successful in 4m25s
2026-05-13 11:13:34 +02:00
0b837e3376 fix: subcompany tiles layout and active states for 4 items
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 48s
Build & Deploy / 🧪 QA (push) Successful in 2m23s
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Successful in 3m41s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
2026-05-13 11:08:31 +02:00
c4cc98a392 fix: align content with briefing and remove legacy data
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 43s
Build & Deploy / 🧪 QA (push) Successful in 2m11s
CI - Lint, Typecheck & Test / quality-assurance (pull_request) Successful in 4m39s
Build & Deploy / 🏗️ Build (push) Successful in 3m26s
Build & Deploy / 🚀 Deploy (push) Successful in 47s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-05-13 10:49:48 +02:00
2cb0b50193 feat(ui): add AnimatedGlossyBorder and refine industrial interactions
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 39s
Build & Deploy / 🧪 QA (push) Successful in 1m44s
Build & Deploy / 🏗️ Build (push) Successful in 3m23s
Build & Deploy / 🚀 Deploy (push) Successful in 47s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m2s
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-05-13 10:23:47 +02:00
7d6a52e1c6 feat: unified container widths and added magnetic mouse pull to corporate background arcs
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 34s
Build & Deploy / 🧪 QA (push) Successful in 1m20s
Build & Deploy / 🏗️ Build (push) Successful in 2m59s
Build & Deploy / 🚀 Deploy (push) Successful in 43s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m0s
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 19:08:23 +02:00
55d633a33c feat(mobile): optimize mobile layout, navigation, and spacing
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 43s
Build & Deploy / 🧪 QA (push) Successful in 2m49s
Build & Deploy / 🏗️ Build (push) Successful in 4m54s
Build & Deploy / 🚀 Deploy (push) Successful in 1m19s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m1s
Build & Deploy / 🔔 Notify (push) Successful in 2s
- Implement MobileBottomNav for native thumb-optimized usage
- Simplify Header overlay on mobile
- Add dynamic max() padding to ReferencesSlider for mobile view
- Condense vertical spacing in Footer for mobile devices
- Update layout.tsx to pad main content for bottom nav
2026-05-12 17:02:58 +02:00
1023ef978e feat: assign unique hero videos to each page to avoid duplicates
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 43s
Build & Deploy / 🧪 QA (push) Successful in 2m39s
Build & Deploy / 🏗️ Build (push) Successful in 4m48s
Build & Deploy / 🚀 Deploy (push) Successful in 56s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 1m1s
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 15:46:20 +02:00
2a1f6864c9 fix(deploy): use latest gatekeeper image instead of outdated testing tag
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 35s
Build & Deploy / 🧪 QA (push) Successful in 1m25s
Build & Deploy / 🏗️ Build (push) Successful in 2m52s
Build & Deploy / 🚀 Deploy (push) Successful in 43s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 59s
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 15:20:20 +02:00
fa9fb60dec fix(deploy): allow insecure internal fetches for gatekeeper images
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 35s
Build & Deploy / 🧪 QA (push) Successful in 1m20s
Build & Deploy / 🏗️ Build (push) Successful in 2m50s
Build & Deploy / 🚀 Deploy (push) Successful in 43s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 58s
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 15:06:41 +02:00
3abe4f419f fix(deploy): fix gatekeeper network to allow DB access
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 35s
Build & Deploy / 🧪 QA (push) Successful in 1m20s
Build & Deploy / 🏗️ Build (push) Successful in 2m51s
Build & Deploy / 🚀 Deploy (push) Successful in 42s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 58s
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 14:50:39 +02:00
ba3a711d5b fix(deploy): remove testing.e-tib.com from TRAEFIK_HOST to prevent ACME challenge failure
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 37s
Build & Deploy / 🧪 QA (push) Successful in 1m20s
Build & Deploy / 🏗️ Build (push) Successful in 2m46s
Build & Deploy / 🚀 Deploy (push) Successful in 43s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 58s
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 14:43:42 +02:00
444fc10419 chore(deploy): route both test and testing subdomains to testing env
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 36s
Build & Deploy / 🧪 QA (push) Successful in 1m22s
Build & Deploy / 🏗️ Build (push) Successful in 2m50s
Build & Deploy / 🚀 Deploy (push) Successful in 43s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 58s
Build & Deploy / 🔔 Notify (push) Successful in 1s
Nightly QA / 💨 Smoke & Health (push) Failing after 2m5s
2026-05-12 14:27:46 +02:00
0b8c73c66e fix(deploy): unify image and project naming to resolve manifest unknown error
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 38s
Build & Deploy / 🧪 QA (push) Successful in 1m24s
Build & Deploy / 🏗️ Build (push) Successful in 2m57s
Build & Deploy / 🚀 Deploy (push) Successful in 1m3s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-05-12 13:55:06 +02:00
26d325df44 fix(config): ensure analytics URL has protocol to prevent build crash
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 38s
Build & Deploy / 🧪 QA (push) Successful in 1m22s
Build & Deploy / 🏗️ Build (push) Successful in 4m27s
Build & Deploy / 🚀 Deploy (push) Failing after 39s
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 2s
2026-05-12 13:01:18 +02:00
5d3be82d8f perf: add .dockerignore to optimize docker build context and speed up CI/CD
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 1m16s
Build & Deploy / 🧪 QA (push) Successful in 2m16s
Build & Deploy / 🏗️ Build (push) Failing after 2m22s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 12:14:54 +02:00
c113c27743 fix: use verified registry token for docker build to avoid 401
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 42s
Build & Deploy / 🧪 QA (push) Successful in 1m32s
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🏗️ Build (push) Has been cancelled
2026-05-12 12:08:43 +02:00
bd8660b639 chore: fix lint error (no-empty) in HeroVideo.tsx
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 41s
Build & Deploy / 🧪 QA (push) Successful in 1m32s
Build & Deploy / 🏗️ Build (push) Failing after 2m35s
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 11:34:57 +02:00
99b1e7ba43 chore: fix eslint config whitespace issue in globals
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 41s
Build & Deploy / 🧪 QA (push) Failing after 1m27s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 11:32:19 +02:00
1971fc54ae chore: harden registry auth with diagnostics and multi-domain fallback
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 41s
Build & Deploy / 🧪 QA (push) Failing after 1m26s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 11:29:16 +02:00
1bdead4df8 fix(ci): harden registry auth discovery to try all candidate tokens
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 41s
Build & Deploy / 🧪 QA (push) Failing after 1m1s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 11:16:27 +02:00
0bcc780230 chore: unify pipeline with klz-2026 standards and harden registry auth
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 41s
Build & Deploy / 🧪 QA (push) Failing after 1m2s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 11:13:28 +02:00
e1eff99889 chore: diagnostics for registry auth - trying all methods
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 41s
Build & Deploy / 🧪 QA (push) Failing after 59s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 11:10:21 +02:00
b76542b877 fix: robust token detection and registry verification
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 41s
Build & Deploy / 🧪 QA (push) Failing after 58s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 4s
2026-05-12 11:08:01 +02:00
6466bc4090 fix: add trailing slash to registry URL in registry-auth.sh
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 41s
Build & Deploy / 🧪 QA (push) Failing after 1m0s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 11:05:00 +02:00
c627f1d724 chore: implement robust registry authentication via functional discovery
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 41s
Build & Deploy / 🧪 QA (push) Failing after 1m1s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 11:02:18 +02:00
6a8f4acbc9 chore: harden .npmrc with always-auth and registry aliases
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 41s
Build & Deploy / 🧪 QA (push) Failing after 58s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 11:00:19 +02:00
e96078fcd4 fix: hardened registry authentication by using environment variables and proper .npmrc
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 41s
Build & Deploy / 🧪 QA (push) Failing after 1m3s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 10:57:06 +02:00
ac42c7715e feat(ci): migrate and adapt gitea pipeline from klz-2026
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 44s
Build & Deploy / 🧪 QA (push) Failing after 1m3s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
2026-05-12 10:10:18 +02:00
33050 changed files with 9729 additions and 3833002 deletions

8
.dockerignore Normal file
View File

@@ -0,0 +1,8 @@
node_modules
.next
.turbo
.git
dist
build
*.log
.DS_Store

55
.gitea/workflows/ci.yml Normal file
View File

@@ -0,0 +1,55 @@
name: CI - Lint, Typecheck & Test
on:
pull_request:
concurrency:
group: deploy-pipeline
cancel-in-progress: true
jobs:
quality-assurance:
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: 🔍 Secret Diagnostics
run: |
echo "Checking available secrets..."
[ -n "${{ secrets.NPM_TOKEN }}" ] && echo "✅ NPM_TOKEN is set" || echo "❌ NPM_TOKEN is empty"
[ -n "${{ secrets.GITEA_PAT }}" ] && echo "✅ GITEA_PAT is set" || echo "❌ GITEA_PAT is empty"
[ -n "${{ secrets.MINTEL_PRIVATE_TOKEN }}" ] && echo "✅ MINTEL_PRIVATE_TOKEN is set" || echo "❌ MINTEL_PRIVATE_TOKEN is empty"
[ -n "${{ secrets.MINTEL_REGISTRY_TOKEN }}" ] && echo "✅ MINTEL_REGISTRY_TOKEN is set" || echo "❌ MINTEL_REGISTRY_TOKEN is empty"
- name: 🔐 Registry Auth
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITEA_PAT: ${{ secrets.GITEA_PAT }}
MINTEL_PRIVATE_TOKEN: ${{ secrets.MINTEL_PRIVATE_TOKEN }}
MINTEL_REGISTRY_TOKEN: ${{ secrets.MINTEL_REGISTRY_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash scripts/registry-auth.sh
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: 🧪 QA Checks
env:
TURBO_TELEMETRY_DISABLED: "1"
run: npx turbo run lint typecheck test --cache-dir=".turbo"
- name: 🏗️ Build
run: pnpm build

419
.gitea/workflows/deploy.yml Normal file
View File

@@ -0,0 +1,419 @@
name: Build & Deploy
on:
push:
branches:
- '**'
tags:
- 'v*'
workflow_dispatch:
inputs:
skip_checks:
description: 'Skip tests? (true/false)'
required: false
default: 'false'
env:
PUPPETEER_SKIP_DOWNLOAD: "true"
COREPACK_NPM_REGISTRY: "https://registry.npmmirror.com"
concurrency:
group: deploy-pipeline
cancel-in-progress: true
jobs:
# ──────────────────────────────────────────────────────────────────────────────
# JOB 1: Prepare Environment
# ──────────────────────────────────────────────────────────────────────────────
prepare:
name: 🔍 Prepare
runs-on: docker
outputs:
target: ${{ steps.determine.outputs.target }}
image_tag: ${{ steps.determine.outputs.image_tag }}
env_file: ${{ steps.determine.outputs.env_file }}
traefik_host: ${{ steps.determine.outputs.traefik_host }}
traefik_rule: ${{ steps.determine.outputs.traefik_rule }}
next_public_url: ${{ steps.determine.outputs.next_public_url }}
project_name: ${{ steps.determine.outputs.project_name }}
short_sha: ${{ steps.determine.outputs.short_sha }}
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: 🧹 Maintenance (High Density Cleanup)
shell: bash
run: |
echo "Purging old build layers and dangling images..."
docker image prune -f
docker builder prune -f --filter "until=24h"
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: 🔍 Environment ermitteln
id: determine
shell: bash
run: |
REF="${{ github.ref_name }}"
SHORT_SHA=$(echo "${{ github.sha }}" | cut -c1-7)
DOMAIN="e-tib.com"
PRJ="etib"
if [[ "${{ github.ref_type }}" == "branch" && "$REF" == "main" ]]; then
TARGET="testing"
IMAGE_TAG="main-${SHORT_SHA}"
ENV_FILE=".env.testing"
TRAEFIK_HOST="test.${DOMAIN}"
elif [[ "${{ github.ref_type }}" == "tag" ]]; then
if [[ "$REF" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
TARGET="production"
IMAGE_TAG="$REF"
ENV_FILE=".env.production"
TRAEFIK_HOST="${DOMAIN}, www.${DOMAIN}"
else
TARGET="staging"
IMAGE_TAG="$REF"
ENV_FILE=".env.staging"
TRAEFIK_HOST="staging.${DOMAIN}"
fi
else
TARGET="branch"
SLUG=$(echo "$REF" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
IMAGE_TAG="branch-${SLUG}-${SHORT_SHA}"
ENV_FILE=".env.branch-${SLUG}"
TRAEFIK_HOST="${SLUG}.branch.mintel.me"
fi
# Standardize Traefik Rule
if [[ "$TRAEFIK_HOST" == *","* ]]; then
TRAEFIK_RULE=$(echo "$TRAEFIK_HOST" | sed 's/,/ /g' | awk '{for(i=1;i<=NF;i++) printf "Host(\x60%s\x60)%s", $i, (i==NF?"":" || ")}')
PRIMARY_HOST=$(echo "$TRAEFIK_HOST" | cut -d',' -f1 | sed 's/ //g')
else
TRAEFIK_RULE='Host(`'"$TRAEFIK_HOST"'`)'
PRIMARY_HOST="$TRAEFIK_HOST"
fi
GATEKEEPER_HOST="gatekeeper.$PRIMARY_HOST"
{
echo "target=$TARGET"
echo "image_tag=$IMAGE_TAG"
echo "env_file=$ENV_FILE"
echo "traefik_host=$PRIMARY_HOST"
echo "traefik_rule=$TRAEFIK_RULE"
echo "gatekeeper_host=$GATEKEEPER_HOST"
echo "next_public_url=https://$PRIMARY_HOST"
if [[ "$TARGET" == "production" ]]; then
echo "project_name=etib-production"
elif [[ "$TARGET" == "branch" ]]; then
echo "project_name=$PRJ-branch-$SLUG"
else
echo "project_name=$PRJ-$TARGET"
fi
echo "short_sha=$SHORT_SHA"
} >> "$GITHUB_OUTPUT"
# ──────────────────────────────────────────────────────────────────────────────
# JOB 2: QA (Lint, Typecheck, Test)
# ──────────────────────────────────────────────────────────────────────────────
qa:
name: 🧪 QA
needs: prepare
if: needs.prepare.outputs.target != 'skip'
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: 🔍 Secret Diagnostics
run: |
echo "Checking available secrets..."
[ -n "${{ secrets.NPM_TOKEN }}" ] && echo "✅ NPM_TOKEN is set" || echo "❌ NPM_TOKEN is empty"
[ -n "${{ secrets.GITEA_PAT }}" ] && echo "✅ GITEA_PAT is set" || echo "❌ GITEA_PAT is empty"
[ -n "${{ secrets.MINTEL_PRIVATE_TOKEN }}" ] && echo "✅ MINTEL_PRIVATE_TOKEN is set" || echo "❌ MINTEL_PRIVATE_TOKEN is empty"
[ -n "${{ secrets.MINTEL_REGISTRY_TOKEN }}" ] && echo "✅ MINTEL_REGISTRY_TOKEN is set" || echo "❌ MINTEL_REGISTRY_TOKEN is empty"
- name: 🔐 Registry Auth
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITEA_PAT: ${{ secrets.GITEA_PAT }}
MINTEL_PRIVATE_TOKEN: ${{ secrets.MINTEL_PRIVATE_TOKEN }}
MINTEL_REGISTRY_TOKEN: ${{ secrets.MINTEL_REGISTRY_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash scripts/registry-auth.sh
- name: Install dependencies
run: |
pnpm store prune
pnpm install --no-frozen-lockfile
- name: 🧪 QA Checks
if: github.event.inputs.skip_checks != 'true'
env:
TURBO_TELEMETRY_DISABLED: "1"
run: npx turbo run lint typecheck test --cache-dir=".turbo"
# ──────────────────────────────────────────────────────────────────────────────
# JOB 3: Build & Push
# ──────────────────────────────────────────────────────────────────────────────
build:
name: 🏗️ Build
needs: [prepare, qa]
if: needs.prepare.outputs.target != 'skip'
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: 🔐 Registry Auth
id: auth
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITEA_PAT: ${{ secrets.GITEA_PAT }}
MINTEL_PRIVATE_TOKEN: ${{ secrets.MINTEL_PRIVATE_TOKEN }}
MINTEL_REGISTRY_TOKEN: ${{ secrets.MINTEL_REGISTRY_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash scripts/registry-auth.sh
- name: 🐳 Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: 🔐 Registry Login
run: echo "${{ secrets.REGISTRY_PASS }}" | docker login registry.infra.mintel.me -u "${{ secrets.REGISTRY_USER }}" --password-stdin
- name: 🏗️ Build and Push
uses: docker/build-push-action@v5
with:
context: .
push: true
provenance: false
platforms: linux/amd64
build-args: |
NEXT_PUBLIC_BASE_URL=${{ needs.prepare.outputs.next_public_url }}
NEXT_PUBLIC_TARGET=${{ needs.prepare.outputs.target }}
UMAMI_WEBSITE_ID=${{ secrets.UMAMI_WEBSITE_ID || vars.UMAMI_WEBSITE_ID }}
UMAMI_API_ENDPOINT=${{ secrets.UMAMI_API_ENDPOINT || vars.UMAMI_API_ENDPOINT || 'https://analytics.infra.mintel.me' }}
NPM_TOKEN=${{ steps.auth.outputs.working_token }}
tags: registry.infra.mintel.me/mintel/e-tib.com:${{ needs.prepare.outputs.image_tag }}
secrets: |
"NPM_TOKEN=${{ steps.auth.outputs.working_token }}"
# ──────────────────────────────────────────────────────────────────────────────
# JOB 4: Deploy
# ──────────────────────────────────────────────────────────────────────────────
deploy:
name: 🚀 Deploy
needs: [prepare, build, qa]
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
env:
TARGET: ${{ needs.prepare.outputs.target }}
IMAGE_TAG: ${{ needs.prepare.outputs.image_tag }}
PROJECT_NAME: ${{ needs.prepare.outputs.project_name }}
NEXT_PUBLIC_BASE_URL: ${{ needs.prepare.outputs.next_public_url }}
TRAEFIK_HOST: ${{ needs.prepare.outputs.traefik_host }}
GATEKEEPER_HOST: ${{ needs.prepare.outputs.gatekeeper_host }}
# Secrets mapping (Mail)
MAIL_HOST: ${{ secrets.SMTP_HOST || vars.SMTP_HOST }}
MAIL_PORT: ${{ secrets.SMTP_PORT || vars.SMTP_PORT || '587' }}
MAIL_USERNAME: ${{ secrets.SMTP_USER || vars.SMTP_USER }}
MAIL_PASSWORD: ${{ secrets.SMTP_PASS || vars.SMTP_PASS }}
MAIL_FROM: ${{ secrets.SMTP_FROM || vars.SMTP_FROM || 'noreply@e-tib.com' }}
MAIL_RECIPIENTS: ${{ secrets.CONTACT_RECIPIENT || vars.CONTACT_RECIPIENT || 'info@e-tib.com' }}
# Monitoring
SENTRY_DSN: ${{ secrets.SENTRY_DSN || vars.SENTRY_DSN }}
# Gatekeeper
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD }}
# Analytics
UMAMI_WEBSITE_ID: ${{ secrets.UMAMI_WEBSITE_ID || vars.UMAMI_WEBSITE_ID }}
UMAMI_API_ENDPOINT: ${{ secrets.UMAMI_API_ENDPOINT || vars.UMAMI_API_ENDPOINT || 'https://analytics.infra.mintel.me' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: 📝 Generate Environment
shell: bash
env:
TRAEFIK_RULE: ${{ needs.prepare.outputs.traefik_rule }}
ENV_FILE: ${{ needs.prepare.outputs.env_file }}
run: |
LOG_LEVEL=$( [[ "$TARGET" == "testing" || "$TARGET" == "development" ]] && echo "debug" || echo "info" )
COOKIE_DOMAIN=.$(echo $NEXT_PUBLIC_BASE_URL | sed 's|https://||')
STD_MW="${PROJECT_NAME}-ratelimit,${PROJECT_NAME}-forward,${PROJECT_NAME}-compress"
if [[ "$TARGET" == "production" ]]; then
AUTH_MIDDLEWARE="$STD_MW"
COMPOSE_PROFILES=""
else
AUTH_MIDDLEWARE="${PROJECT_NAME}-ratelimit,${PROJECT_NAME}-forward,${PROJECT_NAME}-auth,${PROJECT_NAME}-compress"
COMPOSE_PROFILES="gatekeeper"
fi
AUTH_MIDDLEWARE_UNPROTECTED="$STD_MW"
GATEKEEPER_ORIGIN="${NEXT_PUBLIC_BASE_URL}/gatekeeper"
{
echo "# Generated by CI - $TARGET"
echo "IMAGE_TAG=$IMAGE_TAG"
echo "NEXT_PUBLIC_BASE_URL=$NEXT_PUBLIC_BASE_URL"
echo "GATEKEEPER_ORIGIN=$GATEKEEPER_ORIGIN"
echo "SENTRY_DSN=$SENTRY_DSN"
echo "LOG_LEVEL=$LOG_LEVEL"
echo "MAIL_HOST=$MAIL_HOST"
echo "MAIL_PORT=$MAIL_PORT"
echo "MAIL_USERNAME=$MAIL_USERNAME"
echo "MAIL_PASSWORD=$MAIL_PASSWORD"
echo "MAIL_FROM=$MAIL_FROM"
echo "MAIL_RECIPIENTS=$MAIL_RECIPIENTS"
echo ""
echo "# Gatekeeper"
echo "GATEKEEPER_PASSWORD=$GATEKEEPER_PASSWORD"
echo "AUTH_COOKIE_NAME=etib_gatekeeper_session"
echo "COOKIE_DOMAIN=$COOKIE_DOMAIN"
echo ""
echo "# Analytics"
echo "UMAMI_WEBSITE_ID=$UMAMI_WEBSITE_ID"
echo "UMAMI_API_ENDPOINT=$UMAMI_API_ENDPOINT"
echo ""
echo "TARGET=$TARGET"
echo "SENTRY_ENVIRONMENT=$TARGET"
echo "PROJECT_NAME=$PROJECT_NAME"
printf 'TRAEFIK_HOST_RULE=%s\n' "$TRAEFIK_RULE"
echo "TRAEFIK_HOST=$TRAEFIK_HOST"
echo "GATEKEEPER_HOST=$GATEKEEPER_HOST"
echo "TRAEFIK_ENTRYPOINT=websecure"
echo "TRAEFIK_TLS=true"
echo "TRAEFIK_CERT_RESOLVER=le"
echo "ENV_FILE=$ENV_FILE"
echo "COMPOSE_PROFILES=$COMPOSE_PROFILES"
echo "AUTH_MIDDLEWARE=$AUTH_MIDDLEWARE"
echo "AUTH_MIDDLEWARE_UNPROTECTED=$AUTH_MIDDLEWARE_UNPROTECTED"
} > .env.deploy
- name: 🚀 SSH Deploy
shell: bash
env:
ENV_FILE: ${{ needs.prepare.outputs.env_file }}
run: |
mkdir -p ~/.ssh
echo "${{ secrets.ALPHA_SSH_KEY }}" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -H alpha.mintel.me >> ~/.ssh/known_hosts 2>/dev/null
if [[ "$TARGET" == "production" ]]; then
SITE_DIR="/home/deploy/sites/e-tib.com"
elif [[ "$TARGET" == "testing" ]]; then
SITE_DIR="/home/deploy/sites/test.e-tib.com"
elif [[ "$TARGET" == "staging" ]]; then
SITE_DIR="/home/deploy/sites/staging.e-tib.com"
else
SLUG=$(echo "${{ github.ref_name }}" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
SITE_DIR="/home/deploy/sites/branch.e-tib.com/$SLUG"
fi
ssh root@alpha.mintel.me "mkdir -p $SITE_DIR"
scp .env.deploy root@alpha.mintel.me:$SITE_DIR/$ENV_FILE
scp docker-compose.yml root@alpha.mintel.me:$SITE_DIR/docker-compose.yml
ssh root@alpha.mintel.me "cd $SITE_DIR && echo '${{ secrets.REGISTRY_PASS }}' | docker login registry.infra.mintel.me -u '${{ secrets.REGISTRY_USER }}' --password-stdin"
ssh root@alpha.mintel.me "cd $SITE_DIR && docker compose -p '${{ needs.prepare.outputs.project_name }}' --env-file '$ENV_FILE' pull"
ssh root@alpha.mintel.me "cd $SITE_DIR && docker compose -p '${{ needs.prepare.outputs.project_name }}' --env-file '$ENV_FILE' up -d --remove-orphans"
ssh root@alpha.mintel.me "docker system prune -f --filter 'until=24h'"
# ──────────────────────────────────────────────────────────────────────────────
# JOB 5: Post-Deploy Verification
# ──────────────────────────────────────────────────────────────────────────────
post_deploy_checks:
name: 🧪 Post-Deploy Verification
needs: [prepare, deploy]
if: needs.deploy.result == 'success' && needs.prepare.outputs.target != 'branch'
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: 🔍 Secret Diagnostics
run: |
echo "Checking available secrets..."
[ -n "${{ secrets.NPM_TOKEN }}" ] && echo "✅ NPM_TOKEN is set" || echo "❌ NPM_TOKEN is empty"
[ -n "${{ secrets.GITEA_PAT }}" ] && echo "✅ GITEA_PAT is set" || echo "❌ GITEA_PAT is empty"
[ -n "${{ secrets.MINTEL_PRIVATE_TOKEN }}" ] && echo "✅ MINTEL_PRIVATE_TOKEN is set" || echo "❌ MINTEL_PRIVATE_TOKEN is empty"
[ -n "${{ secrets.MINTEL_REGISTRY_TOKEN }}" ] && echo "✅ MINTEL_REGISTRY_TOKEN is set" || echo "❌ MINTEL_REGISTRY_TOKEN is empty"
- name: 🔐 Registry Auth
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITEA_PAT: ${{ secrets.GITEA_PAT }}
MINTEL_PRIVATE_TOKEN: ${{ secrets.MINTEL_PRIVATE_TOKEN }}
MINTEL_REGISTRY_TOKEN: ${{ secrets.MINTEL_REGISTRY_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash scripts/registry-auth.sh
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: 🌐 Run Smoke Test
env:
NEXT_PUBLIC_BASE_URL: ${{ needs.prepare.outputs.next_public_url }}
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD }}
run: npx tsx scripts/smoke.ts || echo "⚠️ Smoke test failed"
# ──────────────────────────────────────────────────────────────────────────────
# JOB 6: Notifications
# ──────────────────────────────────────────────────────────────────────────────
notifications:
name: 🔔 Notify
needs: [prepare, deploy, post_deploy_checks]
if: always()
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: 🔔 Gotify
shell: bash
run: |
DEPLOY="${{ needs.deploy.result }}"
TARGET="${{ needs.prepare.outputs.target }}"
VERSION="${{ needs.prepare.outputs.image_tag }}"
URL="${{ needs.prepare.outputs.next_public_url }}"
if [[ "$DEPLOY" == "success" ]]; then
PRIORITY=2
EMOJI="✅"
STATUS_LINE="Deploy Success"
else
PRIORITY=10
EMOJI="🚨"
STATUS_LINE="DEPLOY FAILED"
fi
TITLE="$EMOJI e-tib.com $VERSION → $TARGET"
MESSAGE="$STATUS_LINE\n$URL"
curl -s -k -X POST "${{ secrets.GOTIFY_URL }}/message?token=${{ secrets.GOTIFY_TOKEN }}" \
-F "title=$TITLE" \
-F "message=$MESSAGE" \
-F "priority=$PRIORITY" || true

69
.gitea/workflows/qa.yml Normal file
View File

@@ -0,0 +1,69 @@
name: Nightly QA
on:
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
env:
TARGET_URL: 'https://test.e-tib.com'
PROJECT_NAME: 'etib'
jobs:
smoke:
name: 💨 Smoke & Health
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: 🔍 Secret Diagnostics
run: |
echo "Checking available secrets..."
[ -n "${{ secrets.NPM_TOKEN }}" ] && echo "✅ NPM_TOKEN is set" || echo "❌ NPM_TOKEN is empty"
[ -n "${{ secrets.GITEA_PAT }}" ] && echo "✅ GITEA_PAT is set" || echo "❌ GITEA_PAT is empty"
[ -n "${{ secrets.MINTEL_PRIVATE_TOKEN }}" ] && echo "✅ MINTEL_PRIVATE_TOKEN is set" || echo "❌ MINTEL_PRIVATE_TOKEN is empty"
[ -n "${{ secrets.MINTEL_REGISTRY_TOKEN }}" ] && echo "✅ MINTEL_REGISTRY_TOKEN is set" || echo "❌ MINTEL_REGISTRY_TOKEN is empty"
- name: 🔐 Registry Auth
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITEA_PAT: ${{ secrets.GITEA_PAT }}
MINTEL_PRIVATE_TOKEN: ${{ secrets.MINTEL_PRIVATE_TOKEN }}
MINTEL_REGISTRY_TOKEN: ${{ secrets.MINTEL_REGISTRY_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash scripts/registry-auth.sh
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
- name: 🌐 Install Chrome & Dependencies
run: |
apt-get update && apt-get install -y libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxrandr2 libgbm1 libasound2t64 libpango-1.0-0 libcairo2
npx puppeteer browsers install chrome
- name: 🚀 Run Smoke Test
env:
NEXT_PUBLIC_BASE_URL: ${{ env.TARGET_URL }}
GATEKEEPER_PASSWORD: ${{ secrets.GATEKEEPER_PASSWORD }}
run: npx tsx scripts/smoke.ts
- name: 🔔 Notify
if: always()
run: |
STATUS="${{ job.status }}"
TITLE="💨 ${{ env.PROJECT_NAME }} Nightly Smoke $STATUS"
curl -s -k -X POST "${{ secrets.GOTIFY_URL }}/message?token=${{ secrets.GOTIFY_TOKEN }}" \
-F "title=$TITLE" \
-F "message=Status: $STATUS | URL: ${{ env.TARGET_URL }}" \
-F "priority=5" || true

8
.npmrc
View File

@@ -1 +1,7 @@
@mintel:registry=https://git.infra.mintel.me/api/packages/mmintel/npm/
@mintel:registry=https://git.infra.mintel.me/api/packages/mmintel/npm
//git.infra.mintel.me/api/packages/mmintel/npm/:_authToken=3b9e7c4da038461efd0c6fd006d432d2ace5cb14
//git.infra.mintel.me/api/packages/mmintel/npm/:always-auth=true
//registry.infra.mintel.me/api/packages/mmintel/npm/:_authToken=3b9e7c4da038461efd0c6fd006d432d2ace5cb14
//registry.infra.mintel.me/api/packages/mmintel/npm/:always-auth=true
//npm.infra.mintel.me/:_authToken=3b9e7c4da038461efd0c6fd006d432d2ace5cb14
//npm.infra.mintel.me/:always-auth=true

2
.npmrc.test Normal file
View File

@@ -0,0 +1,2 @@
@mintel:registry=https://npm.infra.mintel.me
//npm.infra.mintel.me/:_authToken=YTJlYzk0ZDk1MzRiMTRmNmQxZWNkMTBkNmFhNTg4Y2I6MWVkMjdjNzE3NDVkMzhmMmQ4MDEyODEwNmJjZmQyYTkwMjY3M2VjZA==

View File

@@ -23,12 +23,13 @@ COPY patches* ./patches/
# Configure private registry and install dependencies
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
--mount=type=secret,id=NPM_TOKEN \
export NPM_TOKEN=$(cat /run/secrets/NPM_TOKEN) && \
echo "@mintel:registry=https://git.infra.mintel.me/api/packages/mmintel/npm" > .npmrc && \
echo "//git.infra.mintel.me/api/packages/mmintel/npm/:_authToken=\${NPM_TOKEN}" >> .npmrc && \
pnpm store prune && \
if [ -f /run/secrets/NPM_TOKEN ]; then \
export NPM_TOKEN=$(cat /run/secrets/NPM_TOKEN); \
echo "@mintel:registry=https://git.infra.mintel.me/api/packages/mmintel/npm" > .npmrc; \
echo "//git.infra.mintel.me/api/packages/mmintel/npm/:_authToken=${NPM_TOKEN}" >> .npmrc; \
fi && \
pnpm install --no-frozen-lockfile && \
rm .npmrc
rm -f .npmrc
# Copy source code
COPY . .

View File

@@ -19,6 +19,9 @@ import { JobListingBlock } from '@/components/blocks/JobListingBlock';
import { CallToAction } from '@/components/blocks/CallToAction';
import { ServiceDetailGrid } from '@/components/blocks/ServiceDetailGrid';
import { BenefitGrid } from '@/components/blocks/BenefitGrid';
import { InteractiveGermanyMap } from '@/components/blocks/InteractiveGermanyMap';
import { FaqBlock } from '@/components/blocks/FaqBlock';
import JsonLd from '@/components/JsonLd';
import { Button } from '@/components/ui/Button';
@@ -32,6 +35,9 @@ const mdxComponents = {
CallToAction,
ServiceDetailGrid,
BenefitGrid,
InteractiveGermanyMap,
FaqBlock,
JsonLd,
Button,
Heading,
};
@@ -131,7 +137,7 @@ export default async function Page(props: { params: Promise<{ locale: string; sl
<Badge variant="accent" className="mb-4 md:mb-6">
{t('badge')}
</Badge>
<Heading level={1} className="text-white mb-0">
<Heading level={1} variant="white" className="mb-0">
{pageData.frontmatter.title}
</Heading>
</div>
@@ -139,7 +145,7 @@ export default async function Page(props: { params: Promise<{ locale: string; sl
</section>
{/* Main Content Area */}
<div className="container mx-auto px-4 py-16 md:py-24">
<Container className="py-16 md:py-24">
<div className="max-w-4xl mx-auto">
{/* Excerpt/Lead paragraph if available */}
{pageData.frontmatter.excerpt && (
@@ -180,7 +186,7 @@ export default async function Page(props: { params: Promise<{ locale: string; sl
</div>
</div>
</div>
</div>
</Container>
</div>
);
}

View File

@@ -1,5 +1,6 @@
import { Footer } from '@/components/layout/Footer';
import { Header } from '@/components/layout/Header';
import { MobileBottomNav } from '@/components/layout/MobileBottomNav';
import JsonLd from '@/components/JsonLd';
import SkipLink from '@/components/SkipLink';
import AnalyticsShell from '@/components/analytics/AnalyticsShell';
@@ -17,6 +18,7 @@ import { cookies } from 'next/headers';
import { TransitionProvider } from '@/components/providers/TransitionProvider';
import { PageTransitionShutter } from '@/components/providers/PageTransitionShutter';
import { InitialLoader } from '@/components/providers/InitialLoader';
import { CorporateBackground } from '@/components/decorations/CorporateBackground';
const inter = Inter({
subsets: ['latin'],
@@ -174,17 +176,19 @@ export default async function Layout(props: {
{/* Preload critical hero video */}
<link rel="preload" as="video" href="/assets/videos/web/hero-bohrung.mp4" type="video/mp4" />
</head>
<body className="flex flex-col min-h-screen font-sans antialiased overflow-x-hidden selection:bg-primary/90 selection:text-white">
<body className="relative flex flex-col min-h-screen font-sans antialiased overflow-x-hidden selection:bg-primary/90 selection:text-white">
<NextIntlClientProvider messages={clientMessages} locale={safeLocale}>
<TransitionProvider>
<CorporateBackground />
<InitialLoader shouldShowLoader={!hasSeenLoader} />
<PageTransitionShutter />
<SkipLink />
<Header navLinks={navLinks} />
<MobileBottomNav navLinks={navLinks} currentLocale={safeLocale} />
<main
id="main-content"
className="flex-grow animate-fade-in overflow-visible"
className="flex-grow animate-fade-in overflow-visible pb-[90px] md:pb-0"
tabIndex={-1}
>
{children}

View File

@@ -11,6 +11,8 @@ import { HeroVideo as HomeHero } from '@/components/blocks/HeroVideo';
import { SubCompanyTiles as HomeSubCompanyTiles } from '@/components/blocks/SubCompanyTiles';
import { CompetenceBentoGrid as HomeCompetenceBentoGrid } from '@/components/blocks/CompetenceBentoGrid';
import { ReferencesSlider as HomeReferencesSlider } from '@/components/blocks/ReferencesSlider';
import { FaqBlock } from '@/components/blocks/FaqBlock';
import JsonLd from '@/components/JsonLd';
import { Button } from '@/components/ui/Button';
import { Heading } from '@/components/ui/Heading';
@@ -20,6 +22,8 @@ const mdxComponents = {
HomeSubCompanyTiles,
HomeCompetenceBentoGrid,
HomeReferencesSlider,
FaqBlock,
JsonLd,
Button,
Heading,
};

19
app/[locale]/template.tsx Normal file
View File

@@ -0,0 +1,19 @@
'use client';
import { motion } from 'framer-motion';
export default function Template({ children }: { children: React.ReactNode }) {
return (
<motion.div
initial={{ opacity: 0, y: 20, filter: 'blur(10px)' }}
animate={{ opacity: 1, y: 0, filter: 'blur(0px)' }}
transition={{
duration: 0.7,
ease: [0.16, 1, 0.3, 1],
}}
className="w-full h-full"
>
{children}
</motion.div>
);
}

View File

@@ -15,6 +15,17 @@
.hide-scrollbar::-webkit-scrollbar {
display: none; /* Chrome, Safari and Opera */
}
@keyframes bg-pulse-15 {
0%, 90%, 100% { opacity: 0.04; }
95% { opacity: 0.10; filter: brightness(1.2); }
}
@keyframes bg-pulse-20 {
0%, 90%, 100% { opacity: 0.07; }
95% { opacity: 0.14; filter: brightness(1.2); }
}
.animate-bg-pulse-15 { animation: bg-pulse-15 12s infinite ease-in-out; }
.animate-bg-pulse-20 { animation: bg-pulse-20 12s infinite ease-in-out; }
}
/* Base Styles */

View File

@@ -1,53 +1,67 @@
import { Thing, WithContext } from 'schema-dts';
import { Thing, WithContext, Graph } from 'schema-dts';
import { getOrganizationSchema, getLocalBusinessSchema, SITE_URL } from '@/lib/schema';
interface JsonLdProps {
id?: string;
data?: WithContext<Thing> | WithContext<Thing>[];
disableGlobal?: boolean;
}
export default function JsonLd({ id, data }: JsonLdProps) {
// If data is provided, use it. Otherwise, use the default Organization + WebSite schema.
const schemaData = data || [
{
'@context': 'https://schema.org',
'@type': 'Organization',
name: 'E-TIB GmbH',
url: 'https://e-tib.com',
logo: 'https://e-tib.com/assets/logo.png',
sameAs: [
'https://www.instagram.com/me.and.eloise/',
],
description: 'Ihr Partner für Kabelleitungstiefbau, Horizontalspülbohrungen, Planung und Vermessung.',
address: {
'@type': 'PostalAddress',
streetAddress: 'Gewerbestraße 22',
addressLocality: 'Guben',
postalCode: '03172',
addressCountry: 'DE',
},
},
{
export default function JsonLd({ id, data, disableGlobal = false }: JsonLdProps) {
let finalSchema: any;
if (disableGlobal && data) {
// Escape hatch for overriding the global graph
finalSchema = data;
} else {
// Construct the @graph array
const graphItems: any[] = [];
// Always include Organization, WebSite, and LocalBusiness for strong AI SEO presence
graphItems.push(getOrganizationSchema());
graphItems.push({
'@context': 'https://schema.org',
'@type': 'WebSite',
name: 'E-TIB',
url: 'https://e-tib.com',
url: SITE_URL,
potentialAction: {
'@type': 'SearchAction',
target: {
'@type': 'EntryPoint',
urlTemplate: 'https://e-tib.com/search?q={search_term_string}',
urlTemplate: `${SITE_URL}/search?q={search_term_string}`,
},
'query-input': 'required name=search_term_string',
},
});
graphItems.push(getLocalBusinessSchema());
// Append dynamic data from props
if (data) {
if (Array.isArray(data)) {
// Strip out their individual @context if we are pushing to a graph
const cleanedData = data.map((d: any) => {
const { '@context': _, ...rest } = d;
return rest;
});
graphItems.push(...cleanedData);
} else {
const { '@context': _, ...rest } = data as any;
graphItems.push(rest);
}
}
];
finalSchema = {
'@context': 'https://schema.org',
'@graph': graphItems,
};
}
return (
<script
id={id}
type="application/ld+json"
dangerouslySetInnerHTML={{
__html: JSON.stringify(schemaData),
__html: JSON.stringify(finalSchema),
}}
/>
);

View File

@@ -3,6 +3,7 @@
import * as React from 'react';
import { motion, Variants } from 'framer-motion';
import { HoverShineOverlay } from '@/components/ui/HoverShineOverlay';
import { LogoArcs } from '@/components/ui/LogoArcs';
export interface BenefitItem {
id: string;
@@ -100,13 +101,32 @@ export function BenefitGrid({ badge, title, description, benefits }: BenefitGrid
whileInView="visible"
viewport={{ once: true, margin: "-50px" }}
>
{benefits.map((benefit) => (
<motion.div
key={benefit.id}
variants={itemVariants}
className="group relative overflow-hidden bg-neutral-50/50 border border-neutral-200/60 rounded-3xl p-8 transition-all duration-500 hover:bg-white hover:border-primary/30 hover:shadow-[0_20px_40px_-15px_rgba(0,0,0,0.05)] hover:-translate-y-1"
>
<HoverShineOverlay shineColor="via-primary/5" />
{benefits.map((benefit, index) => {
const bgPositionClasses = [
"-bottom-[30%] -right-[30%]",
"-top-[30%] -left-[30%]",
"-bottom-[30%] -left-[30%]"
];
const animationClasses = [
"animate-[spin_60s_linear_infinite]",
"animate-[spin_80s_linear_infinite]",
"animate-[spin_100s_linear_infinite]"
];
const positionClass = bgPositionClasses[index % bgPositionClasses.length];
const animationClass = animationClasses[index % animationClasses.length];
return (
<motion.div
key={benefit.id}
variants={itemVariants}
className="group relative overflow-hidden bg-neutral-50/50 border border-neutral-200/60 rounded-3xl p-8 transition-all duration-500 hover:bg-white hover:border-primary/30 hover:shadow-[0_20px_40px_-15px_rgba(0,0,0,0.05)] hover:-translate-y-1"
>
<HoverShineOverlay shineColor="via-primary/5" />
{/* Subtle Background Logo Arcs */}
<div className={`absolute ${positionClass} w-[120%] h-[120%] z-0 opacity-0 group-hover:opacity-[0.03] transition-opacity duration-1000 pointer-events-none mix-blend-multiply`}>
<LogoArcs className={`w-full h-full text-primary ${animationClass}`} />
</div>
<div className="relative z-10 flex items-start gap-4">
<div className="relative shrink-0 w-12 h-12 flex items-center justify-center bg-primary/10 text-primary rounded-xl transition-all duration-500 group-hover:bg-primary group-hover:text-white group-hover:scale-110 group-hover:-rotate-3">
@@ -125,7 +145,8 @@ export function BenefitGrid({ badge, title, description, benefits }: BenefitGrid
</div>
</div>
</motion.div>
))}
);
})}
</motion.div>
</div>
</section>

View File

@@ -2,34 +2,57 @@
import * as React from 'react';
import { motion, useScroll, useTransform } from 'framer-motion';
import { Building2, Compass, Layers, ArrowDownToLine, Wrench, Factory, Zap, MapPin, CheckCircle2 } from 'lucide-react';
const iconMap: Record<string, React.ElementType> = {
Building2,
Compass,
Layers,
ArrowDownToLine,
Wrench,
Factory,
Zap,
MapPin,
CheckCircle2
};
const defaultMilestones = [
{
date: '2015',
title: 'Gründung der E-TIB GmbH',
desc: 'Gründung im brandenburgischen Guben mit Fokus auf Tiefbauarbeiten und Kabelmontagen.',
date: '16.12.2015',
year: '2015',
title: 'Gründung E-TIB GmbH',
desc: 'Ausführung elektrischer Infrastrukturprojekte, Kabelbau und Horizontalspülbohrungen.',
iconName: 'Building2',
},
{
date: 'Wachstum',
title: 'Erweiterung der Kompetenzen',
desc: 'Konsequenter Ausbau der Leistungen um Horizontalspülbohrungen und Kabelpflugarbeiten.',
date: '04.02.2019',
year: '2019',
title: 'Gründung E-TIB Ingenieurgesellschaft',
desc: 'Genehmigungs- und Ausführungsplanung, komplexe Querungen sowie Netzanschlussplanung.',
iconName: 'Compass',
},
{
date: 'Unternehmensgruppe',
title: 'Zusammenschluss',
desc: 'Bündelung der Fachbereiche mit der NEMO GmbH und der E-TIB Ingenieurgesellschaft mbH.',
date: '14.11.2019',
year: '2019',
title: 'Gründung E-TIB Verwaltung GmbH',
desc: 'Zentrale Dienste, Erwerb, Vermietung, Verpachtung und Verwaltung von Immobilien und Maschinen.',
iconName: 'Layers',
},
{
date: 'Heute',
title: 'Die E-TIB Gruppe',
desc: 'Ein starker Verbund mit über 50 Mitarbeitern für bundesweite Infrastrukturprojekte.',
date: '21.10.2025',
year: '2025',
title: 'Gründung E-TIB Bohrtechnik GmbH',
desc: 'Spezialisierung auf präzise Horizontalspülbohrungen in allen Bodenklassen.',
iconName: 'ArrowDownToLine',
},
];
interface Milestone {
date: string;
year: string;
title: string;
desc: string;
iconName: string;
}
interface CompanyTimelineProps {
@@ -52,48 +75,84 @@ export function CompanyTimeline({
const lineHeight = useTransform(scrollYProgress, [0, 1], ["0%", "100%"]);
return (
<section className="py-24 bg-white relative">
<div className="container max-w-4xl">
<div className="text-center mb-16">
<h2 className="text-primary font-bold tracking-wider uppercase text-sm mb-3">{badge}</h2>
<h3 className="font-heading text-4xl font-extrabold text-neutral-dark">{title}</h3>
<section className="py-24 md:py-32 bg-[#FAFAFA] relative overflow-hidden">
{/* Background Decor */}
<div className="absolute top-0 right-0 w-[600px] h-[600px] bg-primary/5 rounded-full blur-[100px] pointer-events-none -translate-y-1/2 translate-x-1/3" />
<div className="absolute bottom-0 left-0 w-[800px] h-[800px] bg-neutral-200/40 rounded-full blur-[120px] pointer-events-none translate-y-1/3 -translate-x-1/3" />
<div className="container max-w-5xl relative z-10">
<div className="text-center mb-24">
<div className="inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-white border border-neutral-200 text-neutral-dark text-xs font-bold uppercase tracking-wider mb-6 shadow-sm">
<span className="w-2 h-2 rounded-full bg-primary animate-pulse" />
{badge}
</div>
<h3 className="font-heading text-4xl md:text-5xl lg:text-6xl font-extrabold text-neutral-dark tracking-tight">
{title}
</h3>
</div>
<div ref={containerRef} className="relative">
{/* Central Line */}
<div className="absolute left-4 md:left-1/2 top-0 bottom-0 w-1 bg-neutral-200 -translate-x-1/2 rounded-full overflow-hidden">
{/* Central Line Background */}
<div className="absolute left-[38px] md:left-1/2 top-0 bottom-0 w-1.5 bg-neutral-200 -translate-x-1/2 rounded-full" />
{/* Animated Central Line */}
<div className="absolute left-[38px] md:left-1/2 top-0 bottom-0 w-1.5 -translate-x-1/2 rounded-full overflow-hidden">
<motion.div
className="w-full bg-primary"
className="w-full bg-primary drop-shadow-[0_0_8px_rgba(130,237,32,0.8)]"
style={{ height: lineHeight }}
/>
</div>
<div className="space-y-12 md:space-y-0">
<div className="space-y-16 md:space-y-24">
{milestones.map((milestone, i) => {
const isEven = i % 2 === 0;
// isEven (0, 2): Left side on desktop
// !isEven (1, 3): Right side on desktop
const Icon = iconMap[milestone.iconName] || Building2;
return (
<motion.div
key={i}
initial={{ opacity: 0, y: 30 }}
initial={{ opacity: 0, y: 40 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, margin: "-100px" }}
transition={{ duration: 0.6 }}
className="relative flex flex-col w-full"
transition={{ duration: 0.7, ease: "easeOut" }}
className="relative flex flex-col md:flex-row items-center w-full group"
>
{/* Timeline Dot */}
<div className="absolute left-4 md:left-1/2 top-8 md:top-1/2 w-6 h-6 rounded-full bg-white border-4 border-primary z-10 -translate-x-1/2 md:-translate-y-1/2 shadow-lg" />
{/* Timeline Dot with Pulse */}
<div className="absolute left-[38px] md:left-1/2 top-0 md:top-1/2 w-8 h-8 rounded-full bg-white border-[5px] border-neutral-200 group-hover:border-primary transition-colors duration-500 z-20 -translate-x-1/2 md:-translate-y-1/2 shadow-sm flex items-center justify-center">
<div className="w-2 h-2 rounded-full bg-neutral-300 group-hover:bg-primary transition-colors duration-500" />
</div>
{/* Content Box */}
<div className={`w-full md:w-[calc(50%-2.5rem)] pl-16 md:pl-0 ${isEven ? 'md:mr-auto md:text-right' : 'md:ml-auto md:text-left'}`}>
<div className="bg-neutral-50 p-6 md:p-8 rounded-2xl shadow-sm border border-neutral-100 hover:shadow-md transition-shadow relative">
<span className="inline-block py-1.5 px-4 rounded-full bg-primary/10 text-primary font-bold text-sm mb-4">
{milestone.date}
</span>
<h4 className="font-heading font-bold text-2xl md:text-3xl mb-3 text-neutral-dark leading-tight">{milestone.title}</h4>
<p className="text-text-secondary leading-relaxed">{milestone.desc}</p>
{/* Content Box Wrapper */}
<div className={`w-full md:w-1/2 pl-24 md:pl-0 ${isEven ? 'md:pr-16 md:text-right' : 'md:pl-16 md:ml-auto md:text-left'}`}>
{/* The Card */}
<div className="relative bg-white p-8 md:p-10 rounded-[2rem] shadow-[0_8px_30px_rgb(0,0,0,0.04)] border border-neutral-100 hover:shadow-[0_20px_40px_rgb(0,0,0,0.08)] hover:border-primary/20 transition-all duration-500 overflow-hidden transform hover:-translate-y-1">
{/* Giant Typography Background Year */}
<div className={`absolute select-none pointer-events-none text-[140px] leading-none font-black text-neutral-50 z-0 ${isEven ? '-left-8' : '-right-8'} -bottom-10 opacity-70 group-hover:scale-110 transition-transform duration-700`}>
{milestone.year}
</div>
<div className="relative z-10">
{/* Header Row */}
<div className={`flex items-center gap-4 mb-6 ${isEven ? 'md:flex-row-reverse' : ''}`}>
<div className="w-12 h-12 rounded-2xl bg-primary/10 text-primary flex items-center justify-center shrink-0 group-hover:bg-primary group-hover:text-neutral-dark transition-colors duration-500">
<Icon className="w-6 h-6" />
</div>
<span className="inline-block py-1.5 px-4 rounded-full bg-neutral-100 text-neutral-600 font-bold text-sm tracking-wide">
{milestone.date}
</span>
</div>
<h4 className="font-heading font-extrabold text-2xl md:text-3xl mb-4 text-neutral-dark leading-tight group-hover:text-primary transition-colors duration-300">
{milestone.title}
</h4>
<p className="text-neutral-500 text-lg leading-relaxed">
{milestone.desc}
</p>
</div>
</div>
</div>
</motion.div>
);

View File

@@ -6,6 +6,9 @@ import { motion } from 'framer-motion';
import { useState, useEffect } from 'react';
import { Button } from '@/components/ui/Button';
import { HoverShineOverlay } from '@/components/ui/HoverShineOverlay';
import { AnimatedGlossyBorder } from '@/components/ui/AnimatedGlossyBorder';
import { Container } from '@/components/ui/Container';
import { LogoArcs } from '@/components/ui/LogoArcs';
interface CompetenceBentoGridProps {
badge?: string;
@@ -58,7 +61,7 @@ export function CompetenceBentoGrid(props: CompetenceBentoGridProps) {
if (!isMounted) {
return (
<section className="py-24 bg-neutral text-neutral-dark overflow-hidden relative">
<div className="container">
<Container>
<div className="flex flex-col md:flex-row justify-between items-end mb-12">
<div className="max-w-2xl">
<h2 className="text-primary font-bold tracking-wider uppercase text-sm mb-3">{badge}</h2>
@@ -68,20 +71,20 @@ export function CompetenceBentoGrid(props: CompetenceBentoGridProps) {
<div className="grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-4 auto-rows-[220px]">
{/* Simplified static grid */}
</div>
</div>
</Container>
</section>
);
}
return (
<section className="py-24 bg-neutral text-neutral-dark relative overflow-hidden">
<div className="container relative z-10 px-4">
<div className="flex flex-col md:flex-row justify-between items-end mb-12">
<Container className="relative z-10 px-0 md:px-12 lg:px-16">
<div className="flex flex-col md:flex-row justify-between items-end mb-12 px-4 md:px-0">
<div className="max-w-2xl">
<h2 className="text-primary font-bold tracking-wider uppercase text-sm mb-3">{badge}</h2>
<h3 className="font-heading text-4xl md:text-5xl font-extrabold text-neutral-dark mb-4">{title}</h3>
</div>
<Button href={ctaHref} variant="ghost" className="mt-6 md:mt-0 bg-primary/5 hover:bg-primary/10">
<Button href={ctaHref} variant="ghost" className="mt-6 md:mt-0 bg-primary/5 hover:bg-primary/10 mx-4 md:mx-0">
{ctaLabel}
<svg xmlns="http://www.w3.org/2000/svg" className="w-5 h-5 ml-2 transform group-hover:translate-x-1 transition-transform" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>
</Button>
@@ -111,7 +114,14 @@ export function CompetenceBentoGrid(props: CompetenceBentoGridProps) {
className={gridClasses}
>
<div className="absolute top-0 right-0 w-32 h-32 bg-primary/30 blur-3xl rounded-full -mr-10 -mt-10 group-hover:bg-primary/50 transition-colors duration-500" />
{/* Subtle Background Logo Arcs */}
<div className={`absolute -bottom-[30%] -right-[30%] w-[120%] h-[120%] z-0 opacity-10 group-hover:opacity-20 transition-opacity duration-1000 pointer-events-none mix-blend-overlay`}>
<LogoArcs className={`w-full h-full text-white animate-[spin_60s_linear_infinite]`} />
</div>
<HoverShineOverlay shineColor="via-white/30" />
<AnimatedGlossyBorder color="white" className="opacity-0 group-hover:opacity-100 transition-opacity duration-700" borderWidth={1} />
<h4 className="font-bold text-xl md:text-2xl relative z-10 leading-snug">{item.title}</h4>
{item.description && <p className="text-white/60 text-sm mt-3 relative z-10">{item.description}</p>}
</motion.div>
@@ -146,6 +156,12 @@ export function CompetenceBentoGrid(props: CompetenceBentoGridProps) {
)}
<HoverShineOverlay />
<AnimatedGlossyBorder color="white" className="opacity-0 group-hover:opacity-100 transition-opacity duration-700" borderWidth={1} />
{/* Subtle Background Logo Arcs */}
<div className="absolute -top-[30%] -left-[30%] w-[120%] h-[120%] z-0 opacity-0 group-hover:opacity-[0.05] transition-opacity duration-1000 pointer-events-none mix-blend-overlay">
<LogoArcs className={`w-full h-full text-white animate-[spin_80s_linear_infinite]`} />
</div>
<div className="relative z-10 p-8 flex flex-col justify-end h-full text-white">
{item.tag && (
@@ -166,7 +182,7 @@ export function CompetenceBentoGrid(props: CompetenceBentoGridProps) {
);
})}
</div>
</div>
</Container>
</section>
);
}

View File

@@ -0,0 +1,64 @@
import React from 'react';
import { getFAQSchema } from '@/lib/schema';
import JsonLd from '@/components/JsonLd';
export interface FAQItem {
question: string;
answer: string;
}
interface FaqBlockProps {
title?: string;
subtitle?: string;
questions: FAQItem[];
}
export const FaqBlock: React.FC<FaqBlockProps> = ({
title = "Häufig gestellte Fragen",
subtitle,
questions
}) => {
if (!questions || questions.length === 0) return null;
return (
<section className="py-12 md:py-16">
<div className="max-w-3xl mx-auto">
<div className="mb-10 text-center">
{subtitle && (
<span className="text-sm font-bold text-accent uppercase tracking-wider block mb-2">
{subtitle}
</span>
)}
<h2 className="text-3xl md:text-4xl font-bold text-text-primary">
{title}
</h2>
</div>
<div className="space-y-4">
{questions.map((item, index) => (
<details
key={index}
className="group border border-neutral-200 bg-white rounded-xl overflow-hidden shadow-sm hover:shadow-md transition-shadow"
>
<summary className="flex items-center justify-between cursor-pointer p-6 font-semibold text-lg text-text-primary hover:text-primary transition-colors select-none">
{item.question}
<span className="ml-4 flex-shrink-0 transition-transform duration-300 group-open:-rotate-180 text-accent">
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M5 7.5L10 12.5L15 7.5" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
</svg>
</span>
</summary>
<div className="px-6 pb-6 text-text-secondary leading-relaxed border-t border-neutral-100 pt-4 prose prose-p:my-2 prose-a:text-primary">
{/* Parse simple HTML or just text if answer has formatting */}
<div dangerouslySetInnerHTML={{ __html: item.answer }} />
</div>
</details>
))}
</div>
</div>
{/* Inject FAQ Schema automatically */}
<JsonLd data={getFAQSchema(questions)} />
</section>
);
};

View File

@@ -41,7 +41,9 @@ export function HeroVideo(props: HeroVideoProps) {
if (typeof window !== 'undefined') {
currentLocale = window.location.pathname.startsWith('/en') ? 'en' : 'de';
}
} catch (e) {}
} catch (e) {
// Fallback to default locale if window/location access fails
}
const secondaryCtaLabel = props.secondaryCtaLabel || data?.secondaryCtaLabel || (currentLocale === 'de' ? 'Projekt anfragen' : 'Inquire Project');
const secondaryCtaHref = props.secondaryCtaHref || data?.secondaryCtaHref || `/${currentLocale}/${currentLocale === 'de' ? 'contact' : 'contact'}`;
@@ -53,6 +55,7 @@ export function HeroVideo(props: HeroVideoProps) {
{videoUrl && (
<video
key={videoUrl}
className="absolute inset-0 w-full h-full object-cover z-1 pointer-events-none filter contrast-125 saturate-110 brightness-90"
src={videoUrl}
autoPlay

View File

@@ -0,0 +1,275 @@
'use client';
import React, { useState } from 'react';
import { motion, AnimatePresence } from 'framer-motion';
import { MapPin, Factory, Zap, CheckCircle2 } from 'lucide-react';
import Image from 'next/image';
export interface Location {
id: string;
name: string;
type: 'hq' | 'branch' | 'project';
x: number;
y: number;
description: string;
details?: string[];
}
const defaultLocations: Location[] = [
{
id: 'guben',
name: 'Guben (Hauptsitz)',
type: 'hq',
x: 85,
y: 48,
description: 'E-TIB GmbH Holding & Bohrtechnik GmbH',
details: ['Zentrale Steuerung', 'Kabelleitungstiefbau', 'Maschinenpark'],
},
{
id: 'buelstedt',
name: 'Bülstedt (Ingenieurgesellschaft)',
type: 'branch',
x: 37,
y: 25,
description: 'E-TIB Ingenieurgesellschaft mbH',
details: ['Planung & Projektierung', 'Vermessung', 'Dokumentation'],
},
{
id: 'spreewald',
name: 'Spreewald (Projekt)',
type: 'project',
x: 82,
y: 45,
description: 'Breitbandausbau FTTC',
},
{
id: 'bomlitz',
name: 'Bomlitz (Projekt)',
type: 'project',
x: 45,
y: 30,
description: 'Breitbandausbau FTTH',
},
{
id: 'forst',
name: 'Forst (Projekt)',
type: 'project',
x: 88,
y: 50,
description: 'Neubau Kabeltrasse',
},
{
id: 'eisenhuettenstadt',
name: 'Eisenhüttenstadt (Projekt)',
type: 'project',
x: 85,
y: 40,
description: 'Kabelverbindung U30 - T10',
},
{
id: 'goerne',
name: 'Görne (Projekt)',
type: 'project',
x: 70,
y: 35,
description: 'Einspeisung PV-Anlage',
}
];
interface Stat {
value: string;
suffix?: string;
label: string;
}
interface InteractiveGermanyMapProps {
badge?: string;
title?: React.ReactNode;
description?: string;
stats?: Stat[];
locations?: Location[];
}
export function InteractiveGermanyMap({
badge = 'Einsatzgebiete',
title = <>Deutschlandweit<br/>für Sie im Einsatz.</>,
description = 'Von unseren strategischen Standorten in Guben und Bülstedt steuern und realisieren wir komplexe Infrastrukturprojekte im gesamten Bundesgebiet.',
stats = [
{ value: '100', suffix: '%', label: 'Überregionale Reichweite' },
{ value: '2', suffix: '+', label: 'Operative Standorte' },
],
locations = defaultLocations
}: InteractiveGermanyMapProps) {
const [activeLocation, setActiveLocation] = useState<Location | null>(null);
const hq = locations.find((l) => l.type === 'hq');
const branch = locations.find((l) => l.type === 'branch');
const projects = locations.filter((l) => l.type === 'project');
return (
<div className="relative w-full max-w-7xl mx-auto py-16 md:py-32 px-4 sm:px-6">
<div className="bg-[#050B14] rounded-[2.5rem] md:rounded-[3.5rem] overflow-hidden relative shadow-2xl border border-white/5">
{/* Background Effects */}
<div className="absolute inset-0 bg-gradient-to-br from-[#050B14] via-[#0A1322] to-[#050B14]" />
<div className="absolute top-0 right-0 w-[800px] h-[800px] bg-primary/5 rounded-full blur-[120px] pointer-events-none translate-x-1/3 -translate-y-1/3" />
<div className="relative z-10 grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-12 gap-12 items-center min-h-[600px] p-8 md:p-12 lg:p-16">
{/* Content Left */}
<div className="xl:col-span-5 text-white z-20">
<div className="inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-primary/10 border border-primary/20 text-primary text-xs font-bold uppercase tracking-wider mb-8">
<MapPin className="w-4 h-4" />
<span>{badge}</span>
</div>
<h3 className="font-heading text-4xl lg:text-5xl xl:text-6xl font-extrabold mb-6 leading-[1.1] text-transparent bg-clip-text bg-gradient-to-r from-white to-white/70 break-words [hyphens:auto]">
{title}
</h3>
<p className="text-white/60 text-lg mb-12 leading-relaxed">
{description}
</p>
{/* Industrial Stats Grid */}
<div className="grid grid-cols-2 gap-4">
{stats.map((stat, i) => (
<div key={i} className="bg-white/5 border border-white/10 rounded-2xl p-6 backdrop-blur-md relative overflow-hidden group">
<div className="absolute inset-0 bg-gradient-to-br from-primary/10 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-500" />
<div className="relative z-10">
<div className="text-4xl font-extrabold text-white mb-1 flex items-baseline gap-1">
{stat.value}<span className="text-xl text-primary">{stat.suffix}</span>
</div>
<div className="text-sm text-white/50 font-medium">{stat.label}</div>
</div>
</div>
))}
</div>
</div>
{/* Map Right */}
<div className="xl:col-span-7 relative flex items-center justify-center lg:justify-end mt-8 lg:mt-0 z-10">
{/* Map Container - Enforce strict aspect ratio matching the SVG (1024x1024) */}
<div className="relative w-full max-w-[600px] aspect-square z-10">
{/* Map SVG */}
<div className="absolute inset-0 opacity-[0.15] mix-blend-screen drop-shadow-2xl brightness-150">
<Image
src="/germany-map.svg"
alt="Deutschlandkarte"
fill
className="object-cover"
priority
/>
</div>
{/* Connections (Lines) */}
<svg className="absolute inset-0 w-full h-full pointer-events-none z-10">
{hq && branch && (
<motion.line
x1={`${hq.x}%`}
y1={`${hq.y}%`}
x2={`${branch.x}%`}
y2={`${branch.y}%`}
stroke="rgba(130,237,32,0.6)"
strokeWidth="2"
strokeDasharray="6 6"
initial={{ pathLength: 0, opacity: 0 }}
animate={{ pathLength: 1, opacity: 1 }}
transition={{ duration: 2, ease: "easeOut" }}
/>
)}
{hq && projects.map((proj, idx) => (
<motion.line
key={proj.id}
x1={`${hq.x}%`}
y1={`${hq.y}%`}
x2={`${proj.x}%`}
y2={`${proj.y}%`}
stroke="rgba(130,237,32,0.3)"
strokeWidth="1.5"
initial={{ pathLength: 0, opacity: 0 }}
animate={{ pathLength: 1, opacity: 1 }}
transition={{ duration: 1.5, delay: 0.5 + idx * 0.2 }}
/>
))}
</svg>
{/* Location Pins */}
{locations.map((loc, idx) => {
const isHQ = loc.type === 'hq';
const isBranch = loc.type === 'branch';
const isActive = activeLocation?.id === loc.id;
return (
<div
key={loc.id}
className="absolute transform -translate-x-1/2 -translate-y-1/2 z-20 group cursor-pointer w-16 h-16 flex items-center justify-center"
style={{ left: `${loc.x}%`, top: `${loc.y}%` }}
onMouseEnter={() => setActiveLocation(loc)}
onMouseLeave={() => setActiveLocation(null)}
>
{/* Ping Animation for HQ / Branch */}
{(isHQ || isBranch) && (
<div className="absolute inset-0 m-auto w-6 h-6 rounded-full animate-ping bg-primary/50 scale-150" />
)}
{/* Marker Dot */}
<motion.div
initial={{ scale: 0 }}
animate={{ scale: 1 }}
transition={{ type: 'spring', delay: idx * 0.1 }}
className={`relative flex items-center justify-center rounded-full shadow-[0_0_20px_rgba(130,237,32,0.4)] transition-transform duration-300 ${
isActive ? 'scale-125 z-30 ring-4 ring-primary/30' : 'scale-100'
} ${
isHQ || isBranch
? 'w-6 h-6 bg-primary text-[#050B14]'
: 'w-3 h-3 bg-white/90 ring-2 ring-primary'
}`}
>
{(isHQ || isBranch) && <MapPin className="w-3.5 h-3.5" />}
</motion.div>
{/* Tooltip */}
<AnimatePresence>
{isActive && (
<motion.div
initial={{ opacity: 0, y: 10, scale: 0.95 }}
animate={{ opacity: 1, y: 0, scale: 1 }}
exit={{ opacity: 0, y: 10, scale: 0.95 }}
transition={{ duration: 0.15 }}
className="absolute left-1/2 -translate-x-1/2 bottom-full mb-3 w-56 bg-white text-neutral-dark p-5 rounded-2xl shadow-2xl z-50 pointer-events-none border border-neutral-100"
>
<div className="flex items-center gap-2 mb-2">
{isHQ ? <Factory className="w-4 h-4 text-primary" /> : <Zap className="w-4 h-4 text-primary" />}
<span className="font-extrabold text-sm leading-tight text-neutral-dark">{loc.name}</span>
</div>
<p className="text-xs text-neutral-500 mt-2 font-medium">{loc.description}</p>
{loc.details && (
<ul className="mt-4 space-y-2">
{loc.details.map((detail, i) => (
<li key={i} className="text-[11px] text-neutral-dark flex items-center gap-2 font-semibold">
<div className="w-4 h-4 rounded-full bg-primary/10 flex items-center justify-center shrink-0">
<CheckCircle2 className="w-3 h-3 text-primary" />
</div>
{detail}
</li>
))}
</ul>
)}
{/* Arrow Down */}
<div className="absolute left-1/2 -bottom-2 -translate-x-1/2 border-8 border-transparent border-t-white drop-shadow-sm" />
</motion.div>
)}
</AnimatePresence>
</div>
);
})}
</div>
</div>
</div>
</div>
</div>
);
}

View File

@@ -101,7 +101,7 @@ export function ReferencesSlider(props: ReferencesSliderProps) {
onMouseLeave={onMouseLeave}
onMouseUp={onMouseUp}
onMouseMove={onMouseMove}
className={`flex gap-6 overflow-x-auto pb-12 pt-4 px-[calc((100vw-min(100%,1280px))/2)] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden ${isDragging ? 'cursor-grabbing snap-none' : 'cursor-grab snap-x snap-mandatory'}`}
className={`flex gap-6 overflow-x-auto pb-12 pt-4 px-[max(1rem,calc((100vw-1280px)/2))] md:px-[max(2rem,calc((100vw-1280px)/2))] lg:px-[max(2.5rem,calc((100vw-1280px)/2))] [scrollbar-width:none] [-ms-overflow-style:none] [&::-webkit-scrollbar]:hidden ${isDragging ? 'cursor-grabbing snap-none' : 'cursor-grab snap-x snap-mandatory'}`}
>
{references.map((ref, i) => {
const imgSrc = (ref.image && typeof ref.image === 'object' && ref.image.url)

View File

@@ -4,6 +4,7 @@ import * as React from 'react';
import { motion, Variants } from 'framer-motion';
import Image from 'next/image';
import { HoverShineOverlay } from '@/components/ui/HoverShineOverlay';
import { AnimatedGlossyBorder } from '@/components/ui/AnimatedGlossyBorder';
interface SubCompanyTilesProps {
badge?: string;
@@ -49,6 +50,7 @@ const itemVariants: Variants = {
};
import { usePathname } from 'next/navigation';
import { LogoArcs } from '@/components/ui/LogoArcs';
export function SubCompanyTiles(props: SubCompanyTilesProps) {
const { data } = props;
@@ -76,21 +78,39 @@ export function SubCompanyTiles(props: SubCompanyTilesProps) {
)}
<motion.div
className="grid grid-cols-1 md:grid-cols-3 gap-6"
className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6"
variants={containerVariants}
initial="hidden"
whileInView="visible"
viewport={{ once: true, margin: "-50px" }}
>
{companiesData.map((company: any, index: number) => {
const isCurrent = !company.url;
const CardWrapper = isCurrent ? 'div' : 'a';
const wrapperProps = !isCurrent ? { href: company.url, target: "_blank", rel: "noopener noreferrer" } : {};
const isCurrent = company.title.toUpperCase() === 'E-TIB GMBH';
const hasUrl = !!company.url;
const CardWrapper = hasUrl ? 'a' : 'div';
const wrapperProps = hasUrl ? { href: company.url, target: "_blank", rel: "noopener noreferrer" } : {};
// Generate logo representation based on title
const isEtib = company.title.includes('E-TIB');
const isIng = company.title.includes('Ingenieur');
const isVerwaltung = company.title.includes('Verwaltung');
const isBohrtechnik = company.title.includes('Bohrtechnik');
const isNemo = company.title.includes('NEMO');
const bgPositionClasses = [
"-bottom-[30%] -right-[30%]",
"-top-[30%] -left-[30%]",
"-bottom-[30%] -left-[30%]",
"-top-[30%] -right-[30%]"
];
const animationClasses = [
"animate-[spin_60s_linear_infinite]",
"animate-[spin_80s_linear_infinite]",
"animate-[spin_100s_linear_infinite]",
"animate-[spin_120s_linear_infinite]"
];
const positionClass = bgPositionClasses[index % bgPositionClasses.length];
const animationClass = animationClasses[index % animationClasses.length];
return (
<motion.div
@@ -126,10 +146,22 @@ export function SubCompanyTiles(props: SubCompanyTilesProps) {
? 'bg-gradient-to-t from-[#0a192f]/90 via-[#0a192f]/60 to-[#0a192f]/40'
: 'bg-gradient-to-t from-[#0a192f]/90 via-[#0a192f]/60 to-[#0a192f]/40 group-hover:from-primary/90 group-hover:to-primary/20'
}`} />
{/* Subtle Background Logo Arcs */}
<div className={`absolute ${positionClass} w-[120%] h-[120%] z-10 opacity-[0.02] group-hover:opacity-[0.08] transition-opacity duration-1000 pointer-events-none mix-blend-overlay`}>
<LogoArcs className={`w-full h-full text-white ${animationClass}`} />
</div>
{/* Premium Shine Sweep Effect (Industrial Reflection) */}
<HoverShineOverlay shineColor="via-white/30" />
{/* Glossy Animated Border */}
<AnimatedGlossyBorder
color={isCurrent ? "primary" : "white"}
className={`transition-opacity duration-700 ${isCurrent ? 'opacity-100' : 'opacity-0 group-hover:opacity-100'}`}
borderWidth={1}
/>
{/* Current Site Indicator Badge */}
{isCurrent && (
<div className="absolute top-6 right-6 z-20">
@@ -159,10 +191,20 @@ export function SubCompanyTiles(props: SubCompanyTilesProps) {
/>
</div>
{isIng && (
<div className="text-white/80 tracking-[0.3em] text-xs font-semibold uppercase mt-1">
<div className="text-white/80 tracking-[0.2em] text-[10px] sm:text-xs font-semibold uppercase mt-1 text-center">
Ingenieurgesellschaft
</div>
)}
{isVerwaltung && (
<div className="text-white/80 tracking-[0.2em] text-[10px] sm:text-xs font-semibold uppercase mt-1 text-center">
Verwaltung GmbH
</div>
)}
{isBohrtechnik && (
<div className="text-white/80 tracking-[0.2em] text-[10px] sm:text-xs font-semibold uppercase mt-1 text-center">
Bohrtechnik GmbH
</div>
)}
</div>
) : isNemo ? (
<div className="flex flex-col items-center">

View File

@@ -0,0 +1,188 @@
'use client';
import React, { useRef, useEffect } from 'react';
import { motion, useScroll, useTransform, useSpring } from 'framer-motion';
import { LogoArcs } from '@/components/ui/LogoArcs';
function MagneticRing({
children,
className,
pullStrength = 30, // How strong the pull is (higher = moves closer to mouse)
pullRadius = 600 // Distance from center at which it starts pulling
}: {
children: React.ReactNode,
className?: string,
pullStrength?: number,
pullRadius?: number
}) {
const ref = useRef<HTMLDivElement>(null);
// Spring physics for extremely smooth, organic movement
const x = useSpring(0, { stiffness: 40, damping: 25, mass: 1 });
const y = useSpring(0, { stiffness: 40, damping: 25, mass: 1 });
useEffect(() => {
// Only run on client with mouse
if (window.matchMedia("(pointer: coarse)").matches) return;
const handleMouseMove = (e: MouseEvent) => {
if (!ref.current) return;
const rect = ref.current.getBoundingClientRect();
const centerX = rect.left + rect.width / 2;
const centerY = rect.top + rect.height / 2;
const distX = e.clientX - centerX;
const distY = e.clientY - centerY;
const distance = Math.sqrt(distX * Math.pow(distX, 2) + Math.pow(distY, 2)); // Fix: correct pythagoras
// Calculate actual distance correctly
const actualDistance = Math.sqrt(distX * distX + distY * distY);
if (actualDistance < pullRadius) {
// Exponential falloff for natural magnetic feel
const pullFactor = Math.pow(1 - (actualDistance / pullRadius), 2);
// Target offset (fraction of the distance based on strength)
x.set(distX * pullFactor * (pullStrength / 100));
y.set(distY * pullFactor * (pullStrength / 100));
} else {
// Return to origin smoothly
x.set(0);
y.set(0);
}
};
window.addEventListener('mousemove', handleMouseMove);
return () => window.removeEventListener('mousemove', handleMouseMove);
}, [x, y, pullRadius, pullStrength]);
return (
<motion.div
ref={ref}
style={{ x, y }}
className={className}
>
{children}
</motion.div>
);
}
export function CorporateBackground() {
const { scrollYProgress } = useScroll();
// Stronger parallax offsets for visible movement
const y1 = useTransform(scrollYProgress, [0, 1], [0, -400]);
const y2 = useTransform(scrollYProgress, [0, 1], [0, 500]);
const y3 = useTransform(scrollYProgress, [0, 1], [0, -600]);
const y4 = useTransform(scrollYProgress, [0, 1], [0, 350]);
const y5 = useTransform(scrollYProgress, [0, 1], [0, -500]);
return (
<div className="absolute inset-0 z-[50] overflow-hidden pointer-events-none" aria-hidden="true">
{/* 1. Top Right - Medium, rotating moderately */}
<motion.div
style={{
y: y1,
animationDelay: '0s',
maskImage: 'radial-gradient(circle at center, black 10%, transparent 60%)',
WebkitMaskImage: 'radial-gradient(circle at center, black 10%, transparent 60%)'
}}
className="absolute top-[0%] right-0 translate-x-[40%] w-[400px] h-[400px] md:w-[700px] md:h-[700px] animate-bg-pulse-20"
>
<MagneticRing pullRadius={700} pullStrength={40} className="w-full h-full">
<motion.div
animate={{ rotate: 360 }}
transition={{ duration: 40, repeat: Infinity, ease: "linear" }}
className="w-full h-full text-primary"
>
<LogoArcs className="w-full h-full" />
</motion.div>
</MagneticRing>
</motion.div>
{/* 2. Quarter way down left - Smaller, rotating fast reverse */}
<motion.div
style={{
y: y2,
animationDelay: '3s',
maskImage: 'radial-gradient(circle at center, black 15%, transparent 65%)',
WebkitMaskImage: 'radial-gradient(circle at center, black 15%, transparent 65%)'
}}
className="absolute top-[20%] left-0 -translate-x-[40%] w-[300px] h-[300px] md:w-[500px] md:h-[500px] animate-bg-pulse-15"
>
<MagneticRing pullRadius={500} pullStrength={50} className="w-full h-full">
<motion.div
animate={{ rotate: -360 }}
transition={{ duration: 30, repeat: Infinity, ease: "linear" }}
className="w-full h-full text-secondary"
>
<LogoArcs className="w-full h-full -rotate-45" />
</motion.div>
</MagneticRing>
</motion.div>
{/* 3. Halfway down right - Medium, rotating slow */}
<motion.div
style={{
y: y3,
animationDelay: '6s',
maskImage: 'radial-gradient(circle at center, black 10%, transparent 60%)',
WebkitMaskImage: 'radial-gradient(circle at center, black 10%, transparent 60%)'
}}
className="absolute top-[45%] right-0 translate-x-[30%] w-[350px] h-[350px] md:w-[600px] md:h-[600px] animate-bg-pulse-15"
>
<MagneticRing pullRadius={600} pullStrength={35} className="w-full h-full">
<motion.div
animate={{ rotate: 360 }}
transition={{ duration: 60, repeat: Infinity, ease: "linear" }}
className="w-full h-full text-primary"
>
<LogoArcs className="w-full h-full rotate-90" />
</motion.div>
</MagneticRing>
</motion.div>
{/* 4. Bottom left - Larger, rotating moderately */}
<motion.div
style={{
y: y4,
animationDelay: '9s',
maskImage: 'radial-gradient(circle at center, black 5%, transparent 60%)',
WebkitMaskImage: 'radial-gradient(circle at center, black 5%, transparent 60%)'
}}
className="absolute top-[70%] left-0 -translate-x-[40%] w-[500px] h-[500px] md:w-[800px] md:h-[800px] animate-bg-pulse-20"
>
<MagneticRing pullRadius={800} pullStrength={30} className="w-full h-full">
<motion.div
animate={{ rotate: -360 }}
transition={{ duration: 50, repeat: Infinity, ease: "linear" }}
className="w-full h-full text-secondary"
>
<LogoArcs className="w-full h-full rotate-180" />
</motion.div>
</MagneticRing>
</motion.div>
{/* 5. Deep bottom right - Smallest, very fast */}
<motion.div
style={{
y: y5,
animationDelay: '12s',
maskImage: 'radial-gradient(circle at center, black 20%, transparent 70%)',
WebkitMaskImage: 'radial-gradient(circle at center, black 20%, transparent 70%)'
}}
className="absolute top-[88%] right-0 translate-x-[50%] w-[250px] h-[250px] md:w-[400px] md:h-[400px] animate-bg-pulse-15"
>
<MagneticRing pullRadius={400} pullStrength={60} className="w-full h-full">
<motion.div
animate={{ rotate: 360 }}
transition={{ duration: 25, repeat: Infinity, ease: "linear" }}
className="w-full h-full text-primary"
>
<LogoArcs className="w-full h-full -rotate-12" />
</motion.div>
</MagneticRing>
</motion.div>
</div>
);
}

View File

@@ -18,7 +18,7 @@ export function Footer({ companyInfo }: FooterProps) {
const locale = useLocale();
return (
<footer className="bg-[#050B14] text-neutral-light py-16 relative overflow-hidden border-t border-white/5">
<footer className="bg-[#050B14] text-neutral-light py-10 md:py-16 relative overflow-hidden border-t border-white/5">
{/* Subtle background tech grid */}
<div className="absolute inset-0 bg-[linear-gradient(to_right,#8080800a_1px,transparent_1px),linear-gradient(to_bottom,#8080800a_1px,transparent_1px)] bg-[size:32px_32px] [mask-image:radial-gradient(ellipse_80%_50%_at_50%_0%,#000_70%,transparent_100%)] pointer-events-none" />
@@ -26,13 +26,13 @@ export function Footer({ companyInfo }: FooterProps) {
<div className="absolute top-0 left-0 w-full h-px bg-gradient-to-r from-transparent via-primary/40 to-transparent" />
<div className="absolute top-0 left-1/2 -translate-x-1/2 w-1/3 h-[200px] bg-primary/20 blur-[100px] rounded-full pointer-events-none opacity-50" />
<div className="container relative z-10 grid grid-cols-1 md:grid-cols-4 lg:grid-cols-12 gap-6 lg:gap-8 mb-12">
<div className="container relative z-10 grid grid-cols-1 md:grid-cols-4 lg:grid-cols-12 gap-4 md:gap-6 lg:gap-8 mb-8 md:mb-12">
{/* Brand Column Bento */}
<div className="col-span-1 md:col-span-4 lg:col-span-5 flex flex-col justify-between bg-white/[0.02] border border-white/5 rounded-3xl p-8 lg:p-10 backdrop-blur-md relative group overflow-hidden">
<div className="col-span-1 md:col-span-4 lg:col-span-5 flex flex-col justify-between bg-white/[0.02] border border-white/5 rounded-3xl p-6 md:p-8 lg:p-10 backdrop-blur-md relative group overflow-hidden">
<div className="absolute inset-0 bg-gradient-to-br from-white/[0.04] to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-700" />
<div className="space-y-6 relative z-10">
<TransitionLink href={`/${locale}`} className="relative block h-14 w-48 mb-6 group/logo">
<div className="space-y-4 md:space-y-6 relative z-10">
<TransitionLink href={`/${locale}`} className="relative block h-12 md:h-14 w-40 md:w-48 mb-4 md:mb-6 group/logo cursor-pointer">
<Image
src="/assets/logo-white.png"
alt="E-TIB Gruppe"
@@ -48,7 +48,7 @@ export function Footer({ companyInfo }: FooterProps) {
</div>
{companyInfo && (
<div className="text-white/70 text-sm space-y-4 mt-12 relative z-10">
<div className="text-white/70 text-sm space-y-3 md:space-y-4 mt-8 md:mt-12 relative z-10">
<div className="flex gap-4 p-4 rounded-2xl bg-white/[0.03] border border-white/[0.05] hover:bg-white/[0.05] transition-colors">
<div className="w-10 h-10 rounded-full bg-primary/20 flex items-center justify-center shrink-0">
<svg xmlns="http://www.w3.org/2000/svg" className="w-5 h-5 text-primary" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z" /><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" /></svg>
@@ -58,12 +58,12 @@ export function Footer({ companyInfo }: FooterProps) {
<p className="whitespace-pre-line font-medium text-white/90">{companyInfo.address}</p>
</div>
</div>
<div className="grid grid-cols-2 gap-4">
<a href={`mailto:${companyInfo.contactEmail}`} className="flex flex-col gap-2 p-4 rounded-2xl bg-white/[0.03] border border-white/[0.05] hover:bg-white/[0.08] hover:border-primary/30 transition-all group/contact">
<div className="grid grid-cols-2 gap-3 md:gap-4">
<a href={`mailto:${companyInfo.contactEmail}`} className="flex flex-col gap-2 p-4 rounded-2xl bg-white/[0.03] border border-white/[0.05] hover:bg-white/[0.08] hover:border-primary/30 transition-all group/contact cursor-pointer">
<p className="text-xs text-white/40 uppercase tracking-wider font-heading">E-Mail</p>
<p className="font-medium text-white/90 group-hover/contact:text-primary transition-colors truncate">{companyInfo.contactEmail}</p>
</a>
<a href={`tel:${companyInfo.contactPhone.replace(/\s+/g, '')}`} className="flex flex-col gap-2 p-4 rounded-2xl bg-white/[0.03] border border-white/[0.05] hover:bg-white/[0.08] hover:border-primary/30 transition-all group/contact">
<a href={`tel:${companyInfo.contactPhone.replace(/\s+/g, '')}`} className="flex flex-col gap-2 p-4 rounded-2xl bg-white/[0.03] border border-white/[0.05] hover:bg-white/[0.08] hover:border-primary/30 transition-all group/contact cursor-pointer">
<p className="text-xs text-white/40 uppercase tracking-wider font-heading">{locale === 'de' ? 'Telefon' : 'Phone'}</p>
<p className="font-medium text-white/90 group-hover/contact:text-primary transition-colors truncate">{companyInfo.contactPhone}</p>
</a>
@@ -73,16 +73,16 @@ export function Footer({ companyInfo }: FooterProps) {
</div>
{/* Navigation Bento Grid */}
<div className="col-span-1 md:col-span-4 lg:col-span-7 grid grid-cols-1 sm:grid-cols-2 gap-6 lg:gap-8">
<div className="col-span-1 md:col-span-4 lg:col-span-7 grid grid-cols-1 sm:grid-cols-2 gap-4 md:gap-6 lg:gap-8">
{/* Company Column */}
<div className="bg-white/[0.02] border border-white/5 rounded-3xl p-8 lg:p-10 backdrop-blur-md relative group overflow-hidden flex flex-col">
<div className="bg-white/[0.02] border border-white/5 rounded-3xl p-6 md:p-8 lg:p-10 backdrop-blur-md relative group overflow-hidden flex flex-col">
<div className="absolute inset-0 bg-gradient-to-bl from-white/[0.04] to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-700 pointer-events-none" />
<h4 className="font-heading font-bold uppercase tracking-widest text-sm mb-8 text-white">
<h4 className="font-heading font-bold uppercase tracking-widest text-sm mb-6 md:mb-8 text-white">
{locale === 'de' ? 'Unternehmen' : 'Company'}
<span className="block w-8 h-1 bg-primary mt-3 rounded-full" />
</h4>
<ul className="space-y-4 relative z-10 flex-grow">
<ul className="space-y-2 md:space-y-4 relative z-10 flex-grow">
{[
{ label: locale === 'de' ? 'Kompetenzen' : 'Competencies', href: `/${locale}/kompetenzen` },
{ label: locale === 'de' ? 'Über uns' : 'About us', href: `/${locale}/ueber-uns` },
@@ -91,7 +91,7 @@ export function Footer({ companyInfo }: FooterProps) {
{ label: locale === 'de' ? 'Kontakt' : 'Contact', href: `/${locale}/${locale === 'de' ? 'kontakt' : 'contact'}` },
].map((link) => (
<li key={link.href}>
<TransitionLink href={link.href} className="group/link flex items-center text-white/60 hover:text-white transition-colors py-1">
<TransitionLink href={link.href} className="group/link flex items-center text-white/60 hover:text-white transition-colors py-1 cursor-pointer">
<span className="w-0 h-px bg-primary mr-0 group-hover/link:w-4 group-hover/link:mr-3 transition-all duration-300" />
<span className="font-medium">{link.label}</span>
</TransitionLink>
@@ -101,20 +101,20 @@ export function Footer({ companyInfo }: FooterProps) {
</div>
{/* Legal Column */}
<div className="bg-white/[0.02] border border-white/5 rounded-3xl p-8 lg:p-10 backdrop-blur-md relative group overflow-hidden flex flex-col">
<div className="bg-white/[0.02] border border-white/5 rounded-3xl p-6 md:p-8 lg:p-10 backdrop-blur-md relative group overflow-hidden flex flex-col">
<div className="absolute inset-0 bg-gradient-to-tr from-white/[0.04] to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-700 pointer-events-none" />
<h4 className="font-heading font-bold uppercase tracking-widest text-sm mb-8 text-white">
<h4 className="font-heading font-bold uppercase tracking-widest text-sm mb-6 md:mb-8 text-white">
{locale === 'de' ? 'Rechtliches' : 'Legal'}
<span className="block w-8 h-1 bg-primary mt-3 rounded-full opacity-50" />
</h4>
<ul className="space-y-4 relative z-10 flex-grow">
<ul className="space-y-2 md:space-y-4 relative z-10 flex-grow">
{[
{ label: locale === 'de' ? 'Impressum' : 'Imprint', href: `/${locale}/impressum` },
{ label: locale === 'de' ? 'Datenschutz' : 'Privacy Policy', href: `/${locale}/datenschutz` },
{ label: locale === 'de' ? 'AGB' : 'Terms', href: `/${locale}/${locale === 'de' ? 'agb' : 'terms'}` },
].map((link) => (
<li key={link.href}>
<TransitionLink href={link.href} className="group/link flex items-center text-white/50 hover:text-white transition-colors py-1">
<TransitionLink href={link.href} className="group/link flex items-center text-white/50 hover:text-white transition-colors py-1 cursor-pointer">
<span className="w-0 h-px bg-white/30 mr-0 group-hover/link:w-3 group-hover/link:mr-3 transition-all duration-300" />
<span className="font-medium">{link.label}</span>
</TransitionLink>
@@ -123,7 +123,7 @@ export function Footer({ companyInfo }: FooterProps) {
</ul>
{/* Built Info inside Legal box for compact layout */}
<div className="mt-12 pt-6 border-t border-white/5 text-white/30 text-xs">
<div className="mt-8 pt-4 md:mt-12 md:pt-6 border-t border-white/5 text-white/30 text-xs">
<a href="https://mintel.me" target="_blank" rel="noopener noreferrer" className="hover:text-white/60 transition-colors flex items-center gap-2">
<span>Designed & Engineered by Mintel</span>
<svg width="10" height="10" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><path d="M7 17l9.2-9.2M17 17V7H7"/></svg>
@@ -135,7 +135,7 @@ export function Footer({ companyInfo }: FooterProps) {
</div>
<div className="container relative z-10">
<div className="flex flex-col md:flex-row justify-between items-center gap-6 py-6 px-8 rounded-2xl bg-white/[0.02] border border-white/5 backdrop-blur-md">
<div className="flex flex-col md:flex-row justify-between items-center gap-4 md:gap-6 py-4 px-5 md:py-6 md:px-8 rounded-2xl bg-white/[0.02] border border-white/5 backdrop-blur-md text-center md:text-left">
<p className="text-white/50 text-sm font-medium">&copy; {new Date().getFullYear()} E-TIB GmbH. {locale === 'de' ? 'Alle Rechte vorbehalten.' : 'All rights reserved.'}</p>
<div className="flex items-center gap-6">
<LanguageSwitcher isSolidMode={false} />
@@ -143,7 +143,7 @@ export function Footer({ companyInfo }: FooterProps) {
</div>
{/* Quality Badges */}
<div className="mt-6 flex flex-wrap justify-center gap-x-8 gap-y-4 text-white/30 text-xs font-medium uppercase tracking-wider">
<div className="mt-4 md:mt-6 flex flex-wrap justify-center gap-x-4 gap-y-3 md:gap-x-8 md:gap-y-4 text-white/30 text-[10px] md:text-xs font-medium uppercase tracking-wider px-2">
<div className="flex items-center gap-2"><ShieldCheck className="w-4 h-4 text-white/40" /><span>SSL Secured</span></div>
<div className="flex items-center gap-2"><Leaf className="w-4 h-4 text-primary/60" /><span>Green Hosting</span></div>
<div className="flex items-center gap-2"><Lock className="w-4 h-4 text-white/40" /><span>DSGVO Compliant</span></div>

View File

@@ -1,13 +1,11 @@
'use client';
import * as React from 'react';
import Link from 'next/link';
import { TransitionLink } from '@/components/ui/TransitionLink';
import Image from 'next/image';
import { usePathname } from 'next/navigation';
import { motion, AnimatePresence, useScroll, useTransform } from 'framer-motion';
import { motion, useScroll, useTransform } from 'framer-motion';
import { LanguageSwitcher } from './LanguageSwitcher';
import { Button } from '@/components/ui/Button';
export interface NavLink {
label: string;
@@ -20,7 +18,6 @@ interface HeaderProps {
export function Header({ navLinks }: HeaderProps) {
const [isScrolled, setIsScrolled] = React.useState(false);
const [isMobileMenuOpen, setIsMobileMenuOpen] = React.useState(false);
const [forceSolid, setForceSolid] = React.useState(false);
const pathname = usePathname() || '/';
@@ -36,13 +33,6 @@ export function Header({ navLinks }: HeaderProps) {
// Determine current locale from pathname
const currentLocale = pathname.startsWith('/en') ? 'en' : 'de';
// Helper to switch languages
const getSwitchedUrl = (newLocale: string) => {
if (!pathname) return `/${newLocale}`;
const pathWithoutLocale = pathname.replace(/^\/(en|de)/, '');
return `/${newLocale}${pathWithoutLocale === '' ? '' : pathWithoutLocale}`;
};
React.useEffect(() => {
const handleScroll = () => {
setIsScrolled(window.scrollY > 20);
@@ -68,10 +58,7 @@ export function Header({ navLinks }: HeaderProps) {
};
}, [pathname]);
// Close mobile menu on route change
React.useEffect(() => {
setIsMobileMenuOpen(false);
}, [pathname]);
// Check for force solid initially
const isSolidMode = isScrolled || forceSolid;
@@ -84,7 +71,7 @@ export function Header({ navLinks }: HeaderProps) {
}`}
>
<div
className={`relative overflow-hidden w-full max-w-[1400px] mx-auto transition-all duration-700 ease-[cubic-bezier(0.16,1,0.3,1)] flex items-center justify-between ${
className={`relative overflow-hidden w-full max-w-7xl mx-auto transition-all duration-700 ease-[cubic-bezier(0.16,1,0.3,1)] flex items-center justify-between ${
isSolidMode
? 'rounded-full bg-white/50 backdrop-blur-xl shadow-[0_8px_32px_rgba(0,0,0,0.08)] border border-white/40 py-2.5 px-6 md:px-8'
: 'rounded-none bg-transparent py-6 px-4 md:px-8 border border-transparent'
@@ -98,9 +85,9 @@ export function Header({ navLinks }: HeaderProps) {
/>
</div>
<TransitionLink href={`/${currentLocale}`} className={`relative flex items-center transition-all duration-500 ease-out z-50 group ${isSolidMode ? 'h-9 w-36' : 'h-12 w-48'}`}>
<TransitionLink href={`/${currentLocale}`} className={`relative flex items-center transition-all duration-500 ease-out z-50 group ${isSolidMode ? 'h-8 md:h-9 w-28 md:w-36' : 'h-10 md:h-12 w-36 md:w-48'}`}>
<Image
src={(isSolidMode || isMobileMenuOpen) ? "/assets/logo.png" : "/assets/logo-white.png"}
src={isSolidMode ? "/assets/logo.png" : "/assets/logo-white.png"}
alt="E-TIB Gruppe"
fill
className="object-contain object-left group-hover:scale-105 transition-transform duration-500 origin-left"
@@ -111,11 +98,11 @@ export function Header({ navLinks }: HeaderProps) {
<div
className="absolute inset-0 z-10 pointer-events-none transition-transform duration-500 origin-left group-hover:scale-105"
style={{
WebkitMaskImage: `url(${(isSolidMode || isMobileMenuOpen) ? "/assets/logo.png" : "/assets/logo-white.png"})`,
WebkitMaskImage: `url(${isSolidMode ? "/assets/logo.png" : "/assets/logo-white.png"})`,
WebkitMaskSize: 'contain',
WebkitMaskRepeat: 'no-repeat',
WebkitMaskPosition: 'left center',
maskImage: `url(${(isSolidMode || isMobileMenuOpen) ? "/assets/logo.png" : "/assets/logo-white.png"})`,
maskImage: `url(${isSolidMode ? "/assets/logo.png" : "/assets/logo-white.png"})`,
maskSize: 'contain',
maskRepeat: 'no-repeat',
maskPosition: 'left center'
@@ -125,7 +112,8 @@ export function Header({ navLinks }: HeaderProps) {
</div>
</TransitionLink>
<nav className="relative z-10 hidden md:flex items-center gap-8 lg:gap-10">
<div className="flex items-center gap-2 md:gap-4 ml-auto md:ml-0">
<nav className="relative z-10 hidden md:flex items-center gap-8 lg:gap-10">
{navLinks && navLinks.length > 0 && navLinks.map((link) => {
const mappedUrl = link.url.startsWith('/') && !link.url.match(/^\/(en|de)/)
? `/${currentLocale}${link.url}`
@@ -137,7 +125,7 @@ export function Header({ navLinks }: HeaderProps) {
<TransitionLink
key={link.url}
href={mappedUrl}
className={`relative font-bold text-xs lg:text-sm uppercase tracking-widest transition-colors duration-300 group py-2 ${
className={`relative font-bold text-xs lg:text-sm uppercase tracking-widest transition-colors duration-300 group py-2 select-none ${
isSolidMode
? (isActive ? 'text-primary' : 'text-text-primary hover:text-primary')
: (isActive ? 'text-white' : 'text-white/80 hover:text-white')
@@ -160,93 +148,34 @@ export function Header({ navLinks }: HeaderProps) {
);
})}
<div className={`h-5 w-px transition-colors duration-300 ${isSolidMode ? 'bg-neutral-200' : 'bg-white/20'}`} />
</nav>
<LanguageSwitcher isSolidMode={isSolidMode} />
<TransitionLink
href={`/${currentLocale}/${currentLocale === 'de' ? 'kontakt' : 'contact'}`}
className={`relative ml-2 px-7 py-2.5 rounded-full font-bold text-xs lg:text-sm uppercase tracking-widest transition-all duration-500 overflow-hidden group/cta isolate ${
isSolidMode
? 'bg-primary text-white shadow-lg shadow-primary/20 hover:shadow-primary/40 hover:-translate-y-0.5 border border-transparent'
: 'bg-white/10 text-white backdrop-blur-md border border-white/30 hover:bg-white/20 hover:-translate-y-0.5 hover:shadow-[0_0_20px_rgba(255,255,255,0.2)]'
}`}
>
<span className="relative z-10 transition-transform duration-300 group-hover/cta:scale-105 inline-block">{currentLocale === 'de' ? 'Kontakt' : 'Contact'}</span>
{/* Sleek shine sweep effect */}
<span className="absolute top-0 -left-[150%] h-[200%] w-[150%] bg-gradient-to-r from-transparent via-white/30 to-transparent skew-x-[-20deg] group-hover/cta:left-[100%] transition-all duration-1000 ease-[cubic-bezier(0.16,1,0.3,1)] z-30 pointer-events-none" />
</TransitionLink>
</nav>
{/* Mobile Nav Button */}
<button
className="md:hidden z-50 p-2 relative group"
onClick={() => setIsMobileMenuOpen(!isMobileMenuOpen)}
aria-label="Toggle menu"
>
<div className={`absolute inset-0 rounded-full transition-all duration-300 ${isSolidMode ? 'bg-neutral-100 group-hover:bg-neutral-200' : 'bg-white/10 group-hover:bg-white/20'}`} />
<svg className="relative z-10 transition-transform duration-300 group-hover:scale-110" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke={(isSolidMode || isMobileMenuOpen) ? "currentColor" : "white"} strokeWidth="2.5" strokeLinecap="round" strokeLinejoin="round">
{isMobileMenuOpen ? (
<>
<line x1="18" y1="6" x2="6" y2="18" className="origin-center animate-in fade-in zoom-in duration-300" />
<line x1="6" y1="6" x2="18" y2="18" className="origin-center animate-in fade-in zoom-in duration-300" />
</>
) : (
<>
<line x1="3" x2="21" y1="6" y2="6" className="transition-all duration-300 group-hover:translate-x-1" />
<line x1="3" x2="21" y1="12" y2="12" />
<line x1="3" x2="21" y1="18" y2="18" className="transition-all duration-300 group-hover:-translate-x-1" />
</>
)}
</svg>
</button>
{/* Right side elements (Language Switcher always visible, Contact button desktop only) */}
<div className="flex items-center gap-2 md:gap-4 lg:gap-6">
<div className={`hidden md:block h-5 w-px transition-colors duration-300 ${isSolidMode ? 'bg-neutral-200' : 'bg-white/20'}`} />
{/* Language Switcher visible on all devices */}
<div className="z-50 relative flex items-center">
<LanguageSwitcher isSolidMode={isSolidMode} />
</div>
{/* Contact Button Desktop Only */}
<TransitionLink
href={`/${currentLocale}/${currentLocale === 'de' ? 'kontakt' : 'contact'}`}
className={`relative hidden md:inline-flex ml-2 px-7 py-2.5 rounded-full font-bold text-xs lg:text-sm uppercase tracking-widest transition-all duration-500 overflow-hidden group/cta isolate select-none ${
isSolidMode
? 'bg-primary text-white shadow-lg shadow-primary/20 hover:shadow-primary/40 hover:-translate-y-0.5 border border-transparent'
: 'bg-white/10 text-white backdrop-blur-md border border-white/30 hover:bg-white/20 hover:-translate-y-0.5 hover:shadow-[0_0_20px_rgba(255,255,255,0.2)]'
}`}
>
<span className="relative z-10 transition-transform duration-300 group-hover/cta:scale-105 inline-block">{currentLocale === 'de' ? 'Kontakt' : 'Contact'}</span>
{/* Sleek shine sweep effect */}
<span className="absolute top-0 -left-[150%] h-[200%] w-[150%] bg-gradient-to-r from-transparent via-white/30 to-transparent skew-x-[-20deg] group-hover/cta:left-[100%] transition-all duration-1000 ease-[cubic-bezier(0.16,1,0.3,1)] z-30 pointer-events-none" />
</TransitionLink>
</div>
</div>
</div>
</header>
{/* Mobile Menu Overlay */}
<AnimatePresence>
{isMobileMenuOpen && (
<motion.div
initial={{ opacity: 0, y: -20 }}
animate={{ opacity: 1, y: 0 }}
exit={{ opacity: 0, y: -20 }}
transition={{ duration: 0.2 }}
className="fixed inset-0 z-40 bg-white md:hidden pt-32 pb-8 px-6 overflow-y-auto"
>
<nav className="flex flex-col gap-6">
{navLinks && navLinks.length > 0 && navLinks.map((link) => {
const mappedUrl = link.url.startsWith('/') && !link.url.match(/^\/(en|de)/)
? `/${currentLocale}${link.url}`
: link.url;
return (
<TransitionLink
key={link.url}
href={mappedUrl}
className="text-2xl font-heading font-bold text-neutral-dark border-b border-neutral-100 pb-4"
onClick={() => setIsMobileMenuOpen(false)}
>
{link.label}
</TransitionLink>
);
})}
<TransitionLink
href={`/${currentLocale}/${currentLocale === 'de' ? 'kontakt' : 'contact'}`}
className="text-2xl font-heading font-bold text-primary border-b border-neutral-100 pb-4"
onClick={() => setIsMobileMenuOpen(false)}
>
{currentLocale === 'de' ? 'Kontakt' : 'Contact'}
</TransitionLink>
<div className="mt-8 pt-6">
<p className="text-text-secondary text-sm font-bold uppercase tracking-widest mb-4">Sprache wählen</p>
<LanguageSwitcher mobile={true} />
</div>
</nav>
</motion.div>
)}
</AnimatePresence>
</>
);
}

View File

@@ -33,7 +33,7 @@ export function LanguageSwitcher({ mobile = false, isSolidMode = false }: Langua
key={loc.code}
href={getSwitchedUrl(loc.code)}
transitionMessage={currentLocale === loc.code ? undefined : `LANG_SWITCH:${currentLocObj.flag}:${loc.flag}`}
className={`group relative overflow-hidden flex items-center gap-3 px-5 py-3 rounded-xl text-lg font-semibold transition-all duration-300 ${
className={`group relative overflow-hidden flex items-center gap-3 px-5 py-3 rounded-xl text-lg font-semibold transition-all duration-300 select-none ${
currentLocale === loc.code
? 'bg-primary/10 text-primary border border-primary/20'
: 'text-text-secondary hover:bg-neutral-50 border border-transparent'
@@ -83,7 +83,7 @@ export function LanguageSwitcher({ mobile = false, isSolidMode = false }: Langua
key={loc.code}
href={getSwitchedUrl(loc.code)}
transitionMessage={isActive ? undefined : `LANG_SWITCH:${currentLocObj.flag}:${loc.flag}`}
className={`relative z-10 flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-bold uppercase tracking-wider transition-all duration-300 ${linkClass}`}
className={`relative z-10 flex items-center gap-1.5 px-3 py-1.5 rounded-full text-xs font-bold uppercase tracking-wider transition-all duration-300 select-none ${linkClass}`}
aria-label={`Switch to ${loc.fullLabel}`}
>
<span className="text-sm" aria-hidden="true">{loc.flag}</span>

View File

@@ -0,0 +1,101 @@
'use client';
import * as React from 'react';
import { usePathname } from 'next/navigation';
import { TransitionLink } from '@/components/ui/TransitionLink';
import { Home, Briefcase, Users, Mail } from 'lucide-react';
import { motion } from 'framer-motion';
export interface NavLink {
label: string;
url: string;
}
interface MobileBottomNavProps {
navLinks: NavLink[];
currentLocale: string;
}
export function MobileBottomNav({ navLinks, currentLocale }: MobileBottomNavProps) {
const pathname = usePathname() || '/';
// Construct our bottom nav items based on the passed links
const items = React.useMemo(() => {
const homeUrl = `/${currentLocale}`;
// Find the specific links from the provided navLinks (which might be translated)
// We do a simple match based on index or keywords if needed, but since we know the order:
// 0: Kompetenzen, 1: Über uns, 2: Karriere, 3: Messen
const competenciesUrl = navLinks[0]?.url || `/${currentLocale}/kompetenzen`;
const aboutUrl = navLinks[1]?.url || `/${currentLocale}/ueber-uns`;
const contactUrl = `/${currentLocale}/${currentLocale === 'de' ? 'kontakt' : 'contact'}`;
return [
{
label: currentLocale === 'de' ? 'Start' : 'Home',
url: homeUrl,
icon: <Home className="w-6 h-6 mb-1" strokeWidth={2} />,
exactMatch: true
},
{
label: navLinks[0]?.label || (currentLocale === 'de' ? 'Kompetenzen' : 'Competencies'),
url: competenciesUrl,
icon: <Briefcase className="w-6 h-6 mb-1" strokeWidth={2} />
},
{
label: navLinks[1]?.label || (currentLocale === 'de' ? 'Über uns' : 'About Us'),
url: aboutUrl,
icon: <Users className="w-6 h-6 mb-1" strokeWidth={2} />
},
{
label: currentLocale === 'de' ? 'Kontakt' : 'Contact',
url: contactUrl,
icon: <Mail className="w-6 h-6 mb-1" strokeWidth={2} />
}
];
}, [currentLocale, navLinks]);
return (
<div className="md:hidden fixed bottom-0 left-0 right-0 z-50 px-2 pb-6 pt-2 bg-gradient-to-t from-white via-white to-white/90 backdrop-blur-xl border-t border-neutral-200/50 shadow-[0_-8px_32px_rgba(0,0,0,0.05)] safe-area-bottom">
<nav className="flex justify-around items-center max-w-md mx-auto">
{items.map((item) => {
// Determine if active
const mappedUrl = item.url.startsWith('/') && !item.url.match(/^\/(en|de)/)
? `/${currentLocale}${item.url}`
: item.url;
const isActive = item.exactMatch
? pathname === mappedUrl
: (pathname === mappedUrl || (mappedUrl !== `/${currentLocale}` && pathname?.startsWith(`${mappedUrl}/`)));
return (
<TransitionLink
key={item.label}
href={mappedUrl}
className={`relative flex flex-col items-center justify-center w-full min-h-[44px] py-1 transition-colors duration-300 select-none ${
isActive ? 'text-primary' : 'text-neutral-500 hover:text-neutral-900'
}`}
>
<div className="relative flex flex-col items-center justify-center">
{/* Active Icon Background */}
{isActive && (
<motion.div
layoutId="mobile-nav-active-bg"
className="absolute inset-0 bg-primary/10 rounded-full scale-150"
transition={{ type: 'spring', stiffness: 500, damping: 30 }}
/>
)}
{/* Icon wrapper to ensure it sits above the background */}
<div className="relative z-10 transition-transform duration-300 active:scale-90">
{item.icon}
</div>
</div>
<span className="text-[10px] font-semibold mt-0.5 tracking-wide z-10">{item.label}</span>
</TransitionLink>
);
})}
</nav>
</div>
);
}

View File

@@ -1,7 +1,7 @@
'use client';
import React, { createContext, useContext, useState, useCallback, ReactNode } from 'react';
import { useRouter } from 'next/navigation';
import React, { createContext, useContext, useState, useCallback, ReactNode, useEffect } from 'react';
import { useRouter, usePathname, useSearchParams } from 'next/navigation';
interface TransitionContextType {
isTransitioning: boolean;
@@ -15,13 +15,39 @@ export function TransitionProvider({ children }: { children: ReactNode }) {
const [isTransitioning, setIsTransitioning] = useState(false);
const [transitionMessage, setTransitionMessage] = useState<string | null>(null);
const router = useRouter();
const pathname = usePathname();
const searchParams = useSearchParams();
// We use a ref to track transition state without triggering the route change effect when it turns true
const isTransitioningRef = React.useRef(isTransitioning);
useEffect(() => {
isTransitioningRef.current = isTransitioning;
}, [isTransitioning]);
// Watch for route changes to complete the transition
useEffect(() => {
if (isTransitioningRef.current) {
// The route has actually changed in the browser, or at least the RSC payload arrived
const timer = setTimeout(() => {
setIsTransitioning(false);
setTimeout(() => setTransitionMessage(null), 300);
}, 100);
return () => clearTimeout(timer);
}
}, [pathname, searchParams]); // Run when pathname or search parameters change
const startTransition = useCallback((href: string, message: string | null = null) => {
// Wenn wir bereits navigieren, nichts tun
if (isTransitioning) return;
// Normalize paths to avoid false mismatches (e.g. /de vs /de/)
const currentPath = typeof window !== 'undefined' ? window.location.pathname.replace(/\/$/, '') || '/' : '';
const targetPath = href.split('?')[0].replace(/\/$/, '') || '/';
const currentSearch = typeof window !== 'undefined' ? window.location.search : '';
const targetSearch = href.includes('?') ? '?' + href.split('?')[1] : '';
// Aktuelle URL prüfen, falls es dieselbe ist, nicht navigieren
if (typeof window !== 'undefined' && window.location.pathname === href) {
if (currentPath === targetPath && currentSearch === targetSearch) {
// Optional: Wir könnten weich nach oben scrollen
window.scrollTo({ top: 0, behavior: 'smooth' });
return;
@@ -34,13 +60,16 @@ export function TransitionProvider({ children }: { children: ReactNode }) {
setTimeout(() => {
router.push(href);
// Den Shutter wieder einfahren lassen, nachdem die Seite gewechselt hat
// Next.js Route-Changes sind fast sofort da, aber wir geben dem Cache kurz Zeit
// Fallback: If for some reason the route doesn't change after 5 seconds, open the shutter anyway
setTimeout(() => {
setIsTransitioning(false);
// Message etwas verzögert zurücksetzen, damit es während dem Ausblenden nicht verschwindet
setTimeout(() => setTransitionMessage(null), 300);
}, 300);
setIsTransitioning((current) => {
if (current) {
setTimeout(() => setTransitionMessage(null), 300);
return false;
}
return current;
});
}, 5000);
}, 700);
}, [isTransitioning, router]);

View File

@@ -0,0 +1,46 @@
import React from 'react';
import { cn } from './utils';
interface AnimatedGlossyBorderProps {
className?: string;
borderWidth?: 1 | 2;
opacity?: number;
color?: 'white' | 'primary';
}
export function AnimatedGlossyBorder({
className,
borderWidth = 1,
color = 'white'
}: AnimatedGlossyBorderProps) {
const isWhite = color === 'white';
const glowColor = isWhite ? 'rgba(255,255,255,0.6)' : 'rgba(17,124,97,0.6)';
const gradientColors = isWhite
? 'transparent 0%, rgba(255,255,255,0.1) 15%, rgba(255,255,255,0.85) 25%, rgba(255,255,255,0.1) 35%, transparent 50%, transparent 50%, rgba(255,255,255,0.1) 65%, rgba(255,255,255,0.85) 75%, rgba(255,255,255,0.1) 85%, transparent 100%'
: 'transparent 0%, rgba(17,124,97,0.1) 15%, rgba(17,124,97,0.85) 25%, rgba(17,124,97,0.1) 35%, transparent 50%, transparent 50%, rgba(17,124,97,0.1) 65%, rgba(17,124,97,0.85) 75%, rgba(17,124,97,0.1) 85%, transparent 100%';
return (
<div
className={cn('absolute inset-0 pointer-events-none rounded-[inherit] z-20 mix-blend-overlay', className)}
style={{ filter: `drop-shadow(0 0 6px ${glowColor}) drop-shadow(0 0 2px ${glowColor})` }}
>
<div
className="absolute inset-0 rounded-[inherit]"
style={{
border: `${borderWidth}px solid transparent`,
WebkitMask: 'linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0)',
WebkitMaskComposite: 'xor',
maskComposite: 'exclude'
}}
>
<div
className="absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[250%] aspect-square animate-[spin_8s_linear_infinite]"
style={{
background: `conic-gradient(from 0deg, ${gradientColors})`
}}
/>
</div>
</div>
);
}

View File

@@ -10,7 +10,7 @@ export function Badge({ children, className, variant = 'primary' }: { children:
};
return (
<span className={cn('inline-flex items-center px-3 py-1 rounded-full text-xs font-bold uppercase tracking-wider', variants[variant], className)}>
<span className={cn('inline-flex items-center px-3 py-1 rounded-full text-xs font-bold uppercase tracking-wider select-none', variants[variant], className)}>
{children}
</span>
);

View File

@@ -1,5 +1,6 @@
import React from 'react';
import { TransitionLink } from '@/components/ui/TransitionLink';
import { AnimatedGlossyBorder } from '@/components/ui/AnimatedGlossyBorder';
import { cn } from './utils';
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -19,7 +20,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
}
export const buttonBaseStyles =
'inline-flex items-center justify-center whitespace-nowrap rounded-full font-semibold transition-all duration-500 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none active:scale-95 hover:-translate-y-1 hover:scale-[1.02] relative overflow-hidden group/btn isolate';
'cursor-pointer inline-flex items-center justify-center whitespace-nowrap rounded-full font-semibold transition-all duration-500 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none active:scale-95 hover:-translate-y-1 hover:scale-[1.02] relative overflow-hidden group/btn isolate select-none';
export const buttonVariantsMap = {
primary: 'bg-primary text-white shadow-md hover:shadow-primary/30 hover:shadow-2xl',
@@ -58,13 +59,23 @@ export function getButtonClasses(variant: keyof typeof buttonVariantsMap = 'prim
}
export function ButtonOverlay({ variant = 'primary' }: { variant?: keyof typeof buttonVariantsMap }) {
const isWhiteBg = variant === 'white' || variant === 'outline' || variant === 'ghost';
return (
<span
className={cn(
'absolute top-0 -left-[150%] h-[200%] w-[150%] bg-gradient-to-r from-transparent to-transparent skew-x-[-20deg] group-hover/btn:left-[100%] transition-all duration-1000 ease-[cubic-bezier(0.16,1,0.3,1)] z-30 pointer-events-none',
buttonShineColorsMap[variant]
<>
<span
className={cn(
'absolute top-0 -left-[150%] h-[200%] w-[150%] bg-gradient-to-r from-transparent to-transparent skew-x-[-20deg] group-hover/btn:left-[100%] transition-all duration-1000 ease-[cubic-bezier(0.16,1,0.3,1)] z-30 pointer-events-none',
buttonShineColorsMap[variant]
)}
/>
{!isWhiteBg && (
<AnimatedGlossyBorder
color="white"
className="opacity-40 group-hover/btn:opacity-100 transition-opacity duration-700"
/>
)}
/>
</>
);
}

View File

@@ -9,7 +9,7 @@ export function Label({ className, ...props }: LabelProps) {
return (
<label
className={cn(
'text-[10px] md:text-xs font-extrabold text-primary uppercase tracking-widest',
'text-[10px] md:text-xs font-extrabold text-primary uppercase tracking-widest select-none',
className
)}
{...props}

View File

@@ -0,0 +1,20 @@
import React from 'react';
// Reusable SVG component that precisely mimics the overlapping, sweeping arcs of the E-TIB logo.
// The circles are offset along a diagonal to bunch together at the bottom-left and spread apart at the top-right.
export const LogoArcs = ({ className }: { className?: string }) => (
<svg
className={className}
viewBox="0 0 200 200"
fill="none"
xmlns="http://www.w3.org/2000/svg"
stroke="currentColor"
>
{/* Outer ring */}
<circle cx="100" cy="100" r="90" strokeWidth="1.5" />
{/* Middle thicker ring */}
<circle cx="92" cy="108" r="78" strokeWidth="3.5" />
{/* Inner ring */}
<circle cx="84" cy="116" r="66" strokeWidth="1.5" />
</svg>
);

View File

@@ -3,6 +3,7 @@
import React from 'react';
import Link, { LinkProps } from 'next/link';
import { useTransition } from '@/components/providers/TransitionProvider';
import { cn } from './utils';
interface TransitionLinkProps extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof LinkProps>, LinkProps {
children: React.ReactNode;
@@ -31,7 +32,7 @@ export function TransitionLink({ children, href, onClick, transitionMessage, ...
};
return (
<Link href={href} onClick={handleClick} {...props}>
<Link href={href} onClick={handleClick} className={cn('cursor-pointer', props.className)} {...props}>
{children}
</Link>
);

View File

@@ -30,11 +30,16 @@ description: Willkommen bei E-TIB GmbH
backgroundImage: "/assets/photos/DSC01137.JPG"
},
{
title: "NEMO GmbH",
description: "Der Spezialist für Planung und Umsetzung von nachhaltigen Energieprojekten - Mit Fokus auf Solarenergie.",
icon: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",
url: "https://www.nemo-gmbh.de/",
title: "E-TIB Verwaltung GmbH",
description: "Zentrale Dienste, Einkauf und Finanzen sowie Verwaltung von Immobilien, Grundstücken, Maschinen und Geräten.",
icon: "M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4",
backgroundImage: "/assets/photos/DJI_0048.JPG"
},
{
title: "E-TIB Bohrtechnik GmbH",
description: "Präzise Horizontalspülbohrungen in allen Bodenklassen für eine oberflächenschonende und grabenlose Leitungsverlegung.",
icon: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",
backgroundImage: "/assets/photos/DSC08653.JPG"
}
]}
/>
@@ -173,3 +178,26 @@ description: Willkommen bei E-TIB GmbH
}
]}
/>
<FaqBlock
title="Häufig gestellte Fragen"
subtitle="Wissenswertes"
questions={[
{
question: "Was macht die E-TIB GmbH?",
answer: "Die E-TIB GmbH ist spezialisiert auf den Leitungs- und Kabeltiefbau. Zu den Kernleistungen zählen der klassische Kabelbau, hochpräzise Horizontalspülbohrungen, Kabelpflugarbeiten sowie Elektromontagen bis 110 kV. Zusammen mit unseren Tochtergesellschaften decken wir auch die komplette Planung und Dokumentation von Infrastrukturprojekten ab."
},
{
question: "Welche Vorteile bietet das Horizontalspülbohrverfahren (Bohrtechnik)?",
answer: "Die Horizontalspülbohrung ist ein grabenloses Verfahren zur unterirdischen Verlegung von Kabeln und Rohren. Der größte Vorteil ist die oberflächenschonende Arbeitsweise: Flüsse, Autobahnen, Bahntrassen oder Naturschutzgebiete können gekreuzt werden, ohne den Verkehr oder die Umwelt zu beeinträchtigen. Dies spart erhebliche Kosten bei der Oberflächenwiederherstellung."
},
{
question: "Seit wann gibt es die E-TIB GmbH und wie groß ist das Team?",
answer: "Die E-TIB GmbH wurde im Dezember 2015 in Guben gegründet. Heute beschäftigt die Unternehmensgruppe über 50 qualifizierte Mitarbeiter, die komplexe Infrastruktur- und Tiefbauprojekte für Energieversorger und Telekommunikationsanbieter bundesweit realisieren."
},
{
question: "Bieten Sie auch die Planung von Netzanschlüssen an?",
answer: "Ja, über die E-TIB Ingenieurgesellschaft mbH übernehmen wir die komplette Genehmigungs- und Ausführungsplanung. Dies beinhaltet Elektro- und Netzanschlussplanungen, Machbarkeitsstudien sowie die finale digitale Bestandsdokumentation per GIS."
}
]}
/>

View File

@@ -24,12 +24,12 @@ E-Mail: d.joseph@e-tib.com
Eintragung im Handelsregister.
Registergericht: Amtsgericht Cottbus
Registernummer: HRB 14781 CB
Registernummer: HRB 12403 CB
## Umsatzsteuer-ID
Umsatzsteuer-Identifikationsnummer gemäß § 27 a Umsatzsteuergesetz:
DE332345678 (Beispiel)
DE304799919
## Redaktionell verantwortlich

View File

@@ -9,7 +9,7 @@ layout: "fullBleed"
badge="Karriere"
title="Zukunft bauen"
description="Suchen Sie eine neue Herausforderung in einem zukunftssicheren Markt? Bei E-TIB arbeiten wir täglich daran, Deutschland zu vernetzen und die Energiewende voranzutreiben."
videoUrl="/assets/videos/web/hero-bohrung.mp4"
videoUrl="/assets/videos/web/hero-kabelpflug.mp4"
linkText="Offene Stellen"
linkHref="#stellen"
/>

View File

@@ -9,7 +9,7 @@ layout: "fullBleed"
badge="Unsere Leistungen"
title="Alles aus einer Hand"
description="Als Full-Service-Partner im Bereich Kabelleitungstiefbau decken wir das gesamte Spektrum moderner Infrastrukturprojekte ab."
videoUrl="/assets/videos/web/hero-kabelpflug.mp4"
videoUrl="/assets/videos/web/hero-bohrung.mp4"
linkText="Kontakt aufnehmen"
linkHref="/de/kontakt"
secondaryCtaLabel="Referenzen ansehen"
@@ -70,11 +70,11 @@ layout: "fullBleed"
icon: "energy",
lists: [
[
"Kabel- und Rohrgräben",
"Kabelbau",
"Kabelverlegung (0,4kV - 110kV)",
"Kabelmontagen (0,4kV - 30kV)",
"Elektromontagen bis 110 kV",
"Errichtung von Transformatorstationen",
"Erdungsanlagen & Straßenbeleuchtung"
"Wartung & Störungsdienst"
]
]
},
@@ -84,22 +84,22 @@ layout: "fullBleed"
icon: "fiber",
lists: [
[
"Glasfaser-Kabelmontagen",
"Herstellung von Leerrohrtrassen",
"Einziehen/Einblasen von LWL-Kabeln",
"Stellen von Multifunktionsgehäusen",
"LWL-Kabelmontagen"
"Stellen von Multifunktionsgehäusen"
]
]
},
{
id: "hdd",
title: "Grabenlose Verlegung",
title: "Bohrtechnik & Kabelpflug",
icon: "hdd",
lists: [
[
"Horizontalspülbohrverfahren (HDD)",
"Max. Bohrlänge: 250m",
"Max. Durchmesser: 400er Rohr",
"Horizontalspülbohrungen",
"Kabelpflugarbeiten",
"Komplexe Querung (Bahn, Autobahn, Gewässer)",
"Erdrakete (bis 15m / 160er Rohr)"
]
]
@@ -110,9 +110,9 @@ layout: "fullBleed"
icon: "planning",
lists: [
[
"Struktur- & Ausführungsplanung",
"Genehmigungs- und Ausführungsplanung",
"Elektro- und Netzanschlussplanung",
"Ausschreibung & Bauüberwachung",
"Zustimmungsplanung",
"Machbarkeitsstudien & Projektprüfung"
]
]
@@ -124,14 +124,41 @@ layout: "fullBleed"
fullWidth: true,
lists: [
[
"Absteckung und Einmessung von Leitungstrassen",
"Digitale Bestandsdokumentation (GIS)"
"Vermessung & Dokumentation",
"Absteckung und Einmessung von Leitungstrassen"
],
[
"360° Foto-/Video-Erfassung des Baufeldes",
"Erstellung von Datenbanken zur Projektabrechnung"
"Digitale Bestandsdokumentation (GIS)",
"360° Foto-/Video-Erfassung des Baufeldes"
]
]
}
]}
/>
<JsonLd data={[
{
"@type": "Service",
"name": "Kabelbau",
"description": "Klassischer Grabenbau und professionelle Verlegung von Mittel- und Niederspannungskabeln.",
"provider": { "@type": "Organization", "name": "E-TIB GmbH" }
},
{
"@type": "Service",
"name": "Horizontalspülbohrungen",
"description": "Horizontalspülbohrverfahren (HDD) für grabenlose, oberflächenschonende Verlegung.",
"provider": { "@type": "Organization", "name": "E-TIB GmbH" }
},
{
"@type": "Service",
"name": "Glasfaserausbau",
"description": "Ausbau von zukunftssicheren Breitbandnetzen (FTTX) und Glasfaser-Kabelmontagen.",
"provider": { "@type": "Organization", "name": "E-TIB GmbH" }
},
{
"@type": "Service",
"name": "Planung und Vermessung",
"description": "Genehmigungs- und Ausführungsplanung, Elektro- und Netzanschlussplanung, sowie digitale Bestandsdokumentation per GIS.",
"provider": { "@type": "Organization", "name": "E-TIB GmbH" }
}
]} />

View File

@@ -9,13 +9,90 @@ layout: "fullBleed"
badge="Events"
title="Treffen Sie uns\nvor Ort"
description="Kommen Sie mit unseren Experten ins Gespräch. Wir sind auf den wichtigsten Branchenmessen vertreten und freuen uns auf den persönlichen Austausch mit Ihnen."
videoUrl="/assets/videos/web/hero-bohrung.mp4"
videoUrl="/assets/videos/web/hero-messe.mp4"
linkText="Zu den Terminen"
linkHref="#termine"
/>
<div id="termine">
<JobListingBlock showFairs={true} showJobs={false} />
<JobListingBlock
showFairs={true}
showJobs={false}
fairs={[
{ name: 'Intersolar München', date: '19. - 21. Juni 2026', type: 'Energie-Messe', location: 'Messe München', booth: 'Halle A3, Stand 110', url: 'https://www.intersolar.de' },
{ name: 'Windenergietage Linstow', date: '04. - 06. November 2026', type: 'Fachkongress', location: 'Van der Valk Resort Linstow', booth: 'Stand 42', url: 'https://windenergietage.de' },
{ name: 'Kabelwerkstatt Wiesbaden', date: '02. - 03. Dezember 2026', type: 'Fachmesse', location: 'RheinMain CongressCenter', booth: 'Halle 1, Stand B20' }
]}
/>
</div>
<CallToAction />
<JsonLd data={[
{
"@type": "Event",
"name": "Intersolar München",
"startDate": "2026-06-19",
"endDate": "2026-06-21",
"eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
"eventStatus": "https://schema.org/EventScheduled",
"location": {
"@type": "Place",
"name": "Messe München",
"address": {
"@type": "PostalAddress",
"addressLocality": "München",
"addressCountry": "DE"
}
},
"organizer": {
"@type": "Organization",
"name": "E-TIB GmbH",
"url": "https://e-tib.com"
}
},
{
"@type": "Event",
"name": "Windenergietage Linstow",
"startDate": "2026-11-04",
"endDate": "2026-11-06",
"eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
"eventStatus": "https://schema.org/EventScheduled",
"location": {
"@type": "Place",
"name": "Van der Valk Resort Linstow",
"address": {
"@type": "PostalAddress",
"addressLocality": "Linstow",
"addressCountry": "DE"
}
},
"organizer": {
"@type": "Organization",
"name": "E-TIB GmbH",
"url": "https://e-tib.com"
}
},
{
"@type": "Event",
"name": "Kabelwerkstatt Wiesbaden",
"startDate": "2026-12-02",
"endDate": "2026-12-03",
"eventAttendanceMode": "https://schema.org/OfflineEventAttendanceMode",
"eventStatus": "https://schema.org/EventScheduled",
"location": {
"@type": "Place",
"name": "RheinMain CongressCenter",
"address": {
"@type": "PostalAddress",
"addressLocality": "Wiesbaden",
"addressCountry": "DE"
}
},
"organizer": {
"@type": "Organization",
"name": "E-TIB GmbH",
"url": "https://e-tib.com"
}
}
]} />

View File

@@ -56,6 +56,8 @@ layout: "fullBleed"
<CompanyTimeline />
<InteractiveGermanyMap />
<div id="struktur">
<HomeSubCompanyTiles
badge="Struktur"
@@ -75,13 +77,18 @@ layout: "fullBleed"
url: "https://www.etib-ing.com/",
backgroundImage: "/assets/photos/DSC01137.JPG"
},
{
title: "NEMO GmbH",
description: "Der Spezialist für Planung und Umsetzung von nachhaltigen Energieprojekten - Mit Fokus auf Solarenergie.",
icon: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",
url: "https://www.nemo-gmbh.de/",
backgroundImage: "/assets/photos/DJI_0048.JPG"
}
{
title: "E-TIB Verwaltung GmbH",
description: "Zentrale Dienste, Einkauf und Finanzen sowie Verwaltung von Immobilien, Grundstücken, Maschinen und Geräten.",
icon: "M19 21V5a2 2 0 00-2-2H7a2 2 0 00-2 2v16m14 0h2m-2 0h-5m-9 0H3m2 0h5M9 7h1m-1 4h1m4-4h1m-1 4h1m-5 10v-5a1 1 0 011-1h2a1 1 0 011 1v5m-4 0h4",
backgroundImage: "/assets/photos/DJI_0048.JPG"
},
{
title: "E-TIB Bohrtechnik GmbH",
description: "Präzise Horizontalspülbohrungen in allen Bodenklassen für eine oberflächenschonende und grabenlose Leitungsverlegung.",
icon: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",
backgroundImage: "/assets/photos/DSC08653.JPG"
}
]}
/>
</div>

View File

@@ -30,10 +30,10 @@ description: Welcome to E-TIB GmbH
backgroundImage: "/assets/photos/DSC01137.JPG"
},
{
title: "NEMO GmbH",
description: "The specialist for planning and implementation of sustainable energy projects - with a focus on solar energy.",
icon: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",
url: "https://www.nemo-gmbh.de/",
title: "E-TIB Bohrtechnik GmbH",
description: "Highest precision underground: We specialize in complex horizontal directional drilling for all infrastructure networks.",
icon: "M19 14l-7 7m0 0l-7-7m7 7V3",
url: "https://www.e-tib.com/bohrtechnik",
backgroundImage: "/assets/photos/DJI_0048.JPG"
}
]}

View File

@@ -9,7 +9,7 @@ layout: "fullBleed"
badge="Careers"
title="Build the Future\nwith Us"
description="We are looking for motivated talents who want to shape the digital and energy infrastructure of tomorrow. Join the E-TIB team."
videoUrl="/assets/videos/web/hero-bahnkreuzung.mp4"
videoUrl="/assets/videos/web/hero-kabelpflug.mp4"
linkText="View Open Positions"
linkHref="#jobs"
/>

View File

@@ -9,7 +9,7 @@ layout: "fullBleed"
badge="Competencies"
title="Everything from a\nsingle source"
description="From the first planning sketch to the final documentation we are your reliable partner for complex infrastructure projects."
videoUrl="/assets/videos/web/hero-bahnkreuzung.mp4"
videoUrl="/assets/videos/web/hero-bohrung.mp4"
linkText="Get in Touch"
linkHref="/en/kontakt"
/>

View File

@@ -9,7 +9,7 @@ layout: "fullBleed"
badge="Events"
title="Meet us\nin person"
description="Get in touch with our experts. We are represented at the most important industry trade fairs and look forward to speaking with you personally."
videoUrl="/assets/videos/web/hero-bohrung.mp4"
videoUrl="/assets/videos/web/hero-messe.mp4"
linkText="View dates"
linkHref="#dates"
/>

View File

@@ -59,24 +59,102 @@ layout: "fullBleed"
title="Milestones of Development"
milestones={[
{
date: '2015',
date: '16.12.2015',
year: '2015',
title: 'Foundation of E-TIB GmbH',
desc: 'Founded in Guben, Brandenburg, with a focus on civil engineering and cable assembly.'
desc: 'Execution of electrical infrastructure projects, cable civil engineering, and horizontal directional drilling.',
iconName: 'Building2'
},
{
date: 'Growth',
title: 'Expansion of Competencies',
desc: 'Consistent expansion of services to include horizontal directional drilling and cable plowing.'
date: '04.02.2019',
year: '2019',
title: 'Foundation of E-TIB Ingenieurgesellschaft',
desc: 'Approval and execution planning, complex crossings, and grid connection planning.',
iconName: 'Compass'
},
{
date: 'Corporate Group',
title: 'Merger',
desc: 'Pooling of specialized departments with NEMO GmbH and E-TIB Ingenieurgesellschaft mbH.'
date: '14.11.2019',
year: '2019',
title: 'Foundation of E-TIB Verwaltung GmbH',
desc: 'Central services, acquisition, leasing, and management of real estate and machinery.',
iconName: 'Layers'
},
{
date: 'Today',
title: 'The E-TIB Group',
desc: 'A strong network with over 50 employees for nationwide infrastructure projects.'
date: '21.10.2025',
year: '2025',
title: 'Foundation of E-TIB Bohrtechnik GmbH',
desc: 'Specialization in precise horizontal directional drilling in all soil classes.',
iconName: 'ArrowDownToLine'
}
]}
/>
<InteractiveGermanyMap
badge="Operating Areas"
title={<>Nationwide<br/>at your service.</>}
description="From our strategic locations in Guben and Bülstedt, we control and realize complex infrastructure projects across the entire federal territory."
stats={[
{ value: '100', suffix: '%', label: 'Nationwide Reach' },
{ value: '2', suffix: '+', label: 'Operating Locations' }
]}
locations={[
{
id: 'guben',
name: 'Guben (Headquarters)',
type: 'hq',
x: 85,
y: 48,
description: 'E-TIB GmbH Holding & Bohrtechnik GmbH',
details: ['Central Management', 'Cable Civil Engineering', 'Machinery Park']
},
{
id: 'buelstedt',
name: 'Bülstedt (Engineering Firm)',
type: 'branch',
x: 37,
y: 25,
description: 'E-TIB Ingenieurgesellschaft mbH',
details: ['Planning & Projecting', 'Surveying', 'Documentation']
},
{
id: 'spreewald',
name: 'Spreewald (Project)',
type: 'project',
x: 82,
y: 45,
description: 'Broadband Expansion FTTC'
},
{
id: 'bomlitz',
name: 'Bomlitz (Project)',
type: 'project',
x: 45,
y: 30,
description: 'Broadband Expansion FTTH'
},
{
id: 'forst',
name: 'Forst (Project)',
type: 'project',
x: 88,
y: 50,
description: 'New Cable Route Construction'
},
{
id: 'eisenhuettenstadt',
name: 'Eisenhüttenstadt (Project)',
type: 'project',
x: 85,
y: 40,
description: 'Cable Connection U30 - T10'
},
{
id: 'goerne',
name: 'Görne (Project)',
type: 'project',
x: 70,
y: 35,
description: 'PV System Feed-in'
}
]}
/>
@@ -101,10 +179,10 @@ layout: "fullBleed"
backgroundImage: "/assets/photos/DSC01137.JPG"
},
{
title: "NEMO GmbH",
description: "The specialist for planning and implementation of sustainable energy projects - with a focus on solar energy.",
icon: "M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z",
url: "https://www.nemo-gmbh.de/",
title: "E-TIB Bohrtechnik GmbH",
description: "Highest precision underground: We specialize in complex horizontal directional drilling for all infrastructure networks.",
icon: "M19 14l-7 7m0 0l-7-7m7 7V3",
url: "https://www.e-tib.com/bohrtechnik",
backgroundImage: "/assets/photos/DJI_0048.JPG"
}
]}

19
danny_mail_draft.txt Normal file
View File

@@ -0,0 +1,19 @@
Betreff: Testserver steht bereit E-TIB Website v1 🚀
Hi Danny,
kurzes Update von meiner Seite: Der Testserver mit dem ersten Entwurf der neuen Website steht bereit! Schau dir das Ganze gerne in Ruhe an: https://test.e-tib.com (Passwort: lassmichrein)
Ich habe den Content komplett auf Basis eures aktuellen Briefings glattgezogen. Das bedeutet konkret:
- Die alte "NEMO GmbH" Struktur ist restlos raus.
- Eure aktuelle Aufstellung (E-TIB GmbH als Holding, dazu E-TIB Verwaltung GmbH und Bohrtechnik GmbH) ist jetzt korrekt abgebildet.
- Die Timeline und Gründungsdaten (inklusive 2024 Holding) sind auf dem neuesten Stand.
- Das Leistungsportfolio habe ich exakt auf eure 10 Kernkompetenzen (Kabelpflug, Horizontalspülbohren, komplexe Querungen etc.) fokussiert.
- Impressum und Messe-Daten (Intersolar, Windenergietage, Kabelwerkstatt) sind ebenfalls aktualisiert.
Zum Design noch ein paar Worte: Ich habe mich wie besprochen an einem minimalistischen, aber sehr hochwertigen Look orientiert. Die Seite ist bewusst extrem aufgeräumt und strukturiert (z.B. durch die übersichtliche Kachel-Optik für eure Kompetenzen), damit Besucher sofort verstehen, was ihr anbietet egal ob sie am großen PC sitzen oder auf dem Handy scrollen. Auch das Video auf der Startseite habe ich als starken visuellen Aufhänger eingebaut, genau wie du es dir als Referenz gewünscht hast.
Wichtig als Randnotiz: Der aktuelle Stand ist technisch gesehen noch "Work in Progress". Ich bin gerade noch dabei, die letzten Optimierungen für Performance, SEO und mobile Responsivität vorzunehmen, damit am Ende alles perfekt flutscht.
Da eine gute Website meiner Meinung nach absolut selbsterklärend sein muss, gebe ich sie euch jetzt einfach mal direkt zum selbst Durchklicken. Sammelt gerne euer Feedback und gebt mir Bescheid, wo wir noch nachjustieren sollen. Wenn es euch lieber ist, können wir uns das Ganze natürlich auch gerne gemeinsam in einem Teams-Call durchgehen.
Beste Grüße!

View File

@@ -1,6 +1,6 @@
services:
etib-app:
image: registry.infra.mintel.me/mintel/etib-website:${IMAGE_TAG:-latest}
image: registry.infra.mintel.me/mintel/e-tib.com:${IMAGE_TAG:-latest}
restart: unless-stopped
networks:
default:
@@ -58,9 +58,10 @@ services:
etib-gatekeeper:
profiles: [ "gatekeeper" ]
image: registry.infra.mintel.me/mintel/gatekeeper:testing
image: registry.infra.mintel.me/mintel/gatekeeper:latest
restart: unless-stopped
networks:
default:
infra:
aliases:
- ${PROJECT_NAME:-klz}-gatekeeper
@@ -68,6 +69,8 @@ services:
- ${ENV_FILE:-.env}
environment:
PORT: 3000
NODE_TLS_REJECT_UNAUTHORIZED: 0
NODE_ENV: production
labels:
- "traefik.enable=true"
- "traefik.http.services.${PROJECT_NAME:-klz}-gatekeeper-svc.loadbalancer.server.port=3000"

View File

@@ -1,6 +1,30 @@
import baseConfig from "@mintel/eslint-config";
import { nextConfig } from "@mintel/eslint-config/next";
/**
* Cleanup function to fix potential whitespace issues in global keys
* (e.g. "AudioWorkletGlobalScope " bug in some versions of globals/eslint)
*/
function cleanupConfig(configs) {
return configs.map(config => {
if (config.languageOptions && config.languageOptions.globals) {
const cleanGlobals = {};
for (const [key, value] of Object.entries(config.languageOptions.globals)) {
cleanGlobals[key.trim()] = value;
}
// Return a new object to avoid mutating the original if it's reused
return {
...config,
languageOptions: {
...config.languageOptions,
globals: cleanGlobals
}
};
}
return config;
});
}
export default [
{
ignores: [
@@ -29,8 +53,8 @@ export default [
],
},
...baseConfig,
...nextConfig.map((config) => ({
...cleanupConfig(baseConfig),
...cleanupConfig(nextConfig).map((config) => ({
...config,
files: ["**/*.{ts,tsx}"],
rules: {

View File

@@ -0,0 +1,5 @@
// Sentry initialization move to GlitchtipErrorReportingService to allow lazy-loading
// for PageSpeed 100 optimizations. This file is now empty to prevent the SDK
// from being included in the initial JS bundle.
import * as Sentry from '@sentry/nextjs';
export const onRouterTransitionStart = Sentry.captureRouterTransitionStart;

25
instrumentation.ts Normal file
View File

@@ -0,0 +1,25 @@
import * as Sentry from '@sentry/nextjs';
/**
* Next.js will call this on boot for the active runtime.
*/
export async function register() {
if (process.env.NEXT_RUNTIME === 'nodejs') {
await import('./sentry.server.config');
// Initialize server services on boot
// We do this AFTER Sentry to ensure errors during service init are caught
const { getConfig } = await import('@/lib/config');
getConfig(); // Trigger validation
const { getServerAppServices } = await import('@/lib/services/create-services.server');
getServerAppServices();
}
if (process.env.NEXT_RUNTIME === 'edge') {
await import('./sentry.edge.config');
}
}
// Capture errors from Server Components, middleware and route handlers.
export const onRequestError = Sentry.captureRequestError;

View File

@@ -34,3 +34,85 @@ export const getBreadcrumbSchema = (items: { name: string; item: string }[]) =>
item: item.item.startsWith('http') ? item.item : `${SITE_URL}${item.item}`,
})),
});
export const getLocalBusinessSchema = () => ({
'@context': 'https://schema.org' as const,
'@type': 'LocalBusiness' as const,
name: 'E-TIB GmbH',
url: SITE_URL,
logo: LOGO_URL,
image: LOGO_URL,
description: 'Ihr Partner für Kabelleitungstiefbau, Horizontalspülbohrungen, Planung und Vermessung in Guben und überregional.',
telephone: '+49-15207230518',
email: 'd.joseph@e-tib.com',
address: {
'@type': 'PostalAddress' as const,
streetAddress: 'Gewerbestraße 22',
addressLocality: 'Guben',
postalCode: '03172',
addressCountry: 'DE',
},
geo: {
'@type': 'GeoCoordinates' as const,
latitude: 51.9547, // Approx coordinates for Guben area
longitude: 14.7175,
},
openingHoursSpecification: [
{
'@type': 'OpeningHoursSpecification' as const,
dayOfWeek: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'],
opens: '08:00',
closes: '17:00',
},
],
sameAs: ['https://www.instagram.com/me.and.eloise/'],
});
export const getFAQSchema = (questions: { question: string; answer: string }[]) => ({
'@context': 'https://schema.org' as const,
'@type': 'FAQPage' as const,
mainEntity: questions.map((q) => ({
'@type': 'Question' as const,
name: q.question,
acceptedAnswer: {
'@type': 'Answer' as const,
text: q.answer,
},
})),
});
export const getServiceSchema = (serviceName: string, description: string, image?: string) => ({
'@context': 'https://schema.org' as const,
'@type': 'Service' as const,
name: serviceName,
description: description,
provider: {
'@type': 'Organization' as const,
name: 'E-TIB GmbH',
},
...(image && { image }),
});
export const getEventSchema = (event: { name: string; startDate: string; endDate?: string; locationName: string; locationAddress?: string; url?: string }) => ({
'@context': 'https://schema.org' as const,
'@type': 'Event' as const,
name: event.name,
startDate: event.startDate,
...(event.endDate && { endDate: event.endDate }),
location: {
'@type': 'Place' as const,
name: event.locationName,
...(event.locationAddress && {
address: {
'@type': 'PostalAddress' as const,
streetAddress: event.locationAddress,
},
}),
},
organizer: {
'@type': 'Organization' as const,
name: 'E-TIB GmbH',
url: SITE_URL,
},
...(event.url && { url: event.url }),
});

2
next-env.d.ts vendored
View File

@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/dev/types/routes.d.ts";
import "./.next/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.

View File

@@ -9,8 +9,8 @@ const isProd = process.env.NODE_ENV === 'production';
const nextConfig = {
transpilePackages: ['react-image-crop', '@react-three/fiber'],
onDemandEntries: {
// Keep compiled pages/routes in memory for 5 minutes (reduced from 25m to prevent OOM)
maxInactiveAge: 5 * 60 * 1000,
// Keep compiled pages/routes in memory for 1 minute (optimized for memory usage)
maxInactiveAge: 60 * 1000,
// Keep up to 2 pages in the dev buffer (reduced from 10 to prevent OOM)
pagesBufferLength: 2,
},
@@ -56,8 +56,15 @@ const nextConfig = {
// Rewrites moved to bottom merged function
async headers() {
const isProd = process.env.NODE_ENV === 'production';
const umamiDomain = new URL(process.env.UMAMI_API_ENDPOINT || 'https://analytics.infra.mintel.me').origin;
const glitchtipDomain = new URL(process.env.SENTRY_DSN ? new URL(process.env.SENTRY_DSN).origin : 'https://errors.infra.mintel.me').origin;
// Ensure API endpoints have a protocol to avoid 'Invalid URL' errors during build
let umamiUrl = process.env.UMAMI_API_ENDPOINT || 'https://analytics.infra.mintel.me';
if (umamiUrl && !umamiUrl.startsWith('http')) umamiUrl = `https://${umamiUrl}`;
const umamiDomain = new URL(umamiUrl).origin;
let glitchtipUrl = process.env.SENTRY_DSN ? new URL(process.env.SENTRY_DSN).origin : 'https://errors.infra.mintel.me';
if (glitchtipUrl && !glitchtipUrl.startsWith('http')) glitchtipUrl = `https://${glitchtipUrl}`;
const glitchtipDomain = new URL(glitchtipUrl).origin;
const extraImgDomains = [
'https://e-tib.com',
'https://staging.e-tib.com',
@@ -500,6 +507,14 @@ const nextConfig = {
source: '/en/agbs',
destination: '/en/terms',
},
{
source: '/errors/:path*',
destination: `${(function() {
let glitchtipUrl = process.env.SENTRY_DSN ? new URL(process.env.SENTRY_DSN).origin : 'https://errors.infra.mintel.me';
if (glitchtipUrl && !glitchtipUrl.startsWith('http')) glitchtipUrl = 'https://' + glitchtipUrl;
return new URL(glitchtipUrl).origin;
})()}/:path*`,
},
],
afterFiles: [],
fallback: [],

4
node_modules/.bin/autoprefixer generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/autoprefixer@10.4.27_postcss@8.5.8/node_modules/autoprefixer/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/autoprefixer@10.4.27_postcss@8.5.8/node_modules/autoprefixer/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/autoprefixer@10.4.27_postcss@8.5.8/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/autoprefixer@10.4.27_postcss@8.5.8/node_modules/autoprefixer/bin/autoprefixer" "$@"
exec "$basedir/node" "$basedir/../autoprefixer/bin/autoprefixer" "$@"
else
exec node "$basedir/../.pnpm/autoprefixer@10.4.27_postcss@8.5.8/node_modules/autoprefixer/bin/autoprefixer" "$@"
exec node "$basedir/../autoprefixer/bin/autoprefixer" "$@"
fi

4
node_modules/.bin/commitlint generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@commitlint+cli@20.5.0_@types+node@22.19.15_conventional-commits-parser@6.4.0_typescript@5.9.3/node_modules/@commitlint/cli/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@commitlint+cli@20.5.0_@types+node@22.19.15_conventional-commits-parser@6.4.0_typescript@5.9.3/node_modules/@commitlint/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@commitlint+cli@20.5.0_@types+node@22.19.15_conventional-commits-parser@6.4.0_typescript@5.9.3/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/@commitlint+cli@20.5.0_@types+node@22.19.15_conventional-commits-parser@6.4.0_typescript@5.9.3/node_modules/@commitlint/cli/cli.js" "$@"
exec "$basedir/node" "$basedir/../@commitlint/cli/cli.js" "$@"
else
exec node "$basedir/../.pnpm/@commitlint+cli@20.5.0_@types+node@22.19.15_conventional-commits-parser@6.4.0_typescript@5.9.3/node_modules/@commitlint/cli/cli.js" "$@"
exec node "$basedir/../@commitlint/cli/cli.js" "$@"
fi

4
node_modules/.bin/cspell generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/cspell@9.7.0/node_modules/cspell/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/cspell@9.7.0/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/cspell@9.7.0/node_modules/cspell/bin.mjs" "$@"
exec "$basedir/node" "$basedir/../cspell/bin.mjs" "$@"
else
exec node "$basedir/../.pnpm/cspell@9.7.0/node_modules/cspell/bin.mjs" "$@"
exec node "$basedir/../cspell/bin.mjs" "$@"
fi

4
node_modules/.bin/cspell-esm generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/cspell@9.7.0/node_modules/cspell/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/cspell@9.7.0/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/cspell@9.7.0/node_modules/cspell/bin.mjs" "$@"
exec "$basedir/node" "$basedir/../cspell/bin.mjs" "$@"
else
exec node "$basedir/../.pnpm/cspell@9.7.0/node_modules/cspell/bin.mjs" "$@"
exec node "$basedir/../cspell/bin.mjs" "$@"
fi

4
node_modules/.bin/email generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/react-email@5.2.10/node_modules/react-email/dist/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/react-email@5.2.10/node_modules/react-email/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/react-email@5.2.10/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/react-email@5.2.10/node_modules/react-email/dist/index.mjs" "$@"
exec "$basedir/node" "$basedir/../react-email/dist/index.mjs" "$@"
else
exec node "$basedir/../.pnpm/react-email@5.2.10/node_modules/react-email/dist/index.mjs" "$@"
exec node "$basedir/../react-email/dist/index.mjs" "$@"
fi

4
node_modules/.bin/eslint generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/eslint@9.39.4_jiti@2.6.1/node_modules/eslint/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/eslint@9.39.4_jiti@2.6.1/node_modules/eslint/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/eslint@9.39.4_jiti@2.6.1/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/eslint@9.39.4_jiti@2.6.1/node_modules/eslint/bin/eslint.js" "$@"
exec "$basedir/node" "$basedir/../eslint/bin/eslint.js" "$@"
else
exec node "$basedir/../.pnpm/eslint@9.39.4_jiti@2.6.1/node_modules/eslint/bin/eslint.js" "$@"
exec node "$basedir/../eslint/bin/eslint.js" "$@"
fi

4
node_modules/.bin/html-validate generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/html-validate@10.11.2_vitest@4.1.2/node_modules/html-validate/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/html-validate@10.11.2_vitest@4.1.2/node_modules/html-validate/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/html-validate@10.11.2_vitest@4.1.2/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/html-validate@10.11.2_vitest@4.1.2/node_modules/html-validate/bin/html-validate.mjs" "$@"
exec "$basedir/node" "$basedir/../html-validate/bin/html-validate.mjs" "$@"
else
exec node "$basedir/../.pnpm/html-validate@10.11.2_vitest@4.1.2/node_modules/html-validate/bin/html-validate.mjs" "$@"
exec node "$basedir/../html-validate/bin/html-validate.mjs" "$@"
fi

4
node_modules/.bin/husky generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/husky@9.1.7/node_modules/husky/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/husky@9.1.7/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/husky@9.1.7/node_modules/husky/bin.js" "$@"
exec "$basedir/node" "$basedir/../husky/bin.js" "$@"
else
exec node "$basedir/../.pnpm/husky@9.1.7/node_modules/husky/bin.js" "$@"
exec node "$basedir/../husky/bin.js" "$@"
fi

4
node_modules/.bin/lhci generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@lhci+cli@0.15.1/node_modules/@lhci/cli/src/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@lhci+cli@0.15.1/node_modules/@lhci/cli/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@lhci+cli@0.15.1/node_modules/@lhci/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@lhci+cli@0.15.1/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/@lhci+cli@0.15.1/node_modules/@lhci/cli/src/cli.js" "$@"
exec "$basedir/node" "$basedir/../@lhci/cli/src/cli.js" "$@"
else
exec node "$basedir/../.pnpm/@lhci+cli@0.15.1/node_modules/@lhci/cli/src/cli.js" "$@"
exec node "$basedir/../@lhci/cli/src/cli.js" "$@"
fi

4
node_modules/.bin/lint-staged generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/lint-staged@16.4.0/node_modules/lint-staged/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/lint-staged@16.4.0/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/lint-staged@16.4.0/node_modules/lint-staged/bin/lint-staged.js" "$@"
exec "$basedir/node" "$basedir/../lint-staged/bin/lint-staged.js" "$@"
else
exec node "$basedir/../.pnpm/lint-staged@16.4.0/node_modules/lint-staged/bin/lint-staged.js" "$@"
exec node "$basedir/../lint-staged/bin/lint-staged.js" "$@"
fi

4
node_modules/.bin/next generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@opentelemetry+api@1.9.1_react-dom@19.2.4_react@19.2.4__react@19.2.4_sass@1.98.0/node_modules/next/dist/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@opentelemetry+api@1.9.1_react-dom@19.2.4_react@19.2.4__react@19.2.4_sass@1.98.0/node_modules/next/dist/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@opentelemetry+api@1.9.1_react-dom@19.2.4_react@19.2.4__react@19.2.4_sass@1.98.0/node_modules/next/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@opentelemetry+api@1.9.1_react-dom@19.2.4_react@19.2.4__react@19.2.4_sass@1.98.0/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/next@16.1.6_@babel+core@7.29.0_@opentelemetry+api@1.9.1_react-dom@19.2.4_react@19.2.4__react@19.2.4_sass@1.98.0/node_modules/next/dist/bin/next" "$@"
exec "$basedir/node" "$basedir/../next/dist/bin/next" "$@"
else
exec node "$basedir/../.pnpm/next@16.1.6_@babel+core@7.29.0_@opentelemetry+api@1.9.1_react-dom@19.2.4_react@19.2.4__react@19.2.4_sass@1.98.0/node_modules/next/dist/bin/next" "$@"
exec node "$basedir/../next/dist/bin/next" "$@"
fi

4
node_modules/.bin/pa11y-ci generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/pa11y-ci@4.1.0_typescript@5.9.3/node_modules/pa11y-ci/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/pa11y-ci@4.1.0_typescript@5.9.3/node_modules/pa11y-ci/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/pa11y-ci@4.1.0_typescript@5.9.3/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/pa11y-ci@4.1.0_typescript@5.9.3/node_modules/pa11y-ci/bin/pa11y-ci.js" "$@"
exec "$basedir/node" "$basedir/../pa11y-ci/bin/pa11y-ci.js" "$@"
else
exec node "$basedir/../.pnpm/pa11y-ci@4.1.0_typescript@5.9.3/node_modules/pa11y-ci/bin/pa11y-ci.js" "$@"
exec node "$basedir/../pa11y-ci/bin/pa11y-ci.js" "$@"
fi

4
node_modules/.bin/pdf-parse generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/pdf-parse@2.4.5/node_modules/pdf-parse/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/pdf-parse@2.4.5/node_modules/pdf-parse/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/pdf-parse@2.4.5/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/pdf-parse@2.4.5/node_modules/pdf-parse/bin/cli.mjs" "$@"
exec "$basedir/node" "$basedir/../pdf-parse/bin/cli.mjs" "$@"
else
exec node "$basedir/../.pnpm/pdf-parse@2.4.5/node_modules/pdf-parse/bin/cli.mjs" "$@"
exec node "$basedir/../pdf-parse/bin/cli.mjs" "$@"
fi

4
node_modules/.bin/pino generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/pino@10.3.1/node_modules/pino/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/pino@10.3.1/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/pino@10.3.1/node_modules/pino/bin.js" "$@"
exec "$basedir/node" "$basedir/../pino/bin.js" "$@"
else
exec node "$basedir/../.pnpm/pino@10.3.1/node_modules/pino/bin.js" "$@"
exec node "$basedir/../pino/bin.js" "$@"
fi

4
node_modules/.bin/pino-pretty generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/pino-pretty@13.1.3/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/bin.js" "$@"
exec "$basedir/node" "$basedir/../pino-pretty/bin.js" "$@"
else
exec node "$basedir/../.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/bin.js" "$@"
exec node "$basedir/../pino-pretty/bin.js" "$@"
fi

4
node_modules/.bin/prettier generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/prettier@3.8.1/node_modules/prettier/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/prettier@3.8.1/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/prettier@3.8.1/node_modules/prettier/bin/prettier.cjs" "$@"
exec "$basedir/node" "$basedir/../prettier/bin/prettier.cjs" "$@"
else
exec node "$basedir/../.pnpm/prettier@3.8.1/node_modules/prettier/bin/prettier.cjs" "$@"
exec node "$basedir/../prettier/bin/prettier.cjs" "$@"
fi

4
node_modules/.bin/puppeteer generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/puppeteer@24.40.0_typescript@5.9.3/node_modules/puppeteer/lib/cjs/puppeteer/node/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/puppeteer@24.40.0_typescript@5.9.3/node_modules/puppeteer/lib/cjs/puppeteer/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/puppeteer@24.40.0_typescript@5.9.3/node_modules/puppeteer/lib/cjs/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/puppeteer@24.40.0_typescript@5.9.3/node_modules/puppeteer/lib/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/puppeteer@24.40.0_typescript@5.9.3/node_modules/puppeteer/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/puppeteer@24.40.0_typescript@5.9.3/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/puppeteer@24.40.0_typescript@5.9.3/node_modules/puppeteer/lib/cjs/puppeteer/node/cli.js" "$@"
exec "$basedir/node" "$basedir/../puppeteer/lib/cjs/puppeteer/node/cli.js" "$@"
else
exec node "$basedir/../.pnpm/puppeteer@24.40.0_typescript@5.9.3/node_modules/puppeteer/lib/cjs/puppeteer/node/cli.js" "$@"
exec node "$basedir/../puppeteer/lib/cjs/puppeteer/node/cli.js" "$@"
fi

4
node_modules/.bin/sass generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/sass@1.98.0/node_modules/sass/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/sass@1.98.0/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/sass@1.98.0/node_modules/sass/sass.js" "$@"
exec "$basedir/node" "$basedir/../sass/sass.js" "$@"
else
exec node "$basedir/../.pnpm/sass@1.98.0/node_modules/sass/sass.js" "$@"
exec node "$basedir/../sass/sass.js" "$@"
fi

4
node_modules/.bin/server-test generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/src/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/src/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/start-server-and-test@2.1.5/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/src/bin/start.js" "$@"
exec "$basedir/node" "$basedir/../start-server-and-test/src/bin/start.js" "$@"
else
exec node "$basedir/../.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/src/bin/start.js" "$@"
exec node "$basedir/../start-server-and-test/src/bin/start.js" "$@"
fi

View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/src/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/src/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/start-server-and-test@2.1.5/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/src/bin/start.js" "$@"
exec "$basedir/node" "$basedir/../start-server-and-test/src/bin/start.js" "$@"
else
exec node "$basedir/../.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/src/bin/start.js" "$@"
exec node "$basedir/../start-server-and-test/src/bin/start.js" "$@"
fi

4
node_modules/.bin/start-test generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/src/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/src/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/start-server-and-test@2.1.5/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/src/bin/start.js" "$@"
exec "$basedir/node" "$basedir/../start-server-and-test/src/bin/start.js" "$@"
else
exec node "$basedir/../.pnpm/start-server-and-test@2.1.5/node_modules/start-server-and-test/src/bin/start.js" "$@"
exec node "$basedir/../start-server-and-test/src/bin/start.js" "$@"
fi

4
node_modules/.bin/tailwindcss generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@tailwindcss+cli@4.2.2/node_modules/@tailwindcss/cli/dist/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@tailwindcss+cli@4.2.2/node_modules/@tailwindcss/cli/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@tailwindcss+cli@4.2.2/node_modules/@tailwindcss/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@tailwindcss+cli@4.2.2/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/@tailwindcss+cli@4.2.2/node_modules/@tailwindcss/cli/dist/index.mjs" "$@"
exec "$basedir/node" "$basedir/../@tailwindcss/cli/dist/index.mjs" "$@"
else
exec node "$basedir/../.pnpm/@tailwindcss+cli@4.2.2/node_modules/@tailwindcss/cli/dist/index.mjs" "$@"
exec node "$basedir/../@tailwindcss/cli/dist/index.mjs" "$@"
fi

4
node_modules/.bin/tsc generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/typescript@5.9.3/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/typescript@5.9.3/node_modules/typescript/bin/tsc" "$@"
exec "$basedir/node" "$basedir/../typescript/bin/tsc" "$@"
else
exec node "$basedir/../.pnpm/typescript@5.9.3/node_modules/typescript/bin/tsc" "$@"
exec node "$basedir/../typescript/bin/tsc" "$@"
fi

4
node_modules/.bin/tsserver generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/typescript@5.9.3/node_modules/typescript/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/typescript@5.9.3/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/typescript@5.9.3/node_modules/typescript/bin/tsserver" "$@"
exec "$basedir/node" "$basedir/../typescript/bin/tsserver" "$@"
else
exec node "$basedir/../.pnpm/typescript@5.9.3/node_modules/typescript/bin/tsserver" "$@"
exec node "$basedir/../typescript/bin/tsserver" "$@"
fi

4
node_modules/.bin/tsx generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/dist/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/tsx@4.21.0/node_modules/tsx/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/tsx@4.21.0/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/tsx@4.21.0/node_modules/tsx/dist/cli.mjs" "$@"
exec "$basedir/node" "$basedir/../tsx/dist/cli.mjs" "$@"
else
exec node "$basedir/../.pnpm/tsx@4.21.0/node_modules/tsx/dist/cli.mjs" "$@"
exec node "$basedir/../tsx/dist/cli.mjs" "$@"
fi

4
node_modules/.bin/turbo generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/turbo@2.9.3/node_modules/turbo/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/turbo@2.9.3/node_modules/turbo/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/turbo@2.9.3/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/turbo@2.9.3/node_modules/turbo/bin/turbo" "$@"
exec "$basedir/node" "$basedir/../turbo/bin/turbo" "$@"
else
exec node "$basedir/../.pnpm/turbo@2.9.3/node_modules/turbo/bin/turbo" "$@"
exec node "$basedir/../turbo/bin/turbo" "$@"
fi

4
node_modules/.bin/vitest generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/vitest@4.1.2_@opentelemetry+api@1.9.1_@types+node@22.19.15_@vitest+ui@4.1.2_happy-dom@2_19bab7c39606080f97249e5e6c2814fa/node_modules/vitest/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/vitest@4.1.2_@opentelemetry+api@1.9.1_@types+node@22.19.15_@vitest+ui@4.1.2_happy-dom@2_19bab7c39606080f97249e5e6c2814fa/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/vitest@4.1.2_@opentelemetry+api@1.9.1_@types+node@22.19.15_@vitest+ui@4.1.2_happy-dom@2_19bab7c39606080f97249e5e6c2814fa/node_modules/vitest/vitest.mjs" "$@"
exec "$basedir/node" "$basedir/../vitest/vitest.mjs" "$@"
else
exec node "$basedir/../.pnpm/vitest@4.1.2_@opentelemetry+api@1.9.1_@types+node@22.19.15_@vitest+ui@4.1.2_happy-dom@2_19bab7c39606080f97249e5e6c2814fa/node_modules/vitest/vitest.mjs" "$@"
exec node "$basedir/../vitest/vitest.mjs" "$@"
fi

4
node_modules/.bin/xlsx generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@e965+xlsx@0.20.3/node_modules/@e965/xlsx/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@e965+xlsx@0.20.3/node_modules/@e965/xlsx/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@e965+xlsx@0.20.3/node_modules/@e965/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/@e965+xlsx@0.20.3/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/@e965+xlsx@0.20.3/node_modules/@e965/xlsx/bin/xlsx.njs" "$@"
exec "$basedir/node" "$basedir/../xlsx/bin/xlsx.njs" "$@"
else
exec node "$basedir/../.pnpm/@e965+xlsx@0.20.3/node_modules/@e965/xlsx/bin/xlsx.njs" "$@"
exec node "$basedir/../xlsx/bin/xlsx.njs" "$@"
fi

4
node_modules/.bin/xlsx-cli generated vendored
View File

@@ -15,7 +15,7 @@ else
export NODE_PATH="/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/xlsx-cli@1.1.3/node_modules/xlsx-cli/bin/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/xlsx-cli@1.1.3/node_modules/xlsx-cli/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/xlsx-cli@1.1.3/node_modules:/Volumes/Alpha SSD/Coding/e-tib.com/node_modules/.pnpm/node_modules:$NODE_PATH"
fi
if [ -x "$basedir/node" ]; then
exec "$basedir/node" "$basedir/../.pnpm/xlsx-cli@1.1.3/node_modules/xlsx-cli/bin/xlsx.njs" "$@"
exec "$basedir/node" "$basedir/../xlsx-cli/bin/xlsx.njs" "$@"
else
exec node "$basedir/../.pnpm/xlsx-cli@1.1.3/node_modules/xlsx-cli/bin/xlsx.njs" "$@"
exec node "$basedir/../xlsx-cli/bin/xlsx.njs" "$@"
fi

6
node_modules/.modules.yaml generated vendored
View File

@@ -1243,6 +1243,8 @@ hoistedDependencies:
esast-util-from-js: private
esbuild@0.27.3:
esbuild: private
esbuild@0.27.4:
esbuild: private
escalade@3.2.0:
escalade: private
escape-html@1.0.3:
@@ -2730,11 +2732,11 @@ layoutVersion: 5
nodeLinker: isolated
packageManager: pnpm@10.18.3
pendingBuilds: []
prunedAt: Tue, 28 Apr 2026 17:05:42 GMT
prunedAt: Tue, 12 May 2026 10:29:30 GMT
publicHoistPattern: []
registries:
'@jsr': https://npm.jsr.io/
'@mintel': https://git.infra.mintel.me/api/packages/mmintel/npm/
'@mintel': https://npm.infra.mintel.me/
default: https://registry.npmjs.org/
skipped:
- '@emnapi/core@1.9.1'

View File

@@ -1,5 +1,5 @@
{
"lastValidatedTimestamp": 1777834770125,
"lastValidatedTimestamp": 1778583604401,
"projects": {},
"pnpmfiles": [],
"settings": {

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2015 James Messinger
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -1,164 +0,0 @@
# JSON Schema $Ref Parser
#### Parse, Resolve, and Dereference JSON Schema $ref pointers
[![Build Status](https://github.com/APIDevTools/json-schema-ref-parser/workflows/CI-CD/badge.svg?branch=master)](https://github.com/APIDevTools/json-schema-ref-parser/actions)
[![Coverage Status](https://coveralls.io/repos/github/APIDevTools/json-schema-ref-parser/badge.svg?branch=master)](https://coveralls.io/github/APIDevTools/json-schema-ref-parser)
[![npm](https://img.shields.io/npm/v/@apidevtools/json-schema-ref-parser.svg)](https://www.npmjs.com/package/@apidevtools/json-schema-ref-parser)
[![License](https://img.shields.io/npm/l/@apidevtools/json-schema-ref-parser.svg)](LICENSE)
[![Buy us a tree](https://img.shields.io/badge/Treeware-%F0%9F%8C%B3-lightgreen)](https://plant.treeware.earth/APIDevTools/json-schema-ref-parser)
## Installation
Install using [npm](https://docs.npmjs.com/about-npm/):
```bash
npm install @apidevtools/json-schema-ref-parser
yarn add @apidevtools/json-schema-ref-parser
bun add @apidevtools/json-schema-ref-parser
```
## The Problem:
You've got a JSON Schema with `$ref` pointers to other files and/or URLs. Maybe you know all the referenced files ahead
of time. Maybe you don't. Maybe some are local files, and others are remote URLs. Maybe they are a mix of JSON and YAML
format. Maybe some of the files contain cross-references to each other.
```json
{
"definitions": {
"person": {
// references an external file
"$ref": "schemas/people/Bruce-Wayne.json"
},
"place": {
// references a sub-schema in an external file
"$ref": "schemas/places.yaml#/definitions/Gotham-City"
},
"thing": {
// references a URL
"$ref": "http://wayne-enterprises.com/things/batmobile"
},
"color": {
// references a value in an external file via an internal reference
"$ref": "#/definitions/thing/properties/colors/black-as-the-night"
}
}
}
```
## The Solution:
JSON Schema $Ref Parser is a full [JSON Reference](https://tools.ietf.org/html/draft-pbryan-zyp-json-ref-03)
and [JSON Pointer](https://tools.ietf.org/html/rfc6901) implementation that crawls even the most
complex [JSON Schemas](http://json-schema.org/latest/json-schema-core.html) and gives you simple, straightforward
JavaScript objects.
- Use **JSON** or **YAML** schemas &mdash; or even a mix of both!
- Supports `$ref` pointers to external files and URLs, as well
as [custom sources](https://apitools.dev/json-schema-ref-parser/docs/plugins/resolvers.html) such as databases
- Can [bundle](https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#bundlepath-options-callback) multiple
files into a single schema that only has _internal_ `$ref` pointers
- Can [dereference](https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#dereferencepath-options-callback)
your schema, producing a plain-old JavaScript object that's easy to work with
- Supports [circular references](https://apitools.dev/json-schema-ref-parser/docs/#circular-refs), nested references,
back-references, and cross-references between files
- Maintains object reference equality &mdash; `$ref` pointers to the same value always resolve to the same object
instance
- Compatible with Node LTS and beyond, and all major web browsers on Windows, Mac, and Linux
## Example
```javascript
import $RefParser from "@apidevtools/json-schema-ref-parser";
try {
await $RefParser.dereference(mySchema);
// note - by default, mySchema is modified in place, and the returned value is a reference to the same object
console.log(mySchema.definitions.person.properties.firstName);
// if you want to avoid modifying the original schema, you can disable the `mutateInputSchema` option
let clonedSchema = await $RefParser.dereference(mySchema, { mutateInputSchema: false });
console.log(clonedSchema.definitions.person.properties.firstName);
} catch (err) {
console.error(err);
}
```
For more detailed examples, please see the [API Documentation](https://apitools.dev/json-schema-ref-parser/docs/)
## Polyfills
If you are using Node.js < 18, you'll need a polyfill for `fetch`,
like [node-fetch](https://github.com/node-fetch/node-fetch):
```javascript
import fetch from "node-fetch";
globalThis.fetch = fetch;
```
## Browser support
JSON Schema $Ref Parser supports recent versions of every major web browser. Older browsers may
require [Babel](https://babeljs.io/) and/or [polyfills](https://babeljs.io/docs/en/next/babel-polyfill).
To use JSON Schema $Ref Parser in a browser, you'll need to use a bundling tool such
as [Webpack](https://webpack.js.org/), [Rollup](https://rollupjs.org/), [Parcel](https://parceljs.org/),
or [Browserify](http://browserify.org/). Some bundlers may require a bit of configuration, such as
setting `browser: true` in [rollup-plugin-resolve](https://github.com/rollup/rollup-plugin-node-resolve).
#### Webpack 5
Webpack 5 has dropped the default export of node core modules in favour of polyfills, you'll need to set them up
yourself ( after npm-installing them )
Edit your `webpack.config.js` :
```js
config.resolve.fallback = {
path: require.resolve("path-browserify"),
fs: require.resolve("browserify-fs"),
};
config.plugins.push(
new webpack.ProvidePlugin({
Buffer: ["buffer", "Buffer"],
}),
);
```
## API Documentation
Full API documentation is available [right here](https://apitools.dev/json-schema-ref-parser/docs/)
## Contributing
I welcome any contributions, enhancements, and
bug-fixes. [Open an issue](https://github.com/APIDevTools/json-schema-ref-parser/issues) on GitHub
and [submit a pull request](https://github.com/APIDevTools/json-schema-ref-parser/pulls).
#### Building/Testing
To build/test the project locally on your computer:
1. **Clone this repo**<br>
`git clone https://github.com/APIDevTools/json-schema-ref-parser.git`
2. **Install dependencies**<br>
`yarn install`
3. **Run the tests**<br>
`yarn test`
## License
JSON Schema $Ref Parser is 100% free and open-source, under the [MIT license](LICENSE). Use it however you want.
## Thanks
Thanks to these awesome contributors for their major support of this open-source project.
- [JonLuca De Caro](https://jonlu.ca)
- [Phil Sturgeon](https://philsturgeon.com)
- [Stoplight](https://stoplight.io/?utm_source=github&utm_medium=readme&utm_campaign=json_schema_ref_parser)

View File

@@ -1,27 +0,0 @@
import type $RefParser from "./index";
import type { ParserOptions } from "./index";
import type { JSONSchema } from "./index";
export interface InventoryEntry {
$ref: any;
parent: any;
key: any;
pathFromRoot: any;
depth: any;
file: any;
hash: any;
value: any;
circular: any;
extended: any;
external: any;
indirections: any;
}
/**
* Bundles all external JSON references into the main JSON schema, thus resulting in a schema that
* only has *internal* references, not any *external* references.
* This method mutates the JSON schema object, adding new references and re-mapping existing ones.
*
* @param parser
* @param options
*/
declare function bundle<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(parser: $RefParser<S, O>, options: O): void;
export default bundle;

View File

@@ -1,293 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const ref_js_1 = __importDefault(require("./ref.js"));
const pointer_js_1 = __importDefault(require("./pointer.js"));
const url = __importStar(require("./util/url.js"));
/**
* Bundles all external JSON references into the main JSON schema, thus resulting in a schema that
* only has *internal* references, not any *external* references.
* This method mutates the JSON schema object, adding new references and re-mapping existing ones.
*
* @param parser
* @param options
*/
function bundle(parser, options) {
// console.log('Bundling $ref pointers in %s', parser.$refs._root$Ref.path);
// Build an inventory of all $ref pointers in the JSON Schema
const inventory = [];
crawl(parser, "schema", parser.$refs._root$Ref.path + "#", "#", 0, inventory, parser.$refs, options);
// Remap all $ref pointers
remap(inventory);
}
/**
* Recursively crawls the given value, and inventories all JSON references.
*
* @param parent - The object containing the value to crawl. If the value is not an object or array, it will be ignored.
* @param key - The property key of `parent` to be crawled
* @param path - The full path of the property being crawled, possibly with a JSON Pointer in the hash
* @param pathFromRoot - The path of the property being crawled, from the schema root
* @param indirections
* @param inventory - An array of already-inventoried $ref pointers
* @param $refs
* @param options
*/
function crawl(parent, key, path, pathFromRoot, indirections, inventory, $refs, options) {
const obj = key === null ? parent : parent[key];
if (obj && typeof obj === "object" && !ArrayBuffer.isView(obj)) {
if (ref_js_1.default.isAllowed$Ref(obj)) {
inventory$Ref(parent, key, path, pathFromRoot, indirections, inventory, $refs, options);
}
else {
// Crawl the object in a specific order that's optimized for bundling.
// This is important because it determines how `pathFromRoot` gets built,
// which later determines which keys get dereferenced and which ones get remapped
const keys = Object.keys(obj).sort((a, b) => {
// Most people will expect references to be bundled into the the "definitions" property,
// so we always crawl that property first, if it exists.
if (a === "definitions") {
return -1;
}
else if (b === "definitions") {
return 1;
}
else {
// Otherwise, crawl the keys based on their length.
// This produces the shortest possible bundled references
return a.length - b.length;
}
});
for (const key of keys) {
const keyPath = pointer_js_1.default.join(path, key);
const keyPathFromRoot = pointer_js_1.default.join(pathFromRoot, key);
const value = obj[key];
if (ref_js_1.default.isAllowed$Ref(value)) {
inventory$Ref(obj, key, path, keyPathFromRoot, indirections, inventory, $refs, options);
}
else {
crawl(obj, key, keyPath, keyPathFromRoot, indirections, inventory, $refs, options);
}
}
}
}
}
/**
* Inventories the given JSON Reference (i.e. records detailed information about it so we can
* optimize all $refs in the schema), and then crawls the resolved value.
*
* @param $refParent - The object that contains a JSON Reference as one of its keys
* @param $refKey - The key in `$refParent` that is a JSON Reference
* @param path - The full path of the JSON Reference at `$refKey`, possibly with a JSON Pointer in the hash
* @param indirections - unknown
* @param pathFromRoot - The path of the JSON Reference at `$refKey`, from the schema root
* @param inventory - An array of already-inventoried $ref pointers
* @param $refs
* @param options
*/
function inventory$Ref($refParent, $refKey, path, pathFromRoot, indirections, inventory, $refs, options) {
const $ref = $refKey === null ? $refParent : $refParent[$refKey];
const $refPath = url.resolve(path, $ref.$ref);
const pointer = $refs._resolve($refPath, pathFromRoot, options);
if (pointer === null) {
return;
}
const parsed = pointer_js_1.default.parse(pathFromRoot);
const depth = parsed.length;
const file = url.stripHash(pointer.path);
const hash = url.getHash(pointer.path);
const external = file !== $refs._root$Ref.path;
const extended = ref_js_1.default.isExtended$Ref($ref);
indirections += pointer.indirections;
const existingEntry = findInInventory(inventory, $refParent, $refKey);
if (existingEntry) {
// This $Ref has already been inventoried, so we don't need to process it again
if (depth < existingEntry.depth || indirections < existingEntry.indirections) {
removeFromInventory(inventory, existingEntry);
}
else {
return;
}
}
inventory.push({
$ref, // The JSON Reference (e.g. {$ref: string})
parent: $refParent, // The object that contains this $ref pointer
key: $refKey, // The key in `parent` that is the $ref pointer
pathFromRoot, // The path to the $ref pointer, from the JSON Schema root
depth, // How far from the JSON Schema root is this $ref pointer?
file, // The file that the $ref pointer resolves to
hash, // The hash within `file` that the $ref pointer resolves to
value: pointer.value, // The resolved value of the $ref pointer
circular: pointer.circular, // Is this $ref pointer DIRECTLY circular? (i.e. it references itself)
extended, // Does this $ref extend its resolved value? (i.e. it has extra properties, in addition to "$ref")
external, // Does this $ref pointer point to a file other than the main JSON Schema file?
indirections, // The number of indirect references that were traversed to resolve the value
});
// Recursively crawl the resolved value
if (!existingEntry || external) {
crawl(pointer.value, null, pointer.path, pathFromRoot, indirections + 1, inventory, $refs, options);
}
}
/**
* Re-maps every $ref pointer, so that they're all relative to the root of the JSON Schema.
* Each referenced value is dereferenced EXACTLY ONCE. All subsequent references to the same
* value are re-mapped to point to the first reference.
*
* @example: {
* first: { $ref: somefile.json#/some/part },
* second: { $ref: somefile.json#/another/part },
* third: { $ref: somefile.json },
* fourth: { $ref: somefile.json#/some/part/sub/part }
* }
*
* In this example, there are four references to the same file, but since the third reference points
* to the ENTIRE file, that's the only one we need to dereference. The other three can just be
* remapped to point inside the third one.
*
* On the other hand, if the third reference DIDN'T exist, then the first and second would both need
* to be dereferenced, since they point to different parts of the file. The fourth reference does NOT
* need to be dereferenced, because it can be remapped to point inside the first one.
*
* @param inventory
*/
function remap(inventory) {
// Group & sort all the $ref pointers, so they're in the order that we need to dereference/remap them
inventory.sort((a, b) => {
if (a.file !== b.file) {
// Group all the $refs that point to the same file
return a.file < b.file ? -1 : +1;
}
else if (a.hash !== b.hash) {
// Group all the $refs that point to the same part of the file
return a.hash < b.hash ? -1 : +1;
}
else if (a.circular !== b.circular) {
// If the $ref points to itself, then sort it higher than other $refs that point to this $ref
return a.circular ? -1 : +1;
}
else if (a.extended !== b.extended) {
// If the $ref extends the resolved value, then sort it lower than other $refs that don't extend the value
return a.extended ? +1 : -1;
}
else if (a.indirections !== b.indirections) {
// Sort direct references higher than indirect references
return a.indirections - b.indirections;
}
else if (a.depth !== b.depth) {
// Sort $refs by how close they are to the JSON Schema root
return a.depth - b.depth;
}
else {
// Determine how far each $ref is from the "definitions" property.
// Most people will expect references to be bundled into the the "definitions" property if possible.
const aDefinitionsIndex = a.pathFromRoot.lastIndexOf("/definitions");
const bDefinitionsIndex = b.pathFromRoot.lastIndexOf("/definitions");
if (aDefinitionsIndex !== bDefinitionsIndex) {
// Give higher priority to the $ref that's closer to the "definitions" property
return bDefinitionsIndex - aDefinitionsIndex;
}
else {
// All else is equal, so use the shorter path, which will produce the shortest possible reference
return a.pathFromRoot.length - b.pathFromRoot.length;
}
}
});
let file, hash, pathFromRoot;
for (const entry of inventory) {
// console.log('Re-mapping $ref pointer "%s" at %s', entry.$ref.$ref, entry.pathFromRoot);
if (!entry.external) {
// This $ref already resolves to the main JSON Schema file
entry.$ref.$ref = entry.hash;
}
else if (entry.file === file && entry.hash === hash) {
// This $ref points to the same value as the prevous $ref, so remap it to the same path
entry.$ref.$ref = pathFromRoot;
}
else if (entry.file === file && entry.hash.indexOf(hash + "/") === 0) {
// This $ref points to a sub-value of the prevous $ref, so remap it beneath that path
entry.$ref.$ref = pointer_js_1.default.join(pathFromRoot, pointer_js_1.default.parse(entry.hash.replace(hash, "#")));
}
else {
// We've moved to a new file or new hash
file = entry.file;
hash = entry.hash;
pathFromRoot = entry.pathFromRoot;
// This is the first $ref to point to this value, so dereference the value.
// Any other $refs that point to the same value will point to this $ref instead
entry.$ref = entry.parent[entry.key] = ref_js_1.default.dereference(entry.$ref, entry.value);
if (entry.circular) {
// This $ref points to itself
entry.$ref.$ref = entry.pathFromRoot;
}
}
}
// we want to ensure that any $refs that point to another $ref are remapped to point to the final value
// let hadChange = true;
// while (hadChange) {
// hadChange = false;
// for (const entry of inventory) {
// if (entry.$ref && typeof entry.$ref === "object" && "$ref" in entry.$ref) {
// const resolved = inventory.find((e: InventoryEntry) => e.pathFromRoot === entry.$ref.$ref);
// if (resolved) {
// const resolvedPointsToAnotherRef =
// resolved.$ref && typeof resolved.$ref === "object" && "$ref" in resolved.$ref;
// if (resolvedPointsToAnotherRef && entry.$ref.$ref !== resolved.$ref.$ref) {
// // console.log('Re-mapping $ref pointer "%s" at %s', entry.$ref.$ref, entry.pathFromRoot);
// entry.$ref.$ref = resolved.$ref.$ref;
// hadChange = true;
// }
// }
// }
// }
// }
}
/**
* TODO
*/
function findInInventory(inventory, $refParent, $refKey) {
for (const existingEntry of inventory) {
if (existingEntry && existingEntry.parent === $refParent && existingEntry.key === $refKey) {
return existingEntry;
}
}
return undefined;
}
function removeFromInventory(inventory, entry) {
const index = inventory.indexOf(entry);
inventory.splice(index, 1);
}
exports.default = bundle;

View File

@@ -1,12 +0,0 @@
import type { ParserOptions } from "./options.js";
import type { JSONSchema } from "./types";
import type $RefParser from "./index";
export default dereference;
/**
* Crawls the JSON schema, finds all JSON references, and dereferences them.
* This method mutates the JSON schema object, replacing JSON references with their resolved value.
*
* @param parser
* @param options
*/
declare function dereference<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(parser: $RefParser<S, O>, options: O): void;

View File

@@ -1,249 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const ref_js_1 = __importDefault(require("./ref.js"));
const pointer_js_1 = __importDefault(require("./pointer.js"));
const ono_1 = require("@jsdevtools/ono");
const url = __importStar(require("./util/url.js"));
const errors_1 = require("./util/errors");
exports.default = dereference;
/**
* Crawls the JSON schema, finds all JSON references, and dereferences them.
* This method mutates the JSON schema object, replacing JSON references with their resolved value.
*
* @param parser
* @param options
*/
function dereference(parser, options) {
const start = Date.now();
// console.log('Dereferencing $ref pointers in %s', parser.$refs._root$Ref.path);
const dereferenced = crawl(parser.schema, parser.$refs._root$Ref.path, "#", new Set(), new Set(), new Map(), parser.$refs, options, start);
parser.$refs.circular = dereferenced.circular;
parser.schema = dereferenced.value;
}
/**
* Recursively crawls the given value, and dereferences any JSON references.
*
* @param obj - The value to crawl. If it's not an object or array, it will be ignored.
* @param path - The full path of `obj`, possibly with a JSON Pointer in the hash
* @param pathFromRoot - The path of `obj` from the schema root
* @param parents - An array of the parent objects that have already been dereferenced
* @param processedObjects - An array of all the objects that have already been processed
* @param dereferencedCache - An map of all the dereferenced objects
* @param $refs
* @param options
* @param startTime - The time when the dereferencing started
* @returns
*/
function crawl(obj, path, pathFromRoot, parents, processedObjects, dereferencedCache, $refs, options, startTime) {
let dereferenced;
const result = {
value: obj,
circular: false,
};
if (options && options.timeoutMs) {
if (Date.now() - startTime > options.timeoutMs) {
throw new errors_1.TimeoutError(options.timeoutMs);
}
}
const derefOptions = (options.dereference || {});
const isExcludedPath = derefOptions.excludedPathMatcher || (() => false);
if (derefOptions?.circular === "ignore" || !processedObjects.has(obj)) {
if (obj && typeof obj === "object" && !ArrayBuffer.isView(obj) && !isExcludedPath(pathFromRoot)) {
parents.add(obj);
processedObjects.add(obj);
if (ref_js_1.default.isAllowed$Ref(obj, options)) {
dereferenced = dereference$Ref(obj, path, pathFromRoot, parents, processedObjects, dereferencedCache, $refs, options, startTime);
result.circular = dereferenced.circular;
result.value = dereferenced.value;
}
else {
for (const key of Object.keys(obj)) {
const keyPath = pointer_js_1.default.join(path, key);
const keyPathFromRoot = pointer_js_1.default.join(pathFromRoot, key);
if (isExcludedPath(keyPathFromRoot)) {
continue;
}
const value = obj[key];
let circular = false;
if (ref_js_1.default.isAllowed$Ref(value, options)) {
dereferenced = dereference$Ref(value, keyPath, keyPathFromRoot, parents, processedObjects, dereferencedCache, $refs, options, startTime);
circular = dereferenced.circular;
// Avoid pointless mutations; breaks frozen objects to no profit
if (obj[key] !== dereferenced.value) {
// If we have properties we want to preserve from our dereferenced schema then we need
// to copy them over to our new object.
const preserved = new Map();
if (derefOptions?.preservedProperties) {
if (typeof obj[key] === "object" && !Array.isArray(obj[key])) {
derefOptions?.preservedProperties.forEach((prop) => {
if (prop in obj[key]) {
preserved.set(prop, obj[key][prop]);
}
});
}
}
obj[key] = dereferenced.value;
// If we have data to preserve and our dereferenced object is still an object then
// we need copy back our preserved data into our dereferenced schema.
if (derefOptions?.preservedProperties) {
if (preserved.size && typeof obj[key] === "object" && !Array.isArray(obj[key])) {
preserved.forEach((value, prop) => {
obj[key][prop] = value;
});
}
}
derefOptions?.onDereference?.(value.$ref, obj[key], obj, key);
}
}
else {
if (!parents.has(value)) {
dereferenced = crawl(value, keyPath, keyPathFromRoot, parents, processedObjects, dereferencedCache, $refs, options, startTime);
circular = dereferenced.circular;
// Avoid pointless mutations; breaks frozen objects to no profit
if (obj[key] !== dereferenced.value) {
obj[key] = dereferenced.value;
}
}
else {
circular = foundCircularReference(keyPath, $refs, options);
}
}
// Set the "isCircular" flag if this or any other property is circular
result.circular = result.circular || circular;
}
}
parents.delete(obj);
}
}
return result;
}
/**
* Dereferences the given JSON Reference, and then crawls the resulting value.
*
* @param $ref - The JSON Reference to resolve
* @param path - The full path of `$ref`, possibly with a JSON Pointer in the hash
* @param pathFromRoot - The path of `$ref` from the schema root
* @param parents - An array of the parent objects that have already been dereferenced
* @param processedObjects - An array of all the objects that have already been dereferenced
* @param dereferencedCache - An map of all the dereferenced objects
* @param $refs
* @param options
* @returns
*/
function dereference$Ref($ref, path, pathFromRoot, parents, processedObjects, dereferencedCache, $refs, options, startTime) {
const isExternalRef = ref_js_1.default.isExternal$Ref($ref);
const shouldResolveOnCwd = isExternalRef && options?.dereference?.externalReferenceResolution === "root";
const $refPath = url.resolve(shouldResolveOnCwd ? url.cwd() : path, $ref.$ref);
const cache = dereferencedCache.get($refPath);
if (cache && !cache.circular) {
const refKeys = Object.keys($ref);
if (refKeys.length > 1) {
const extraKeys = {};
for (const key of refKeys) {
if (key !== "$ref" && !(key in cache.value)) {
// @ts-expect-error TS(7053): Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
extraKeys[key] = $ref[key];
}
}
return {
circular: cache.circular,
value: Object.assign({}, cache.value, extraKeys),
};
}
return cache;
}
const pointer = $refs._resolve($refPath, path, options);
if (pointer === null) {
return {
circular: false,
value: null,
};
}
// Check for circular references
const directCircular = pointer.circular;
let circular = directCircular || parents.has(pointer.value);
if (circular) {
foundCircularReference(path, $refs, options);
}
// Dereference the JSON reference
let dereferencedValue = ref_js_1.default.dereference($ref, pointer.value);
// Crawl the dereferenced value (unless it's circular)
if (!circular) {
// Determine if the dereferenced value is circular
const dereferenced = crawl(dereferencedValue, pointer.path, pathFromRoot, parents, processedObjects, dereferencedCache, $refs, options, startTime);
circular = dereferenced.circular;
dereferencedValue = dereferenced.value;
}
if (circular && !directCircular && options.dereference?.circular === "ignore") {
// The user has chosen to "ignore" circular references, so don't change the value
dereferencedValue = $ref;
}
if (directCircular) {
// The pointer is a DIRECT circular reference (i.e. it references itself).
// So replace the $ref path with the absolute path from the JSON Schema root
dereferencedValue.$ref = pathFromRoot;
}
const dereferencedObject = {
circular,
value: dereferencedValue,
};
// only cache if no extra properties than $ref
if (Object.keys($ref).length === 1) {
dereferencedCache.set($refPath, dereferencedObject);
}
return dereferencedObject;
}
/**
* Called when a circular reference is found.
* It sets the {@link $Refs#circular} flag, executes the options.dereference.onCircular callback,
* and throws an error if options.dereference.circular is false.
*
* @param keyPath - The JSON Reference path of the circular reference
* @param $refs
* @param options
* @returns - always returns true, to indicate that a circular reference was found
*/
function foundCircularReference(keyPath, $refs, options) {
$refs.circular = true;
options?.dereference?.onCircular?.(keyPath);
if (!options.dereference.circular) {
throw ono_1.ono.reference(`Circular $ref pointer found at ${keyPath}`);
}
return true;
}

View File

@@ -1,162 +0,0 @@
import $Refs from "./refs.js";
import normalizeArgs from "./normalize-args.js";
import _dereference from "./dereference.js";
import { JSONParserError, InvalidPointerError, MissingPointerError, ResolverError, ParserError, UnmatchedParserError, UnmatchedResolverError, isHandledError, JSONParserErrorGroup } from "./util/errors.js";
import type { ParserOptions } from "./options.js";
import { getJsonSchemaRefParserDefaultOptions } from "./options.js";
import type { $RefsCallback, JSONSchema, SchemaCallback, FileInfo, Plugin, ResolverOptions, HTTPResolverOptions } from "./types/index.js";
export type RefParserSchema = string | JSONSchema;
/**
* This class parses a JSON schema, builds a map of its JSON references and their resolved values,
* and provides methods for traversing, manipulating, and dereferencing those references.
*
* @class
*/
export declare class $RefParser<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>> {
/**
* The parsed (and possibly dereferenced) JSON schema object
*
* @type {object}
* @readonly
*/
schema: S | null;
/**
* The resolved JSON references
*
* @type {$Refs}
* @readonly
*/
$refs: $Refs<S, O>;
/**
* Parses the given JSON schema.
* This method does not resolve any JSON references.
* It just reads a single file in JSON or YAML format, and parse it as a JavaScript object.
*
* @param [path] - The file path or URL of the JSON schema
* @param [schema] - A JSON schema object. This object will be used instead of reading from `path`.
* @param [options] - Options that determine how the schema is parsed
* @param [callback] - An error-first callback. The second parameter is the parsed JSON schema object.
* @returns - The returned promise resolves with the parsed JSON schema object.
*/
parse(schema: S | string | unknown): Promise<S>;
parse(schema: S | string | unknown, callback: SchemaCallback<S>): Promise<void>;
parse(schema: S | string | unknown, options: O): Promise<S>;
parse(schema: S | string | unknown, options: O, callback: SchemaCallback<S>): Promise<void>;
parse(path: string, schema: S | string | unknown, options: O): Promise<S>;
parse(path: string, schema: S | string | unknown, options: O, callback: SchemaCallback<S>): Promise<void>;
static parse<S extends object = JSONSchema>(schema: S | string | unknown): Promise<S>;
static parse<S extends object = JSONSchema>(schema: S | string | unknown, callback: SchemaCallback<S>): Promise<void>;
static parse<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(schema: S | string | unknown, options: O): Promise<S>;
static parse<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(schema: S | string | unknown, options: O, callback: SchemaCallback<S>): Promise<void>;
static parse<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(path: string, schema: S | string | unknown, options: O): Promise<S>;
static parse<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(path: string, schema: S | string | unknown, options: O, callback: SchemaCallback<S>): Promise<void>;
/**
* *This method is used internally by other methods, such as `bundle` and `dereference`. You probably won't need to call this method yourself.*
*
* Resolves all JSON references (`$ref` pointers) in the given JSON Schema file. If it references any other files/URLs, then they will be downloaded and resolved as well. This method **does not** dereference anything. It simply gives you a `$Refs` object, which is a map of all the resolved references and their values.
*
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#resolveschema-options-callback
*
* @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
* @param options (optional)
* @param callback (optional) A callback that will receive a `$Refs` object
*/
resolve(schema: S | string | unknown): Promise<$Refs<S, O>>;
resolve(schema: S | string | unknown, callback: $RefsCallback<S, O>): Promise<void>;
resolve(schema: S | string | unknown, options: O): Promise<$Refs<S, O>>;
resolve(schema: S | string | unknown, options: O, callback: $RefsCallback<S, O>): Promise<void>;
resolve(path: string, schema: S | string | unknown, options: O): Promise<$Refs<S, O>>;
resolve(path: string, schema: S | string | unknown, options: O, callback: $RefsCallback<S, O>): Promise<void>;
/**
* *This method is used internally by other methods, such as `bundle` and `dereference`. You probably won't need to call this method yourself.*
*
* Resolves all JSON references (`$ref` pointers) in the given JSON Schema file. If it references any other files/URLs, then they will be downloaded and resolved as well. This method **does not** dereference anything. It simply gives you a `$Refs` object, which is a map of all the resolved references and their values.
*
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#resolveschema-options-callback
*
* @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
* @param options (optional)
* @param callback (optional) A callback that will receive a `$Refs` object
*/
static resolve<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(schema: S | string | unknown): Promise<$Refs<S, O>>;
static resolve<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(schema: S | string | unknown, callback: $RefsCallback<S, O>): Promise<void>;
static resolve<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(schema: S | string | unknown, options: O): Promise<$Refs<S, O>>;
static resolve<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(schema: S | string | unknown, options: O, callback: $RefsCallback<S, O>): Promise<void>;
static resolve<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(path: string, schema: S | string | unknown, options: O): Promise<$Refs<S, O>>;
static resolve<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(path: string, schema: S | string | unknown, options: O, callback: $RefsCallback<S, O>): Promise<void>;
/**
* Bundles all referenced files/URLs into a single schema that only has internal `$ref` pointers. This lets you split-up your schema however you want while you're building it, but easily combine all those files together when it's time to package or distribute the schema to other people. The resulting schema size will be small, since it will still contain internal JSON references rather than being fully-dereferenced.
*
* This also eliminates the risk of circular references, so the schema can be safely serialized using `JSON.stringify()`.
*
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#bundleschema-options-callback
*
* @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
* @param options (optional)
* @param callback (optional) A callback that will receive the bundled schema object
*/
static bundle<S extends object = JSONSchema>(schema: S | string | unknown): Promise<S>;
static bundle<S extends object = JSONSchema>(schema: S | string | unknown, callback: SchemaCallback<S>): Promise<void>;
static bundle<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(schema: S | string | unknown, options: O): Promise<S>;
static bundle<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(schema: S | string | unknown, options: O, callback: SchemaCallback<S>): Promise<void>;
static bundle<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(path: string, schema: S | string | unknown, options: O): Promise<S>;
static bundle<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(path: string, schema: S | string | unknown, options: O, callback: SchemaCallback<S>): Promise<S>;
/**
* Bundles all referenced files/URLs into a single schema that only has internal `$ref` pointers. This lets you split-up your schema however you want while you're building it, but easily combine all those files together when it's time to package or distribute the schema to other people. The resulting schema size will be small, since it will still contain internal JSON references rather than being fully-dereferenced.
*
* This also eliminates the risk of circular references, so the schema can be safely serialized using `JSON.stringify()`.
*
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#bundleschema-options-callback
*
* @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
* @param options (optional)
* @param callback (optional) A callback that will receive the bundled schema object
*/
bundle(schema: S | string | unknown): Promise<S>;
bundle(schema: S | string | unknown, callback: SchemaCallback<S>): Promise<void>;
bundle(schema: S | string | unknown, options: O): Promise<S>;
bundle(schema: S | string | unknown, options: O, callback: SchemaCallback<S>): Promise<void>;
bundle(path: string, schema: S | string | unknown, options: O): Promise<S>;
bundle(path: string, schema: S | string | unknown, options: O, callback: SchemaCallback<S>): Promise<void>;
/**
* Dereferences all `$ref` pointers in the JSON Schema, replacing each reference with its resolved value. This results in a schema object that does not contain any `$ref` pointers. Instead, it's a normal JavaScript object tree that can easily be crawled and used just like any other JavaScript object. This is great for programmatic usage, especially when using tools that don't understand JSON references.
*
* The dereference method maintains object reference equality, meaning that all `$ref` pointers that point to the same object will be replaced with references to the same object. Again, this is great for programmatic usage, but it does introduce the risk of circular references, so be careful if you intend to serialize the schema using `JSON.stringify()`. Consider using the bundle method instead, which does not create circular references.
*
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#dereferenceschema-options-callback
*
* @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
* @param options (optional)
* @param callback (optional) A callback that will receive the dereferenced schema object
*/
static dereference<S extends object = JSONSchema>(schema: S | string | unknown): Promise<S>;
static dereference<S extends object = JSONSchema>(schema: S | string | unknown, callback: SchemaCallback<S>): Promise<void>;
static dereference<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(schema: S | string | unknown, options: O): Promise<S>;
static dereference<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(schema: S | string | unknown, options: O, callback: SchemaCallback<S>): Promise<void>;
static dereference<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(path: string, schema: S | string | unknown, options: O): Promise<S>;
static dereference<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(path: string, schema: S | string | unknown, options: O, callback: SchemaCallback<S>): Promise<void>;
/**
* Dereferences all `$ref` pointers in the JSON Schema, replacing each reference with its resolved value. This results in a schema object that does not contain any `$ref` pointers. Instead, it's a normal JavaScript object tree that can easily be crawled and used just like any other JavaScript object. This is great for programmatic usage, especially when using tools that don't understand JSON references.
*
* The dereference method maintains object reference equality, meaning that all `$ref` pointers that point to the same object will be replaced with references to the same object. Again, this is great for programmatic usage, but it does introduce the risk of circular references, so be careful if you intend to serialize the schema using `JSON.stringify()`. Consider using the bundle method instead, which does not create circular references.
*
* See https://apitools.dev/json-schema-ref-parser/docs/ref-parser.html#dereferenceschema-options-callback
*
* @param path
* @param schema A JSON Schema object, or the file path or URL of a JSON Schema file. See the `parse` method for more info.
* @param options (optional)
* @param callback (optional) A callback that will receive the dereferenced schema object
*/
dereference(path: string, schema: S | string | unknown, options: O, callback: SchemaCallback<S>): Promise<void>;
dereference(schema: S | string | unknown, options: O, callback: SchemaCallback<S>): Promise<void>;
dereference(schema: S | string | unknown, callback: SchemaCallback<S>): Promise<void>;
dereference(path: string, schema: S | string | unknown, options: O): Promise<S>;
dereference(schema: S | string | unknown, options: O): Promise<S>;
dereference(schema: S | string | unknown): Promise<S>;
}
export default $RefParser;
export declare const parse: typeof $RefParser.parse;
export declare const resolve: typeof $RefParser.resolve;
export declare const bundle: typeof $RefParser.bundle;
export declare const dereference: typeof $RefParser.dereference;
export { UnmatchedResolverError, JSONParserError, JSONSchema, InvalidPointerError, MissingPointerError, ResolverError, ParserError, UnmatchedParserError, ParserOptions, $RefsCallback, isHandledError, JSONParserErrorGroup, SchemaCallback, FileInfo, Plugin, ResolverOptions, HTTPResolverOptions, _dereference as dereferenceInternal, normalizeArgs as jsonSchemaParserNormalizeArgs, getJsonSchemaRefParserDefaultOptions, };

View File

@@ -1,216 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getJsonSchemaRefParserDefaultOptions = exports.jsonSchemaParserNormalizeArgs = exports.dereferenceInternal = exports.JSONParserErrorGroup = exports.isHandledError = exports.UnmatchedParserError = exports.ParserError = exports.ResolverError = exports.MissingPointerError = exports.InvalidPointerError = exports.JSONParserError = exports.UnmatchedResolverError = exports.dereference = exports.bundle = exports.resolve = exports.parse = exports.$RefParser = void 0;
const refs_js_1 = __importDefault(require("./refs.js"));
const parse_js_1 = __importDefault(require("./parse.js"));
const normalize_args_js_1 = __importDefault(require("./normalize-args.js"));
exports.jsonSchemaParserNormalizeArgs = normalize_args_js_1.default;
const resolve_external_js_1 = __importDefault(require("./resolve-external.js"));
const bundle_js_1 = __importDefault(require("./bundle.js"));
const dereference_js_1 = __importDefault(require("./dereference.js"));
exports.dereferenceInternal = dereference_js_1.default;
const url = __importStar(require("./util/url.js"));
const errors_js_1 = require("./util/errors.js");
Object.defineProperty(exports, "JSONParserError", { enumerable: true, get: function () { return errors_js_1.JSONParserError; } });
Object.defineProperty(exports, "InvalidPointerError", { enumerable: true, get: function () { return errors_js_1.InvalidPointerError; } });
Object.defineProperty(exports, "MissingPointerError", { enumerable: true, get: function () { return errors_js_1.MissingPointerError; } });
Object.defineProperty(exports, "ResolverError", { enumerable: true, get: function () { return errors_js_1.ResolverError; } });
Object.defineProperty(exports, "ParserError", { enumerable: true, get: function () { return errors_js_1.ParserError; } });
Object.defineProperty(exports, "UnmatchedParserError", { enumerable: true, get: function () { return errors_js_1.UnmatchedParserError; } });
Object.defineProperty(exports, "UnmatchedResolverError", { enumerable: true, get: function () { return errors_js_1.UnmatchedResolverError; } });
Object.defineProperty(exports, "isHandledError", { enumerable: true, get: function () { return errors_js_1.isHandledError; } });
Object.defineProperty(exports, "JSONParserErrorGroup", { enumerable: true, get: function () { return errors_js_1.JSONParserErrorGroup; } });
const ono_1 = require("@jsdevtools/ono");
const maybe_js_1 = __importDefault(require("./util/maybe.js"));
const options_js_1 = require("./options.js");
Object.defineProperty(exports, "getJsonSchemaRefParserDefaultOptions", { enumerable: true, get: function () { return options_js_1.getJsonSchemaRefParserDefaultOptions; } });
/**
* This class parses a JSON schema, builds a map of its JSON references and their resolved values,
* and provides methods for traversing, manipulating, and dereferencing those references.
*
* @class
*/
class $RefParser {
constructor() {
/**
* The parsed (and possibly dereferenced) JSON schema object
*
* @type {object}
* @readonly
*/
this.schema = null;
/**
* The resolved JSON references
*
* @type {$Refs}
* @readonly
*/
this.$refs = new refs_js_1.default();
}
async parse() {
const args = (0, normalize_args_js_1.default)(arguments);
let promise;
if (!args.path && !args.schema) {
const err = (0, ono_1.ono)(`Expected a file path, URL, or object. Got ${args.path || args.schema}`);
return (0, maybe_js_1.default)(args.callback, Promise.reject(err));
}
// Reset everything
this.schema = null;
this.$refs = new refs_js_1.default();
// If the path is a filesystem path, then convert it to a URL.
// NOTE: According to the JSON Reference spec, these should already be URLs,
// but, in practice, many people use local filesystem paths instead.
// So we're being generous here and doing the conversion automatically.
// This is not intended to be a 100% bulletproof solution.
// If it doesn't work for your use-case, then use a URL instead.
let pathType = "http";
if (url.isFileSystemPath(args.path)) {
args.path = url.fromFileSystemPath(args.path);
pathType = "file";
}
else if (!args.path && args.schema && "$id" in args.schema && args.schema.$id) {
// when schema id has defined an URL should use that hostname to request the references,
// instead of using the current page URL
const params = url.parse(args.schema.$id);
const port = params.protocol === "https:" ? 443 : 80;
args.path = `${params.protocol}//${params.hostname}:${port}`;
}
// Resolve the absolute path of the schema
args.path = url.resolve(url.cwd(), args.path);
if (args.schema && typeof args.schema === "object") {
// A schema object was passed-in.
// So immediately add a new $Ref with the schema object as its value
const $ref = this.$refs._add(args.path);
$ref.value = args.schema;
$ref.pathType = pathType;
promise = Promise.resolve(args.schema);
}
else {
// Parse the schema file/url
promise = (0, parse_js_1.default)(args.path, this.$refs, args.options);
}
try {
const result = await promise;
if (result !== null && typeof result === "object" && !Buffer.isBuffer(result)) {
this.schema = result;
return (0, maybe_js_1.default)(args.callback, Promise.resolve(this.schema));
}
else if (args.options.continueOnError) {
this.schema = null; // it's already set to null at line 79, but let's set it again for the sake of readability
return (0, maybe_js_1.default)(args.callback, Promise.resolve(this.schema));
}
else {
throw ono_1.ono.syntax(`"${this.$refs._root$Ref.path || result}" is not a valid JSON Schema`);
}
}
catch (err) {
if (!args.options.continueOnError || !(0, errors_js_1.isHandledError)(err)) {
return (0, maybe_js_1.default)(args.callback, Promise.reject(err));
}
if (this.$refs._$refs[url.stripHash(args.path)]) {
this.$refs._$refs[url.stripHash(args.path)].addError(err);
}
return (0, maybe_js_1.default)(args.callback, Promise.resolve(null));
}
}
static parse() {
const parser = new $RefParser();
return parser.parse.apply(parser, arguments);
}
async resolve() {
const args = (0, normalize_args_js_1.default)(arguments);
try {
await this.parse(args.path, args.schema, args.options);
await (0, resolve_external_js_1.default)(this, args.options);
finalize(this);
return (0, maybe_js_1.default)(args.callback, Promise.resolve(this.$refs));
}
catch (err) {
return (0, maybe_js_1.default)(args.callback, Promise.reject(err));
}
}
static resolve() {
const instance = new $RefParser();
return instance.resolve.apply(instance, arguments);
}
static bundle() {
const instance = new $RefParser();
return instance.bundle.apply(instance, arguments);
}
async bundle() {
const args = (0, normalize_args_js_1.default)(arguments);
try {
await this.resolve(args.path, args.schema, args.options);
(0, bundle_js_1.default)(this, args.options);
finalize(this);
return (0, maybe_js_1.default)(args.callback, Promise.resolve(this.schema));
}
catch (err) {
return (0, maybe_js_1.default)(args.callback, Promise.reject(err));
}
}
static dereference() {
const instance = new $RefParser();
return instance.dereference.apply(instance, arguments);
}
async dereference() {
const args = (0, normalize_args_js_1.default)(arguments);
try {
await this.resolve(args.path, args.schema, args.options);
(0, dereference_js_1.default)(this, args.options);
finalize(this);
return (0, maybe_js_1.default)(args.callback, Promise.resolve(this.schema));
}
catch (err) {
return (0, maybe_js_1.default)(args.callback, Promise.reject(err));
}
}
}
exports.$RefParser = $RefParser;
exports.default = $RefParser;
function finalize(parser) {
const errors = errors_js_1.JSONParserErrorGroup.getParserErrors(parser);
if (errors.length > 0) {
throw new errors_js_1.JSONParserErrorGroup(parser);
}
}
exports.parse = $RefParser.parse;
exports.resolve = $RefParser.resolve;
exports.bundle = $RefParser.bundle;
exports.dereference = $RefParser.dereference;

View File

@@ -1,13 +0,0 @@
import type { Options, ParserOptions } from "./options.js";
import type { JSONSchema, SchemaCallback } from "./types";
export interface NormalizedArguments<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>> {
path: string;
schema: S;
options: O & Options<S>;
callback: SchemaCallback<S>;
}
/**
* Normalizes the given arguments, accounting for optional args.
*/
export declare function normalizeArgs<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(_args: Partial<IArguments>): NormalizedArguments<S, O>;
export default normalizeArgs;

View File

@@ -1,55 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.normalizeArgs = normalizeArgs;
const options_js_1 = require("./options.js");
/**
* Normalizes the given arguments, accounting for optional args.
*/
function normalizeArgs(_args) {
let path;
let schema;
let options;
let callback;
const args = Array.prototype.slice.call(_args);
if (typeof args[args.length - 1] === "function") {
// The last parameter is a callback function
callback = args.pop();
}
if (typeof args[0] === "string") {
// The first parameter is the path
path = args[0];
if (typeof args[2] === "object") {
// The second parameter is the schema, and the third parameter is the options
schema = args[1];
options = args[2];
}
else {
// The second parameter is the options
schema = undefined;
options = args[1];
}
}
else {
// The first parameter is the schema
path = "";
schema = args[0];
options = args[1];
}
try {
options = (0, options_js_1.getNewOptions)(options);
}
catch (e) {
console.error(`JSON Schema Ref Parser: Error normalizing options: ${e}`);
}
if (!options.mutateInputSchema && typeof schema === "object") {
// Make a deep clone of the schema, so that we don't alter the original object
schema = JSON.parse(JSON.stringify(schema));
}
return {
path,
schema,
options,
callback,
};
}
exports.default = normalizeArgs;

View File

@@ -1,404 +0,0 @@
import type { HTTPResolverOptions, JSONSchema, JSONSchemaObject, Plugin, ResolverOptions } from "./types/index.js";
export type DeepPartial<T> = T extends object ? {
[P in keyof T]?: DeepPartial<T[P]>;
} : T;
export interface DereferenceOptions {
/**
* Determines whether circular `$ref` pointers are handled.
*
* If set to `false`, then a `ReferenceError` will be thrown if the schema contains any circular references.
*
* If set to `"ignore"`, then circular references will simply be ignored. No error will be thrown, but the `$Refs.circular` property will still be set to `true`.
*/
circular?: boolean | "ignore";
/**
* A function, called for each path, which can return true to stop this path and all
* subpaths from being dereferenced further. This is useful in schemas where some
* subpaths contain literal $ref keys that should not be dereferenced.
*/
excludedPathMatcher?(path: string): boolean;
/**
* Callback invoked during circular reference detection.
*
* @argument {string} path - The path that is circular (ie. the `$ref` string)
*/
onCircular?(path: string): void;
/**
* Callback invoked during dereferencing.
*
* @argument {string} path - The path being dereferenced (ie. the `$ref` string)
* @argument {JSONSchemaObject} value - The JSON-Schema that the `$ref` resolved to
* @argument {JSONSchemaObject} parent - The parent of the dereferenced object
* @argument {string} parentPropName - The prop name of the parent object whose value was dereferenced
*/
onDereference?(path: string, value: JSONSchemaObject, parent?: JSONSchemaObject, parentPropName?: string): void;
/**
* An array of properties to preserve when dereferencing a `$ref` schema. Useful if you want to
* enforce non-standard dereferencing behavior like present in the OpenAPI 3.1 specification where
* `description` and `summary` properties are preserved when alongside a `$ref` pointer.
*
* If none supplied then no properties will be preserved and the object will be fully replaced
* with the dereferenced `$ref`.
*/
preservedProperties?: string[];
/**
* Whether a reference should resolve relative to its directory/path, or from the cwd
*
* Default: `relative`
*/
externalReferenceResolution?: "relative" | "root";
}
/**
* Options that determine how JSON schemas are parsed, resolved, and dereferenced.
*
* @param [options] - Overridden options
* @class
*/
export interface $RefParserOptions<S extends object = JSONSchema> {
/**
* The `parse` options determine how different types of files will be parsed.
*
* JSON Schema `$Ref` Parser comes with built-in JSON, YAML, plain-text, and binary parsers, any of which you can configure or disable. You can also add your own custom parsers if you want.
*/
parse: {
json?: Plugin | boolean;
yaml?: Plugin | boolean;
binary?: Plugin | boolean;
text?: Plugin | boolean;
[key: string]: Plugin | boolean | undefined;
};
/**
* The `resolve` options control how JSON Schema $Ref Parser will resolve file paths and URLs, and how those files will be read/downloaded.
*
* JSON Schema `$Ref` Parser comes with built-in support for HTTP and HTTPS, as well as support for local files (when running in Node.js). You can configure or disable either of these built-in resolvers. You can also add your own custom resolvers if you want.
*/
resolve: {
/**
* Determines whether external $ref pointers will be resolved. If this option is disabled, then external `$ref` pointers will simply be ignored.
*/
external?: boolean;
file?: Partial<ResolverOptions<S>> | boolean;
http?: HTTPResolverOptions<S> | boolean;
} & {
[key: string]: Partial<ResolverOptions<S>> | HTTPResolverOptions<S> | boolean | undefined;
};
/**
* By default, JSON Schema $Ref Parser throws the first error it encounters. Setting `continueOnError` to `true`
* causes it to keep processing as much as possible and then throw a single error that contains all errors
* that were encountered.
*/
continueOnError: boolean;
/**
* The `dereference` options control how JSON Schema `$Ref` Parser will dereference `$ref` pointers within the JSON schema.
*/
dereference: DereferenceOptions;
/**
* Whether to clone the schema before dereferencing it.
* This is useful when you want to dereference the same schema multiple times, but you don't want to modify the original schema.
* Default: `true` due to mutating the input being the default behavior historically
*/
mutateInputSchema?: boolean;
/**
* The maximum amount of time (in milliseconds) that JSON Schema $Ref Parser will spend dereferencing a single schema.
* It will throw a timeout error if the operation takes longer than this.
*/
timeoutMs?: number;
}
export declare const getJsonSchemaRefParserDefaultOptions: () => $RefParserOptions<JSONSchema>;
export declare const getNewOptions: <S extends object = JSONSchema, O extends ParserOptions<S> = {
parse?: {
[x: string]: boolean | {
name?: string | undefined;
order?: number | undefined;
allowEmpty?: boolean | undefined;
allowBOM?: boolean | undefined;
encoding?: BufferEncoding | undefined;
canParse?: string | boolean | {
exec?: {} | undefined;
test?: {} | undefined;
readonly source?: string | undefined;
readonly global?: boolean | undefined;
readonly ignoreCase?: boolean | undefined;
readonly multiline?: boolean | undefined;
lastIndex?: number | undefined;
compile?: {} | undefined;
readonly flags?: string | undefined;
readonly sticky?: boolean | undefined;
readonly unicode?: boolean | undefined;
readonly dotAll?: boolean | undefined;
readonly hasIndices?: boolean | undefined;
readonly unicodeSets?: boolean | undefined;
[Symbol.match]?: {} | undefined;
[Symbol.replace]?: {} | undefined;
[Symbol.search]?: {} | undefined;
[Symbol.split]?: {} | undefined;
[Symbol.matchAll]?: {} | undefined;
} | (string | undefined)[] | {} | undefined;
parse?: string | number | {} | undefined;
} | undefined;
json?: boolean | {
name?: string | undefined;
order?: number | undefined;
allowEmpty?: boolean | undefined;
allowBOM?: boolean | undefined;
encoding?: BufferEncoding | undefined;
canParse?: string | boolean | {
exec?: {} | undefined;
test?: {} | undefined;
readonly source?: string | undefined;
readonly global?: boolean | undefined;
readonly ignoreCase?: boolean | undefined;
readonly multiline?: boolean | undefined;
lastIndex?: number | undefined;
compile?: {} | undefined;
readonly flags?: string | undefined;
readonly sticky?: boolean | undefined;
readonly unicode?: boolean | undefined;
readonly dotAll?: boolean | undefined;
readonly hasIndices?: boolean | undefined;
readonly unicodeSets?: boolean | undefined;
[Symbol.match]?: {} | undefined;
[Symbol.replace]?: {} | undefined;
[Symbol.search]?: {} | undefined;
[Symbol.split]?: {} | undefined;
[Symbol.matchAll]?: {} | undefined;
} | (string | undefined)[] | {} | undefined;
parse?: string | number | {} | undefined;
} | undefined;
yaml?: boolean | {
name?: string | undefined;
order?: number | undefined;
allowEmpty?: boolean | undefined;
allowBOM?: boolean | undefined;
encoding?: BufferEncoding | undefined;
canParse?: string | boolean | {
exec?: {} | undefined;
test?: {} | undefined;
readonly source?: string | undefined;
readonly global?: boolean | undefined;
readonly ignoreCase?: boolean | undefined;
readonly multiline?: boolean | undefined;
lastIndex?: number | undefined;
compile?: {} | undefined;
readonly flags?: string | undefined;
readonly sticky?: boolean | undefined;
readonly unicode?: boolean | undefined;
readonly dotAll?: boolean | undefined;
readonly hasIndices?: boolean | undefined;
readonly unicodeSets?: boolean | undefined;
[Symbol.match]?: {} | undefined;
[Symbol.replace]?: {} | undefined;
[Symbol.search]?: {} | undefined;
[Symbol.split]?: {} | undefined;
[Symbol.matchAll]?: {} | undefined;
} | (string | undefined)[] | {} | undefined;
parse?: string | number | {} | undefined;
} | undefined;
binary?: boolean | {
name?: string | undefined;
order?: number | undefined;
allowEmpty?: boolean | undefined;
allowBOM?: boolean | undefined;
encoding?: BufferEncoding | undefined;
canParse?: string | boolean | {
exec?: {} | undefined;
test?: {} | undefined;
readonly source?: string | undefined;
readonly global?: boolean | undefined;
readonly ignoreCase?: boolean | undefined;
readonly multiline?: boolean | undefined;
lastIndex?: number | undefined;
compile?: {} | undefined;
readonly flags?: string | undefined;
readonly sticky?: boolean | undefined;
readonly unicode?: boolean | undefined;
readonly dotAll?: boolean | undefined;
readonly hasIndices?: boolean | undefined;
readonly unicodeSets?: boolean | undefined;
[Symbol.match]?: {} | undefined;
[Symbol.replace]?: {} | undefined;
[Symbol.search]?: {} | undefined;
[Symbol.split]?: {} | undefined;
[Symbol.matchAll]?: {} | undefined;
} | (string | undefined)[] | {} | undefined;
parse?: string | number | {} | undefined;
} | undefined;
text?: boolean | {
name?: string | undefined;
order?: number | undefined;
allowEmpty?: boolean | undefined;
allowBOM?: boolean | undefined;
encoding?: BufferEncoding | undefined;
canParse?: string | boolean | {
exec?: {} | undefined;
test?: {} | undefined;
readonly source?: string | undefined;
readonly global?: boolean | undefined;
readonly ignoreCase?: boolean | undefined;
readonly multiline?: boolean | undefined;
lastIndex?: number | undefined;
compile?: {} | undefined;
readonly flags?: string | undefined;
readonly sticky?: boolean | undefined;
readonly unicode?: boolean | undefined;
readonly dotAll?: boolean | undefined;
readonly hasIndices?: boolean | undefined;
readonly unicodeSets?: boolean | undefined;
[Symbol.match]?: {} | undefined;
[Symbol.replace]?: {} | undefined;
[Symbol.search]?: {} | undefined;
[Symbol.split]?: {} | undefined;
[Symbol.matchAll]?: {} | undefined;
} | (string | undefined)[] | {} | undefined;
parse?: string | number | {} | undefined;
} | undefined;
} | undefined;
resolve?: {
[x: string]: boolean | {
name?: string | undefined;
order?: number | undefined;
canRead?: string | boolean | {
exec?: {} | undefined;
test?: {} | undefined;
readonly source?: string | undefined;
readonly global?: boolean | undefined;
readonly ignoreCase?: boolean | undefined;
readonly multiline?: boolean | undefined;
lastIndex?: number | undefined;
compile?: {} | undefined;
readonly flags?: string | undefined;
readonly sticky?: boolean | undefined;
readonly unicode?: boolean | undefined;
readonly dotAll?: boolean | undefined;
readonly hasIndices?: boolean | undefined;
readonly unicodeSets?: boolean | undefined;
[Symbol.match]?: {} | undefined;
[Symbol.replace]?: {} | undefined;
[Symbol.search]?: {} | undefined;
[Symbol.split]?: {} | undefined;
[Symbol.matchAll]?: {} | undefined;
} | (string | undefined)[] | {} | undefined;
read?: string | object | {} | undefined;
} | {
headers?: ([(string | undefined)?, (string | undefined)?] | undefined)[] | {
[x: string]: string | undefined;
} | {
append?: {} | undefined;
delete?: {} | undefined;
get?: {} | undefined;
getSetCookie?: {} | undefined;
has?: {} | undefined;
set?: {} | undefined;
forEach?: {} | undefined;
} | null | undefined;
timeout?: number | undefined;
redirects?: number | undefined;
withCredentials?: boolean | undefined;
name?: string | undefined;
order?: number | undefined;
canRead?: string | boolean | {
exec?: {} | undefined;
test?: {} | undefined;
readonly source?: string | undefined;
readonly global?: boolean | undefined;
readonly ignoreCase?: boolean | undefined;
readonly multiline?: boolean | undefined;
lastIndex?: number | undefined;
compile?: {} | undefined;
readonly flags?: string | undefined;
readonly sticky?: boolean | undefined;
readonly unicode?: boolean | undefined;
readonly dotAll?: boolean | undefined;
readonly hasIndices?: boolean | undefined;
readonly unicodeSets?: boolean | undefined;
[Symbol.match]?: {} | undefined;
[Symbol.replace]?: {} | undefined;
[Symbol.search]?: {} | undefined;
[Symbol.split]?: {} | undefined;
[Symbol.matchAll]?: {} | undefined;
} | (string | undefined)[] | {} | undefined;
read?: string | object | {} | undefined;
} | undefined;
external?: boolean | undefined;
file?: boolean | {
name?: string | undefined;
order?: number | undefined;
canRead?: string | boolean | {
exec?: {} | undefined;
test?: {} | undefined;
readonly source?: string | undefined;
readonly global?: boolean | undefined;
readonly ignoreCase?: boolean | undefined;
readonly multiline?: boolean | undefined;
lastIndex?: number | undefined;
compile?: {} | undefined;
readonly flags?: string | undefined;
readonly sticky?: boolean | undefined;
readonly unicode?: boolean | undefined;
readonly dotAll?: boolean | undefined;
readonly hasIndices?: boolean | undefined;
readonly unicodeSets?: boolean | undefined;
[Symbol.match]?: {} | undefined;
[Symbol.replace]?: {} | undefined;
[Symbol.search]?: {} | undefined;
[Symbol.split]?: {} | undefined;
[Symbol.matchAll]?: {} | undefined;
} | (string | undefined)[] | {} | undefined;
read?: string | object | {} | undefined;
} | undefined;
http?: boolean | {
headers?: ([(string | undefined)?, (string | undefined)?] | undefined)[] | {
[x: string]: string | undefined;
} | {
append?: {} | undefined;
delete?: {} | undefined;
get?: {} | undefined;
getSetCookie?: {} | undefined;
has?: {} | undefined;
set?: {} | undefined;
forEach?: {} | undefined;
} | null | undefined;
timeout?: number | undefined;
redirects?: number | undefined;
withCredentials?: boolean | undefined;
name?: string | undefined;
order?: number | undefined;
canRead?: string | boolean | {
exec?: {} | undefined;
test?: {} | undefined;
readonly source?: string | undefined;
readonly global?: boolean | undefined;
readonly ignoreCase?: boolean | undefined;
readonly multiline?: boolean | undefined;
lastIndex?: number | undefined;
compile?: {} | undefined;
readonly flags?: string | undefined;
readonly sticky?: boolean | undefined;
readonly unicode?: boolean | undefined;
readonly dotAll?: boolean | undefined;
readonly hasIndices?: boolean | undefined;
readonly unicodeSets?: boolean | undefined;
[Symbol.match]?: {} | undefined;
[Symbol.replace]?: {} | undefined;
[Symbol.search]?: {} | undefined;
[Symbol.split]?: {} | undefined;
[Symbol.matchAll]?: {} | undefined;
} | (string | undefined)[] | {} | undefined;
read?: string | object | {} | undefined;
} | undefined;
} | undefined;
continueOnError?: boolean | undefined;
dereference?: {
circular?: boolean | "ignore" | undefined;
excludedPathMatcher?: {} | undefined;
onCircular?: {} | undefined;
onDereference?: {} | undefined;
preservedProperties?: (string | undefined)[] | undefined;
externalReferenceResolution?: "relative" | "root" | undefined;
} | undefined;
mutateInputSchema?: boolean | undefined;
timeoutMs?: number | undefined;
}>(options: O | undefined) => O & $RefParserOptions<S>;
export type Options<S extends object = JSONSchema> = $RefParserOptions<S>;
export type ParserOptions<S extends object = JSONSchema> = DeepPartial<$RefParserOptions<S>>;
export default $RefParserOptions;

View File

@@ -1,122 +0,0 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getNewOptions = exports.getJsonSchemaRefParserDefaultOptions = void 0;
const json_js_1 = __importDefault(require("./parsers/json.js"));
const yaml_js_1 = __importDefault(require("./parsers/yaml.js"));
const text_js_1 = __importDefault(require("./parsers/text.js"));
const binary_js_1 = __importDefault(require("./parsers/binary.js"));
const file_js_1 = __importDefault(require("./resolvers/file.js"));
const http_js_1 = __importDefault(require("./resolvers/http.js"));
const getJsonSchemaRefParserDefaultOptions = () => {
const defaults = {
/**
* Determines how different types of files will be parsed.
*
* You can add additional parsers of your own, replace an existing one with
* your own implementation, or disable any parser by setting it to false.
*/
parse: {
json: { ...json_js_1.default },
yaml: { ...yaml_js_1.default },
text: { ...text_js_1.default },
binary: { ...binary_js_1.default },
},
/**
* Determines how JSON References will be resolved.
*
* You can add additional resolvers of your own, replace an existing one with
* your own implementation, or disable any resolver by setting it to false.
*/
resolve: {
file: { ...file_js_1.default },
http: { ...http_js_1.default },
/**
* Determines whether external $ref pointers will be resolved.
* If this option is disabled, then none of above resolvers will be called.
* Instead, external $ref pointers will simply be ignored.
*
* @type {boolean}
*/
external: true,
},
/**
* By default, JSON Schema $Ref Parser throws the first error it encounters. Setting `continueOnError` to `true`
* causes it to keep processing as much as possible and then throw a single error that contains all errors
* that were encountered.
*/
continueOnError: false,
/**
* Determines the types of JSON references that are allowed.
*/
dereference: {
/**
* Dereference circular (recursive) JSON references?
* If false, then a {@link ReferenceError} will be thrown if a circular reference is found.
* If "ignore", then circular references will not be dereferenced.
*
* @type {boolean|string}
*/
circular: true,
/**
* A function, called for each path, which can return true to stop this path and all
* subpaths from being dereferenced further. This is useful in schemas where some
* subpaths contain literal $ref keys that should not be dereferenced.
*
* @type {function}
*/
excludedPathMatcher: () => false,
referenceResolution: "relative",
},
mutateInputSchema: true,
};
return defaults;
};
exports.getJsonSchemaRefParserDefaultOptions = getJsonSchemaRefParserDefaultOptions;
const getNewOptions = (options) => {
const newOptions = (0, exports.getJsonSchemaRefParserDefaultOptions)();
if (options) {
merge(newOptions, options);
}
return newOptions;
};
exports.getNewOptions = getNewOptions;
/**
* Merges the properties of the source object into the target object.
*
* @param target - The object that we're populating
* @param source - The options that are being merged
* @returns
*/
function merge(target, source) {
if (isMergeable(source)) {
// prevent prototype pollution
const keys = Object.keys(source).filter((key) => !["__proto__", "constructor", "prototype"].includes(key));
for (let i = 0; i < keys.length; i++) {
const key = keys[i];
const sourceSetting = source[key];
const targetSetting = target[key];
if (isMergeable(sourceSetting)) {
// It's a nested object, so merge it recursively
target[key] = merge(targetSetting || {}, sourceSetting);
}
else if (sourceSetting !== undefined) {
// It's a scalar value, function, or array. No merging necessary. Just overwrite the target value.
target[key] = sourceSetting;
}
}
}
return target;
}
/**
* Determines whether the given value can be merged,
* or if it is a scalar value that should just override the target value.
*
* @param val
* @returns
*/
function isMergeable(val) {
return val && typeof val === "object" && !Array.isArray(val) && !(val instanceof RegExp) && !(val instanceof Date);
}

View File

@@ -1,8 +0,0 @@
import type $Refs from "./refs.js";
import type { ParserOptions } from "./options.js";
import type { JSONSchema } from "./types/index.js";
/**
* Reads and parses the specified file path or URL.
*/
declare function parse<S extends object = JSONSchema, O extends ParserOptions<S> = ParserOptions<S>>(path: string, $refs: $Refs<S, O>, options: O): Promise<string | Buffer<ArrayBufferLike> | S | undefined>;
export default parse;

View File

@@ -1,179 +0,0 @@
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || (function () {
var ownKeys = function(o) {
ownKeys = Object.getOwnPropertyNames || function (o) {
var ar = [];
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
return ar;
};
return ownKeys(o);
};
return function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
__setModuleDefault(result, mod);
return result;
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
const ono_1 = require("@jsdevtools/ono");
const url = __importStar(require("./util/url.js"));
const plugins = __importStar(require("./util/plugins.js"));
const errors_js_1 = require("./util/errors.js");
/**
* Reads and parses the specified file path or URL.
*/
async function parse(path, $refs, options) {
// Remove the URL fragment, if any
const hashIndex = path.indexOf("#");
let hash = "";
if (hashIndex >= 0) {
hash = path.substring(hashIndex);
// Remove the URL fragment, if any
path = path.substring(0, hashIndex);
}
// Add a new $Ref for this file, even though we don't have the value yet.
// This ensures that we don't simultaneously read & parse the same file multiple times
const $ref = $refs._add(path);
// This "file object" will be passed to all resolvers and parsers.
const file = {
url: path,
hash,
extension: url.getExtension(path),
};
// Read the file and then parse the data
try {
const resolver = await readFile(file, options, $refs);
$ref.pathType = resolver.plugin.name;
file.data = resolver.result;
const parser = await parseFile(file, options, $refs);
$ref.value = parser.result;
return parser.result;
}
catch (err) {
if ((0, errors_js_1.isHandledError)(err)) {
$ref.value = err;
}
throw err;
}
}
/**
* Reads the given file, using the configured resolver plugins
*
* @param file - An object containing information about the referenced file
* @param file.url - The full URL of the referenced file
* @param file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.)
* @param options
* @param $refs
* @returns
* The promise resolves with the raw file contents and the resolver that was used.
*/
async function readFile(file, options, $refs) {
// console.log('Reading %s', file.url);
// Find the resolvers that can read this file
let resolvers = plugins.all(options.resolve);
resolvers = plugins.filter(resolvers, "canRead", file);
// Run the resolvers, in order, until one of them succeeds
plugins.sort(resolvers);
try {
const data = await plugins.run(resolvers, "read", file, $refs);
return data;
}
catch (err) {
if (!err && options.continueOnError) {
// No resolver could be matched
throw new errors_js_1.UnmatchedResolverError(file.url);
}
else if (!err || !("error" in err)) {
// Throw a generic, friendly error.
throw ono_1.ono.syntax(`Unable to resolve $ref pointer "${file.url}"`);
}
// Throw the original error, if it's one of our own (user-friendly) errors.
else if (err.error instanceof errors_js_1.ResolverError) {
throw err.error;
}
else {
throw new errors_js_1.ResolverError(err, file.url);
}
}
}
/**
* Parses the given file's contents, using the configured parser plugins.
*
* @param file - An object containing information about the referenced file
* @param file.url - The full URL of the referenced file
* @param file.extension - The lowercased file extension (e.g. ".txt", ".html", etc.)
* @param file.data - The file contents. This will be whatever data type was returned by the resolver
* @param options
* @param $refs
*
* @returns
* The promise resolves with the parsed file contents and the parser that was used.
*/
async function parseFile(file, options, $refs) {
// Find the parsers that can read this file type.
// If none of the parsers are an exact match for this file, then we'll try ALL of them.
// This handles situations where the file IS a supported type, just with an unknown extension.
const allParsers = plugins.all(options.parse);
const filteredParsers = plugins.filter(allParsers, "canParse", file);
const parsers = filteredParsers.length > 0 ? filteredParsers : allParsers;
// Run the parsers, in order, until one of them succeeds
plugins.sort(parsers);
try {
const parser = await plugins.run(parsers, "parse", file, $refs);
if (!parser.plugin.allowEmpty && isEmpty(parser.result)) {
throw ono_1.ono.syntax(`Error parsing "${file.url}" as ${parser.plugin.name}. \nParsed value is empty`);
}
else {
return parser;
}
}
catch (err) {
if (!err && options.continueOnError) {
// No resolver could be matched
throw new errors_js_1.UnmatchedParserError(file.url);
}
else if (err && err.message && err.message.startsWith("Error parsing")) {
throw err;
}
else if (!err || !("error" in err)) {
throw ono_1.ono.syntax(`Unable to parse ${file.url}`);
}
else if (err.error instanceof errors_js_1.ParserError) {
throw err.error;
}
else {
throw new errors_js_1.ParserError(err.error.message, file.url);
}
}
}
/**
* Determines whether the parsed value is "empty".
*
* @param value
* @returns
*/
function isEmpty(value) {
return (value === undefined ||
(typeof value === "object" && Object.keys(value).length === 0) ||
(typeof value === "string" && value.trim().length === 0) ||
(Buffer.isBuffer(value) && value.length === 0));
}
exports.default = parse;

View File

@@ -1,3 +0,0 @@
import type { Plugin } from "../types/index.js";
declare const _default: Plugin;
export default _default;

View File

@@ -1,35 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const BINARY_REGEXP = /\.(jpeg|jpg|gif|png|bmp|ico)$/i;
exports.default = {
/**
* The order that this parser will run, in relation to other parsers.
*/
order: 400,
/**
* Whether to allow "empty" files (zero bytes).
*/
allowEmpty: true,
/**
* Determines whether this parser can parse a given file reference.
* Parsers that return true will be tried, in order, until one successfully parses the file.
* Parsers that return false will be skipped, UNLESS all parsers returned false, in which case
* every parser will be tried.
*/
canParse(file) {
// Use this parser if the file is a Buffer, and has a known binary extension
return Buffer.isBuffer(file.data) && BINARY_REGEXP.test(file.url);
},
/**
* Parses the given data as a Buffer (byte array).
*/
parse(file) {
if (Buffer.isBuffer(file.data)) {
return file.data;
}
else {
// This will reject if data is anything other than a string or typed array
return Buffer.from(file.data);
}
},
};

View File

@@ -1,3 +0,0 @@
import type { Plugin } from "../types/index.js";
declare const _default: Plugin;
export default _default;

Some files were not shown because too many files have changed in this diff Show More