ts_proto.conf 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. ### # internal
  14. module _TS_PROTO_IMPL: _TS_BASE_UNIT {
  15. .CMD=_TS_PROTO_IMPL_CMD
  16. .IGNORED=GENERATE_ENUM_SERIALIZATION GENERATE_ENUM_SERIALIZATION_WITH_HEADER USE_SKIFF CPP_PROTO_PLUGIN2 PY_PROTO_PLUGIN YMAPS_SPROTO RESOURCE
  17. # We need to collect SRCS paths into list to pass to command
  18. .ALIASES=SRCS=_TS_PROTO_SRCS
  19. # PEERDIR should be resolved to DESC_PROTO submodule
  20. SET(PEERDIR_TAGS DESC_PROTO)
  21. # For users to add some conditional config for TS_PROTO, like
  22. # IF (TS_PROTO)
  23. # MESSAGE(Building TS_PROTO!!!)
  24. ENABLE(TS_PROTO)
  25. # Disable linting
  26. NO_LINT()
  27. SET(MODULE_LANG TS)
  28. _PEERDIR_TS_RESOURCE(typescript)
  29. DISABLE(TS_CONFIG_DEDUCE_OUT)
  30. ENABLE(TS_CONFIG_USE_OUTDIR)
  31. _TS_CONFIGURE()
  32. SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${CURDIR}/package.json ${CURDIR}/pnpm-lock.yaml ${CURDIR}/${TS_CONFIG_PATH})
  33. _TS_ADD_NODE_MODULES_FOR_BUILDER()
  34. }
  35. ### @usage: _TS_PROTO_SRCS(path1 path2) # internal
  36. macro _TS_PROTO_SRCS(FILES...) {
  37. _SET_APPEND_WITH_DIRECTIVE(_TS_PROTO_SRCS_FILES input $FILES)
  38. }