go-duck-cli 1.1.35 → 1.1.36
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/generators/kratos.js +9 -1
- package/package.json +1 -1
package/generators/kratos.js
CHANGED
|
@@ -217,6 +217,8 @@ find api -name "*.proto" -exec protoc --proto_path=. \\
|
|
|
217
217
|
echo "✅ Protos compiled successfully!"
|
|
218
218
|
`;
|
|
219
219
|
const generateBat = `@echo off
|
|
220
|
+
setlocal enabledelayedexpansion
|
|
221
|
+
|
|
220
222
|
echo 🦆 Syncing Protobuf Dependencies...
|
|
221
223
|
if not exist "third_party\\google\\api" mkdir "third_party\\google\\api"
|
|
222
224
|
curl -sSL https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/annotations.proto > third_party\\google\\api\\annotations.proto
|
|
@@ -230,7 +232,13 @@ if %errorlevel% neq 0 (
|
|
|
230
232
|
)
|
|
231
233
|
|
|
232
234
|
for /f "tokens=*" %%f in ('dir /b /s api\\*.proto') do (
|
|
233
|
-
|
|
235
|
+
set "abspath=%%f"
|
|
236
|
+
set "relpath=!abspath:%CD%\\=!"
|
|
237
|
+
protoc --proto_path=. --proto_path=./api --proto_path=./third_party --go_out=paths=source_relative:. --go-grpc_out=paths=source_relative:. "!relpath!"
|
|
238
|
+
if !errorlevel! neq 0 (
|
|
239
|
+
echo ❌ Error: Failed to compile !relpath!
|
|
240
|
+
exit /b 1
|
|
241
|
+
)
|
|
234
242
|
)
|
|
235
243
|
|
|
236
244
|
echo ✅ Protos compiled successfully!
|