@cedarjs/internal 1.0.0-canary.12749 → 1.0.0-rc.26
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.
- package/dist/cjs/generate/graphqlCodeGen.js +1 -1
- package/dist/cjs/generate/graphqlSchema.d.ts.map +1 -1
- package/dist/cjs/generate/graphqlSchema.js +2 -3
- package/dist/cjs/generate/typeDefinitions.js +1 -1
- package/dist/generate/graphqlCodeGen.js +1 -1
- package/dist/generate/graphqlSchema.d.ts.map +1 -1
- package/dist/generate/graphqlSchema.js +2 -3
- package/dist/generate/typeDefinitions.js +1 -1
- package/package.json +7 -7
|
@@ -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: "
|
|
249
|
+
Byte: "Buffer"
|
|
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;;;iBAyDP,MAAM;eAAS,OAAO;;
|
|
1
|
+
{"version":3,"file":"graphqlSchema.d.ts","sourceRoot":"","sources":["../../../src/generate/graphqlSchema.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,qBAAqB;;;iBAyDP,MAAM;eAAS,OAAO;;EAyEhD,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 {
|
|
45
|
+
const { getSchema } = 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)();
|
|
@@ -92,8 +92,7 @@ const generateGraphQLSchema = async () => {
|
|
|
92
92
|
if (e instanceof Error) {
|
|
93
93
|
const match = e.message.match(/Unknown type: "(\w+)"/);
|
|
94
94
|
const name = match?.[1];
|
|
95
|
-
const
|
|
96
|
-
const schemaPrisma = result.schemas.map(([, content]) => content).join("\n");
|
|
95
|
+
const schemaPrisma = (await getSchema(redwoodProjectPaths.api.dbSchema)).toString();
|
|
97
96
|
const errorObject = {
|
|
98
97
|
message: `Schema loading failed. ${e.message}`,
|
|
99
98
|
error: e
|
|
@@ -324,7 +324,7 @@ const generateViteClientTypesDirective = () => {
|
|
|
324
324
|
return [viteClientDirectivePath];
|
|
325
325
|
};
|
|
326
326
|
function generateStubStorybookTypes() {
|
|
327
|
-
const stubStorybookTypesFileContent = `declare module '@storybook/react
|
|
327
|
+
const stubStorybookTypesFileContent = `declare module '@storybook/react' {
|
|
328
328
|
export type Meta<T = any> = any
|
|
329
329
|
export type StoryObj<T = any> = any
|
|
330
330
|
}
|
|
@@ -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: "
|
|
213
|
+
Byte: "Buffer"
|
|
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;;;iBAyDP,MAAM;eAAS,OAAO;;
|
|
1
|
+
{"version":3,"file":"graphqlSchema.d.ts","sourceRoot":"","sources":["../../src/generate/graphqlSchema.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,qBAAqB;;;iBAyDP,MAAM;eAAS,OAAO;;EAyEhD,CAAA"}
|
|
@@ -9,7 +9,7 @@ import { print } from "graphql";
|
|
|
9
9
|
import { terminalLink } from "termi-link";
|
|
10
10
|
import { rootSchema } from "@cedarjs/graphql-server";
|
|
11
11
|
import { getPaths, getConfig, resolveFile } from "@cedarjs/project-config";
|
|
12
|
-
const {
|
|
12
|
+
const { getSchema } = prismaInternals;
|
|
13
13
|
const generateGraphQLSchema = async () => {
|
|
14
14
|
const redwoodProjectPaths = getPaths();
|
|
15
15
|
const redwoodProjectConfig = getConfig();
|
|
@@ -59,8 +59,7 @@ const generateGraphQLSchema = async () => {
|
|
|
59
59
|
if (e instanceof Error) {
|
|
60
60
|
const match = e.message.match(/Unknown type: "(\w+)"/);
|
|
61
61
|
const name = match?.[1];
|
|
62
|
-
const
|
|
63
|
-
const schemaPrisma = result.schemas.map(([, content]) => content).join("\n");
|
|
62
|
+
const schemaPrisma = (await getSchema(redwoodProjectPaths.api.dbSchema)).toString();
|
|
64
63
|
const errorObject = {
|
|
65
64
|
message: `Schema loading failed. ${e.message}`,
|
|
66
65
|
error: e
|
|
@@ -285,7 +285,7 @@ const generateViteClientTypesDirective = () => {
|
|
|
285
285
|
return [viteClientDirectivePath];
|
|
286
286
|
};
|
|
287
287
|
function generateStubStorybookTypes() {
|
|
288
|
-
const stubStorybookTypesFileContent = `declare module '@storybook/react
|
|
288
|
+
const stubStorybookTypesFileContent = `declare module '@storybook/react' {
|
|
289
289
|
export type Meta<T = any> = any
|
|
290
290
|
export type StoryObj<T = any> = any
|
|
291
291
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/internal",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-rc.26",
|
|
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.0.0-
|
|
144
|
-
"@cedarjs/graphql-server": "1.0.0-
|
|
145
|
-
"@cedarjs/project-config": "1.0.0-
|
|
146
|
-
"@cedarjs/router": "1.0.0-
|
|
143
|
+
"@cedarjs/babel-config": "1.0.0-rc.26",
|
|
144
|
+
"@cedarjs/graphql-server": "1.0.0-rc.26",
|
|
145
|
+
"@cedarjs/project-config": "1.0.0-rc.26",
|
|
146
|
+
"@cedarjs/router": "1.0.0-rc.26",
|
|
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.0.0-
|
|
179
|
+
"@cedarjs/framework-tools": "1.0.0-rc.26",
|
|
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": "
|
|
190
|
+
"gitHead": "2ea84a564123f5d986dd88efcb6dddc55cbef367"
|
|
191
191
|
}
|