ts_proto.conf 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. _TS_PROTO_SRCS_FILES=
  2. _TS_PROTO_IMPL_CMD=$TOUCH_UNIT \
  3. && $_TS_FILES_COPY_CMD \
  4. && $NOTS_TOOL $NOTS_TOOL_BASE_ARGS build-ts-proto $NOTS_TOOL_COMMON_BUILDER_ARGS \
  5. --protoc-bin $PROTOC \
  6. --proto-srcs $_TS_PROTO_SRCS_FILES \
  7. --proto-paths ./$PROTO_NAMESPACE $ARCADIA_ROOT/$PROTO_NAMESPACE $_PROTO__INCLUDE $ARCADIA_BUILD_ROOT $PROTOBUF_PATH \
  8. $_NODE_MODULES_INOUTS \
  9. ${input;hide:"package.json"} ${TS_CONFIG_FILES} $_AS_HIDDEN_INPUTS(IN $TS_INPUT_FILES) \
  10. ${output;hide:"package.json"} \
  11. ${hide:PROTO_FAKEID} \
  12. ${kv;hide:"pc magenta"} ${kv;hide:"p TS_PRO"}
  13. module _TS_PROTO_IMPL: _TS_BASE_UNIT {
  14. .CMD=_TS_PROTO_IMPL_CMD
  15. .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_SKIFF CPP_PROTO_PLUGIN2 PY_PROTO_PLUGIN YMAPS_SPROTO RESOURCE
  16. # We need to collect SRCS paths into list to pass to command
  17. .ALIASES=SRCS=_TS_PROTO_SRCS
  18. # PEERDIR should be resolved to DESC_PROTO submodule
  19. SET(PEERDIR_TAGS DESC_PROTO)
  20. # For users to add some conditional config for TS_PROTO, like
  21. # IF (TS_PROTO)
  22. # MESSAGE(Building TS_PROTO!!!)
  23. ENABLE(TS_PROTO)
  24. # Disable linting
  25. NO_LINT()
  26. _PEERDIR_TS_RESOURCE(typescript)
  27. DISABLE(TS_CONFIG_DEDUCE_OUT)
  28. ENABLE(TS_CONFIG_USE_OUTDIR)
  29. _TS_CONFIGURE($TS_CONFIG_PATH)
  30. SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${CURDIR}/package.json ${CURDIR}/pnpm-lock.yaml ${CURDIR}/${TS_CONFIG_PATH})
  31. _TS_ADD_NODE_MODULES_FOR_BUILDER()
  32. }
  33. macro _TS_PROTO_SRCS(FILES...) {
  34. _SET_APPEND_WITH_DIRECTIVE(_TS_PROTO_SRCS_FILES input $FILES)
  35. }