@mahameru/diatrema 0.0.6 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/.tsbuildinfo +1 -0
  2. package/README.md +1 -1
  3. package/diatrema.d.ts +51 -4
  4. package/diatrema.d.ts.map +1 -0
  5. package/diatrema.js +53 -50
  6. package/diatrema.js.map +1 -1
  7. package/diatrema.mjs +104 -0
  8. package/diatrema.mjs.map +1 -0
  9. package/event-emitter.d.ts +4 -4
  10. package/event-emitter.d.ts.map +1 -0
  11. package/event-emitter.js +34 -10
  12. package/event-emitter.js.map +1 -1
  13. package/event-emitter.mjs +45 -0
  14. package/event-emitter.mjs.map +1 -0
  15. package/index.d.ts +7 -10
  16. package/index.d.ts.map +1 -0
  17. package/index.js +36 -10
  18. package/index.js.map +1 -1
  19. package/index.mjs +10 -0
  20. package/index.mjs.map +1 -0
  21. package/logger.d.ts +6 -7
  22. package/logger.d.ts.map +1 -0
  23. package/logger.js +38 -23
  24. package/logger.js.map +1 -1
  25. package/logger.mjs +25 -0
  26. package/logger.mjs.map +1 -0
  27. package/mahameru-plugin.d.ts +47 -4
  28. package/mahameru-plugin.d.ts.map +1 -0
  29. package/mahameru-plugin.js +32 -18
  30. package/mahameru-plugin.js.map +1 -1
  31. package/{mahameru-plugin.cjs → mahameru-plugin.mjs} +9 -44
  32. package/mahameru-plugin.mjs.map +1 -0
  33. package/package.json +5 -13
  34. package/diatrema-BNmte9Pf.d.cts +0 -100
  35. package/diatrema-CO0FOwdp.d.ts +0 -100
  36. package/diatrema.cjs +0 -151
  37. package/diatrema.cjs.map +0 -1
  38. package/diatrema.d.cts +0 -7
  39. package/event-emitter.cjs +0 -68
  40. package/event-emitter.cjs.map +0 -1
  41. package/event-emitter.d.cts +0 -11
  42. package/helpers.cjs +0 -77
  43. package/helpers.cjs.map +0 -1
  44. package/helpers.d.cts +0 -17
  45. package/helpers.d.ts +0 -17
  46. package/helpers.js +0 -52
  47. package/helpers.js.map +0 -1
  48. package/index.cjs +0 -52
  49. package/index.cjs.map +0 -1
  50. package/index.d.cts +0 -10
  51. package/logger.cjs +0 -57
  52. package/logger.cjs.map +0 -1
  53. package/logger.d.cts +0 -9
  54. package/mahameru-error.cjs +0 -42
  55. package/mahameru-error.cjs.map +0 -1
  56. package/mahameru-error.d.cts +0 -5
  57. package/mahameru-error.d.ts +0 -5
  58. package/mahameru-error.js +0 -19
  59. package/mahameru-error.js.map +0 -1
  60. package/mahameru-plugin.cjs.map +0 -1
  61. package/mahameru-plugin.d.cts +0 -4
  62. package/scripts/preinstall.cjs +0 -10
  63. package/scripts/preinstall.cjs.map +0 -1
  64. package/scripts/preinstall.d.cts +0 -2
  65. package/scripts/preinstall.d.ts +0 -2
  66. package/scripts/preinstall.js +0 -9
  67. package/scripts/preinstall.js.map +0 -1
  68. package/types.cjs +0 -17
  69. package/types.cjs.map +0 -1
  70. package/types.d.cts +0 -5
  71. package/types.d.ts +0 -5
  72. package/types.js +0 -1
  73. package/types.js.map +0 -1
