Skip to content
This repository has been archived by the owner on Dec 27, 2022. It is now read-only.
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: beakerbrowser/beaker
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c02f1987048d704e2af6ff917eb3aec7e8f10f42
Choose a base ref
..
head repository: beakerbrowser/beaker
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5d92286398b0da3f6da9ac1608a304468d9c52eb
Choose a head ref
Showing with 3 additions and 2 deletions.
  1. +3 −2 app/userland/webterm/js/main.js
5 changes: 3 additions & 2 deletions app/userland/webterm/js/main.js
Original file line number Diff line number Diff line change
@@ -145,6 +145,7 @@ class WebTerm extends LitElement {
})
userPackages = userPackages.filter(p => p.stat.isDirectory())
for (let pkg of userPackages) {
pkg.name = pkg.path.split('/').pop()
try {
pkg.manifest = JSON.parse(await navigator.filesystem.readFile(`/${pkg.path}/index.json`))
} catch (e) {
@@ -164,7 +165,7 @@ class WebTerm extends LitElement {

try {
// HACK we use importModule() instead of import() because I could NOT get rollup to leave dynamic imports alone -prf
this.commandModules[pkg.url] = await importModule(joinPath(pkg.url, 'index.js'))
this.commandModules[pkg.name] = await importModule(joinPath(pkg.url, 'index.js'))
} catch (err) {
this.outputError(`Failed to load ${pkg.manifest.title} (${pkg.url}) index.js`, err)
continue
@@ -173,7 +174,7 @@ class WebTerm extends LitElement {
for (let command of commands) {
if (!command.name) continue
let commandData = {
package: pkg.path ? pkg.path.split('/').pop() : pkg.url,
package: pkg.name || pkg.url,
name: command.name,
help: command.help,
usage: command.usage,