Skip to content

Commit 82fdd9f

Browse files
authored
Merge pull request #1 from SecJS/feat/len-initial-commit
feat: Initial Commit
2 parents 3167bf0 + ec4da2b commit 82fdd9f

26 files changed

+21685
-0
lines changed

.editorconfig

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

.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
APP_NAME="SecJS"
2+
APP_URL="https://cdn.secjs.io"
3+
AWS_REGION=""
4+
AWS_KEY=""
5+
AWS_BUCKET=""
6+
AWS_SECRET=""
7+
AWS_ENDPOINT=""

.github/COMMIT_CONVENTION.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
## Git Commit Message Convention
2+
3+
Using conventional commit messages, we can automate the process of generating the CHANGELOG file. All commits messages
4+
will automatically be validated against the following regex.
5+
6+
``` js
7+
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types|build|improvement)((.+))?: .{1,50}/
8+
```
9+
10+
## Commit Message Format
11+
12+
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **
13+
subject**:
14+
15+
> The **scope** is optional
16+
17+
```
18+
feat(router): add support for prefix
19+
20+
Prefix makes it easier to append a path to a group of routes
21+
```
22+
23+
1. `feat` is type.
24+
2. `router` is scope and is optional
25+
3. `add support for prefix` is the subject
26+
4. The **body** is followed by a blank line.
27+
5. The optional **footer** can be added after the body, followed by a blank line.
28+
29+
## Types
30+
31+
Only one type can be used at a time and only following types are allowed.
32+
33+
- feat
34+
- fix
35+
- docs
36+
- style
37+
- refactor
38+
- perf
39+
- test
40+
- workflow
41+
- ci
42+
- chore
43+
- types
44+
- build
45+
46+
If a type is `feat` or `fix`, then the commit will appear in the CHANGELOG.md file. However if there is any BREAKING
47+
CHANGE, the commit will always appear in the changelog.
48+
49+
### Revert
50+
51+
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit.
52+
In the body it should say: `This reverts commit <hash>`., where the hash is the SHA of the commit being reverted.
53+
54+
## Scope
55+
56+
The scope could be anything specifying place of the commit change. For example: `router`, `view`, `querybuilder`
57+
, `database`, `model` and so on.
58+
59+
## Subject
60+
61+
The subject contains succinct description of the change:
62+
63+
- use the imperative, present tense: "change" not "changed" nor "changes".
64+
- don't capitalize first letter
65+
- no dot (.) at the end
66+
67+
## Body
68+
69+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes". The body should
70+
include the motivation for the change and contrast this with previous behavior.
71+
72+
## Footer
73+
74+
The footer should contain any information about **Breaking Changes** and is also the place to reference GitHub issues
75+
that this commit **Closes**.
76+
77+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit
78+
message is then used for this.

.github/FUNDING.yml

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

