@steedos/service-api 2.5.8-beta.4 → 2.5.8-beta.6
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/index.js +12 -7
- package/package.json +11 -6
package/index.js
CHANGED
|
@@ -13,11 +13,11 @@ const {
|
|
|
13
13
|
const SteedosRouter = require('@steedos/router');
|
|
14
14
|
const _ = require('lodash');
|
|
15
15
|
const ServiceObjectGraphql = require('@steedos/service-object-graphql')
|
|
16
|
-
const open = require('open');
|
|
17
16
|
const DataLoader = require("dataloader");
|
|
18
17
|
const { LRUMap } = require('lru_map');
|
|
19
18
|
const validator = require('validator');
|
|
20
19
|
const enablePlayground = validator.toBoolean(process.env.STEEDOS_GRAPHQL_ENABLE_CONSOLE || 'true', true);
|
|
20
|
+
const openBrowser = require('react-dev-utils/openBrowser');
|
|
21
21
|
const mixinOptions = {
|
|
22
22
|
|
|
23
23
|
// Global GraphQL typeDefs
|
|
@@ -100,6 +100,8 @@ module.exports = {
|
|
|
100
100
|
ServiceObjectGraphql
|
|
101
101
|
],
|
|
102
102
|
|
|
103
|
+
projectStarted: false,
|
|
104
|
+
|
|
103
105
|
// More info about settings: https://moleculer.services/docs/0.14/moleculer-web.html
|
|
104
106
|
settings: {
|
|
105
107
|
server: false,
|
|
@@ -963,12 +965,15 @@ module.exports = {
|
|
|
963
965
|
console.log(`Project is running at ${process.env.ROOT_URL}`);
|
|
964
966
|
console.log('');
|
|
965
967
|
if (process.env.STEEDOS_AUTO_OPEN_BROWSER != 'false') { // 默认打开,如果不想打开,设置STEEDOS_AUTO_OPEN_BROWSER=false
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
968
|
+
setTimeout(function () {
|
|
969
|
+
try {
|
|
970
|
+
openBrowser(process.env.ROOT_URL);
|
|
971
|
+
} catch (error) {
|
|
972
|
+
console.error(error);
|
|
973
|
+
console.error('auto open browser failed.');
|
|
974
|
+
}
|
|
975
|
+
}, 100)
|
|
976
|
+
|
|
972
977
|
}
|
|
973
978
|
}
|
|
974
979
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-api",
|
|
3
|
-
"version": "2.5.8-beta.
|
|
3
|
+
"version": "2.5.8-beta.6",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@steedos/auth": "2.5.8-beta.
|
|
8
|
-
"@steedos/router": "2.5.8-beta.
|
|
9
|
-
"@steedos/service-object-graphql": "2.5.8-beta.
|
|
10
|
-
"@steedos/service-ui": "2.5.8-beta.
|
|
7
|
+
"@steedos/auth": "2.5.8-beta.6",
|
|
8
|
+
"@steedos/router": "2.5.8-beta.6",
|
|
9
|
+
"@steedos/service-object-graphql": "2.5.8-beta.6",
|
|
10
|
+
"@steedos/service-ui": "2.5.8-beta.6",
|
|
11
11
|
"graphql": "^15.8.0",
|
|
12
12
|
"graphql-iso-date": "^3.6.1",
|
|
13
13
|
"graphql-type-json": "^0.3.2",
|
|
@@ -15,11 +15,16 @@
|
|
|
15
15
|
"moleculer": "^0.14.25",
|
|
16
16
|
"moleculer-apollo-server": "^0.3.6",
|
|
17
17
|
"moleculer-web": "^0.10.4",
|
|
18
|
+
"react-dev-utils": "12.0.1",
|
|
18
19
|
"validator": "^13.6.0"
|
|
19
20
|
},
|
|
20
21
|
"private": false,
|
|
21
22
|
"publishConfig": {
|
|
22
23
|
"access": "public"
|
|
23
24
|
},
|
|
24
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "0f73a9ca4640252521265976abac6207655ef02e",
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/graphql-iso-date": "^3.4.0",
|
|
28
|
+
"@types/react-dev-utils": "^9.0.11"
|
|
29
|
+
}
|
|
25
30
|
}
|