@stacksjs/config 0.58.71 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/config",
3
3
  "type": "module",
4
- "version": "0.58.71",
4
+ "version": "0.58.73",
5
5
  "description": "The Stacks config helper methods.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
package/src/config.ts CHANGED
@@ -24,6 +24,7 @@ export const {
24
24
  logger,
25
25
  notification,
26
26
  payment,
27
+ ports,
27
28
  queue,
28
29
  security,
29
30
  searchEngine,
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.app.ports?.frontend || 3333)
22
+ return await createLocalTunnel(config.ports?.frontend || 3000)
23
23
 
24
24
  if (localhost)
25
- return `http://localhost:${config.app.ports?.frontend}`
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.app.ports?.backend || 3334)
35
+ return await createLocalTunnel(config.ports?.backend || 3001)
36
36
 
37
37
  if (localhost)
38
- return `http://localhost:${config.app.ports?.backend}`
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.app.ports?.backend || 3334)
48
+ return await createLocalTunnel(config.ports?.backend || 3001)
49
49
 
50
50
  if (localhost)
51
- return `http://localhost:${config.app.ports?.backend}`
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.app.ports?.admin || 3335)
61
+ return await createLocalTunnel(config.ports?.admin || 3002)
62
62
 
63
63
  if (localhost)
64
- return `http://localhost:${config.app.ports?.admin}`
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.app.ports?.library || 3336)
74
+ return await createLocalTunnel(config.ports?.library || 3003)
75
75
 
76
76
  if (localhost)
77
- return `http://localhost:${config.app.ports?.library}`
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.app.ports?.email || 3338)
87
+ return await createLocalTunnel(config.ports?.email || 3005)
88
88
 
89
89
  if (localhost)
90
- return `http://localhost:${config.app.ports?.email}`
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.app.ports?.desktop || 3337)
100
+ return await createLocalTunnel(config.ports?.desktop || 3004)
101
101
 
102
102
  if (localhost)
103
- return `http://localhost:${config.app.ports?.email}`
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.app.ports?.desktop || 3339)
113
+ return await createLocalTunnel(config.ports?.desktop || 3006)
114
114
 
115
115
  if (localhost)
116
- return `http://localhost:${config.app.ports?.docs}`
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.app.ports?.desktop || 3340)
126
+ return await createLocalTunnel(config.ports?.desktop || 3007)
127
127
 
128
128
  if (localhost)
129
- return `http://localhost:${config.app.ports?.inspect}`
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.app.ports?.frontend}`
139
+ return `http://localhost:${config.ports?.frontend}`
140
140
 
141
141
  url = domain.replace(/\.[^\.]+$/, '.localhost')
142
142
 
package/src/overrides.ts CHANGED
@@ -1,26 +1,27 @@
1
1
  import type { StacksConfig } from '@stacksjs/types'
2
- import ai from 'config/ai'
3
- import app from 'config/app'
4
- import cache from 'config/cache'
5
- import cli from 'config/cli'
6
- import cloud from 'config/cloud'
7
- import database from 'config/database'
8
- import dns from 'config/dns'
9
- import docs from 'config/docs'
10
- import email from 'config/email'
11
- import git from 'config/git'
12
- import hashing from 'config/hashing'
13
- import library from 'config/library'
14
- import logger from 'config/logger'
15
- import queue from 'config/queue'
16
- import payment from 'config/payment'
17
- import notification from 'config/notification'
18
- import storage from 'config/storage'
19
- import searchEngine from 'config/search-engine'
20
- import security from 'config/security'
21
- import services from 'config/services'
22
- import team from 'config/team'
23
- import ui from 'config/ui'
2
+ import ai from '~/config/ai'
3
+ import app from '~/config/app'
4
+ import cache from '~/config/cache'
5
+ import cli from '~/config/cli'
6
+ import cloud from '~/config/cloud'
7
+ import database from '~/config/database'
8
+ import dns from '~/config/dns'
9
+ import docs from '~/config/docs'
10
+ import email from '~/config/email'
11
+ import git from '~/config/git'
12
+ import hashing from '~/config/hashing'
13
+ import library from '~/config/library'
14
+ import logger from '~/config/logger'
15
+ import queue from '~/config/queue'
16
+ import payment from '~/config/payment'
17
+ import ports from '~/config/ports'
18
+ import notification from '~/config/notification'
19
+ import storage from '~/config/storage'
20
+ import searchEngine from '~/config/search-engine'
21
+ import security from '~/config/security'
22
+ import services from '~/config/services'
23
+ import team from '~/config/team'
24
+ import ui from '~/config/ui'
24
25
 
25
26
  // this "user config" will override the default config options
26
27
  export default {
@@ -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,