-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: update bonjour-service to v1.2.1 #475
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
diff --git a/node_modules/bonjour-service/dist/lib/registry.js b/node_modules/bonjour-service/dist/lib/registry.js | ||
index 5462ca2..662486d 100644 | ||
--- a/node_modules/bonjour-service/dist/lib/registry.js | ||
+++ b/node_modules/bonjour-service/dist/lib/registry.js | ||
@@ -15,14 +15,18 @@ class Registry { | ||
this.server = server; | ||
} | ||
publish(config) { | ||
- function start(service, registry, opts) { | ||
+ const configProbe = config.probe !== false; | ||
+ | ||
+ const service = new service_1.default(config, start.bind(null, this), stop.bind(null, this)); | ||
+ | ||
+ function start(registry, { probe = configProbe } = {}) { | ||
if (service.activated) | ||
return; | ||
service.activated = true; | ||
registry.services.push(service); | ||
if (!(service instanceof service_1.default)) | ||
return; | ||
- if (opts === null || opts === void 0 ? void 0 : opts.probe) { | ||
+ if (probe) { | ||
registry.probe(registry.server.mdns, service, (exists) => { | ||
if (exists) { | ||
if (service.stop !== undefined) | ||
@@ -37,7 +41,7 @@ class Registry { | ||
registry.announce(registry.server, service); | ||
} | ||
} | ||
- function stop(service, registry, callback) { | ||
+ function stop(registry, callback) { | ||
if (!callback) | ||
callback = noop; | ||
if (!service.activated) | ||
@@ -49,10 +53,7 @@ class Registry { | ||
if (index !== -1) | ||
registry.services.splice(index, 1); | ||
} | ||
- const service = new service_1.default(config); | ||
- service.start = start.bind(null, service, this); | ||
- service.stop = stop.bind(null, service, this); | ||
- service.start({ probe: config.probe !== false }); | ||
+ service.start(); | ||
return service; | ||
} | ||
unpublishAll(callback) { | ||
diff --git a/node_modules/bonjour-service/dist/lib/service.d.ts b/node_modules/bonjour-service/dist/lib/service.d.ts | ||
index 2c711f9..c459a07 100644 | ||
--- a/node_modules/bonjour-service/dist/lib/service.d.ts | ||
+++ b/node_modules/bonjour-service/dist/lib/service.d.ts | ||
@@ -41,8 +41,8 @@ export declare class Service extends EventEmitter { | ||
published: boolean; | ||
activated: boolean; | ||
destroyed: boolean; | ||
- start?: CallableFunction; | ||
- stop?: CallableFunction; | ||
+ start: CallableFunction; | ||
+ stop: CallableFunction; | ||
private txtService; | ||
constructor(config: ServiceConfig); | ||
records(): Array<ServiceRecord>; | ||
diff --git a/node_modules/bonjour-service/dist/lib/service.js b/node_modules/bonjour-service/dist/lib/service.js | ||
index 41da95a..ac71665 100644 | ||
--- a/node_modules/bonjour-service/dist/lib/service.js | ||
+++ b/node_modules/bonjour-service/dist/lib/service.js | ||
@@ -10,8 +10,10 @@ const events_1 = require("events"); | ||
const service_types_1 = require("./service-types"); | ||
const TLD = '.local'; | ||
class Service extends events_1.EventEmitter { | ||
- constructor(config) { | ||
+ constructor(config, start, stop) { | ||
super(); | ||
+ this.start = start; | ||
+ this.stop = stop; | ||
this.probe = true; | ||
this.published = false; | ||
this.activated = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,7 +119,7 @@ export class DnsSd extends TypedEmitter { | |
host: this.#name + '.local', | ||
port, | ||
type: SERVICE_NAME, | ||
disableIpv6: this.#disableIpv6, | ||
disableIPv6: this.#disableIpv6, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our old patch used a slightly different name than the "real" version upstream. |
||
}) | ||
} | ||
this.#advertisingStarting = once(this.#service, 'up') | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, I submitted these changes upstream.