Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
45247a3
build runs
barluq May 6, 2025
c4463a0
add loging basic
barluq May 6, 2025
92c946c
rollup setting for more modules
barluq May 6, 2025
5c536fa
remove index ts
barluq May 6, 2025
3724709
rollup works
barluq May 7, 2025
379d0f7
use proper package name
mbabic84 May 22, 2025
a98f379
add workflows
mbabic84 May 22, 2025
c4e4420
Merge pull request #1 from Gisat/feature/first-build
mbabic84 May 22, 2025
0115db0
force checkout full history
mbabic84 May 23, 2025
634ad3f
Add workflow to check files permissions
mbabic84 May 23, 2025
e36c9f0
simplify
mbabic84 May 23, 2025
b05c51e
remove unnecessary workflow
mbabic84 May 23, 2025
a321a28
ensure permissions
mbabic84 May 23, 2025
24c4cc0
Merge pull request #2 from Gisat/feature/first-build
mbabic84 May 23, 2025
d226245
Set package.json version to v0.0.1-dev.0 #skip_next_version
panterobot May 23, 2025
515761f
better naming and description
mbabic84 May 23, 2025
dfbed1d
add workflow for dev releases
mbabic84 May 23, 2025
933275d
Merge pull request #3 from Gisat/feature/first-build
mbabic84 May 23, 2025
7c4b4b4
Set package.json version to v0.0.1-dev.1 #skip_next_version
panterobot May 23, 2025
c1b013c
edit rollup
barluq Jun 16, 2025
ca1ad01
add vitest and yalc
barluq Sep 30, 2025
f32c7cb
ts configs for tests and prod
barluq Sep 30, 2025
fa85166
edit readme
barluq Sep 30, 2025
1499c39
add code helper tests
barluq Sep 30, 2025
38f424d
fixing
barluq Oct 1, 2025
a827769
fixed by manual index.ts - barrels sucks
barluq Oct 1, 2025
d1f747f
docs
barluq Oct 1, 2025
bf0f461
add api models
barluq Oct 1, 2025
1dedd22
docs
barluq Oct 1, 2025
dd6ce87
edit api response and try to keep comments
barluq Oct 1, 2025
3f4c327
tsc edits
barluq Oct 1, 2025
0510646
fix ts
barluq Oct 1, 2025
24fdceb
remove aliases
barluq Oct 2, 2025
4901fcc
Merge branch 'dev' into feature/first-build
barluq Oct 2, 2025
a76c251
edit CG naming
barluq Oct 2, 2025
9a27fc8
Merge branch 'feature/first-build' of github.com:Gisat/ptr-be-core in…
barluq Oct 2, 2025
ba8a468
add tests workflows
barluq Oct 3, 2025
6832e78
Removes redundant workflow for push testing
barluq Oct 3, 2025
e8a1a92
Merge pull request #4 from Gisat/feature/first-build
barluq Oct 3, 2025
765fc18
Set package.json version to v0.0.1-dev.2 #skip_next_version
panterobot Oct 3, 2025
4bcdb28
fix types
barluq Oct 3, 2025
abdff6b
docs
barluq Oct 3, 2025
48b1bea
unneeded
barluq Oct 3, 2025
725d27d
edit npm scripts
barluq Oct 3, 2025
f3f34a3
Adds package export definitions for module formats
barluq Oct 3, 2025
fb6bf31
Merge pull request #5 from Gisat/feature/first-build
barluq Oct 4, 2025
47e60c7
Set package.json version to v0.0.1-dev.3 #skip_next_version
panterobot Oct 4, 2025
d13e33e
move code into node and shared
barluq Oct 8, 2025
24893fc
edits
barluq Oct 9, 2025
89e4550
for node
barluq Oct 9, 2025
574eb2c
works finally
barluq Oct 9, 2025
2154cee
edit docs
barluq Oct 9, 2025
cdf16b7
edit names
barluq Oct 9, 2025
4d10054
revert
barluq Oct 9, 2025
68f03c9
edit docs
barluq Oct 9, 2025
09a51cb
Merge pull request #6 from Gisat/feature/split-server-from-shared-code
barluq Oct 9, 2025
d3a898b
Set package.json version to v0.0.1-dev.4 #skip_next_version
panterobot Oct 9, 2025
aebae65
add edge properties models
barluq Oct 13, 2025
29df0c4
edit dev tsconfig
barluq Oct 13, 2025
9383540
edit models
barluq Oct 17, 2025
5ee3130
edit tests
barluq Oct 17, 2025
1f013a0
Merge pull request #7 from Gisat/feature/oct25-attribute-edges
barluq Oct 23, 2025
abf02c0
Set package.json version to v0.0.1-dev.5 #skip_next_version
panterobot Oct 23, 2025
22ff03d
edit models for neighbours
barluq Nov 5, 2025
4ad70ba
edit neighbours
barluq Nov 5, 2025
4626e73
add arrows model
barluq Nov 6, 2025
c7ac2e3
edit docs
barluq Nov 6, 2025
8aa92ff
better specify arrows properties from panther definition
barluq Nov 10, 2025
9feb6ed
updait arrows again
barluq Nov 10, 2025
c4f699a
Merge pull request #18 from Gisat/feature/nov25-models-with-neighbour…
barluq Nov 10, 2025
aa72d23
Set package.json version to v0.0.1-dev.6 #skip_next_version
panterobot Nov 10, 2025
c05229a
datasource models
barluq Nov 10, 2025
cf608e3
separated full entities
barluq Nov 10, 2025
3979fcd
rename file with full interfaces
barluq Nov 10, 2025
a0834f1
remove map style as standalone node
barluq Nov 10, 2025
0d4279f
eslint and before push scripts
barluq Nov 10, 2025
6bb7201
Merge pull request #20 from Gisat/feature/nov25-datasource-models-for…
barluq Nov 10, 2025
6101ae4
Set package.json version to v0.0.1-dev.7 #skip_next_version
panterobot Nov 10, 2025
06f877b
add parsers and helpers for pather graph model validation
barluq Nov 10, 2025
34583aa
fix lint errors
barluq Nov 10, 2025
6d5d021
docs
barluq Nov 10, 2025
a2895df
add arrows parser
barluq Nov 10, 2025
cd0ecbf
rename functions
barluq Nov 10, 2025
5d151d2
move tests
barluq Nov 10, 2025
2832af9
model changes
barluq Nov 10, 2025
293812c
add parsing for document id and timeseries
barluq Nov 10, 2025
a1dd3b9
test parsing nodes and edges
barluq Nov 10, 2025
14e64b1
test parsing panther models
barluq Nov 10, 2025
32e706a
fix eslint
barluq Nov 11, 2025
840f5cf
fix test dependencies
barluq Nov 11, 2025
6116480
remove unused fixtures
barluq Nov 12, 2025
325a16b
Merge pull request #21 from Gisat/19-validation-for-vector-models
barluq Nov 12, 2025
c0fb95b
Set package.json version to v0.0.1-dev.8 #skip_next_version
panterobot Nov 12, 2025
4c3e29d
fix loadash imports
barluq Nov 12, 2025
0f734e8
Merge pull request #23 from Gisat/19-validation-for-vector-models
barluq Nov 12, 2025
f51ba46
Set package.json version to v0.0.1-dev.9 #skip_next_version
panterobot Nov 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Build & Publish NPM Package - DEV
description: This workflow builds and publishes the NPM package when a version tag is pushed.

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+-dev.[0-9]+'

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v4 # Latest version to set up Node.js
with:
node-version: 'lts/*' # Use the latest LTS version of Node.js
registry-url: 'https://registry.npmjs.org/' # Important: Specify the npm registry

