@hocuspocus/extension-database 2.9.0 → 2.9.1-rc.0

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.
@@ -1,13 +1,17 @@
1
1
  import type { AbstractType, YArrayEvent } from 'yjs';
2
2
  import { HocuspocusProvider, HocuspocusProviderConfiguration } from './HocuspocusProvider.js';
3
3
  import { TiptapCollabProviderWebsocket } from './TiptapCollabProviderWebsocket.js';
4
- import type { THistoryVersion } from './types';
5
- export type TiptapCollabProviderConfiguration = Required<Pick<HocuspocusProviderConfiguration, 'name'>> & Partial<HocuspocusProviderConfiguration> & (Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'websocketProvider'>> | Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'appId'>>);
4
+ import type { THistoryVersion } from './types.js';
5
+ export type TiptapCollabProviderConfiguration = Required<Pick<HocuspocusProviderConfiguration, 'name'>> & Partial<HocuspocusProviderConfiguration> & (Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'websocketProvider'>> | Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'appId'>> | Required<Pick<AdditionalTiptapCollabProviderConfiguration, 'baseUrl'>>);
6
6
  export interface AdditionalTiptapCollabProviderConfiguration {
7
7
  /**
8
8
  * A Hocuspocus Cloud App ID, get one here: https://cloud.tiptap.dev
9
9
  */
10
10
  appId?: string;
11
+ /**
12
+ * If you are using the on-premise version of TiptapCollab, put your baseUrl here (e.g. https://collab.yourdomain.com)
13
+ */
14
+ baseUrl?: string;
11
15
  websocketProvider?: TiptapCollabProviderWebsocket;
12
16
  }
13
17
  export declare class TiptapCollabProvider extends HocuspocusProvider {
@@ -4,7 +4,11 @@ export interface AdditionalTiptapCollabProviderWebsocketConfiguration {
4
4
  /**
5
5
  * A Hocuspocus Cloud App ID, get one here: https://cloud.tiptap.dev
6
6
  */
7
- appId: string;
7
+ appId?: string;
8
+ /**
9
+ * If you are using the on-premise version of TiptapCollab, put your baseUrl here (e.g. https://collab.yourdomain.com)
10
+ */
11
+ baseUrl?: string;
8
12
  }
9
13
  export declare class TiptapCollabProviderWebsocket extends HocuspocusProviderWebsocket {
10
14
  constructor(configuration: TiptapCollabProviderWebsocketConfiguration);
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import { IncomingMessage } from 'http';
3
3
  import WebSocket, { AddressInfo } from 'ws';
4
- import { Server as HocuspocusServer } from './Server';
4
+ import { Server as HocuspocusServer } from './Server.js';
5
5
  import { Debugger } from './Debugger.js';
6
6
  import { DirectConnection } from './DirectConnection.js';
7
7
  import Document from './Document.js';
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import { IncomingMessage, Server as HTTPServer, ServerResponse } from 'http';
3
3
  import { WebSocketServer } from 'ws';
4
- import { Hocuspocus } from './Hocuspocus';
4
+ import { Hocuspocus } from './Hocuspocus.js';
5
5
  export declare class Server {
6
6
  httpServer: HTTPServer;
7
7
  webSocketServer: WebSocketServer;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hocuspocus/extension-database",
3
3
  "description": "a generic Hocuspocus persistence driver for the database",
4
- "version": "2.9.0",
4
+ "version": "2.9.1-rc.0",
5
5
  "homepage": "https://hocuspocus.dev",
6
6
  "keywords": [
7
7
  "hocuspocus",
@@ -27,7 +27,7 @@
27
27
  "dist"
28
28
  ],
29
29
  "dependencies": {
30
- "@hocuspocus/server": "^2.9.0"
30
+ "@hocuspocus/server": "^2.9.1-rc.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "yjs": "^13.6.8"