@cedarjs/internal 1.1.1-next.0 → 1.1.1-next.21

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.
@@ -246,7 +246,7 @@ async function getPluginConfig(side) {
246
246
  JSON: "Prisma.JsonValue",
247
247
  JSONObject: "Prisma.JsonObject",
248
248
  Time: side === 1 /* WEB */ ? "string" : "Date | string",
249
- Byte: "Buffer"
249
+ Byte: "Uint8Array"
250
250
  };
251
251
  const config = (0, import_project_config.getConfig)();
252
252
  if (config.graphql.includeScalars.File) {
@@ -1 +1 @@
1
- {"version":3,"file":"graphqlSchema.d.ts","sourceRoot":"","sources":["../../../src/generate/graphqlSchema.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,qBAAqB;;;iBA6DP,MAAM;eAAS,OAAO;;EAyEhD,CAAA"}
1
+ {"version":3,"file":"graphqlSchema.d.ts","sourceRoot":"","sources":["../../../src/generate/graphqlSchema.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,qBAAqB;;;iBA6DP,MAAM;eAAS,OAAO;;EA8EhD,CAAA"}
@@ -42,7 +42,7 @@ var import_graphql = require("graphql");
42
42
  var import_termi_link = require("termi-link");
43
43
  var import_graphql_server = require("@cedarjs/graphql-server");
44
44
  var import_project_config = require("@cedarjs/project-config");
45
- const { getSchema } = import_internals.default;
45
+ const { getSchemaWithPath } = import_internals.default;
46
46
  const generateGraphQLSchema = async () => {
47
47
  const redwoodProjectPaths = (0, import_project_config.getPaths)();
48
48
  const redwoodProjectConfig = (0, import_project_config.getConfig)();
@@ -96,7 +96,11 @@ const generateGraphQLSchema = async () => {
96
96
  if (e instanceof Error) {
97
97
  const match = e.message.match(/Unknown type: "(\w+)"/);
98
98
  const name = match?.[1];
99
- const schemaPrisma = (await getSchema(redwoodProjectPaths.api.dbSchema)).toString();
99
+ const schemaPath = await (0, import_project_config.getSchemaPath)(
100
+ redwoodProjectPaths.api.prismaConfig
101
+ );
102
+ const result = await getSchemaWithPath(schemaPath);
103
+ const schemaPrisma = result.schemas.map(([, content]) => content).join("\n");
100
104
  const errorObject = {
101
105
  message: `Schema loading failed. ${e.message}`,
102
106
  error: e
@@ -210,7 +210,7 @@ async function getPluginConfig(side) {
210
210
  JSON: "Prisma.JsonValue",
211
211
  JSONObject: "Prisma.JsonObject",
212
212
  Time: side === 1 /* WEB */ ? "string" : "Date | string",
213
- Byte: "Buffer"
213
+ Byte: "Uint8Array"
214
214
  };
215
215
  const config = getConfig();
216
216
  if (config.graphql.includeScalars.File) {
@@ -1 +1 @@
1
- {"version":3,"file":"graphqlSchema.d.ts","sourceRoot":"","sources":["../../src/generate/graphqlSchema.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,qBAAqB;;;iBA6DP,MAAM;eAAS,OAAO;;EAyEhD,CAAA"}
1
+ {"version":3,"file":"graphqlSchema.d.ts","sourceRoot":"","sources":["../../src/generate/graphqlSchema.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,qBAAqB;;;iBA6DP,MAAM;eAAS,OAAO;;EA8EhD,CAAA"}
@@ -8,8 +8,13 @@ import ansis from "ansis";
8
8
  import { print } from "graphql";
9
9
  import { terminalLink } from "termi-link";
10
10
  import { rootSchema } from "@cedarjs/graphql-server";
11
- import { getPaths, getConfig, resolveFile } from "@cedarjs/project-config";
12
- const { getSchema } = prismaInternals;
11
+ import {
12
+ getPaths,
13
+ getConfig,
14
+ resolveFile,
15
+ getSchemaPath
16
+ } from "@cedarjs/project-config";
17
+ const { getSchemaWithPath } = prismaInternals;
13
18
  const generateGraphQLSchema = async () => {
14
19
  const redwoodProjectPaths = getPaths();
15
20
  const redwoodProjectConfig = getConfig();
@@ -63,7 +68,11 @@ const generateGraphQLSchema = async () => {
63
68
  if (e instanceof Error) {
64
69
  const match = e.message.match(/Unknown type: "(\w+)"/);
65
70
  const name = match?.[1];
66
- const schemaPrisma = (await getSchema(redwoodProjectPaths.api.dbSchema)).toString();
71
+ const schemaPath = await getSchemaPath(
72
+ redwoodProjectPaths.api.prismaConfig
73
+ );
74
+ const result = await getSchemaWithPath(schemaPath);
75
+ const schemaPrisma = result.schemas.map(([, content]) => content).join("\n");
67
76
  const errorObject = {
68
77
  message: `Schema loading failed. ${e.message}`,
69
78
  error: e
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/internal",
3
- "version": "1.1.1-next.0+4e91c835e",
3
+ "version": "1.1.1-next.21+77cfbaa90",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/cedarjs/cedar.git",
@@ -140,10 +140,10 @@
140
140
  "@babel/plugin-transform-typescript": "^7.26.8",
141
141
  "@babel/runtime-corejs3": "7.27.6",
142
142
  "@babel/traverse": "7.27.4",
143
- "@cedarjs/babel-config": "1.1.1-next.0+4e91c835e",
144
- "@cedarjs/graphql-server": "1.1.1-next.0+4e91c835e",
145
- "@cedarjs/project-config": "1.1.1-next.0+4e91c835e",
146
- "@cedarjs/router": "1.1.1-next.0+4e91c835e",
143
+ "@cedarjs/babel-config": "1.1.1-next.21+77cfbaa90",
144
+ "@cedarjs/graphql-server": "1.1.1-next.21+77cfbaa90",
145
+ "@cedarjs/project-config": "1.1.1-next.21+77cfbaa90",
146
+ "@cedarjs/router": "1.1.1-next.21+77cfbaa90",
147
147
  "@graphql-codegen/add": "4.0.1",
148
148
  "@graphql-codegen/cli": "3.3.1",
149
149
  "@graphql-codegen/client-preset": "4.3.3",
@@ -176,7 +176,7 @@
176
176
  },
177
177
  "devDependencies": {
178
178
  "@arethetypeswrong/cli": "0.18.2",
179
- "@cedarjs/framework-tools": "1.1.1-next.1",
179
+ "@cedarjs/framework-tools": "1.1.1-next.21",
180
180
  "@types/fs-extra": "11.0.4",
181
181
  "concurrently": "8.2.2",
182
182
  "graphql-tag": "2.12.6",
@@ -187,5 +187,5 @@
187
187
  "publishConfig": {
188
188
  "access": "public"
189
189
  },
190
- "gitHead": "4e91c835e7b5fc4fe1499b811415ff56041ae9bf"
190
+ "gitHead": "77cfbaa90a726923a763fb33b836638d94b2d431"
191
191
  }