- name: Install dependencies
run: npm install

- name: Build package
run: npm run build

- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
# for public packages, include --access public
npm publish --access public --tag dev
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build & Publish NPM Package
description: This workflow builds and publishes the NPM package when a version tag is pushed.

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
build-and-publish:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install dependencies
run: npm install

- name: Build package
run: npm run build

- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
# for public packages, include --access public
npm publish --access public
36 changes: 36 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: tests

on:
pull_request:
branches:
- main
- master
- dev
- rc

jobs:
code:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install dependencies
run: npm install

- name: Build project
run: npm run build
68 changes: 68 additions & 0 deletions .github/workflows/version-bump.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Version bump
description: This workflow bumps the version in package.json and creates a new version tag.

on:
push:
branches:
- master
- main
- rc
- dev

jobs:
create-version-tag:
if: ${{ !contains(github.event.head_commit.message, '#skip_next_version') }}
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v4.2.2
with:
token: ${{ secrets.GH_TOKEN }}
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Set ENVs
run: |
echo "PRERELEASE_SUFFIX=${{ github.head_ref || github.ref_name }}" >> "$GITHUB_ENV"
if [[ "${{ github.head_ref || github.ref_name }}" == "dev" ]]; then echo "PRERELEASE=true" >> "$GITHUB_ENV"; fi
if [[ "${{ github.head_ref || github.ref_name }}" == "rc" ]]; then echo "PRERELEASE=true" >> "$GITHUB_ENV"; fi
if [[ "${{ github.head_ref || github.ref_name }}" == "master" ]]; then echo "PRERELEASE=false" >> "$GITHUB_ENV"; fi
if [[ "${{ github.head_ref || github.ref_name }}" == "main" ]]; then echo "PRERELEASE=false" >> "$GITHUB_ENV"; fi

