@cedarjs/internal 8.0.0-canary.3530 → 8.0.0-canary.3532
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.
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import '@cedarjs/graphql-server'
|
|
2
|
+
|
|
3
|
+
import type { CedarRealtimeOptions } from '@cedarjs/realtime'
|
|
4
|
+
|
|
5
|
+
// The full type of the realtime option createGraphQLHandler() takes
|
|
6
|
+
declare module '@cedarjs/graphql-server' {
|
|
7
|
+
interface RealtimeTypeMap {
|
|
8
|
+
options: CedarRealtimeOptions
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -19,6 +19,12 @@ export declare const generateTypeDefRouterRoutes: () => string[];
|
|
|
19
19
|
export declare const generateTypeDefRouterPages: () => string[];
|
|
20
20
|
export declare const generateTypeDefCurrentUser: () => string[];
|
|
21
21
|
export declare const generateTypeDefGqlorm: () => string[];
|
|
22
|
+
/**
|
|
23
|
+
* The full type of the GraphQL handler's `realtime` option, when the api side
|
|
24
|
+
* depends on `@cedarjs/realtime` (`cedar setup realtime` adds it). None
|
|
25
|
+
* otherwise, and a stale file goes.
|
|
26
|
+
*/
|
|
27
|
+
export declare const generateTypeDefRealtime: () => string[];
|
|
22
28
|
export declare const generateTypeDefScenarios: () => string[];
|
|
23
29
|
export declare const generateTypeDefTestMocks: () => string[];
|
|
24
30
|
export declare const generateTypeDefGlobImports: () => string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typeDefinitions.d.ts","sourceRoot":"","sources":["../../src/generate/typeDefinitions.ts"],"names":[],"mappings":"AA8CA;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;
|
|
1
|
+
{"version":3,"file":"typeDefinitions.d.ts","sourceRoot":"","sources":["../../src/generate/typeDefinitions.ts"],"names":[],"mappings":"AA8CA;;;GAGG;AACH,eAAO,MAAM,gBAAgB;;;;;;EA2B5B,CAAA;AAED,eAAO,MAAM,mCAAmC,gBAK/C,CAAA;AAED,eAAO,MAAM,kCAAkC,GAC7C,GAAG,MAAM,EACT,mDAAsB,aASvB,CAAA;AAED,eAAO,MAAM,kCAAkC,GAC7C,GAAG,MAAM,EACT,mDAAsB,WAoDvB,CAAA;AAED,eAAO,MAAM,mBAAmB,gBAG/B,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,GAAG,MAAM,EAAE,mDAAsB,aAQlE,CAAA;AAED,eAAO,MAAM,kBAAkB,GAAI,GAAG,MAAM,EAAE,mDAAsB,WAmHnE,CAAA;AAiBD,eAAO,MAAM,2BAA2B,gBAmEvC,CAAA;AAED,eAAO,MAAM,0BAA0B,gBA8CtC,CAAA;AAED,eAAO,MAAM,0BAA0B,gBAEtC,CAAA;AAED,eAAO,MAAM,qBAAqB,gBAEjC,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,gBA8BnC,CAAA;AAED,eAAO,MAAM,wBAAwB,gBAEpC,CAAA;AAED,eAAO,MAAM,wBAAwB,gBAKpC,CAAA;AAED,eAAO,MAAM,0BAA0B,gBAEtC,CAAA;AAED,eAAO,MAAM,4BAA4B,gBAExC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gCAAgC,gBAW5C,CAAA"}
|
|
@@ -31,6 +31,7 @@ const generateTypeDefs = async () => {
|
|
|
31
31
|
...generateTypeDefRouterPages(),
|
|
32
32
|
...generateTypeDefCurrentUser(),
|
|
33
33
|
...generateTypeDefGqlorm(),
|
|
34
|
+
...generateTypeDefRealtime(),
|
|
34
35
|
...generateTypeDefRouterRoutes(),
|
|
35
36
|
...generateTypeDefGlobImports(),
|
|
36
37
|
...generateTypeDefGlobalContext(),
|
|
@@ -306,6 +307,27 @@ const generateTypeDefCurrentUser = () => {
|
|
|
306
307
|
const generateTypeDefGqlorm = () => {
|
|
307
308
|
return writeTypeDefIncludeFile("all-gqlorm.d.ts.template");
|
|
308
309
|
};
|
|
310
|
+
const generateTypeDefRealtime = () => {
|
|
311
|
+
const paths = getPaths();
|
|
312
|
+
const typeDefPath = path.join(
|
|
313
|
+
paths.generated.types.includes,
|
|
314
|
+
"api-realtime.d.ts"
|
|
315
|
+
);
|
|
316
|
+
let packageJson;
|
|
317
|
+
try {
|
|
318
|
+
packageJson = JSON.parse(
|
|
319
|
+
fs.readFileSync(path.join(paths.api.base, "package.json"), "utf-8")
|
|
320
|
+
);
|
|
321
|
+
} catch {
|
|
322
|
+
fs.rmSync(typeDefPath, { force: true });
|
|
323
|
+
return [];
|
|
324
|
+
}
|
|
325
|
+
if (!packageJson.dependencies?.["@cedarjs/realtime"] && !packageJson.devDependencies?.["@cedarjs/realtime"]) {
|
|
326
|
+
fs.rmSync(typeDefPath, { force: true });
|
|
327
|
+
return [];
|
|
328
|
+
}
|
|
329
|
+
return writeTypeDefIncludeFile("api-realtime.d.ts.template");
|
|
330
|
+
};
|
|
309
331
|
const generateTypeDefScenarios = () => {
|
|
310
332
|
return writeTypeDefIncludeFile("api-scenarios.d.ts.template");
|
|
311
333
|
};
|
|
@@ -371,6 +393,7 @@ export {
|
|
|
371
393
|
generateTypeDefGlobImports,
|
|
372
394
|
generateTypeDefGlobalContext,
|
|
373
395
|
generateTypeDefGqlorm,
|
|
396
|
+
generateTypeDefRealtime,
|
|
374
397
|
generateTypeDefRouterPages,
|
|
375
398
|
generateTypeDefRouterRoutes,
|
|
376
399
|
generateTypeDefScenarios,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/internal",
|
|
3
|
-
"version": "8.0.0-canary.
|
|
3
|
+
"version": "8.0.0-canary.3532",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -120,14 +120,14 @@
|
|
|
120
120
|
"@babel/core": "^7.26.10",
|
|
121
121
|
"@babel/parser": "7.29.9",
|
|
122
122
|
"@babel/traverse": "7.29.10",
|
|
123
|
-
"@cedarjs/api": "8.0.0-canary.
|
|
124
|
-
"@cedarjs/babel-config": "8.0.0-canary.
|
|
125
|
-
"@cedarjs/cli-helpers": "8.0.0-canary.
|
|
126
|
-
"@cedarjs/graphql-server": "8.0.0-canary.
|
|
127
|
-
"@cedarjs/project-config": "8.0.0-canary.
|
|
128
|
-
"@cedarjs/router": "8.0.0-canary.
|
|
129
|
-
"@cedarjs/structure": "8.0.0-canary.
|
|
130
|
-
"@cedarjs/utils": "8.0.0-canary.
|
|
123
|
+
"@cedarjs/api": "8.0.0-canary.3532",
|
|
124
|
+
"@cedarjs/babel-config": "8.0.0-canary.3532",
|
|
125
|
+
"@cedarjs/cli-helpers": "8.0.0-canary.3532",
|
|
126
|
+
"@cedarjs/graphql-server": "8.0.0-canary.3532",
|
|
127
|
+
"@cedarjs/project-config": "8.0.0-canary.3532",
|
|
128
|
+
"@cedarjs/router": "8.0.0-canary.3532",
|
|
129
|
+
"@cedarjs/structure": "8.0.0-canary.3532",
|
|
130
|
+
"@cedarjs/utils": "8.0.0-canary.3532",
|
|
131
131
|
"@graphql-codegen/add": "6.0.1",
|
|
132
132
|
"@graphql-codegen/cli": "6.3.1",
|
|
133
133
|
"@graphql-codegen/client-preset": "5.3.0",
|
|
@@ -162,10 +162,10 @@
|
|
|
162
162
|
"tsconfig-paths": "4.2.0",
|
|
163
163
|
"typescript": "5.9.3",
|
|
164
164
|
"vite": "7.3.7",
|
|
165
|
-
"vite-tsconfig-paths": "
|
|
165
|
+
"vite-tsconfig-paths": "6.1.1"
|
|
166
166
|
},
|
|
167
167
|
"devDependencies": {
|
|
168
|
-
"@cedarjs/framework-tools": "8.0.0-canary.
|
|
168
|
+
"@cedarjs/framework-tools": "8.0.0-canary.3532",
|
|
169
169
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
170
170
|
"@oxc-project/types": "^0.155.0",
|
|
171
171
|
"concurrently": "9.2.5",
|