@resolveio/server-lib 1.0.0-rc15 → 1.0.0-rc17
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 +54 -97
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -42,63 +42,63 @@ var ResolveIOServer = /** @class */ (function () {
|
|
|
42
42
|
ResolveIOServer._client = client;
|
|
43
43
|
}
|
|
44
44
|
ResolveIOServer.connectAndRun = function () {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
ResolveIOServer._mainServer = new serverApp(this, ResolveIOServer._serverConfig);
|
|
64
|
-
resolve();
|
|
65
|
-
return [2 /*return*/];
|
|
66
|
-
}
|
|
67
|
-
});
|
|
68
|
-
}); }, function (err) {
|
|
69
|
-
process.exit();
|
|
70
|
-
reject();
|
|
71
|
-
});
|
|
72
|
-
return [2 /*return*/];
|
|
73
|
-
});
|
|
74
|
-
}); }, function (err) {
|
|
75
|
-
process.exit();
|
|
76
|
-
reject();
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
else {
|
|
80
|
-
ResolveIOServer._supportDB = null;
|
|
81
|
-
mongoose.createConnection(ResolveIOServer._serverConfig['MONGO_URL'], { useNewUrlParser: true }).then(function (dbMain) { return __awaiter(_this, void 0, void 0, function () {
|
|
82
|
-
var serverApp;
|
|
83
|
-
return __generator(this, function (_a) {
|
|
84
|
-
switch (_a.label) {
|
|
85
|
-
case 0:
|
|
86
|
-
ResolveIOServer._mainDB = dbMain;
|
|
87
|
-
return [4 /*yield*/, Promise.resolve().then(function () { return require('./server-app'); })];
|
|
88
|
-
case 1:
|
|
89
|
-
serverApp = (_a.sent()).default;
|
|
90
|
-
ResolveIOServer._mainServer = new serverApp(this, ResolveIOServer._serverConfig);
|
|
45
|
+
var _this = this;
|
|
46
|
+
return new Promise(function (resolve, reject) {
|
|
47
|
+
if (ResolveIOServer._serverConfig['ROOT_URL'] !== 'http://localhost:4200') {
|
|
48
|
+
mongoose.createConnection(ResolveIOServer._serverConfig['RESOLVEIO_SUPPORT_MONGO_URL'], { useNewUrlParser: true }).then(function (db) { return __awaiter(_this, void 0, void 0, function () {
|
|
49
|
+
var _this = this;
|
|
50
|
+
return __generator(this, function (_a) {
|
|
51
|
+
ResolveIOServer._supportDB = db;
|
|
52
|
+
mongoose.createConnection(ResolveIOServer._serverConfig['MONGO_URL'], { useNewUrlParser: true }).then(function (dbMain) { return __awaiter(_this, void 0, void 0, function () {
|
|
53
|
+
var serverApp;
|
|
54
|
+
return __generator(this, function (_a) {
|
|
55
|
+
switch (_a.label) {
|
|
56
|
+
case 0:
|
|
57
|
+
ResolveIOServer._mainDB = dbMain;
|
|
58
|
+
return [4 /*yield*/, Promise.resolve().then(function () { return require('./server-app'); })];
|
|
59
|
+
case 1:
|
|
60
|
+
serverApp = (_a.sent()).default;
|
|
61
|
+
ResolveIOServer._mainServer = new serverApp(this, ResolveIOServer._serverConfig);
|
|
62
|
+
setTimeout(function () {
|
|
91
63
|
resolve();
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
}); }, function (err) {
|
|
96
|
-
process.exit();
|
|
97
|
-
reject();
|
|
64
|
+
}, 5000);
|
|
65
|
+
return [2 /*return*/];
|
|
66
|
+
}
|
|
98
67
|
});
|
|
68
|
+
}); }, function (err) {
|
|
69
|
+
process.exit();
|
|
70
|
+
reject();
|
|
71
|
+
});
|
|
72
|
+
return [2 /*return*/];
|
|
73
|
+
});
|
|
74
|
+
}); }, function (err) {
|
|
75
|
+
process.exit();
|
|
76
|
+
reject();
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
ResolveIOServer._supportDB = null;
|
|
81
|
+
mongoose.createConnection(ResolveIOServer._serverConfig['MONGO_URL'], { useNewUrlParser: true }).then(function (dbMain) { return __awaiter(_this, void 0, void 0, function () {
|
|
82
|
+
var serverApp;
|
|
83
|
+
return __generator(this, function (_a) {
|
|
84
|
+
switch (_a.label) {
|
|
85
|
+
case 0:
|
|
86
|
+
ResolveIOServer._mainDB = dbMain;
|
|
87
|
+
return [4 /*yield*/, Promise.resolve().then(function () { return require('./server-app'); })];
|
|
88
|
+
case 1:
|
|
89
|
+
serverApp = (_a.sent()).default;
|
|
90
|
+
ResolveIOServer._mainServer = new serverApp(this, ResolveIOServer._serverConfig);
|
|
91
|
+
setTimeout(function () {
|
|
92
|
+
resolve();
|
|
93
|
+
}, 5000);
|
|
94
|
+
return [2 /*return*/];
|
|
99
95
|
}
|
|
100
|
-
})
|
|
101
|
-
|
|
96
|
+
});
|
|
97
|
+
}); }, function (err) {
|
|
98
|
+
process.exit();
|
|
99
|
+
reject();
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
102
|
});
|
|
103
103
|
};
|
|
104
104
|
ResolveIOServer.getClientName = function () {
|
|
@@ -121,46 +121,3 @@ var ResolveIOServer = /** @class */ (function () {
|
|
|
121
121
|
return ResolveIOServer;
|
|
122
122
|
}());
|
|
123
123
|
exports.ResolveIOServer = ResolveIOServer;
|
|
124
|
-
// export * from './server-app';
|
|
125
|
-
// export * from './collections/active-subscription.collection';
|
|
126
|
-
// export * from './collections/app-status.collection';
|
|
127
|
-
// export * from './collections/app-version.collection';
|
|
128
|
-
// export * from './collections/counter.collection';
|
|
129
|
-
// export * from './collections/cron-job-history.collection';
|
|
130
|
-
// export * from './collections/cron-job.collection';
|
|
131
|
-
// export * from './collections/file.collection';
|
|
132
|
-
// export * from './collections/flag.collection';
|
|
133
|
-
// export * from './collections/log.collection';
|
|
134
|
-
// export * from './collections/logged-in-users.collection';
|
|
135
|
-
// export * from './collections/method-call.collection';
|
|
136
|
-
// export * from './collections/method-response.collection';
|
|
137
|
-
// export * from './collections/queue-flag.collection';
|
|
138
|
-
// export * from './collections/queue-method.collection';
|
|
139
|
-
// export * from './collections/queue-response.collection';
|
|
140
|
-
// export * from './collections/support-ticket.collection';
|
|
141
|
-
// export * from './collections/user.collection';
|
|
142
|
-
// export * from './managers/cron.manager';
|
|
143
|
-
// export * from './managers/method.manager';
|
|
144
|
-
// export * from './managers/queue-method.manager';
|
|
145
|
-
// export * from './managers/subscription.manager';
|
|
146
|
-
// export * from './managers/support.manager';
|
|
147
|
-
// export * from './models/active-subscription.model';
|
|
148
|
-
// export * from './models/app-status.model';
|
|
149
|
-
// export * from './models/app-version.model';
|
|
150
|
-
// export * from './models/collection-document.model';
|
|
151
|
-
// export * from './models/counter.model';
|
|
152
|
-
// // export * from './models/cron-job-history.model';
|
|
153
|
-
// export * from './models/cron-job.model';
|
|
154
|
-
// export * from './models/dialog.model';
|
|
155
|
-
// export * from './models/file.model';
|
|
156
|
-
// export * from './models/flag.model';
|
|
157
|
-
// export * from './models/log.model';
|
|
158
|
-
// export * from './models/method.model';
|
|
159
|
-
// export * from './models/pagination.model';
|
|
160
|
-
// export * from './models/permission.model';
|
|
161
|
-
// export * from './models/select-data-label.model';
|
|
162
|
-
// export * from './models/server-response.model';
|
|
163
|
-
// export * from './models/support-method.model';
|
|
164
|
-
// export * from './models/support-ticket.model';
|
|
165
|
-
// export * from './models/user.model';
|
|
166
|
-
// export * from './util/common';
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@resolveio/server-lib",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-rc17",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"package": "npm pack ./dist",
|
|
7
|
+
"package": "npm run build-prod && npm pack ./dist",
|
|
8
8
|
"start": "node_modules/.bin/forever -c node --max-old-space-size=800 index.js",
|
|
9
9
|
"server": "node_modules/gulp/bin/gulp.js mongo-start && node_modules/gulp/bin/gulp.js",
|
|
10
10
|
"postserver": "node_modules/gulp/bin/gulp.js mongo-stop",
|