Skip to content

Commit

Permalink
pear-doctor alias (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruy-dan authored Jul 25, 2024
1 parent a39dfd7 commit 5274c21
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const WAKEUP_EXEC = isWindows

const ALIASES = {
keet: hypercoreid.decode('oeeoz3w6fjjt7bym3ndpa6hhicm8f8naxyk11z4iypeoupn6jzpo'),
runtime: hypercoreid.decode('nkw138nybdx6mtf98z497czxogzwje5yzu585c66ofba854gw3ro')
runtime: hypercoreid.decode('nkw138nybdx6mtf98z497czxogzwje5yzu585c66ofba854gw3ro'),
doctor: hypercoreid.decode('3ih5k1t15xb9hrnz1mkd4jhamefis7ni4nwuus8f1w3j94yu831y')
}

const EOLS = {
Expand Down
3 changes: 3 additions & 0 deletions subsystems/sidecar/lib/applings.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class Applings extends ReadyResource {
if (!this.opened) await this.ready()
if (hexKey === constants.ALIASES.keet.toString('hex')) hexKey = 'keet'
if (hexKey === constants.ALIASES.runtime.toString('hex')) hexKey = 'runtime'
if (hexKey === constants.ALIASES.doctor.toString('hex')) hexKey = 'doctor'

let found = false
for (const entry of this._applings) {
Expand Down Expand Up @@ -154,6 +155,8 @@ class Applings extends ReadyResource {
if (!this.opened) await this.ready()
if (hexKey === constants.ALIASES.keet.toString('hex') || hexKey === constants.EOLS.keet.toString('hex')) hexKey = 'keet'
if (hexKey === constants.ALIASES.runtime.toString('hex')) hexKey = 'runtime'
if (hexKey === constants.ALIASES.doctor.toString('hex')) hexKey = 'doctor'

for (const { key, path } of this._applings) {
if (key === hexKey) return path
}
Expand Down

0 comments on commit 5274c21

Please sign in to comment.