@steedos/service-api 2.6.1-beta.6 → 2.6.1-beta.7
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
|
|
@@ -101,6 +101,8 @@ module.exports = {
|
|
|
101
101
|
ServiceObjectGraphql
|
|
102
102
|
],
|
|
103
103
|
|
|
104
|
+
projectStarted: false,
|
|
105
|
+
|
|
104
106
|
// More info about settings: https://moleculer.services/docs/0.14/moleculer-web.html
|
|
105
107
|
settings: {
|
|
106
108
|
server: false,
|
|
@@ -964,12 +966,15 @@ module.exports = {
|
|
|
964
966
|
console.log(`Project is running at ${process.env.ROOT_URL}`);
|
|
965
967
|
console.log('');
|
|
966
968
|
if (process.env.STEEDOS_AUTO_OPEN_BROWSER != 'false') { // 默认打开,如果不想打开,设置STEEDOS_AUTO_OPEN_BROWSER=false
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
969
|
+
setTimeout(function () {
|
|
970
|
+
try {
|
|
971
|
+
openBrowser(process.env.ROOT_URL);
|
|
972
|
+
} catch (error) {
|
|
973
|
+
console.error(error);
|
|
974
|
+
console.error('auto open browser failed.');
|
|
975
|
+
}
|
|
976
|
+
}, 100)
|
|
977
|
+
|
|
973
978
|
}
|
|
974
979
|
}
|
|
975
980
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-api",
|
|
3
|
-
"version": "2.6.1-beta.
|
|
3
|
+
"version": "2.6.1-beta.7",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@steedos/auth": "2.6.1-beta.
|
|
8
|
-
"@steedos/router": "2.6.1-beta.
|
|
9
|
-
"@steedos/service-object-graphql": "2.6.1-beta.
|
|
10
|
-
"@steedos/service-ui": "2.6.1-beta.
|
|
7
|
+
"@steedos/auth": "2.6.1-beta.7",
|
|
8
|
+
"@steedos/router": "2.6.1-beta.7",
|
|
9
|
+
"@steedos/service-object-graphql": "2.6.1-beta.7",
|
|
10
|
+
"@steedos/service-ui": "2.6.1-beta.7",
|
|
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": "b12f271460ef3686face095e875aa38e8ddc4c7f",
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/graphql-iso-date": "^3.4.0",
|
|
28
|
+
"@types/react-dev-utils": "^9.0.11"
|
|
29
|
+
}
|
|
25
30
|
}
|