Skip to content

Commit

Permalink
Init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tuplle committed Dec 11, 2023
0 parents commit 5cdbb77
Show file tree
Hide file tree
Showing 668 changed files with 41,733 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"version": "0.1",
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/master/cspell.schema.json",
"language": "en",
"words": [
"bitjson",
"bitauth",
"cimg",
"circleci",
"codecov",
"commitlint",
"dependabot",
"editorconfig",
"esnext",
"execa",
"exponentiate",
"globby",
"libauth",
"mkdir",
"prettierignore",
"sandboxed",
"transpiled",
"typedoc",
"untracked",
"socio",
"Petriflow",
"netgrif",
"NETGRIF",
"PETRIFLOW",
"petrinet",
"unpatched",
"datagroup",
"datagroups",
"DATAGROUP",
"DATAGROUPS",
"multichoice",
"Multichoice",
"Gridster",
"gridster"
],
"flagWords": [],
"ignorePaths": [
"package.json",
"package-lock.json",
"yarn.lock",
"tsconfig.*",
"node_modules/**"
]
}
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
51 changes: 51 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
"tsconfig.json",
"e2e/tsconfig.json"
],
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "nab",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "nab",
"style": "kebab-case"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {}
}
]
}
94 changes: 94 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
---

#### Instruction for the developer

For starters, congratulation on opening a PR of your work. I hope you're proud of your work and yourself :wink: .
There are some things you need to do before this PR is submitted, so read carefully.

First, **set yourself as an assignee**. You can also add other people responsible for code in this PR (i.e. your team lead).

Then **set reviewers**. There should be at least two reviewers. You can set your team lead, projects owner, or senior developer
(after his or her agreement, of course) as a PR reviewer.

The last element on the right panel are labels. Labels should be based on what type of change the PR brings to the table.
You can **add one or more labels** that apply to the PR:

