fix: delete enum proto file
All checks were successful
Publish / Publish Job (push) Successful in 2m40s
All checks were successful
Publish / Publish Job (push) Successful in 2m40s
This commit is contained in:
19
.github/workflows/publish.yml
vendored
19
.github/workflows/publish.yml
vendored
@@ -41,28 +41,19 @@ jobs:
|
|||||||
- name: Install deps
|
- name: Install deps
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
# 1. СНАЧАЛА генерируем .ts и .go файлы (переместили шаг выше)
|
- name: Build
|
||||||
|
run: npm run build
|
||||||
|
|
||||||
|
# 3. Исправленный шаг генерации (команды разделены, добавлено создание папки)
|
||||||
- name: Generate Protobuf
|
- name: Generate Protobuf
|
||||||
run: |
|
run: |
|
||||||
npm install -g ts-proto
|
npm install -g ts-proto
|
||||||
mkdir -p ./gen/go
|
mkdir -p ./gen/go # Создаем вложенную папку для Go
|
||||||
protoc -I ./proto ./proto/*.proto \
|
protoc -I ./proto ./proto/*.proto \
|
||||||
--ts_proto_out=nestJs=true,addGrpcMetadata=true,package=omit:./gen \
|
--ts_proto_out=nestJs=true,addGrpcMetadata=true,package=omit:./gen \
|
||||||
--go_out=paths=source_relative:./gen/go \
|
--go_out=paths=source_relative:./gen/go \
|
||||||
--go-grpc_out=paths=source_relative:./gen/go
|
--go-grpc_out=paths=source_relative:./gen/go
|
||||||
|
|
||||||
# 2. ЗАТЕМ собираем основной проект (если у вас есть другая логика в src/)
|
|
||||||
- name: Build
|
|
||||||
run: npm run build
|
|
||||||
|
|
||||||
# 3. НОВЫЙ ШАГ: Компилируем протобуфы в JS прямо внутри папки gen/
|
|
||||||
# Это гарантирует, что рядом с account.ts появится account.js и account.d.ts,
|
|
||||||
# и NestJS найдет их по точному пути без изменения импортов!
|
|
||||||
- name: Compile generated TS to JS in-place
|
|
||||||
run: |
|
|
||||||
cd gen
|
|
||||||
npx tsc *.ts --declaration --module commonjs --target es2021 --esModuleInterop --skipLibCheck --ignoreConfig
|
|
||||||
|
|
||||||
- name: Commit and push changes
|
- name: Commit and push changes
|
||||||
run: |
|
run: |
|
||||||
# Представляемся Git-ботом
|
# Представляемся Git-ботом
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@lendry-erp/contracts",
|
"name": "@lendry-erp/contracts",
|
||||||
"version": "1.0.37",
|
"version": "1.0.38",
|
||||||
"description": "Protobuf definitions and generated TypeScript types",
|
"description": "Protobuf definitions and generated TypeScript types",
|
||||||
"type": "commonjs",
|
"type": "commonjs",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ message GetAccountResponse {
|
|||||||
repeated string roles = 8;
|
repeated string roles = 8;
|
||||||
string avatar_url = 9;
|
string avatar_url = 9;
|
||||||
optional string employee_id = 10;
|
optional string employee_id = 10;
|
||||||
Presence presence = 11;
|
string presence = 11;
|
||||||
string last_active = 12;
|
string last_active = 12;
|
||||||
string custom_status_text = 13;
|
string custom_status_text = 13;
|
||||||
string custom_status_emoji = 14;
|
string custom_status_emoji = 14;
|
||||||
@@ -33,10 +33,4 @@ message GetAccountResponse {
|
|||||||
bool has_pin = 18;
|
bool has_pin = 18;
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Presence {
|
|
||||||
PRESENCE_UNSPECIFIED = 0;
|
|
||||||
OFFLINE = 1;
|
|
||||||
ONLINE = 2;
|
|
||||||
AWAY = 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user