@cedarjs/internal 8.0.0-canary.3529 → 8.0.0-canary.3530

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.
@@ -34,6 +34,13 @@ declare module '@cedarjs/context' {
34
34
  }
35
35
  }
36
36
 
37
+ // When getCurrentUser() only throws, like it does in apps without auth,
38
+ // InferredLoggedInUser is never. An interface can't extend never, so
39
+ // LoggedInUser gets no fields in that case
40
+ type LoggedInUserFields = [InferredLoggedInUser] extends [never]
41
+ ? {}
42
+ : InferredLoggedInUser
43
+
37
44
  declare module '@cedarjs/auth' {
38
- interface LoggedInUser extends InferredLoggedInUser {}
45
+ interface LoggedInUser extends LoggedInUserFields {}
39
46
  }
@@ -1,9 +1,12 @@
1
- declare module 'src/services/**/*.{js,ts}'
2
- declare module 'src/directives/**/*.{js,ts}'
3
- declare module 'src/graphql/**/*.sdl.{js,ts}'
4
- declare module 'src/subscriptions/**/*.{js,ts}'
1
+ // Types for glob imports, like
2
+ // import services from 'src/services/**/*.{js,ts}'
3
+ // TypeScript allows at most one "*" in an ambient module name, so the "*"
4
+ // below stands in for the whole "**/*" part of the glob
5
+ declare module 'src/services/*.{js,ts}'
6
+ declare module 'src/directives/*.{js,ts}'
7
+ declare module 'src/graphql/*.sdl.{js,ts}'
8
+ declare module 'src/subscriptions/*.{js,ts}'
5
9
 
6
-
7
- declare module 'api/src/services/**/*.{js,ts}'
8
- declare module 'api/src/directives/**/*.{js,ts}'
9
- declare module 'api/src/graphql/**/*.sdl.{js,ts}'
10
+ declare module 'api/src/services/*.{js,ts}'
11
+ declare module 'api/src/directives/*.{js,ts}'
12
+ declare module 'api/src/graphql/*.sdl.{js,ts}'
@@ -1,7 +1,3 @@
1
- import type { GlobalContext } from "@cedarjs/context"
2
-
3
- export {}
4
-
5
- declare global {
6
- const context: GlobalContext
7
- }
1
+ // @cedarjs/context declares the global "context" variable. Importing it here
2
+ // makes that global available in all api side files
3
+ import '@cedarjs/context'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cedarjs/internal",
3
- "version": "8.0.0-canary.3529",
3
+ "version": "8.0.0-canary.3530",
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.3529",
124
- "@cedarjs/babel-config": "8.0.0-canary.3529",
125
- "@cedarjs/cli-helpers": "8.0.0-canary.3529",
126
- "@cedarjs/graphql-server": "8.0.0-canary.3529",
127
- "@cedarjs/project-config": "8.0.0-canary.3529",
128
- "@cedarjs/router": "8.0.0-canary.3529",
129
- "@cedarjs/structure": "8.0.0-canary.3529",
130
- "@cedarjs/utils": "8.0.0-canary.3529",
123
+ "@cedarjs/api": "8.0.0-canary.3530",
124
+ "@cedarjs/babel-config": "8.0.0-canary.3530",
125
+ "@cedarjs/cli-helpers": "8.0.0-canary.3530",
126
+ "@cedarjs/graphql-server": "8.0.0-canary.3530",
127
+ "@cedarjs/project-config": "8.0.0-canary.3530",
128
+ "@cedarjs/router": "8.0.0-canary.3530",
129
+ "@cedarjs/structure": "8.0.0-canary.3530",
130
+ "@cedarjs/utils": "8.0.0-canary.3530",
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",
@@ -165,7 +165,7 @@
165
165
  "vite-tsconfig-paths": "^6.1.1"
166
166
  },
167
167
  "devDependencies": {
168
- "@cedarjs/framework-tools": "8.0.0-canary.3529",
168
+ "@cedarjs/framework-tools": "8.0.0-canary.3530",
169
169
  "@jridgewell/trace-mapping": "0.3.31",
170
170
  "@oxc-project/types": "^0.155.0",
171
171
  "concurrently": "9.2.5",