Skip to content

Commit f2cf19a

Browse files
committed
- fix a bug on load of system
1 parent 00b8eaa commit f2cf19a

File tree

7 files changed

+19
-17
lines changed

7 files changed

+19
-17
lines changed

bower.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "system-runtime",
3-
"version": "1.8.0",
3+
"version": "1.8.1",
44
"description": "System Runtime, a JavaScript library that runs systems",
55
"license": "Apache-2.0",
66
"homepage": "https://system-runtime.github.io",
@@ -27,7 +27,8 @@
2727
"system",
2828
"universal",
2929
"runtime",
30-
"json"
30+
"json",
31+
"osgi"
3132
],
3233
"ignore": [
3334
"addons",

build/system/system.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,7 @@ var system = {
16681668
"_id": "1e9021bd4e1bc6e",
16691669
"component": "RuntimeChannel",
16701670
"state": "$systemInstalled",
1671-
"action": "function $systemInstalled(id) {\n var systems = null,\n dependencies = [],\n master = [],\n canStart = true;\n\n if (id !== 'e89c617b6b15d24') {\n if (typeof global === 'undefined' && typeof document !== 'undefined') {\n \n // if all systems are installed\n systems = $db.RuntimeSystem.find({});\n\n systems.forEach(function (system) {\n var sys = this.require(system._id);\n if (sys.status() === 'none') {\n canStart = false;\n }\n }.bind(this));\n\n // start all the systems\n if (canStart) {\n dependencies = $db.RuntimeSystem.find({\n 'master': false\n });\n\n dependencies.forEach(function (dep) {\n var system = this.require(dep._id);\n channel = this.require('channel');\n \n if (system.status() === 'resolved') {\n system.status('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.status('active');\n }\n }.bind(this));\n\n master = $db.RuntimeSystem.find({\n 'master': true\n });\n\n master.forEach(function (dep) {\n var system = this.require(dep._id);\n channel = this.require('channel');\n \n if (system.status() === 'installed') {\n system.status('resolved');\n channel.$systemResolved(dep._id);\n system.status('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.status('active');\n }\n }.bind(this));\n }\n }\n }\n}",
1671+
"action": "function $systemInstalled(id) {\n var systems = null,\n dependencies = [],\n master = [],\n canStart = true;\n\n if (id !== 'e89c617b6b15d24') {\n if (typeof global === 'undefined' && typeof document !== 'undefined') {\n \n // if all systems are installed\n systems = $db.RuntimeSystem.find({});\n\n systems.forEach(function (system) {\n var sys = this.require(system._id);\n if (sys.status() === 'none') {\n canStart = false;\n }\n }.bind(this));\n\n // start all the systems\n if (canStart) {\n dependencies = $db.RuntimeSystem.find({\n 'master': false\n });\n\n dependencies.forEach(function (dep) {\n var system = this.require(dep._id);\n channel = this.require('channel');\n \n if (system.status() === 'resolved') {\n system.status('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.status('active');\n }\n }.bind(this));\n\n master = $db.RuntimeSystem.find({\n 'master': true\n });\n\n master.forEach(function (dep) {\n var system = this.require(dep._id);\n channel = this.require('channel');\n \n if (system.status() === 'resolved') {\n system.status('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.status('active');\n }\n }.bind(this));\n }\n }\n }\n}",
16721672
"useCoreAPI": true,
16731673
"core": true
16741674
},
@@ -1698,7 +1698,7 @@ var system = {
16981698
"Runtime": {
16991699
"runtime": {
17001700
"_id": "runtime",
1701-
"version": "1.8.0"
1701+
"version": "1.8.1"
17021702
}
17031703
},
17041704
"RuntimeDatabase": {
@@ -1724,7 +1724,7 @@ var system = {
17241724
}
17251725
},
17261726
"name": "system-runtime",
1727-
"version": "1.8.0",
1727+
"version": "1.8.1",
17281728
"description": "Runtime",
17291729
"_id": "e89c617b6b15d24",
17301730
"master": false,

build/sytem-runtime.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,7 +1794,7 @@
17941794
"_id": "1e9021bd4e1bc6e",
17951795
"component": "RuntimeChannel",
17961796
"state": "$systemInstalled",
1797-
"action": "function $systemInstalled(id) {\n var systems = null,\n dependencies = [],\n master = [],\n canStart = true;\n\n if (id !== 'e89c617b6b15d24') {\n if (typeof global === 'undefined' && typeof document !== 'undefined') {\n \n // if all systems are installed\n systems = $db.RuntimeSystem.find({});\n\n systems.forEach(function (system) {\n var sys = this.require(system._id);\n if (sys.status() === 'none') {\n canStart = false;\n }\n }.bind(this));\n\n // start all the systems\n if (canStart) {\n dependencies = $db.RuntimeSystem.find({\n 'master': false\n });\n\n dependencies.forEach(function (dep) {\n var system = this.require(dep._id);\n channel = this.require('channel');\n \n if (system.status() === 'resolved') {\n system.status('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.status('active');\n }\n }.bind(this));\n\n master = $db.RuntimeSystem.find({\n 'master': true\n });\n\n master.forEach(function (dep) {\n var system = this.require(dep._id);\n channel = this.require('channel');\n \n if (system.status() === 'installed') {\n system.status('resolved');\n channel.$systemResolved(dep._id);\n system.status('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.status('active');\n }\n }.bind(this));\n }\n }\n }\n}",
1797+
"action": "function $systemInstalled(id) {\n var systems = null,\n dependencies = [],\n master = [],\n canStart = true;\n\n if (id !== 'e89c617b6b15d24') {\n if (typeof global === 'undefined' && typeof document !== 'undefined') {\n \n // if all systems are installed\n systems = $db.RuntimeSystem.find({});\n\n systems.forEach(function (system) {\n var sys = this.require(system._id);\n if (sys.status() === 'none') {\n canStart = false;\n }\n }.bind(this));\n\n // start all the systems\n if (canStart) {\n dependencies = $db.RuntimeSystem.find({\n 'master': false\n });\n\n dependencies.forEach(function (dep) {\n var system = this.require(dep._id);\n channel = this.require('channel');\n \n if (system.status() === 'resolved') {\n system.status('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.status('active');\n }\n }.bind(this));\n\n master = $db.RuntimeSystem.find({\n 'master': true\n });\n\n master.forEach(function (dep) {\n var system = this.require(dep._id);\n channel = this.require('channel');\n \n if (system.status() === 'resolved') {\n system.status('starting');\n system.start();\n channel.$systemStarted(dep._id);\n system.status('active');\n }\n }.bind(this));\n }\n }\n }\n}",
17981798
"useCoreAPI": true,
17991799
"core": true
18001800
},
@@ -1824,7 +1824,7 @@
18241824
"Runtime": {
18251825
"runtime": {
18261826
"_id": "runtime",
1827-
"version": "1.8.0"
1827+
"version": "1.8.1"
18281828
}
18291829
},
18301830
"RuntimeDatabase": {
@@ -1850,7 +1850,7 @@
18501850
}
18511851
},
18521852
"name": "system-runtime",
1853-
"version": "1.8.0",
1853+
"version": "1.8.1",
18541854
"description": "Runtime",
18551855
"_id": "e89c617b6b15d24",
18561856
"master": false,

dist/system-runtime.js

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/system-runtime.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "system-runtime",
3-
"version": "1.8.0",
3+
"version": "1.8.1",
44
"description": "System Runtime, a JavaScript library that runs systems",
55
"homepage": "https://system-runtime.github.io",
66
"keywords": [
@@ -16,7 +16,8 @@
1616
"system",
1717
"universal",
1818
"runtime",
19-
"json"
19+
"json",
20+
"osgi"
2021
],
2122
"main": "./src/runtime.js",
2223
"author": {

src/system/system-runtime.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)