- name: Get next version
id: next-version
uses: anothrNick/github-tag-action@1.71.0
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
WITH_V: true
PRERELEASE: ${{ env.PRERELEASE }}
PRERELEASE_SUFFIX: ${{ env.PRERELEASE_SUFFIX }}
DEFAULT_BUMP: patch
DRY_RUN: true

- name: Update version in package.json
run: |
sudo chown -R "$(id -u):$(id -g)" .git
git config --local user.email "panterobot@gisat.cz"
git config --local user.name "github-actions[bot]"
npm version ${{ steps.next-version.outputs.new_tag }} -m "Set package.json version to ${{ steps.next-version.outputs.new_tag }} #skip_next_version"

- name: Push changes
uses: ad-m/github-push-action@v0.8.0
with:
github_token: ${{ secrets.GH_TOKEN }}
branch: ${{ github.ref }}

- name: Create version tag
uses: anothrNick/github-tag-action@1.71.0
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
WITH_V: true
PRERELEASE: ${{ env.PRERELEASE }}
PRERELEASE_SUFFIX: ${{ env.PRERELEASE_SUFFIX }}
DEFAULT_BUMP: patch
DRY_RUN: false
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules
dist
dist
.rollup.cache
48 changes: 22 additions & 26 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
# Bepack NPM
Shared backend functionality like logging, general database methods, parsing, code helpers etc.

Main output is NPM package `bepack`, which can be imported into other backend projects.

Rest of the project works as sandbox and backend demo field.

## Structure of the NPM part

Here is the main structure of the project:

- src (code content)
- `index.ts` (generated automaticly by `barrelsby`)
- doc (NPM documentation)
- config files


## Build of the NPM
- Open terminal in the `/bepack`
- Run `npm run build`

Check `package.json` for build steps.

## Technologies
- Typescript (https://www.typescriptlang.org/docs/)
- Barrelsby for indexing (https://github.com/bencoveney/barrelsby)
# Shared Library for Panther Backend
This repository contains source of shared functionalities across Panther backend services.

## Installation (DEV)
- Install Node and NPM
- Install YALC by `npm install -g yalc`
- Clone the package repository.
- Open terminal in package root.
- Run `npm i` and `npm run build` to install dependencies and make a build of the NPM package.
- Run `npm run yalc:publish` for local publishing the package into yalc repository.
- Now you can add this package for local development by opening the target application repository and run `yalc add @gisatcz/ptr-be-core`
- Run `npm run dev` for development mode with Rollup build watcher and auto yalc publishing.

## Usage in Applications
- FE based apps should use imports from `@gisatcz/ptr-be-core/browser`
- NodeJS based apps should use imports from `@gisatcz/ptr-be-core/node`

## Resources
- YALC (local NPM): https://github.com/wclr/yalc
- Vitest (testing): https://vitest.dev
- Barrelsby (TS Imports into one `index.ts`): https://github.com/bencoveney/barrelsby
- Rollup (NPM package build): https://rollupjs.org
25 changes: 25 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { defineConfig } from "eslint/config";
import tseslint from "typescript-eslint";

export default defineConfig([
{
files: ["**/*.ts"],
ignores: ["**/node_modules/**", "**/dist/**", "vitest.config.ts"],
languageOptions: {
parser: tseslint.parser,
parserOptions: {
project: "./tsconfig.json",
tsconfigRootDir: import.meta.dirname,
},
},
plugins: {
"@typescript-eslint": tseslint.plugin,
},
extends: [
"@typescript-eslint/recommended",
],
rules: {
"@typescript-eslint/no-explicit-any": "off",
},
},
]);
24 changes: 0 additions & 24 deletions index.ts

This file was deleted.

File renamed without changes.
Loading