@haex-space/vault-sdk 2.2.6 → 2.2.7
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/{client-wxMr0ONL.d.mts → client-BIiJwbdW.d.mts} +1 -1
- package/dist/{client-DeP-DCz5.d.ts → client-D4hDL-PR.d.ts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/dist/node.d.mts +1 -1
- package/dist/node.d.ts +1 -1
- package/dist/react.d.mts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +5 -3
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +5 -3
- package/dist/react.mjs.map +1 -1
- package/dist/runtime/nuxt.plugin.client.d.mts +2 -2
- package/dist/runtime/nuxt.plugin.client.d.ts +2 -2
- package/dist/runtime/nuxt.plugin.client.js +5 -3
- package/dist/runtime/nuxt.plugin.client.js.map +1 -1
- package/dist/runtime/nuxt.plugin.client.mjs +5 -3
- package/dist/runtime/nuxt.plugin.client.mjs.map +1 -1
- package/dist/svelte.d.mts +2 -2
- package/dist/svelte.d.ts +2 -2
- package/dist/svelte.js +5 -3
- package/dist/svelte.js.map +1 -1
- package/dist/svelte.mjs +5 -3
- package/dist/svelte.mjs.map +1 -1
- package/dist/{types-DiGbHxTr.d.mts → types-FE9ewl3r.d.mts} +23 -1
- package/dist/{types-DiGbHxTr.d.ts → types-FE9ewl3r.d.ts} +23 -1
- package/dist/vue.d.mts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +5 -3
- package/dist/vue.js.map +1 -1
- package/dist/vue.mjs +5 -3
- package/dist/vue.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -22,6 +22,28 @@ type HaextensionEvent = typeof HAEXTENSION_EVENTS[keyof typeof HAEXTENSION_EVENT
|
|
|
22
22
|
|
|
23
23
|
declare const DEFAULT_TIMEOUT = 30000;
|
|
24
24
|
declare const TABLE_SEPARATOR = "__";
|
|
25
|
+
/**
|
|
26
|
+
* Build a fully qualified table name for extensions.
|
|
27
|
+
* Use this in Drizzle schemas to create table names at build time.
|
|
28
|
+
*
|
|
29
|
+
* @param publicKey - The extension's public key (from manifest.json)
|
|
30
|
+
* @param extensionName - The extension name (from manifest.json or package.json)
|
|
31
|
+
* @param tableName - The table name (e.g., "users", "items")
|
|
32
|
+
* @returns Fully qualified table name: `{publicKey}__{extensionName}__{tableName}`
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* import { getTableName } from "@haex-space/vault-sdk";
|
|
37
|
+
* import manifest from "../haextension/manifest.json";
|
|
38
|
+
* import pkg from "../package.json";
|
|
39
|
+
*
|
|
40
|
+
* const tableName = (name: string) =>
|
|
41
|
+
* getTableName(manifest.publicKey, manifest.name || pkg.name, name);
|
|
42
|
+
*
|
|
43
|
+
* export const users = sqliteTable(tableName("users"), { ... });
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
declare function getTableName(publicKey: string, extensionName: string, tableName: string): string;
|
|
25
47
|
interface HaexHubRequest {
|
|
26
48
|
method: string;
|
|
27
49
|
params: Record<string, unknown>;
|
|
@@ -213,4 +235,4 @@ declare class HaexHubError extends Error {
|
|
|
213
235
|
};
|
|
214
236
|
}
|
|
215
237
|
|
|
216
|
-
export { type ApplicationContext as A, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E, type HaexHubConfig as H, type Migration as M, type PermissionResponse as P, type SearchResult as S, TABLE_SEPARATOR as T, type WebRequestOptions as W, type ExtensionInfo as a, type MigrationResult as b, type WebResponse as c, type DatabasePermissionRequest as d, type EventCallback as e, type HaexHubRequest as f, type HaexHubResponse as g, type HaexHubEvent as h, type DatabasePermission as i, type DatabaseQueryParams as j, type DatabaseExecuteParams as k, type DatabaseTableInfo as l, type DatabaseColumnInfo as m, type SearchQuery as n, type SearchRequestEvent as o, PermissionStatus as p, ErrorCode as q, DEFAULT_TIMEOUT as r,
|
|
238
|
+
export { type ApplicationContext as A, type ContextChangedEvent as C, type DatabaseQueryResult as D, type ExtensionManifest as E, type HaexHubConfig as H, type Migration as M, type PermissionResponse as P, type SearchResult as S, TABLE_SEPARATOR as T, type WebRequestOptions as W, type ExtensionInfo as a, type MigrationResult as b, type WebResponse as c, type DatabasePermissionRequest as d, type EventCallback as e, type HaexHubRequest as f, type HaexHubResponse as g, type HaexHubEvent as h, type DatabasePermission as i, type DatabaseQueryParams as j, type DatabaseExecuteParams as k, type DatabaseTableInfo as l, type DatabaseColumnInfo as m, type SearchQuery as n, type SearchRequestEvent as o, PermissionStatus as p, ErrorCode as q, DEFAULT_TIMEOUT as r, getTableName as s, HaexHubError as t, HAEXTENSION_EVENTS as u, type HaextensionEvent as v };
|
package/dist/vue.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultClient, S as StorageAPI } from './client-
|
|
1
|
+
import { H as HaexVaultClient, S as StorageAPI } from './client-BIiJwbdW.mjs';
|
|
2
2
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
|
-
import { H as HaexHubConfig } from './types-
|
|
4
|
+
import { H as HaexHubConfig } from './types-FE9ewl3r.mjs';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Vue 3 composable for HaexHub SDK
|
package/dist/vue.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { H as HaexVaultClient, S as StorageAPI } from './client-
|
|
1
|
+
import { H as HaexVaultClient, S as StorageAPI } from './client-D4hDL-PR.js';
|
|
2
2
|
import * as drizzle_orm_sqlite_proxy from 'drizzle-orm/sqlite-proxy';
|
|
3
3
|
import { Ref } from 'vue';
|
|
4
|
-
import { H as HaexHubConfig } from './types-
|
|
4
|
+
import { H as HaexHubConfig } from './types-FE9ewl3r.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Vue 3 composable for HaexHub SDK
|
package/dist/vue.js
CHANGED
|
@@ -366,6 +366,9 @@ var HAEXTENSION_METHODS = {
|
|
|
366
366
|
// src/types.ts
|
|
367
367
|
var DEFAULT_TIMEOUT = 3e4;
|
|
368
368
|
var TABLE_SEPARATOR = "__";
|
|
369
|
+
function getTableName(publicKey, extensionName, tableName) {
|
|
370
|
+
return `${publicKey}${TABLE_SEPARATOR}${extensionName}${TABLE_SEPARATOR}${tableName}`;
|
|
371
|
+
}
|
|
369
372
|
var HaexHubError = class extends Error {
|
|
370
373
|
constructor(code, messageKey, details) {
|
|
371
374
|
super(messageKey);
|
|
@@ -907,14 +910,13 @@ var HaexVaultClient = class {
|
|
|
907
910
|
}
|
|
908
911
|
this.validateTableName(tableName);
|
|
909
912
|
const { publicKey, name } = this._extensionInfo;
|
|
910
|
-
|
|
911
|
-
return `"${publicKey}${TABLE_SEPARATOR}${extensionName}${TABLE_SEPARATOR}${tableName}"`;
|
|
913
|
+
return `"${getTableName(publicKey, name, tableName)}"`;
|
|
912
914
|
}
|
|
913
915
|
getDependencyTableName(publicKey, extensionName, tableName) {
|
|
914
916
|
this.validatePublicKey(publicKey);
|
|
915
917
|
this.validateExtensionName(extensionName);
|
|
916
918
|
this.validateTableName(tableName);
|
|
917
|
-
return `"${publicKey
|
|
919
|
+
return `"${getTableName(publicKey, extensionName, tableName)}"`;
|
|
918
920
|
}
|
|
919
921
|
parseTableName(fullTableName) {
|
|
920
922
|
let cleanTableName = fullTableName;
|