aicodeswitch 5.2.12 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LogStore = void 0;
7
+ exports.createLogStore = createLogStore;
8
+ /**
9
+ * LogStore 模块入口
10
+ *
11
+ * 追加写 NDJSON 日志存储,替代 fs-database 中「分片 JSON 数组 read-modify-write」模式。
12
+ * 主库(global)与 AccessKey(key:{keyId})共用同一存储引擎。
13
+ */
14
+ const path_1 = __importDefault(require("path"));
15
+ var log_store_1 = require("./log-store");
16
+ Object.defineProperty(exports, "LogStore", { enumerable: true, get: function () { return log_store_1.LogStore; } });
17
+ const log_store_2 = require("./log-store");
18
+ /** 工厂:以 {dataPath}/log-store 为根目录创建单例 */
19
+ function createLogStore(dataPath) {
20
+ return new log_store_2.LogStore(path_1.default.join(dataPath, 'log-store'));
21
+ }