Skip to content

Commit e738a7d

Browse files
committed
refactor: move some files
1 parent 4a1e93b commit e738a7d

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import { cwd } from 'node:process'
33
import { createConfigLoader as createLoader } from 'unconfig'
44
import { type ConfigEnv, type Plugin, type UserConfig, loadEnv, normalizePath } from 'vite'
55

6-
import { initUi } from './utils/cliui.js'
7-
import type { UI } from './utils/cliui.js'
6+
import { initUi } from './ui.js'
7+
import type { UI } from './ui.js'
88
import { zodValidation } from './validators/zod/index.js'
99
import { builtinValidation } from './validators/builtin/index.js'
10-
import type { FullPluginOptions, PluginOptions, Schema } from './contracts/index.js'
10+
import type { FullPluginOptions, PluginOptions, Schema } from './types.js'
1111

1212
/**
1313
* Load schema defined in `env.ts` file using unconfig
@@ -137,4 +137,4 @@ export const ValidateEnv = (options?: PluginOptions): Plugin => {
137137
export const defineConfig = <T extends PluginOptions>(config: T): T => config
138138

139139
export { schema as Schema } from '@poppinss/validator-lite'
140-
export type { ImportMetaEnvAugmented } from './contracts/index.js'
140+
export type { ImportMetaEnvAugmented } from './types.js'
File renamed without changes.
File renamed without changes.

src/validators/builtin/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { UI } from '../../utils/cliui.js'
2-
import type { PoppinsSchema } from '../../contracts/index.js'
1+
import type { UI } from '../../ui.js'
2+
import type { PoppinsSchema } from '../../types.js'
33

44
export function errorReporter(ui: UI, errors: any[]) {
55
let finalMessage = ui.colors.red('Failed to validate environment variables : \n')

src/validators/zod/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { ZodSchema } from 'zod'
22

3-
import type { UI } from '../../utils/cliui.js'
3+
import type { UI } from '../../ui.js'
44

55
export function errorReporter(ui: UI, errors: any[]) {
66
let finalMessage = ui.colors.red('Failed to validate environment variables : \n')

tests/common.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { test } from '@japa/runner'
22

3-
import type { UI } from '../src/utils/cliui.js'
3+
import type { UI } from '../src/ui.js'
44
import { Schema, ValidateEnv as CoreTypedValidateEnv } from '../src/index.js'
55

66
const viteEnvConfig = { mode: 'development', command: 'serve' } as const

tests/zod.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { z } from 'zod'
22
import { test } from '@japa/runner'
33

4-
import type { UI } from '../src/utils/cliui.js'
4+
import type { UI } from '../src/ui.js'
55
import { ValidateEnv as CoreTypedValidateEnv } from '../src/index.js'
66

77
const viteEnvConfig = { mode: 'development', command: 'serve' } as const

0 commit comments

Comments
 (0)