Skip to content

Commit f60a09e

Browse files
chore: wip
1 parent ff00a39 commit f60a09e

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

storage/framework/.biomelintrc-auto-import.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,4 +418,4 @@
418418
"wordChar"
419419
]
420420
}
421-
}
421+
}

storage/framework/core/env/src/index.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,6 @@ import fs from 'fs-extra'
55
import type { EnvKey } from '../../../env'
66
import type { Env } from './types'
77

8-
interface EnumObject {
9-
[key: string]: string[]
10-
}
11-
12-
export const envEnum: EnumObject = {
13-
APP_ENV: ['local', 'dev', 'development', 'staging', 'prod', 'production'],
14-
DB_CONNECTION: ['mysql', 'sqlite', 'postgres', 'dynamodb'],
15-
MAIL_MAILER: ['smtp', 'mailgun', 'ses', 'postmark', 'sendmail', 'log'],
16-
SEARCH_ENGINE_DRIVER: ['opensearch'],
17-
FRONTEND_APP_ENV: ['development', 'staging', 'production'],
18-
}
19-
208
const handler = {
219
get: (target: Env, key: EnvKey) => {
2210
const value = target[key] as any

storage/framework/core/env/src/types.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,21 @@
11
import { log } from '@stacksjs/logging'
22
import { schema } from '@stacksjs/validation'
3-
import { envEnum } from './index'
43
import type { Infer, VineBoolean, VineEnum, VineNumber, VineString } from '@stacksjs/validation'
54
import env from '~/config/env'
65
import type { EnvKey } from '../../../env'
76

7+
interface EnumObject {
8+
[key: string]: string[]
9+
}
10+
11+
export const envEnum: EnumObject = {
12+
APP_ENV: ['local', 'dev', 'development', 'staging', 'prod', 'production'],
13+
DB_CONNECTION: ['mysql', 'sqlite', 'postgres', 'dynamodb'],
14+
MAIL_MAILER: ['smtp', 'mailgun', 'ses', 'postmark', 'sendmail', 'log'],
15+
SEARCH_ENGINE_DRIVER: ['opensearch'],
16+
FRONTEND_APP_ENV: ['development', 'staging', 'production'],
17+
}
18+
819
// we need to get this into the right format so we can infer the type
920
type EnvValue = string | boolean | number | readonly string[]
1021
type EnvType = typeof env

storage/framework/core/events/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ type StacksEvents = {
147147
}
148148

149149
const events: Emitter<StacksEvents> = mitt<StacksEvents>()
150-
const emitter = events()
150+
const emitter = events
151151
const useEvent: typeof emitter.emit = emitter.emit.bind(emitter)
152-
const useEvents = events()
152+
const useEvents = events
153153
const dispatch: typeof emitter.emit = emitter.emit.bind(emitter)
154154

155155
const listen: typeof emitter.on = emitter.on.bind(emitter)

0 commit comments

Comments
 (0)