@arcote.tech/arc-workspace 0.7.25 → 0.7.27
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcote.tech/arc-workspace",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.27",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Reusable workspace module for Arc framework — multi-workspace with dual token architecture",
|
|
7
7
|
"main": "./src/index.ts",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"type-check": "tsc --noEmit"
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
|
-
"@arcote.tech/arc": "^0.7.
|
|
14
|
-
"@arcote.tech/arc-auth": "^0.7.
|
|
13
|
+
"@arcote.tech/arc": "^0.7.27",
|
|
14
|
+
"@arcote.tech/arc-auth": "^0.7.27",
|
|
15
15
|
"typescript": "^5.0.0"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
@@ -175,7 +175,7 @@ export const createWorkspaceInvitationAggregate = <
|
|
|
175
175
|
});
|
|
176
176
|
|
|
177
177
|
// Generate workspace token for the new member
|
|
178
|
-
const wsToken = workspaceToken.generateJWT({
|
|
178
|
+
const wsToken = await workspaceToken.generateJWT({
|
|
179
179
|
accountId: ctx.$auth.params.accountId,
|
|
180
180
|
workspaceId: invitation.workspaceId,
|
|
181
181
|
role: invitation.role,
|
|
@@ -245,7 +245,7 @@ export const createWorkspaceMemberAggregate = <
|
|
|
245
245
|
return { error: "NOT_A_MEMBER" as const };
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
const token = workspaceToken.generateJWT({
|
|
248
|
+
const token = await workspaceToken.generateJWT({
|
|
249
249
|
accountId: member.accountId,
|
|
250
250
|
workspaceId: member.workspaceId,
|
|
251
251
|
role: member.role,
|
package/src/workspace-builder.ts
CHANGED
|
@@ -112,6 +112,9 @@ export function workspace<
|
|
|
112
112
|
WorkspaceMember,
|
|
113
113
|
WorkspaceInvitation,
|
|
114
114
|
config.types,
|
|
115
|
-
|
|
115
|
+
// `as const` → Elements jako krotka z LITERALNYMI nazwami elementów
|
|
116
|
+
// (jak `[Account] as const` w arc-auth). Bez tego `context.replace(name, …)`
|
|
117
|
+
// nie dopasowuje elementu po nazwie (np. `creatorWorkspaces` → adminStats).
|
|
118
|
+
[Workspace, WorkspaceMember, WorkspaceInvitation] as const,
|
|
116
119
|
);
|
|
117
120
|
}
|