@haex-space/vault-sdk 2.2.5 → 2.2.6

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.
@@ -1,220 +1,6 @@
1
+ import { D as DatabaseQueryResult, M as Migration, b as MigrationResult, W as WebRequestOptions, c as WebResponse, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, d as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, e as EventCallback } from './types-DiGbHxTr.js';
1
2
  import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
2
3
 
3
- /**
4
- * Central event name definitions for HaexHub extensions
5
- *
6
- * Event Naming Schema: haextension:{subject}:{predicate}
7
- *
8
- * IMPORTANT: Tauri event names can only contain:
9
- * - Alphanumeric characters (a-z, A-Z, 0-9)
10
- * - Hyphens (-)
11
- * - Slashes (/)
12
- * - Colons (:)
13
- * - Underscores (_)
14
- *
15
- * NO dots (.) allowed!
16
- */
17
- declare const HAEXTENSION_EVENTS: {
18
- /** Context (theme, locale, platform) has changed */
19
- readonly CONTEXT_CHANGED: "haextension:context:changed";
20
- /** Search request from HaexHub */
21
- readonly SEARCH_REQUEST: "haextension:search:request";
22
- };
23
- type HaextensionEvent = typeof HAEXTENSION_EVENTS[keyof typeof HAEXTENSION_EVENTS];
24
-
25
- declare const DEFAULT_TIMEOUT = 30000;
26
- declare const TABLE_SEPARATOR = "__";
27
- interface HaexHubRequest {
28
- method: string;
29
- params: Record<string, unknown>;
30
- timestamp: number;
31
- }
32
- interface HaexHubResponse<T = unknown> {
33
- id: string;
34
- result?: T;
35
- error?: HaexHubError;
36
- }
37
- interface ExtensionInfo {
38
- publicKey: string;
39
- name: string;
40
- version: string;
41
- displayName?: string;
42
- namespace?: string;
43
- }
44
- interface ApplicationContext {
45
- theme: "light" | "dark" | "system";
46
- locale: string;
47
- platform: "linux" | "macos" | "ios" | "freebsd" | "dragonfly" | "netbsd" | "openbsd" | "solaris" | "android" | "windows" | undefined;
48
- }
49
- interface SearchQuery {
50
- query: string;
51
- filters?: Record<string, unknown>;
52
- limit?: number;
53
- }
54
- interface SearchResult {
55
- id: string;
56
- title: string;
57
- description?: string;
58
- type: string;
59
- data?: Record<string, unknown>;
60
- score?: number;
61
- }
62
- declare enum PermissionStatus {
63
- GRANTED = "granted",
64
- DENIED = "denied",
65
- ASK = "ask"
66
- }
67
- interface PermissionResponse {
68
- status: PermissionStatus;
69
- permanent: boolean;
70
- }
71
- interface DatabasePermission {
72
- extensionId: string;
73
- resource: string;
74
- operation: "read" | "write";
75
- path: string;
76
- }
77
- interface DatabasePermissionRequest {
78
- resource: string;
79
- operation: "read" | "write";
80
- reason?: string;
81
- }
82
- interface DatabaseQueryParams {
83
- query: string;
84
- params?: unknown[];
85
- }
86
- interface DatabaseQueryResult {
87
- rows: unknown[];
88
- columns?: string[];
89
- rowsAffected: number;
90
- lastInsertId?: number;
91
- }
92
- interface DatabaseExecuteParams {
93
- statements: string[];
94
- }
95
- interface MigrationResult {
96
- appliedCount: number;
97
- alreadyAppliedCount: number;
98
- appliedMigrations: string[];
99
- }
100
- interface Migration {
101
- name: string;
102
- sql: string;
103
- }
104
- interface DatabaseTableInfo {
105
- name: string;
106
- columns: DatabaseColumnInfo[];
107
- }
108
- interface DatabaseColumnInfo {
109
- name: string;
110
- type: string;
111
- notNull: boolean;
112
- defaultValue?: unknown;
113
- primaryKey: boolean;
114
- }
115
- interface HaexHubEvent {
116
- type: string;
117
- data: unknown;
118
- timestamp: number;
119
- }
120
- interface ContextChangedEvent extends HaexHubEvent {
121
- type: typeof HAEXTENSION_EVENTS.CONTEXT_CHANGED;
122
- data: {
123
- context: ApplicationContext;
124
- };
125
- }
126
- interface SearchRequestEvent extends HaexHubEvent {
127
- type: typeof HAEXTENSION_EVENTS.SEARCH_REQUEST;
128
- data: {
129
- query: SearchQuery;
130
- requestId: string;
131
- };
132
- }
133
- type EventCallback = (event: HaexHubEvent) => void;
134
- interface ExtensionManifest {
135
- name: string;
136
- version: string;
137
- author?: string | null;
138
- entry?: string | null;
139
- icon?: string | null;
140
- publicKey: string;
141
- signature: string;
142
- permissions: {
143
- database?: any[];
144
- filesystem?: any[];
145
- http?: any[];
146
- shell?: any[];
147
- };
148
- homepage?: string | null;
149
- description?: string | null;
150
- singleInstance?: boolean | null;
151
- displayMode?: "auto" | "window" | "iframe" | null;
152
- /**
153
- * Path to the migrations directory relative to the extension root.
154
- * Contains Drizzle-style migrations with meta/_journal.json and *.sql files.
155
- * These migrations will be applied when the extension is installed.
156
- * Example: "database/migrations"
157
- */
158
- migrationsDir?: string | null;
159
- }
160
- interface HaexHubConfig {
161
- debug?: boolean;
162
- timeout?: number;
163
- /** Extension manifest data (auto-injected by framework integrations) */
164
- manifest?: ExtensionManifest;
165
- }
166
- interface WebRequestOptions {
167
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
168
- headers?: Record<string, string>;
169
- body?: string | ArrayBuffer | Blob;
170
- timeout?: number;
171
- }
172
- interface WebResponse {
173
- status: number;
174
- statusText: string;
175
- headers: Record<string, string>;
176
- body: ArrayBuffer;
177
- url: string;
178
- }
179
- declare enum ErrorCode {
180
- TIMEOUT = "TIMEOUT",
181
- NOT_IN_IFRAME = "NOT_IN_IFRAME",
182
- UNAUTHORIZED_ORIGIN = "UNAUTHORIZED_ORIGIN",
183
- PERMISSION_DENIED = "PERMISSION_DENIED",
184
- INVALID_PUBLIC_KEY = "INVALID_PUBLIC_KEY",
185
- INVALID_EXTENSION_NAME = "INVALID_EXTENSION_NAME",
186
- INVALID_TABLE_NAME = "INVALID_TABLE_NAME",
187
- INVALID_PARAMS = "INVALID_PARAMS",
188
- EXTENSION_NOT_INITIALIZED = "EXTENSION_NOT_INITIALIZED",
189
- EXTENSION_INFO_UNAVAILABLE = "EXTENSION_INFO_UNAVAILABLE",
190
- METHOD_NOT_FOUND = "METHOD_NOT_FOUND",
191
- INTERNAL_ERROR = "INTERNAL_ERROR",
192
- DATABASE_ERROR = "DATABASE_ERROR",
193
- WEB_ERROR = "WEB_ERROR"
194
- }
195
- interface HaexHubError {
196
- code: ErrorCode;
197
- message: string;
198
- details?: Record<string, unknown>;
199
- }
200
- declare class HaexHubError extends Error {
201
- code: ErrorCode;
202
- messageKey: string;
203
- details?: Record<string, unknown> | undefined;
204
- constructor(code: ErrorCode, messageKey: string, details?: Record<string, unknown> | undefined);
205
- /**
206
- * Get localized error message
207
- * @param locale - Locale code (e.g., 'en', 'de')
208
- * @param translations - Translation object
209
- */
210
- getLocalizedMessage(locale?: string, translations?: Record<string, Record<string, string>>): string;
211
- toJSON(): {
212
- code: ErrorCode;
213
- message: string;
214
- details: Record<string, unknown> | undefined;
215
- };
216
- }
217
-
218
4
  declare class StorageAPI {
219
5
  private client;
220
6
  constructor(client: HaexVaultClient);
@@ -511,4 +297,4 @@ declare class HaexVaultClient {
511
297
  private log;
512
298
  }
513
299
 
514
- export { type ApplicationContext as A, type ContextChangedEvent as C, DatabaseAPI as D, type ExtensionInfo as E, FilesystemAPI as F, type HaexHubConfig as H, PermissionsAPI as P, StorageAPI as S, TABLE_SEPARATOR as T, WebAPI as W, HaexVaultClient as a, type HaexHubRequest as b, type HaexHubResponse as c, type HaexHubEvent as d, type EventCallback as e, type PermissionResponse as f, type DatabasePermission as g, type DatabasePermissionRequest as h, type DatabaseQueryParams as i, type DatabaseQueryResult as j, type DatabaseExecuteParams as k, type DatabaseTableInfo as l, type DatabaseColumnInfo as m, type ExtensionManifest as n, type SearchQuery as o, type SearchResult as p, type SearchRequestEvent as q, type WebRequestOptions as r, type WebResponse as s, PermissionStatus as t, ErrorCode as u, DEFAULT_TIMEOUT as v, HaexHubError as w, HAEXTENSION_EVENTS as x, type HaextensionEvent as y };
300
+ export { DatabaseAPI as D, FilesystemAPI as F, HaexVaultClient as H, PermissionsAPI as P, StorageAPI as S, WebAPI as W };
@@ -1,220 +1,6 @@
1
+ import { D as DatabaseQueryResult, M as Migration, b as MigrationResult, W as WebRequestOptions, c as WebResponse, H as HaexHubConfig, a as ExtensionInfo, A as ApplicationContext, d as DatabasePermissionRequest, P as PermissionResponse, S as SearchResult, e as EventCallback } from './types-DiGbHxTr.mjs';
1
2
  import { SqliteRemoteDatabase } from 'drizzle-orm/sqlite-proxy';
2
3
 
3
- /**
4
- * Central event name definitions for HaexHub extensions
5
- *
6
- * Event Naming Schema: haextension:{subject}:{predicate}
7
- *
8
- * IMPORTANT: Tauri event names can only contain:
9
- * - Alphanumeric characters (a-z, A-Z, 0-9)
10
- * - Hyphens (-)
11
- * - Slashes (/)
12
- * - Colons (:)
13
- * - Underscores (_)
14
- *
15
- * NO dots (.) allowed!
16
- */
17
- declare const HAEXTENSION_EVENTS: {
18
- /** Context (theme, locale, platform) has changed */
19
- readonly CONTEXT_CHANGED: "haextension:context:changed";
20
- /** Search request from HaexHub */
21
- readonly SEARCH_REQUEST: "haextension:search:request";
22
- };
23
- type HaextensionEvent = typeof HAEXTENSION_EVENTS[keyof typeof HAEXTENSION_EVENTS];
24
-
25
- declare const DEFAULT_TIMEOUT = 30000;
26
- declare const TABLE_SEPARATOR = "__";
27
- interface HaexHubRequest {
28
- method: string;
29
- params: Record<string, unknown>;
30
- timestamp: number;
31
- }
32
- interface HaexHubResponse<T = unknown> {
33
- id: string;
34
- result?: T;
35
- error?: HaexHubError;
36
- }
37
- interface ExtensionInfo {
38
- publicKey: string;
39
- name: string;
40
- version: string;
41
- displayName?: string;
42
- namespace?: string;
43
- }
44
- interface ApplicationContext {
45
- theme: "light" | "dark" | "system";
46
- locale: string;
47
- platform: "linux" | "macos" | "ios" | "freebsd" | "dragonfly" | "netbsd" | "openbsd" | "solaris" | "android" | "windows" | undefined;
48
- }
49
- interface SearchQuery {
50
- query: string;
51
- filters?: Record<string, unknown>;
52
- limit?: number;
53
- }
54
- interface SearchResult {
55
- id: string;
56
- title: string;
57
- description?: string;
58
- type: string;
59
- data?: Record<string, unknown>;
60
- score?: number;
61
- }
62
- declare enum PermissionStatus {
63
- GRANTED = "granted",
64
- DENIED = "denied",
65
- ASK = "ask"
66
- }
67
- interface PermissionResponse {
68
- status: PermissionStatus;
69
- permanent: boolean;
70
- }
71
- interface DatabasePermission {
72
- extensionId: string;
73
- resource: string;
74
- operation: "read" | "write";
75
- path: string;
76
- }
77
- interface DatabasePermissionRequest {
78
- resource: string;
79
- operation: "read" | "write";
80
- reason?: string;
81
- }
82
- interface DatabaseQueryParams {
83
- query: string;
84
- params?: unknown[];
85
- }
86
- interface DatabaseQueryResult {
87
- rows: unknown[];
88
- columns?: string[];
89
- rowsAffected: number;
90
- lastInsertId?: number;
91
- }
92
- interface DatabaseExecuteParams {
93
- statements: string[];
94
- }
95
- interface MigrationResult {
96
- appliedCount: number;
97
- alreadyAppliedCount: number;
98
- appliedMigrations: string[];
99
- }
100
- interface Migration {
101
- name: string;
102
- sql: string;
103
- }
104
- interface DatabaseTableInfo {
105
- name: string;
106
- columns: DatabaseColumnInfo[];
107
- }
108
- interface DatabaseColumnInfo {
109
- name: string;
110
- type: string;
111
- notNull: boolean;
112
- defaultValue?: unknown;
113
- primaryKey: boolean;
114
- }
115
- interface HaexHubEvent {
116
- type: string;
117
- data: unknown;
118
- timestamp: number;
119
- }
120
- interface ContextChangedEvent extends HaexHubEvent {
121
- type: typeof HAEXTENSION_EVENTS.CONTEXT_CHANGED;
122
- data: {
123
- context: ApplicationContext;
124
- };
125
- }
126
- interface SearchRequestEvent extends HaexHubEvent {
127
- type: typeof HAEXTENSION_EVENTS.SEARCH_REQUEST;
128
- data: {
129
- query: SearchQuery;
130
- requestId: string;
131
- };
132
- }
133
- type EventCallback = (event: HaexHubEvent) => void;
134
- interface ExtensionManifest {
135
- name: string;
136
- version: string;
137
- author?: string | null;
138
- entry?: string | null;
139
- icon?: string | null;
140
- publicKey: string;
141
- signature: string;
142
- permissions: {
143
- database?: any[];
144
- filesystem?: any[];
145
- http?: any[];
146
- shell?: any[];
147
- };
148
- homepage?: string | null;
149
- description?: string | null;
150
- singleInstance?: boolean | null;
151
- displayMode?: "auto" | "window" | "iframe" | null;
152
- /**
153
- * Path to the migrations directory relative to the extension root.
154
- * Contains Drizzle-style migrations with meta/_journal.json and *.sql files.
155
- * These migrations will be applied when the extension is installed.
156
- * Example: "database/migrations"
157
- */
158
- migrationsDir?: string | null;
159
- }
160
- interface HaexHubConfig {
161
- debug?: boolean;
162
- timeout?: number;
163
- /** Extension manifest data (auto-injected by framework integrations) */
164
- manifest?: ExtensionManifest;
165
- }
166
- interface WebRequestOptions {
167
- method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
168
- headers?: Record<string, string>;
169
- body?: string | ArrayBuffer | Blob;
170
- timeout?: number;
171
- }
172
- interface WebResponse {
173
- status: number;
174
- statusText: string;
175
- headers: Record<string, string>;
176
- body: ArrayBuffer;
177
- url: string;
178
- }
179
- declare enum ErrorCode {
180
- TIMEOUT = "TIMEOUT",
181
- NOT_IN_IFRAME = "NOT_IN_IFRAME",
182
- UNAUTHORIZED_ORIGIN = "UNAUTHORIZED_ORIGIN",
183
- PERMISSION_DENIED = "PERMISSION_DENIED",
184
- INVALID_PUBLIC_KEY = "INVALID_PUBLIC_KEY",
185
- INVALID_EXTENSION_NAME = "INVALID_EXTENSION_NAME",
186
- INVALID_TABLE_NAME = "INVALID_TABLE_NAME",
187
- INVALID_PARAMS = "INVALID_PARAMS",
188
- EXTENSION_NOT_INITIALIZED = "EXTENSION_NOT_INITIALIZED",
189
- EXTENSION_INFO_UNAVAILABLE = "EXTENSION_INFO_UNAVAILABLE",
190
- METHOD_NOT_FOUND = "METHOD_NOT_FOUND",
191
- INTERNAL_ERROR = "INTERNAL_ERROR",
192
- DATABASE_ERROR = "DATABASE_ERROR",
193
- WEB_ERROR = "WEB_ERROR"
194
- }
195
- interface HaexHubError {
196
- code: ErrorCode;
197
- message: string;
198
- details?: Record<string, unknown>;
199
- }
200
- declare class HaexHubError extends Error {
201
- code: ErrorCode;
202
- messageKey: string;
203
- details?: Record<string, unknown> | undefined;
204
- constructor(code: ErrorCode, messageKey: string, details?: Record<string, unknown> | undefined);
205
- /**
206
- * Get localized error message
207
- * @param locale - Locale code (e.g., 'en', 'de')
208
- * @param translations - Translation object
209
- */
210
- getLocalizedMessage(locale?: string, translations?: Record<string, Record<string, string>>): string;
211
- toJSON(): {
212
- code: ErrorCode;
213
- message: string;
214
- details: Record<string, unknown> | undefined;
215
- };
216
- }
217
-
218
4
  declare class StorageAPI {
219
5
  private client;
220
6
  constructor(client: HaexVaultClient);
@@ -511,4 +297,4 @@ declare class HaexVaultClient {
511
297
  private log;
512
298
  }
513
299
 
514
- export { type ApplicationContext as A, type ContextChangedEvent as C, DatabaseAPI as D, type ExtensionInfo as E, FilesystemAPI as F, type HaexHubConfig as H, PermissionsAPI as P, StorageAPI as S, TABLE_SEPARATOR as T, WebAPI as W, HaexVaultClient as a, type HaexHubRequest as b, type HaexHubResponse as c, type HaexHubEvent as d, type EventCallback as e, type PermissionResponse as f, type DatabasePermission as g, type DatabasePermissionRequest as h, type DatabaseQueryParams as i, type DatabaseQueryResult as j, type DatabaseExecuteParams as k, type DatabaseTableInfo as l, type DatabaseColumnInfo as m, type ExtensionManifest as n, type SearchQuery as o, type SearchResult as p, type SearchRequestEvent as q, type WebRequestOptions as r, type WebResponse as s, PermissionStatus as t, ErrorCode as u, DEFAULT_TIMEOUT as v, HaexHubError as w, HAEXTENSION_EVENTS as x, type HaextensionEvent as y };
300
+ export { DatabaseAPI as D, FilesystemAPI as F, HaexVaultClient as H, PermissionsAPI as P, StorageAPI as S, WebAPI as W };
@@ -0,0 +1,33 @@
1
+ interface HaextensionConfig {
2
+ dev?: {
3
+ port?: number;
4
+ host?: string;
5
+ haextension_dir?: string;
6
+ };
7
+ keys?: {
8
+ public_key_path?: string;
9
+ private_key_path?: string;
10
+ };
11
+ build?: {
12
+ distDir?: string;
13
+ /**
14
+ * Source path for migrations directory (relative to project root).
15
+ * If manifest.migrationsDir is set, this directory will be copied
16
+ * to the bundle at the path specified in migrationsDir.
17
+ * Default: "app/{migrationsDir}" (for Nuxt projects)
18
+ * Example: "app/database/migrations" -> copies to "database/migrations" in bundle
19
+ */
20
+ migrationsSourceDir?: string;
21
+ };
22
+ }
23
+ /**
24
+ * Read haextension.config.json from the project root
25
+ * Returns null if file doesn't exist
26
+ */
27
+ declare function readHaextensionConfig(rootDir?: string): HaextensionConfig | null;
28
+ /**
29
+ * Get extension directory from config or use default
30
+ */
31
+ declare function getExtensionDir(rootDir?: string): string;
32
+
33
+ export { type HaextensionConfig as H, getExtensionDir as g, readHaextensionConfig as r };
@@ -0,0 +1,33 @@
1
+ interface HaextensionConfig {
2
+ dev?: {
3
+ port?: number;
4
+ host?: string;
5
+ haextension_dir?: string;
6
+ };
7
+ keys?: {
8
+ public_key_path?: string;
9
+ private_key_path?: string;
10
+ };
11
+ build?: {
12
+ distDir?: string;
13
+ /**
14
+ * Source path for migrations directory (relative to project root).
15
+ * If manifest.migrationsDir is set, this directory will be copied
16
+ * to the bundle at the path specified in migrationsDir.
17
+ * Default: "app/{migrationsDir}" (for Nuxt projects)
18
+ * Example: "app/database/migrations" -> copies to "database/migrations" in bundle
19
+ */
20
+ migrationsSourceDir?: string;
21
+ };
22
+ }
23
+ /**
24
+ * Read haextension.config.json from the project root
25
+ * Returns null if file doesn't exist
26
+ */
27
+ declare function readHaextensionConfig(rootDir?: string): HaextensionConfig | null;
28
+ /**
29
+ * Get extension directory from config or use default
30
+ */
31
+ declare function getExtensionDir(rootDir?: string): string;
32
+
33
+ export { type HaextensionConfig as H, getExtensionDir as g, readHaextensionConfig as r };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,8 @@
1
- import { H as HaexHubConfig, a as HaexVaultClient } from './client-UgMJJ4NT.mjs';
2
- export { A as ApplicationContext, C as ContextChangedEvent, v as DEFAULT_TIMEOUT, D as DatabaseAPI, m as DatabaseColumnInfo, k as DatabaseExecuteParams, g as DatabasePermission, h as DatabasePermissionRequest, i as DatabaseQueryParams, j as DatabaseQueryResult, l as DatabaseTableInfo, u as ErrorCode, e as EventCallback, E as ExtensionInfo, n as ExtensionManifest, F as FilesystemAPI, x as HAEXTENSION_EVENTS, w as HaexHubError, d as HaexHubEvent, b as HaexHubRequest, c as HaexHubResponse, y as HaextensionEvent, f as PermissionResponse, t as PermissionStatus, P as PermissionsAPI, o as SearchQuery, q as SearchRequestEvent, p as SearchResult, T as TABLE_SEPARATOR, W as WebAPI, r as WebRequestOptions, s as WebResponse } from './client-UgMJJ4NT.mjs';
3
- export { HaextensionConfig } from './node.mjs';
1
+ import { H as HaexVaultClient } from './client-wxMr0ONL.mjs';
2
+ export { D as DatabaseAPI, F as FilesystemAPI, P as PermissionsAPI, W as WebAPI } from './client-wxMr0ONL.mjs';
3
+ import { H as HaexHubConfig } from './types-DiGbHxTr.mjs';
4
+ export { A as ApplicationContext, C as ContextChangedEvent, r as DEFAULT_TIMEOUT, m as DatabaseColumnInfo, k as DatabaseExecuteParams, i as DatabasePermission, d as DatabasePermissionRequest, j as DatabaseQueryParams, D as DatabaseQueryResult, l as DatabaseTableInfo, q as ErrorCode, e as EventCallback, a as ExtensionInfo, E as ExtensionManifest, t as HAEXTENSION_EVENTS, s as HaexHubError, h as HaexHubEvent, f as HaexHubRequest, g as HaexHubResponse, u as HaextensionEvent, P as PermissionResponse, p as PermissionStatus, n as SearchQuery, o as SearchRequestEvent, S as SearchResult, T as TABLE_SEPARATOR, W as WebRequestOptions, c as WebResponse } from './types-DiGbHxTr.mjs';
5
+ export { H as HaextensionConfig } from './config-D_HXjsEV.mjs';
4
6
  import 'drizzle-orm/sqlite-proxy';
5
7
 
6
8
  /**
package/dist/index.d.ts CHANGED
@@ -1,6 +1,8 @@
1
- import { H as HaexHubConfig, a as HaexVaultClient } from './client-UgMJJ4NT.js';
2
- export { A as ApplicationContext, C as ContextChangedEvent, v as DEFAULT_TIMEOUT, D as DatabaseAPI, m as DatabaseColumnInfo, k as DatabaseExecuteParams, g as DatabasePermission, h as DatabasePermissionRequest, i as DatabaseQueryParams, j as DatabaseQueryResult, l as DatabaseTableInfo, u as ErrorCode, e as EventCallback, E as ExtensionInfo, n as ExtensionManifest, F as FilesystemAPI, x as HAEXTENSION_EVENTS, w as HaexHubError, d as HaexHubEvent, b as HaexHubRequest, c as HaexHubResponse, y as HaextensionEvent, f as PermissionResponse, t as PermissionStatus, P as PermissionsAPI, o as SearchQuery, q as SearchRequestEvent, p as SearchResult, T as TABLE_SEPARATOR, W as WebAPI, r as WebRequestOptions, s as WebResponse } from './client-UgMJJ4NT.js';
3
- export { HaextensionConfig } from './node.js';
1
+ import { H as HaexVaultClient } from './client-DeP-DCz5.js';
2
+ export { D as DatabaseAPI, F as FilesystemAPI, P as PermissionsAPI, W as WebAPI } from './client-DeP-DCz5.js';
3
+ import { H as HaexHubConfig } from './types-DiGbHxTr.js';
4
+ export { A as ApplicationContext, C as ContextChangedEvent, r as DEFAULT_TIMEOUT, m as DatabaseColumnInfo, k as DatabaseExecuteParams, i as DatabasePermission, d as DatabasePermissionRequest, j as DatabaseQueryParams, D as DatabaseQueryResult, l as DatabaseTableInfo, q as ErrorCode, e as EventCallback, a as ExtensionInfo, E as ExtensionManifest, t as HAEXTENSION_EVENTS, s as HaexHubError, h as HaexHubEvent, f as HaexHubRequest, g as HaexHubResponse, u as HaextensionEvent, P as PermissionResponse, p as PermissionStatus, n as SearchQuery, o as SearchRequestEvent, S as SearchResult, T as TABLE_SEPARATOR, W as WebRequestOptions, c as WebResponse } from './types-DiGbHxTr.js';
5
+ export { H as HaextensionConfig } from './config-D_HXjsEV.js';
4
6
  import 'drizzle-orm/sqlite-proxy';
5
7
 
6
8
  /**
package/dist/node.d.mts CHANGED
@@ -1,33 +1,18 @@
1
- interface HaextensionConfig {
2
- dev?: {
3
- port?: number;
4
- host?: string;
5
- haextension_dir?: string;
6
- };
7
- keys?: {
8
- public_key_path?: string;
9
- private_key_path?: string;
10
- };
11
- build?: {
12
- distDir?: string;
13
- /**
14
- * Source path for migrations directory (relative to project root).
15
- * If manifest.migrationsDir is set, this directory will be copied
16
- * to the bundle at the path specified in migrationsDir.
17
- * Default: "app/{migrationsDir}" (for Nuxt projects)
18
- * Example: "app/database/migrations" -> copies to "database/migrations" in bundle
19
- */
20
- migrationsSourceDir?: string;
21
- };
1
+ export { H as HaextensionConfig, g as getExtensionDir, r as readHaextensionConfig } from './config-D_HXjsEV.mjs';
2
+ import { E as ExtensionManifest } from './types-DiGbHxTr.mjs';
3
+
4
+ interface ReadManifestOptions {
5
+ /** Root directory of the project */
6
+ rootDir: string;
7
+ /** Path to manifest.json (if not provided, will use extensionDir) */
8
+ manifestPath?: string;
9
+ /** Directory containing extension files (default: "haextension") */
10
+ extensionDir?: string;
22
11
  }
23
12
  /**
24
- * Read haextension.config.json from the project root
25
- * Returns null if file doesn't exist
26
- */
27
- declare function readHaextensionConfig(rootDir?: string): HaextensionConfig | null;
28
- /**
29
- * Get extension directory from config or use default
13
+ * Reads and processes the extension manifest.json file
14
+ * Falls back to package.json version if manifest doesn't specify one
30
15
  */
31
- declare function getExtensionDir(rootDir?: string): string;
16
+ declare function readManifest(options: ReadManifestOptions): ExtensionManifest | null;
32
17
 
33
- export { type HaextensionConfig, getExtensionDir, readHaextensionConfig };
18
+ export { ExtensionManifest, type ReadManifestOptions, readManifest };
package/dist/node.d.ts CHANGED
@@ -1,33 +1,18 @@
1
- interface HaextensionConfig {
2
- dev?: {
3
- port?: number;
4
- host?: string;
5
- haextension_dir?: string;
6
- };
7
- keys?: {
8
- public_key_path?: string;
9
- private_key_path?: string;
10
- };
11
- build?: {
12
- distDir?: string;
13
- /**
14
- * Source path for migrations directory (relative to project root).
15
- * If manifest.migrationsDir is set, this directory will be copied
16
- * to the bundle at the path specified in migrationsDir.
17
- * Default: "app/{migrationsDir}" (for Nuxt projects)
18
- * Example: "app/database/migrations" -> copies to "database/migrations" in bundle
19
- */
20
- migrationsSourceDir?: string;
21
- };
1
+ export { H as HaextensionConfig, g as getExtensionDir, r as readHaextensionConfig } from './config-D_HXjsEV.js';
2
+ import { E as ExtensionManifest } from './types-DiGbHxTr.js';
3
+
4
+ interface ReadManifestOptions {
5
+ /** Root directory of the project */
6
+ rootDir: string;
7
+ /** Path to manifest.json (if not provided, will use extensionDir) */
8
+ manifestPath?: string;
9
+ /** Directory containing extension files (default: "haextension") */
10
+ extensionDir?: string;
22
11
  }
23
12
  /**
24
- * Read haextension.config.json from the project root
25
- * Returns null if file doesn't exist
26
- */
27
- declare function readHaextensionConfig(rootDir?: string): HaextensionConfig | null;
28
- /**
29
- * Get extension directory from config or use default
13
+ * Reads and processes the extension manifest.json file
14
+ * Falls back to package.json version if manifest doesn't specify one
30
15
  */
31
- declare function getExtensionDir(rootDir?: string): string;
16
+ declare function readManifest(options: ReadManifestOptions): ExtensionManifest | null;
32
17
 
33
- export { type HaextensionConfig, getExtensionDir, readHaextensionConfig };
18
+ export { ExtensionManifest, type ReadManifestOptions, readManifest };