"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAlipayContextStorage=getAlipayContextStorage,exports.getAlipayContext=getAlipayContext;const gals_1=require("gals"),ALIPAY_CONTEXT_STORAGE=Symbol.for("ALIPAY_FAAS_CONTEXT_STORAGE");function getAlipayContextStorage(){return global[ALIPAY_CONTEXT_STORAGE]||(global[ALIPAY_CONTEXT_STORAGE]=(0,gals_1.getAsyncLocalStorage)()),global[ALIPAY_CONTEXT_STORAGE]}function getAlipayContext(){let e=getAlipayContextStorage().getStore();return e||(e={UNIONID:process.env.UNIONID||"",CLIENTIP:process.env.CLIENTIP||"",CLIENTIPV6:process.env.CLIENTIPV6||"",FROM_APPID:process.env.FROM_APPID||"",FROM_OPENID:process.env.FROM_OPENID||"",FROM_UNIONID:process.env.FROM_UNIONID||"",OPEN_DATA_INFO:process.env.OPEN_DATA_INFO||"",USER_AGENT:process.env.USER_AGENT||"",SOURCE_TYPE:process.env.SOURCE_TYPE||"",APPID:process.env.APPID||"",OPENID:process.env.OPENID||"",ENV:process.env.ENV||"",SOURCE:process.env.SOURCE||"",TRACEID:process.env.TRACEID||process.env.traceid||"",RPCID:"0",REQUESTID:"",REQUEST_SOURCE:process.env.REQUEST_SOURCE||"",SOURCE_APP:process.env.SOURCE_APP||"",CLOUDBASE:process.env.CLOUDBASE?JSON.parse(process.env.CLOUDBASE):{},rpcCount:0,headers:{},eventType:"http"}),e}