@seedprotocol/feed-hyper 0.7.12-next.1434.gd03298c → 0.7.12-next.1484.g993627e

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 CHANGED
@@ -1,16 +1,17 @@
1
- export { feedDrivePath, feedHttpPath, resolveHttpToDrivePath, hyperFeedUrl, REGISTRY_PATH, } from './paths';
2
- export type { ArchivePathOptions } from './paths';
3
- export { openFeedStore, closeFeedStore, encodeKey, replicateStores, keyToBuffer, } from './store';
4
- export type { FeedStoreHandles, OpenStoreOptions } from './store';
5
- export { publishFeed } from './publishFeed';
6
- export type { PublishFeedSession } from './publishFeed';
7
- export { openFeed } from './openFeed';
8
- export type { OpenedFeed } from './openFeed';
9
- export { seedFeed } from './seedFeed';
10
- export type { SeedFeedSession } from './seedFeed';
11
- export { serveFeed, localFeedUrl } from './serveFeed';
12
- export { watchFeed } from './watchFeed';
13
- export type { WatchFeedOptions } from './watchFeed';
14
- export type { PublishFeedOptions, PublishFeedResult, FeedRegistry, FeedRegistryEntry, OpenFeedOptions, SeedFeedOptions, ServeFeedOptions, ServeFeedResult, } from './types';
15
- export { DEFAULT_SEED_FEED_HYPER_KEY } from './constants';
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
@@ -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;
@@ -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>;
@@ -1,4 +1,4 @@
1
- import type { SeedFeedOptions } from './types';
1
+ import type { SeedFeedOptions } from './types.js';
2
2
  export type SeedFeedSession = {
3
3
  key: string;
4
4
  close: () => Promise<void>;
@@ -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`).
@@ -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.1434.gd03298c",
3
+ "version": "0.7.12-next.1484.g993627e",
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.1434.gd03298c",
47
- "@seedprotocol/feed": "0.7.12-next.1434.gd03298c",
46
+ "@seedprotocol/arweave": "0.7.12-next.1484.g993627e",
47
+ "@seedprotocol/feed": "0.7.12-next.1484.g993627e",
48
48
  "corestore": "^7.12.0",
49
49
  "hypercore-id-encoding": "^1.3.0",
50
50
  "hyperdrive": "^13.0.0",