@lad-tech/nsc-toolkit 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +104 -0
- package/.github/workflows/{publish-package-to-npmjs.yml → main_workflow.yml} +16 -6
- package/CHANGELOG.md +2 -2
- package/README.md +4 -0
- package/coverage/clover.xml +578 -0
- package/coverage/coverage-final.json +12 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +146 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +1095 -0
- package/lefthook.yml +2 -2
- package/package.json +18 -10
- package/tsconfig.json +1 -1
- package/.eslintrc.js +0 -106
- package/dist/Client.js +0 -240
- package/dist/Client.js.map +0 -1
- package/dist/Method.js +0 -7
- package/dist/Method.js.map +0 -1
- package/dist/Root.js +0 -67
- package/dist/Root.js.map +0 -1
- package/dist/Service.js +0 -493
- package/dist/Service.js.map +0 -1
- package/dist/StreamManager.js +0 -109
- package/dist/StreamManager.js.map +0 -1
- package/dist/index.js +0 -22
- package/dist/index.js.map +0 -1
- package/dist/injector.js +0 -39
- package/dist/injector.js.map +0 -1
- package/dist/interfaces.js +0 -4
- package/dist/interfaces.js.map +0 -1
- package/dist/types/Client.d.ts +0 -29
- package/dist/types/Method.d.ts +0 -6
- package/dist/types/Root.d.ts +0 -26
- package/dist/types/Service.d.ts +0 -99
- package/dist/types/StreamManager.d.ts +0 -20
- package/dist/types/index.d.ts +0 -5
- package/dist/types/injector.d.ts +0 -11
- package/dist/types/interfaces.d.ts +0 -135
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
"parser": "@typescript-eslint/parser",
|
|
4
|
+
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"],
|
|
5
|
+
"plugins": ["@typescript-eslint", "prettier"],
|
|
6
|
+
"parserOptions": {
|
|
7
|
+
"ecmaVersion": 2020
|
|
8
|
+
},
|
|
9
|
+
"env": {
|
|
10
|
+
"node": true,
|
|
11
|
+
"es2021": true
|
|
12
|
+
},
|
|
13
|
+
"rules": {
|
|
14
|
+
"@typescript-eslint/ban-types": [1],
|
|
15
|
+
"@typescript-eslint/no-this-alias": [1],
|
|
16
|
+
"function-paren-newline": 0,
|
|
17
|
+
"@typescript-eslint/semi": [0],
|
|
18
|
+
"@typescript-eslint/no-namespace": [0],
|
|
19
|
+
"@typescript-eslint/no-non-null-asserted-optional-chain": [0],
|
|
20
|
+
"@typescript-eslint/no-explicit-any": [0],
|
|
21
|
+
"@typescript-eslint/no-unused-vars": [0],
|
|
22
|
+
"no-unused-vars": [0],
|
|
23
|
+
"semi": "off",
|
|
24
|
+
"comma-dangle": [0, "always-multiline"],
|
|
25
|
+
"spaced-comment": 0,
|
|
26
|
+
"no-extra-semi": [2],
|
|
27
|
+
"react/prop-types": 0,
|
|
28
|
+
"no-extra-boolean-cast": 0,
|
|
29
|
+
"quote-props": 0,
|
|
30
|
+
"object-curly-spacing": ["error", "always"],
|
|
31
|
+
"camelcase": 0,
|
|
32
|
+
"no-nested-ternary": 0,
|
|
33
|
+
"no-constant-condition": 0,
|
|
34
|
+
"no-useless-escape": 0,
|
|
35
|
+
"no-async-promise-executor": [0],
|
|
36
|
+
"prefer-rest-params": 0,
|
|
37
|
+
"no-inner-declarations": 0,
|
|
38
|
+
"react/jsx-wrap-multilines": 0,
|
|
39
|
+
"object-curly-newline": 0,
|
|
40
|
+
"operator-linebreak": 0,
|
|
41
|
+
"no-unused-expressions": 0,
|
|
42
|
+
"global-require": 0,
|
|
43
|
+
"max-len": 0,
|
|
44
|
+
"import/no-cycle": 0,
|
|
45
|
+
"no-underscore-dangle": 0,
|
|
46
|
+
"no-return-assign": 0,
|
|
47
|
+
"import/prefer-default-export": 0,
|
|
48
|
+
"jsx-quotes": ["error", "prefer-double"],
|
|
49
|
+
"arrow-parens": 0,
|
|
50
|
+
"eol-last": 0,
|
|
51
|
+
"consistent-return": 0,
|
|
52
|
+
"no-console": [0],
|
|
53
|
+
"no-angle-bracket-type-assertion": [0],
|
|
54
|
+
"ordered-imports": [0],
|
|
55
|
+
"object-literal-sort-keys": [0],
|
|
56
|
+
"no-string-literal": [0],
|
|
57
|
+
"eofline": [0],
|
|
58
|
+
"only-arrow-functions": [0],
|
|
59
|
+
"forin": [0],
|
|
60
|
+
"no-big-function": [0],
|
|
61
|
+
"cognitive-complexity": [0],
|
|
62
|
+
"member-ordering": [
|
|
63
|
+
0,
|
|
64
|
+
{
|
|
65
|
+
"order": "fields-first"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
"no-shadowed-variable": [0],
|
|
69
|
+
"no-unused-expression": [0],
|
|
70
|
+
"object-shorthand": [
|
|
71
|
+
"error",
|
|
72
|
+
"always",
|
|
73
|
+
{
|
|
74
|
+
"avoidQuotes": true
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"no-reference": [0],
|
|
78
|
+
"trailing-comma": [
|
|
79
|
+
0,
|
|
80
|
+
{
|
|
81
|
+
"multiline": {
|
|
82
|
+
"objects": "always",
|
|
83
|
+
"arrays": "always",
|
|
84
|
+
"functions": "always",
|
|
85
|
+
"typeLiterals": "ignore",
|
|
86
|
+
"imports": "ignore",
|
|
87
|
+
"exports": "ignore"
|
|
88
|
+
},
|
|
89
|
+
"singleline": "never",
|
|
90
|
+
"esSpecCompliant": true
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"no-prototype-builtins": [1],
|
|
94
|
+
"@typescript-eslint/no-non-null-assertion": [1]
|
|
95
|
+
},
|
|
96
|
+
"settings": {
|
|
97
|
+
"import/resolver": {
|
|
98
|
+
"node": {
|
|
99
|
+
"extensions": [".js", ".jsx", ".ts", ".tsx"],
|
|
100
|
+
"moduleDirectory": ["node_modules", "./packages"]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Main workflow
|
|
2
2
|
on:
|
|
3
|
-
push
|
|
4
|
-
branches: [ main ]
|
|
3
|
+
push
|
|
5
4
|
env:
|
|
6
5
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
7
6
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
@@ -19,12 +18,23 @@ jobs:
|
|
|
19
18
|
node-version: ${{ matrix.node-version }}
|
|
20
19
|
cache: 'npm'
|
|
21
20
|
registry-url: 'https://registry.npmjs.org'
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
-
|
|
21
|
+
- name: Install deps
|
|
22
|
+
run: npm i
|
|
23
|
+
- name: Build
|
|
24
|
+
run: npm run build
|
|
25
|
+
- name: Test
|
|
26
|
+
run: npm run test
|
|
27
|
+
- name: Push to NPM
|
|
28
|
+
if: ${{github.ref == 'refs/heads/main'}}
|
|
29
|
+
run: npx semantic-release
|
|
25
30
|
env:
|
|
26
31
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
27
32
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
28
33
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
34
|
+
- name: Coveralls
|
|
35
|
+
if: ${{github.ref == 'refs/heads/main'}}
|
|
36
|
+
uses: coverallsapp/github-action@master
|
|
37
|
+
with:
|
|
38
|
+
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
29
39
|
|
|
30
40
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# [1.
|
|
1
|
+
# [1.5.0](https://github.com/lad-tech/nsc-toolkit/compare/v1.4.0...v1.5.0) (2023-01-18)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* Объединенный CI ([eb097de](https://github.com/lad-tech/nsc-toolkit/commit/eb097de99f3d976ab2fd55c73c6e430ef4991d70))
|
package/README.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
[](https://coveralls.io/github/lad-tech/nsc-toolkit?branch=main)
|
|
2
|
+
[](https://snyk.io/test/github/lad-tech/nsc-toolkit)
|
|
3
|
+
[](https://badge.fury.io/js/@lad-tech%2Fnsc-toolkit)
|
|
4
|
+
|
|
1
5
|
nsc-toolkit (NATS service creator toolkit) - это набор инструментов для создания сервис-ориентированная архитектуры вокруг брокера сообщений [NATS](https://nats.io/). Основная идеология тулкита - это простой инструмент с минимальным количеством зависимостей позволяющий создавать сервисы с помощью интсрументов кодогенерации на основе простого описания в JSON.
|
|
2
6
|
|
|
3
7
|
## Возможности
|