@vode-app/example-client (0.1.0-pre.36)

Published 2026-07-05 16:53:10 +02:00 by temir

Installation

@vode-app:registry=
npm install @vode-app/example-client@0.1.0-pre.36
"@vode-app/example-client": "0.1.0-pre.36"

About this package

Introduction

<INTRO TEXT>

Table of Contents

  1. Quick Start
  2. Documentation
  3. DevOps
    1. Change Management
    2. Registry
    3. CI/CD Workflows

Quick Start

<QUICK START INSTRUCTIONS>

Documentation

<DOCUMENTATION>

DevOps

npm install
npm update

npm run clean
npm run build
npm run tests
git fetch upstream
git fetch origin
git fetch . upstream/main:origin/main
git fetch . origin/main:main
git push origin main
git merge --ff-only main
git push

OCI

# placeholders:
    # <IMAGE_NAME: example-client
    # <IMAGE_TAG: <IMAGE_TAG>
    # <OCI_REGISTRY: git.chimps.quest/vode-app
    # <BASE_PATH: /basepath/
    # <SPA_PATH: spa

$env:VODE_APP_REGISTRY_AUTH_TOKEN = "<AUTH_TOKEN>"

docker pull node:lts-alpine
docker pull nginx:alpine
docker build --secret id=VODE_APP_REGISTRY_AUTH_TOKEN,env=VODE_APP_REGISTRY_AUTH_TOKEN -t example-client:build -f oci/Dockerfile .

# artifacts only
docker build --secret id=VODE_APP_REGISTRY_AUTH_TOKEN,env=VODE_APP_REGISTRY_AUTH_TOKEN -t example-client:build-artifacts -f oci/Dockerfile . --target artifacts --output artifacts/

