Compare commits

...

4 Commits

Author SHA1 Message Date
Simon J
91cc450451 Fix bug where register failed to wrun (#49) 2021-09-09 15:02:37 +10:00
Simon J
c1815e5e48 Feature/up (#48)
* Upgrade production dependencies

* Upgrade dev dependencies
2021-09-07 22:56:59 +10:00
simojenki
287e203449 Setting node version to 16.6 in ci.yaml actions pipeline 2021-09-07 21:15:24 +10:00
Simon J
92be208a35 Fix bug navigating from album to artist (#47) 2021-09-07 10:24:46 +10:00
7 changed files with 1294 additions and 2250 deletions

View File

@@ -21,7 +21,7 @@ jobs:
-
uses: actions/setup-node@v1
with:
node-version: 16.x
node-version: 16.6.x
-
run: yarn install
-

View File

@@ -49,5 +49,6 @@ COPY src/Sonoswsdl-1.19.4-20190411.142401-3.wsdl ./src/Sonoswsdl-1.19.4-20190411
RUN apk add --no-cache --update vips
USER nobody
WORKDIR /bonob/src
CMD ["node", "/bonob/src/app.js"]
CMD ["node", "app.js"]

View File

@@ -6,49 +6,49 @@
"author": "simojenki <simojenki@users.noreply.github.com>",
"license": "GPL-3.0-only",
"dependencies": {
"@svrooij/sonos": "^2.3.0",
"@types/express": "^4.17.11",
"@types/morgan": "^1.9.2",
"@types/node": "^14.14.22",
"@types/sharp": "^0.27.1",
"@types/underscore": "1.10.24",
"@types/uuid": "^8.3.0",
"axios": "^0.21.1",
"dayjs": "^1.10.4",
"eta": "^1.12.1",
"@svrooij/sonos": "^2.4.0",
"@types/express": "^4.17.13",
"@types/morgan": "^1.9.3",
"@types/node": "^16.7.13",
"@types/sharp": "^0.28.6",
"@types/underscore": "^1.11.3",
"@types/uuid": "^8.3.1",
"axios": "^0.21.4",
"dayjs": "^1.10.6",
"eta": "^1.12.3",
"express": "^4.17.1",
"fp-ts": "^2.9.5",
"libxmljs2": "^0.27.0",
"fp-ts": "^2.11.1",
"libxmljs2": "^0.28.0",
"morgan": "^1.10.0",
"node-html-parser": "^2.1.0",
"sharp": "^0.27.2",
"soap": "^0.37.0",
"ts-md5": "^1.2.7",
"typescript": "^4.1.3",
"underscore": "^1.12.1",
"node-html-parser": "^4.1.4",
"sharp": "^0.29.1",
"soap": "^0.42.0",
"ts-md5": "^1.2.9",
"typescript": "^4.4.2",
"underscore": "^1.13.1",
"uuid": "^8.3.2",
"winston": "^3.3.3",
"x2js": "^3.4.1"
"x2js": "^3.4.2"
},
"devDependencies": {
"@types/chai": "^4.2.14",
"@types/jest": "^26.0.20",
"@types/mocha": "^8.2.0",
"@types/supertest": "^2.0.10",
"chai": "^4.2.0",
"@types/chai": "^4.2.21",
"@types/jest": "^27.0.1",
"@types/mocha": "^9.0.0",
"@types/supertest": "^2.0.11",
"chai": "^4.3.4",
"get-port": "^5.1.1",
"image-js": "^0.32.0",
"jest": "^26.6.3",
"nodemon": "^2.0.7",
"supertest": "^6.1.3",
"ts-jest": "^26.4.4",
"image-js": "^0.33.0",
"jest": "^27.1.0",
"nodemon": "^2.0.12",
"supertest": "^6.1.6",
"ts-jest": "^27.0.5",
"ts-mockito": "^2.6.1",
"ts-node": "^9.1.1",
"ts-node": "^10.2.1",
"xmldom-ts": "^0.3.1",
"xpath-ts": "^1.3.13"
},
"scripts": {
"clean": "rm -Rf build",
"clean": "rm -Rf build node_modules",
"build": "tsc",
"dev": "BONOB_ICON_FOREGROUND_COLOR=white BONOB_ICON_BACKGROUND_COLOR=darkgrey BONOB_SONOS_SERVICE_NAME=bonobDev BONOB_SONOS_DEVICE_DISCOVERY=true nodemon -V ./src/app.ts",
"devr": "BONOB_ICON_FOREGROUND_COLOR=white BONOB_ICON_BACKGROUND_COLOR=darkgrey BONOB_SONOS_SERVICE_NAME=bonobDev BONOB_SONOS_DEVICE_DISCOVERY=true BONOB_SONOS_AUTO_REGISTER=true nodemon -V ./src/app.ts",

View File

@@ -268,7 +268,7 @@ export const album = (bonobUrl: URLBuilder, album: AlbumSummary) => ({
itemType: "album",
id: `album:${album.id}`,
artist: album.artistName,
artistId: album.artistId,
artistId: `artist:${album.artistId}`,
title: album.name,
albumArtURI: defaultAlbumArtURI(bonobUrl, album).href(),
canPlay: true,

View File

@@ -299,7 +299,7 @@ describe("album", () => {
albumArtURI: defaultAlbumArtURI(bonobUrl, someAlbum).href(),
canPlay: true,
artist: someAlbum.artistName,
artistId: someAlbum.artistId,
artistId: `artist:${someAlbum.artistId}`,
});
});
});
@@ -1168,7 +1168,7 @@ describe("api", () => {
it
).href(),
canPlay: true,
artistId: it.artistId,
artistId: `artist:${it.artistId}`,
artist: it.artistName,
})
),
@@ -1205,7 +1205,7 @@ describe("api", () => {
it
).href(),
canPlay: true,
artistId: it.artistId,
artistId: `artist:${it.artistId}`,
artist: it.artistName,
})),
index: 2,
@@ -1509,7 +1509,7 @@ describe("api", () => {
it
).href(),
canPlay: true,
artistId: it.artistId,
artistId: `artist:${it.artistId}`,
artist: it.artistName,
})),
index: 0,
@@ -1557,7 +1557,7 @@ describe("api", () => {
it
).href(),
canPlay: true,
artistId: it.artistId,
artistId: `artist:${it.artistId}`,
artist: it.artistName,
})),
index: 0,
@@ -1605,7 +1605,7 @@ describe("api", () => {
it
).href(),
canPlay: true,
artistId: it.artistId,
artistId: `artist:${it.artistId}`,
artist: it.artistName,
})),
index: 0,
@@ -1653,7 +1653,7 @@ describe("api", () => {
it
).href(),
canPlay: true,
artistId: it.artistId,
artistId: `artist:${it.artistId}`,
artist: it.artistName,
})),
index: 0,
@@ -1701,7 +1701,7 @@ describe("api", () => {
it
).href(),
canPlay: true,
artistId: it.artistId,
artistId: `artist:${it.artistId}`,
artist: it.artistName,
})),
index: 0,
@@ -1747,7 +1747,7 @@ describe("api", () => {
it
).href(),
canPlay: true,
artistId: it.artistId,
artistId: `artist:${it.artistId}`,
artist: it.artistName,
})),
index: 0,
@@ -1793,7 +1793,7 @@ describe("api", () => {
it
).href(),
canPlay: true,
artistId: it.artistId,
artistId: `artist:${it.artistId}`,
artist: it.artistName,
})),
index: 2,
@@ -1837,7 +1837,7 @@ describe("api", () => {
it
).href(),
canPlay: true,
artistId: it.artistId,
artistId: `artist:${it.artistId}`,
artist: it.artistName,
})),
index: 0,
@@ -1884,7 +1884,7 @@ describe("api", () => {
it
).href(),
canPlay: true,
artistId: it.artistId,
artistId: `artist:${it.artistId}`,
artist: it.artistName,
})),
index: 0,
@@ -2344,7 +2344,7 @@ describe("api", () => {
album
).href(),
canPlay: true,
artistId: album.artistId,
artistId: `artist:${album.artistId}`,
artist: album.artistName,
},
},

View File

@@ -1,7 +1,10 @@
import { Express } from "express";
import { ReadStream } from "fs";
import { IHttpClient } from "soap";
import request from "supertest";
import * as req from "axios";
function supersoap(server: Express) {
function supersoap(server: Express): IHttpClient {
return {
request: (
rurl: string,
@@ -15,12 +18,19 @@ function supersoap(server: Express) {
data == null
? request(server).get(withoutHost).send()
: request(server).post(withoutHost).send(data);
req
return req
.set(exheaders || {})
.then((response) => callback(null, response, response.text))
.catch(callback);
},
}
requestStream: (
_: string,
_2: any
): req.AxiosPromise<ReadStream> => {
throw "Not Implemented!!";
},
};
}
export default supersoap
export default supersoap;

3431
yarn.lock

File diff suppressed because it is too large Load Diff