@cedarjs/router 8.0.0-canary.3538 → 8.0.0-canary.3539
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/Set.d.ts +18 -6
- package/dist/Set.d.ts.map +1 -1
- package/package.json +6 -6
package/dist/Set.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { ComponentType, ReactElement, ReactNode } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import type { AuthTenancy } from '@cedarjs/auth' with {
|
|
4
|
+
'resolution-mode': 'import'
|
|
5
|
+
};
|
|
3
6
|
/**
|
|
4
7
|
* The props `<Set>` gives each component in its `wrap` prop: the wrapped
|
|
5
8
|
* routes as `children`, and nothing else
|
|
@@ -22,7 +25,21 @@ export interface WrapperProps {
|
|
|
22
25
|
* <Set wrap={PostsScaffoldLayout}>
|
|
23
26
|
*/
|
|
24
27
|
export type WrapperType = ComponentType<WrapperProps>;
|
|
25
|
-
|
|
28
|
+
/**
|
|
29
|
+
* The `roles` prop, which an app with tenancy doesn't have (see
|
|
30
|
+
* `AuthTenancy`): there, every role check says which kind it is.
|
|
31
|
+
*/
|
|
32
|
+
type SetRoles = AuthTenancy extends {
|
|
33
|
+
enabled: true;
|
|
34
|
+
} ? Record<never, never> : {
|
|
35
|
+
/**
|
|
36
|
+
* Route is permitted when authenticated and user has any of the
|
|
37
|
+
* provided roles such as "admin" or ["admin", "editor"], in
|
|
38
|
+
* `currentUser.roles`
|
|
39
|
+
*/
|
|
40
|
+
roles?: string | string[];
|
|
41
|
+
};
|
|
42
|
+
interface SetProps extends SetRoles {
|
|
26
43
|
/**
|
|
27
44
|
* Components to wrap all routes in this set with, like layouts. The first
|
|
28
45
|
* one in an array is the outermost one.
|
|
@@ -44,11 +61,6 @@ interface SetProps {
|
|
|
44
61
|
* @deprecated Please use `<PrivateSet>` instead and specify this prop there
|
|
45
62
|
*/
|
|
46
63
|
unauthenticated?: string;
|
|
47
|
-
/**
|
|
48
|
-
* Route is permitted when authenticated and user has any of the provided
|
|
49
|
-
* roles such as "admin" or ["admin", "editor"]
|
|
50
|
-
*/
|
|
51
|
-
roles?: string | string[];
|
|
52
64
|
/** Prerender all pages in the set */
|
|
53
65
|
prerender?: boolean;
|
|
54
66
|
children: ReactNode;
|
package/dist/Set.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Set.d.ts","sourceRoot":"","sources":["../src/Set.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACnE,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC,YAAY,CAAC,CAAA;AAErD,UAAU,QAAQ;
|
|
1
|
+
{"version":3,"file":"Set.d.ts","sourceRoot":"","sources":["../src/Set.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACnE,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;IAC/C,iBAAiB,EAAE,QAAQ;CAC5B,CAAA;AAED;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,SAAS,CAAA;CACpB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC,YAAY,CAAC,CAAA;AAErD;;;GAGG;AACH,KAAK,QAAQ,GAAG,WAAW,SAAS;IAAE,OAAO,EAAE,IAAI,CAAA;CAAE,GACjD,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,GACpB;IACE;;;;OAIG;IACH,KAAK,CAAC,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}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/router",
|
|
3
|
-
"version": "8.0.0-canary.
|
|
3
|
+
"version": "8.0.0-canary.3539",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -52,15 +52,15 @@
|
|
|
52
52
|
"test:watch": "vitest watch"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@cedarjs/project-config": "8.0.0-canary.
|
|
56
|
-
"@cedarjs/server-store": "8.0.0-canary.
|
|
55
|
+
"@cedarjs/project-config": "8.0.0-canary.3539",
|
|
56
|
+
"@cedarjs/server-store": "8.0.0-canary.3539",
|
|
57
57
|
"react-server-dom-webpack": "19.3.1",
|
|
58
58
|
"ts-toolbelt": "9.6.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@arethetypeswrong/cli": "0.18.5",
|
|
62
|
-
"@cedarjs/auth": "8.0.0-canary.
|
|
63
|
-
"@cedarjs/framework-tools": "8.0.0-canary.
|
|
62
|
+
"@cedarjs/auth": "8.0.0-canary.3539",
|
|
63
|
+
"@cedarjs/framework-tools": "8.0.0-canary.3539",
|
|
64
64
|
"@testing-library/jest-dom": "6.9.1",
|
|
65
65
|
"@types/react": "^19.2.0",
|
|
66
66
|
"@types/react-dom": "^19.2.0",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"vitest": "4.1.12"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@cedarjs/auth": "8.0.0-canary.
|
|
77
|
+
"@cedarjs/auth": "8.0.0-canary.3539",
|
|
78
78
|
"react": "19.3.1",
|
|
79
79
|
"react-dom": "19.3.1"
|
|
80
80
|
},
|