Mount /vip with nomadvip+payjsapi, add @nomadro/pay|pb|sdk, apps/api, /admin shell, and backup/rollback scripts under git.nomadro.cn workflow. Co-authored-by: Cursor <cursoragent@cursor.com>
26 lines
623 B
TypeScript
26 lines
623 B
TypeScript
/**
|
|
* VIP pay env — thin re-export of shared @nomadro/pay (modular decoupling).
|
|
* Prefer importing from @nomadro/pay in new code.
|
|
*/
|
|
export {
|
|
isWeChat,
|
|
isMobile,
|
|
getPayEnv,
|
|
getRecommendedChannel,
|
|
mustUseWxPay,
|
|
type PayEnv,
|
|
type PayChannel,
|
|
} from "@nomadro/pay";
|
|
|
|
import { getPayEnv as _getPayEnv, type PayEnv } from "@nomadro/pay";
|
|
|
|
export function getDeviceFromEnv(env: PayEnv): "pc" | "h5" | "wechat" {
|
|
if (env === "wechat") return "wechat";
|
|
return env === "pc" ? "pc" : "h5";
|
|
}
|
|
|
|
/** @deprecated use getPayEnv from @nomadro/pay */
|
|
export function detectPayEnv(): PayEnv {
|
|
return _getPayEnv();
|
|
}
|