Compare commits
10 Commits
7f6ae4ddc0
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5d18a63e5 | ||
|
|
0c494faa6b | ||
|
|
54bff3da7d | ||
|
|
7cbe61f226 | ||
|
|
287cd340de | ||
|
|
d4196e16f9 | ||
|
|
4a1eb650f4 | ||
|
|
e55fd159cb | ||
|
|
1eb1d4b946 | ||
|
|
c956cd29f0 |
8
.github/workflows/publish.yml
vendored
8
.github/workflows/publish.yml
vendored
@@ -17,13 +17,17 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
registry-url: "https://registry.npmjs.org/"
|
registry-url: "https://git.lendry.ru/api/packages/lendry-erp/npm/"
|
||||||
|
scope: "@lendry-erp"
|
||||||
|
|
||||||
- name: Install protoc
|
- name: Install protoc
|
||||||
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
|
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
|
||||||
|
|
||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: npm install
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
- name: Generate TS Protobuf
|
- name: Generate TS Protobuf
|
||||||
run: npm run generate
|
run: npm run generate
|
||||||
|
|||||||
39
package-lock.json
generated
39
package-lock.json
generated
@@ -1,16 +1,20 @@
|
|||||||
{
|
{
|
||||||
"name": "@lendry-erp/contracts",
|
"name": "@lendry-erp/contracts",
|
||||||
"version": "1.0.0",
|
"version": "1.0.6",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "@lendry-erp/contracts",
|
"name": "@lendry-erp/contracts",
|
||||||
"version": "1.0.0",
|
"version": "1.0.6",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nestjs/microservices": "^11.1.17",
|
"@nestjs/microservices": "^11.1.17",
|
||||||
"rxjs": "^7.8.2",
|
"rxjs": "^7.8.2",
|
||||||
"ts-proto": "^2.11.6"
|
"ts-proto": "^2.11.6"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^25.5.0",
|
||||||
|
"typescript": "^6.0.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@borewit/text-codec": {
|
"node_modules/@borewit/text-codec": {
|
||||||
@@ -214,6 +218,16 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"peer": true
|
"peer": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/node": {
|
||||||
|
"version": "25.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-25.5.0.tgz",
|
||||||
|
"integrity": "sha512-jp2P3tQMSxWugkCUKLRPVUpGaL5MVFwF8RDuSRztfwgN1wmqJeMSbKlnEtQqU8UrhTmzEmZdu2I6v2dpp7XIxw==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"undici-types": "~7.18.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/case-anything": {
|
"node_modules/case-anything": {
|
||||||
"version": "2.1.13",
|
"version": "2.1.13",
|
||||||
"resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz",
|
"resolved": "https://registry.npmjs.org/case-anything/-/case-anything-2.1.13.tgz",
|
||||||
@@ -460,6 +474,20 @@
|
|||||||
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
"integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==",
|
||||||
"license": "0BSD"
|
"license": "0BSD"
|
||||||
},
|
},
|
||||||
|
"node_modules/typescript": {
|
||||||
|
"version": "6.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.2.tgz",
|
||||||
|
"integrity": "sha512-bGdAIrZ0wiGDo5l8c++HWtbaNCWTS4UTv7RaTH/ThVIgjkveJt83m74bBHMJkuCbslY8ixgLBVZJIOiQlQTjfQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "Apache-2.0",
|
||||||
|
"bin": {
|
||||||
|
"tsc": "bin/tsc",
|
||||||
|
"tsserver": "bin/tsserver"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.17"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/uid": {
|
"node_modules/uid": {
|
||||||
"version": "2.0.2",
|
"version": "2.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/uid/-/uid-2.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/uid/-/uid-2.0.2.tgz",
|
||||||
@@ -485,6 +513,13 @@
|
|||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"node_modules/undici-types": {
|
||||||
|
"version": "7.18.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz",
|
||||||
|
"integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
package.json
10
package.json
@@ -1,12 +1,16 @@
|
|||||||
{
|
{
|
||||||
"name": "@lendry-erp/contracts",
|
"name": "@lendry-erp/contracts",
|
||||||
"version": "1.0.2",
|
"version": "1.0.0",
|
||||||
"description": "Protobuf definitions and generated TypeScript types",
|
"description": "Protobuf definitions and generated TypeScript types",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
|
"main": "./dist/index.js",
|
||||||
|
"types": "./dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "tsc -p tsconfig.build.json",
|
||||||
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
"generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
"dist",
|
||||||
"proto",
|
"proto",
|
||||||
"gen"
|
"gen"
|
||||||
],
|
],
|
||||||
@@ -17,5 +21,9 @@
|
|||||||
"@nestjs/microservices": "^11.1.17",
|
"@nestjs/microservices": "^11.1.17",
|
||||||
"rxjs": "^7.8.2",
|
"rxjs": "^7.8.2",
|
||||||
"ts-proto": "^2.11.6"
|
"ts-proto": "^2.11.6"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/node": "^25.5.0",
|
||||||
|
"typescript": "^6.0.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,9 +50,8 @@ message RegisterResponse {
|
|||||||
|
|
||||||
message Verify2FaRequest {
|
message Verify2FaRequest {
|
||||||
string temp_token = 1;
|
string temp_token = 1;
|
||||||
string totp_code = 2;
|
optional string totp_code = 2;
|
||||||
string telegram_code = 3;
|
optional string telegram_code = 3;
|
||||||
string reserve_code = 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message Verify2FaResponse {
|
message Verify2FaResponse {
|
||||||
|
|||||||
1
src/index.ts
Normal file
1
src/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from "./proto";
|
||||||
1
src/proto/index.ts
Normal file
1
src/proto/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from "./paths";
|
||||||
5
src/proto/paths.ts
Normal file
5
src/proto/paths.ts
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
import { join } from "path";
|
||||||
|
|
||||||
|
export const PROTO_PATHS = {
|
||||||
|
AUTH: join(__dirname, "../../proto/identity.proto"),
|
||||||
|
} as const;
|
||||||
11
tsconfig.build.json
Normal file
11
tsconfig.build.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"extends": "./tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"declaration": true,
|
||||||
|
"outDir": "./dist",
|
||||||
|
"rootDir": "./src",
|
||||||
|
"types": ["node"]
|
||||||
|
},
|
||||||
|
"include": ["src/**/*"],
|
||||||
|
"exclude": ["node_module", "dist", "test"]
|
||||||
|
}
|
||||||
11
tsconfig.json
Normal file
11
tsconfig.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "commonjs",
|
||||||
|
"target": "es2024",
|
||||||
|
"strict": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"skipLibCheck": true,
|
||||||
|
"forceConsistentCasingInFileNames": true,
|
||||||
|
"strictNullChecks": false
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user