package/.tsbuildinfo ADDED
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.array.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.object.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.string.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.es2025.float16.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.esnext.disposable.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.d.ts","../../../node_modules/.pnpm/typescript@6.0.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../src/event-emitter.ts","../src/logger.ts","../src/mahameru-plugin.ts","../src/diatrema.ts","../src/index.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/globals.typedarray.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/buffer.buffer.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/globals.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/blob.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/console.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/crypto.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/domexception.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/encoding.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/events.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/utility.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/header.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/readable.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/fetch.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/formdata.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/connector.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/client-stats.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/client.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/errors.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/global-dispatcher.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/global-origin.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/pool-stats.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/pool.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/handlers.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/balanced-pool.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/round-robin-pool.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/h2c-client.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/agent.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/dispatcher1-wrapper.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/mock-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/mock-call-history.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/mock-agent.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/mock-client.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/mock-pool.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/snapshot-agent.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/mock-errors.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/socks5-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/retry-handler.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/retry-agent.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/api.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/cache-interceptor.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/interceptors.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/util.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/cookies.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/patch.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/websocket.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/eventsource.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/diagnostics-channel.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/content-type.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/cache.d.ts","../../../node_modules/.pnpm/undici-types@8.3.0/node_modules/undici-types/index.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/fetch.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/importmeta.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/messaging.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/navigator.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/performance.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/storage.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/streams.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/timers.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/web-globals/url.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/assert.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/assert/strict.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/async_hooks.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/buffer.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/child_process.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/cluster.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/console.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/constants.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/crypto.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/dgram.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/dns.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/dns/promises.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/domain.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/events.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/ffi.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/fs.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/fs/promises.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/http.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/http2.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/https.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/inspector.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/inspector.generated.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/inspector/promises.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/module.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/net.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/os.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/path.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/path/posix.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/path/win32.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/process.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/punycode.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/querystring.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/quic.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/readline.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/readline/promises.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/repl.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/sea.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/sqlite.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/stream.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/stream/iter.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/stream/promises.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/stream/web.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/string_decoder.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/test.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/test/reporters.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/timers.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/timers/promises.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/tls.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/trace_events.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/tty.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/url.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/util.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/util/types.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/v8.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/vm.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/wasi.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/worker_threads.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/zlib.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/zlib/iter.d.ts","../../../node_modules/.pnpm/@types+node@26.1.1/node_modules/@types/node/index.d.ts"],"fileIdsList":[[66,128,129,131,139,144,147,149,150,151,163],[66,130,131,139,144,147,149,150,151,163],[131,139,144,147,149,150,151,163],[66,131,139,144,147,149,150,151,163,172],[66,131,132,137,139,142,144,147,149,150,151,153,163,168,181],[66,131,132,133,139,142,144,147,149,150,151,163],[66,131,134,139,144,147,149,150,151,163,182],[66,131,135,136,139,144,147,149,150,151,154,163],[66,131,136,139,144,147,149,150,151,163,168,178],[66,131,137,139,142,144,147,149,150,151,153,163],[66,130,131,138,139,144,147,149,150,151,163],[66,131,139,140,144,147,149,150,151,163],[66,131,139,141,142,144,147,149,150,151,163],[66,130,131,139,142,144,147,149,150,151,163],[66,131,139,144,147,149,150,151,163],[66,131,139,142,144,145,147,149,150,151,163,168,181],[66,131,139,142,144,145,147,149,150,151,163,168,170,172],[66,118,131,139,142,144,146,147,149,150,151,153,163,168,181],[66,131,139,142,144,146,147,149,150,151,153,163,168,178,181],[66,131,139,144,146,147,148,149,150,151,163,168,178,181],[65,66,67,68,69,70,71,72,73,74,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189],[66,131,139,142,144,147,149,150,151,163],[66,131,139,144,147,149,151,163],[66,131,139,144,147,149,150,151,152,163,181],[66,131,139,142,144,147,149,150,151,153,163,168],[66,131,139,144,147,149,150,151,154,163],[66,131,139,144,147,149,150,151,155,163],[66,131,139,142,144,147,149,150,151,158,163],[66,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188],[66,131,139,144,147,149,150,151,160,163],[66,131,139,144,147,149,150,151,161,163],[66,131,136,139,144,147,149,150,151,153,163,172],[66,131,139,142,144,147,149,150,151,163,164],[66,131,139,144,147,149,150,151,163,165,182,185],[66,131,139,142,144,147,149,150,151,163,168,170,171,172],[66,131,139,144,147,149,150,151,163,169,172],[66,131,139,142,144,147,149,150,151,163,168,170],[66,131,139,142,144,147,149,150,151,163,168,171,172],[66,131,139,144,147,149,150,151,163,172,182],[66,131,139,144,147,149,150,151,163,173],[66,128,131,139,144,147,149,150,151,163,168,175,181],[66,131,139,144,147,149,150,151,163,168,174],[66,131,139,142,144,147,149,150,151,163,176,177],[66,131,139,144,147,149,150,151,163,176,177],[66,131,136,139,144,147,149,150,151,153,163,168,178],[66,131,139,144,147,149,150,151,163,179],[66,131,139,144,147,149,150,151,153,163,180],[66,131,139,144,146,147,149,150,151,161,163,181],[66,131,139,144,147,149,150,151,163,182,183],[66,131,136,139,144,147,149,150,151,163,183],[66,131,139,144,147,149,150,151,163,168,184],[66,131,139,144,147,149,150,151,152,163,185],[66,131,139,144,147,149,150,151,163,186],[66,131,134,139,144,147,149,150,151,163],[66,131,136,139,144,147,149,150,151,163],[66,131,139,144,147,149,150,151,163,182],[66,118,131,139,144,147,149,150,151,163],[66,131,139,144,147,149,150,151,163,181],[66,131,139,144,147,149,150,151,163,187],[66,131,139,144,147,149,150,151,158,163],[66,131,139,144,147,149,150,151,163,177],[66,118,131,139,142,144,145,147,149,150,151,158,163,168,172,181,184,185,187],[66,131,139,144,147,149,150,151,163,168,188],[66,131,139,144,147,149,150,151,163,170,189],[66,81,84,87,88,131,139,144,147,149,150,151,163,181],[66,84,131,139,144,147,149,150,151,163,168,181],[66,84,88,131,139,144,147,149,150,151,163,181],[66,131,139,144,147,149,150,151,163,168],[66,78,131,139,144,147,149,150,151,163],[66,82,131,139,144,147,149,150,151,163],[66,80,81,84,131,139,144,147,149,150,151,163,181],[66,131,139,144,147,149,150,151,153,163,178],[66,131,139,144,147,149,150,151,163,190],[66,78,131,139,144,147,149,150,151,163,190],[66,80,84,131,139,144,147,149,150,151,153,163,181],[66,75,76,77,79,83,131,139,142,144,147,149,150,151,163,168,181],[66,84,131,139,144,147,149,150,151,163],[66,84,93,102,131,139,144,147,149,150,151,163],[66,76,82,131,139,144,147,149,150,151,163],[66,84,112,113,131,139,144,147,149,150,151,163],[66,76,79,84,131,139,144,147,149,150,151,163,172,181,190],[66,80,84,131,139,144,147,149,150,151,163,181],[66,75,131,139,144,147,149,150,151,163],[66,78,79,80,82,83,84,85,86,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,113,114,115,116,117,131,139,144,147,149,150,151,163],[66,84,105,108,131,139,144,147,149,150,151,163],[66,84,93,95,96,131,139,144,147,149,150,151,163],[66,82,84,95,97,131,139,144,147,149,150,151,163],[66,83,131,139,144,147,149,150,151,163],[66,76,78,84,131,139,144,147,149,150,151,163],[66,84,88,95,97,131,139,144,147,149,150,151,163],[66,88,131,139,144,147,149,150,151,163],[66,82,84,87,131,139,144,147,149,150,151,163,181],[66,76,80,84,93,131,139,144,147,149,150,151,163],[66,84,105,131,139,144,147,149,150,151,163],[66,97,131,139,144,147,149,150,151,163],[66,76,80,84,88,131,139,144,147,149,150,151,163],[66,78,84,112,131,139,144,147,149,150,151,163,172,187,190],[60,61,62,66,131,139,144,147,149,150,151,152,155,163,181],[60,61,62,63,66,131,139,144,147,149,150,151,163],[61,63,66,131,139,144,147,149,150,151,163]],"fileInfos":[{"version":"bcd24271a113971ba9eb71ff8cb01bc6b0f872a85c23fdbe5d93065b375933cd","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f88bedbeb09c6f5a6645cb24c7c55f1aa22d19ae96c8e6959cbd8b85a707bc6","impliedFormat":1},{"version":"7fe93b39b810eadd916be8db880dd7f0f7012a5cc6ffb62de8f62a2117fa6f1f","impliedFormat":1},{"version":"bb0074cc08b84a2374af33d8bf044b80851ccc9e719a5e202eacf40db2c31600","impliedFormat":1},{"version":"1a7daebe4f45fb03d9ec53d60008fbf9ac45a697fdc89e4ce218bc94b94f94d6","impliedFormat":1},{"version":"f94b133a3cb14a288803be545ac2683e0d0ff6661bcd37e31aaaec54fc382aed","impliedFormat":1},{"version":"f59d0650799f8782fd74cf73c19223730c6d1b9198671b1c5b3a38e1188b5953","impliedFormat":1},{"version":"8a15b4607d9a499e2dbeed9ec0d3c0d7372c850b2d5f1fb259e8f6d41d468a84","impliedFormat":1},{"version":"26e0fe14baee4e127f4365d1ae0b276f400562e45e19e35fd2d4c296684715e6","impliedFormat":1},{"version":"eadcffda2aa84802c73938e589b9e58248d74c59cb7fcbca6474e3435ac15504","affectsGlobalScope":true,"impliedFormat":1},{"version":"105ba8ff7ba746404fe1a2e189d1d3d2e0eb29a08c18dded791af02f29fb4711","affectsGlobalScope":true,"impliedFormat":1},{"version":"00343ca5b2e3d48fa5df1db6e32ea2a59afab09590274a6cccb1dbae82e60c7c","affectsGlobalScope":true,"impliedFormat":1},{"version":"ebd9f816d4002697cb2864bea1f0b70a103124e18a8cd9645eeccc09bdf80ab4","affectsGlobalScope":true,"impliedFormat":1},{"version":"2c1afac30a01772cd2a9a298a7ce7706b5892e447bb46bdbeef720f7b5da77ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"7b0225f483e4fa685625ebe43dd584bb7973bbd84e66a6ba7bbe175ee1048b4f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c0a4b8ac6ce74679c1da2b3795296f5896e31c38e888469a8e0f99dc3305de60","affectsGlobalScope":true,"impliedFormat":1},{"version":"3084a7b5f569088e0146533a00830e206565de65cae2239509168b11434cd84f","affectsGlobalScope":true,"impliedFormat":1},{"version":"c5079c53f0f141a0698faa903e76cb41cd664e3efb01cc17a5c46ec2eb0bef42","affectsGlobalScope":true,"impliedFormat":1},{"version":"32cafbc484dea6b0ab62cf8473182bbcb23020d70845b406f80b7526f38ae862","affectsGlobalScope":true,"impliedFormat":1},{"version":"fca4cdcb6d6c5ef18a869003d02c9f0fd95df8cfaf6eb431cd3376bc034cad36","affectsGlobalScope":true,"impliedFormat":1},{"version":"b93ec88115de9a9dc1b602291b85baf825c85666bf25985cc5f698073892b467","affectsGlobalScope":true,"impliedFormat":1},{"version":"f5c06dcc3fe849fcb297c247865a161f995cc29de7aa823afdd75aaaddc1419b","affectsGlobalScope":true,"impliedFormat":1},{"version":"b77e16112127a4b169ef0b8c3a4d730edf459c5f25fe52d5e436a6919206c4d7","affectsGlobalScope":true,"impliedFormat":1},{"version":"fbffd9337146eff822c7c00acbb78b01ea7ea23987f6c961eba689349e744f8c","affectsGlobalScope":true,"impliedFormat":1},{"version":"a995c0e49b721312f74fdfb89e4ba29bd9824c770bbb4021d74d2bf560e4c6bd","affectsGlobalScope":true,"impliedFormat":1},{"version":"c7b3542146734342e440a84b213384bfa188835537ddbda50d30766f0593aff9","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce6180fa19b1cccd07ee7f7dbb9a367ac19c0ed160573e4686425060b6df7f57","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f02e2476bccb9dbe21280d6090f0df17d2f66b74711489415a8aa4df73c9675","affectsGlobalScope":true,"impliedFormat":1},{"version":"45e3ab34c1c013c8ab2dc1ba4c80c780744b13b5676800ae2e3be27ae862c40c","affectsGlobalScope":true,"impliedFormat":1},{"version":"805c86f6cca8d7702a62a844856dbaa2a3fd2abef0536e65d48732441dde5b5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"e42e397f1a5a77994f0185fd1466520691456c772d06bf843e5084ceb879a0ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"f4c2b41f90c95b1c532ecc874bd3c111865793b23aebcc1c3cbbabcd5d76ffb0","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab26191cfad5b66afa11b8bf935ef1cd88fabfcb28d30b2dfa6fad877d050332","affectsGlobalScope":true,"impliedFormat":1},{"version":"2088bc26531e38fb05eedac2951480db5309f6be3fa4a08d2221abb0f5b4200d","affectsGlobalScope":true,"impliedFormat":1},{"version":"cb9d366c425fea79716a8fb3af0d78e6b22ebbab3bd64d25063b42dc9f531c1e","affectsGlobalScope":true,"impliedFormat":1},{"version":"500934a8089c26d57ebdb688fc9757389bb6207a3c8f0674d68efa900d2abb34","affectsGlobalScope":true,"impliedFormat":1},{"version":"689da16f46e647cef0d64b0def88910e818a5877ca5379ede156ca3afb780ac3","affectsGlobalScope":true,"impliedFormat":1},{"version":"bc21cc8b6fee4f4c2440d08035b7ea3c06b3511314c8bab6bef7a92de58a2593","affectsGlobalScope":true,"impliedFormat":1},{"version":"7ca53d13d2957003abb47922a71866ba7cb2068f8d154877c596d63c359fed25","affectsGlobalScope":true,"impliedFormat":1},{"version":"54725f8c4df3d900cb4dac84b64689ce29548da0b4e9b7c2de61d41c79293611","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5594bc3076ac29e6c1ebda77939bc4c8833de72f654b6e376862c0473199323","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f3eb332c2d73e729f3364fcc0c2b375e72a121e8157d25a82d67a138c83a95c","affectsGlobalScope":true,"impliedFormat":1},{"version":"6f4427f9642ce8d500970e4e69d1397f64072ab73b97e476b4002a646ac743b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"48915f327cd1dea4d7bd358d9dc7732f58f9e1626a29cc0c05c8c692419d9bb7","affectsGlobalScope":true,"impliedFormat":1},{"version":"b7bf9377723203b5a6a4b920164df22d56a43f593269ba6ae1fdc97774b68855","affectsGlobalScope":true,"impliedFormat":1},{"version":"db9709688f82c9e5f65a119c64d835f906efe5f559d08b11642d56eb85b79357","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b25b8c874acd1a4cf8444c3617e037d444d19080ac9f634b405583fd10ce1f7","affectsGlobalScope":true,"impliedFormat":1},{"version":"37be57d7c90cf1f8112ee2636a068d8fd181289f82b744160ec56a7dc158a9f5","affectsGlobalScope":true,"impliedFormat":1},{"version":"a917a49ac94cd26b754ab84e113369a75d1a47a710661d7cd25e961cc797065f","affectsGlobalScope":true,"impliedFormat":1},{"version":"6d3261badeb7843d157ef3e6f5d1427d0eeb0af0cf9df84a62cfd29fd47ac86e","affectsGlobalScope":true,"impliedFormat":1},{"version":"195daca651dde22f2167ac0d0a05e215308119a3100f5e6268e8317d05a92526","affectsGlobalScope":true,"impliedFormat":1},{"version":"8b11e4285cd2bb164a4dc09248bdec69e9842517db4ca47c1ba913011e44ff2f","affectsGlobalScope":true,"impliedFormat":1},{"version":"0508571a52475e245b02bc50fa1394065a0a3d05277fbf5120c3784b85651799","affectsGlobalScope":true,"impliedFormat":1},{"version":"8f9af488f510c3015af3cc8c267a9e9d96c4dd38a1fdff0e11dc5a544711415b","affectsGlobalScope":true,"impliedFormat":1},{"version":"fc611fea8d30ea72c6bbfb599c9b4d393ce22e2f5bfef2172534781e7d138104","affectsGlobalScope":true,"impliedFormat":1},{"version":"f128dae7c44d8f35ee42e0a437000a57c9f06cc04f8b4fb42eebf44954d53dc8","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ecb8e347cb6b2a8927c09b86263663289418df375f5e68e11a0ae683776978f","affectsGlobalScope":true,"impliedFormat":1},{"version":"1ce14b81c5cc821994aa8ec1d42b220dd41b27fcc06373bce3958af7421b77d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3a048b3e9302ef9a34ef4ebb9aecfb28b66abb3bce577206a79fee559c230da","affectsGlobalScope":true,"impliedFormat":1},{"version":"e13d4b286b22db67f4574abca6a12e7bcc8f69e55301fee0169b7a59129ed430","signature":"b7071942540b6e9b373f02fd2133daa95dccc3e996a1c31015d53f873e16fb66"},{"version":"ebee9f6900b8117084c643d35fdbc52808319859b1b62c7ff5cb20af5479574a","signature":"b420e50d04717954c233025019dea093b2b2cbfa0d97d33e2a74986b25136a34"},{"version":"33ab481d0dfa10df0037b6f0cb0bf3e88813865f60ba6fe3301aa72c2690b67e","signature":"4a12f1a11c74b50b7babfb940fa602c691e9c0a7875045d3d271d0add96a6643"},{"version":"6ec2d6dfd63e3212a9bb9235a1e82441d916fb57e7315283e2546494ee01a62a","signature":"71ca9fd26f007334e74cb33c4a064c736c3ddd0ca9fba6a6ef22ed64128dd4e3"},{"version":"77331d576a6295c296211f3b7a0bfadfc875ef7968d8edfb69379e00777ef5dd","signature":"21b545a645956a42663d098b6345cff358ad397e53b7f211963348e331afc087"},{"version":"0ccdaa19852d25ecd84eec365c3bfa16e7859cadecf6e9ca6d0dbbbee439743f","affectsGlobalScope":true,"impliedFormat":1},{"version":"cc2110f7decca6bfb9392e30421cfa1436479e4a6756e8fec6cbc22625d4f881","affectsGlobalScope":true,"impliedFormat":1},{"version":"f53a7652392cf26ebbe4e29fd0672aa87c93bd6d0241289c13fab87b9ac35c8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"e5e01375c9e124a83b52ee4b3244ed1a4d214a6cfb54ac73e164a823a4a7860a","affectsGlobalScope":true,"impliedFormat":1},{"version":"f90ae2bbce1505e67f2f6502392e318f5714bae82d2d969185c4a6cecc8af2fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"4b58e207b93a8f1c88bbf2a95ddc686ac83962b13830fe8ad3f404ffc7051fb4","affectsGlobalScope":true,"impliedFormat":1},{"version":"1fefabcb2b06736a66d2904074d56268753654805e829989a46a0161cd8412c5","affectsGlobalScope":true,"impliedFormat":1},{"version":"b00a630557d1622ad312633bdbfbdb9c6b7220d948dca9f899db30679f160074","affectsGlobalScope":true,"impliedFormat":1},{"version":"c18a99f01eb788d849ad032b31cafd49de0b19e083fe775370834c5675d7df8e","affectsGlobalScope":true,"impliedFormat":1},{"version":"5247874c2a23b9a62d178ae84f2db6a1d54e6c9a2e7e057e178cc5eea13757fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"cdcf9ea426ad970f96ac930cd176d5c69c6c24eebd9fc580e1572d6c6a88f62c","impliedFormat":1},{"version":"88809d6c1b9c78d04a133646a6feb926def05a8774c308c7c93bc32ee163d271","impliedFormat":1},{"version":"156a859e21ef3244d13afeeba4e49760a6afa035c149dda52f0c45ea8903b338","impliedFormat":1},{"version":"3ac40516c33b87f751f7507346933081a26cdb8a3e11a6b3aa07d23f803c85db","impliedFormat":1},{"version":"615754924717c0b1e293e083b83503c0a872717ad5aa60ed7f1a699eb1b4ea5c","impliedFormat":1},{"version":"14e9acf826baba0ef4b5665704084896e7bcc06f65a9ab13af7e93d27d6b7069","impliedFormat":1},{"version":"68834d631c8838c715f225509cfc3927913b9cc7a4870460b5b60c8dbdb99baf","impliedFormat":1},{"version":"829bc57ee8f287b490ab5bbc5a962fca57e432c1e38ec680ecd3ecaf12800613","impliedFormat":1},{"version":"eec76bf6b9346f3f95fa402621b889489e96930e72295b0369022f332e9b4a6a","impliedFormat":1},{"version":"3a3ff14da53d5013f3e6d8c4ad55225e3649c08786c4421ce639c00d8d589b7d","impliedFormat":1},{"version":"ea6bc8de8b59f90a7a3960005fd01988f98fd0784e14bc6922dde2e93305ec7d","impliedFormat":1},{"version":"36107995674b29284a115e21a0618c4c2751b32a8766dd4cb3ba740308b16d59","impliedFormat":1},{"version":"914a0ae30d96d71915fc519ccb4efbf2b62c0ddfb3a3fc6129151076bc01dc60","impliedFormat":1},{"version":"38004e6801340cb890afb8cb5a9fc8972297e7f88ab94026e4b0b3c61fb32f8a","impliedFormat":1},{"version":"d243db6b25788f439e7e2f03c05688e92f46764351673bb0e7b2f3631232e186","impliedFormat":1},{"version":"4d327f7d72ad0918275cea3eee49a6a8dc8114ae1d5b7f3f5d0774de75f7439a","impliedFormat":1},{"version":"149f9a9e7f04e67afa0e2a49fc0ff421035c01d6b793cfcae7d2e9f6819431e2","impliedFormat":1},{"version":"e8a9dfa4c75ef6d25df8b40eaa9c31e0a69452aaf2ced4a3f4215dbdbaa876f4","impliedFormat":1},{"version":"a70af845a2eb9dd6e2723e319e14ea7fb28b129ec1361c21509b49305448c323","impliedFormat":1},{"version":"b53dc572d4f187904207ae1166652de47aab8eeb00c254d009cb226863076b56","impliedFormat":1},{"version":"0a60a292b89ca7218b8616f78e5bbd1c96b87e048849469cccb4355e98af959a","impliedFormat":1},{"version":"0b6e25234b4eec6ed96ab138d96eb70b135690d7dd01f3dd8a8ab291c35a683a","impliedFormat":1},{"version":"9666f2f84b985b62400d2e5ab0adae9ff44de9b2a34803c2c5bd3c8325b17dc0","impliedFormat":1},{"version":"40cd35c95e9cf22cfa5bd84e96408b6fcbca55295f4ff822390abb11afbc3dca","impliedFormat":1},{"version":"b1616b8959bf557feb16369c6124a97a0e74ed6f49d1df73bb4b9ddf68acf3f3","impliedFormat":1},{"version":"f501234c5aeeeb5d7659412335227466aaacf30b952372d60afeb21c02c96348","impliedFormat":1},{"version":"40b463c6766ca1b689bfcc46d26b5e295954f32ad43e37ee6953c0a677e4ae2b","impliedFormat":1},{"version":"9ac977503f15bf13ca7c82ad9a32a782f42d43e474824e8b3bffe228fd5f2639","impliedFormat":1},{"version":"8b91ff5bb912be3ea213cbcf0075aace1f5d4ff249a0d227ed673868cb7bfabc","impliedFormat":1},{"version":"80aae6afc67faa5ac0b32b5b8bc8cc9f7fa299cff15cf09cc2e11fd28c6ae29e","impliedFormat":1},{"version":"f473cd2288991ff3221165dcf73cd5d24da30391f87e85b3dd4d0450c787a391","impliedFormat":1},{"version":"499e5b055a5aba1e1998f7311a6c441a369831c70905cc565ceac93c28083d53","impliedFormat":1},{"version":"8aee8b6d4f9f62cf3776cda1305fb18763e2aade7e13cea5bbe699112df85214","impliedFormat":1},{"version":"98498b101803bb3dde9f76a56e65c14b75db1cc8bec5f4db72be541570f74fc5","impliedFormat":1},{"version":"7cb4f431a4591b0e23002bed805dc871a874dfed6b9a3994dce68a6df73e6739","impliedFormat":1},{"version":"5d0375ca7310efb77e3ef18d068d53784faf62705e0ad04569597ae0e755c401","impliedFormat":1},{"version":"59af37caec41ecf7b2e76059c9672a49e682c1a2aa6f9d7dc78878f53aa284d6","impliedFormat":1},{"version":"addf417b9eb3f938fddf8d81e96393a165e4be0d4a8b6402292f9c634b1cb00d","impliedFormat":1},{"version":"436d7b4543b340b0f3eef4310d524242e41369b9652aa9c70428767c4dcac455","impliedFormat":1},{"version":"adf27937dba6af9f08a68c5b1d3fce0ca7d4b960c57e6d6c844e7d1a8e53adae","impliedFormat":1},{"version":"12950411eeab8563b349cb7959543d92d8d02c289ed893d78499a19becb5a8cc","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"e99963ae1e3a48ca7a7958c02f3e88bb963eb7978c28b68ae6b8c9f03309d83c","impliedFormat":1},{"version":"c3f5289820990ab66b70c7fb5b63cb674001009ff84b13de40619619a9c8175f","affectsGlobalScope":true,"impliedFormat":1},{"version":"b3275d55fac10b799c9546804126239baf020d220136163f763b55a74e50e750","affectsGlobalScope":true,"impliedFormat":1},{"version":"fa68a0a3b7cb32c00e39ee3cd31f8f15b80cac97dce51b6ee7fc14a1e8deb30b","affectsGlobalScope":true,"impliedFormat":1},{"version":"1cf059eaf468efcc649f8cf6075d3cb98e9a35a0fe9c44419ec3d2f5428d7123","affectsGlobalScope":true,"impliedFormat":1},{"version":"6c36e755bced82df7fb6ce8169265d0a7bb046ab4e2cb6d0da0cb72b22033e89","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"7a93de4ff8a63bafe62ba86b89af1df0ccb5e40bb85b0c67d6bbcfdcf96bf3d4","affectsGlobalScope":true,"impliedFormat":1},{"version":"90e85f9bc549dfe2b5749b45fe734144e96cd5d04b38eae244028794e142a77e","affectsGlobalScope":true,"impliedFormat":1},{"version":"e0a5deeb610b2a50a6350bd23df6490036a1773a8a71d70f2f9549ab009e67ee","affectsGlobalScope":true,"impliedFormat":1},{"version":"594ae90cacd813fa392ff80d2e0a8eff4e41f4a136329a940e321399dd8895b4","impliedFormat":1},{"version":"d1f333ade8ff35a409b4984e1f11956fe11c61855b0c7e9b59f0313e48b40c4a","impliedFormat":1},{"version":"0224aa4b3464895d69c413a640a19ac2166778a74eb5eb3b36b021c72d42b274","impliedFormat":1},{"version":"2e6fca0024dd8a076a886d9ec031a936ea59ad878a25b944820495d92f8381dd","affectsGlobalScope":true,"impliedFormat":1},{"version":"177459cba484e2f1e08872a3d2fdbca3162d9d43ca5ec9dc0c946835b55f74be","impliedFormat":1},{"version":"2fbf504c4791f9d32cd766cfe6b605bcda63289b925401953a7900db9af85348","impliedFormat":1},{"version":"ed0fb633cae35948d9e144004299a4bdf1ab912667c787b7fbffcd6d8c7b92a2","impliedFormat":1},{"version":"1678b04557dca52feab73cc67610918a7f5e25bfdba3e7fa081acd625d93106d","impliedFormat":1},{"version":"0e312260895afc9de021ce9de3c8a857392f0ccc7f19d3a030e4d6136a4ac91e","impliedFormat":1},{"version":"2ea729503db9793f2691162fec3dd1118cab62e96d025f8eeb376d43ec293395","impliedFormat":1},{"version":"98fc7231d6c846a8ed19bdef026ddffe5e2182cc818be74899287421ad370a87","impliedFormat":1},{"version":"3a40b5d34e014017539acb92f04cf2bc0aa71e49efb33c66039df93be97842a1","impliedFormat":1},{"version":"2bc7aa4fba46df0bd495425a7c8201437a7d465f83854fac859df2d67f664df3","impliedFormat":1},{"version":"41d17e1ad9a002feb11c8cdd2777e5bbc0cdb1e3f595d237e4dded0b6949983b","impliedFormat":1},{"version":"8c7e618c2a91ea7f6b5cca272a295864e92c16413be8fc56a943e8c7d5320011","affectsGlobalScope":true,"impliedFormat":1},{"version":"79a85c64bf083c5f4dd7074e804d1000c0c47301b84d48417a224decd681be30","impliedFormat":1},{"version":"9f1e3a76d5f509b5579e567de522b402cb79e201c4f47dcd014451c0580b290d","impliedFormat":1},{"version":"4f1fd541f720030367b5d7ebfea7ae5f9edc8481422993b9a363f459c5412437","impliedFormat":1},{"version":"70f3f8b2dcaf7388f26731a59c79437813e3620b594903525a303cb2a7901016","impliedFormat":1},{"version":"62e8f884c3bc6dff6189b6e662ebe8b238a645938f2df7a97b8a82fca56773a4","impliedFormat":1},{"version":"2c2bdaa1d8ead9f68628d6d9d250e46ee8e81aa4898b4769a36956ae15e060fe","impliedFormat":1},{"version":"57a0d1b3d59063d4af2d3f8aac27cfe3c20a0f5d1faf0f8598ccf0b779637939","impliedFormat":1},{"version":"5ff4433a2deae4f85ab1377e90a7554ce6b47ae51c69a84ca30a6e22fae85834","impliedFormat":1},{"version":"82b91e4e42e6c41bc7fc1b6c2dc5eba6a2ba98375eb1f210e6ff6bba2d54177e","impliedFormat":1},{"version":"97234c5303866576f913d0ccae7d58d6322d9e803c7bf1228a3fda46ab8087b2","affectsGlobalScope":true,"impliedFormat":1},{"version":"93ecf87143cac7b9d05cffc1d6bdc075b7e4fdd48ff05f1fad85043f6ae678d3","impliedFormat":1},{"version":"6f200afcb82b3e9a54bed6db23f2edf2508cd266801257312c0f124b47f2bdb9","impliedFormat":1},{"version":"ec501101c2a96133a6c695f934c8f6642149cc728571b29cbb7b770984c1088e","impliedFormat":1},{"version":"b214ebcf76c51b115453f69729ee8aa7b7f8eccdae2a922b568a45c2d7ff52f7","impliedFormat":1},{"version":"429c9cdfa7d126255779efd7e6d9057ced2d69c81859bbab32073bad52e9ba76","impliedFormat":1},{"version":"39338f84e8c4d0e3de7b3c4a7024fb3925f42100eed5cbe73be58902799dff4d","impliedFormat":1},{"version":"fbf83eb33bf5e329527add92acc65da59323876c702ddccf5f4bf1e848c92369","affectsGlobalScope":true,"impliedFormat":1},{"version":"230763250f20449fa7b3c9273e1967adb0023dc890d4be1553faca658ee65971","impliedFormat":1},{"version":"c3e9078b60cb329d1221f5878e88cecfa3e74460550e605a58fcfb41a66029ff","impliedFormat":1},{"version":"515318bc6e656f75e9e34db625316bfafbafd800dfb1642574af93735a24ad38","impliedFormat":1},{"version":"441b9bb09013654aa3d050e68b06464d8959b473e85868249d9d18f692acd35b","impliedFormat":1},{"version":"bc18a1991ba681f03e13285fa1d7b99b03b67ee671b7bc936254467177543890","impliedFormat":1},{"version":"55246f15e33ff1e2e9e679b25fa9790a48db55dc63d567fe25fac8b6a0efe911","impliedFormat":1},{"version":"fa94bbf532b7af8f394b95fa310980d6e20bd2d4c871c6a6cb9f70f03750a44b","impliedFormat":1},{"version":"03b7804d69cecd66850abada858ed6d4a59001f8c228a9fe212306ee860a4ff6","impliedFormat":1},{"version":"5b26c4dd672d88336bb929787c9bfb55119e80ba89ec6dc923da1c063892843e","affectsGlobalScope":true,"impliedFormat":1},{"version":"7fa2214bb0d64701bc6f9ce8cde2fd2ff8c571e0b23065fa04a8a5a6beb91511","impliedFormat":1},{"version":"987fd1f85dc36f4b2c927aa3db814ac6b452e970f4f55d24ed4ecbb7df09be00","impliedFormat":1},{"version":"f12624a4a8d042b68914eac1b0a16571fc1c523173fcdf2517c65d191bd5a86c","impliedFormat":1},{"version":"b4769767f13a1692a66186e01c3aa186ff808d5ff72ed36eda8c37738fb2ac92","impliedFormat":1},{"version":"841983e39bd4cbb463be385e92fda11057cab368bf27100a801c492f1d86cbaa","impliedFormat":1},{"version":"683edfc4f2b411ebe04729cb6dc09ddd26fbac2c57771a6d7c55964af776e176","impliedFormat":1},{"version":"1ec3f3a5f04cc42df33274fbe5c0937d9a9e06f249a7a26288d7d54f0763ffd4","impliedFormat":1},{"version":"e4156ddb25aa0e3b5303d372f26957b36778f0f6bbd4326359269873295e3058","affectsGlobalScope":true,"impliedFormat":1},{"version":"cc1b433a84cae05ddc5672d4823170af78606ad21ecef60dbc4570190cbf1357","impliedFormat":1},{"version":"e47f532d6e1617833f13a5b0710c0089d402c89c2f2b54f324e5a20e418d287a","impliedFormat":1},{"version":"7f78cfb2b343838612c192cb251746e3a7c62ac7675726a47e130d9b213f6580","impliedFormat":1},{"version":"201db9cf1687fab1adf5282fcba861f382b32303dc4f67c89d59655e78a25461","impliedFormat":1},{"version":"8e2577e7262051fd3c5bd6ca2b2056d358ff8853565720f92455860824c25188","impliedFormat":1},{"version":"7ec8d7d483f7394f9da611b10d3a0e402f76ff5c991261e6ce43a15f81ca4258","impliedFormat":1},{"version":"bb9dbb4b2ad81e3e71ec5ba4314973718555b9d04ba2a17dfbf875efecb8e2c0","impliedFormat":1},{"version":"82c3cc48c692438e41b94d936b8acd75ca97b18c50fa1af8a0715eb9d07d18cd","impliedFormat":1},{"version":"045a210189ec63c5488410b33f9fca53d77d051599d0d6506d8048551399c5f3","impliedFormat":1},{"version":"99ab6d0d660ce4d21efb52288a39fd35bb3f556980ec5463b1ae8f304a3bbc85","impliedFormat":1},{"version":"632c45ccb4cdc2c3a80c7a36a63dd7763016e59cac5e07bfb3e37e3548957028","impliedFormat":1},{"version":"c9a2daf6cd1eb854cd5b9e424247c5e306692055738c2effd35f7871d942b76e","impliedFormat":1},{"version":"afa1c49f8e559e413d57343339db857d2a8159435cf9cf7d4deb41718fff1b88","impliedFormat":1},{"version":"e50a7130339a951e6da9e968ed5521b0997a5b0479e148914087213839b5474c","impliedFormat":1}],"root":[[60,64]],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"module":99,"noImplicitAny":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":99,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[128,1],[129,1],[130,2],[66,3],[131,4],[132,5],[133,6],[134,7],[135,8],[136,9],[137,10],[138,11],[139,12],[140,12],[141,13],[142,14],[143,15],[144,16],[145,17],[67,15],[65,15],[146,18],[147,19],[148,20],[190,21],[149,22],[150,23],[151,22],[152,24],[153,25],[154,26],[155,27],[156,27],[157,27],[158,28],[159,29],[160,30],[161,31],[162,32],[163,33],[164,33],[165,34],[166,15],[167,15],[168,35],[169,36],[170,37],[171,38],[172,39],[173,40],[174,41],[175,42],[176,43],[177,44],[178,45],[179,46],[180,47],[181,48],[182,49],[183,50],[184,51],[185,52],[186,53],[68,22],[69,15],[70,54],[71,55],[72,15],[73,56],[74,15],[119,57],[120,58],[121,59],[122,59],[123,60],[124,15],[125,4],[126,61],[127,58],[187,62],[188,63],[189,64],[58,15],[59,15],[11,15],[10,15],[2,15],[12,15],[13,15],[14,15],[15,15],[16,15],[17,15],[18,15],[19,15],[3,15],[20,15],[21,15],[4,15],[22,15],[26,15],[23,15],[24,15],[25,15],[27,15],[28,15],[29,15],[5,15],[30,15],[31,15],[32,15],[33,15],[6,15],[37,15],[34,15],[35,15],[36,15],[38,15],[7,15],[39,15],[44,15],[45,15],[40,15],[41,15],[42,15],[43,15],[8,15],[49,15],[46,15],[47,15],[48,15],[50,15],[9,15],[51,15],[52,15],[53,15],[55,15],[54,15],[56,15],[1,15],[57,15],[93,65],[107,66],[90,67],[108,68],[117,69],[81,70],[82,71],[80,72],[116,73],[111,74],[115,75],[84,76],[94,77],[104,78],[83,79],[114,80],[78,81],[79,74],[85,77],[86,15],[92,82],[89,77],[76,83],[118,84],[109,85],[97,86],[96,77],[98,87],[101,88],[95,89],[99,90],[112,73],[87,91],[88,92],[102,93],[77,68],[106,94],[105,77],[91,92],[100,95],[103,96],[110,15],[75,15],[113,97],[63,98],[60,15],[64,99],[61,15],[62,100]],"version":"6.0.3"}
package/README.md CHANGED
@@ -1 +1 @@
1
- # @mahameru/diatrema
1
+ # @mahameru/diatrema
package/diatrema.d.ts CHANGED
@@ -1,4 +1,51 @@
1
- import './event-emitter.js';
2
- import './types.js';
3
- export { b as DiatremaEvents, c as DiatremaOptions, D as default, d as diatremaDefaultConfig } from './diatrema-CO0FOwdp.js';
4
- import './logger.js';
1
+ import { EventEmitter } from './event-emitter';
2
+ import { type Logger } from './logger';
3
+ import type { MahameruPlugin } from './mahameru-plugin';
4
+ export type DiatremaEvents = {
5
+ ready: [data: {
6
+ mode: 'development' | 'production';
7
+ port?: number;
8
+ host?: string;
9
+ }];
10
+ };
11
+ export type DiatremaOptions = {
12
+ dev: boolean;
13
+ debug: boolean;
14
+ rootPath: string;
15
+ appPath: string;
16
+ productionDir: string;
17
+ developmentDir: string;
18
+ initiatorFilePath?: string;
19
+ moduleType: 'commonjs' | 'esm';
20
+ };
21
+ export declare const diatremaDefaultConfig: DiatremaOptions;
22
+ /**
23
+ * Main Diatrema class that orchestrates the application lifecycle.
24
+ */
25
+ export declare class Diatrema extends EventEmitter<DiatremaEvents> {
26
+ protected _initialized: boolean;
27
+ protected _isShuttingDown: boolean;
28
+ protected _plugins: Map<string, MahameruPlugin<import("./mahameru-plugin").BasePluginOptions>>;
29
+ protected logger: Logger;
30
+ readonly options: DiatremaOptions;
31
+ constructor(options?: Partial<DiatremaOptions>);
32
+ /**
33
+ * Indicates whether the Mahameru server has been initialized or not.
34
+ * @returns {boolean}
35
+ */
36
+ get initialized(): boolean;
37
+ /**
38
+ * Indicates whether the Mahameru server is shutting down or not.
39
+ * @returns {boolean}
40
+ */
41
+ get isShuttingDown(): boolean;
42
+ get plugins(): Record<string, MahameruPlugin>;
43
+ initialize(): Promise<void>;
44
+ setPlugin<T extends MahameruPlugin>(pluginName: string, plugin: T): void;
45
+ getPlugin<T extends MahameruPlugin>(pluginName: string): T | undefined;
46
+ devHRM(changedFile?: string): Promise<void>;
47
+ shutdown(): Promise<void>;
48
+ protected require<T extends Record<string, unknown> = Record<string, unknown>>(type: 'commonjs' | 'esm', resolvedFilePath: string): Promise<T | undefined>;
49
+ protected getDefaultExport<T>(module: Record<string, T>, filePath: string): T;
50
+ }
51
+ //# sourceMappingURL=diatrema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diatrema.d.ts","sourceRoot":"","sources":["../src/diatrema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,UAAU,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,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,CAAC,WAAW,CAAC,EAAE,MAAM;IAU3B,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;cAetB,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACjF,IAAI,EAAE,UAAU,GAAG,KAAK,EACxB,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC;IAoBzB,SAAS,CAAC,gBAAgB,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM;CAQ1E"}
package/diatrema.js CHANGED
@@ -1,35 +1,57 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import { join } from "node:path";
4
- import { EventEmitter } from "./event-emitter.js";
5
- import { existsSync } from "node:fs";
6
- import { pathToFileURL } from "node:url";
7
- import { createLogger } from "./logger.js";
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
+ var diatrema_exports = {};
20
+ __export(diatrema_exports, {
21
+ Diatrema: () => Diatrema,
22
+ diatremaDefaultConfig: () => diatremaDefaultConfig
23
+ });
24
+ module.exports = __toCommonJS(diatrema_exports);
25
+ var getImportMetaUrl = () => typeof document === "undefined" ? new URL(`file:${__filename}`).href : document.currentScript && document.currentScript.tagName.toUpperCase() === "SCRIPT" ? document.currentScript.src : new URL("main.js", document.baseURI).href;
26
+ var importMetaUrl = /* @__PURE__ */ getImportMetaUrl();
27
+ var import_node_path = require("node:path");
28
+ var import_node_fs = require("node:fs");
29
+ var import_node_url = require("node:url");
30
+ var import_event_emitter = require('./event-emitter.js');
31
+ var import_logger = require('./logger.js');
32
+ var import_node_module = require("node:module");
33
+ const requireModule = (0, import_node_module.createRequire)(importMetaUrl);
8
34
  const diatremaDefaultConfig = {
9
35
  dev: false,
10
36
  debug: false,
11
37
  rootPath: process.cwd(),
12
38
  get appPath() {
13
- return join(this.rootPath, this.dev ? this.developmentDir : this.productionDir);
39
+ return (0, import_node_path.join)(this.rootPath, this.dev ? this.developmentDir : this.productionDir);
14
40
  },
15
41
  productionDir: ".mahameru",
16
42
  developmentDir: ".mahameru",
17
43
  moduleType: "esm"
18
44
  };
