@tensorix/metahub 0.2.0 → 0.2.1
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.js +18447 -16164
- package/dist/cli.js.map +43 -34
- package/dist/core/blobs.d.ts +10 -0
- package/dist/core/blobs.d.ts.map +1 -1
- package/dist/core/cache.d.ts +5 -0
- package/dist/core/cache.d.ts.map +1 -1
- package/dist/core/config.d.ts +4 -0
- package/dist/core/config.d.ts.map +1 -1
- package/dist/core/crdt.d.ts +7 -0
- package/dist/core/crdt.d.ts.map +1 -1
- package/dist/core/schema-init.d.ts +29 -0
- package/dist/core/schema-init.d.ts.map +1 -1
- package/dist/core/schema.d.ts +1 -1
- package/dist/core/schema.d.ts.map +1 -1
- package/dist/core/shares.d.ts +60 -0
- package/dist/core/shares.d.ts.map +1 -0
- package/dist/core/sites-core.d.ts.map +1 -1
- package/dist/core/sites.d.ts.map +1 -1
- package/dist/core/sync/auth.d.ts +15 -2
- package/dist/core/sync/auth.d.ts.map +1 -1
- package/dist/core/sync/blob-routes.d.ts.map +1 -1
- package/dist/core/sync/client.d.ts +5 -0
- package/dist/core/sync/client.d.ts.map +1 -1
- package/dist/core/sync/e2ee.d.ts +7 -0
- package/dist/core/sync/e2ee.d.ts.map +1 -1
- package/dist/core/sync/peers.d.ts +1 -2
- package/dist/core/sync/peers.d.ts.map +1 -1
- package/dist/core/sync/server.d.ts.map +1 -1
- package/dist/core/sync/share-actions.d.ts +69 -0
- package/dist/core/sync/share-actions.d.ts.map +1 -0
- package/dist/core/sync/share-export.d.ts +72 -0
- package/dist/core/sync/share-export.d.ts.map +1 -0
- package/dist/core/sync/share-render.d.ts +10 -0
- package/dist/core/sync/share-render.d.ts.map +1 -0
- package/dist/core/sync/share-serve.d.ts +3 -0
- package/dist/core/sync/share-serve.d.ts.map +1 -0
- package/dist/core/sync/storage-s3-bun.d.ts +9 -0
- package/dist/core/sync/storage-s3-bun.d.ts.map +1 -1
- package/dist/core/sync/storage-url.d.ts +18 -0
- package/dist/core/sync/storage-url.d.ts.map +1 -0
- package/dist/db-worker.js +92 -62
- package/dist/index.js +19584 -17607
- package/dist/index.js.map +36 -29
- package/dist/sw.js +1 -1
- package/dist/webui/server/assets.d.ts.map +1 -1
- package/dist/webui/server/routes.d.ts.map +1 -1
- package/dist/webui/server/share-routes.d.ts +3 -0
- package/dist/webui/server/share-routes.d.ts.map +1 -0
- package/dist/webui.js +84 -58
- package/package.json +2 -1
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { type S3Config } from "./storage.ts";
|
|
2
|
+
/** SigV4 presigned GET cap: 7 days (604800s) is the protocol maximum. */
|
|
3
|
+
export declare const MAX_PRESIGN_SECONDS = 604800;
|
|
4
|
+
/**
|
|
5
|
+
* Build a presigned GET URL for one object (used by the object-storage share
|
|
6
|
+
* path — the recipient fetches the ciphertext directly from the bucket, no
|
|
7
|
+
* credential in the link). Addressing mirrors corsEndpoint (virtual-hosted vs
|
|
8
|
+
* path-style). `expiresSec` is clamped to the 7-day SigV4 maximum.
|
|
9
|
+
*/
|
|
10
|
+
export declare function presignGet(config: S3Config, key: string, expiresSec: number): Promise<string>;
|
|
2
11
|
/** Read the bucket's current CORS config (raw XML), or null if none is set. */
|
|
3
12
|
export declare function getBucketCors(config: S3Config): Promise<string | null>;
|
|
4
13
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-s3-bun.d.ts","sourceRoot":"","sources":["../../../src/core/sync/storage-s3-bun.ts"],"names":[],"mappings":"AAUA,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,cAAc,CAAC;AAiHtB,+EAA+E;AAC/E,wBAAsB,aAAa,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAS5E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAoB/F;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,QAAQ,EAChB,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAC7B,OAAO,CAAC,IAAI,CAAC,CAmBf"}
|
|
1
|
+
{"version":3,"file":"storage-s3-bun.d.ts","sourceRoot":"","sources":["../../../src/core/sync/storage-s3-bun.ts"],"names":[],"mappings":"AAUA,OAAO,EAML,KAAK,QAAQ,EACd,MAAM,cAAc,CAAC;AAiHtB,yEAAyE;AACzE,eAAO,MAAM,mBAAmB,SAAS,CAAC;AAE1C;;;;;GAKG;AACH,wBAAsB,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAanG;AAED,+EAA+E;AAC/E,wBAAsB,aAAa,CAAC,MAAM,EAAE,QAAQ,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAS5E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAoB/F;AAED;;;;;;GAMG;AACH,wBAAsB,aAAa,CACjC,MAAM,EAAE,QAAQ,EAChB,OAAO,EAAE,MAAM,EAAE,EACjB,IAAI,GAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAO,GAC7B,OAAO,CAAC,IAAI,CAAC,CAmBf"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const DEFAULT_STORAGE_PREFIX = "metahub";
|
|
2
|
+
/**
|
|
3
|
+
* Stable host[:port] component of an S3 endpoint for the peer key. The default
|
|
4
|
+
* port is stripped so `https://h` and `https://h:443` collapse to one key (that
|
|
5
|
+
* spurious split is exactly the collision class the endpoint-qualified key is
|
|
6
|
+
* meant to remove). Falls back to a parsed-by-hand host when the endpoint isn't
|
|
7
|
+
* a valid URL, kept deterministic.
|
|
8
|
+
*/
|
|
9
|
+
export declare function storageEndpointHost(endpoint: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Synthetic peer key for a storage peer: one per endpoint+bucket+prefix. The
|
|
12
|
+
* endpoint host is part of the identity because bucket names are only unique
|
|
13
|
+
* within a single S3-compatible endpoint (R2/MinIO/COS each have their own
|
|
14
|
+
* namespace) — without it, the same bucket+prefix on a second endpoint would
|
|
15
|
+
* collide with (and silently overwrite, keeping the stale cursor) the first.
|
|
16
|
+
*/
|
|
17
|
+
export declare function storageUrl(endpoint: string, bucket: string, prefix?: string): string;
|
|
18
|
+
//# sourceMappingURL=storage-url.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage-url.d.ts","sourceRoot":"","sources":["../../../src/core/sync/storage-url.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,sBAAsB,YAAY,CAAC;AAIhD;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY5D;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAGpF"}
|