.github/ISSUE_TEMPLATE.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!-- CLICK "Preview" FOR INSTRUCTIONS IN A MORE READABLE FORMAT -->
2+
3+
## Prerequisites
4+
5+
- Ensure the issue isn't already reported.
6+
- Ensure you are reporting the bug in the correct repository.
7+
8+
*Delete the above section and the instructions in the sections below before submitting*
9+
10+
## Description
11+
12+
If this is a feature request, explain why it should be added. Specific use-cases and problems that it solve are best.
13+
14+
For bug reports, please provide as much *relevant* info as possible.
15+
16+
## Package version
17+
18+
<!-- YOUR ANSWER -->
19+
20+
## Error Message & Stack Trace
21+
22+
## Relevant Information

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!-- CLICK "Preview" FOR INSTRUCTIONS IN A MORE READABLE FORMAT -->
2+
3+
## Proposed changes
4+
5+
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
6+
If it fixes a bug or resolves a feature request, be sure to link to that issue.
7+
8+
## Types of changes
9+
10+
What types of changes does your code introduce?
11+
12+
_Put an `x` in the boxes that apply_
13+
14+
- [ ] Bugfix (non-breaking change which fixes an issue)
15+
- [ ] New feature (non-breaking change which adds functionality)
16+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
17+
18+
## Checklist
19+
20+
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of
21+
them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before
22+
merging your code._
23+
24+
- [ ] I have read the [CONTRIBUTING](https://github.com/secjs/storage/blob/master/CONTRIBUTING.md) documentation
25+
- [ ] Lint and unit tests pass locally with my changes
26+
- [ ] I have added tests that prove my fix is effective or that my feature works.
27+
- [ ] I have added necessary documentation (if appropriate)
28+
29+
## Further comments
30+
31+
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you
32+
did and what alternatives you considered, etc...

.github/storage.png

21.3 KB
Loading

.github/workflows/cd.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CD Storage
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-18.04
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: actions/setup-node@v1
20+
with:
21+
node-version: '14.x'
22+
registry-url: 'https://registry.npmjs.org'
23+
24+
- name: Download dependencies
25+
run: npm install
26+
27+
- name: Transpile typescript to javascript
28+
run: npm run build
29+
30+
- name: Automatic GitHub Release
31+
uses: justincy/github-action-npm-release@2.0.1
32+
id: release
33+
34+
- name: Publish to NPM Registry
35+
run: npm publish --access public
36+
if: steps.release.outputs.released == 'true'
37+
env:
38+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
name: Deploy

.github/workflows/ci.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: CI Storage
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
11+
runs-on: ubuntu-18.04
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v2
16+
with:
17+
fetch-depth: 0
18+
19+
- uses: actions/setup-node@v1
20+
with:
21+
node-version: '14.x'
22+
registry-url: 'https://registry.npmjs.org'
23+
24+
- name: Download dependencies
25+
run: npm install
26+
27+
- name: Verify project lint and try to fix it
28+
run: npm run lint:fix
29+
30+
- name: Run the tests from project
31+
run: npm run test
32+
env:
33+
APP_NAME: SecJS
34+
APP_URL: https://cdn.secjs.io
35+
AWS_REGION: ${{ secrets.AWS_REGION }}
36+
AWS_KEY: ${{ secrets.AWS_KEY }}
37+
AWS_BUCKET: ${{ secrets.AWS_BUCKET }}
38+
AWS_SECRET: ${{ secrets.AWS_SECRET }}
39+
AWS_ENDPOINT: ${{ secrets.AWS_ENDPOINT }}

.gitignore

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
2+
node_modules/
3+
4+
# Logs
5+
logs
6+
*.log
7+
npm-debug.log*
8+
yarn-debug.log*
9+
yarn-error.log*
10+
lerna-debug.log*
11+
.pnpm-debug.log*
12+
13+
# Diagnostic reports (https://nodejs.org/api/report.html)
14+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
15+
16+
# Runtime data
17+
pids
18+
*.pid
19+
*.seed
20+
*.pid.lock
21+
22+
# Directory for instrumented libs generated by jscoverage/JSCover
23+
lib-cov
24+
25+
# Coverage directory used by tools like istanbul
26+
coverage
27+
*.lcov
28+
29+
# nyc test coverage
30+
.nyc_output
31+
32+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
33+
.grunt
34+
35+
# Bower dependency directory (https://bower.io/)
36+
bower_components
37+
38+
# node-waf configuration
39+
.lock-wscript
40+
41+
# Compiled binary addons (https://nodejs.org/api/addons.html)
42+
build/Release
43+
44+
# Dependency directories
45+
jspm_packages/
46+
47+
# Snowpack dependency directory (https://snowpack.dev/)
48+
web_modules/
49+
50+
# TypeScript cache
51+
*.tsbuildinfo
52+
53+
# Optional npm cache directory
54+
.npm
55+
56+
# Optional eslint cache
57+
.eslintcache
58+
59+
# Microbundle cache
60+
.rpt2_cache/
61+
.rts2_cache_cjs/
62+
.rts2_cache_es/
63+
.rts2_cache_umd/
64+
65+
# Optional REPL history
66+
.node_repl_history
67+
68+
# Output of 'npm pack'
69+
*.tgz
70+
71+
# Yarn Integrity file
72+
.yarn-integrity
73+
74+
# parcel-bundler cache (https://parceljs.org/)
75+
.cache
76+
.parcel-cache
77+
78+
# Next.js build output
79+
.next
80+
out
81+
82+
# Nuxt.js build / generate output
83+
.nuxt
84+
85+
# Gatsby files
86+
.cache/
87+
# Comment in the public line in if your project uses Gatsby and not Next.js
88+
# https://nextjs.org/blog/next-9-1#public-directory-support
89+
# public
90+
91+
# vuepress build output
92+
.vuepress/dist
93+
94+
# Serverless directories
95+
.serverless/
96+
97+
# FuseBox cache
98+
.fusebox/
99+
100+
# DynamoDB Local files
101+
.dynamodb/
102+
103+
# TernJS port file
104+
.tern-port
105+
106+
# Stores VSCode versions used for testing VSCode extensions
107+
.vscode-test
108+
109+
# yarn v2
110+
.yarn/cache
111+
.yarn/unplugged
112+
.yarn/build-state.yml
113+
.yarn/install-state.gz
114+
.pnp.*
115+
116+
# IDE
117+
.idea
118+
.vscode
119+
120+
# dotenv environment variables file
121+
.env
122+
.env.testing
123+
.env.production
124+
125+
# Build files
126+
*.js
127+
*.d.ts
128+
dist
129+
build
130+
131+
storage

0 commit comments

Comments
 (0)