19
- class Diatrema extends EventEmitter {
20
- static {
21
- __name(this, "Diatrema");
22
- }
45
+ class Diatrema extends import_event_emitter.EventEmitter {
23
46
  _initialized = false;
24
47
  _isShuttingDown = false;
25
48
  _plugins = /* @__PURE__ */ new Map();
26
49
  logger;
27
- instances = {};
28
50
  options;
29
51
  constructor(options) {
30
52
  super();
31
53
  this.options = { ...diatremaDefaultConfig, ...options };
32
- this.logger = createLogger("Diatrema", this.options.debug);
54
+ this.logger = (0, import_logger.createLogger)("Diatrema", this.options.debug);
33
55
  }
34
56
  /**
35
57
  * Indicates whether the Mahameru server has been initialized or not.
@@ -49,16 +71,10 @@ class Diatrema extends EventEmitter {
49
71
  return Object.fromEntries(this._plugins);
50
72
  }
51
73
  async initialize() {
52
- try {
53
- if (this._initialized)
54
- return;
55
- await this.loadInitiator();
56
- for (const plugin of this._plugins.values()) {
57
- plugin.setDiatrema(this);
58
- await plugin.initialize();
59
- }
60
- } catch (error) {
61
- throw error;
74
+ if (this._initialized) return;
75
+ for (const plugin of this._plugins.values()) {
76
+ plugin.setDiatrema(this);
77
+ await plugin.initialize();
62
78
  }
63
79
  this._initialized = true;
64
80
  this.emit("ready", { mode: this.options.dev ? "development" : "production" });
@@ -70,8 +86,7 @@ class Diatrema extends EventEmitter {
70
86
  return this._plugins.get(pluginName);
71
87
  }
72
88
  async devHRM(changedFile) {
73
- if (!this._initialized)
74
- return;
89
+ if (!this._initialized) return;
75
90
  if (changedFile) {
76
91
  for (const [_name, plugin] of this._plugins.entries()) {
77
92
  await plugin.onDevHRM(changedFile);
@@ -79,8 +94,7 @@ class Diatrema extends EventEmitter {
79
94
  }
80
95
  }
81
96
  async shutdown() {
82
- if (this._isShuttingDown)
83
- return;
97
+ if (this._isShuttingDown) return;
84
98
  this._isShuttingDown = true;
85
99
  this.logger.debug("Shutting down...");
86
100
  for (const plugin of this._plugins.values()) {
@@ -89,40 +103,29 @@ class Diatrema extends EventEmitter {
89
103
  this._initialized = false;
90
104
  this.logger.debug("Shutting down... Done");
91
105
  }
92
- async loadInitiator() {
93
- if (!this.options.initiatorFilePath)
94
- return;
95
- const result = await this.require(this.options.moduleType, this.options.initiatorFilePath);
96
- if (result) {
97
- const handler = this.getDefaultExport(result, this.options.initiatorFilePath);
98
- this.instances = await handler();
99
- this.logger.debug(`Initiator loaded successfully. Found ${Object.keys(this.instances).length} instances.`);
100
- }
101
- }
102
106
  async require(type, resolvedFilePath) {
103
107
  const noCache = this.options.dev;
104
- if (!existsSync(resolvedFilePath))
105
- return;
108
+ if (!(0, import_node_fs.existsSync)(resolvedFilePath)) return;
106
109
  if (type === "commonjs") {
107
110
  if (noCache) {
108
- delete require.cache[resolvedFilePath];
111
+ delete requireModule.cache[resolvedFilePath];
109
112
  }
110
- return require(resolvedFilePath);
113
+ return requireModule(resolvedFilePath);
111
114
  }
112
- let fileUrl = pathToFileURL(resolvedFilePath).href;
113
- if (noCache)
114
- fileUrl += `?update=${Date.now()}`;
115
+ let fileUrl = (0, import_node_url.pathToFileURL)(resolvedFilePath).href;
116
+ if (noCache) fileUrl += `?update=${Date.now()}`;
115
117
  return await import(fileUrl);
116
118
  }
117
- getDefaultExport(module, filePath) {
118
- const defaultExportName = Object.keys(module).find((key) => key === "default");
119
+ getDefaultExport(module2, filePath) {
120
+ const defaultExportName = Object.keys(module2).find((key) => key === "default");
119
121
  if (!defaultExportName)
120
122
  throw new Error(`Module in file '${filePath}' does not have a default export.`);
121
- return module[defaultExportName];
123
+ return module2[defaultExportName];
122
124
  }
123
125
  }
124
- export {
125
- Diatrema as default,
126
+ // Annotate the CommonJS export names for ESM import in node:
127
+ 0 && (module.exports = {
128
+ Diatrema,
126
129
  diatremaDefaultConfig
127
- };
130
+ });
128
131
  //# sourceMappingURL=diatrema.js.map
package/diatrema.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/diatrema.ts"],"sourcesContent":["import { join } from 'node:path';\n\nimport { EventEmitter } from \"./event-emitter\";\nimport { existsSync } from 'node:fs';\nimport { pathToFileURL } from 'node:url';\nimport type { InitiatorHandler, Instances } from './types';\nimport type { MahameruPlugin } from './mahameru-plugin';\nimport { createLogger, type Logger } from './logger';\n\nexport type DiatremaEvents = {\n ready: [data: { mode: \"development\" | \"production\"; port?: number; host?: string; }];\n};\n\nexport type DiatremaOptions = {\n dev: boolean;\n debug: boolean;\n rootPath: string;\n appPath: string;\n productionDir: string;\n developmentDir: string;\n initiatorFilePath?: string;\n moduleType: \"commonjs\" | \"esm\";\n}\n\nexport const diatremaDefaultConfig: DiatremaOptions = {\n dev: false,\n debug: false,\n rootPath: process.cwd(),\n get appPath(): string {\n return join(this.rootPath, this.dev ? this.developmentDir : this.productionDir);\n },\n productionDir: '.mahameru',\n developmentDir: '.mahameru',\n moduleType: 'esm'\n}\n\n/**\n * Main Diatrema class that orchestrates the application lifecycle.\n */\nexport default class Diatrema extends EventEmitter<DiatremaEvents> {\n protected _initialized = false;\n protected _isShuttingDown = false;\n protected _plugins = new Map<string, MahameruPlugin<any>>();\n protected logger: Logger;\n public instances: Instances = {};\n public readonly options: DiatremaOptions;\n\n constructor(options?: Partial<DiatremaOptions>) {\n super();\n\n this.options = { ...diatremaDefaultConfig, ...options };\n this.logger = createLogger('Diatrema', this.options.debug);\n }\n\n /**\n * Indicates whether the Mahameru server has been initialized or not.\n * @returns {boolean}\n */\n get initialized() {\n return this._initialized;\n }\n\n /**\n * Indicates whether the Mahameru server is shutting down or not.\n * @returns {boolean}\n */\n get isShuttingDown() {\n return this._isShuttingDown;\n }\n\n get plugins(): Record<string, MahameruPlugin<any>> {\n return Object.fromEntries(this._plugins);\n }\n\n public async initialize(): Promise<void> {\n try {\n if (this._initialized)\n return;\n\n await this.loadInitiator();\n\n for (const plugin of this._plugins.values()) {\n plugin.setDiatrema(this);\n\n await plugin.initialize();\n }\n } catch (error) {\n throw error;\n }\n\n this._initialized = true;\n\n this.emit('ready', { mode: this.options.dev ? 'development' : 'production' });\n }\n\n public setPlugin<T extends MahameruPlugin<any>>(pluginName: string, plugin: T) {\n this._plugins.set(pluginName, plugin);\n }\n\n public getPlugin<T extends MahameruPlugin<any>>(pluginName: string): T | undefined {\n return this._plugins.get(pluginName) as T | undefined;\n }\n\n public async devHRM(changedFile?: string) {\n if (!this._initialized)\n return\n\n if (changedFile) {\n for (const [_name, plugin] of this._plugins.entries()) {\n await plugin.onDevHRM(changedFile);\n }\n }\n }\n\n public async shutdown(): Promise<void> {\n if (this._isShuttingDown)\n return\n\n this._isShuttingDown = true;\n\n this.logger.debug('Shutting down...');\n\n for (const plugin of this._plugins.values()) {\n await plugin.destroy();\n }\n\n this._initialized = false;\n this.logger.debug('Shutting down... Done');\n }\n\n protected async loadInitiator() {\n if (!this.options.initiatorFilePath)\n return;\n\n const result = await this.require<Record<'default', InitiatorHandler>>(this.options.moduleType, this.options.initiatorFilePath);\n\n if (result) {\n const handler = this.getDefaultExport<InitiatorHandler>(result, this.options.initiatorFilePath);\n\n this.instances = await handler();\n this.logger.debug(`Initiator loaded successfully. Found ${Object.keys(this.instances).length} instances.`);\n }\n }\n\n protected async require<T extends Record<string, unknown> = Record<string, unknown>>(type: \"commonjs\" | \"esm\", resolvedFilePath: string): Promise<T | undefined> {\n const noCache = this.options.dev;\n\n if (!existsSync(resolvedFilePath))\n return;\n\n if (type === \"commonjs\") {\n if (noCache) {\n delete require.cache[resolvedFilePath];\n }\n\n return require(resolvedFilePath) as T;\n }\n\n let fileUrl = pathToFileURL(resolvedFilePath).href;\n\n if (noCache)\n fileUrl += `?update=${Date.now()}`;\n\n return (await import(fileUrl)) as T;\n }\n\n protected getDefaultExport<T>(module: Record<string, T>, filePath: string) {\n const defaultExportName = Object.keys(module).find((key) => key === 'default');\n\n if (!defaultExportName)\n throw new Error(`Module in file '${filePath}' does not have a default export.`);\n\n return module[defaultExportName];\n }\n}\n"],"mappings":";;AAAA,SAAS,YAAY;AAErB,SAAS,oBAAoB;AAC7B,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAG9B,SAAS,oBAAiC;AAiBnC,MAAM,wBAAyC;AAAA,EAClD,KAAK;AAAA,EACL,OAAO;AAAA,EACP,UAAU,QAAQ,IAAI;AAAA,EACtB,IAAI,UAAkB;AAClB,WAAO,KAAK,KAAK,UAAU,KAAK,MAAM,KAAK,iBAAiB,KAAK,aAAa;AAAA,EAClF;AAAA,EACA,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,YAAY;AAChB;AAKA,MAAO,iBAA+B,aAA6B;AAAA,EAvCnE,OAuCmE;AAAA;AAAA;AAAA,EACrD,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,WAAW,oBAAI,IAAiC;AAAA,EAChD;AAAA,EACH,YAAuB,CAAC;AAAA,EACf;AAAA,EAEhB,YAAY,SAAoC;AAC5C,UAAM;AAEN,SAAK,UAAU,EAAE,GAAG,uBAAuB,GAAG,QAAQ;AACtD,SAAK,SAAS,aAAa,YAAY,KAAK,QAAQ,KAAK;AAAA,EAC7D;AAAA;AAAA;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,QAAQ;AACd;AAEJ,UAAM,SAAS,MAAM,KAAK,QAA6C,KAAK,QAAQ,YAAY,KAAK,QAAQ,iBAAiB;AAE9H,QAAI,QAAQ;AACR,YAAM,UAAU,KAAK,iBAAmC,QAAQ,KAAK,QAAQ,iBAAiB;AAE9F,WAAK,YAAY,MAAM,QAAQ;AAC/B,WAAK,OAAO,MAAM,wCAAwC,OAAO,KAAK,KAAK,SAAS,EAAE,MAAM,aAAa;AAAA,IAC7G;AAAA,EACJ;AAAA,EAEA,MAAgB,QAAqE,MAA0B,kBAAkD;AAC7J,UAAM,UAAU,KAAK,QAAQ;AAE7B,QAAI,CAAC,WAAW,gBAAgB;AAC5B;AAEJ,QAAI,SAAS,YAAY;AACrB,UAAI,SAAS;AACT,eAAO,QAAQ,MAAM,gBAAgB;AAAA,MACzC;AAEA,aAAO,QAAQ,gBAAgB;AAAA,IACnC;AAEA,QAAI,UAAU,cAAc,gBAAgB,EAAE;AAE9C,QAAI;AACA,iBAAW,WAAW,KAAK,IAAI,CAAC;AAEpC,WAAQ,MAAM,OAAO;AAAA,EACzB;AAAA,EAEU,iBAAoB,QAA2B,UAAkB;AACvE,UAAM,oBAAoB,OAAO,KAAK,MAAM,EAAE,KAAK,CAAC,QAAQ,QAAQ,SAAS;AAE7E,QAAI,CAAC;AACD,YAAM,IAAI,MAAM,mBAAmB,QAAQ,mCAAmC;AAElF,WAAO,OAAO,iBAAiB;AAAA,EACnC;AACJ;","names":[]}
1
+ {"version":3,"sources":["../src/diatrema.ts","../../../node_modules/.pnpm/tsup@8.5.1_supports-color@8.1.1_tsx@4.23.1_typescript@6.0.3/node_modules/tsup/assets/cjs_shims.js"],"sourcesContent":["import { join } from 'node:path';\nimport { existsSync } from 'node:fs';\nimport { pathToFileURL } from 'node:url';\n\nimport { EventEmitter } from './event-emitter';\nimport { createLogger, type Logger } from './logger';\n\nimport type { MahameruPlugin } from './mahameru-plugin';\nimport { createRequire } from 'node:module';\n\nexport type DiatremaEvents = {\n ready: [data: { mode: 'development' | 'production'; port?: number; host?: string }];\n};\n\nexport type DiatremaOptions = {\n dev: boolean;\n debug: boolean;\n rootPath: string;\n appPath: string;\n productionDir: string;\n developmentDir: string;\n initiatorFilePath?: string;\n moduleType: 'commonjs' | 'esm';\n};\n\nconst requireModule = createRequire(import.meta.url);\n\nexport const diatremaDefaultConfig: DiatremaOptions = {\n dev: false,\n debug: false,\n rootPath: process.cwd(),\n get appPath(): string {\n return join(this.rootPath, this.dev ? this.developmentDir : this.productionDir);\n },\n productionDir: '.mahameru',\n developmentDir: '.mahameru',\n moduleType: 'esm',\n};\n\n/**\n * Main Diatrema class that orchestrates the application lifecycle.\n */\nexport class Diatrema extends EventEmitter<DiatremaEvents> {\n protected _initialized = false;\n protected _isShuttingDown = false;\n protected _plugins = new Map<string, MahameruPlugin>();\n protected logger: Logger;\n public readonly options: DiatremaOptions;\n\n constructor(options?: Partial<DiatremaOptions>) {\n super();\n\n this.options = { ...diatremaDefaultConfig, ...options };\n this.logger = createLogger('Diatrema', this.options.debug);\n }\n\n /**\n * Indicates whether the Mahameru server has been initialized or not.\n * @returns {boolean}\n */\n get initialized() {\n return this._initialized;\n }\n\n /**\n * Indicates whether the Mahameru server is shutting down or not.\n * @returns {boolean}\n */\n get isShuttingDown() {\n return this._isShuttingDown;\n }\n\n get plugins(): Record<string, MahameruPlugin> {\n return Object.fromEntries(this._plugins);\n }\n\n public async initialize(): Promise<void> {\n if (this._initialized) return;\n\n for (const plugin of this._plugins.values()) {\n plugin.setDiatrema(this);\n\n await plugin.initialize();\n }\n\n this._initialized = true;\n\n this.emit('ready', { mode: this.options.dev ? 'development' : 'production' });\n }\n\n public setPlugin<T extends MahameruPlugin>(pluginName: string, plugin: T) {\n this._plugins.set(pluginName, plugin);\n }\n\n public getPlugin<T extends MahameruPlugin>(pluginName: string): T | undefined {\n return this._plugins.get(pluginName) as T | undefined;\n }\n\n public async devHRM(changedFile?: string) {\n if (!this._initialized) return;\n\n if (changedFile) {\n for (const [_name, plugin] of this._plugins.entries()) {\n await plugin.onDevHRM(changedFile);\n }\n }\n }\n\n public async shutdown(): Promise<void> {\n if (this._isShuttingDown) return;\n\n this._isShuttingDown = true;\n\n this.logger.debug('Shutting down...');\n\n for (const plugin of this._plugins.values()) {\n await plugin.destroy();\n }\n\n this._initialized = false;\n this.logger.debug('Shutting down... Done');\n }\n\n protected async require<T extends Record<string, unknown> = Record<string, unknown>>(\n type: 'commonjs' | 'esm',\n resolvedFilePath: string,\n ): Promise<T | undefined> {\n const noCache = this.options.dev;\n\n if (!existsSync(resolvedFilePath)) return;\n\n if (type === 'commonjs') {\n if (noCache) {\n delete requireModule.cache[resolvedFilePath];\n }\n\n return requireModule(resolvedFilePath) as T;\n }\n\n let fileUrl = pathToFileURL(resolvedFilePath).href;\n\n if (noCache) fileUrl += `?update=${Date.now()}`;\n\n return (await import(fileUrl)) as T;\n }\n\n protected getDefaultExport<T>(module: Record<string, T>, filePath: string) {\n const defaultExportName = Object.keys(module).find((key) => key === 'default');\n\n if (!defaultExportName)\n throw new Error(`Module in file '${filePath}' does not have a default export.`);\n\n return module[defaultExportName];\n }\n}\n","// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () => \n typeof document === \"undefined\" \n ? new URL(`file:${__filename}`).href \n : (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT') \n ? document.currentScript.src \n : new URL(\"main.js\", document.baseURI).href;\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACKA,IAAM,mBAAmB,MACvB,OAAO,aAAa,cAChB,IAAI,IAAI,QAAQ,UAAU,EAAE,EAAE,OAC7B,SAAS,iBAAiB,SAAS,cAAc,QAAQ,YAAY,MAAM,WAC1E,SAAS,cAAc,MACvB,IAAI,IAAI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1
+ import { join } from "node:path";
2
+ import { existsSync } from "node:fs";
3
+ import { pathToFileURL } from "node:url";
4
+ import { EventEmitter } from "./event-emitter.mjs";
5
+ import { createLogger } from "./logger.mjs";
6
+ import { createRequire } from "node:module";
7
+ const requireModule = createRequire(import.meta.url);
8
+ const diatremaDefaultConfig = {
9
+ dev: false,
10
+ debug: false,
11
+ rootPath: process.cwd(),
12
+ get appPath() {
13
+ return join(this.rootPath, this.dev ? this.developmentDir : this.productionDir);
14
+ },
15
+ productionDir: ".mahameru",
16
+ developmentDir: ".mahameru",
17
+ moduleType: "esm"
18
+ };
19
+ class Diatrema extends EventEmitter {
20
+ _initialized = false;
21
+ _isShuttingDown = false;
22
+ _plugins = /* @__PURE__ */ new Map();
23
+ logger;
24
+ options;
25
+ constructor(options) {
26
+ super();
27
+ this.options = { ...diatremaDefaultConfig, ...options };
28
+ this.logger = createLogger("Diatrema", this.options.debug);
29
+ }
30
+ /**
31
+ * Indicates whether the Mahameru server has been initialized or not.
32
+ * @returns {boolean}
33
+ */
34
+ get initialized() {
35
+ return this._initialized;
36
+ }
37
+ /**
38
+ * Indicates whether the Mahameru server is shutting down or not.
39
+ * @returns {boolean}
40
+ */
41
+ get isShuttingDown() {
42
+ return this._isShuttingDown;
43
+ }
44
+ get plugins() {
45
+ return Object.fromEntries(this._plugins);
46
+ }
47
+ async initialize() {
48
+ if (this._initialized) return;
49
+ for (const plugin of this._plugins.values()) {
50
+ plugin.setDiatrema(this);
51
+ await plugin.initialize();
52
+ }
53
+ this._initialized = true;
54
+ this.emit("ready", { mode: this.options.dev ? "development" : "production" });
55
+ }
56
+ setPlugin(pluginName, plugin) {
57
+ this._plugins.set(pluginName, plugin);
58
+ }
59
+ getPlugin(pluginName) {
60
+ return this._plugins.get(pluginName);
61
+ }
62
+ async devHRM(changedFile) {
63
+ if (!this._initialized) return;
64
+ if (changedFile) {
65
+ for (const [_name, plugin] of this._plugins.entries()) {
66
+ await plugin.onDevHRM(changedFile);
67
+ }
68
+ }
69
+ }
70
+ async shutdown() {
71
+ if (this._isShuttingDown) return;
72
+ this._isShuttingDown = true;
73
+ this.logger.debug("Shutting down...");
74
+ for (const plugin of this._plugins.values()) {
75
+ await plugin.destroy();
76
+ }
77
+ this._initialized = false;
78
+ this.logger.debug("Shutting down... Done");
79
+ }
80
+ async require(type, resolvedFilePath) {
81
+ const noCache = this.options.dev;
82
+ if (!existsSync(resolvedFilePath)) return;
83
+ if (type === "commonjs") {
84
+ if (noCache) {
85
+ delete requireModule.cache[resolvedFilePath];
86
+ }
87
+ return requireModule(resolvedFilePath);
88
+ }
89
+ let fileUrl = pathToFileURL(resolvedFilePath).href;
90
+ if (noCache) fileUrl += `?update=${Date.now()}`;
91
+ return await import(fileUrl);
92
+ }
93
+ getDefaultExport(module, filePath) {
94
+ const defaultExportName = Object.keys(module).find((key) => key === "default");
95
+ if (!defaultExportName)
96
+ throw new Error(`Module in file '${filePath}' does not have a default export.`);
97
+ return module[defaultExportName];
98
+ }
99
+ }
100
+ export {
101
+ Diatrema,
102
+ diatremaDefaultConfig
103
+ };
104
+ //# sourceMappingURL=diatrema.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/diatrema.ts"],"sourcesContent":["import { join } from 'node:path';\nimport { existsSync } from 'node:fs';\nimport { pathToFileURL } from 'node:url';\n\nimport { EventEmitter } from './event-emitter';\nimport { createLogger, type Logger } from './logger';\n\nimport type { MahameruPlugin } from './mahameru-plugin';\nimport { createRequire } from 'node:module';\n\nexport type DiatremaEvents = {\n ready: [data: { mode: 'development' | 'production'; port?: number; host?: string }];\n};\n\nexport type DiatremaOptions = {\n dev: boolean;\n debug: boolean;\n rootPath: string;\n appPath: string;\n productionDir: string;\n developmentDir: string;\n initiatorFilePath?: string;\n moduleType: 'commonjs' | 'esm';\n};\n\nconst requireModule = createRequire(import.meta.url);\n\nexport const diatremaDefaultConfig: DiatremaOptions = {\n dev: false,\n debug: false,\n rootPath: process.cwd(),\n get appPath(): string {\n return join(this.rootPath, this.dev ? this.developmentDir : this.productionDir);\n },\n productionDir: '.mahameru',\n developmentDir: '.mahameru',\n moduleType: 'esm',\n};\n\n/**\n * Main Diatrema class that orchestrates the application lifecycle.\n */\nexport class Diatrema extends EventEmitter<DiatremaEvents> {\n protected _initialized = false;\n protected _isShuttingDown = false;\n protected _plugins = new Map<string, MahameruPlugin>();\n protected logger: Logger;\n public readonly options: DiatremaOptions;\n\n constructor(options?: Partial<DiatremaOptions>) {\n super();\n\n this.options = { ...diatremaDefaultConfig, ...options };\n this.logger = createLogger('Diatrema', this.options.debug);\n }\n\n /**\n * Indicates whether the Mahameru server has been initialized or not.\n * @returns {boolean}\n */\n get initialized() {\n return this._initialized;\n }\n\n /**\n * Indicates whether the Mahameru server is shutting down or not.\n * @returns {boolean}\n */\n get isShuttingDown() {\n return this._isShuttingDown;\n }\n\n get plugins(): Record<string, MahameruPlugin> {\n return Object.fromEntries(this._plugins);\n }\n\n public async initialize(): Promise<void> {\n if (this._initialized) return;\n\n for (const plugin of this._plugins.values()) {\n plugin.setDiatrema(this);\n\n await plugin.initialize();\n }\n\n this._initialized = true;\n\n this.emit('ready', { mode: this.options.dev ? 'development' : 'production' });\n }\n\n public setPlugin<T extends MahameruPlugin>(pluginName: string, plugin: T) {\n this._plugins.set(pluginName, plugin);\n }\n\n public getPlugin<T extends MahameruPlugin>(pluginName: string): T | undefined {\n return this._plugins.get(pluginName) as T | undefined;\n }\n\n public async devHRM(changedFile?: string) {\n if (!this._initialized) return;\n\n if (changedFile) {\n for (const [_name, plugin] of this._plugins.entries()) {\n await plugin.onDevHRM(changedFile);\n }\n }\n }\n\n public async shutdown(): Promise<void> {\n if (this._isShuttingDown) return;\n\n this._isShuttingDown = true;\n\n this.logger.debug('Shutting down...');\n\n for (const plugin of this._plugins.values()) {\n await plugin.destroy();\n }\n\n this._initialized = false;\n this.logger.debug('Shutting down... Done');\n }\n\n protected async require<T extends Record<string, unknown> = Record<string, unknown>>(\n type: 'commonjs' | 'esm',\n resolvedFilePath: string,\n ): Promise<T | undefined> {\n const noCache = this.options.dev;\n\n if (!existsSync(resolvedFilePath)) return;\n\n if (type === 'commonjs') {\n if (noCache) {\n delete requireModule.cache[resolvedFilePath];\n }\n\n return requireModule(resolvedFilePath) as T;\n }\n\n let fileUrl = pathToFileURL(resolvedFilePath).href;\n\n if (noCache) fileUrl += `?update=${Date.now()}`;\n\n return (await import(fileUrl)) as T;\n }\n\n protected getDefaultExport<T>(module: Record<string, T>, filePath: string) {\n const defaultExportName = Object.keys(module).find((key) => key === 'default');\n\n if (!defaultExportName)\n throw new Error(`Module in file '${filePath}' does not have a default export.`);\n\n return module[defaultExportName];\n }\n}\n"],"mappings":"AAAA,SAAS,YAAY;AACrB,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAE9B,SAAS,oBAAoB;AAC7B,SAAS,oBAAiC;AAG1C,SAAS,qBAAqB;AAiB9B,MAAM,gBAAgB,cAAc,YAAY,GAAG;AAE5C,MAAM,wBAAyC;AAAA,EACpD,KAAK;AAAA,EACL,OAAO;AAAA,EACP,UAAU,QAAQ,IAAI;AAAA,EACtB,IAAI,UAAkB;AACpB,WAAO,KAAK,KAAK,UAAU,KAAK,MAAM,KAAK,iBAAiB,KAAK,aAAa;AAAA,EAChF;AAAA,EACA,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,YAAY;AACd;AAKO,MAAM,iBAAiB,aAA6B;AAAA,EAC/C,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,WAAW,oBAAI,IAA4B;AAAA,EAC3C;AAAA,EACM;AAAA,EAEhB,YAAY,SAAoC;AAC9C,UAAM;AAEN,SAAK,UAAU,EAAE,GAAG,uBAAuB,GAAG,QAAQ;AACtD,SAAK,SAAS,aAAa,YAAY,KAAK,QAAQ,KAAK;AAAA,EAC3D;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,IAAI,cAAc;AAChB,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA;AAAA,EAM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;AAEA,QAAI,UAAU,cAAc,gBAAgB,EAAE;AAE9C,QAAI,QAAS,YAAW,WAAW,KAAK,IAAI,CAAC;AAE7C,WAAQ,MAAM,OAAO;AAAA,EACvB;AAAA,EAEU,iBAAoB,QAA2B,UAAkB;AACzE,UAAM,oBAAoB,OAAO,KAAK,MAAM,EAAE,KAAK,CAAC,QAAQ,QAAQ,SAAS;AAE7E,QAAI,CAAC;AACH,YAAM,IAAI,MAAM,mBAAmB,QAAQ,mCAAmC;AAEhF,WAAO,OAAO,iBAAiB;AAAA,EACjC;AACF;","names":[]}
@@ -1,5 +1,5 @@
1
- type Listener<T extends any[]> = (...args: T) => void;
2
- declare class EventEmitter<Events extends Record<string, any[]>> {
1
+ type Listener<T extends unknown[]> = (...args: T) => void;
2
+ export declare class EventEmitter<Events extends Record<string, unknown[]>> {
3
3
  private listeners;
4
4
  on<K extends keyof Events>(event: K, listener: Listener<Events[K]>): void;
5
5
  off<K extends keyof Events>(event: K, listener: Listener<Events[K]>): void;
@@ -7,5 +7,5 @@ declare class EventEmitter<Events extends Record<string, any[]>> {
7
7
  once<K extends keyof Events>(event: K, listener: Listener<Events[K]>): void;
8
8
  removeAllListeners<K extends keyof Events>(event?: K): void;
9
9
  }
10
-
11
- export { EventEmitter };
10
+ export {};
11
+ //# sourceMappingURL=event-emitter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-emitter.d.ts","sourceRoot":"","sources":["../src/event-emitter.ts"],"names":[],"mappings":"AAAA,KAAK,QAAQ,CAAC,CAAC,SAAS,OAAO,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC;AAM1D,qBAAa,YAAY,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC;IAChE,OAAO,CAAC,SAAS,CAAgD;IAEjE,EAAE,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;IASzE,GAAG,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;IAc1E,IAAI,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI;IAUhE,IAAI,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI;IAW3E,kBAAkB,CAAC,CAAC,SAAS,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI;CAO5D"}
package/event-emitter.js CHANGED
@@ -1,13 +1,34 @@
1
+ "use strict";
1
2
  var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- class EventEmitter {
4
- static {
5
- __name(this, "EventEmitter");
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 });
6
15
  }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var event_emitter_exports = {};
20
+ __export(event_emitter_exports, {
21
+ EventEmitter: () => EventEmitter
22
+ });
23
+ module.exports = __toCommonJS(event_emitter_exports);
24
+ class EventEmitter {
7
25
  listeners = /* @__PURE__ */ new Map();
8
26
  on(event, listener) {
9
27
  if (!this.listeners.has(event)) this.listeners.set(event, []);
10
- this.listeners.get(event).push(listener);
28
+ const eventListeners = this.listeners.get(event);
29
+ if (eventListeners) {
30
+ eventListeners.push(listener);
31
+ }
11
32
  }
12
33
  off(event, listener) {
13
34
  const list = this.listeners.get(event);
@@ -20,14 +41,16 @@ class EventEmitter {
20
41
  emit(event, ...args) {
21
42
  const list = this.listeners.get(event);
22
43
  if (list) {
23
- [...list].forEach((listener) => listener(...args));
44
+ [...list].forEach((listener) => {
45
+ listener(...args);
46
+ });
24
47
  }
25
48
  }
26
49
  once(event, listener) {
27
- const onceListener = /* @__PURE__ */ __name((...args) => {
50
+ const onceListener = (...args) => {
28
51
  listener(...args);
29
52
  this.off(event, onceListener);
30
- }, "onceListener");
53
+ };
31
54
  onceListener.original = listener;
32
55
  this.on(event, onceListener);
33
56
  }
@@ -39,7 +62,8 @@ class EventEmitter {
39
62
  }
40
63
  }
41
64
  }
42
- export {
65
+ // Annotate the CommonJS export names for ESM import in node:
66
+ 0 && (module.exports = {
43
67
  EventEmitter
44
- };
68
+ });
45
69
  //# sourceMappingURL=event-emitter.js.map