@joystick.js/cli-canary 0.0.0-canary.66 → 0.0.0-canary.68
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/dist/lib/dev/startApp.js
CHANGED
|
@@ -3,15 +3,6 @@ import path from "path";
|
|
|
3
3
|
const handleStartServerProcess = (execArgv = {}, sessionsBeforeHMRUpdate = {}) => {
|
|
4
4
|
try {
|
|
5
5
|
process.loader.text("Starting app...");
|
|
6
|
-
console.log({
|
|
7
|
-
FORCE_COLOR: "1",
|
|
8
|
-
LOGS_PATH: process.env.LOGS_PATH,
|
|
9
|
-
NODE_ENV: process.env.NODE_ENV,
|
|
10
|
-
ROOT_URL: process.env.ROOT_URL,
|
|
11
|
-
PORT: process.env.PORT,
|
|
12
|
-
JOYSTICK_SETTINGS: process.env.JOYSTICK_SETTINGS,
|
|
13
|
-
HMR_SESSIONS: JSON.stringify(sessionsBeforeHMRUpdate)
|
|
14
|
-
});
|
|
15
6
|
return child_process.fork(
|
|
16
7
|
path.resolve(".joystick/build/index.server.js"),
|
|
17
8
|
[],
|
|
@@ -21,6 +21,11 @@ const startDatabaseProvider = async (environment = "development", database = {},
|
|
|
21
21
|
};
|
|
22
22
|
const startDatabaseProviders = async (databases = [], databasePortStart = 2610, environment = "") => {
|
|
23
23
|
try {
|
|
24
|
+
console.log({
|
|
25
|
+
databases,
|
|
26
|
+
databasePortStart,
|
|
27
|
+
environment
|
|
28
|
+
});
|
|
24
29
|
for (let i = 0; i < databases?.length; i += 1) {
|
|
25
30
|
const database = databases[i];
|
|
26
31
|
const hasMultipleOfProvider = databases?.filter((database2) => database2?.provider === database2?.provider)?.length > 1;
|
|
@@ -92,7 +97,7 @@ const startDatabases = async (options, { resolve, reject }) => {
|
|
|
92
97
|
validateDatabasesFromSettings(databases);
|
|
93
98
|
await startDatabaseProviders(
|
|
94
99
|
databases,
|
|
95
|
-
options?.port,
|
|
100
|
+
options?.port + 10,
|
|
96
101
|
options?.environment
|
|
97
102
|
);
|
|
98
103
|
}
|
package/package.json
CHANGED
package/src/lib/dev/startApp.js
CHANGED
|
@@ -5,16 +5,6 @@ const handleStartServerProcess = (execArgv = {}, sessionsBeforeHMRUpdate = {}) =
|
|
|
5
5
|
try {
|
|
6
6
|
process.loader.text('Starting app...');
|
|
7
7
|
|
|
8
|
-
console.log({
|
|
9
|
-
FORCE_COLOR: "1",
|
|
10
|
-
LOGS_PATH: process.env.LOGS_PATH,
|
|
11
|
-
NODE_ENV: process.env.NODE_ENV,
|
|
12
|
-
ROOT_URL: process.env.ROOT_URL,
|
|
13
|
-
PORT: process.env.PORT,
|
|
14
|
-
JOYSTICK_SETTINGS: process.env.JOYSTICK_SETTINGS,
|
|
15
|
-
HMR_SESSIONS: JSON.stringify(sessionsBeforeHMRUpdate),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
8
|
return child_process.fork(
|
|
19
9
|
path.resolve(".joystick/build/index.server.js"),
|
|
20
10
|
[],
|
|
@@ -12,7 +12,7 @@ const startDatabaseProvider = async (
|
|
|
12
12
|
) => {
|
|
13
13
|
try {
|
|
14
14
|
const provider = providerMap[database?.provider];
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
if (provider) {
|
|
17
17
|
process.loader.text(`Starting ${provider?.name}...`);
|
|
18
18
|
|
|
@@ -33,6 +33,12 @@ const startDatabaseProvider = async (
|
|
|
33
33
|
|
|
34
34
|
const startDatabaseProviders = async (databases = [], databasePortStart = 2610, environment = '') => {
|
|
35
35
|
try {
|
|
36
|
+
console.log({
|
|
37
|
+
databases,
|
|
38
|
+
databasePortStart,
|
|
39
|
+
environment,
|
|
40
|
+
});
|
|
41
|
+
|
|
36
42
|
for (let i = 0; i < databases?.length; i += 1) {
|
|
37
43
|
const database = databases[i];
|
|
38
44
|
const hasMultipleOfProvider = (databases?.filter((database) => database?.provider === database?.provider))?.length > 1;
|
|
@@ -114,7 +120,7 @@ const startDatabases = async (options, { resolve, reject }) => {
|
|
|
114
120
|
validateDatabasesFromSettings(databases);
|
|
115
121
|
await startDatabaseProviders(
|
|
116
122
|
databases,
|
|
117
|
-
options?.port,
|
|
123
|
+
options?.port + 10,
|
|
118
124
|
options?.environment,
|
|
119
125
|
);
|
|
120
126
|
}
|