@seedprotocol/feed-hyper 0.7.12-next.1434.gd03298c → 0.7.12-next.1475.gf78a8a4
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/index.d.ts +16 -15
- package/dist/openFeed.d.ts +2 -2
- package/dist/publishFeed.d.ts +1 -1
- package/dist/seedFeed.d.ts +1 -1
- package/dist/serveFeed.d.ts +1 -1
- package/dist/shims.d.ts +81 -0
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
3
|
-
export {
|
|
4
|
-
export
|
|
5
|
-
export {
|
|
6
|
-
export
|
|
7
|
-
export {
|
|
8
|
-
export
|
|
9
|
-
export {
|
|
10
|
-
export
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export
|
|
14
|
-
export type {
|
|
15
|
-
export {
|
|
1
|
+
/// <reference path="./shims.d.ts" />
|
|
2
|
+
export { feedDrivePath, feedHttpPath, resolveHttpToDrivePath, hyperFeedUrl, REGISTRY_PATH, } from './paths.js';
|
|
3
|
+
export type { ArchivePathOptions } from './paths.js';
|
|
4
|
+
export { openFeedStore, closeFeedStore, encodeKey, replicateStores, keyToBuffer, } from './store.js';
|
|
5
|
+
export type { FeedStoreHandles, OpenStoreOptions } from './store.js';
|
|
6
|
+
export { publishFeed } from './publishFeed.js';
|
|
7
|
+
export type { PublishFeedSession } from './publishFeed.js';
|
|
8
|
+
export { openFeed } from './openFeed.js';
|
|
9
|
+
export type { OpenedFeed } from './openFeed.js';
|
|
10
|
+
export { seedFeed } from './seedFeed.js';
|
|
11
|
+
export type { SeedFeedSession } from './seedFeed.js';
|
|
12
|
+
export { serveFeed, localFeedUrl } from './serveFeed.js';
|
|
13
|
+
export { watchFeed } from './watchFeed.js';
|
|
14
|
+
export type { WatchFeedOptions } from './watchFeed.js';
|
|
15
|
+
export type { PublishFeedOptions, PublishFeedResult, FeedRegistry, FeedRegistryEntry, OpenFeedOptions, SeedFeedOptions, ServeFeedOptions, ServeFeedResult, } from './types.js';
|
|
16
|
+
export { DEFAULT_SEED_FEED_HYPER_KEY } from './constants.js';
|
|
16
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/openFeed.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type FeedStoreHandles } from './store';
|
|
2
|
-
import type { FeedRegistry, OpenFeedOptions } from './types';
|
|
1
|
+
import { type FeedStoreHandles } from './store.js';
|
|
2
|
+
import type { FeedRegistry, OpenFeedOptions } from './types.js';
|
|
3
3
|
export type OpenedFeed = {
|
|
4
4
|
key: string;
|
|
5
5
|
version: number;
|
package/dist/publishFeed.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PublishFeedOptions, PublishFeedResult } from './types';
|
|
1
|
+
import type { PublishFeedOptions, PublishFeedResult } from './types.js';
|
|
2
2
|
export type PublishFeedSession = PublishFeedResult & {
|
|
3
3
|
/** Close Corestore / Hyperdrive / Hyperswarm. No-op if already closed. */
|
|
4
4
|
close: () => Promise<void>;
|
package/dist/seedFeed.d.ts
CHANGED
package/dist/serveFeed.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ServeFeedOptions, ServeFeedResult } from './types';
|
|
1
|
+
import type { ServeFeedOptions, ServeFeedResult } from './types.js';
|
|
2
2
|
/**
|
|
3
3
|
* Seed a feed drive and expose it over localhost HTTP via serve-drive.
|
|
4
4
|
* Serves both drive paths (`/posts/rss.xml`) and historical HTTP paths (`/posts/rss`).
|
package/dist/shims.d.ts
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
declare module 'corestore' {
|
|
2
|
+
import { EventEmitter } from 'events'
|
|
3
|
+
|
|
4
|
+
export default class Corestore extends EventEmitter {
|
|
5
|
+
constructor(storage: string | unknown, options?: object)
|
|
6
|
+
ready(): Promise<void>
|
|
7
|
+
close(): Promise<void>
|
|
8
|
+
get(keyOrOpts: Buffer | Uint8Array | string | { name?: string; key?: Buffer }): unknown
|
|
9
|
+
replicate(isInitiator?: boolean | unknown): NodeJS.ReadWriteStream
|
|
10
|
+
namespace(name: string): Corestore
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare module 'hyperdrive' {
|
|
15
|
+
import { EventEmitter } from 'events'
|
|
16
|
+
|
|
17
|
+
export default class Hyperdrive extends EventEmitter {
|
|
18
|
+
constructor(store: unknown, keyOrOpts?: Buffer | Uint8Array | string | { name?: string })
|
|
19
|
+
ready(): Promise<void>
|
|
20
|
+
close(): Promise<void>
|
|
21
|
+
get(path: string): Promise<Uint8Array | null>
|
|
22
|
+
put(path: string, buf: Uint8Array | Buffer): Promise<void>
|
|
23
|
+
readonly key: Buffer
|
|
24
|
+
readonly discoveryKey: Buffer
|
|
25
|
+
readonly version: number
|
|
26
|
+
readonly core: {
|
|
27
|
+
length: number
|
|
28
|
+
update(opts?: { wait?: boolean }): Promise<void>
|
|
29
|
+
on(event: string, listener: (...args: unknown[]) => void): void
|
|
30
|
+
off(event: string, listener: (...args: unknown[]) => void): void
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
declare module 'hyperswarm' {
|
|
36
|
+
import { EventEmitter } from 'events'
|
|
37
|
+
|
|
38
|
+
export default class Hyperswarm extends EventEmitter {
|
|
39
|
+
join(
|
|
40
|
+
topic: Buffer | Uint8Array,
|
|
41
|
+
opts?: { server?: boolean; client?: boolean },
|
|
42
|
+
): { flushed(): Promise<void> }
|
|
43
|
+
flush(): Promise<void>
|
|
44
|
+
destroy(): Promise<void>
|
|
45
|
+
on(event: 'connection', listener: (conn: unknown) => void): this
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
declare module 'hypercore-id-encoding' {
|
|
50
|
+
const ID: {
|
|
51
|
+
encode(key: Buffer | Uint8Array): string
|
|
52
|
+
decode(id: string): Uint8Array
|
|
53
|
+
normalize(key: Buffer | Uint8Array | string): string
|
|
54
|
+
}
|
|
55
|
+
export default ID
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
declare module 'serve-drive' {
|
|
59
|
+
export default class ServeDrive {
|
|
60
|
+
constructor(opts: {
|
|
61
|
+
get: (args: {
|
|
62
|
+
key: Buffer | null
|
|
63
|
+
filename: string
|
|
64
|
+
version: number
|
|
65
|
+
}) => unknown | Promise<unknown>
|
|
66
|
+
port?: number
|
|
67
|
+
host?: string
|
|
68
|
+
anyPort?: boolean
|
|
69
|
+
server?: unknown
|
|
70
|
+
token?: false | string | Buffer
|
|
71
|
+
})
|
|
72
|
+
ready(): Promise<void>
|
|
73
|
+
close?(): Promise<void>
|
|
74
|
+
suspend?(): Promise<void>
|
|
75
|
+
address(): { port: number; address?: string } | null
|
|
76
|
+
getLink?(
|
|
77
|
+
path: string,
|
|
78
|
+
opts?: { https?: boolean; host?: string; key?: string; version?: number },
|
|
79
|
+
): string
|
|
80
|
+
}
|
|
81
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seedprotocol/feed-hyper",
|
|
3
|
-
"version": "0.7.12-next.
|
|
3
|
+
"version": "0.7.12-next.1475.gf78a8a4",
|
|
4
4
|
"description": "Publish, seed and serve Seed Protocol feeds over Hyperdrive and Hyperswarm, with a localhost HTTP gateway and the seed-feed CLI",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"seed-protocol",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"node": ">=20"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
|
-
"build": "rimraf dist && tsc -p tsconfig.build.json && vite build",
|
|
41
|
+
"build": "rimraf dist && tsc -p tsconfig.build.json && vite build && node ../../scripts/fix-dts-specifiers.js && node ../../scripts/ship-ambient-dts.js src/shims.d.ts",
|
|
42
42
|
"test": "vitest run --reporter=default",
|
|
43
43
|
"prepublishOnly": "bun run build && node ../../scripts/sync-versions.js"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@seedprotocol/arweave": "0.7.12-next.
|
|
47
|
-
"@seedprotocol/feed": "0.7.12-next.
|
|
46
|
+
"@seedprotocol/arweave": "0.7.12-next.1475.gf78a8a4",
|
|
47
|
+
"@seedprotocol/feed": "0.7.12-next.1475.gf78a8a4",
|
|
48
48
|
"corestore": "^7.12.0",
|
|
49
49
|
"hypercore-id-encoding": "^1.3.0",
|
|
50
50
|
"hyperdrive": "^13.0.0",
|