Skip to content

Commit 951c958

Browse files
committed
feat: first commit
0 parents  commit 951c958

23 files changed

+14222
-0
lines changed

.commitlintrc.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"extends": ["@commitlint/config-angular"],
3+
"rules": {
4+
"subject-case": [
5+
2,
6+
"always",
7+
["sentence-case", "start-case", "pascal-case", "upper-case", "lower-case"]
8+
],
9+
"type-enum": [
10+
2,
11+
"always",
12+
[
13+
"build",
14+
"chore",
15+
"ci",
16+
"docs",
17+
"feat",
18+
"fix",
19+
"perf",
20+
"refactor",
21+
"revert",
22+
"style",
23+
"test",
24+
"sample"
25+
]
26+
]
27+
}
28+
}

.eslintignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
src/**/*.test.ts
2+
src/**/files/**
3+
test/**

.eslintrc.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
module.exports = {
2+
parser: '@typescript-eslint/parser',
3+
parserOptions: {
4+
project: 'tsconfig.json',
5+
sourceType: 'module',
6+
},
7+
plugins: ['@typescript-eslint/eslint-plugin'],
8+
extends: [
9+
'plugin:@typescript-eslint/eslint-recommended',
10+
'plugin:@typescript-eslint/recommended',
11+
'prettier',
12+
'prettier/@typescript-eslint'
13+
],
14+
root: true,
15+
env: {
16+
node: true,
17+
jest: true,
18+
},
19+
rules: {
20+
'@typescript-eslint/interface-name-prefix': 'off',
21+
'@typescript-eslint/explicit-function-return-type': 'off',
22+
'@typescript-eslint/no-explicit-any': 'off',
23+
'@typescript-eslint/no-use-before-define': 'off',
24+
'@typescript-eslint/no-non-null-assertion': 'off'
25+
},
26+
};

.gitignore

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# dependencies
2+
/node_modules
3+
4+
# IDE
5+
/.idea
6+
/.awcache
7+
/.vscode
8+
9+
# misc
10+
npm-debug.log
11+
.DS_Store
12+
13+
# tests
14+
/test
15+
/coverage
16+
/.nyc_output
17+
18+
# dist
19+
dist

.npmignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# source
2+
lib
3+
tests
4+
index.ts
5+
package-lock.json
6+
tslint.json
7+
tsconfig.json
8+
.prettierrc
9+
10+
# github
11+
.github
12+
CONTRIBUTING.md
13+
renovate.json
14+
15+
# ci
16+
.circleci

.prettierrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"trailingComma": "all",
3+
"singleQuote": true,
4+
"arrowParens": "avoid"
5+
}

.release-it.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"git": {
3+
"commitMessage": "chore(): release v${version}"
4+
},
5+
"github": {
6+
"release": true
7+
}
8+
}

index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './dist';

lib/storage-host.module.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { Global, Module } from '@nestjs/common';
2+
import { STORAGE_SERVICE_TOKEN, STORAGE_TOKEN } from './storage.constants';
3+
import { StorageService } from './storage.service';
4+
5+
@Global()
6+
@Module({
7+
providers: [
8+
{
9+
provide: STORAGE_TOKEN,
10+
useFactory: () => ({}),
11+
},
12+
{
13+
provide: STORAGE_SERVICE_TOKEN,
14+
useClass: StorageService,
15+
},
16+
],
17+
exports: [STORAGE_TOKEN, STORAGE_SERVICE_TOKEN],
18+
})
19+
export class StorageHostModule {}

lib/storage.constants.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/**
2+
* Injection tokens
3+
*/
4+
export const STORAGE_SERVICE_TOKEN = Symbol('STORAGE_SERVICE');
5+
export const STORAGE_TOKEN = 'STORAGE_TOKEN';

0 commit comments

Comments
 (0)