@cedarjs/vite 6.0.0-canary.2816 → 6.0.0-canary.2819

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.
@@ -1 +1 @@
1
- {"version":3,"file":"getMergedConfig.d.ts","sourceRoot":"","sources":["../../src/lib/getMergedConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAS5D;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,IAC5D,YAAY,cAAc,EAAE,KAAK,SAAS,KAAG,cAAc,CAgIpE"}
1
+ {"version":3,"file":"getMergedConfig.d.ts","sourceRoot":"","sources":["../../src/lib/getMergedConfig.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9D,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAW5D;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,IAC5D,YAAY,cAAc,EAAE,KAAK,SAAS,KAAG,cAAc,CAsIpE"}
@@ -3,20 +3,27 @@ import { mergeConfig } from "vite";
3
3
  import {
4
4
  getConfig,
5
5
  getEnvVarDefinitions,
6
- getPaths
6
+ getPaths,
7
+ parsePort,
8
+ readEnvVar
7
9
  } from "@cedarjs/project-config";
8
10
  import { getWorkspacePackageAliases } from "./workspacePackageAliases.js";
9
11
  function getMergedConfig(cedarConfig, cedarPaths) {
10
12
  return (userConfig, env) => {
11
13
  const workspaceAliases = env.command === "serve" ? getWorkspacePackageAliases(cedarPaths, cedarConfig) : {};
12
- let apiHost = process.env.REDWOOD_API_HOST;
14
+ let apiHost = readEnvVar("CEDAR_API_HOST", {
15
+ deprecatedAlias: "REDWOOD_API_HOST"
16
+ });
13
17
  apiHost ??= cedarConfig.api.host;
14
18
  apiHost ??= process.env.NODE_ENV === "production" ? "0.0.0.0" : "127.0.0.1";
15
19
  const streamingSsrEnabled = cedarConfig.experimental.streamingSsr?.enabled;
16
20
  const rscEnabled = cedarConfig.experimental.rsc?.enabled;
21
+ const apiPortEnvVar = readEnvVar("CEDAR_API_PORT", {
22
+ deprecatedAlias: "REDWOOD_API_PORT"
23
+ });
17
24
  let apiPort;
18
- if (process.env.REDWOOD_API_PORT) {
19
- apiPort = parseInt(process.env.REDWOOD_API_PORT);
25
+ if (apiPortEnvVar) {
26
+ apiPort = parsePort(apiPortEnvVar, "CEDAR_API_PORT");
20
27
  } else {
21
28
  apiPort = cedarConfig.api.port;
22
29
  }
@@ -1 +1 @@
1
- {"version":3,"file":"registerFwGlobalsAndShims.d.ts","sourceRoot":"","sources":["../../src/lib/registerFwGlobalsAndShims.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,YAGrC,CAAA"}
1
+ {"version":3,"file":"registerFwGlobalsAndShims.d.ts","sourceRoot":"","sources":["../../src/lib/registerFwGlobalsAndShims.ts"],"names":[],"mappings":"AASA;;;;;;;;;GASG;AACH,eAAO,MAAM,yBAAyB,YAGrC,CAAA"}
@@ -1,5 +1,10 @@
1
1
  import { createRequire } from "node:module";
2
- import { getConfig, getEnvVarDefinitions } from "@cedarjs/project-config";
2
+ import {
3
+ getConfig,
4
+ getEnvVarDefinitions,
5
+ parsePort,
6
+ readEnvVar
7
+ } from "@cedarjs/project-config";
3
8
  const registerFwGlobalsAndShims = () => {
4
9
  registerFwGlobals();
5
10
  registerFwShims();
@@ -14,12 +19,17 @@ function registerFwGlobals() {
14
19
  if (/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(apiPath)) {
15
20
  return apiPath;
16
21
  } else {
17
- let webHost = process.env.REDWOOD_WEB_HOST;
22
+ let webHost = readEnvVar("CEDAR_WEB_HOST", {
23
+ deprecatedAlias: "REDWOOD_WEB_HOST"
24
+ });
18
25
  webHost ??= rwConfig.web.host;
19
26
  webHost ??= process.env.NODE_ENV === "production" ? "0.0.0.0" : "[::]";
27
+ const webPortEnvVar = readEnvVar("CEDAR_WEB_PORT", {
28
+ deprecatedAlias: "REDWOOD_WEB_PORT"
29
+ });
20
30
  let webPort;
21
- if (process.env.REDWOOD_WEB_PORT) {
22
- webPort = parseInt(process.env.REDWOOD_WEB_PORT);
31
+ if (webPortEnvVar) {
32
+ webPort = parsePort(webPortEnvVar, "CEDAR_WEB_PORT");
23
33
  } else {
24
34
  webPort = rwConfig.web.port;
25
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/vite",
3
- "version": "6.0.0-canary.2816",
3
+ "version": "6.0.0-canary.2819",
4
4
  "description": "Vite configuration package for CedarJS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -52,16 +52,16 @@
52
52
  "@babel/parser": "7.29.7",
53
53
  "@babel/traverse": "7.29.7",
54
54
  "@babel/types": "7.29.7",
55
- "@cedarjs/api": "6.0.0-canary.2816",
56
- "@cedarjs/api-server": "6.0.0-canary.2816",
57
- "@cedarjs/babel-config": "6.0.0-canary.2816",
58
- "@cedarjs/context": "6.0.0-canary.2816",
59
- "@cedarjs/graphql-server": "6.0.0-canary.2816",
60
- "@cedarjs/internal": "6.0.0-canary.2816",
61
- "@cedarjs/project-config": "6.0.0-canary.2816",
62
- "@cedarjs/server-store": "6.0.0-canary.2816",
63
- "@cedarjs/structure": "6.0.0-canary.2816",
64
- "@cedarjs/testing": "6.0.0-canary.2816",
55
+ "@cedarjs/api": "6.0.0-canary.2819",
56
+ "@cedarjs/api-server": "6.0.0-canary.2819",
57
+ "@cedarjs/babel-config": "6.0.0-canary.2819",
58
+ "@cedarjs/context": "6.0.0-canary.2819",
59
+ "@cedarjs/graphql-server": "6.0.0-canary.2819",
60
+ "@cedarjs/internal": "6.0.0-canary.2819",
61
+ "@cedarjs/project-config": "6.0.0-canary.2819",
62
+ "@cedarjs/server-store": "6.0.0-canary.2819",
63
+ "@cedarjs/structure": "6.0.0-canary.2819",
64
+ "@cedarjs/testing": "6.0.0-canary.2819",
65
65
  "@swc/core": "1.15.46",
66
66
  "@universal-deploy/store": "^0.2.1",
67
67
  "@universal-deploy/vite": "^0.1.9",
@@ -92,10 +92,10 @@
92
92
  "yargs-parser": "21.1.1"
93
93
  },
94
94
  "devDependencies": {
95
- "@cedarjs/auth": "6.0.0-canary.2816",
96
- "@cedarjs/framework-tools": "6.0.0-canary.2816",
97
- "@cedarjs/router": "6.0.0-canary.2816",
98
- "@cedarjs/web": "6.0.0-canary.2816",
95
+ "@cedarjs/auth": "6.0.0-canary.2819",
96
+ "@cedarjs/framework-tools": "6.0.0-canary.2819",
97
+ "@cedarjs/router": "6.0.0-canary.2819",
98
+ "@cedarjs/web": "6.0.0-canary.2819",
99
99
  "@dr.pogodin/react-helmet": "2.0.4",
100
100
  "@hyrious/esbuild-plugin-commonjs": "0.2.6",
101
101
  "@jridgewell/trace-mapping": "0.3.31",
@@ -115,9 +115,9 @@
115
115
  "vitest": "4.1.10"
116
116
  },
117
117
  "peerDependencies": {
118
- "@cedarjs/auth": "6.0.0-canary.2816",
119
- "@cedarjs/router": "6.0.0-canary.2816",
120
- "@cedarjs/web": "6.0.0-canary.2816"
118
+ "@cedarjs/auth": "6.0.0-canary.2819",
119
+ "@cedarjs/router": "6.0.0-canary.2819",
120
+ "@cedarjs/web": "6.0.0-canary.2819"
121
121
  },
122
122
  "engines": {
123
123
  "node": ">=24"