defines.ts 721 B

123456789101112131415161718
  1. /**
  2. * Shared MACRO define map used by both dev.ts (runtime -d flags)
  3. * and build.ts (Bun.build define option).
  4. *
  5. * Each value is a JSON-stringified expression that replaces the
  6. * corresponding MACRO.* identifier at transpile / bundle time.
  7. */
  8. export function getMacroDefines(): Record<string, string> {
  9. return {
  10. "MACRO.VERSION": JSON.stringify("2.1.888"),
  11. "MACRO.BUILD_TIME": JSON.stringify(new Date().toISOString()),
  12. "MACRO.FEEDBACK_CHANNEL": JSON.stringify(""),
  13. "MACRO.ISSUES_EXPLAINER": JSON.stringify(""),
  14. "MACRO.NATIVE_PACKAGE_URL": JSON.stringify(""),
  15. "MACRO.PACKAGE_URL": JSON.stringify(""),
  16. "MACRO.VERSION_CHANGELOG": JSON.stringify(""),
  17. };
  18. }