@cedarjs/internal 6.0.3-next.227 → 6.0.3-next.275

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;AAmCD,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM;SACD,MAAM;GAQ5D;AA2OD,eAAO,MAAM,iBAAiB,4RAe7B,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
- ...userCodegenConfig?.config?.config
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": "6.0.3-next.227",
3
+ "version": "6.0.3-next.275",
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": "6.0.3-next.227",
118
- "@cedarjs/babel-config": "6.0.3-next.227",
119
- "@cedarjs/cli-helpers": "6.0.3-next.227",
120
- "@cedarjs/graphql-server": "6.0.3-next.227",
121
- "@cedarjs/project-config": "6.0.3-next.227",
122
- "@cedarjs/router": "6.0.3-next.227",
123
- "@cedarjs/structure": "6.0.3-next.227",
124
- "@cedarjs/utils": "6.0.3-next.227",
117
+ "@cedarjs/api": "6.0.3-next.275",
118
+ "@cedarjs/babel-config": "6.0.3-next.275",
119
+ "@cedarjs/cli-helpers": "6.0.3-next.275",
120
+ "@cedarjs/graphql-server": "6.0.3-next.275",
121
+ "@cedarjs/project-config": "6.0.3-next.275",
122
+ "@cedarjs/router": "6.0.3-next.275",
123
+ "@cedarjs/structure": "6.0.3-next.275",
124
+ "@cedarjs/utils": "6.0.3-next.275",
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",
@@ -140,7 +140,7 @@
140
140
  "@prisma/dmmf": "7.10.0",
141
141
  "@prisma/internals": "7.10.0",
142
142
  "@sdl-codegen/node": "2.0.1",
143
- "ansis": "4.3.1",
143
+ "ansis": "4.4.0",
144
144
  "chokidar": "3.6.0",
145
145
  "esbuild": "0.28.2",
146
146
  "execa": "5.1.1",
@@ -148,8 +148,8 @@
148
148
  "graphql": "16.14.2",
149
149
  "kill-port": "1.6.1",
150
150
  "magic-string": "0.30.21",
151
- "oxc-parser": "0.149.0",
152
- "prettier": "3.9.6",
151
+ "oxc-parser": "0.150.0",
152
+ "prettier": "3.9.8",
153
153
  "rimraf": "6.1.3",
154
154
  "source-map": "0.8.0",
155
155
  "termi-link": "1.1.0",
@@ -159,12 +159,12 @@
159
159
  "vite-tsconfig-paths": "^6.1.1"
160
160
  },
161
161
  "devDependencies": {
162
- "@cedarjs/framework-tools": "6.0.3-next.227",
162
+ "@cedarjs/framework-tools": "6.0.3-next.275",
163
163
  "@jridgewell/trace-mapping": "0.3.31",
164
- "@oxc-project/types": "^0.149.0",
164
+ "@oxc-project/types": "^0.150.0",
165
165
  "concurrently": "9.2.4",
166
166
  "graphql-tag": "2.12.7",
167
- "memfs": "4.76.0",
167
+ "memfs": "4.78.1",
168
168
  "publint": "0.3.24",
169
169
  "ts-dedent": "2.3.0",
170
170
  "vitest": "4.1.11"