@stacksjs/server 0.59.10 → 0.61.0

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/index.js CHANGED
@@ -42,9 +42,13 @@ function config2(options) {
42
42
  "system-tray": {
43
43
  host: "localhost",
44
44
  port: ports.systemTray
45
+ },
46
+ database: {
47
+ host: "localhost",
48
+ port: ports.database
45
49
  }
46
50
  };
47
- if (options.type && ["frontend", "api", "library", "desktop", "docs", "example", "dashboard", "system-tray"].includes(options.type)) {
51
+ if (options.type && ["frontend", "api", "library", "desktop", "docs", "example", "dashboard", "system-tray", "database"].includes(options.type)) {
48
52
  return {
49
53
  host: serversMap[options.type].host,
50
54
  port: serversMap[options.type].port,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@stacksjs/server",
3
3
  "type": "module",
4
- "version": "0.59.10",
4
+ "version": "0.61.0",
5
5
  "description": "Local development and production-ready.",
6
6
  "author": "Chris Breuer",
7
7
  "license": "MIT",
@@ -60,7 +60,7 @@
60
60
  "@stacksjs/path": "latest",
61
61
  "@stacksjs/router": "latest",
62
62
  "@stacksjs/validation": "latest",
63
- "vite": "^5.1.5"
63
+ "vite": "^5.2.11"
64
64
  },
65
65
  "devDependencies": {
66
66
  "@stacksjs/development": "latest"
package/src/config.ts CHANGED
@@ -1,7 +1,17 @@
1
1
  import { ports } from '@stacksjs/config'
2
2
 
3
3
  interface ServerOptions {
4
- type?: 'frontend' | 'backend' | 'api' | 'library' | 'desktop' | 'docs' | 'email' | 'admin' | 'system-tray'
4
+ type?:
5
+ | 'frontend'
6
+ | 'backend'
7
+ | 'api'
8
+ | 'library'
9
+ | 'desktop'
10
+ | 'docs'
11
+ | 'email'
12
+ | 'admin'
13
+ | 'system-tray'
14
+ | 'database'
5
15
  host?: string
6
16
  port?: number
7
17
  open?: boolean
@@ -9,47 +19,48 @@ interface ServerOptions {
9
19
 
10
20
  export function config(options: ServerOptions) {
11
21
  const serversMap = {
12
- 'frontend': {
22
+ frontend: {
13
23
  host: 'localhost',
14
24
  port: ports.frontend,
15
25
  },
16
26
 
17
- 'backend': {
27
+ backend: {
18
28
  host: 'localhost',
19
29
  port: ports.backend,
20
30
  },
21
31
 
22
- 'api': {
32
+ api: {
23
33
  host: 'localhost',
24
34
  port: ports.api,
25
35
  },
26
36
 
27
- 'admin': {
37
+ admin: {
28
38
  host: 'localhost',
29
39
  port: ports.admin,
30
40
  },
31
41
 
32
- 'library': { // component library
42
+ library: {
43
+ // component library
33
44
  host: 'localhost',
34
45
  port: ports.library,
35
46
  },
36
47
 
37
- 'desktop': {
48
+ desktop: {
38
49
  host: 'localhost',
39
50
  port: ports.desktop,
40
51
  },
41
52
 
42
- 'docs': {
53
+ docs: {
43
54
  host: 'localhost',
44
55
  port: ports.docs,
45
56
  },
46
57
 
47
- 'email': {
58
+ email: {
48
59
  host: 'localhost',
49
60
  port: ports.email,
50
61
  },
51
62
 
52
- 'inspect': {
63
+ inspect: {
53
64
  host: 'localhost',
54
65
  port: ports.inspect,
55
66
  },
@@ -58,9 +69,19 @@ export function config(options: ServerOptions) {
58
69
  host: 'localhost',
59
70
  port: ports.systemTray,
60
71
  },
72
+
73
+ database: {
74
+ host: 'localhost',
75
+ port: ports.database,
76
+ },
61
77
  }
62
78
 
63
- if (options.type && ['frontend', 'api', 'library', 'desktop', 'docs', 'example', 'dashboard', 'system-tray'].includes(options.type)) {
79
+ if (
80
+ options.type &&
81
+ ['frontend', 'api', 'library', 'desktop', 'docs', 'example', 'dashboard', 'system-tray', 'database'].includes(
82
+ options.type,
83
+ )
84
+ ) {
64
85
  return {
65
86
  host: serversMap[options.type].host,
66
87
  port: serversMap[options.type].port,
package/dist/config.d.ts DELETED
@@ -1,12 +0,0 @@
1
- interface ServerOptions {
2
- type?: 'frontend' | 'backend' | 'api' | 'library' | 'desktop' | 'docs' | 'email' | 'admin' | 'system-tray';
3
- host?: string;
4
- port?: number;
5
- open?: boolean;
6
- }
7
- export declare function config(options: ServerOptions): {
8
- host: string;
9
- port: any;
10
- open: boolean;
11
- };
12
- export {};
package/dist/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export { config as server } from './config';