@cedarjs/internal 7.0.0-canary.3228 → 7.0.0-canary.3231
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":"graphqlCodeGen.d.ts","sourceRoot":"","sources":["../../src/generate/graphqlCodeGen.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAmB9D,KAAK,aAAa,GAAG;IACnB,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;CAC9C,CAAA;AAED,eAAO,MAAM,yBAAyB,QAAa,OAAO,CAAC,aAAa,CAiFvE,CAAA;AAED,eAAO,MAAM,yBAAyB,QAAa,OAAO,CAAC,aAAa,CAwDvE,CAAA;
|
|
1
|
+
{"version":3,"file":"graphqlCodeGen.d.ts","sourceRoot":"","sources":["../../src/generate/graphqlCodeGen.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAmB9D,KAAK,aAAa,GAAG;IACnB,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,EAAE,CAAA;CAC9C,CAAA;AAED,eAAO,MAAM,yBAAyB,QAAa,OAAO,CAAC,aAAa,CAiFvE,CAAA;AAED,eAAO,MAAM,yBAAyB,QAAa,OAAO,CAAC,aAAa,CAwDvE,CAAA;AA+DD,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM;SACD,MAAM;GAQ5D;AA2OD,eAAO,MAAM,iBAAiB,4RAe7B,CAAA"}
|
|
@@ -147,14 +147,28 @@ const generateTypeDefGraphQLWeb = async () => {
|
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
149
|
};
|
|
150
|
+
function isRecord(value) {
|
|
151
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
152
|
+
}
|
|
153
|
+
function mergeScalars(cedarScalars, userScalars) {
|
|
154
|
+
if (userScalars === void 0 || userScalars === null) {
|
|
155
|
+
return cedarScalars;
|
|
156
|
+
}
|
|
157
|
+
if (isRecord(cedarScalars) && isRecord(userScalars)) {
|
|
158
|
+
return { ...cedarScalars, ...userScalars };
|
|
159
|
+
}
|
|
160
|
+
return userScalars;
|
|
161
|
+
}
|
|
150
162
|
async function runCodegenGraphQL(documents, extraPlugins, filename, side) {
|
|
151
163
|
const userCodegenConfig = await loadCodegenConfig({
|
|
152
164
|
configFilePath: getPaths().base
|
|
153
165
|
});
|
|
154
166
|
const pluginConfig = await getPluginConfig(side);
|
|
167
|
+
const { scalars: userScalars, ...userPluginConfig } = userCodegenConfig?.config?.config ?? {};
|
|
155
168
|
const mergedConfig = {
|
|
156
169
|
...pluginConfig,
|
|
157
|
-
...
|
|
170
|
+
...userPluginConfig,
|
|
171
|
+
scalars: mergeScalars(pluginConfig.scalars, userScalars)
|
|
158
172
|
};
|
|
159
173
|
const options = getCodegenOptions(documents, mergedConfig, extraPlugins);
|
|
160
174
|
const output = await codegen(options);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/internal",
|
|
3
|
-
"version": "7.0.0-canary.
|
|
3
|
+
"version": "7.0.0-canary.3231",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -114,14 +114,14 @@
|
|
|
114
114
|
"@babel/core": "^7.26.10",
|
|
115
115
|
"@babel/parser": "7.29.8",
|
|
116
116
|
"@babel/traverse": "7.29.8",
|
|
117
|
-
"@cedarjs/api": "7.0.0-canary.
|
|
118
|
-
"@cedarjs/babel-config": "7.0.0-canary.
|
|
119
|
-
"@cedarjs/cli-helpers": "7.0.0-canary.
|
|
120
|
-
"@cedarjs/graphql-server": "7.0.0-canary.
|
|
121
|
-
"@cedarjs/project-config": "7.0.0-canary.
|
|
122
|
-
"@cedarjs/router": "7.0.0-canary.
|
|
123
|
-
"@cedarjs/structure": "7.0.0-canary.
|
|
124
|
-
"@cedarjs/utils": "7.0.0-canary.
|
|
117
|
+
"@cedarjs/api": "7.0.0-canary.3231",
|
|
118
|
+
"@cedarjs/babel-config": "7.0.0-canary.3231",
|
|
119
|
+
"@cedarjs/cli-helpers": "7.0.0-canary.3231",
|
|
120
|
+
"@cedarjs/graphql-server": "7.0.0-canary.3231",
|
|
121
|
+
"@cedarjs/project-config": "7.0.0-canary.3231",
|
|
122
|
+
"@cedarjs/router": "7.0.0-canary.3231",
|
|
123
|
+
"@cedarjs/structure": "7.0.0-canary.3231",
|
|
124
|
+
"@cedarjs/utils": "7.0.0-canary.3231",
|
|
125
125
|
"@graphql-codegen/add": "6.0.1",
|
|
126
126
|
"@graphql-codegen/cli": "6.3.1",
|
|
127
127
|
"@graphql-codegen/client-preset": "5.3.0",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"vite-tsconfig-paths": "^6.1.1"
|
|
160
160
|
},
|
|
161
161
|
"devDependencies": {
|
|
162
|
-
"@cedarjs/framework-tools": "7.0.0-canary.
|
|
162
|
+
"@cedarjs/framework-tools": "7.0.0-canary.3231",
|
|
163
163
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
164
164
|
"@oxc-project/types": "^0.150.0",
|
|
165
165
|
"concurrently": "9.2.4",
|