@stacksjs/server 0.63.0 → 0.63.1
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 +2 -66
- package/dist/index.js.map +2 -2
- package/package.json +1 -7
package/dist/index.js
CHANGED
|
@@ -1,69 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
|
|
3
|
-
import {ports} from "@stacksjs/config";
|
|
4
|
-
function config2(options) {
|
|
5
|
-
const serversMap = {
|
|
6
|
-
frontend: {
|
|
7
|
-
host: "localhost",
|
|
8
|
-
port: ports.frontend
|
|
9
|
-
},
|
|
10
|
-
backend: {
|
|
11
|
-
host: "localhost",
|
|
12
|
-
port: ports.backend
|
|
13
|
-
},
|
|
14
|
-
api: {
|
|
15
|
-
host: "localhost",
|
|
16
|
-
port: ports.api
|
|
17
|
-
},
|
|
18
|
-
admin: {
|
|
19
|
-
host: "localhost",
|
|
20
|
-
port: ports.admin
|
|
21
|
-
},
|
|
22
|
-
library: {
|
|
23
|
-
host: "localhost",
|
|
24
|
-
port: ports.library
|
|
25
|
-
},
|
|
26
|
-
desktop: {
|
|
27
|
-
host: "localhost",
|
|
28
|
-
port: ports.desktop
|
|
29
|
-
},
|
|
30
|
-
docs: {
|
|
31
|
-
host: "localhost",
|
|
32
|
-
port: ports.docs
|
|
33
|
-
},
|
|
34
|
-
email: {
|
|
35
|
-
host: "localhost",
|
|
36
|
-
port: ports.email
|
|
37
|
-
},
|
|
38
|
-
inspect: {
|
|
39
|
-
host: "localhost",
|
|
40
|
-
port: ports.inspect
|
|
41
|
-
},
|
|
42
|
-
"system-tray": {
|
|
43
|
-
host: "localhost",
|
|
44
|
-
port: ports.systemTray
|
|
45
|
-
},
|
|
46
|
-
database: {
|
|
47
|
-
host: "localhost",
|
|
48
|
-
port: ports.database
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
if (options.type && ["frontend", "api", "library", "desktop", "docs", "example", "dashboard", "system-tray", "database"].includes(options.type)) {
|
|
52
|
-
return {
|
|
53
|
-
host: serversMap[options.type].host,
|
|
54
|
-
port: serversMap[options.type].port,
|
|
55
|
-
open: true
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
return {
|
|
59
|
-
host: options.host || "stacks.localhost",
|
|
60
|
-
port: options.port || 3000,
|
|
61
|
-
open: options.open || false
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
export {
|
|
65
|
-
config2 as server
|
|
66
|
-
};
|
|
2
|
+
import{ports as t}from"@stacksjs/config";function r(o){const s={frontend:{host:"localhost",port:t.frontend},backend:{host:"localhost",port:t.backend},api:{host:"localhost",port:t.api},admin:{host:"localhost",port:t.admin},library:{host:"localhost",port:t.library},desktop:{host:"localhost",port:t.desktop},docs:{host:"localhost",port:t.docs},email:{host:"localhost",port:t.email},inspect:{host:"localhost",port:t.inspect},"system-tray":{host:"localhost",port:t.systemTray},database:{host:"localhost",port:t.database}};if(o.type&&["frontend","api","library","desktop","docs","example","dashboard","system-tray","database"].includes(o.type))return{host:s[o.type].host,port:s[o.type].port,open:!0};return{host:o.host||"stacks.localhost",port:o.port||3000,open:o.open||!1}}export{r as server};
|
|
67
3
|
|
|
68
|
-
//# debugId=
|
|
4
|
+
//# debugId=9727226D678B531364756E2164756E21
|
|
69
5
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { ports } from '@stacksjs/config'\n\ninterface ServerOptions {\n type?:\n | 'frontend'\n | 'backend'\n | 'api'\n | 'library'\n | 'desktop'\n | 'docs'\n | 'email'\n | 'admin'\n | 'system-tray'\n | 'database'\n host?: string\n port?: number\n open?: boolean\n}\n\nexport function config(options: ServerOptions) {\n const serversMap = {\n frontend: {\n host: 'localhost',\n port: ports.frontend,\n },\n\n backend: {\n host: 'localhost',\n port: ports.backend,\n },\n\n api: {\n host: 'localhost',\n port: ports.api,\n },\n\n admin: {\n host: 'localhost',\n port: ports.admin,\n },\n\n library: {\n // component library\n host: 'localhost',\n port: ports.library,\n },\n\n desktop: {\n host: 'localhost',\n port: ports.desktop,\n },\n\n docs: {\n host: 'localhost',\n port: ports.docs,\n },\n\n email: {\n host: 'localhost',\n port: ports.email,\n },\n\n inspect: {\n host: 'localhost',\n port: ports.inspect,\n },\n\n 'system-tray': {\n host: 'localhost',\n port: ports.systemTray,\n },\n\n database: {\n host: 'localhost',\n port: ports.database,\n },\n }\n\n if (\n options.type &&\n ['frontend', 'api', 'library', 'desktop', 'docs', 'example', 'dashboard', 'system-tray', 'database'].includes(\n options.type,\n )\n ) {\n return {\n host: serversMap[options.type].host,\n port: serversMap[options.type].port,\n open: true,\n }\n }\n\n return {\n host: options.host || 'stacks.localhost',\n port: options.port || 3000,\n open: options.open || false,\n }\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": ";AAAA,gBAAS,yBAmBF,SAAS,CAAM,CAAC,EAAwB,CAC7C,MAAM,EAAa,CACjB,SAAU,CACR,KAAM,YACN,KAAM,EAAM,QACd,EAEA,QAAS,CACP,KAAM,YACN,KAAM,EAAM,OACd,EAEA,IAAK,CACH,KAAM,YACN,KAAM,EAAM,GACd,EAEA,MAAO,CACL,KAAM,YACN,KAAM,EAAM,KACd,EAEA,QAAS,CAEP,KAAM,YACN,KAAM,EAAM,OACd,EAEA,QAAS,CACP,KAAM,YACN,KAAM,EAAM,OACd,EAEA,KAAM,CACJ,KAAM,YACN,KAAM,EAAM,IACd,EAEA,MAAO,CACL,KAAM,YACN,KAAM,EAAM,KACd,EAEA,QAAS,CACP,KAAM,YACN,KAAM,EAAM,OACd,EAEA,cAAe,CACb,KAAM,YACN,KAAM,EAAM,UACd,EAEA,SAAU,CACR,KAAM,YACN,KAAM,EAAM,QACd,CACF,EAEA,GACE,EAAQ,MACR,CAAC,WAAY,MAAO,UAAW,UAAW,OAAQ,UAAW,YAAa,cAAe,UAAU,EAAE,SACnG,EAAQ,IACV,EAEA,MAAO,CACL,KAAM,EAAW,EAAQ,MAAM,KAC/B,KAAM,EAAW,EAAQ,MAAM,KAC/B,KAAM,EACR,EAGF,MAAO,CACL,KAAM,EAAQ,MAAQ,mBACtB,KAAM,EAAQ,MAAQ,KACtB,KAAM,EAAQ,MAAQ,EACxB",
|
|
8
|
+
"debugId": "9727226D678B531364756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/server",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.63.
|
|
4
|
+
"version": "0.63.1",
|
|
5
5
|
"description": "Local development and production-ready.",
|
|
6
6
|
"author": "Chris Breuer",
|
|
7
7
|
"license": "MIT",
|
|
@@ -49,12 +49,6 @@
|
|
|
49
49
|
"typecheck": "bun --bun tsc --noEmit",
|
|
50
50
|
"prepublishOnly": "bun run build"
|
|
51
51
|
},
|
|
52
|
-
"peerDependencies": {
|
|
53
|
-
"@stacksjs/config": "latest",
|
|
54
|
-
"@stacksjs/path": "latest",
|
|
55
|
-
"@stacksjs/router": "latest",
|
|
56
|
-
"@stacksjs/validation": "latest"
|
|
57
|
-
},
|
|
58
52
|
"dependencies": {
|
|
59
53
|
"@stacksjs/config": "latest",
|
|
60
54
|
"@stacksjs/path": "latest",
|