@byline/host-tanstack-start 3.21.0 → 4.1.0
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/admin-shell/admin-activity/list.js +15 -5
- package/dist/admin-shell/admin-roles/delete.js +2 -1
- package/dist/admin-shell/admin-roles/list.js +2 -1
- package/dist/admin-shell/admin-users/delete.js +2 -1
- package/dist/admin-shell/admin-users/list.js +4 -7
- package/dist/admin-shell/chrome/admin-app-bar.js +2 -1
- package/dist/admin-shell/chrome/admin-menu-drawer.js +9 -8
- package/dist/admin-shell/chrome/admin-menu-provider.js +2 -1
- package/dist/admin-shell/chrome/dashboard.js +4 -3
- package/dist/admin-shell/chrome/sign-in-page.d.ts +2 -2
- package/dist/admin-shell/chrome/sign-in-page.js +2 -2
- package/dist/admin-shell/collections/create.js +4 -3
- package/dist/admin-shell/collections/document-history.js +6 -1
- package/dist/admin-shell/collections/edit.js +18 -14
- package/dist/admin-shell/collections/history.js +5 -4
- package/dist/admin-shell/collections/list.js +8 -7
- package/dist/admin-shell/collections/restore-version-modal.js +2 -1
- package/dist/admin-shell/collections/tree-list.js +53 -17
- package/dist/admin-shell/collections/view-menu.js +9 -8
- package/dist/i18n/resolve-locale.js +1 -1
- package/dist/index.d.ts +5 -6
- package/dist/integrations/abilities.js +8 -7
- package/dist/integrations/host-bridge.d.ts +13 -0
- package/dist/integrations/host-bridge.js +22 -0
- package/dist/integrations/serve-uploads.d.ts +1 -0
- package/dist/integrations/serve-uploads.js +1 -0
- package/dist/integrations/start-errors.js +2 -1
- package/dist/routes/admin-path.d.ts +22 -0
- package/dist/routes/admin-path.js +35 -0
- package/dist/routes/create-admin-account-route.js +3 -2
- package/dist/routes/create-admin-activity-route.js +3 -2
- package/dist/routes/create-admin-dashboard-route.js +2 -1
- package/dist/routes/create-admin-layout-route.d.ts +1 -1
- package/dist/routes/create-admin-layout-route.js +3 -1
- package/dist/routes/create-admin-permissions-route.js +3 -2
- package/dist/routes/create-admin-role-edit-route.js +4 -3
- package/dist/routes/create-admin-roles-list-route.js +3 -2
- package/dist/routes/create-admin-user-edit-route.js +4 -3
- package/dist/routes/create-admin-users-list-route.js +3 -2
- package/dist/routes/create-collection-api-route.js +5 -4
- package/dist/routes/create-collection-create-route.js +4 -3
- package/dist/routes/create-collection-edit-route.js +4 -3
- package/dist/routes/create-collection-history-route.js +5 -4
- package/dist/routes/create-collection-list-route.js +3 -2
- package/dist/routes/create-sign-in-route.js +3 -2
- package/dist/routes/index.d.ts +3 -0
- package/dist/routes/index.js +2 -0
- package/dist/routes/sign-in-path.d.ts +13 -0
- package/dist/routes/sign-in-path.js +19 -0
- package/dist/server-fns/admin-account/change-password.js +1 -1
- package/dist/server-fns/admin-account/get.js +1 -1
- package/dist/server-fns/admin-account/update.js +1 -1
- package/dist/server-fns/admin-activity/get.js +1 -1
- package/dist/server-fns/admin-permissions/get-role-abilities.js +1 -1
- package/dist/server-fns/admin-permissions/list-registered.js +1 -1
- package/dist/server-fns/admin-permissions/set-role-abilities.js +1 -1
- package/dist/server-fns/admin-permissions/who-has.js +1 -1
- package/dist/server-fns/admin-roles/create.js +1 -1
- package/dist/server-fns/admin-roles/delete.js +1 -1
- package/dist/server-fns/admin-roles/get.js +1 -1
- package/dist/server-fns/admin-roles/list.js +1 -1
- package/dist/server-fns/admin-roles/reorder.js +1 -1
- package/dist/server-fns/admin-roles/update.js +1 -1
- package/dist/server-fns/admin-users/create.js +1 -1
- package/dist/server-fns/admin-users/delete.js +1 -1
- package/dist/server-fns/admin-users/disable.js +1 -1
- package/dist/server-fns/admin-users/enable.js +1 -1
- package/dist/server-fns/admin-users/get-user-roles.js +1 -1
- package/dist/server-fns/admin-users/get.js +1 -1
- package/dist/server-fns/admin-users/list.js +1 -1
- package/dist/server-fns/admin-users/set-password.js +1 -1
- package/dist/server-fns/admin-users/set-user-roles.js +1 -1
- package/dist/server-fns/admin-users/update.js +1 -1
- package/dist/server-fns/ai/execute.js +1 -1
- package/dist/server-fns/auth/current-user.js +1 -1
- package/dist/server-fns/auth/sign-in.js +1 -1
- package/dist/server-fns/auth/sign-out.js +1 -2
- package/dist/server-fns/collections/audit.js +1 -1
- package/dist/server-fns/collections/copy-to-locale.js +1 -1
- package/dist/server-fns/collections/create.js +1 -1
- package/dist/server-fns/collections/delete-locale.js +1 -1
- package/dist/server-fns/collections/delete-outcome.d.ts +30 -0
- package/dist/server-fns/collections/delete-outcome.js +34 -0
- package/dist/server-fns/collections/delete.d.ts +1 -4
- package/dist/server-fns/collections/delete.js +3 -5
- package/dist/server-fns/collections/duplicate.js +1 -1
- package/dist/server-fns/collections/get.js +1 -1
- package/dist/server-fns/collections/history.js +1 -1
- package/dist/server-fns/collections/index.d.ts +1 -0
- package/dist/server-fns/collections/index.js +1 -0
- package/dist/server-fns/collections/list.js +1 -1
- package/dist/server-fns/collections/reindex.js +1 -1
- package/dist/server-fns/collections/reorder.js +1 -1
- package/dist/server-fns/collections/restore-version.js +1 -1
- package/dist/server-fns/collections/stats.js +1 -1
- package/dist/server-fns/collections/status.js +1 -1
- package/dist/server-fns/collections/tree-mutation.d.ts +46 -0
- package/dist/server-fns/collections/tree-mutation.js +109 -0
- package/dist/server-fns/collections/tree-read.d.ts +6 -0
- package/dist/server-fns/collections/tree-read.js +15 -0
- package/dist/server-fns/collections/tree.d.ts +5 -4
- package/dist/server-fns/collections/tree.js +16 -13
- package/dist/server-fns/collections/update.js +3 -2
- package/dist/server-fns/collections/upload.js +1 -1
- package/dist/server-fns/i18n/set-locale.js +1 -1
- package/dist/server-fns/preview/disable.js +1 -1
- package/dist/server-fns/preview/enable.js +1 -2
- package/dist/server-fns/preview/state.js +1 -1
- package/dist/vite/client-hook-boundary.d.ts +19 -0
- package/dist/vite/client-hook-boundary.js +20 -0
- package/dist/{integrations/byline-public-client.d.ts → vite/index.d.ts} +1 -2
- package/dist/vite/index.js +1 -0
- package/package.json +15 -14
- package/src/admin-shell/admin-activity/list.tsx +13 -3
- package/src/admin-shell/admin-roles/delete.tsx +2 -1
- package/src/admin-shell/admin-roles/list.tsx +2 -1
- package/src/admin-shell/admin-users/delete.tsx +3 -2
- package/src/admin-shell/admin-users/list.tsx +9 -8
- package/src/admin-shell/chrome/admin-app-bar.tsx +2 -1
- package/src/admin-shell/chrome/admin-menu-drawer.tsx +13 -8
- package/src/admin-shell/chrome/admin-menu-provider.tsx +2 -1
- package/src/admin-shell/chrome/dashboard.tsx +4 -3
- package/src/admin-shell/chrome/sign-in-page.tsx +3 -3
- package/src/admin-shell/collections/create.tsx +4 -3
- package/src/admin-shell/collections/document-history.tsx +5 -0
- package/src/admin-shell/collections/edit.tsx +20 -13
- package/src/admin-shell/collections/history.tsx +6 -5
- package/src/admin-shell/collections/list.tsx +8 -7
- package/src/admin-shell/collections/restore-version-modal.tsx +2 -1
- package/src/admin-shell/collections/tree-list.tsx +78 -22
- package/src/admin-shell/collections/view-menu.tsx +9 -8
- package/src/i18n/resolve-locale.ts +1 -1
- package/src/index.ts +5 -6
- package/src/integrations/abilities.tsx +14 -4
- package/src/integrations/host-bridge.ts +56 -0
- package/src/integrations/serve-uploads.ts +6 -0
- package/src/integrations/start-errors.test.node.ts +22 -0
- package/src/integrations/start-errors.ts +1 -0
- package/src/routes/admin-path.test.node.ts +129 -0
- package/src/routes/admin-path.ts +66 -0
- package/src/routes/auth-routes.test.node.ts +39 -0
- package/src/routes/create-admin-account-route.tsx +3 -2
- package/src/routes/create-admin-activity-route.tsx +3 -2
- package/src/routes/create-admin-dashboard-route.tsx +2 -1
- package/src/routes/create-admin-layout-route.tsx +4 -4
- package/src/routes/create-admin-permissions-route.tsx +3 -2
- package/src/routes/create-admin-role-edit-route.tsx +7 -3
- package/src/routes/create-admin-roles-list-route.tsx +3 -2
- package/src/routes/create-admin-user-edit-route.tsx +7 -3
- package/src/routes/create-admin-users-list-route.tsx +3 -2
- package/src/routes/create-collection-api-route.tsx +8 -4
- package/src/routes/create-collection-create-route.tsx +7 -3
- package/src/routes/create-collection-edit-route.tsx +7 -3
- package/src/routes/create-collection-history-route.tsx +8 -4
- package/src/routes/create-collection-list-route.tsx +3 -2
- package/src/routes/create-sign-in-route.tsx +9 -3
- package/src/routes/index.ts +11 -0
- package/src/routes/sign-in-path.test.node.ts +79 -0
- package/src/routes/sign-in-path.ts +36 -0
- package/src/server-fns/admin-account/change-password.ts +1 -1
- package/src/server-fns/admin-account/get.ts +1 -1
- package/src/server-fns/admin-account/update.ts +1 -1
- package/src/server-fns/admin-activity/get.ts +1 -1
- package/src/server-fns/admin-permissions/get-role-abilities.ts +1 -1
- package/src/server-fns/admin-permissions/list-registered.ts +1 -1
- package/src/server-fns/admin-permissions/set-role-abilities.ts +1 -1
- package/src/server-fns/admin-permissions/who-has.ts +1 -1
- package/src/server-fns/admin-roles/create.ts +1 -1
- package/src/server-fns/admin-roles/delete.ts +1 -1
- package/src/server-fns/admin-roles/get.ts +1 -1
- package/src/server-fns/admin-roles/list.ts +1 -1
- package/src/server-fns/admin-roles/reorder.ts +1 -1
- package/src/server-fns/admin-roles/update.ts +1 -1
- package/src/server-fns/admin-users/create.ts +1 -1
- package/src/server-fns/admin-users/delete.ts +1 -1
- package/src/server-fns/admin-users/disable.ts +1 -1
- package/src/server-fns/admin-users/enable.ts +1 -1
- package/src/server-fns/admin-users/get-user-roles.ts +1 -1
- package/src/server-fns/admin-users/get.ts +1 -1
- package/src/server-fns/admin-users/list.ts +1 -1
- package/src/server-fns/admin-users/set-password.ts +1 -1
- package/src/server-fns/admin-users/set-user-roles.ts +1 -1
- package/src/server-fns/admin-users/update.ts +1 -1
- package/src/server-fns/ai/execute.ts +1 -2
- package/src/server-fns/auth/current-user.ts +1 -1
- package/src/server-fns/auth/sign-in.ts +1 -1
- package/src/server-fns/auth/sign-out.ts +5 -3
- package/src/server-fns/collections/audit.ts +1 -1
- package/src/server-fns/collections/copy-to-locale.ts +1 -1
- package/src/server-fns/collections/create.ts +1 -1
- package/src/server-fns/collections/delete-locale.ts +1 -1
- package/src/server-fns/collections/delete-outcome.test.node.ts +72 -0
- package/src/server-fns/collections/delete-outcome.ts +80 -0
- package/src/server-fns/collections/delete.ts +3 -2
- package/src/server-fns/collections/duplicate.ts +1 -1
- package/src/server-fns/collections/get.ts +3 -1
- package/src/server-fns/collections/history.ts +1 -1
- package/src/server-fns/collections/index.ts +1 -0
- package/src/server-fns/collections/list.ts +1 -1
- package/src/server-fns/collections/reindex.ts +1 -1
- package/src/server-fns/collections/reorder.ts +1 -1
- package/src/server-fns/collections/restore-version.ts +1 -1
- package/src/server-fns/collections/stats.ts +2 -1
- package/src/server-fns/collections/status.ts +1 -1
- package/src/server-fns/collections/tree-mutation.test.node.ts +225 -0
- package/src/server-fns/collections/tree-mutation.ts +165 -0
- package/src/server-fns/collections/tree-read.test.node.ts +46 -0
- package/src/server-fns/collections/tree-read.ts +26 -0
- package/src/server-fns/collections/tree.ts +27 -11
- package/src/server-fns/collections/update.ts +4 -1
- package/src/server-fns/collections/upload.ts +1 -1
- package/src/server-fns/i18n/set-locale.ts +1 -1
- package/src/server-fns/preview/disable.ts +1 -1
- package/src/server-fns/preview/enable.ts +1 -2
- package/src/server-fns/preview/state.ts +1 -1
- package/src/vite/client-hook-boundary.test.node.ts +50 -0
- package/src/vite/client-hook-boundary.ts +45 -0
- package/src/vite/index.ts +9 -0
- package/dist/auth/auth-context.d.ts +0 -37
- package/dist/auth/auth-context.js +0 -57
- package/dist/auth/auth-cookies.d.ts +0 -34
- package/dist/auth/auth-cookies.js +0 -46
- package/dist/auth/preview-cookies.d.ts +0 -19
- package/dist/auth/preview-cookies.js +0 -26
- package/dist/integrations/byline-client.d.ts +0 -24
- package/dist/integrations/byline-client.js +0 -25
- package/dist/integrations/byline-public-client.js +0 -15
- package/dist/integrations/byline-viewer-client.d.ts +0 -20
- package/dist/integrations/byline-viewer-client.js +0 -39
- package/src/auth/auth-context.test.node.ts +0 -215
- package/src/auth/auth-context.ts +0 -124
- package/src/auth/auth-cookies.ts +0 -113
- package/src/auth/preview-cookies.ts +0 -73
- package/src/integrations/byline-client.ts +0 -66
- package/src/integrations/byline-public-client.ts +0 -53
- package/src/integrations/byline-viewer-client.ts +0 -99
|
@@ -6,6 +6,7 @@ import { RoleContainer } from "../admin-shell/admin-roles/container.js";
|
|
|
6
6
|
import { BreadcrumbsClient } from "../admin-shell/chrome/breadcrumbs/breadcrumbs-client.js";
|
|
7
7
|
import { getRoleAbilities, listRegisteredAbilities } from "../server-fns/admin-permissions/index.js";
|
|
8
8
|
import { getAdminRole } from "../server-fns/admin-roles/index.js";
|
|
9
|
+
import { getAdminRoutePath } from "./admin-path.js";
|
|
9
10
|
function createAdminRoleEditRoute(path) {
|
|
10
11
|
const Route = createFileRoute(path)({
|
|
11
12
|
loader: async ({ params })=>{
|
|
@@ -42,15 +43,15 @@ function createAdminRoleEditRoute(path) {
|
|
|
42
43
|
breadcrumbs: [
|
|
43
44
|
{
|
|
44
45
|
label: t('chrome.menu.dashboard'),
|
|
45
|
-
href:
|
|
46
|
+
href: getAdminRoutePath()
|
|
46
47
|
},
|
|
47
48
|
{
|
|
48
49
|
label: t('chrome.menu.adminRoles'),
|
|
49
|
-
href: '
|
|
50
|
+
href: getAdminRoutePath('roles')
|
|
50
51
|
},
|
|
51
52
|
{
|
|
52
53
|
label: t('adminRoles.breadcrumbDetail'),
|
|
53
|
-
href:
|
|
54
|
+
href: getAdminRoutePath('roles', role.id)
|
|
54
55
|
}
|
|
55
56
|
]
|
|
56
57
|
}),
|
|
@@ -4,6 +4,7 @@ import { useTranslation } from "@byline/i18n/react";
|
|
|
4
4
|
import { AdminRolesListView } from "../admin-shell/admin-roles/list.js";
|
|
5
5
|
import { BreadcrumbsClient } from "../admin-shell/chrome/breadcrumbs/breadcrumbs-client.js";
|
|
6
6
|
import { listAdminRoles } from "../server-fns/admin-roles/index.js";
|
|
7
|
+
import { getAdminRoutePath } from "./admin-path.js";
|
|
7
8
|
function createAdminRolesListRoute(path) {
|
|
8
9
|
const Route = createFileRoute(path)({
|
|
9
10
|
loader: async ()=>{
|
|
@@ -21,11 +22,11 @@ function createAdminRolesListRoute(path) {
|
|
|
21
22
|
breadcrumbs: [
|
|
22
23
|
{
|
|
23
24
|
label: t('chrome.menu.dashboard'),
|
|
24
|
-
href:
|
|
25
|
+
href: getAdminRoutePath()
|
|
25
26
|
},
|
|
26
27
|
{
|
|
27
28
|
label: t('chrome.menu.adminRoles'),
|
|
28
|
-
href: '
|
|
29
|
+
href: getAdminRoutePath('roles')
|
|
29
30
|
}
|
|
30
31
|
]
|
|
31
32
|
}),
|
|
@@ -6,6 +6,7 @@ import { AccountContainer } from "../admin-shell/admin-users/container.js";
|
|
|
6
6
|
import { BreadcrumbsClient } from "../admin-shell/chrome/breadcrumbs/breadcrumbs-client.js";
|
|
7
7
|
import { listAdminRoles } from "../server-fns/admin-roles/index.js";
|
|
8
8
|
import { getAdminUser, getUserRoles } from "../server-fns/admin-users/index.js";
|
|
9
|
+
import { getAdminRoutePath } from "./admin-path.js";
|
|
9
10
|
function displayNameFor(user) {
|
|
10
11
|
const parts = [
|
|
11
12
|
user.given_name,
|
|
@@ -49,15 +50,15 @@ function createAdminUserEditRoute(path) {
|
|
|
49
50
|
breadcrumbs: [
|
|
50
51
|
{
|
|
51
52
|
label: t('chrome.menu.dashboard'),
|
|
52
|
-
href:
|
|
53
|
+
href: getAdminRoutePath()
|
|
53
54
|
},
|
|
54
55
|
{
|
|
55
56
|
label: t('chrome.menu.adminUsers'),
|
|
56
|
-
href: '
|
|
57
|
+
href: getAdminRoutePath('users')
|
|
57
58
|
},
|
|
58
59
|
{
|
|
59
60
|
label: t('adminUsers.breadcrumbDetail'),
|
|
60
|
-
href:
|
|
61
|
+
href: getAdminRoutePath('users', user.id)
|
|
61
62
|
}
|
|
62
63
|
]
|
|
63
64
|
}),
|
|
@@ -5,6 +5,7 @@ import { z } from "zod";
|
|
|
5
5
|
import { AdminUsersListView } from "../admin-shell/admin-users/list.js";
|
|
6
6
|
import { BreadcrumbsClient } from "../admin-shell/chrome/breadcrumbs/breadcrumbs-client.js";
|
|
7
7
|
import { listAdminUsers } from "../server-fns/admin-users/index.js";
|
|
8
|
+
import { getAdminRoutePath } from "./admin-path.js";
|
|
8
9
|
const orderSchema = z["enum"]([
|
|
9
10
|
'given_name',
|
|
10
11
|
'family_name',
|
|
@@ -53,11 +54,11 @@ function createAdminUsersListRoute(path) {
|
|
|
53
54
|
breadcrumbs: [
|
|
54
55
|
{
|
|
55
56
|
label: t('chrome.menu.dashboard'),
|
|
56
|
-
href:
|
|
57
|
+
href: getAdminRoutePath()
|
|
57
58
|
},
|
|
58
59
|
{
|
|
59
60
|
label: t('chrome.menu.adminUsers'),
|
|
60
|
-
href: '
|
|
61
|
+
href: getAdminRoutePath('users')
|
|
61
62
|
}
|
|
62
63
|
]
|
|
63
64
|
}),
|
|
@@ -6,6 +6,7 @@ import { z } from "zod";
|
|
|
6
6
|
import { BreadcrumbsClient } from "../admin-shell/chrome/breadcrumbs/breadcrumbs-client.js";
|
|
7
7
|
import { ApiView } from "../admin-shell/collections/api.js";
|
|
8
8
|
import { getCollectionDocument } from "../server-fns/collections/index.js";
|
|
9
|
+
import { getAdminRoutePath } from "./admin-path.js";
|
|
9
10
|
import { getContentLocaleRouteConfig } from "./get-content-locale-route-config.js";
|
|
10
11
|
const searchSchema = z.object({
|
|
11
12
|
locale: z.string().optional(),
|
|
@@ -43,19 +44,19 @@ function createCollectionApiRoute(path) {
|
|
|
43
44
|
breadcrumbs: [
|
|
44
45
|
{
|
|
45
46
|
label: t('chrome.menu.dashboard'),
|
|
46
|
-
href:
|
|
47
|
+
href: getAdminRoutePath()
|
|
47
48
|
},
|
|
48
49
|
{
|
|
49
50
|
label: collectionDef.labels.plural,
|
|
50
|
-
href:
|
|
51
|
+
href: getAdminRoutePath('collections', collection)
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
54
|
label: t('common.actions.edit'),
|
|
54
|
-
href:
|
|
55
|
+
href: getAdminRoutePath('collections', collection, id)
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
58
|
label: t('collections.viewMenu.apiButton'),
|
|
58
|
-
href:
|
|
59
|
+
href: getAdminRoutePath('collections', collection, id, 'api')
|
|
59
60
|
}
|
|
60
61
|
]
|
|
61
62
|
}),
|
|
@@ -4,6 +4,7 @@ import { buildInitialDataFromFields, getCollectionAdminConfig, getCollectionDefi
|
|
|
4
4
|
import { useTranslation } from "@byline/i18n/react";
|
|
5
5
|
import { BreadcrumbsClient } from "../admin-shell/chrome/breadcrumbs/breadcrumbs-client.js";
|
|
6
6
|
import { CreateView } from "../admin-shell/collections/create.js";
|
|
7
|
+
import { getAdminRoutePath } from "./admin-path.js";
|
|
7
8
|
function createCollectionCreateRoute(path) {
|
|
8
9
|
const Route = createFileRoute(path)({
|
|
9
10
|
loader: async ({ params })=>{
|
|
@@ -29,15 +30,15 @@ function createCollectionCreateRoute(path) {
|
|
|
29
30
|
breadcrumbs: [
|
|
30
31
|
{
|
|
31
32
|
label: t('chrome.menu.dashboard'),
|
|
32
|
-
href:
|
|
33
|
+
href: getAdminRoutePath()
|
|
33
34
|
},
|
|
34
35
|
{
|
|
35
36
|
label: collectionDef.labels.plural,
|
|
36
|
-
href:
|
|
37
|
+
href: getAdminRoutePath('collections', collection)
|
|
37
38
|
},
|
|
38
39
|
{
|
|
39
40
|
label: t('collections.breadcrumbs.create'),
|
|
40
|
-
href:
|
|
41
|
+
href: getAdminRoutePath('collections', collection, 'create')
|
|
41
42
|
}
|
|
42
43
|
]
|
|
43
44
|
}),
|
|
@@ -9,6 +9,7 @@ import { BreadcrumbsClient } from "../admin-shell/chrome/breadcrumbs/breadcrumbs
|
|
|
9
9
|
import { useNavigate } from "../admin-shell/chrome/loose-router.js";
|
|
10
10
|
import { EditView } from "../admin-shell/collections/edit.js";
|
|
11
11
|
import { getCollectionDocument } from "../server-fns/collections/index.js";
|
|
12
|
+
import { getAdminRoutePath } from "./admin-path.js";
|
|
12
13
|
import { getContentLocaleRouteConfig } from "./get-content-locale-route-config.js";
|
|
13
14
|
const searchSchema = z.object({
|
|
14
15
|
locale: z.string().optional(),
|
|
@@ -86,15 +87,15 @@ function createCollectionEditRoute(path) {
|
|
|
86
87
|
breadcrumbs: [
|
|
87
88
|
{
|
|
88
89
|
label: t('chrome.menu.dashboard'),
|
|
89
|
-
href:
|
|
90
|
+
href: getAdminRoutePath()
|
|
90
91
|
},
|
|
91
92
|
{
|
|
92
93
|
label: collectionDef.labels.plural,
|
|
93
|
-
href:
|
|
94
|
+
href: getAdminRoutePath('collections', collection)
|
|
94
95
|
},
|
|
95
96
|
{
|
|
96
97
|
label: t('common.actions.edit'),
|
|
97
|
-
href:
|
|
98
|
+
href: getAdminRoutePath('collections', collection, id)
|
|
98
99
|
}
|
|
99
100
|
]
|
|
100
101
|
}),
|
|
@@ -6,6 +6,7 @@ import { z } from "zod";
|
|
|
6
6
|
import { BreadcrumbsClient } from "../admin-shell/chrome/breadcrumbs/breadcrumbs-client.js";
|
|
7
7
|
import { HistoryView } from "../admin-shell/collections/history.js";
|
|
8
8
|
import { getCollectionDocument, getCollectionDocumentAuditLog, getCollectionDocumentHistory } from "../server-fns/collections/index.js";
|
|
9
|
+
import { getAdminRoutePath } from "./admin-path.js";
|
|
9
10
|
import { getContentLocaleRouteConfig } from "./get-content-locale-route-config.js";
|
|
10
11
|
const searchSchema = z.object({
|
|
11
12
|
page: z.coerce.number().min(1).optional(),
|
|
@@ -80,19 +81,19 @@ function createCollectionHistoryRoute(path) {
|
|
|
80
81
|
breadcrumbs: [
|
|
81
82
|
{
|
|
82
83
|
label: t('chrome.menu.dashboard'),
|
|
83
|
-
href:
|
|
84
|
+
href: getAdminRoutePath()
|
|
84
85
|
},
|
|
85
86
|
{
|
|
86
87
|
label: collectionDef.labels.plural,
|
|
87
|
-
href:
|
|
88
|
+
href: getAdminRoutePath('collections', collection)
|
|
88
89
|
},
|
|
89
90
|
{
|
|
90
91
|
label: t('common.actions.edit'),
|
|
91
|
-
href:
|
|
92
|
+
href: getAdminRoutePath('collections', collection, Route.useParams().id)
|
|
92
93
|
},
|
|
93
94
|
{
|
|
94
95
|
label: t('collections.breadcrumbs.history'),
|
|
95
|
-
href:
|
|
96
|
+
href: getAdminRoutePath('collections', collection, Route.useParams().id, 'history')
|
|
96
97
|
}
|
|
97
98
|
]
|
|
98
99
|
}),
|
|
@@ -11,6 +11,7 @@ import { useNavigate } from "../admin-shell/chrome/loose-router.js";
|
|
|
11
11
|
import { ListView } from "../admin-shell/collections/list.js";
|
|
12
12
|
import { TreeListView } from "../admin-shell/collections/tree-list.js";
|
|
13
13
|
import { getCollectionDocuments, getCollectionTree, placeTreeNode, reorderCollectionDocument } from "../server-fns/collections/index.js";
|
|
14
|
+
import { getAdminRoutePath } from "./admin-path.js";
|
|
14
15
|
const searchSchema = z.object({
|
|
15
16
|
page: z.coerce.number().min(1).optional(),
|
|
16
17
|
page_size: z.coerce.number().max(100).optional(),
|
|
@@ -118,11 +119,11 @@ function createCollectionListRoute(path) {
|
|
|
118
119
|
breadcrumbs: [
|
|
119
120
|
{
|
|
120
121
|
label: t('chrome.menu.dashboard'),
|
|
121
|
-
href:
|
|
122
|
+
href: getAdminRoutePath()
|
|
122
123
|
},
|
|
123
124
|
{
|
|
124
125
|
label: data.included.collection.labels.plural,
|
|
125
|
-
href:
|
|
126
|
+
href: getAdminRoutePath('collections', collection)
|
|
126
127
|
}
|
|
127
128
|
]
|
|
128
129
|
}),
|
|
@@ -2,10 +2,11 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { createFileRoute } from "@tanstack/react-router";
|
|
3
3
|
import { SignInPage } from "../admin-shell/chrome/sign-in-page.js";
|
|
4
4
|
import { getActiveLocaleFn } from "../server-fns/i18n/index.js";
|
|
5
|
+
import { resolveAdminCallbackPath, resolveAdminSignInRedirect } from "./admin-path.js";
|
|
5
6
|
function createSignInRoute(path) {
|
|
6
7
|
const Route = createFileRoute(path)({
|
|
7
8
|
validateSearch: (search)=>{
|
|
8
|
-
const callbackUrl =
|
|
9
|
+
const callbackUrl = resolveAdminCallbackPath(search.callbackUrl);
|
|
9
10
|
return {
|
|
10
11
|
callbackUrl
|
|
11
12
|
};
|
|
@@ -20,7 +21,7 @@ function createSignInRoute(path) {
|
|
|
20
21
|
const { callbackUrl } = Route.useSearch();
|
|
21
22
|
const { activeLocale } = Route.useRouteContext();
|
|
22
23
|
return /*#__PURE__*/ jsx(SignInPage, {
|
|
23
|
-
|
|
24
|
+
redirectTo: resolveAdminSignInRedirect(callbackUrl),
|
|
24
25
|
activeLocale: activeLocale
|
|
25
26
|
});
|
|
26
27
|
}
|
package/dist/routes/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
*
|
|
6
6
|
* Copyright (c) Infonomic Company Limited
|
|
7
7
|
*/
|
|
8
|
+
export { getAdminRouteId, getAdminRoutePath, isAdminRoutePathActive, isRoutePathWithin, resolveAdminCallbackPath, resolveAdminSignInRedirect, } from './admin-path.js';
|
|
9
|
+
export { configureSignInRoutePath, getSignInRoutePath } from './sign-in-path.js';
|
|
8
10
|
/**
|
|
9
11
|
* Route factories for the Byline admin UI on TanStack Start.
|
|
10
12
|
*
|
|
@@ -13,6 +15,7 @@
|
|
|
13
15
|
* `createFileRoute(path)({...})`. The host's route file collapses to:
|
|
14
16
|
*
|
|
15
17
|
* import { createCollectionListRoute } from '@byline/host-tanstack-start/routes'
|
|
18
|
+
* // Default admin mount example:
|
|
16
19
|
* export const Route = createCollectionListRoute('/_byline/admin/collections/$collection/')
|
|
17
20
|
*
|
|
18
21
|
* Routes that need host-specific data (i18n bridge component, content
|
package/dist/routes/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { getAdminRouteId, getAdminRoutePath, isAdminRoutePathActive, isRoutePathWithin, resolveAdminCallbackPath, resolveAdminSignInRedirect } from "./admin-path.js";
|
|
2
|
+
export { configureSignInRoutePath, getSignInRoutePath } from "./sign-in-path.js";
|
|
1
3
|
export { createAdminAccountRoute } from "./create-admin-account-route.js";
|
|
2
4
|
export { createAdminActivityRoute } from "./create-admin-activity-route.js";
|
|
3
5
|
export { createAdminDashboardRoute } from "./create-admin-dashboard-route.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This Source Code is subject to the terms of the Mozilla Public
|
|
3
|
+
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
4
|
+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) Infonomic Company Limited
|
|
7
|
+
*/
|
|
8
|
+
/** Read the canonical client-safe sign-in destination. */
|
|
9
|
+
export declare function getSignInRoutePath(): string;
|
|
10
|
+
/** @deprecated Configure `routes.signIn`; retained for route-factory input validation. */
|
|
11
|
+
export declare function configureSignInRoutePath(legacyOverride?: string): string;
|
|
12
|
+
/** Defer deprecated override validation until the admin route's beforeLoad boundary. */
|
|
13
|
+
export declare function createSignInRoutePathResolver(legacyOverride?: string): () => string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getClientConfig, resolveRoutes } from "@byline/core";
|
|
2
|
+
function getSignInRoutePath() {
|
|
3
|
+
return getClientConfig().routes.signIn;
|
|
4
|
+
}
|
|
5
|
+
function configureSignInRoutePath(legacyOverride) {
|
|
6
|
+
const routes = getClientConfig().routes;
|
|
7
|
+
const configured = routes.signIn;
|
|
8
|
+
if (void 0 === legacyOverride) return configured;
|
|
9
|
+
const normalizedOverride = resolveRoutes({
|
|
10
|
+
...routes,
|
|
11
|
+
signIn: legacyOverride
|
|
12
|
+
}).signIn;
|
|
13
|
+
if (normalizedOverride !== configured) throw new Error(`createAdminLayoutRoute signInPath (${normalizedOverride}) must match routes.signIn (${configured})`);
|
|
14
|
+
return configured;
|
|
15
|
+
}
|
|
16
|
+
function createSignInRoutePathResolver(legacyOverride) {
|
|
17
|
+
return void 0 === legacyOverride ? getSignInRoutePath : ()=>configureSignInRoutePath(legacyOverride);
|
|
18
|
+
}
|
|
19
|
+
export { configureSignInRoutePath, createSignInRoutePathResolver, getSignInRoutePath };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { changeAccountPasswordCommand } from "@byline/admin/admin-account";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const changeAccountPassword = createServerFn({
|
|
6
6
|
method: 'POST'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { getAccountCommand } from "@byline/admin/admin-account";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const getAccount = createServerFn({
|
|
6
6
|
method: 'GET'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { updateAccountCommand } from "@byline/admin/admin-account";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const updateAccount = createServerFn({
|
|
6
6
|
method: 'POST'
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { assertAdminActor } from "@byline/admin";
|
|
3
3
|
import { ADMIN_ACTIVITY_ABILITIES } from "@byline/admin/admin-activity";
|
|
4
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
5
|
import { ERR_AUDIT_UNSUPPORTED, getLogger, getServerConfig } from "@byline/core";
|
|
5
|
-
import { getAdminRequestContext } from "../../auth/auth-context.js";
|
|
6
6
|
import { resolveActorLabels } from "../collections/actors.js";
|
|
7
7
|
const getSystemActivityLog = createServerFn({
|
|
8
8
|
method: 'GET'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { getRoleAbilitiesCommand } from "@byline/admin/admin-permissions";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const getRoleAbilities = createServerFn({
|
|
6
6
|
method: 'GET'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { listRegisteredAbilitiesCommand } from "@byline/admin/admin-permissions";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const listRegisteredAbilities = createServerFn({
|
|
6
6
|
method: 'GET'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { setRoleAbilitiesCommand } from "@byline/admin/admin-permissions";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const setRoleAbilities = createServerFn({
|
|
6
6
|
method: 'POST'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { whoHasAbilityCommand } from "@byline/admin/admin-permissions";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const whoHasAbility = createServerFn({
|
|
6
6
|
method: 'GET'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { createAdminRoleCommand } from "@byline/admin/admin-roles";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const createAdminRole = createServerFn({
|
|
6
6
|
method: 'POST'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { deleteAdminRoleCommand } from "@byline/admin/admin-roles";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const deleteAdminRole = createServerFn({
|
|
6
6
|
method: 'POST'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { getAdminRoleCommand } from "@byline/admin/admin-roles";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const getAdminRole = createServerFn({
|
|
6
6
|
method: 'GET'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { listAdminRolesCommand } from "@byline/admin/admin-roles";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const listAdminRoles = createServerFn({
|
|
6
6
|
method: 'GET'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { reorderAdminRolesCommand } from "@byline/admin/admin-roles";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const reorderAdminRoles = createServerFn({
|
|
6
6
|
method: 'POST'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { updateAdminRoleCommand } from "@byline/admin/admin-roles";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const updateAdminRole = createServerFn({
|
|
6
6
|
method: 'POST'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { createAdminUserCommand } from "@byline/admin/admin-users";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const createAdminUser = createServerFn({
|
|
6
6
|
method: 'POST'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { deleteAdminUserCommand } from "@byline/admin/admin-users";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const deleteAdminUser = createServerFn({
|
|
6
6
|
method: 'POST'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { disableAdminUserCommand } from "@byline/admin/admin-users";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const disableAdminUser = createServerFn({
|
|
6
6
|
method: 'POST'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { enableAdminUserCommand } from "@byline/admin/admin-users";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const enableAdminUser = createServerFn({
|
|
6
6
|
method: 'POST'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { getRolesForUserCommand } from "@byline/admin/admin-roles";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const getUserRoles = createServerFn({
|
|
6
6
|
method: 'GET'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { getAdminUserCommand } from "@byline/admin/admin-users";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const getAdminUser = createServerFn({
|
|
6
6
|
method: 'GET'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { listAdminUsersCommand } from "@byline/admin/admin-users";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const listAdminUsers = createServerFn({
|
|
6
6
|
method: 'GET'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { setAdminUserPasswordCommand } from "@byline/admin/admin-users";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const setAdminUserPassword = createServerFn({
|
|
6
6
|
method: 'POST'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { setRolesForUserCommand } from "@byline/admin/admin-roles";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const setUserRoles = createServerFn({
|
|
6
6
|
method: 'POST'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { updateAdminUserCommand } from "@byline/admin/admin-users";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const updateAdminUser = createServerFn({
|
|
6
6
|
method: 'POST'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { executeInstruction, executeInstructionStreaming } from "@byline/ai/server";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
const executeAiInstruction = createServerFn({
|
|
5
5
|
method: 'POST'
|
|
6
6
|
}).validator((input)=>input).handler(async ({ data })=>{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { AuthError } from "@byline/auth";
|
|
3
|
-
import { getAdminRequestContext } from "
|
|
3
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
4
4
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
5
5
|
const getCurrentAdminUser = createServerFn({
|
|
6
6
|
method: 'GET'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
2
|
import { getRequestHeader } from "@tanstack/react-start/server";
|
|
3
|
+
import { setSessionCookies } from "@byline/client/server";
|
|
3
4
|
import { getServerConfig } from "@byline/core";
|
|
4
|
-
import { setSessionCookies } from "../../auth/auth-cookies.js";
|
|
5
5
|
import { readAdminLocaleCookie } from "../../i18n/locale-cookie.js";
|
|
6
6
|
import { bylineCore } from "../../integrations/byline-core.js";
|
|
7
7
|
const adminSignIn = createServerFn({
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
|
+
import { clearPreviewCookie, clearSessionCookies, readRefreshTokenCookie } from "@byline/client/server";
|
|
2
3
|
import { getServerConfig } from "@byline/core";
|
|
3
|
-
import { clearSessionCookies, readRefreshTokenCookie } from "../../auth/auth-cookies.js";
|
|
4
|
-
import { clearPreviewCookie } from "../../auth/preview-cookies.js";
|
|
5
4
|
const adminSignOut = createServerFn({
|
|
6
5
|
method: 'POST'
|
|
7
6
|
}).handler(async ()=>{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
|
+
import { getAdminBylineClient } from "@byline/client/server";
|
|
2
3
|
import { ERR_NOT_FOUND, getLogger } from "@byline/core";
|
|
3
4
|
import { ensureCollection } from "../../integrations/api-utils.js";
|
|
4
|
-
import { getAdminBylineClient } from "../../integrations/byline-client.js";
|
|
5
5
|
import { resolveActorLabels } from "./actors.js";
|
|
6
6
|
const getCollectionDocumentAuditLog = createServerFn({
|
|
7
7
|
method: 'GET'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createServerFn } from "@tanstack/react-start";
|
|
2
|
+
import { getAdminRequestContext } from "@byline/client/server";
|
|
2
3
|
import { ERR_NOT_FOUND, getLogger, getServerConfig } from "@byline/core";
|
|
3
4
|
import { copyToLocale } from "@byline/core/services";
|
|
4
|
-
import { getAdminRequestContext } from "../../auth/auth-context.js";
|
|
5
5
|
import { ensureCollection } from "../../integrations/api-utils.js";
|
|
6
6
|
const copyDocumentToLocale = createServerFn({
|
|
7
7
|
method: 'POST'
|