Skip to content

Commit eddffd7

Browse files
chore: wip
1 parent 78777c3 commit eddffd7

File tree

5 files changed

+24
-8
lines changed

5 files changed

+24
-8
lines changed

config/env.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,16 @@ export default {
178178
default: '',
179179
},
180180

181+
STRIPE_SECRET_KEY: {
182+
validation: schema.string(),
183+
default: '',
184+
},
185+
186+
STRIPE_PUBLIC_KEY: {
187+
validation: schema.string(),
188+
default: '',
189+
},
190+
181191
FRONTEND_APP_ENV: {
182192
validation: schema.enum(['development', 'staging', 'production']),
183193
default: 'development',

config/services.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ export default {
3535
},
3636

3737
mailtrap: {
38-
host: env.MAILTRAP_HOST,
39-
token: env.MAILTRAP_TOKEN,
40-
inboxId: env.MAILTRAP_INBOX_ID,
38+
host: env.MAILTRAP_HOST || '',
39+
token: env.MAILTRAP_TOKEN || '',
40+
inboxId: env.MAILTRAP_INBOX_ID || '',
4141
maxRetries: env.MAILTRAP_MAX_RETRIES ? Number.parseInt(env.MAILTRAP_MAX_RETRIES) : 3,
4242
retryTimeout: env.MAILTRAP_RETRY_TIMEOUT ? Number.parseInt(env.MAILTRAP_RETRY_TIMEOUT) : 1000,
4343
},
@@ -72,14 +72,14 @@ export default {
7272
// },
7373

7474
slack: {
75-
appId: env.SLACK_APP_ID,
76-
clientId: env.SLACK_CLIENT_ID,
77-
secretKey: env.SLACK_SECRET_KEY,
75+
appId: env.SLACK_APP_ID || '',
76+
clientId: env.SLACK_CLIENT_ID || '',
77+
secretKey: env.SLACK_SECRET_KEY || '',
7878
maxRetries: env.SLACK_MAX_RETRIES ? Number.parseInt(env.SLACK_MAX_RETRIES) : 3,
7979
retryTimeout: env.SENDGRID_RETRY_TIMEOUT ? Number.parseInt(env.SENDGRID_RETRY_TIMEOUT) : 1000,
8080
},
8181
stripe: {
82-
secretKey: env.STRIPE_SECRET_KEY,
83-
publicKey: env.STRIPE_PUBLIC_KEY,
82+
secretKey: env.STRIPE_SECRET_KEY || '',
83+
publicKey: env.STRIPE_PUBLIC_KEY || '',
8484
},
8585
} satisfies ServicesConfig

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ export function process(): Env {
3535

3636
export const env: Env = new Proxy(process(), handler)
3737

38+
console.log('env', env)
39+
3840
export function writeEnv(key: EnvKey, value: string, options?: { path: string }): void {
3941
const envPath = options?.path || projectPath('.env')
4042
const env = fs.readFileSync(envPath, 'utf-8')

storage/framework/core/payments/src/drivers/stripe.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ import Stripe from 'stripe'
33

44
const apiKey = config?.services?.stripe?.secretKey || ''
55

6+
console.log('apiKey', apiKey)
7+
68
const client = new Stripe(apiKey, {
79
apiVersion: '2025-02-24.acacia',
810
})

storage/framework/types/env.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ declare module 'bun' {
3636
const SEARCH_ENGINE_DRIVER: 'meilisearch' | 'algolia' | 'typesense'
3737
const MEILISEARCH_HOST: string
3838
const MEILISEARCH_KEY: string
39+
const STRIPE_SECRET_KEY: string
40+
const STRIPE_PUBLIC_KEY: string
3941
const FRONTEND_APP_ENV: 'development' | 'staging' | 'production'
4042
const FRONTEND_APP_URL: string
4143
}

0 commit comments

Comments
 (0)