优化启动流程
This commit is contained in:
@@ -196,6 +196,40 @@ function applyEnvOverrides(baseConfig) {
|
||||
nextConfig.platforms.agiso.tradeDetail.timeoutMs = agisoTradeDetailTimeoutMs
|
||||
}
|
||||
|
||||
const agisoAutoDeliveryEnabled = parseBoolean(process.env.AGISO_AUTO_DELIVERY_ENABLED)
|
||||
if (agisoAutoDeliveryEnabled !== null) {
|
||||
nextConfig.platforms.agiso.autoDelivery.enabled = agisoAutoDeliveryEnabled
|
||||
}
|
||||
|
||||
const agisoAutoDeliveryEndpoint = String(process.env.AGISO_AUTO_DELIVERY_ENDPOINT || '').trim()
|
||||
if (agisoAutoDeliveryEndpoint) {
|
||||
nextConfig.platforms.agiso.autoDelivery.endpoint = agisoAutoDeliveryEndpoint
|
||||
}
|
||||
|
||||
const agisoAutoDeliveryApiVersion = String(process.env.AGISO_AUTO_DELIVERY_API_VERSION || '').trim()
|
||||
if (agisoAutoDeliveryApiVersion) {
|
||||
nextConfig.platforms.agiso.autoDelivery.apiVersion = agisoAutoDeliveryApiVersion
|
||||
}
|
||||
|
||||
const agisoAutoDeliveryAldsType = parseInteger(process.env.AGISO_AUTO_DELIVERY_ALDS_TYPE)
|
||||
if (agisoAutoDeliveryAldsType !== null) {
|
||||
nextConfig.platforms.agiso.autoDelivery.aldsType = agisoAutoDeliveryAldsType
|
||||
}
|
||||
|
||||
for (const [envKey, configKey] of [
|
||||
['AGISO_AUTO_DELIVERY_IGNORE_ALDS_LOG', 'ignoreAldsLog'],
|
||||
['AGISO_AUTO_DELIVERY_IGNORE_BLACK_LIST', 'ignoreBlackList'],
|
||||
['AGISO_AUTO_DELIVERY_IGNORE_ON_OFF', 'ignoreOnOff'],
|
||||
['AGISO_AUTO_DELIVERY_IGNORE_REFUND_CHECK', 'ignoreRefundCheck'],
|
||||
['AGISO_AUTO_DELIVERY_IGNORE_RESTRICTED', 'ignoreRestricted'],
|
||||
['AGISO_AUTO_DELIVERY_IGNORE_TRADE_STATUS_CHECK', 'ignoreTradeStatusCheck'],
|
||||
]) {
|
||||
const parsed = parseBoolean(process.env[envKey])
|
||||
if (parsed !== null) {
|
||||
nextConfig.platforms.agiso.autoDelivery[configKey] = parsed
|
||||
}
|
||||
}
|
||||
|
||||
const agisoAppId = String(process.env.AGISO_APP_ID || '').trim()
|
||||
if (agisoAppId) {
|
||||
nextConfig.platforms.agiso.messaging.appId = agisoAppId
|
||||
|
||||
Reference in New Issue
Block a user