@stacksjs/config 0.58.72 → 0.58.73
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/package.json +1 -1
- package/src/config.ts +1 -0
- package/src/defaults.ts +14 -11
- package/src/helpers.ts +19 -19
- package/src/overrides.ts +2 -0
package/package.json
CHANGED
package/src/config.ts
CHANGED
package/src/defaults.ts
CHANGED
|
@@ -38,17 +38,6 @@ export default {
|
|
|
38
38
|
docMode: false,
|
|
39
39
|
redirectUrls: [],
|
|
40
40
|
maintenanceMode: false,
|
|
41
|
-
ports: {
|
|
42
|
-
frontend: 3333,
|
|
43
|
-
backend: 3334,
|
|
44
|
-
admin: 3335,
|
|
45
|
-
library: 3336,
|
|
46
|
-
desktop: 3337,
|
|
47
|
-
email: 3338,
|
|
48
|
-
docs: 3339,
|
|
49
|
-
inspect: 3340,
|
|
50
|
-
api: 3999,
|
|
51
|
-
},
|
|
52
41
|
},
|
|
53
42
|
|
|
54
43
|
cli: {
|
|
@@ -343,6 +332,20 @@ export default {
|
|
|
343
332
|
driver: 'stripe',
|
|
344
333
|
},
|
|
345
334
|
|
|
335
|
+
ports: {
|
|
336
|
+
frontend: 3000,
|
|
337
|
+
backend: 3001,
|
|
338
|
+
admin: 3002,
|
|
339
|
+
library: 3003,
|
|
340
|
+
desktop: 3004,
|
|
341
|
+
email: 3005,
|
|
342
|
+
docs: 3006,
|
|
343
|
+
inspect: 3007,
|
|
344
|
+
api: 3008,
|
|
345
|
+
systemTray: 3009,
|
|
346
|
+
// mobile: 3010,
|
|
347
|
+
},
|
|
348
|
+
|
|
346
349
|
queue: {
|
|
347
350
|
default: 'sync',
|
|
348
351
|
|
package/src/helpers.ts
CHANGED
|
@@ -19,10 +19,10 @@ export async function localUrl({
|
|
|
19
19
|
switch (type) {
|
|
20
20
|
case 'frontend':
|
|
21
21
|
if (network)
|
|
22
|
-
return await createLocalTunnel(config.
|
|
22
|
+
return await createLocalTunnel(config.ports?.frontend || 3000)
|
|
23
23
|
|
|
24
24
|
if (localhost)
|
|
25
|
-
return `http://localhost:${config.
|
|
25
|
+
return `http://localhost:${config.ports?.frontend}`
|
|
26
26
|
|
|
27
27
|
url = domain.replace(/\.[^\.]+$/, '.localhost')
|
|
28
28
|
|
|
@@ -32,10 +32,10 @@ export async function localUrl({
|
|
|
32
32
|
return url
|
|
33
33
|
case 'backend':
|
|
34
34
|
if (network)
|
|
35
|
-
return await createLocalTunnel(config.
|
|
35
|
+
return await createLocalTunnel(config.ports?.backend || 3001)
|
|
36
36
|
|
|
37
37
|
if (localhost)
|
|
38
|
-
return `http://localhost:${config.
|
|
38
|
+
return `http://localhost:${config.ports?.backend}`
|
|
39
39
|
|
|
40
40
|
url = domain.replace(/\.[^\.]+$/, '.localhost/api/')
|
|
41
41
|
|
|
@@ -45,10 +45,10 @@ export async function localUrl({
|
|
|
45
45
|
return url
|
|
46
46
|
case 'api':
|
|
47
47
|
if (network)
|
|
48
|
-
return await createLocalTunnel(config.
|
|
48
|
+
return await createLocalTunnel(config.ports?.backend || 3001)
|
|
49
49
|
|
|
50
50
|
if (localhost)
|
|
51
|
-
return `http://localhost:${config.
|
|
51
|
+
return `http://localhost:${config.ports?.backend}`
|
|
52
52
|
|
|
53
53
|
url = domain.replace(/\.[^\.]+$/, '.localhost/api/')
|
|
54
54
|
|
|
@@ -58,10 +58,10 @@ export async function localUrl({
|
|
|
58
58
|
return url
|
|
59
59
|
case 'admin':
|
|
60
60
|
if (network)
|
|
61
|
-
return await createLocalTunnel(config.
|
|
61
|
+
return await createLocalTunnel(config.ports?.admin || 3002)
|
|
62
62
|
|
|
63
63
|
if (localhost)
|
|
64
|
-
return `http://localhost:${config.
|
|
64
|
+
return `http://localhost:${config.ports?.admin}`
|
|
65
65
|
|
|
66
66
|
url = domain.replace(/\.[^\.]+$/, '.localhost/admin/')
|
|
67
67
|
|
|
@@ -71,10 +71,10 @@ export async function localUrl({
|
|
|
71
71
|
return url
|
|
72
72
|
case 'library':
|
|
73
73
|
if (network)
|
|
74
|
-
return await createLocalTunnel(config.
|
|
74
|
+
return await createLocalTunnel(config.ports?.library || 3003)
|
|
75
75
|
|
|
76
76
|
if (localhost)
|
|
77
|
-
return `http://localhost:${config.
|
|
77
|
+
return `http://localhost:${config.ports?.library}`
|
|
78
78
|
|
|
79
79
|
url = domain.replace(/\.[^\.]+$/, '.localhost/libs/')
|
|
80
80
|
|
|
@@ -84,10 +84,10 @@ export async function localUrl({
|
|
|
84
84
|
return url
|
|
85
85
|
case 'email':
|
|
86
86
|
if (network)
|
|
87
|
-
return await createLocalTunnel(config.
|
|
87
|
+
return await createLocalTunnel(config.ports?.email || 3005)
|
|
88
88
|
|
|
89
89
|
if (localhost)
|
|
90
|
-
return `http://localhost:${config.
|
|
90
|
+
return `http://localhost:${config.ports?.email}`
|
|
91
91
|
|
|
92
92
|
url = domain.replace(/\.[^\.]+$/, '.localhost/email/')
|
|
93
93
|
|
|
@@ -97,10 +97,10 @@ export async function localUrl({
|
|
|
97
97
|
return url
|
|
98
98
|
case 'desktop':
|
|
99
99
|
if (network)
|
|
100
|
-
return await createLocalTunnel(config.
|
|
100
|
+
return await createLocalTunnel(config.ports?.desktop || 3004)
|
|
101
101
|
|
|
102
102
|
if (localhost)
|
|
103
|
-
return `http://localhost:${config.
|
|
103
|
+
return `http://localhost:${config.ports?.email}`
|
|
104
104
|
|
|
105
105
|
url = domain.replace(/\.[^\.]+$/, '.localhost/email/')
|
|
106
106
|
|
|
@@ -110,10 +110,10 @@ export async function localUrl({
|
|
|
110
110
|
return url
|
|
111
111
|
case 'docs':
|
|
112
112
|
if (network)
|
|
113
|
-
return await createLocalTunnel(config.
|
|
113
|
+
return await createLocalTunnel(config.ports?.desktop || 3006)
|
|
114
114
|
|
|
115
115
|
if (localhost)
|
|
116
|
-
return `http://localhost:${config.
|
|
116
|
+
return `http://localhost:${config.ports?.docs}`
|
|
117
117
|
|
|
118
118
|
url = domain.replace(/\.[^\.]+$/, '.localhost/docs/')
|
|
119
119
|
|
|
@@ -123,10 +123,10 @@ export async function localUrl({
|
|
|
123
123
|
return url
|
|
124
124
|
case 'inspect':
|
|
125
125
|
if (network)
|
|
126
|
-
return await createLocalTunnel(config.
|
|
126
|
+
return await createLocalTunnel(config.ports?.desktop || 3007)
|
|
127
127
|
|
|
128
128
|
if (localhost)
|
|
129
|
-
return `http://localhost:${config.
|
|
129
|
+
return `http://localhost:${config.ports?.inspect}`
|
|
130
130
|
|
|
131
131
|
url = domain.replace(/\.[^\.]+$/, '.localhost/__inspect/')
|
|
132
132
|
|
|
@@ -136,7 +136,7 @@ export async function localUrl({
|
|
|
136
136
|
return url
|
|
137
137
|
default:
|
|
138
138
|
if (localhost)
|
|
139
|
-
return `http://localhost:${config.
|
|
139
|
+
return `http://localhost:${config.ports?.frontend}`
|
|
140
140
|
|
|
141
141
|
url = domain.replace(/\.[^\.]+$/, '.localhost')
|
|
142
142
|
|
package/src/overrides.ts
CHANGED
|
@@ -14,6 +14,7 @@ import library from '~/config/library'
|
|
|
14
14
|
import logger from '~/config/logger'
|
|
15
15
|
import queue from '~/config/queue'
|
|
16
16
|
import payment from '~/config/payment'
|
|
17
|
+
import ports from '~/config/ports'
|
|
17
18
|
import notification from '~/config/notification'
|
|
18
19
|
import storage from '~/config/storage'
|
|
19
20
|
import searchEngine from '~/config/search-engine'
|
|
@@ -40,6 +41,7 @@ export default {
|
|
|
40
41
|
notification,
|
|
41
42
|
queue,
|
|
42
43
|
payment,
|
|
44
|
+
ports,
|
|
43
45
|
searchEngine,
|
|
44
46
|
security,
|
|
45
47
|
services,
|