Revert "Unify workspace dropdowns; Update layouts (#458)"
This reverts commit 4bc8448a1d.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import * as z from 'zod';
|
||||
import { z } from 'zod';
|
||||
|
||||
import { KeystaticStorage } from './keystatic-storage';
|
||||
import { keyStaticConfig } from './keystatic.config';
|
||||
@@ -51,7 +51,7 @@ function getKeystaticGithubConfiguration() {
|
||||
return z
|
||||
.object({
|
||||
token: z.string({
|
||||
error:
|
||||
description:
|
||||
'The GitHub token to use for authentication. Please provide the value through the "KEYSTATIC_GITHUB_TOKEN" environment variable.',
|
||||
}),
|
||||
repo: z.custom<`${string}/${string}`>(),
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { CloudConfig, GitHubConfig, LocalConfig } from '@keystatic/core';
|
||||
import * as z from 'zod';
|
||||
import { z } from 'zod';
|
||||
|
||||
type ZodOutputFor<T> = z.ZodType<T, z.ZodTypeDef, unknown>;
|
||||
|
||||
/**
|
||||
* @name STORAGE_KIND
|
||||
@@ -35,7 +37,7 @@ const PROJECT = process.env.KEYSTATIC_STORAGE_PROJECT;
|
||||
*/
|
||||
const local = z.object({
|
||||
kind: z.literal('local'),
|
||||
}) satisfies z.ZodType<LocalConfig['storage']>;
|
||||
}) satisfies ZodOutputFor<LocalConfig['storage']>;
|
||||
|
||||
/**
|
||||
* @name cloud
|
||||
@@ -45,12 +47,12 @@ const cloud = z.object({
|
||||
kind: z.literal('cloud'),
|
||||
project: z
|
||||
.string({
|
||||
error: `The Keystatic Cloud project. Please provide the value through the "KEYSTATIC_STORAGE_PROJECT" environment variable.`,
|
||||
description: `The Keystatic Cloud project. Please provide the value through the "KEYSTATIC_STORAGE_PROJECT" environment variable.`,
|
||||
})
|
||||
.min(1),
|
||||
branchPrefix: z.string().optional(),
|
||||
pathPrefix: z.string().optional(),
|
||||
}) satisfies z.ZodType<CloudConfig['storage']>;
|
||||
}) satisfies ZodOutputFor<CloudConfig['storage']>;
|
||||
|
||||
/**
|
||||
* @name github
|
||||
@@ -61,7 +63,7 @@ const github = z.object({
|
||||
repo: z.custom<`${string}/${string}`>(),
|
||||
branchPrefix: z.string().optional(),
|
||||
pathPrefix: z.string().optional(),
|
||||
}) satisfies z.ZodType<GitHubConfig['storage']>;
|
||||
}) satisfies ZodOutputFor<GitHubConfig['storage']>;
|
||||
|
||||
/**
|
||||
* @name KeystaticStorage
|
||||
|
||||
Reference in New Issue
Block a user