@cedarjs/cli 6.0.0-canary.2825 → 6.0.0-canary.2828

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.
@@ -114,7 +114,7 @@ const handler = async ({
114
114
  },
115
115
  task: (_ctx, task) => {
116
116
  task.output = [
117
- "Please add the following to your 'redwoodFastifyGraphQLServer' plugin options to enable OTel for your graphql",
117
+ "Please add the following to your 'cedarFastifyGraphQLServer' plugin options to enable OTel for your graphql",
118
118
  "openTelemetryOptions: {",
119
119
  " resolvers: true,",
120
120
  " result: true,",
@@ -5,13 +5,7 @@ import { recordTelemetryAttributes, colors as c } from "@cedarjs/cli-helpers";
5
5
  import { getPaths, getPrismaSchemas } from "@cedarjs/project-config";
6
6
  import { errorTelemetry } from "@cedarjs/telemetry";
7
7
  import { writeFilesTask, printSetupNotes } from "../../../../lib/index.js";
8
- import { addFilesTask } from "../helpers/index.js";
9
- import {
10
- POSTGRES_YAML,
11
- RENDER_HEALTH_CHECK,
12
- RENDER_YAML,
13
- SQLITE_YAML
14
- } from "../templates/render.js";
8
+ import { POSTGRES_YAML, RENDER_YAML, SQLITE_YAML } from "../templates/render.js";
15
9
  const { getConfig } = prismaInternals;
16
10
  const getRenderYamlContent = async (database) => {
17
11
  if (database === "none") {
@@ -55,13 +49,8 @@ const notes = [
55
49
  "You are ready to deploy to Render!\n",
56
50
  "Go to https://dashboard.render.com/iacs to create your account and deploy to Render",
57
51
  "Check out the deployment docs at https://cedarjs.com/docs/deploy/render for detailed instructions",
58
- "Note: After first deployment to Render update the rewrite rule destination in `./render.yaml`"
59
- ];
60
- const additionalFiles = [
61
- {
62
- path: path.join(getPaths().base, "api/src/functions/healthz.js"),
63
- content: RENDER_HEALTH_CHECK
64
- }
52
+ "Note: After first deployment to Render update the rewrite rule destination in `./render.yaml`",
53
+ "Note: The api service now health checks `/graphql/health`. If a previous setup left an unused `api/src/functions/healthz.js` behind, you can delete it"
65
54
  ];
66
55
  const handler = async ({
67
56
  force,
@@ -83,11 +72,6 @@ const handler = async ({
83
72
  return writeFilesTask(files, { overwriteExisting: force });
84
73
  }
85
74
  },
86
- // Add health check api function
87
- addFilesTask({
88
- files: additionalFiles,
89
- force
90
- }),
91
75
  printSetupNotes(notes)
92
76
  ],
93
77
  { rendererOptions: { collapseSubtasks: false } }
@@ -47,6 +47,17 @@ services:
47
47
  buildCommand: npm install --global corepack && yarn install && yarn cedar build api
48
48
  startCommand: yarn cedar deploy render api
49
49
 
50
+ # Proves the GraphQL server is actually serving, not just that the process
51
+ # is alive. Returns 200 with an \`x-yoga-id\` response header.
52
+ #
53
+ # The route is \`<apiRootPath><graphiQLEndpoint>/health\`, and the value below
54
+ # assumes both defaults (\`/\` and \`/graphql\`). Update it to match if you
55
+ # customize either \u2014 by setting \`CEDAR_API_ROOT_PATH\` in the envVars below,
56
+ # by passing \`apiRootPath\` to \`createServer\` in \`api/src/server.ts\`, or by
57
+ # setting \`graphiQLEndpoint\` in \`api/src/functions/graphql.ts\`. A mismatch
58
+ # here 404s, and Render will not promote the deploy.
59
+ healthCheckPath: /graphql/health
60
+
50
61
  envVars:
51
62
  ${database}
52
63
  `;
@@ -65,17 +76,9 @@ const SQLITE_YAML = ` - key: DATABASE_URL
65
76
  name: sqlite-data
66
77
  mountPath: /opt/render/project/src/api/db/data
67
78
  sizeGB: 1`;
68
- const RENDER_HEALTH_CHECK = `// render-health-check
69
- export const handler = async () => {
70
- return {
71
- statusCode: 200,
72
- }
73
- }
74
- `;
75
79
  export {
76
80
  POSTGRES_YAML,
77
81
  PROJECT_NAME,
78
- RENDER_HEALTH_CHECK,
79
82
  RENDER_YAML,
80
83
  SQLITE_YAML
81
84
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/cli",
3
- "version": "6.0.0-canary.2825",
3
+ "version": "6.0.0-canary.2828",
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.7",
35
35
  "@babel/preset-typescript": "7.29.7",
36
- "@cedarjs/api-server": "6.0.0-canary.2825",
37
- "@cedarjs/cli-helpers": "6.0.0-canary.2825",
38
- "@cedarjs/fastify-web": "6.0.0-canary.2825",
39
- "@cedarjs/internal": "6.0.0-canary.2825",
40
- "@cedarjs/prerender": "6.0.0-canary.2825",
41
- "@cedarjs/project-config": "6.0.0-canary.2825",
42
- "@cedarjs/structure": "6.0.0-canary.2825",
43
- "@cedarjs/telemetry": "6.0.0-canary.2825",
44
- "@cedarjs/utils": "6.0.0-canary.2825",
45
- "@cedarjs/vite": "6.0.0-canary.2825",
46
- "@cedarjs/web-server": "6.0.0-canary.2825",
36
+ "@cedarjs/api-server": "6.0.0-canary.2828",
37
+ "@cedarjs/cli-helpers": "6.0.0-canary.2828",
38
+ "@cedarjs/fastify-web": "6.0.0-canary.2828",
39
+ "@cedarjs/internal": "6.0.0-canary.2828",
40
+ "@cedarjs/prerender": "6.0.0-canary.2828",
41
+ "@cedarjs/project-config": "6.0.0-canary.2828",
42
+ "@cedarjs/structure": "6.0.0-canary.2828",
43
+ "@cedarjs/telemetry": "6.0.0-canary.2828",
44
+ "@cedarjs/utils": "6.0.0-canary.2828",
45
+ "@cedarjs/vite": "6.0.0-canary.2828",
46
+ "@cedarjs/web-server": "6.0.0-canary.2828",
47
47
  "@listr2/prompt-adapter-enquirer": "4.3.0",
48
48
  "@opentelemetry/api": "1.9.1",
49
49
  "@opentelemetry/core": "1.30.1",