refactor: update @unraid/core and fixed plugin loading

This commit is contained in:
Alexis Tyler
2020-01-23 16:20:01 +10:30
parent 8a6263c6d8
commit 7126fe8147
3 changed files with 52 additions and 24 deletions
+46 -21
View File
@@ -1118,8 +1118,8 @@
"dev": true
},
"@unraid/core": {
"version": "github:unraid/core#6f0fbb457f98f21bd1e4c99bdb3b88fbad8d050c",
"from": "github:unraid/core#feature/add-better-typing",
"version": "github:unraid/core#77a5fbdb8e73de4257d1823379561d81265634c8",
"from": "github:unraid/core",
"requires": {
"abort-controller": "^3.0.0",
"accesscontrol": "^2.2.1",
@@ -1184,6 +1184,7 @@
"pify": "^4.0.1",
"pretty-ms": "^5.1.0",
"ps-list": "^6.3.0",
"redact-secrets": "github:OmgImAlexis/redact-secrets",
"request": "^2.88.0",
"request-promise": "4.2.5",
"request-promise-native": "^1.0.8",
@@ -1370,6 +1371,14 @@
"picomatch": "^2.0.7"
}
},
"redact-secrets": {
"version": "github:OmgImAlexis/redact-secrets#793a0bc696e1be69af6d65e6884177db9659976f",
"from": "github:OmgImAlexis/redact-secrets",
"requires": {
"is-secret": "^1.0.0",
"traverse": "^0.6.6"
}
},
"semver": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.1.1.tgz",
@@ -8459,27 +8468,43 @@
}
},
"jsdoc-x": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/jsdoc-x/-/jsdoc-x-4.0.3.tgz",
"integrity": "sha512-3wXPyyb0uitCelmN2pwRDlgEggLYz4K7Kf8xRLYCebteS17GkQ/dxQ8bgB2NgCWTzi2WVdCJeJ/NEXxtUxQPzA==",
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/jsdoc-x/-/jsdoc-x-4.1.0.tgz",
"integrity": "sha512-eM4svACroOxjhV0JuwmNUQQHRXM4bhE4eQ+yjYnD/W8HjD+iZPjJaEUl3D6DHEX0uUpWawd31VhZg1E3j0Ageg==",
"requires": {
"bluebird": "^3.5.3",
"fs-extra": "^7.0.1",
"glob": "^7.1.3",
"jsdoc": "^3.5.5",
"bluebird": "^3.7.2",
"fs-extra": "^8.1.0",
"glob": "^7.1.6",
"jsdoc": "^3.6.3",
"json-stringify-safe": "^5.0.1",
"lodash": "^4.17.11",
"tmp": "0.0.33"
"lodash": "^4.17.15",
"tmp": "^0.1.0"
},
"dependencies": {
"fs-extra": {
"version": "7.0.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz",
"integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==",
"bluebird": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
},
"glob": {
"version": "7.1.6",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
"requires": {
"graceful-fs": "^4.1.2",
"jsonfile": "^4.0.0",
"universalify": "^0.1.0"
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"tmp": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz",
"integrity": "sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==",
"requires": {
"rimraf": "^2.6.3"
}
}
}
@@ -12382,9 +12407,9 @@
"integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ=="
},
"systeminformation": {
"version": "4.19.1",
"resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-4.19.1.tgz",
"integrity": "sha512-6Jb+0aepgRb2B4vFgxKKcrr8QexhERkPX1z0EzIyCKDMQjILt+ZbNtFxrGjFwa67tn9Wbqs1L5t/CjCUwB1FcA=="
"version": "4.19.2",
"resolved": "https://registry.npmjs.org/systeminformation/-/systeminformation-4.19.2.tgz",
"integrity": "sha512-uy4jTZbwBkxmCXa1eo3hIh+CLAcovXtDvfwyuPtoL9iJK8qzO0Zf+03mlW7tzVK5fcLaPCw7mbjJ44hMwqRRNQ=="
},
"table": {
"version": "5.4.6",
+1 -1
View File
@@ -27,7 +27,7 @@
],
"dependencies": {
"@gridplus/docker-events": "^1.0.0",
"@unraid/core": "github:unraid/core#feature/add-better-typing",
"@unraid/core": "github:unraid/core",
"accesscontrol": "^2.2.1",
"am": "^1.0.1",
"apollo-datasource-rest": "^0.6.11",
+5 -2
View File
@@ -202,10 +202,13 @@ class FuncDirective extends SchemaDirectiveVisitor {
// Resolve func
let func;
try {
if (pluginName) {
func = getPluginModule(pluginName, pluginModuleName);
const { filePath } = getPluginModule(pluginName, pluginModuleName);
const pluginModule = require(filePath);
// The file will either use a default export or a named one
// If it's named it should be the same as a module name
func = typeof pluginModule === 'function' ? pluginModule : pluginModule[pluginModuleName];
} else {
func = getCoreModule(moduleName);
}