@cedarjs/vite 5.0.0-canary.2542 → 5.0.0-canary.2543

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.
@@ -34,6 +34,7 @@ module.exports = __toCommonJS(workspacePackageAliases_exports);
34
34
  var import_node_fs = __toESM(require("node:fs"), 1);
35
35
  var import_node_path = __toESM(require("node:path"), 1);
36
36
  var import_vite = require("vite");
37
+ var import_workspaces = require("@cedarjs/project-config/workspaces");
37
38
  function findSourceEntry(pkgDir, pkgJson) {
38
39
  let distEntry = null;
39
40
  if (typeof pkgJson.main === "string") {
@@ -71,14 +72,7 @@ function getWorkspacePackageAliases(cedarPaths, cedarConfig) {
71
72
  return {};
72
73
  }
73
74
  try {
74
- const rootPkgPath = import_node_path.default.join(cedarPaths.base, "package.json");
75
- const rootPkg = JSON.parse(import_node_fs.default.readFileSync(rootPkgPath, "utf-8"));
76
- if (!Array.isArray(rootPkg.workspaces) || rootPkg.workspaces.length <= 2) {
77
- return {};
78
- }
79
- const nonApiWebWorkspaces = rootPkg.workspaces.filter(
80
- (w) => w !== "api" && w !== "web"
81
- );
75
+ const nonApiWebWorkspaces = (0, import_workspaces.getNonApiWebWorkspaces)(cedarPaths.base);
82
76
  if (nonApiWebWorkspaces.length === 0) {
83
77
  return {};
84
78
  }
@@ -1 +1 @@
1
- {"version":3,"file":"workspacePackageAliases.d.ts","sourceRoot":"","sources":["../../src/lib/workspacePackageAliases.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AA2D5D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,KAAK,EACjB,WAAW,EAAE,MAAM,GAClB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAiExB"}
1
+ {"version":3,"file":"workspacePackageAliases.d.ts","sourceRoot":"","sources":["../../src/lib/workspacePackageAliases.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AA4D5D;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,KAAK,EACjB,WAAW,EAAE,MAAM,GAClB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAoDxB"}
@@ -1,6 +1,7 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
3
  import { normalizePath } from "vite";
4
+ import { getNonApiWebWorkspaces } from "@cedarjs/project-config/workspaces";
4
5
  function findSourceEntry(pkgDir, pkgJson) {
5
6
  let distEntry = null;
6
7
  if (typeof pkgJson.main === "string") {
@@ -38,14 +39,7 @@ function getWorkspacePackageAliases(cedarPaths, cedarConfig) {
38
39
  return {};
39
40
  }
40
41
  try {
41
- const rootPkgPath = path.join(cedarPaths.base, "package.json");
42
- const rootPkg = JSON.parse(fs.readFileSync(rootPkgPath, "utf-8"));
43
- if (!Array.isArray(rootPkg.workspaces) || rootPkg.workspaces.length <= 2) {
44
- return {};
45
- }
46
- const nonApiWebWorkspaces = rootPkg.workspaces.filter(
47
- (w) => w !== "api" && w !== "web"
48
- );
42
+ const nonApiWebWorkspaces = getNonApiWebWorkspaces(cedarPaths.base);
49
43
  if (nonApiWebWorkspaces.length === 0) {
50
44
  return {};
51
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/vite",
3
- "version": "5.0.0-canary.2542",
3
+ "version": "5.0.0-canary.2543",
4
4
  "description": "Vite configuration package for CedarJS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -70,17 +70,17 @@
70
70
  "@babel/parser": "7.29.7",
71
71
  "@babel/traverse": "7.29.7",
72
72
  "@babel/types": "7.29.7",
73
- "@cedarjs/api": "5.0.0-canary.2542",
74
- "@cedarjs/auth": "5.0.0-canary.2542",
75
- "@cedarjs/babel-config": "5.0.0-canary.2542",
76
- "@cedarjs/context": "5.0.0-canary.2542",
77
- "@cedarjs/cookie-jar": "5.0.0-canary.2542",
78
- "@cedarjs/graphql-server": "5.0.0-canary.2542",
79
- "@cedarjs/internal": "5.0.0-canary.2542",
80
- "@cedarjs/project-config": "5.0.0-canary.2542",
81
- "@cedarjs/server-store": "5.0.0-canary.2542",
82
- "@cedarjs/testing": "5.0.0-canary.2542",
83
- "@cedarjs/web": "5.0.0-canary.2542",
73
+ "@cedarjs/api": "5.0.0-canary.2543",
74
+ "@cedarjs/auth": "5.0.0-canary.2543",
75
+ "@cedarjs/babel-config": "5.0.0-canary.2543",
76
+ "@cedarjs/context": "5.0.0-canary.2543",
77
+ "@cedarjs/cookie-jar": "5.0.0-canary.2543",
78
+ "@cedarjs/graphql-server": "5.0.0-canary.2543",
79
+ "@cedarjs/internal": "5.0.0-canary.2543",
80
+ "@cedarjs/project-config": "5.0.0-canary.2543",
81
+ "@cedarjs/server-store": "5.0.0-canary.2543",
82
+ "@cedarjs/testing": "5.0.0-canary.2543",
83
+ "@cedarjs/web": "5.0.0-canary.2543",
84
84
  "@fastify/url-data": "6.0.3",
85
85
  "@swc/core": "1.15.41",
86
86
  "@universal-deploy/store": "^0.2.1",