diff --git a/src/runner.js b/src/runner.js index 553551d02..c06e9a77f 100644 --- a/src/runner.js +++ b/src/runner.js @@ -16,6 +16,10 @@ const os = require("os"); const cluster = require("cluster"); const kleur = require("kleur"); +/** + * Import types + */ + const stopSignals = [ "SIGHUP", "SIGINT", diff --git a/src/service.d.ts b/src/service.d.ts index 7fc5050a0..3c15cbf50 100644 --- a/src/service.d.ts +++ b/src/service.d.ts @@ -66,7 +66,6 @@ declare namespace Service { export type ActionVisibility = "published" | "public" | "protected" | "private"; - // export type ActionParamSchema = { [key: string]: any }; export type ActionParamTypes = | "any" | "array" @@ -83,8 +82,9 @@ declare namespace Service { | "url" | "uuid" | boolean - | string; - // | ActionParamSchema; + | string + | Record; + export type ActionParams = { [key: string]: ActionParamTypes }; export type ActionCacheEnabledFunc = (ctx: Context) => boolean; diff --git a/src/tracing/span.js b/src/tracing/span.js index 1a50583ea..372e1069f 100644 --- a/src/tracing/span.js +++ b/src/tracing/span.js @@ -27,6 +27,7 @@ function defProp(instance, propName, value, readOnly = false) { /** * Trace Span class * + * @property {Tracer} tracer * @class Span * @implements {SpanClass} */ @@ -41,7 +42,7 @@ class Span { */ constructor(tracer, name, opts) { defProp(this, "tracer", tracer, true); - defProp(this, "logger", this.tracer.logger, true); + defProp(this, "logger", tracer.logger, true); defProp(this, "opts", opts || {}); defProp(this, "meta", {}); diff --git a/src/transit.d.ts b/src/transit.d.ts index 08f68059b..3e69aff4e 100644 --- a/src/transit.d.ts +++ b/src/transit.d.ts @@ -11,7 +11,7 @@ import type { Regenerator as ErrorRegenerator } from "./errors"; import { Stream } from "stream"; -import { NodeRawInfo } from "./service-broker"; +import { NodeRawInfo } from "./registry"; declare namespace Transit { export interface TransitOptions { diff --git a/src/transporters/tcp/udp-broadcaster.js b/src/transporters/tcp/udp-broadcaster.js index 3949149ea..4ded819ef 100644 --- a/src/transporters/tcp/udp-broadcaster.js +++ b/src/transporters/tcp/udp-broadcaster.js @@ -128,7 +128,7 @@ class UdpServer extends EventEmitter { /** @type {import("dgram").BindOptions} */ const bindOptions = { port, exclusive: true }; - if (host) { + if (host && !multicastAddress) { bindOptions.address = host; }