# local docker run
docker tag example-client:build example-client:local
docker run --rm -it --name example-client `
    -p 3000:80 `
    -p 3001:443 `
    --env=BASE_PATH="/basepath/" `
    --env=SPA_PATH="spa" `
    example-client:local

$env:VODE_APP_REGISTRY_AUTH_TOKEN | docker login git.chimps.quest/vode-app -u "-" --password-stdin
docker tag example-client:build git.chimps.quest/vode-app/example-client:<IMAGE_TAG>
docker push git.chimps.quest/vode-app/example-client:<IMAGE_TAG>

nginx as a Static File Server

Location directives for serving the SPA and static files:

server {
    # ...

    # placeholder:
        # <VODE_APP_PATH: /examples/vode-app/example-client-static
        # <VODE_APP_SPA_PATH: spa
        # <DIST_PATH: /var/www/html/vode-app-example-client-static
    location /examples/vode-app/example-client-static/spa {
        root /var/www/html/vode-app-example-client-static;
        rewrite ^ /index.html break;
        gzip off;
        sub_filter '<base href="" />' '<base href="/examples/vode-app/example-client-static/" />';
        sub_filter_once on;
        add_header Cache-Control "no-store";
    }
    location /examples/vode-app/example-client-static {
        root /var/www/html/vode-app-example-client-static;
        rewrite ^/examples/vode-app/example-client-static/(.*)$ /$1 break;
        try_files $uri =404;
        add_header Cache-Control "no-store";
    }


    # placeholder:
        # <VODE_APP_PATH: /examples/vode-app/dev
        # <VODE_APP_SPA_PATH: spa
        # <DIST_PATH: /var/www/html/vode-app-dev
    location /examples/vode-app/dev/spa {
        root /var/www/html/vode-app-dev;
        rewrite ^ /index.html break;
        gzip off;
        sub_filter '<base href="" />' '<base href="/examples/vode-app/dev/" />';
        sub_filter_once on;
        add_header Cache-Control "no-store";
    }
    location /examples/vode-app/dev {
        root /var/www/html/vode-app-dev;
        rewrite ^/examples/vode-app/dev/(.*)$ /$1 break;
        try_files $uri =404;
        add_header Cache-Control "no-store";
    }

    # ...
}

Copy dist/ to the server:

# placeholder:
    # <DIST_PATH: <DIST_PATH>
    # <STATIC_FILES_SERVER: trs_dockerhost_hostman

ssh trs_dockerhost_hostman "rm -Rf /var/www/html/vode-app-example-client-static/*"
scp -rp dist/* trs_dockerhost_hostman:/var/www/html/vode-app-example-client-static
ssh trs_dockerhost_hostman "find /var/www/html/vode-app-example-client-static -type d -exec chmod 755 {} +"
ssh trs_dockerhost_hostman "find /var/www/html/vode-app-example-client-static -type f -exec chmod 644 {} +"

ssh trs_dockerhost_hostman "rm -Rf /var/www/html/vode-app-dev/*"
scp -rp dist/* trs_dockerhost_hostman:/var/www/html/vode-app-dev
# or
# scp dist/index.bundle.js trs_dockerhost_hostman:/var/www/html/vode-app-dev/index.bundle.js
ssh trs_dockerhost_hostman "find /var/www/html/vode-app-dev -type d -exec chmod 755 {} +"
ssh trs_dockerhost_hostman "find /var/www/html/vode-app-dev -type f -exec chmod 644 {} +"

ssh trs_dockerhost_hostman "rm -Rf /var/www/html/vode-app-ryupold/*"
scp -rp dist/* trs_dockerhost_hostman:/var/www/html/vode-app-ryupold
# or
# scp dist/index.bundle.js trs_dockerhost_hostman:/var/www/html/vode-app-ryupold/index.bundle.js
ssh trs_dockerhost_hostman "find /var/www/html/vode-app-ryupold -type d -exec chmod 755 {} +"
ssh trs_dockerhost_hostman "find /var/www/html/vode-app-ryupold -type f -exec chmod 644 {} +"

Change Management

  1. Create a new branch for the change.
  2. Make the changes and commit.
  3. Bump the version in package.json.
  4. Add an entry for the new version in CHANGELOG.md.
  5. Pull-request the branch.
  6. Ensure package artifacts are current.
  7. Publish.

Registry

.npmrc:

@vode-app:registry=https://git.chimps.quest/api/packages/vode-app/npm/
//git.chimps.quest/api/packages/vode-app/npm/:_authToken=${VODE_APP_REGISTRY_AUTH_TOKEN}

or bunfig.toml:

[install.scopes]
"vode-app" = { url = "https://git.chimps.quest/api/packages/vode-app/npm/", token = "$VODE_APP_REGISTRY_AUTH_TOKEN" }
# git.chimps.quest/api/packages/vode-app/npm/
export VODE_APP_REGISTRY_AUTH_TOKEN=<AUTH_TOKEN>
# or
$env:VODE_APP_REGISTRY_AUTH_TOKEN = "<AUTH_TOKEN>"
npm publish

CI/CD Workflows

Build and Publish

⚠️ .npmrc configuring the package registry and its authentication token is required for the workflow to work.

Parameter Type Description
RUNNER_LABEL Variable The label of the runner to use for the workflow.
ACCESS_TOKEN Secret The authentication token for the package registry.

.github/workflows/build-publish.yml:

name: Build and Publish

on:
  push:
    branches:
      - main

jobs:
  publish:
    runs-on: ${{ vars.RUNNER_LABEL }}
    steps:
      - uses: actions/checkout@v4

      - name: Install
        env:
          VODE_APP_REGISTRY_AUTH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
        run: npm ci

      - name: Build
        run: npm run build

      - name: Test
        run: npm run tests

      - name: Publish
        env:
          VODE_APP_REGISTRY_AUTH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
        run: |
          PKG_NAME=$(node -p "require('./package.json').name")
          PKG_VERSION=$(node -p "require('./package.json').version")
          NPM_TAG="latest"
          if echo "$PKG_VERSION" | grep -q -- '-'; then
            NPM_TAG="next"
          fi
          if npm view "$PKG_NAME@$PKG_VERSION" version >/dev/null 2>&1; then
            echo "$PKG_NAME@$PKG_VERSION already published, skipping."
          else
            npm publish --tag "$NPM_TAG"
          fi

Dependencies

Development dependencies

ID Version
@ryupold/vode ^1.11.0
@types/node latest
@vode-app/cldr-supplemental ^0.1.0-pre.5
@vode-app/common ^0.1.0-pre.35
@vode-app/common-client-side ^0.1.0-pre.39
@vode-app/i18n ^0.1.0-pre.7
@vode-app/icons ^0.1.0-pre.9
esbuild latest
tsx latest
typescript ^6.0.3

Keywords

typescript spa vode-app example
Details
npm
2026-07-05 16:53:10 +02:00
0
next
599 KiB
Assets (1)
Versions (10) View all
0.1.0-pre.36 2026-07-05
0.1.0-pre.32 2026-06-23
0.1.0-pre.31 2026-06-19
0.1.0-pre.30 2026-06-19
0.1.0-pre.29 2026-06-10