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 CHANGED
@@ -22,6 +22,8 @@ const VARS = {
22
22
  }
23
23
  //const memwatch = require('@airbnb/node-memwatch');
24
24
  class Kernel {
25
+ //schema = ">=1.0.0"
26
+ schema = ">=1.0.0"
25
27
  constructor(store) {
26
28
  this.fetch = fetch
27
29
  this.store = store
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pinokiod",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
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") {