@cedarjs/vite 5.0.0-canary.2357 → 5.0.0-canary.2358

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":"buildUDApiServer.d.ts","sourceRoot":"","sources":["../src/buildUDApiServer.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,OAAe,EACf,WAAW,GACZ,GAAE,uBAA4B,iBAiF9B"}
1
+ {"version":3,"file":"buildUDApiServer.d.ts","sourceRoot":"","sources":["../src/buildUDApiServer.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,uBAAuB;IACtC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,gBAAgB,CAAC,EACrC,OAAe,EACf,WAAW,GACZ,GAAE,uBAA4B,iBAkG9B"}
@@ -1,3 +1,4 @@
1
+ import fs from "node:fs";
1
2
  import path from "node:path";
2
3
  import { getPaths } from "@cedarjs/project-config";
3
4
  async function buildUDApiServer({
@@ -17,6 +18,13 @@ async function buildUDApiServer({
17
18
  // Load the user's Vite config so all plugins (Cedar's UD plugin,
18
19
  // provider plugins, etc.) run during the build.
19
20
  configFile: cedarPaths.web.viteConfig,
21
+ // Cedar's getMergedConfig (from the cedar() plugin) overrides root to
22
+ // web/src/. For the UD server build, we want root to be the config
23
+ // file directory (web/) so that plugins like @netlify/vite-plugin
24
+ // output their files relative to the project structure, not a source
25
+ // directory.
26
+ // TODO: See what it'd take to *not* have cedar() set it to web/src
27
+ root: cedarPaths.web.base,
20
28
  logLevel: verbose ? "info" : "warn",
21
29
  plugins: [
22
30
  // catchAll() generates the rou3-based route dispatcher
@@ -65,6 +73,10 @@ async function buildUDApiServer({
65
73
  }
66
74
  }
67
75
  });
76
+ fs.writeFileSync(
77
+ path.join(outDir, "package.json"),
78
+ JSON.stringify({ type: "module" }, null, 2)
79
+ );
68
80
  } finally {
69
81
  if (apiRootPath !== void 0) {
70
82
  delete process.env.CEDAR_API_ROOT_PATH;
@@ -31,6 +31,7 @@ __export(buildUDApiServer_exports, {
31
31
  buildUDApiServer: () => buildUDApiServer
32
32
  });
33
33
  module.exports = __toCommonJS(buildUDApiServer_exports);
34
+ var import_node_fs = __toESM(require("node:fs"), 1);
34
35
  var import_node_path = __toESM(require("node:path"), 1);
35
36
  var import_project_config = require("@cedarjs/project-config");
36
37
  async function buildUDApiServer({
@@ -50,6 +51,13 @@ async function buildUDApiServer({
50
51
  // Load the user's Vite config so all plugins (Cedar's UD plugin,
51
52
  // provider plugins, etc.) run during the build.
52
53
  configFile: cedarPaths.web.viteConfig,
54
+ // Cedar's getMergedConfig (from the cedar() plugin) overrides root to
55
+ // web/src/. For the UD server build, we want root to be the config
56
+ // file directory (web/) so that plugins like @netlify/vite-plugin
57
+ // output their files relative to the project structure, not a source
58
+ // directory.
59
+ // TODO: See what it'd take to *not* have cedar() set it to web/src
60
+ root: cedarPaths.web.base,
53
61
  logLevel: verbose ? "info" : "warn",
54
62
  plugins: [
55
63
  // catchAll() generates the rou3-based route dispatcher
@@ -98,6 +106,10 @@ async function buildUDApiServer({
98
106
  }
99
107
  }
100
108
  });
109
+ import_node_fs.default.writeFileSync(
110
+ import_node_path.default.join(outDir, "package.json"),
111
+ JSON.stringify({ type: "module" }, null, 2)
112
+ );
101
113
  } finally {
102
114
  if (apiRootPath !== void 0) {
103
115
  delete process.env.CEDAR_API_ROOT_PATH;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/vite",
3
- "version": "5.0.0-canary.2357",
3
+ "version": "5.0.0-canary.2358",
4
4
  "description": "Vite configuration package for CedarJS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -99,18 +99,18 @@
99
99
  "@babel/generator": "7.29.1",
100
100
  "@babel/parser": "7.29.3",
101
101
  "@babel/traverse": "7.29.0",
102
- "@cedarjs/api": "5.0.0-canary.2357",
103
- "@cedarjs/api-server": "5.0.0-canary.2357",
104
- "@cedarjs/auth": "5.0.0-canary.2357",
105
- "@cedarjs/babel-config": "5.0.0-canary.2357",
106
- "@cedarjs/context": "5.0.0-canary.2357",
107
- "@cedarjs/cookie-jar": "5.0.0-canary.2357",
108
- "@cedarjs/graphql-server": "5.0.0-canary.2357",
109
- "@cedarjs/internal": "5.0.0-canary.2357",
110
- "@cedarjs/project-config": "5.0.0-canary.2357",
111
- "@cedarjs/server-store": "5.0.0-canary.2357",
112
- "@cedarjs/testing": "5.0.0-canary.2357",
113
- "@cedarjs/web": "5.0.0-canary.2357",
102
+ "@cedarjs/api": "5.0.0-canary.2358",
103
+ "@cedarjs/api-server": "5.0.0-canary.2358",
104
+ "@cedarjs/auth": "5.0.0-canary.2358",
105
+ "@cedarjs/babel-config": "5.0.0-canary.2358",
106
+ "@cedarjs/context": "5.0.0-canary.2358",
107
+ "@cedarjs/cookie-jar": "5.0.0-canary.2358",
108
+ "@cedarjs/graphql-server": "5.0.0-canary.2358",
109
+ "@cedarjs/internal": "5.0.0-canary.2358",
110
+ "@cedarjs/project-config": "5.0.0-canary.2358",
111
+ "@cedarjs/server-store": "5.0.0-canary.2358",
112
+ "@cedarjs/testing": "5.0.0-canary.2358",
113
+ "@cedarjs/web": "5.0.0-canary.2358",
114
114
  "@fastify/url-data": "6.0.3",
115
115
  "@swc/core": "1.15.33",
116
116
  "@universal-deploy/store": "^0.2.1",