@hasna/domains 0.0.28 → 0.0.30
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/cli/commands/dns.d.ts.map +1 -1
- package/dist/cli/commands/domain.d.ts.map +1 -1
- package/dist/cli/commands/outreach.d.ts.map +1 -1
- package/dist/cli/commands/owner.d.ts.map +1 -1
- package/dist/cli/commands/serve.d.ts.map +1 -1
- package/dist/cli/commands/ssl.d.ts.map +1 -1
- package/dist/cli/index.js +8239 -1400
- package/dist/cli/tui/App.d.ts.map +1 -1
- package/dist/cli/tui/DomainDetail.d.ts +1 -1
- package/dist/cli/tui/DomainDetail.d.ts.map +1 -1
- package/dist/db/dns-tools.d.ts +10 -6
- package/dist/db/dns-tools.d.ts.map +1 -1
- package/dist/db/domain-owners.d.ts +6 -21
- package/dist/db/domain-owners.d.ts.map +1 -1
- package/dist/db/domain-reputation.d.ts +0 -11
- package/dist/db/domain-reputation.d.ts.map +1 -1
- package/dist/db/domain-research.d.ts +1 -1
- package/dist/db/domain-research.d.ts.map +1 -1
- package/dist/db/domains.d.ts +51 -8
- package/dist/db/domains.d.ts.map +1 -1
- package/dist/db/history.d.ts +27 -0
- package/dist/db/history.d.ts.map +1 -0
- package/dist/db/monitoring.d.ts +2 -2
- package/dist/db/monitoring.d.ts.map +1 -1
- package/dist/db/owners.d.ts +48 -0
- package/dist/db/owners.d.ts.map +1 -0
- package/dist/db/reputation.d.ts +28 -0
- package/dist/db/reputation.d.ts.map +1 -0
- package/dist/db/store.d.ts +249 -0
- package/dist/db/store.d.ts.map +1 -0
- package/dist/generated/storage-kit/index.d.ts +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13292 -5988
- package/dist/lib/brandsight.d.ts +3 -3
- package/dist/lib/brandsight.d.ts.map +1 -1
- package/dist/lib/cloudflare.js +3 -3
- package/dist/lib/godaddy.d.ts +3 -3
- package/dist/lib/godaddy.d.ts.map +1 -1
- package/dist/lib/namecheap.d.ts +5 -5
- package/dist/lib/namecheap.d.ts.map +1 -1
- package/dist/lib/registrar.d.ts +4 -4
- package/dist/lib/registrar.d.ts.map +1 -1
- package/dist/lib/registrar.js +17 -17
- package/dist/lib/route53.js +3 -3
- package/dist/lib/sedo.d.ts +1 -1
- package/dist/lib/sedo.d.ts.map +1 -1
- package/dist/mcp/http.d.ts +8 -3
- package/dist/mcp/http.d.ts.map +1 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +9083 -6859
- package/dist/server/app.d.ts.map +1 -1
- package/dist/server/index.js +1014 -10
- package/dist/server/repo.d.ts +53 -1
- package/dist/server/repo.d.ts.map +1 -1
- package/package.json +4 -7
- package/dist/cli/commands/domains.d.ts +0 -3
- package/dist/cli/commands/domains.d.ts.map +0 -1
- package/dist/cli/commands/storage.d.ts +0 -3
- package/dist/cli/commands/storage.d.ts.map +0 -1
- package/dist/db/remote-storage.d.ts +0 -10
- package/dist/db/remote-storage.d.ts.map +0 -1
- package/dist/db/storage-sync.d.ts +0 -55
- package/dist/db/storage-sync.d.ts.map +0 -1
- package/dist/mcp/storage-tools.d.ts +0 -3
- package/dist/mcp/storage-tools.d.ts.map +0 -1
- package/dist/storage.d.ts +0 -5
- package/dist/storage.d.ts.map +0 -1
- package/dist/storage.js +0 -825
package/dist/server/repo.d.ts
CHANGED
|
@@ -12,7 +12,12 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import type { TypedQueryClient } from "../generated/storage-kit/index.js";
|
|
14
14
|
import type { Domain, CreateDomainInput, UpdateDomainInput, DomainStats, DomainOffer, CreateDomainOfferInput } from "../db/domain-records.js";
|
|
15
|
-
import type { DnsRecord, CreateDnsRecordInput } from "../db/dns-records.js";
|
|
15
|
+
import type { DnsRecord, CreateDnsRecordInput, UpdateDnsRecordInput } from "../db/dns-records.js";
|
|
16
|
+
import type { Alert, CreateAlertInput } from "../db/alerts.js";
|
|
17
|
+
import type { DomainEmailLink, CreateDomainEmailLinkInput } from "../db/domain-records.js";
|
|
18
|
+
import type { DomainOwner, CreateDomainOwnerInput, DomainWithOwner } from "../db/domain-owners.js";
|
|
19
|
+
import type { DomainHistory, CreateHistoryEntryInput } from "../db/domain-history.js";
|
|
20
|
+
import type { DomainReputation, CreateReputationInput } from "../db/domain-reputation.js";
|
|
16
21
|
export declare class HttpError extends Error {
|
|
17
22
|
readonly status: number;
|
|
18
23
|
constructor(status: number, message: string);
|
|
@@ -40,5 +45,52 @@ export declare class DomainsRepo {
|
|
|
40
45
|
deleteDnsRecord(id: string): Promise<boolean>;
|
|
41
46
|
listOffers(domainId: string): Promise<DomainOffer[]>;
|
|
42
47
|
createOffer(domainId: string, input: CreateDomainOfferInput): Promise<DomainOffer>;
|
|
48
|
+
getOffer(id: string): Promise<DomainOffer | null>;
|
|
49
|
+
updateDnsRecord(id: string, patch: UpdateDnsRecordInput): Promise<DnsRecord | null>;
|
|
50
|
+
listEmailLinks(domainId: string): Promise<DomainEmailLink[]>;
|
|
51
|
+
getEmailLink(id: string): Promise<DomainEmailLink | null>;
|
|
52
|
+
linkEmail(domainId: string, input: Omit<CreateDomainEmailLinkInput, "domain_id">): Promise<DomainEmailLink>;
|
|
53
|
+
listAlerts(domainId: string): Promise<Alert[]>;
|
|
54
|
+
getAlert(id: string): Promise<Alert | null>;
|
|
55
|
+
createAlert(domainId: string, input: Omit<CreateAlertInput, "domain_id">): Promise<Alert>;
|
|
56
|
+
deleteAlert(id: string): Promise<boolean>;
|
|
57
|
+
private ownerRow;
|
|
58
|
+
listOwnersForDomain(domainId: string): Promise<DomainOwner[]>;
|
|
59
|
+
listOwners(opts: {
|
|
60
|
+
search?: string;
|
|
61
|
+
source?: string;
|
|
62
|
+
verified?: boolean;
|
|
63
|
+
}): Promise<DomainOwner[]>;
|
|
64
|
+
getOwner(id: string): Promise<DomainOwner | null>;
|
|
65
|
+
createOwner(domainId: string, input: Omit<CreateDomainOwnerInput, "domain_id">): Promise<DomainOwner>;
|
|
66
|
+
updateOwner(id: string, patch: Partial<CreateDomainOwnerInput>): Promise<DomainOwner | null>;
|
|
67
|
+
deleteOwner(id: string): Promise<boolean>;
|
|
68
|
+
listDomainsWithOwners(): Promise<DomainWithOwner[]>;
|
|
69
|
+
private historyRow;
|
|
70
|
+
createHistory(domainId: string, input: Omit<CreateHistoryEntryInput, "domain_id">): Promise<DomainHistory>;
|
|
71
|
+
getHistory(id: string): Promise<DomainHistory | null>;
|
|
72
|
+
listHistory(domainId: string, opts: {
|
|
73
|
+
type?: string;
|
|
74
|
+
limit?: number;
|
|
75
|
+
}): Promise<DomainHistory[]>;
|
|
76
|
+
listHistoryByDateRange(start: string, end: string, domainId?: string): Promise<DomainHistory[]>;
|
|
77
|
+
deleteHistory(id: string): Promise<boolean>;
|
|
78
|
+
deleteHistoryByDomain(domainId: string): Promise<boolean>;
|
|
79
|
+
listHistoryChanges(): Promise<Array<{
|
|
80
|
+
domain_id: string;
|
|
81
|
+
domain_name: string;
|
|
82
|
+
latest_snapshot_type: string;
|
|
83
|
+
latest_snapshot_at: string;
|
|
84
|
+
snapshot_count: number;
|
|
85
|
+
}>>;
|
|
86
|
+
private reputationRow;
|
|
87
|
+
getReputation(domainId: string): Promise<DomainReputation | null>;
|
|
88
|
+
upsertReputation(domainId: string, input: Omit<CreateReputationInput, "domain_id">): Promise<DomainReputation>;
|
|
89
|
+
updateReputation(id: string, patch: Partial<CreateReputationInput>): Promise<DomainReputation | null>;
|
|
90
|
+
deleteReputation(id: string): Promise<boolean>;
|
|
91
|
+
listReputation(opts: {
|
|
92
|
+
blacklisted?: boolean;
|
|
93
|
+
threshold?: number;
|
|
94
|
+
}): Promise<DomainReputation[]>;
|
|
43
95
|
}
|
|
44
96
|
//# sourceMappingURL=repo.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../src/server/repo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAA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G,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAKjE,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,WAAW,CAAC,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAwC9G,gBAAgB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC;IAMrG,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAK9C,cAAc,CAAC,IAAI,EAAE;QAAE,WAAW,CAAC,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;CAcvG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/domains",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.30",
|
|
4
4
|
"description": "Domain portfolio, registrar, marketplace, and DNS management for AI agents — CLI + MCP + HTTP API + SDK, local SQLite or cloud Postgres",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -39,10 +39,6 @@
|
|
|
39
39
|
"types": "./dist/lib/route53.d.ts",
|
|
40
40
|
"import": "./dist/lib/route53.js"
|
|
41
41
|
},
|
|
42
|
-
"./storage": {
|
|
43
|
-
"types": "./dist/storage.d.ts",
|
|
44
|
-
"import": "./dist/storage.js"
|
|
45
|
-
},
|
|
46
42
|
"./sdk": {
|
|
47
43
|
"types": "./dist/sdk/index.d.ts",
|
|
48
44
|
"import": "./dist/sdk/index.js"
|
|
@@ -55,7 +51,7 @@
|
|
|
55
51
|
],
|
|
56
52
|
"scripts": {
|
|
57
53
|
"clean": "rm -rf dist",
|
|
58
|
-
"build": "bun run clean && bun build src/cli/index.ts --outdir dist/cli --target bun --external ink --external react --external chalk --external ink-text-input --external @modelcontextprotocol/sdk --external
|
|
54
|
+
"build": "bun run clean && bun build src/cli/index.ts --outdir dist/cli --target bun --external ink --external react --external chalk --external ink-text-input --external @modelcontextprotocol/sdk --external pg && bun build src/mcp/index.ts --outdir dist/mcp --target bun --external @modelcontextprotocol/sdk --external pg && bun build src/server/index.ts --outdir dist/server --target bun --external pg && bun build src/sdk/index.ts --outdir dist/sdk --target bun && bun build src/index.ts --outdir dist --target bun --external pg && bun build src/lib/capability.ts src/lib/cloudflare.ts src/lib/cloudflare-auth.ts src/lib/delegate.ts src/lib/registrar.ts src/lib/route53.ts --outdir dist/lib --target node --packages external && tsc --emitDeclarationOnly --outDir dist",
|
|
59
55
|
"typecheck": "tsc --noEmit",
|
|
60
56
|
"test": "bun test",
|
|
61
57
|
"sdk:gen": "bun run scripts/gen-sdk.ts",
|
|
@@ -99,7 +95,7 @@
|
|
|
99
95
|
"@aws-sdk/client-route-53": "^3.1067.0",
|
|
100
96
|
"@aws-sdk/client-route-53-domains": "^3.1067.0",
|
|
101
97
|
"@aws-sdk/credential-provider-ini": "3.972.53",
|
|
102
|
-
"@hasna/contracts": "0.
|
|
98
|
+
"@hasna/contracts": "^0.5.2",
|
|
103
99
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
104
100
|
"chalk": "^5.4.1",
|
|
105
101
|
"commander": "^13.1.0",
|
|
@@ -114,6 +110,7 @@
|
|
|
114
110
|
"@hasna/events": "^0.1.7"
|
|
115
111
|
},
|
|
116
112
|
"devDependencies": {
|
|
113
|
+
"@hasna/mcp-harness": "file:../open-mcp",
|
|
117
114
|
"@types/bun": "^1.3.14",
|
|
118
115
|
"@types/pg": "^8.20.0",
|
|
119
116
|
"@types/react": "^18.3.18",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"domains.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/domains.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuBzC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAyb7D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAkHzC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAE7D"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare class PgAdapterAsync {
|
|
2
|
-
private readonly pool;
|
|
3
|
-
constructor(connectionString: string);
|
|
4
|
-
run(sql: string, ...params: unknown[]): Promise<{
|
|
5
|
-
changes: number;
|
|
6
|
-
}>;
|
|
7
|
-
all(sql: string, ...params: unknown[]): Promise<unknown[]>;
|
|
8
|
-
close(): Promise<void>;
|
|
9
|
-
}
|
|
10
|
-
//# sourceMappingURL=remote-storage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"remote-storage.d.ts","sourceRoot":"","sources":["../../src/db/remote-storage.ts"],"names":[],"mappings":"AAmBA,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAO;gBAEhB,gBAAgB,EAAE,MAAM;IAI9B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAKpE,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAK1D,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { PgAdapterAsync } from "./remote-storage.js";
|
|
2
|
-
export declare const STORAGE_TABLES: readonly ["domains", "dns_records", "alerts", "domain_offers", "domain_emails", "domain_owners", "domain_history", "domain_reputation"];
|
|
3
|
-
export declare const DOMAINS_STORAGE_TABLES: readonly ["domains", "dns_records", "alerts", "domain_offers", "domain_emails", "domain_owners", "domain_history", "domain_reputation"];
|
|
4
|
-
type StorageTable = (typeof STORAGE_TABLES)[number];
|
|
5
|
-
export type StorageMode = "local" | "remote" | "hybrid";
|
|
6
|
-
export interface StorageSyncResult {
|
|
7
|
-
table: string;
|
|
8
|
-
rowsRead: number;
|
|
9
|
-
rowsWritten: number;
|
|
10
|
-
errors: string[];
|
|
11
|
-
}
|
|
12
|
-
export interface StorageSyncMeta {
|
|
13
|
-
table_name: string;
|
|
14
|
-
last_synced_at: string | null;
|
|
15
|
-
direction: "push" | "pull";
|
|
16
|
-
}
|
|
17
|
-
export type SyncResult = StorageSyncResult;
|
|
18
|
-
export type SyncMeta = StorageSyncMeta;
|
|
19
|
-
export interface StorageStatus {
|
|
20
|
-
configured: boolean;
|
|
21
|
-
env: typeof STORAGE_DATABASE_ENV;
|
|
22
|
-
mode: StorageMode;
|
|
23
|
-
service: "domains";
|
|
24
|
-
tables: typeof STORAGE_TABLES;
|
|
25
|
-
sync: StorageSyncMeta[];
|
|
26
|
-
}
|
|
27
|
-
export declare const DOMAINS_STORAGE_ENV = "DOMAINS_DATABASE_URL";
|
|
28
|
-
export declare const DOMAINS_STORAGE_FALLBACK_ENV = "HASNA_DOMAINS_DATABASE_URL";
|
|
29
|
-
export declare const DOMAINS_STORAGE_MODE_ENV = "DOMAINS_STORAGE_MODE";
|
|
30
|
-
export declare const DOMAINS_STORAGE_MODE_FALLBACK_ENV = "HASNA_DOMAINS_STORAGE_MODE";
|
|
31
|
-
export declare const STORAGE_DATABASE_ENV: readonly ["DOMAINS_DATABASE_URL", "HASNA_DOMAINS_DATABASE_URL"];
|
|
32
|
-
export declare const STORAGE_MODE_ENV: readonly ["DOMAINS_STORAGE_MODE", "HASNA_DOMAINS_STORAGE_MODE"];
|
|
33
|
-
export declare function getStorageDatabaseUrl(): string | null;
|
|
34
|
-
export declare function getStorageDatabaseEnvName(): (typeof STORAGE_DATABASE_ENV)[number] | null;
|
|
35
|
-
export declare function getStorageMode(): StorageMode;
|
|
36
|
-
export declare function getStoragePg(): Promise<PgAdapterAsync>;
|
|
37
|
-
export declare function runStorageMigrations(remote: PgAdapterAsync): Promise<void>;
|
|
38
|
-
export declare function storagePush(options?: {
|
|
39
|
-
tables?: string[];
|
|
40
|
-
}): Promise<StorageSyncResult[]>;
|
|
41
|
-
export declare function storagePull(options?: {
|
|
42
|
-
tables?: string[];
|
|
43
|
-
}): Promise<StorageSyncResult[]>;
|
|
44
|
-
export declare function storageSync(options?: {
|
|
45
|
-
tables?: string[];
|
|
46
|
-
}): Promise<{
|
|
47
|
-
pull: StorageSyncResult[];
|
|
48
|
-
push: StorageSyncResult[];
|
|
49
|
-
}>;
|
|
50
|
-
export declare function getStorageSyncMetaAll(): StorageSyncMeta[];
|
|
51
|
-
export declare function getStorageStatus(): StorageStatus;
|
|
52
|
-
export declare function getSyncMetaAll(): StorageSyncMeta[];
|
|
53
|
-
export declare function resolveTables(tables?: string[]): StorageTable[];
|
|
54
|
-
export {};
|
|
55
|
-
//# sourceMappingURL=storage-sync.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage-sync.d.ts","sourceRoot":"","sources":["../../src/db/storage-sync.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,eAAO,MAAM,cAAc,yIASjB,CAAC;AACX,eAAO,MAAM,sBAAsB,yIAAiB,CAAC;AAErD,KAAK,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAcpD,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAExD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;I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E,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAY/F;AAED,wBAAsB,WAAW,CAAC,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAY/F;AAED,wBAAsB,WAAW,CAAC,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAAC,IAAI,EAAE,iBAAiB,EAAE,CAAA;CAAE,CAAC,CAIpI;AAED,wBAAgB,qBAAqB,IAAI,eAAe,EAAE,CAIzD;AAED,wBAAgB,gBAAgB,IAAI,aAAa,CAShD;AAED,wBAAgB,cAAc,IAAI,eAAe,EAAE,CAElD;AAED,wBAAgB,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,YAAY,EAAE,CAO/D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage-tools.d.ts","sourceRoot":"","sources":["../../src/mcp/storage-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA8BzE,wBAAgB,2BAA2B,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CA2EnE"}
|
package/dist/storage.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { PG_MIGRATIONS } from "./db/pg-migrations.js";
|
|
2
|
-
export { PgAdapterAsync } from "./db/remote-storage.js";
|
|
3
|
-
export { DOMAINS_STORAGE_ENV, DOMAINS_STORAGE_FALLBACK_ENV, DOMAINS_STORAGE_MODE_ENV, DOMAINS_STORAGE_MODE_FALLBACK_ENV, DOMAINS_STORAGE_TABLES, STORAGE_DATABASE_ENV, STORAGE_MODE_ENV, STORAGE_TABLES, getStorageDatabaseEnvName, getStorageDatabaseUrl, getStorageMode, getStoragePg, getStorageStatus, getStorageSyncMetaAll, getSyncMetaAll, resolveTables, runStorageMigrations, storagePull, storagePush, storageSync, } from "./db/storage-sync.js";
|
|
4
|
-
export type { StorageMode, StorageStatus, StorageSyncMeta, StorageSyncResult, SyncMeta, SyncResult, } from "./db/storage-sync.js";
|
|
5
|
-
//# sourceMappingURL=storage.d.ts.map
|
package/dist/storage.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EACL,mBAAmB,EACnB,4BAA4B,EAC5B,wBAAwB,EACxB,iCAAiC,EACjC,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,yBAAyB,EACzB,qBAAqB,EACrB,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,qBAAqB,EACrB,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,WAAW,EACX,WAAW,EACX,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EACV,WAAW,EACX,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,QAAQ,EACR,UAAU,GACX,MAAM,sBAAsB,CAAC"}
|