This commit is contained in:
qq
2026-04-21 22:34:39 +08:00
commit c28429b589
718 changed files with 48804 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AppInfoContext = exports.AppDeviceInfo = void 0;
const async_hooks_1 = require("async_hooks");
class AppDeviceInfo {
device;
system;
version;
ip;
}
exports.AppDeviceInfo = AppDeviceInfo;
const storage = new async_hooks_1.AsyncLocalStorage();
class AppInfoContext {
static put(headers, callback, ip) {
const info = new AppDeviceInfo();
info.device = headers['device'];
info.system = headers['system'];
info.version = headers['version'];
info.ip = ip;
storage.run(info, callback);
}
static getAppInfo() {
return storage.getStore();
}
}
exports.AppInfoContext = AppInfoContext;
//# sourceMappingURL=app_info.context.js.map