chattercatcher 0.1.2 → 0.1.5
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/chunk-LYT5TS7P.js +3190 -0
- package/dist/chunk-LYT5TS7P.js.map +1 -0
- package/dist/chunk-OEROFIU2.js +107 -0
- package/dist/chunk-OEROFIU2.js.map +1 -0
- package/dist/chunk-WOBPNFFZ.js +29 -0
- package/dist/chunk-WOBPNFFZ.js.map +1 -0
- package/dist/cli.js +123 -3280
- package/dist/cli.js.map +1 -1
- package/dist/index.js +80 -3272
- package/dist/index.js.map +1 -1
- package/dist/lancedb-store-QHG4PAI4.js +10 -0
- package/dist/lancedb-store-QHG4PAI4.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// src/config/paths.ts
|
|
2
|
+
import os from "os";
|
|
3
|
+
import path from "path";
|
|
4
|
+
function getChatterCatcherHome() {
|
|
5
|
+
return process.env.CHATTERCATCHER_HOME || path.join(os.homedir(), ".chattercatcher");
|
|
6
|
+
}
|
|
7
|
+
function resolveHomePath(value) {
|
|
8
|
+
if (value === "~") {
|
|
9
|
+
return os.homedir();
|
|
10
|
+
}
|
|
11
|
+
if (value.startsWith("~/") || value.startsWith("~\\")) {
|
|
12
|
+
return path.join(os.homedir(), value.slice(2));
|
|
13
|
+
}
|
|
14
|
+
return path.resolve(value);
|
|
15
|
+
}
|
|
16
|
+
function getConfigPath() {
|
|
17
|
+
return path.join(getChatterCatcherHome(), "config.json");
|
|
18
|
+
}
|
|
19
|
+
function getSecretsPath() {
|
|
20
|
+
return path.join(getChatterCatcherHome(), "secrets.json");
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export {
|
|
24
|
+
getChatterCatcherHome,
|
|
25
|
+
resolveHomePath,
|
|
26
|
+
getConfigPath,
|
|
27
|
+
getSecretsPath
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=chunk-WOBPNFFZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/config/paths.ts"],"sourcesContent":["import os from \"node:os\";\nimport path from \"node:path\";\n\nexport function getChatterCatcherHome(): string {\n return process.env.CHATTERCATCHER_HOME || path.join(os.homedir(), \".chattercatcher\");\n}\n\nexport function resolveHomePath(value: string): string {\n if (value === \"~\") {\n return os.homedir();\n }\n\n if (value.startsWith(\"~/\") || value.startsWith(\"~\\\\\")) {\n return path.join(os.homedir(), value.slice(2));\n }\n\n return path.resolve(value);\n}\n\nexport function getConfigPath(): string {\n return path.join(getChatterCatcherHome(), \"config.json\");\n}\n\nexport function getSecretsPath(): string {\n return path.join(getChatterCatcherHome(), \"secrets.json\");\n}\n"],"mappings":";AAAA,OAAO,QAAQ;AACf,OAAO,UAAU;AAEV,SAAS,wBAAgC;AAC9C,SAAO,QAAQ,IAAI,uBAAuB,KAAK,KAAK,GAAG,QAAQ,GAAG,iBAAiB;AACrF;AAEO,SAAS,gBAAgB,OAAuB;AACrD,MAAI,UAAU,KAAK;AACjB,WAAO,GAAG,QAAQ;AAAA,EACpB;AAEA,MAAI,MAAM,WAAW,IAAI,KAAK,MAAM,WAAW,KAAK,GAAG;AACrD,WAAO,KAAK,KAAK,GAAG,QAAQ,GAAG,MAAM,MAAM,CAAC,CAAC;AAAA,EAC/C;AAEA,SAAO,KAAK,QAAQ,KAAK;AAC3B;AAEO,SAAS,gBAAwB;AACtC,SAAO,KAAK,KAAK,sBAAsB,GAAG,aAAa;AACzD;AAEO,SAAS,iBAAyB;AACvC,SAAO,KAAK,KAAK,sBAAsB,GAAG,cAAc;AAC1D;","names":[]}
|