@lad-tech/nsc-toolkit 1.3.0 → 1.4.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.
Files changed (44) hide show
  1. package/.eslintrc.json +104 -0
  2. package/.github/workflows/build-and-test.yml +22 -0
  3. package/.github/workflows/publish-package-to-npmjs.yml +5 -0
  4. package/CHANGELOG.md +2 -2
  5. package/README.md +2 -0
  6. package/coverage/clover.xml +578 -0
  7. package/coverage/coverage-final.json +12 -0
  8. package/coverage/lcov-report/base.css +224 -0
  9. package/coverage/lcov-report/block-navigation.js +87 -0
  10. package/coverage/lcov-report/favicon.png +0 -0
  11. package/coverage/lcov-report/index.html +146 -0
  12. package/coverage/lcov-report/prettify.css +1 -0
  13. package/coverage/lcov-report/prettify.js +2 -0
  14. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  15. package/coverage/lcov-report/sorter.js +196 -0
  16. package/coverage/lcov.info +1095 -0
  17. package/lefthook.yml +2 -2
  18. package/package.json +18 -10
  19. package/tsconfig.json +1 -1
  20. package/.eslintrc.js +0 -106
  21. package/dist/Client.js +0 -240
  22. package/dist/Client.js.map +0 -1
  23. package/dist/Method.js +0 -7
  24. package/dist/Method.js.map +0 -1
  25. package/dist/Root.js +0 -67
  26. package/dist/Root.js.map +0 -1
  27. package/dist/Service.js +0 -493
  28. package/dist/Service.js.map +0 -1
  29. package/dist/StreamManager.js +0 -109
  30. package/dist/StreamManager.js.map +0 -1
  31. package/dist/index.js +0 -22
  32. package/dist/index.js.map +0 -1
  33. package/dist/injector.js +0 -39
  34. package/dist/injector.js.map +0 -1
  35. package/dist/interfaces.js +0 -4
  36. package/dist/interfaces.js.map +0 -1
  37. package/dist/types/Client.d.ts +0 -29
  38. package/dist/types/Method.d.ts +0 -6
  39. package/dist/types/Root.d.ts +0 -26
  40. package/dist/types/Service.d.ts +0 -99
  41. package/dist/types/StreamManager.d.ts +0 -20
  42. package/dist/types/index.d.ts +0 -5
  43. package/dist/types/injector.d.ts +0 -11
  44. 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
+ }
@@ -0,0 +1,22 @@
1
+ name: Build and test
2
+ on:
3
+ push
4
+ jobs:
5
+ build:
6
+ runs-on: ubuntu-latest
7
+ strategy:
8
+ matrix:
9
+ node-version: [ 18.x ]
10
+
11
+ steps:
12
+ - uses: actions/checkout@v3
13
+ - uses: actions/setup-node@v3
14
+ with:
15
+ node-version: ${{ matrix.node-version }}
16
+ cache: 'npm'
17
+ registry-url: 'https://registry.npmjs.org'
18
+ - run: npm i
19
+ - run: npm run build
20
+ - run: npm run test
21
+
22
+
@@ -21,10 +21,15 @@ jobs:
21
21
  registry-url: 'https://registry.npmjs.org'
22
22
  - run: npm i
23
23
  - run: npm run build
24
+ - run: npm run test
24
25
  - run: npx semantic-release
25
26
  env:
26
27
  GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27
28
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
28
29
  NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
30
+ - name: Coveralls
31
+ uses: coverallsapp/github-action@master
32
+ with:
33
+ github-token: ${{ secrets.GITHUB_TOKEN }}
29
34
 
30
35
 
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
- # [1.3.0](https://github.com/lad-tech/nsc-toolkit/compare/v1.2.1...v1.3.0) (2023-01-12)
1
+ # [1.4.0](https://github.com/lad-tech/nsc-toolkit/compare/v1.3.0...v1.4.0) (2023-01-18)
2
2
 
3
3
 
4
4
  ### Features
5
5
 
6
- * Дбавлена боддержка jetStreams ([eda1fce](https://github.com/lad-tech/nsc-toolkit/commit/eda1fce211f4ab7d2760d13073056d2d50bd42a8))
6
+ * Библиотека покрыта тестами ([df5047e](https://github.com/lad-tech/nsc-toolkit/commit/df5047e3f868ecfdc6fc1ca5b60e07e0b7cded39))
package/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Coverage Status](https://coveralls.io/repos/github/lad-tech/nsc-toolkit/badge.svg?branch=main)](https://coveralls.io/github/lad-tech/nsc-toolkit?branch=main)
2
+
1
3
  nsc-toolkit (NATS service creator toolkit) - это набор инструментов для создания сервис-ориентированная архитектуры вокруг брокера сообщений [NATS](https://nats.io/). Основная идеология тулкита - это простой инструмент с минимальным количеством зависимостей позволяющий создавать сервисы с помощью интсрументов кодогенерации на основе простого описания в JSON.
2
4
 
3
5
  ## Возможности