pinokiod 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/kernel/index.js +2 -0
- package/package.json +1 -1
- package/server/index.js +10 -0
package/kernel/index.js
CHANGED
package/package.json
CHANGED
package/server/index.js
CHANGED
|
@@ -907,6 +907,15 @@ class Server {
|
|
|
907
907
|
let p = path.resolve(uri, item.name, "pinokio.js")
|
|
908
908
|
let config = (await this.kernel.loader.load(p)).resolved
|
|
909
909
|
if (config) {
|
|
910
|
+
if (config.version) {
|
|
911
|
+
if (semver.satisfies(config.version, this.kernel.schema)) {
|
|
912
|
+
console.log("semver satisfied", config.version, this.kernel.schema)
|
|
913
|
+
} else {
|
|
914
|
+
console.log("semver NOT satisfied", config.version, this.kernel.schema)
|
|
915
|
+
error = `Please update Pinokio to the latest version (current script version: ${config.version}, supported: ${this.kernel.schema}`
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
/*
|
|
910
919
|
if (config.pinokiod) {
|
|
911
920
|
// if the script contains a 'pinokiod' field, compare it against the current version
|
|
912
921
|
// if the current version satisfies the pinokiod field, move forward
|
|
@@ -918,6 +927,7 @@ class Server {
|
|
|
918
927
|
error = `Please update Pinokio to the latest version (current pinokiod: ${this.version.pinokiod}, required: ${config.pinokiod}`
|
|
919
928
|
}
|
|
920
929
|
}
|
|
930
|
+
*/
|
|
921
931
|
if (config.menu) {
|
|
922
932
|
if (typeof config.menu === "function") {
|
|
923
933
|
if (config.menu.constructor.name === "AsyncFunction") {
|