Skip to content

Commit 706bc23

Browse files
committed
plugin: Fixes for CI
1 parent af73b96 commit 706bc23

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

ci/dev/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ main() {
66

77
cd test/test-plugin
88
make -s out/index.js
9-
cd $OLDPWD
9+
cd "$OLDPWD"
1010
mocha -r ts-node/register ./test/*.test.ts "$@"
1111
}
1212

src/node/plugin.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ export class PluginAPI {
5454
*/
5555
public async applications(): Promise<Application[]> {
5656
const apps = new Array<Application>()
57-
for (const [_, p] of this.plugins) {
57+
for (const [, p] of this.plugins) {
5858
const pluginApps = await p.applications()
5959

6060
// Add plugin key to each app.
6161
apps.push(
6262
...pluginApps.map((app) => {
63-
app = {...app, path: path.join(p.routerPath, app.path || "")}
64-
app = {...app, iconPath: path.join(app.path || "", app.iconPath)}
63+
app = { ...app, path: path.join(p.routerPath, app.path || "") }
64+
app = { ...app, iconPath: path.join(app.path || "", app.iconPath) }
6565
return {
6666
...app,
6767
plugin: {
@@ -85,7 +85,7 @@ export class PluginAPI {
8585
* mount mounts all plugin routers onto r.
8686
*/
8787
public mount(r: express.Router): void {
88-
for (const [_, p] of this.plugins) {
88+
for (const [, p] of this.plugins) {
8989
r.use(`/${p.name}`, p.router())
9090
}
9191
}
@@ -142,7 +142,7 @@ export class PluginAPI {
142142
encoding: "utf8",
143143
})
144144
const packageJSON: PackageJSON = JSON.parse(str)
145-
for (const [_, p] of this.plugins) {
145+
for (const [, p] of this.plugins) {
146146
if (p.name === packageJSON.name) {
147147
this.logger.warn(
148148
`ignoring duplicate plugin ${q(p.name)} at ${q(dir)}, using previously loaded ${q(p.modulePath)}`,

src/node/routes/apps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ export function router(papi: PluginAPI): express.Router {
1212
router.get("/", async (req, res) => {
1313
res.json(await papi.applications())
1414
})
15-
15+
1616
return router
1717
}

src/node/routes/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@ import { PluginAPI } from "../plugin"
1616
import { getMediaMime, paths } from "../util"
1717
import { WebsocketRequest } from "../wsRouter"
1818
import * as domainProxy from "./domainProxy"
19+
import * as apps from "./apps"
1920
import * as health from "./health"
2021
import * as login from "./login"
2122
import * as proxy from "./pathProxy"
2223
// static is a reserved keyword.
2324
import * as _static from "./static"
2425
import * as update from "./update"
2526
import * as vscode from "./vscode"
26-
import * as apps from "./apps"
2727

2828
declare global {
2929
// eslint-disable-next-line @typescript-eslint/no-namespace

0 commit comments

Comments
 (0)