0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-27 22:19:04 -05:00

[ci] format

This commit is contained in:
Ben 2024-07-10 11:33:46 +00:00 committed by astrobot-houston
parent 6ccb30e610
commit 0d6f3563a5
2 changed files with 3 additions and 6 deletions

View file

@ -91,10 +91,7 @@ const EnvSchemaKey = z
message: 'A valid variable name can only contain uppercase letters, numbers and underscores.', message: 'A valid variable name can only contain uppercase letters, numbers and underscores.',
}); });
export const EnvSchema = z.record( export const EnvSchema = z.record(EnvSchemaKey, z.intersection(EnvFieldMetadata, EnvFieldType));
EnvSchemaKey,
z.intersection(EnvFieldMetadata, EnvFieldType)
);
// https://www.totaltypescript.com/concepts/the-prettify-helper // https://www.totaltypescript.com/concepts/the-prettify-helper
type Prettify<T> = { type Prettify<T> = {

View file

@ -3,8 +3,8 @@ import { describe, it } from 'node:test';
import stripAnsi from 'strip-ansi'; import stripAnsi from 'strip-ansi';
import { z } from 'zod'; import { z } from 'zod';
import { validateConfig } from '../../../dist/core/config/validate.js'; import { validateConfig } from '../../../dist/core/config/validate.js';
import { envField } from '../../../dist/env/config.js';
import { formatConfigErrorMessage } from '../../../dist/core/messages.js'; import { formatConfigErrorMessage } from '../../../dist/core/messages.js';
import { envField } from '../../../dist/env/config.js';
describe('Config Validation', () => { describe('Config Validation', () => {
it('empty user config is valid', async () => { it('empty user config is valid', async () => {
@ -392,7 +392,7 @@ describe('Config Validation', () => {
experimental: { experimental: {
env: { env: {
schema: { schema: {
"123ABC": envField.string({ access: 'public', context: 'server' }), '123ABC': envField.string({ access: 'public', context: 'server' }),
}, },
}, },
}, },