@gisatcz/ptr-be-core 0.0.1-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release-dev.yml +34 -0
- package/.github/workflows/release.yml +28 -0
- package/.github/workflows/version-bump.yml +68 -0
- package/Readme.md +26 -0
- package/barrelsby.json +9 -0
- package/dist/index.cjs +26340 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +26329 -0
- package/dist/index.mjs.map +1 -0
- package/dist/src/coding/code.formating.d.ts +77 -0
- package/dist/src/coding/code.formating.d.ts.map +1 -0
- package/dist/src/coding/code.types.d.ts +6 -0
- package/dist/src/coding/code.types.d.ts.map +1 -0
- package/dist/src/logging/logger.d.ts +16 -0
- package/dist/src/logging/logger.d.ts.map +1 -0
- package/dist/src/panther/enums.panther.d.ts +40 -0
- package/dist/src/panther/enums.panther.d.ts.map +1 -0
- package/dist/src/panther/models.edges.d.ts +18 -0
- package/dist/src/panther/models.edges.d.ts.map +1 -0
- package/dist/src/panther/models.nodes.d.ts +53 -0
- package/dist/src/panther/models.nodes.d.ts.map +1 -0
- package/dist/src/panther/models.nodes.properties.d.ts +29 -0
- package/dist/src/panther/models.nodes.properties.d.ts.map +1 -0
- package/doc/npm-refresh.md +4 -0
- package/package.json +46 -0
- package/rollup.config.js +30 -0
- package/src/coding/code.formating.ts +104 -0
- package/src/coding/code.types.ts +11 -0
- package/src/logging/logger.ts +58 -0
- package/src/panther/SharedFeature.md +43 -0
- package/src/panther/enums.panther.ts +41 -0
- package/src/panther/models.edges.ts +20 -0
- package/src/panther/models.nodes.properties.ts +31 -0
- package/src/panther/models.nodes.ts +55 -0
- package/tsconfig.json +51 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: Build & Publish NPM Package - DEV
|
|
2
|
+
description: This workflow builds and publishes the NPM package when a version tag is pushed.
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
tags:
|
|
7
|
+
- 'v[0-9]+.[0-9]+.[0-9]+-dev.[0-9]+'
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build-and-publish:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- name: Check out repository
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Setup Node.js environment
|
|
18
|
+
uses: actions/setup-node@v4 # Latest version to set up Node.js
|
|
19
|
+
with:
|
|
20
|
+
node-version: 'lts/*' # Use the latest LTS version of Node.js
|
|
21
|
+
registry-url: 'https://registry.npmjs.org/' # Important: Specify the npm registry
|
|
22
|
+
|
|
23
|
+
- name: Install dependencies
|
|
24
|
+
run: npm install
|
|
25
|
+
|
|
26
|
+
- name: Build package
|
|
27
|
+
run: npm run build
|
|
28
|
+
|
|
29
|
+
- name: Publish to npm
|
|
30
|
+
env:
|
|
31
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
32
|
+
run: |
|
|
33
|
+
# for public packages, include --access public
|
|
34
|
+
npm publish --access public --tag dev
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Build & Publish NPM Package
|
|
2
|
+
description: This workflow builds and publishes the NPM package when a version tag is pushed.
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
tags:
|
|
7
|
+
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build-and-publish:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- name: Check out repository
|
|
15
|
+
uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Install dependencies
|
|
18
|
+
run: npm install
|
|
19
|
+
|
|
20
|
+
- name: Build package
|
|
21
|
+
run: npm run build
|
|
22
|
+
|
|
23
|
+
- name: Publish to npm
|
|
24
|
+
env:
|
|
25
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
26
|
+
run: |
|
|
27
|
+
# for public packages, include --access public
|
|
28
|
+
npm publish --access public
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
name: Version bump
|
|
2
|
+
description: This workflow bumps the version in package.json and creates a new version tag.
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches:
|
|
7
|
+
- master
|
|
8
|
+
- main
|
|
9
|
+
- rc
|
|
10
|
+
- dev
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
create-version-tag:
|
|
14
|
+
if: ${{ !contains(github.event.head_commit.message, '#skip_next_version') }}
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
|
|
17
|
+
permissions:
|
|
18
|
+
contents: write
|
|
19
|
+
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout
|
|
22
|
+
uses: actions/checkout@v4.2.2
|
|
23
|
+
with:
|
|
24
|
+
token: ${{ secrets.GH_TOKEN }}
|
|
25
|
+
ref: ${{ github.head_ref }}
|
|
26
|
+
fetch-depth: 0
|
|
27
|
+
|
|
28
|
+
- name: Set ENVs
|
|
29
|
+
run: |
|
|
30
|
+
echo "PRERELEASE_SUFFIX=${{ github.head_ref || github.ref_name }}" >> "$GITHUB_ENV"
|
|
31
|
+
if [[ "${{ github.head_ref || github.ref_name }}" == "dev" ]]; then echo "PRERELEASE=true" >> "$GITHUB_ENV"; fi
|
|
32
|
+
if [[ "${{ github.head_ref || github.ref_name }}" == "rc" ]]; then echo "PRERELEASE=true" >> "$GITHUB_ENV"; fi
|
|
33
|
+
if [[ "${{ github.head_ref || github.ref_name }}" == "master" ]]; then echo "PRERELEASE=false" >> "$GITHUB_ENV"; fi
|
|
34
|
+
if [[ "${{ github.head_ref || github.ref_name }}" == "main" ]]; then echo "PRERELEASE=false" >> "$GITHUB_ENV"; fi
|
|
35
|
+
|
|
36
|
+
- name: Get next version
|
|
37
|
+
id: next-version
|
|
38
|
+
uses: anothrNick/github-tag-action@1.71.0
|
|
39
|
+
env:
|
|
40
|
+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
41
|
+
WITH_V: true
|
|
42
|
+
PRERELEASE: ${{ env.PRERELEASE }}
|
|
43
|
+
PRERELEASE_SUFFIX: ${{ env.PRERELEASE_SUFFIX }}
|
|
44
|
+
DEFAULT_BUMP: patch
|
|
45
|
+
DRY_RUN: true
|
|
46
|
+
|
|
47
|
+
- name: Update version in package.json
|
|
48
|
+
run: |
|
|
49
|
+
sudo chown -R "$(id -u):$(id -g)" .git
|
|
50
|
+
git config --local user.email "panterobot@gisat.cz"
|
|
51
|
+
git config --local user.name "github-actions[bot]"
|
|
52
|
+
npm version ${{ steps.next-version.outputs.new_tag }} -m "Set package.json version to ${{ steps.next-version.outputs.new_tag }} #skip_next_version"
|
|
53
|
+
|
|
54
|
+
- name: Push changes
|
|
55
|
+
uses: ad-m/github-push-action@v0.8.0
|
|
56
|
+
with:
|
|
57
|
+
github_token: ${{ secrets.GH_TOKEN }}
|
|
58
|
+
branch: ${{ github.ref }}
|
|
59
|
+
|
|
60
|
+
- name: Create version tag
|
|
61
|
+
uses: anothrNick/github-tag-action@1.71.0
|
|
62
|
+
env:
|
|
63
|
+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
64
|
+
WITH_V: true
|
|
65
|
+
PRERELEASE: ${{ env.PRERELEASE }}
|
|
66
|
+
PRERELEASE_SUFFIX: ${{ env.PRERELEASE_SUFFIX }}
|
|
67
|
+
DEFAULT_BUMP: patch
|
|
68
|
+
DRY_RUN: false
|
package/Readme.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Bepack NPM
|
|
2
|
+
Shared backend functionality like logging, general database methods, parsing, code helpers etc.
|
|
3
|
+
|
|
4
|
+
Main output is NPM package `bepack`, which can be imported into other backend projects.
|
|
5
|
+
|
|
6
|
+
Rest of the project works as sandbox and backend demo field.
|
|
7
|
+
|
|
8
|
+
## Structure of the NPM part
|
|
9
|
+
|
|
10
|
+
Here is the main structure of the project:
|
|
11
|
+
|
|
12
|
+
- src (code content)
|
|
13
|
+
- `index.ts` (generated automaticly by `barrelsby`)
|
|
14
|
+
- doc (NPM documentation)
|
|
15
|
+
- config files
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Build of the NPM
|
|
19
|
+
- Open terminal in the `/bepack`
|
|
20
|
+
- Run `npm run build`
|
|
21
|
+
|
|
22
|
+
Check `package.json` for build steps.
|
|
23
|
+
|
|
24
|
+
## Technologies
|
|
25
|
+
- Typescript (https://www.typescriptlang.org/docs/)
|
|
26
|
+
- Barrelsby for indexing (https://github.com/bencoveney/barrelsby)
|