Skip to content

Commit 3110755

Browse files
committed
feat: initial open-source
0 parents  commit 3110755

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+63358
-0
lines changed

.eslintrc.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
plugins: ['@typescript-eslint'],
4+
extends: ['eslint:recommended', '@typescript-eslint/recommended'],
5+
parserOptions: {
6+
ecmaVersion: 2020,
7+
sourceType: 'module',
8+
project: './tsconfig.json',
9+
},
10+
env: {
11+
browser: true,
12+
es2020: true,
13+
node: true,
14+
jest: true,
15+
},
16+
rules: {
17+
'@typescript-eslint/no-explicit-any': 'warn',
18+
'@typescript-eslint/no-unused-vars': 'error',
19+
'@typescript-eslint/explicit-function-return-type': 'off',
20+
'@typescript-eslint/explicit-module-boundary-types': 'off',
21+
'@typescript-eslint/no-empty-function': 'warn',
22+
'@typescript-eslint/prefer-const': 'error',
23+
'no-console': 'off', // Allow console for debugging
24+
'prefer-const': 'error',
25+
'no-var': 'error',
26+
},
27+
ignorePatterns: ['dist/', 'node_modules/', '*.js', '*.d.ts'],
28+
};

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @valerydluski @rNiall
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
name: 🚀 Feature request
3+
description: Suggest an idea for EPAM PDF Highlighter Kit
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: "
9+
<img src='https://www.gravatar.com/avatar/2937817a82464ae07b138d8b57a7ccd4?s=40' align='left' width='40' height='40' style='margin-right:10px'>
10+
Thank you for finding the time to propose new feature!
11+
12+
We really appreciate the community efforts to improve EPAM PDF Highlighter Kit.
13+
<br clear='left'/>"
14+
- type: textarea
15+
attributes:
16+
label: Description
17+
description: A short description of your feature
18+
validations:
19+
required: true
20+
- type: textarea
21+
attributes:
22+
label: Related issues
23+
description: Is there currently another issue associated with this?
24+
- type: checkboxes
25+
attributes:
26+
label: Confidential information
27+
options:
28+
- label: >
29+
I confirm that do not share any confidential information
30+
required: true
31+
- type: markdown
32+
attributes:
33+
value: "Thanks for completing our form!"
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
---
2+
name: 🐛 Bug report
3+
description: Problems and issues with code in EPAM PDF Highlighter Kit
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: "
9+
<img src='https://www.gravatar.com/avatar/2937817a82464ae07b138d8b57a7ccd4?s=40' align='left' width='40' height='40' style='margin-right:10px'>
10+
Thank you for finding the time to report the problem!
11+
12+
We really appreciate the community's efforts to improve EPAM PDF Highlighter Kit.
13+
<br clear='left'/>"
14+
- type: input
15+
validations:
16+
required: true
17+
attributes:
18+
label: EPAM PDF Highlighter Kit version
19+
description: >
20+
On what version of EPAM PDF Highlighter Kit are you currently experiencing the issue? Please check your package.json or npm list.
21+
placeholder: 1.0.0
22+
- type: textarea
23+
attributes:
24+
label: How to reproduce
25+
description: >
26+
What should we do to reproduce the problem? If you are not able to provide a reproducible case,
27+
please open a [discussion](https://github.com/epam/pdf-highlighter-kit/discussions) instead.
28+
placeholder: >
29+
Please make sure you provide a reproducible step-by-step case of how to reproduce the problem as minimally and precisely as possible.
30+
Remember that non-reproducible issues will be closed! Opening a discussion is recommended as a first step.
31+
validations:
32+
required: true
33+
- type: textarea
34+
attributes:
35+
label: Actual result
36+
description: What do you think went wrong?
37+
placeholder: >
38+
Please explain why you think the behavior is erroneous. It is extremely helpful if you copy&paste the fragment of logs showing the exact error messages or wrong behavior and screenshots for UI problems. You can include files by dragging and dropping them here.
39+
validations:
40+
required: true
41+
- type: textarea
42+
attributes:
43+
label: Expected result
44+
description: What you think should happen instead?
45+
placeholder: >
46+
Please provide any suggestions or ideas what should happen instead.
47+
validations:
48+
required: true
49+
- type: checkboxes
50+
attributes:
51+
label: Confidential information
52+
options:
53+
- label: >
54+
I confirm that do not share any confidential information
55+
required: true
56+
- type: markdown
57+
attributes:
58+
value: "Thanks for completing our form!"

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blank_issues_enabled: false

.github/dependabot.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "wednesday"
8+
time: "09:00"
9+
# Disable version updates, keep security updates only
10+
open-pull-requests-limit: 0
11+
commit-message:
12+
# Prefix all commit messages with "chore: "
13+
prefix: "chore"
14+
- package-ecosystem: "github-actions"
15+
directory: "/"
16+
schedule:
17+
interval: "weekly"
18+
day: "wednesday"
19+
time: "09:00"
20+
commit-message:
21+
# Prefix all commit messages with "chore: "
22+
prefix: "chore"
23+
open-pull-requests-limit: 10

.github/pull_request_template.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### Applicable issues
2+
3+
<!-- Please link the GitHub issues related to this PR (You can reference an issue using # then number, e.g. #123) -->
4+
5+
- fixes #
6+
7+
### Description of changes
8+
9+
<!-- Please explain the changes you made right below this line. -->
10+
11+
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI Workflow
2+
3+
on:
4+
push:
5+
branches:
6+
- development
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
format:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
18+
- name: Set up Node
19+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
20+
with:
21+
node-version: lts/*
22+
cache: npm
23+
- name: Install dependencies
24+
run: npm ci
25+
- name: Format
26+
run: npm run format
27+
28+
lint:
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
32+
- name: Set up Node
33+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
34+
with:
35+
node-version: lts/*
36+
cache: npm
37+
- name: Install dependencies
38+
run: npm ci
39+
- name: Lint
40+
run: npm run lint
41+
42+
test:
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
46+
- name: Set up Node
47+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
48+
with:
49+
node-version: lts/*
50+
cache: npm
51+
- name: Install dependencies
52+
run: npm ci
53+
- name: Test
54+
run: npm run test

.github/workflows/release.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Release Workflow
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "New version to release (semver)"
8+
required: true
9+
visibility:
10+
description: "Release visibility"
11+
required: true
12+
type: choice
13+
default: "public"
14+
options:
15+
- public
16+
- restricted
17+
18+
concurrency:
19+
group: ${{ github.workflow }}
20+
cancel-in-progress: true
21+
22+
# Grant write permissions to the repository contents so we can push version updates
23+
permissions:
24+
contents: write
25+
26+
env:
27+
TAG: ${{ github.event.inputs.version }}
28+
29+
jobs:
30+
format:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
34+
- name: Set up Node
35+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
36+
with:
37+
node-version: lts/*
38+
cache: npm
39+
- name: Install dependencies
40+
run: npm ci
41+
- name: Format
42+
run: npm run format
43+
44+
lint:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
48+
- name: Set up Node
49+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
50+
with:
51+
node-version: lts/*
52+
cache: npm
53+
- name: Install dependencies
54+
run: npm ci
55+
- name: Lint
56+
run: npm run lint
57+
58+
test:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
62+
- name: Set up Node
63+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
64+
with:
65+
node-version: lts/*
66+
cache: npm
67+
- name: Install dependencies
68+
run: npm ci
69+
- name: Test
70+
run: npm run test
71+
72+
publish:
73+
runs-on: ubuntu-latest
74+
needs:
75+
- format
76+
- lint
77+
- test
78+
steps:
79+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
80+
with:
81+
token: ${{ secrets.GITHUB_TOKEN }}
82+
ref: ${{ github.event.repository.default_branch }}
83+
- name: Set up Node
84+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
85+
with:
86+
node-version: lts/*
87+
cache: npm
88+
registry-url: https://registry.npmjs.org
89+
- name: Install dependencies
90+
run: npm ci
91+
- name: Update package.json with release tag, commit and push version update
92+
run: |
93+
git config user.name github-actions[bot]
94+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
95+
npm version "${{ env.TAG }}" --message "chore: bump version to %s"
96+
git push origin ${{ github.event.repository.default_branch }}
97+
- name: Publish to npm
98+
run: npm publish --access ${{ github.event.inputs.visibility }}
99+
env:
100+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
101+
- name: Create Github Release
102+
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b # v1.20.0
103+
with:
104+
name: "pdf-highlighter-kit ${{ env.TAG }}"
105+
allowUpdates: true
106+
generateReleaseNotes: true
107+
tag: ${{ env.TAG }}
108+
draft: ${{ github.event.inputs.visibility == 'restricted' }}

0 commit comments

Comments
 (0)