response.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. "use strict";
  2. var __defProp = Object.defineProperty;
  3. var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
  4. var __getOwnPropNames = Object.getOwnPropertyNames;
  5. var __hasOwnProp = Object.prototype.hasOwnProperty;
  6. var __export = (target, all) => {
  7. for (var name in all)
  8. __defProp(target, name, { get: all[name], enumerable: true });
  9. };
  10. var __copyProps = (to, from, except, desc) => {
  11. if (from && typeof from === "object" || typeof from === "function") {
  12. for (let key of __getOwnPropNames(from))
  13. if (!__hasOwnProp.call(to, key) && key !== except)
  14. __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
  15. }
  16. return to;
  17. };
  18. var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
  19. // src/utils/response.ts
  20. var response_exports = {};
  21. __export(response_exports, {
  22. RESPONSE_ALREADY_SENT: () => RESPONSE_ALREADY_SENT
  23. });
  24. module.exports = __toCommonJS(response_exports);
  25. // src/utils/response/constants.ts
  26. var X_ALREADY_SENT = "x-hono-already-sent";
  27. // src/utils/response.ts
  28. var RESPONSE_ALREADY_SENT = new Response(null, {
  29. headers: { [X_ALREADY_SENT]: "true" }
  30. });
  31. // Annotate the CommonJS export names for ESM import in node:
  32. 0 && (module.exports = {
  33. RESPONSE_ALREADY_SENT
  34. });