Skip to content

Commit 016be7e

Browse files
committed
fix: initial commit
0 parents  commit 016be7e

Some content is hidden

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

42 files changed

+3025
-0
lines changed

.editorconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
root = true
2+
3+
# Unix-style newlines with a newline ending every file
4+
[*]
5+
end_of_line = lf
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
charset = utf-8
9+
indent_style = space
10+
indent_size = 2
11+
12+
[*.md]
13+
trim_trailing_whitespace = false

.env.example

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Cloud Manager envs
2+
ORGANIZATION_NAME=orgname# used to build the URL for the Pipeline
3+
CLIENT_ID=e231#used to validate CM event
4+
# Messanger apps env
5+
SLACK_WEBHOOK=https://hooks.slack.com/services/123
6+
# Teams webhook URL
7+
TEAMS_WEBHOOK=https://prod-123.westus.logic.azure.com:443/workflows/123
8+
# Teams email, alternative approach, if Webhook is disabled
9+
TEAMS_EMAIL=email.onmicrosoft.com@amer.teams.ms
10+
# Email sender env
11+
# Only needed if Teams email approach is used
12+
EMAIL_FROM=gmailuser@googleworkspacedomain.com
13+
# App env (optional)
14+
PORT=4000# port to run the application, default is 4000
15+
DATA_PATH=./data# path to the data folder wher tokens are stored, default is ./data
16+
# Ngrok env (optional)
17+
# Only needed if ngrok is used for local testing
18+
NGROK_AUTHTOKEN=123
19+
NGROK_DOMAIN=domain-name.ngrok-free.app

.github/ISSUE_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!--- STOP! Before you open an issue please search this repository's issues to see if it has already been reported. This helps reduce duplicate issues from being created. -->
2+
3+
### Expected Behaviour
4+
5+
### Actual Behaviour
6+
7+
### Reproduce Scenario (including but not limited to)
8+
9+
#### Steps to Reproduce
10+
11+
#### Platform and Version
12+
13+
#### Sample Code that illustrates the problem
14+
15+
#### Logs taken while reproducing problem

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<!--- Provide a general summary of your changes in the Title above
2+
Use Angular Commit Message Conventions in commits -
3+
https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit-message-header
4+
-->
5+
6+
## Description
7+
8+
<!--- Describe your changes in detail -->
9+
10+
## Related Issue
11+
12+
<!--- This project only accepts pull requests related to open issues
13+
If suggesting a new feature or change, please discuss it in an issue first
14+
If fixing a bug, there should be an issue describing it with steps to reproduce -->
15+
<!--
16+
To automatically close linked issue when PR is merged.
17+
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
18+
-->
19+
20+
Fixes #
21+
22+
## Types of changes
23+
24+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
25+
26+
- [ ] Bug fix (non-breaking change which fixes an issue)
27+
- [ ] New feature (non-breaking change which adds functionality)
28+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
29+
30+
## Checklist:
31+
32+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
33+
34+
- [ ] My code follows the code style of this project.
35+
- [ ] I have read the **[CONTRIBUTING](docs/CONTRIBUTING.mnd)** document.
36+
- [ ] All new and existing tests passed.

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ '**' ]
6+
pull_request:
7+
branches: [ $default-branch ]
8+
9+
jobs:
10+
build:
11+
12+
runs-on: ${{ matrix.os }}
13+
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest]
17+
node-version: [20.x]
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: Setup Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- name: Install dependencies
27+
run: npm ci
28+
- name: Build Library
29+
run: npm run build --if-present
30+
- name: Run Tests
31+
run: npm test --if-present
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main ]
20+
schedule:
21+
- cron: '20 12 * * 0'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
language: [ 'javascript' ]
32+
steps:
33+
- name: Checkout
34+
uses: actions/checkout@v4
35+
36+
# Initializes the CodeQL tools for scanning.
37+
- name: Initialize CodeQL
38+
uses: github/codeql-action/init@v3
39+
with:
40+
languages: ${{ matrix.language }}
41+
42+
- run: npm run build --if-present
43+
44+
- name: Perform CodeQL Analysis
45+
uses: github/codeql-action/analyze@v3
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Manual Release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
version:
6+
description: 'Version'
7+
type: choice
8+
required: true
9+
default: fix
10+
options:
11+
- fix
12+
- feat
13+
- BREAKING CHANGE
14+
dryRun:
15+
description: 'DryRun'
16+
type: boolean
17+
default: true
18+
# ENV and Config
19+
env:
20+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
22+
GIT_AUTHOR_NAME: github-actions
23+
GIT_AUTHOR_EMAIL: github-actions@github.com
24+
GIT_COMMITTER_NAME: github-actions
25+
GIT_COMMITTER_EMAIL: github-actions@github.com
26+
CI: true
27+
CONFIG_NODE_VERSION: '["20.x"]'
28+
CONFIG_OS: '["ubuntu-latest"]'
29+
# Main Job
30+
jobs:
31+
config:
32+
runs-on: ubuntu-latest
33+
outputs:
34+
NODE_VERSION: ${{ steps.set-config.outputs.CONFIG_NODE_VERSION }}
35+
OS: ${{ steps.set-config.outputs.CONFIG_OS }}
36+
steps:
37+
- id: set-config
38+
run: |
39+
echo "CONFIG_NODE_VERSION=${{ toJSON(env.CONFIG_NODE_VERSION) }}" >> $GITHUB_OUTPUT
40+
echo "CONFIG_OS=${{ toJSON(env.CONFIG_OS) }}" >> $GITHUB_OUTPUT
41+
release:
42+
name: Test, Build and force Release
43+
needs: config
44+
45+
runs-on: ${{ matrix.OS }}
46+
strategy:
47+
matrix:
48+
OS: ${{ fromJSON(needs.config.outputs.OS) }}
49+
NODE_VERSION: ${{ fromJSON(needs.config.outputs.NODE_VERSION) }}
50+
51+
steps:
52+
- name: Checkout repo
53+
uses: actions/checkout@v4
54+
- name: Setup Node.js ${{ matrix.NODE_VERSION }}
55+
uses: actions/setup-node@v4
56+
with:
57+
node-version: ${{ matrix.NODE_VERSION }}
58+
- name: Commit trigger
59+
run: |
60+
git commit --allow-empty -m "${{ github.event.inputs.version }}: Trigger Manual Release
61+
62+
${{ github.event.inputs.version }}:Forced Manual Release without code changes"
63+
- name: Install dependencies
64+
run: npm ci
65+
- name: Build Library
66+
run: npm run build --if-present
67+
- name: Run Tests
68+
run: npm test --if-present
69+
- name: Publish npm package
70+
uses: cycjimmy/semantic-release-action@v4
71+
with:
72+
dry_run: ${{ github.event.inputs.dryRun == 'true' }}
73+
extra_plugins: |
74+
@semantic-release/changelog
75+
@semantic-release/git

