@hasna/connectors 1.4.4 → 1.4.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/README.md +3 -3
- package/bin/index.js +416 -306
- package/bin/mcp.js +297 -187
- package/bin/serve.js +349 -239
- package/connectors/aws/package.json +1 -1
- package/connectors/clickbank/package.json +1 -1
- package/dist/db/database.d.ts +5 -2
- package/dist/index.js +243 -138
- package/dist/lib/paths.d.ts +28 -0
- package/dist/lib/paths.test.d.ts +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** The effective user home, mirroring the pre-existing connectors resolution (`HOME` || `USERPROFILE` || `os.homedir()`). Read at call time. */
|
|
2
|
+
export declare function effectiveHome(): string;
|
|
3
|
+
/** Pre-XDG default home: `~/.hasna/connectors`. */
|
|
4
|
+
export declare function legacyHomeDir(): string;
|
|
5
|
+
/**
|
|
6
|
+
* The @hasna/paths-resolved data home for connectors (XDG / macOS home
|
|
7
|
+
* layout). The home override mirrors the pre-existing `$HOME`-first
|
|
8
|
+
* resolution so the resolver follows the same home the legacy path does.
|
|
9
|
+
*/
|
|
10
|
+
export declare function resolverHome(): string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the resolver (XDG) data home should be adopted as the store home.
|
|
13
|
+
* The resolver home is adopted only when the operator has set `HASNA_DATA_HOME`
|
|
14
|
+
* (the data-kind override — a deliberate opt-in to the XDG layout) or the store
|
|
15
|
+
* has already been physically migrated there (`connectors.db` exists). A machine
|
|
16
|
+
* that only redirects another kind (e.g. cache to tmpfs) must NOT have its data
|
|
17
|
+
* home moved, and a live store at the legacy home must never become invisible
|
|
18
|
+
* on upgrade.
|
|
19
|
+
*/
|
|
20
|
+
export declare function adoptResolverHome(resolved: string, env?: NodeJS.ProcessEnv): boolean;
|
|
21
|
+
/** The exact-app override root, when set: `HASNA_CONNECTORS_DIR`. */
|
|
22
|
+
export declare function exactConnectorsHome(): string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Effective connectors home: the exact-app override (`HASNA_CONNECTORS_DIR`)
|
|
25
|
+
* wins unconditionally; otherwise the resolver (XDG) data home once adopted;
|
|
26
|
+
* otherwise the legacy `~/.hasna/connectors` default.
|
|
27
|
+
*/
|
|
28
|
+
export declare function connectorsHome(): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/connectors",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"description": "Open source connector library - Install API connectors with a single command",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@hasna/events": "0.1.8",
|
|
75
|
+
"@hasna/paths": "0.1.0",
|
|
75
76
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
76
77
|
"chalk": "^5.3.0",
|
|
77
78
|
"commander": "^12.1.0",
|