@finddatatechnology/yongyi-client 0.1.7 → 0.1.8
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.
- package/dist/tokens.js +9 -2
- package/package.json +1 -1
package/dist/tokens.js
CHANGED
|
@@ -19,8 +19,15 @@ export function cellMemoryConfig(env = process.env) {
|
|
|
19
19
|
const url = String(env.CELL_MEMORY_URL || "").replace(/\/+$/, "");
|
|
20
20
|
const platformToken = String(env.CELL_MEMORY_PLATFORM_TOKEN || "");
|
|
21
21
|
const dataRoot = String(env.CELL_MEMORY_DATA || "");
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
if (!(enabled && url && platformToken && dataRoot))
|
|
23
|
+
return null;
|
|
24
|
+
const cfg = { url, platformToken, dataRoot };
|
|
25
|
+
// Omitted, not set to undefined: callers deep-compare the config against the
|
|
26
|
+
// pre-feed golden, and an own `feedKey: undefined` key changes that shape.
|
|
27
|
+
const feedKey = String(env.CELL_MEMORY_FEED || "");
|
|
28
|
+
if (feedKey)
|
|
29
|
+
cfg.feedKey = feedKey;
|
|
30
|
+
return cfg;
|
|
24
31
|
}
|
|
25
32
|
function cachePath(dataRoot, ownerEmail) {
|
|
26
33
|
const safe = String(ownerEmail || "unknown").replace(/[^a-zA-Z0-9@._-]/g, "_");
|
package/package.json
CHANGED