.github/workflows/release.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
name: Test, Build and Release
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
matrix:
14+
os: [ ubuntu-latest ]
15+
node-version: [ 20.x ]
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix['node-version'] }}
24+
- name: Install dependencies
25+
run: npm ci
26+
- name: Build Library
27+
run: npm run build --if-present
28+
- name: Run Tests
29+
run: npm test --if-present
30+
- name: Release
31+
uses: cycjimmy/semantic-release-action@v4
32+
with:
33+
dry_run: true
34+
extra_plugins: |
35+
@semantic-release/changelog
36+
@semantic-release/git
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
40+
GIT_AUTHOR_NAME: github-actions
41+
GIT_AUTHOR_EMAIL: github-actions@github.com
42+
GIT_COMMITTER_NAME: github-actions
43+
GIT_COMMITTER_EMAIL: github-actions@github.com
44+
CI: true

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Logs
2+
logs
3+
*.log
4+
5+
# IDE
6+
.project
7+
.classpath
8+
.settings
9+
.idea/
10+
*.iml*
11+
*.ipr
12+
.brackets.json
13+
.vscode/
14+
.history
15+
16+
# OS
17+
.DS_Store
18+
*.swp
19+
20+
# Node related files
21+
node_modules/
22+
node/
23+
bin/
24+
typings
25+
npm-debug.log*
26+
yarn-debug.log*
27+
yarn-error.log*
28+
.stylelintcache
29+
.eslintcache
30+
31+
# env
32+
\.env
33+
.data/
34+
!/dist/

.npmignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.eslintrc
2+
.nyc_output
3+
rollup.config.js
4+
.prettierrc
5+
.git
6+
.prettierignore
7+
**/.git/
8+
**/node_modules/
9+
yarn.lock
10+
/docs
11+
/public
12+
/coverage
13+
/.vscode
14+
/tests
15+
/temp
16+
.idea
17+
.github
18+
.releaserc
19+
.editorconfig

0 commit comments

Comments
 (0)