@cedarjs/cli 5.0.0-canary.2355 → 5.0.0-canary.2357

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.
@@ -80,14 +80,16 @@ const handler = async ({
80
80
  verbose = false,
81
81
  prisma = true,
82
82
  prerender = true,
83
- ud = false
83
+ ud = false,
84
+ apiRootPath
84
85
  }) => {
85
86
  recordTelemetryAttributes({
86
87
  command: "build",
87
88
  workspace: JSON.stringify(workspace),
88
89
  verbose,
89
90
  prisma,
90
- prerender
91
+ prerender,
92
+ apiRootPath
91
93
  });
92
94
  const cedarPaths = getPaths();
93
95
  const cedarConfig = getConfig();
@@ -272,7 +274,7 @@ Run ` + c.info(formatCedarCommand(["build"])) + " (without specifying a workspac
272
274
  ud && workspace.includes("api") && {
273
275
  title: "Bundling API server entry (Universal Deploy)...",
274
276
  task: async () => {
275
- await buildUDApiServer({ verbose });
277
+ await buildUDApiServer({ verbose, apiRootPath });
276
278
  }
277
279
  }
278
280
  ].filter((t) => Boolean(t));
@@ -29,6 +29,9 @@ const builder = (yargs) => {
29
29
  type: "boolean",
30
30
  default: false,
31
31
  description: "Build the Universal Deploy server entry (api/dist/ud/)."
32
+ }).option("apiRootPath", {
33
+ type: "string",
34
+ description: 'Root path where API functions are served. Overrides the apiRootPath option on cedarUniversalDeployPlugin() in your vite config. Defaults to "/".'
32
35
  }).middleware(() => {
33
36
  const check = checkNodeVersion();
34
37
  if (check.ok) {
@@ -43,6 +46,9 @@ const builder = (yargs) => {
43
46
  if (!Array.isArray(workspacesArg)) {
44
47
  return "Workspace must be an array";
45
48
  }
49
+ if (argv.apiRootPath && !argv.ud) {
50
+ return c.error("Error:") + " --apiRootPath requires --ud.\n Use --ud to build the Universal Deploy server entry.";
51
+ }
46
52
  const filtered = workspacesArg.filter(
47
53
  (item) => item !== "api" && item !== "web" && item !== "packages/*"
48
54
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/cli",
3
- "version": "5.0.0-canary.2355",
3
+ "version": "5.0.0-canary.2357",
4
4
  "description": "The CedarJS Command Line",
5
5
  "repository": {
6
6
  "type": "git",
@@ -33,17 +33,17 @@
33
33
  "dependencies": {
34
34
  "@babel/parser": "7.29.3",
35
35
  "@babel/preset-typescript": "7.28.5",
36
- "@cedarjs/api-server": "5.0.0-canary.2355",
37
- "@cedarjs/cli-helpers": "5.0.0-canary.2355",
38
- "@cedarjs/fastify-web": "5.0.0-canary.2355",
39
- "@cedarjs/internal": "5.0.0-canary.2355",
40
- "@cedarjs/prerender": "5.0.0-canary.2355",
41
- "@cedarjs/project-config": "5.0.0-canary.2355",
42
- "@cedarjs/structure": "5.0.0-canary.2355",
43
- "@cedarjs/telemetry": "5.0.0-canary.2355",
44
- "@cedarjs/utils": "5.0.0-canary.2355",
45
- "@cedarjs/vite": "5.0.0-canary.2355",
46
- "@cedarjs/web-server": "5.0.0-canary.2355",
36
+ "@cedarjs/api-server": "5.0.0-canary.2357",
37
+ "@cedarjs/cli-helpers": "5.0.0-canary.2357",
38
+ "@cedarjs/fastify-web": "5.0.0-canary.2357",
39
+ "@cedarjs/internal": "5.0.0-canary.2357",
40
+ "@cedarjs/prerender": "5.0.0-canary.2357",
41
+ "@cedarjs/project-config": "5.0.0-canary.2357",
42
+ "@cedarjs/structure": "5.0.0-canary.2357",
43
+ "@cedarjs/telemetry": "5.0.0-canary.2357",
44
+ "@cedarjs/utils": "5.0.0-canary.2357",
45
+ "@cedarjs/vite": "5.0.0-canary.2357",
46
+ "@cedarjs/web-server": "5.0.0-canary.2357",
47
47
  "@listr2/prompt-adapter-enquirer": "4.2.1",
48
48
  "@opentelemetry/api": "1.9.0",
49
49
  "@opentelemetry/core": "1.30.1",