@cedarjs/internal 5.0.7-next.186 → 5.0.7-next.219
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":"api-graphql-transforms.d.ts","sourceRoot":"","sources":["../../src/build/api-graphql-transforms.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api-graphql-transforms.d.ts","sourceRoot":"","sources":["../../src/build/api-graphql-transforms.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA8GtE;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,EAAE,EAAE,MAAM,EACV,KAAK,GAAE,KAAK,GAAG,KAAa,GAC3B,MAAM,GAAG,IAAI,CAmFf"}
|
|
@@ -6,6 +6,8 @@ import {
|
|
|
6
6
|
getPaths,
|
|
7
7
|
importStatementPath
|
|
8
8
|
} from "@cedarjs/project-config";
|
|
9
|
+
const GRAPHQL_OPTIONS_ERROR_PREFIX = "Could not read the GraphQL options in api/src/functions/graphql. Cedar needs to statically extract them so the api server can serve /graphql and its health endpoint. ";
|
|
10
|
+
const GRAPHQL_OPTIONS_ERROR_SUFFIX = " Expected a single `createGraphQLHandler({ ... })` call with the options passed directly as an object, an identifier, a call, or a ternary.";
|
|
9
11
|
function applyGraphqlOptionsExtract(code) {
|
|
10
12
|
if (code.includes("__cedar_graphqlOptions")) {
|
|
11
13
|
return null;
|
|
@@ -41,18 +43,26 @@ function applyGraphqlOptionsExtract(code) {
|
|
|
41
43
|
}
|
|
42
44
|
}).visit(program);
|
|
43
45
|
if (callExpressionPaths.length > 1) {
|
|
44
|
-
|
|
46
|
+
throw new Error(
|
|
47
|
+
GRAPHQL_OPTIONS_ERROR_PREFIX + "Found more than one call to createGraphQLHandler." + GRAPHQL_OPTIONS_ERROR_SUFFIX
|
|
48
|
+
);
|
|
45
49
|
}
|
|
46
50
|
const callExpression = callExpressionPaths[0];
|
|
47
51
|
if (!callExpression) {
|
|
48
|
-
|
|
52
|
+
throw new Error(
|
|
53
|
+
GRAPHQL_OPTIONS_ERROR_PREFIX + "createGraphQLHandler is imported but never called." + GRAPHQL_OPTIONS_ERROR_SUFFIX
|
|
54
|
+
);
|
|
49
55
|
}
|
|
50
56
|
const options = callExpression.arguments[0];
|
|
51
57
|
if (!options) {
|
|
52
|
-
|
|
58
|
+
throw new Error(
|
|
59
|
+
GRAPHQL_OPTIONS_ERROR_PREFIX + "createGraphQLHandler was called without any options." + GRAPHQL_OPTIONS_ERROR_SUFFIX
|
|
60
|
+
);
|
|
53
61
|
}
|
|
54
62
|
if (options.type !== "Identifier" && options.type !== "ObjectExpression" && options.type !== "CallExpression" && options.type !== "ConditionalExpression") {
|
|
55
|
-
|
|
63
|
+
throw new Error(
|
|
64
|
+
GRAPHQL_OPTIONS_ERROR_PREFIX + `The options argument is a ${options.type}, which can't be read statically.` + GRAPHQL_OPTIONS_ERROR_SUFFIX
|
|
65
|
+
);
|
|
56
66
|
}
|
|
57
67
|
const optionsStart = options.start;
|
|
58
68
|
const optionsEnd = options.end;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/internal",
|
|
3
|
-
"version": "5.0.7-next.
|
|
3
|
+
"version": "5.0.7-next.219",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -119,16 +119,16 @@
|
|
|
119
119
|
"dependencies": {
|
|
120
120
|
"@babel/core": "^7.26.10",
|
|
121
121
|
"@babel/parser": "7.29.7",
|
|
122
|
-
"@babel/plugin-transform-react-jsx": "7.29.7",
|
|
123
122
|
"@babel/plugin-transform-typescript": "^7.26.8",
|
|
124
123
|
"@babel/traverse": "7.29.7",
|
|
125
|
-
"@cedarjs/
|
|
126
|
-
"@cedarjs/
|
|
127
|
-
"@cedarjs/
|
|
128
|
-
"@cedarjs/
|
|
129
|
-
"@cedarjs/
|
|
130
|
-
"@cedarjs/
|
|
131
|
-
"@cedarjs/
|
|
124
|
+
"@cedarjs/api": "5.0.7-next.219",
|
|
125
|
+
"@cedarjs/babel-config": "5.0.7-next.219",
|
|
126
|
+
"@cedarjs/cli-helpers": "5.0.7-next.219",
|
|
127
|
+
"@cedarjs/graphql-server": "5.0.7-next.219",
|
|
128
|
+
"@cedarjs/project-config": "5.0.7-next.219",
|
|
129
|
+
"@cedarjs/router": "5.0.7-next.219",
|
|
130
|
+
"@cedarjs/structure": "5.0.7-next.219",
|
|
131
|
+
"@cedarjs/utils": "5.0.7-next.219",
|
|
132
132
|
"@graphql-codegen/add": "6.0.1",
|
|
133
133
|
"@graphql-codegen/cli": "6.3.1",
|
|
134
134
|
"@graphql-codegen/client-preset": "5.3.0",
|
|
@@ -136,14 +136,11 @@
|
|
|
136
136
|
"@graphql-codegen/fragment-matcher": "6.0.1",
|
|
137
137
|
"@graphql-codegen/plugin-helpers": "6.3.0",
|
|
138
138
|
"@graphql-codegen/schema-ast": "5.0.2",
|
|
139
|
-
"@graphql-codegen/typed-document-node": "6.1.8",
|
|
140
139
|
"@graphql-codegen/typescript": "5.0.10",
|
|
141
140
|
"@graphql-codegen/typescript-operations": "5.1.0",
|
|
142
|
-
"@graphql-codegen/typescript-react-apollo": "4.4.2",
|
|
143
141
|
"@graphql-codegen/typescript-resolvers": "5.1.8",
|
|
144
142
|
"@graphql-codegen/visitor-plugin-common": "6.3.0",
|
|
145
143
|
"@graphql-tools/code-file-loader": "8.1.36",
|
|
146
|
-
"@graphql-tools/documents": "1.0.1",
|
|
147
144
|
"@graphql-tools/graphql-file-loader": "8.1.18",
|
|
148
145
|
"@graphql-tools/load": "8.1.15",
|
|
149
146
|
"@graphql-tools/merge": "9.2.2",
|
|
@@ -151,7 +148,7 @@
|
|
|
151
148
|
"@prisma/internals": "7.8.0",
|
|
152
149
|
"@sdl-codegen/node": "2.0.1",
|
|
153
150
|
"ansis": "4.3.1",
|
|
154
|
-
"
|
|
151
|
+
"chokidar": "3.6.0",
|
|
155
152
|
"esbuild": "0.28.1",
|
|
156
153
|
"execa": "5.1.1",
|
|
157
154
|
"fast-glob": "3.3.3",
|
|
@@ -162,20 +159,19 @@
|
|
|
162
159
|
"prettier": "3.8.4",
|
|
163
160
|
"rimraf": "6.1.3",
|
|
164
161
|
"source-map": "0.7.6",
|
|
165
|
-
"string-env-interpolation": "1.0.1",
|
|
166
|
-
"systeminformation": "5.31.7",
|
|
167
162
|
"termi-link": "1.1.0",
|
|
168
|
-
"ts-node": "10.9.2",
|
|
169
163
|
"tsconfig-paths": "4.2.0",
|
|
170
164
|
"typescript": "5.9.3",
|
|
171
165
|
"vite": "7.3.6",
|
|
172
166
|
"vite-tsconfig-paths": "^6.1.1"
|
|
173
167
|
},
|
|
174
168
|
"devDependencies": {
|
|
175
|
-
"@
|
|
176
|
-
"@
|
|
169
|
+
"@cedarjs/framework-tools": "5.0.7-next.219",
|
|
170
|
+
"@jridgewell/trace-mapping": "0.3.31",
|
|
171
|
+
"@oxc-project/types": "^0.141.0",
|
|
177
172
|
"concurrently": "9.2.4",
|
|
178
173
|
"graphql-tag": "2.12.6",
|
|
174
|
+
"memfs": "4.64.0",
|
|
179
175
|
"publint": "0.3.22",
|
|
180
176
|
"ts-dedent": "2.3.0",
|
|
181
177
|
"vitest": "4.1.10"
|