From 2b53588772737fb8cce7e6e44f400a804ea0b65d Mon Sep 17 00:00:00 2001 From: Florian Lefebvre Date: Mon, 9 Dec 2024 12:30:37 +0000 Subject: [PATCH] [ci] format --- packages/astro/src/core/create-vite.ts | 2 +- packages/astro/src/env/env-loader.ts | 2 +- packages/astro/src/env/vite-plugin-env.ts | 2 +- packages/astro/templates/env.mjs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index 784ef5f83f..5d9e77b3d9 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -12,6 +12,7 @@ import { astroContentImportPlugin, astroContentVirtualModPlugin, } from '../content/index.js'; +import { createEnvLoader } from '../env/env-loader.js'; import { astroEnv } from '../env/vite-plugin-env.js'; import astroInternationalization from '../i18n/vite-plugin-i18n.js'; import astroPrefetch from '../prefetch/vite-plugin-prefetch.js'; @@ -41,7 +42,6 @@ import { vitePluginMiddleware } from './middleware/vite-plugin.js'; import { joinPaths } from './path.js'; import { vitePluginServerIslands } from './server-islands/vite-plugin-server-islands.js'; import { isObject } from './util.js'; -import { createEnvLoader } from '../env/env-loader.js'; type CreateViteOptions = { settings: AstroSettings; diff --git a/packages/astro/src/env/env-loader.ts b/packages/astro/src/env/env-loader.ts index f33878a652..d3893c6f90 100644 --- a/packages/astro/src/env/env-loader.ts +++ b/packages/astro/src/env/env-loader.ts @@ -1,6 +1,6 @@ +import { fileURLToPath } from 'node:url'; import { loadEnv } from 'vite'; import type { AstroConfig } from '../types/public/index.js'; -import { fileURLToPath } from 'node:url'; // Match valid JS variable names (identifiers), which accepts most alphanumeric characters, // except that the first character cannot be a number. diff --git a/packages/astro/src/env/vite-plugin-env.ts b/packages/astro/src/env/vite-plugin-env.ts index c8ec5b8533..1d02839243 100644 --- a/packages/astro/src/env/vite-plugin-env.ts +++ b/packages/astro/src/env/vite-plugin-env.ts @@ -7,10 +7,10 @@ import { VIRTUAL_MODULES_IDS, VIRTUAL_MODULES_IDS_VALUES, } from './constants.js'; +import type { EnvLoader } from './env-loader.js'; import { type InvalidVariable, invalidVariablesToError } from './errors.js'; import type { EnvSchema } from './schema.js'; import { getEnvFieldType, validateEnvVariable } from './validators.js'; -import type { EnvLoader } from './env-loader.js'; interface AstroEnvPluginParams { settings: AstroSettings; diff --git a/packages/astro/templates/env.mjs b/packages/astro/templates/env.mjs index 4461ed035b..9f36f1175b 100644 --- a/packages/astro/templates/env.mjs +++ b/packages/astro/templates/env.mjs @@ -1,8 +1,8 @@ // @ts-check import { schema } from 'virtual:astro:env/internal'; import { - createInvalidVariablesError, getEnv as _getEnv, + createInvalidVariablesError, getEnvFieldType, setOnSetGetEnv, validateEnvVariable, @@ -18,7 +18,7 @@ const getEnv = (key) => { }; export const getSecret = (key) => { - return getEnv(key) + return getEnv(key); }; const _internalGetSecret = (key) => {