mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
fix: use package node modules
This commit is contained in:
1 parent
2ea22512d4
commit
6c8fbf7245
1 file changed
+3
-2
@@ -4,6 +4,7 @@ import { readdir, rm } from "fs/promises";
|
|||||||
import { promisify } from "util";
|
import { promisify } from "util";
|
||||||
|
|
||||||
const MAX_COMMAND_LENGTH = 2 ** 11;
|
const MAX_COMMAND_LENGTH = 2 ** 11;
|
||||||
|
const TS_PROTO_EXECUTABLE = "./node_modules/.bin/protoc-gen-ts_proto";
|
||||||
|
|
||||||
const roots = [
|
const roots = [
|
||||||
// "../../packages/core/src/protos",
|
// "../../packages/core/src/protos",
|
||||||
@@ -14,7 +15,7 @@ const exec = promisify(execSync);
|
|||||||
|
|
||||||
let executableFileExtension: string;
|
let executableFileExtension: string;
|
||||||
|
|
||||||
if (existsSync("../../node_modules/.bin/protoc-gen-ts_proto.exe")) {
|
if (existsSync(`${TS_PROTO_EXECUTABLE}.exe`)) {
|
||||||
executableFileExtension = ".exe";
|
executableFileExtension = ".exe";
|
||||||
} else {
|
} else {
|
||||||
executableFileExtension = "";
|
executableFileExtension = "";
|
||||||
@@ -32,7 +33,7 @@ for (const root of roots) {
|
|||||||
while (files.length > 0) {
|
while (files.length > 0) {
|
||||||
let command = [
|
let command = [
|
||||||
"protoc",
|
"protoc",
|
||||||
`--plugin=../../node_modules/.bin/protoc-gen-ts_proto${executableFileExtension}`,
|
`--plugin=${TS_PROTO_EXECUTABLE}${executableFileExtension}`,
|
||||||
"--ts_proto_opt=esModuleInterop=true",
|
"--ts_proto_opt=esModuleInterop=true",
|
||||||
"--ts_proto_opt=oneof=unions-value",
|
"--ts_proto_opt=oneof=unions-value",
|
||||||
// "--ts_proto_opt=removeEnumPrefix=true",
|
// "--ts_proto_opt=removeEnumPrefix=true",
|
||||||
|
|||||||
Reference in new issue
Block a user