{"version":3,"file":"eventsource.mjs","sources":["../../../../lib/web/eventsource/eventsource.js"],"sourcesContent":["'use strict'\n\nconst { pipeline } = require('node:stream')\nconst { fetching } = require('../fetch')\nconst { webidl } = require('../webidl')\nconst { EventSourceStream } = require('./eventsource-stream')\nconst { parseMIMEType } = require('../fetch/data-url')\nconst { createFastMessageEvent } = require('../websocket/events')\nconst { isNetworkError } = require('../fetch/response')\nconst { kEnumerableProperty } = require('../../core/util')\nconst { environmentSettingsObject } = require('../fetch/util')\nconst { createPotentialCORSRequest } = require('./util')\n\nlet experimentalWarned = false\n\n/**\n * A reconnection time, in milliseconds. This must initially be an implementation-defined value,\n * probably in the region of a few seconds.\n *\n * In Comparison:\n * - Chrome uses 3000ms.\n * - Deno uses 5000ms.\n *\n * @type {3000}\n */\nconst defaultReconnectionTime = 3000\n\n/**\n * The readyState attribute represents the state of the connection.\n * @typedef ReadyState\n * @type {0|1|2}\n * @readonly\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#dom-eventsource-readystate-dev\n */\n\n/**\n * The connection has not yet been established, or it was closed and the user\n * agent is reconnecting.\n * @type {0}\n */\nconst CONNECTING = 0\n\n/**\n * The user agent has an open connection and is dispatching events as it\n * receives them.\n * @type {1}\n */\nconst OPEN = 1\n\n/**\n * The connection is not open, and the user agent is not trying to reconnect.\n * @type {2}\n */\nconst CLOSED = 2\n\n/**\n * Requests for the element will have their mode set to \"cors\" and their credentials mode set to \"same-origin\".\n * @type {'anonymous'}\n */\nconst ANONYMOUS = 'anonymous'\n\n/**\n * Requests for the element will have their mode set to \"cors\" and their credentials mode set to \"include\".\n * @type {'use-credentials'}\n */\nconst USE_CREDENTIALS = 'use-credentials'\n\n/**\n * The EventSource interface is used to receive server-sent events. It\n * connects to a server over HTTP and receives events in text/event-stream\n * format without closing the connection.\n * @extends {EventTarget}\n * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events\n * @api public\n */\nclass EventSource extends EventTarget {\n  #events = {\n    open: null,\n    error: null,\n    message: null\n  }\n\n  #url\n  #withCredentials = false\n\n  /**\n   * @type {ReadyState}\n   */\n  #readyState = CONNECTING\n\n  #request = null\n  #controller = null\n\n  #dispatcher\n\n  /**\n   * @type {import('./eventsource-stream').eventSourceSettings}\n   */\n  #state\n\n  /**\n   * Creates a new EventSource object.\n   * @param {string} url\n   * @param {EventSourceInit} [eventSourceInitDict={}]\n   * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#the-eventsource-interface\n   */\n  constructor (url, eventSourceInitDict = {}) {\n    // 1. Let ev be a new EventSource object.\n    super()\n\n    webidl.util.markAsUncloneable(this)\n\n    const prefix = 'EventSource constructor'\n    webidl.argumentLengthCheck(arguments, 1, prefix)\n\n    if (!experimentalWarned) {\n      experimentalWarned = true\n      process.emitWarning('EventSource is experimental, expect them to change at any time.', {\n        code: 'UNDICI-ES'\n      })\n    }\n\n    url = webidl.converters.USVString(url)\n    eventSourceInitDict = webidl.converters.EventSourceInitDict(eventSourceInitDict, prefix, 'eventSourceInitDict')\n\n    this.#dispatcher = eventSourceInitDict.node.dispatcher || eventSourceInitDict.dispatcher\n    this.#state = {\n      lastEventId: '',\n      reconnectionTime: eventSourceInitDict.node.reconnectionTime\n    }\n\n    // 2. Let settings be ev's relevant settings object.\n    // https://html.spec.whatwg.org/multipage/webappapis.html#environment-settings-object\n    const settings = environmentSettingsObject\n\n    let urlRecord\n\n    try {\n      // 3. Let urlRecord be the result of encoding-parsing a URL given url, relative to settings.\n      urlRecord = new URL(url, settings.settingsObject.baseUrl)\n      this.#state.origin = urlRecord.origin\n    } catch (e) {\n      // 4. If urlRecord is failure, then throw a \"SyntaxError\" DOMException.\n      throw new DOMException(e, 'SyntaxError')\n    }\n\n    // 5. Set ev's url to urlRecord.\n    this.#url = urlRecord.href\n\n    // 6. Let corsAttributeState be Anonymous.\n    let corsAttributeState = ANONYMOUS\n\n    // 7. If the value of eventSourceInitDict's withCredentials member is true,\n    // then set corsAttributeState to Use Credentials and set ev's\n    // withCredentials attribute to true.\n    if (eventSourceInitDict.withCredentials === true) {\n      corsAttributeState = USE_CREDENTIALS\n      this.#withCredentials = true\n    }\n\n    // 8. Let request be the result of creating a potential-CORS request given\n    // urlRecord, the empty string, and corsAttributeState.\n    const request = createPotentialCORSRequest(urlRecord, '', corsAttributeState)\n\n    // 9. Set request's client to settings.\n    request.client = environmentSettingsObject.settingsObject\n\n    // 10. User agents may set (`Accept`, `text/event-stream`) in request's header list.\n    request.headersList.set('Accept', 'text/event-stream')\n\n    // 11. Set request's cache mode to \"no-store\".\n    request.cache = 'no-store'\n\n    // 12. Set request's initiator type to \"other\".\n    request.initiator = 'other'\n\n    // 13. Set ev's request to request.\n    this.#request = request\n\n    this.#connect()\n  }\n\n  /**\n   * Returns the state of this EventSource object's connection. It can have the\n   * values described below.\n   * @returns {ReadyState}\n   * @readonly\n   */\n  get readyState () {\n    return this.#readyState\n  }\n\n  /**\n   * Returns the URL providing the event stream.\n   * @readonly\n   * @returns {string}\n   */\n  get url () {\n    return this.#url\n  }\n\n  /**\n   * Returns a boolean indicating whether the EventSource object was\n   * instantiated with CORS credentials set (true), or not (false, the default).\n   */\n  get withCredentials () {\n    return this.#withCredentials\n  }\n\n  #connect () {\n    if (this.#readyState === CLOSED) return\n\n    this.#readyState = CONNECTING\n\n    const fetchParams = {\n      request: this.#request,\n      dispatcher: this.#dispatcher\n    }\n\n    // 14. Let processEventSourceEndOfBody given response res be the following step: if res is not a network error, then reestablish the connection.\n    const processEventSourceEndOfBody = (response) => {\n      if (!isNetworkError(response)) {\n        return this.#reconnect()\n      }\n    }\n\n    // 15. Fetch request, with processResponseEndOfBody set to processEventSourceEndOfBody...\n    fetchParams.processResponseEndOfBody = processEventSourceEndOfBody\n\n    // and processResponse set to the following steps given response res:\n    fetchParams.processResponse = (response) => {\n      // 1. If res is an aborted network error, then fail the connection.\n\n      if (isNetworkError(response)) {\n        // 1. When a user agent is to fail the connection, the user agent\n        // must queue a task which, if the readyState attribute is set to a\n        // value other than CLOSED, sets the readyState attribute to CLOSED\n        // and fires an event named error at the EventSource object. Once the\n        // user agent has failed the connection, it does not attempt to\n        // reconnect.\n        if (response.aborted) {\n          this.close()\n          this.dispatchEvent(new Event('error'))\n          return\n          // 2. Otherwise, if res is a network error, then reestablish the\n          // connection, unless the user agent knows that to be futile, in\n          // which case the user agent may fail the connection.\n        } else {\n          this.#reconnect()\n          return\n        }\n      }\n\n      // 3. Otherwise, if res's status is not 200, or if res's `Content-Type`\n      // is not `text/event-stream`, then fail the connection.\n      const contentType = response.headersList.get('content-type', true)\n      const mimeType = contentType !== null ? parseMIMEType(contentType) : 'failure'\n      const contentTypeValid = mimeType !== 'failure' && mimeType.essence === 'text/event-stream'\n      if (\n        response.status !== 200 ||\n        contentTypeValid === false\n      ) {\n        this.close()\n        this.dispatchEvent(new Event('error'))\n        return\n      }\n\n      // 4. Otherwise, announce the connection and interpret res's body\n      // line by line.\n\n      // When a user agent is to announce the connection, the user agent\n      // must queue a task which, if the readyState attribute is set to a\n      // value other than CLOSED, sets the readyState attribute to OPEN\n      // and fires an event named open at the EventSource object.\n      // @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model\n      this.#readyState = OPEN\n      this.dispatchEvent(new Event('open'))\n\n      // If redirected to a different origin, set the origin to the new origin.\n      this.#state.origin = response.urlList[response.urlList.length - 1].origin\n\n      const eventSourceStream = new EventSourceStream({\n        eventSourceSettings: this.#state,\n        push: (event) => {\n          this.dispatchEvent(createFastMessageEvent(\n            event.type,\n            event.options\n          ))\n        }\n      })\n\n      pipeline(response.body.stream,\n        eventSourceStream,\n        (error) => {\n          if (\n            error?.aborted === false\n          ) {\n            this.close()\n            this.dispatchEvent(new Event('error'))\n          }\n        })\n    }\n\n    this.#controller = fetching(fetchParams)\n  }\n\n  /**\n   * @see https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model\n   * @returns {void}\n   */\n  #reconnect () {\n    // When a user agent is to reestablish the connection, the user agent must\n    // run the following steps. These steps are run in parallel, not as part of\n    // a task. (The tasks that it queues, of course, are run like normal tasks\n    // and not themselves in parallel.)\n\n    // 1. Queue a task to run the following steps:\n\n    //   1. If the readyState attribute is set to CLOSED, abort the task.\n    if (this.#readyState === CLOSED) return\n\n    //   2. Set the readyState attribute to CONNECTING.\n    this.#readyState = CONNECTING\n\n    //   3. Fire an event named error at the EventSource object.\n    this.dispatchEvent(new Event('error'))\n\n    // 2. Wait a delay equal to the reconnection time of the event source.\n    setTimeout(() => {\n      // 5. Queue a task to run the following steps:\n\n      //   1. If the EventSource object's readyState attribute is not set to\n      //      CONNECTING, then return.\n      if (this.#readyState !== CONNECTING) return\n\n      //   2. Let request be the EventSource object's request.\n      //   3. If the EventSource object's last event ID string is not the empty\n      //      string, then:\n      //      1. Let lastEventIDValue be the EventSource object's last event ID\n      //         string, encoded as UTF-8.\n      //      2. Set (`Last-Event-ID`, lastEventIDValue) in request's header\n      //         list.\n      if (this.#state.lastEventId.length) {\n        this.#request.headersList.set('last-event-id', this.#state.lastEventId, true)\n      }\n\n      //   4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section.\n      this.#connect()\n    }, this.#state.reconnectionTime)?.unref()\n  }\n\n  /**\n   * Closes the connection, if any, and sets the readyState attribute to\n   * CLOSED.\n   */\n  close () {\n    webidl.brandCheck(this, EventSource)\n\n    if (this.#readyState === CLOSED) return\n    this.#readyState = CLOSED\n    this.#controller.abort()\n    this.#request = null\n  }\n\n  get onopen () {\n    return this.#events.open\n  }\n\n  set onopen (fn) {\n    if (this.#events.open) {\n      this.removeEventListener('open', this.#events.open)\n    }\n\n    const listener = webidl.converters.EventHandlerNonNull(fn)\n\n    if (listener !== null) {\n      this.addEventListener('open', listener)\n      this.#events.open = fn\n    } else {\n      this.#events.open = null\n    }\n  }\n\n  get onmessage () {\n    return this.#events.message\n  }\n\n  set onmessage (fn) {\n    if (this.#events.message) {\n      this.removeEventListener('message', this.#events.message)\n    }\n\n    const listener = webidl.converters.EventHandlerNonNull(fn)\n\n    if (listener !== null) {\n      this.addEventListener('message', listener)\n      this.#events.message = fn\n    } else {\n      this.#events.message = null\n    }\n  }\n\n  get onerror () {\n    return this.#events.error\n  }\n\n  set onerror (fn) {\n    if (this.#events.error) {\n      this.removeEventListener('error', this.#events.error)\n    }\n\n    const listener = webidl.converters.EventHandlerNonNull(fn)\n\n    if (listener !== null) {\n      this.addEventListener('error', listener)\n      this.#events.error = fn\n    } else {\n      this.#events.error = null\n    }\n  }\n}\n\nconst constantsPropertyDescriptors = {\n  CONNECTING: {\n    __proto__: null,\n    configurable: false,\n    enumerable: true,\n    value: CONNECTING,\n    writable: false\n  },\n  OPEN: {\n    __proto__: null,\n    configurable: false,\n    enumerable: true,\n    value: OPEN,\n    writable: false\n  },\n  CLOSED: {\n    __proto__: null,\n    configurable: false,\n    enumerable: true,\n    value: CLOSED,\n    writable: false\n  }\n}\n\nObject.defineProperties(EventSource, constantsPropertyDescriptors)\nObject.defineProperties(EventSource.prototype, constantsPropertyDescriptors)\n\nObject.defineProperties(EventSource.prototype, {\n  close: kEnumerableProperty,\n  onerror: kEnumerableProperty,\n  onmessage: kEnumerableProperty,\n  onopen: kEnumerableProperty,\n  readyState: kEnumerableProperty,\n  url: kEnumerableProperty,\n  withCredentials: kEnumerableProperty\n})\n\nwebidl.converters.EventSourceInitDict = webidl.dictionaryConverter([\n  {\n    key: 'withCredentials',\n    converter: webidl.converters.boolean,\n    defaultValue: () => false\n  },\n  {\n    key: 'dispatcher', // undici only\n    converter: webidl.converters.any\n  },\n  {\n    key: 'node', // undici only\n    converter: webidl.dictionaryConverter([\n      {\n        key: 'reconnectionTime',\n        converter: webidl.converters['unsigned long'],\n        defaultValue: () => defaultReconnectionTime\n      },\n      {\n        key: 'dispatcher',\n        converter: webidl.converters.any\n      }\n    ]),\n    defaultValue: () => ({})\n  }\n])\n\nmodule.exports = {\n  EventSource,\n  defaultReconnectionTime\n}\n"],"names":["pipeline","require$$0","fetching","require$$1","webidl","require$$2","EventSourceStream","require$$3","parseMIMEType","require$$4","createFastMessageEvent","require$$5","isNetworkError","require$$6","kEnumerableProperty","require$$7","environmentSettingsObject","require$$8","createPotentialCORSRequest","require$$9","experimentalWarned","EventSource","EventTarget","events","open","error","message","url","withCredentials","readyState","request","controller","dispatcher","state","constructor","eventSourceInitDict","super","util","markAsUncloneable","this","prefix","argumentLengthCheck","arguments","process","emitWarning","code","converters","USVString","EventSourceInitDict","node","lastEventId","reconnectionTime","settings","urlRecord","URL","settingsObject","baseUrl","origin","e","DOMException","href","corsAttributeState","client","headersList","set","cache","initiator","connect","fetchParams","processResponseEndOfBody","response","reconnect","processResponse","aborted","close","dispatchEvent","Event","contentType","get","mimeType","contentTypeValid","essence","status","urlList","length","eventSourceStream","eventSourceSettings","push","event","type","options","body","stream","setTimeout","unref","brandCheck","abort","onopen","fn","removeEventListener","listener","EventHandlerNonNull","addEventListener","onmessage","onerror","constantsPropertyDescriptors","CONNECTING","__proto__","configurable","enumerable","value","writable","OPEN","CLOSED","Object","defineProperties","prototype","dictionaryConverter","key","converter","boolean","defaultValue","any","eventsource","defaultReconnectionTime"],"mappings":"qzBAEA,MAAMA,UAAeC,YACfC,UAAeC,gBACfC,QAAaC,iBACbC,mBAAwBC,4BACxBC,eAAoBC,kBACpBC,wBAA6BC,iBAC7BC,gBAAqBC,mBACrBC,qBAA0BC,MAC1BC,2BAAgCC,eAChCC,4BAAiCC,gBAEvC,IAAIC,oBAAqB;;;;;;;;;;;;;;;;;;;AA8DzB,MAAMC,oBAAoBC,YACxBC,QAAU,CACRC,KAAM,KACNC,MAAO,KACPC,QAAS,MAGXC,KACAC,kBAAmB;;;OAKnBC,YAhDiB,EAkDjBC,SAAW,KACXC,YAAc,KAEdC;;;MAKAC;;;;;;MAQA,WAAAC,CAAaP,IAAKQ,oBAAsB;;AAEtCC,QAEAhC,OAAOiC,KAAKC,kBAAkBC,MAE9B,MAAMC,OAAS,0BACfpC,OAAOqC,oBAAoBC,UAAW,EAAGF,QAEpCpB,qBACHA,oBAA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