- _Bugfix_ (a change that fixes a bug)
- _New feature_ (a change that introduces new functionality)
- _Improvement_ (a change that improves on an existing feature)
- _Breaking change_ (fix or feature that would cause existing functionality doesn't work as expected)
- _Documentation update_ (a change makes, or requires, change to the product documentation)
- _New Dependency_ (a change that introduces new third-party dependency)
- _Critical_ (a change that is critical to a release and must not be omitted)

Next thing, please read and edit the PR description below the following way:

- If a statement is between `<` `>` symbols, replace it with your content according to the instructions in the statement.
- If a slash `/` is between two statements, choose to fill only one or the other.
- To reference a JIRA issue, use the issue key wrapped by `[ ]` brackets.
- To mention someone (or team), use at `@` symbol.
- To reference specific code, use an absolute link to the source code file with suffix `#L` and the number of the desired line of code.

For whole markdown documentation please read [GitHub Markdown](https://docs.github.com/en/github/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax).

If you read these whole instructions and have done everything, **you are the best** :+1: .
You can now safely **delete all between two horizontal lines**, so the instructions don't look bad in your PR.

---

# Description

<Please include a summary of the changes and which issue is fixed. Please also include relevant links and special instructions if applicable.>

<Fixes [JIRA-ISSUE]>/<Implements [JIRA-ISSUE]>

## Dependencies

<Please include all newly created dependencies on third party libraries or on other PR in the project.>

### Third party dependencies

- <Name of a new library/dependency [link to the new library]()> - <Reason, why it was added to the project> / <No new dependencies were introduced>

### Blocking Pull requests

<Depends on #(PR id)>/<There are no dependencies on other PR>

## How Has Been This Tested?

<Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.>

- <Name of a test [test file](link to the test file)>

### Test Configuration

<Please describe configuration for tests to run if applicable, like program parameters, host OS, VM configuration etc. You can use >

| Name | Tested on |
|---------------------| --------- |
| OS | |
| Runtime | |
| Dependency Manager | |
| Framework version | |
| Run parameters | |
| Other configuration | |

# Checklist:

- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] My changes have been checked, personally or remotely, with @...
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have resolved all conflicts with the target branch of the PR
- [ ] I have updated and synced my code with the target branch
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing tests pass locally with my changes:
- [ ] Lint test
- [ ] Unit tests
- [ ] Integration tests
- [ ] I have checked my contribution with code analysis tools:
- [ ] [SonarCloud](https://sonarcloud.io/project/overview?id=netgrif_application-builder)
- [ ] [Snyk](https://app.snyk.io/org/netgrif)
- [ ] I have made corresponding changes to the documentation:
- [ ] Developer documentation
- [ ] User Guides
4 changes: 4 additions & 0 deletions .github/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
PR_TITLE_REGEX: /(?:\[[A-Z]+-[0-9]+\] .+)|(CI - Update documentation)|(?:Release [0-9]\.[0-9]\.[0-9](?:-[A-Za-z]+\.[0-9]+)?)/gi
COMMIT_MESSAGE_REGEX: /((^| )(\[[A-Z]+-[0-9]+\] .+(?:\n\r? - .*)*)|(Merge branch .*. into*.*)|((Release .*)+(:?\n\r? .*)*)|(CI - Update documentation)|(Revert ".*.)|(Merge remote-tracking *.*))/gim
INVALID_COMMIT_MESSAGE: Commit messages are invalid. Valid format is -> [JIRA-ISSUE-KEY] Main change in the commit \n - other change in the commit
INVALID_PULL_REQUEST_MESSAGE: Pull request title is invalid -> [JIRA-ISSUE-KEY] Jira issue summary / title
31 changes: 31 additions & 0 deletions .github/workflows/master-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Master Build
on:
push:
branches: [ master ]
jobs:
build:
name: Build and update doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- run: npm i --legacy-peer-deps

- name: Test
run: npm run full-test

- name: Edit Path
run: |
sed -i 's/SF:.*.src/SF:src/g' coverage/lcov.info
sed -i 's/SF:.*.src/SF:src/g' coverage/lcov.info
- name: SonarCloud scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/pr-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: PR Test Build
on:
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
build:
name: Build and test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- run: npm i --legacy-peer-deps

- name: Lint
run: npm run lint

- name: Check spelling
run: npm run spell

- name: Test
run: npm run test

- name: Edit Path
run: |
sed -i 's/SF:.*.src/SF:src/g' coverage/lcov.info
sed -i 's/SF:.*.src/SF:src/g' coverage/lcov.info
- name: SonarCloud scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
81 changes: 81 additions & 0 deletions .github/workflows/release-build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Publish a release
on:
release:
types: [ published ]
jobs:
publish-docker:
name: Docker build image and publish
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

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

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_AUTH_TOKEN }}

- name: Read package.json
uses: zvonimirsun/read-package-version-actions@v2
id: getVersion

- name: Push Version ${{ steps.getVersion.outputs.version }}
uses: docker/build-push-action@v5
with:
push: true
tags: netgrif/application-builder:${{ steps.getVersion.outputs.version }}

- name: Push Latest
if: ${{ !contains(steps.getVersion.outputs.version, '-') }}
uses: docker/build-push-action@v5
with:
push: true
tags: netgrif/application-builder:latest

publish-assets:
name: Upload Release Assets
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
id-token: write
security-events: write
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Read package.json
uses: zvonimirsun/read-package-version-actions@v2
id: getVersion

- name: Build
run: |
npm i --legacy-peer-deps
npm run build
- name: Build project
run: |
zip -r netgrif-application-builder-${{ steps.getVersion.outputs.version }}.zip target/application-builder
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: netgrif-application-builder-${{ steps.getVersion.outputs.version }}.zip
asset_name: netgrif-application-builder-${{ steps.getVersion.outputs.version }}.zip
tag: ${{ github.ref }}
overwrite: true
Loading

0 comments on commit 5cdbb77

Please sign in to comment.