@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.
Files changed (43) hide show
  1. package/.eslintrc.json +104 -0
  2. package/.github/workflows/{publish-package-to-npmjs.yml → main_workflow.yml} +16 -6
  3. package/CHANGELOG.md +2 -2
  4. package/README.md +4 -0
  5. package/coverage/clover.xml +578 -0
  6. package/coverage/coverage-final.json +12 -0
  7. package/coverage/lcov-report/base.css +224 -0
  8. package/coverage/lcov-report/block-navigation.js +87 -0
  9. package/coverage/lcov-report/favicon.png +0 -0
  10. package/coverage/lcov-report/index.html +146 -0
  11. package/coverage/lcov-report/prettify.css +1 -0
  12. package/coverage/lcov-report/prettify.js +2 -0
  13. package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
  14. package/coverage/lcov-report/sorter.js +196 -0
  15. package/coverage/lcov.info +1095 -0
  16. package/lefthook.yml +2 -2
  17. package/package.json +18 -10
  18. package/tsconfig.json +1 -1
  19. package/.eslintrc.js +0 -106
  20. package/dist/Client.js +0 -240
  21. package/dist/Client.js.map +0 -1
  22. package/dist/Method.js +0 -7
  23. package/dist/Method.js.map +0 -1
  24. package/dist/Root.js +0 -67
  25. package/dist/Root.js.map +0 -1
  26. package/dist/Service.js +0 -493
  27. package/dist/Service.js.map +0 -1
  28. package/dist/StreamManager.js +0 -109
  29. package/dist/StreamManager.js.map +0 -1
  30. package/dist/index.js +0 -22
  31. package/dist/index.js.map +0 -1
  32. package/dist/injector.js +0 -39
  33. package/dist/injector.js.map +0 -1
  34. package/dist/interfaces.js +0 -4
  35. package/dist/interfaces.js.map +0 -1
  36. package/dist/types/Client.d.ts +0 -29
  37. package/dist/types/Method.d.ts +0 -6
  38. package/dist/types/Root.d.ts +0 -26
  39. package/dist/types/Service.d.ts +0 -99
  40. package/dist/types/StreamManager.d.ts +0 -20
  41. package/dist/types/index.d.ts +0 -5
  42. package/dist/types/injector.d.ts +0 -11
  43. 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: Publish Package to npmjs
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
- - run: npm i
23
- - run: npm run build
24
- - run: npx semantic-release
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.3.0](https://github.com/lad-tech/nsc-toolkit/compare/v1.2.1...v1.3.0) (2023-01-12)
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
- * Дбавлена боддержка jetStreams ([eda1fce](https://github.com/lad-tech/nsc-toolkit/commit/eda1fce211f4ab7d2760d13073056d2d50bd42a8))
6
+ * Объединенный CI ([eb097de](https://github.com/lad-tech/nsc-toolkit/commit/eb097de99f3d976ab2fd55c73c6e430ef4991d70))
package/README.md CHANGED
@@ -1,3 +1,7 @@
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
+ [![Known Vulnerabilities](https://snyk.io/test/github/lad-tech/nsc-toolkit/badge.svg)](https://snyk.io/test/github/lad-tech/nsc-toolkit)
3
+ [![npm version](https://badge.fury.io/js/@lad-tech%2Fnsc-toolkit.svg)](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
  ## Возможности