@typerighter/rpc-client 0.30.8 → 0.32.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.
package/dist/index.d.ts CHANGED
@@ -19,7 +19,9 @@ export interface TdDiagnosticItem {
19
19
  message: string;
20
20
  }
21
21
  export interface TdContentNotification {
22
- content: string;
22
+ filepath: string;
23
+ affectedFiles?: string[];
24
+ renamedTo?: string;
23
25
  }
24
26
  export interface TdFileMetadata {
25
27
  mtime: number;
@@ -37,6 +39,7 @@ export interface TdSidebarItem {
37
39
  schemaLabel?: string;
38
40
  label?: string;
39
41
  icon?: TdIcon;
42
+ excerpt?: string;
40
43
  metadata: TdFileMetadata;
41
44
  }
42
45
  export interface TdContentSummary {
@@ -130,6 +133,7 @@ export declare class RpcClient {
130
133
  onContentChanged(callback: (notification: TdContentNotification) => void): void;
131
134
  onContentCreated(callback: (notification: TdContentNotification) => void): void;
132
135
  onContentDeleted(callback: (notification: TdContentNotification) => void): void;
136
+ onContentRenamed(callback: (notification: TdContentNotification) => void): void;
133
137
  onSchemaChanged(callback: (notification: TdSchemaNotification) => void): void;
134
138
  onSchemaCreated(callback: (notification: TdSchemaNotification) => void): void;
135
139
  onSchemaDeleted(callback: (notification: TdSchemaNotification) => void): void;
package/dist/index.js CHANGED
@@ -27,6 +27,7 @@ const METHOD_FORMAT_FILE = 'typedown_build.format_file';
27
27
  const NOTIF_CONTENT_CHANGED = 'typedown_build.content_changed';
28
28
  const NOTIF_CONTENT_CREATED = 'typedown_build.content_created';
29
29
  const NOTIF_CONTENT_DELETED = 'typedown_build.content_deleted';
30
+ const NOTIF_CONTENT_RENAMED = 'typedown_build.content_renamed';
30
31
  const NOTIF_SCHEMA_CHANGED = 'typedown_build.schema_changed';
31
32
  const NOTIF_SCHEMA_CREATED = 'typedown_build.schema_created';
32
33
  const NOTIF_SCHEMA_DELETED = 'typedown_build.schema_deleted';
@@ -102,6 +103,9 @@ export class RpcClient {
102
103
  onContentDeleted(callback) {
103
104
  this.rpc.onNotification(NOTIF_CONTENT_DELETED, callback);
104
105
  }
106
+ onContentRenamed(callback) {
107
+ this.rpc.onNotification(NOTIF_CONTENT_RENAMED, callback);
108
+ }
105
109
  onSchemaChanged(callback) {
106
110
  this.rpc.onNotification(NOTIF_SCHEMA_CHANGED, callback);
107
111
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@typerighter/rpc-client",
4
- "version": "0.30.8",
4
+ "version": "0.32.0",
5
5
  "description": "JSON-RPC client for Typedown over TCP/stdio.",
6
6
  "repository": {
7
7
  "type": "git",
package/src/index.ts CHANGED
@@ -27,7 +27,9 @@ export interface TdDiagnosticItem {
27
27
  }
28
28
 
29
29
  export interface TdContentNotification {
30
- content: string;
30
+ filepath: string;
31
+ affectedFiles?: string[];
32
+ renamedTo?: string;
31
33
  }
32
34
 
33
35
  export interface TdFileMetadata {
@@ -48,6 +50,7 @@ export interface TdSidebarItem {
48
50
  schemaLabel?: string;
49
51
  label?: string;
50
52
  icon?: TdIcon;
53
+ excerpt?: string;
51
54
  metadata: TdFileMetadata;
52
55
  }
53
56
 
@@ -140,6 +143,7 @@ const METHOD_FORMAT_FILE = 'typedown_build.format_file';
140
143
  const NOTIF_CONTENT_CHANGED = 'typedown_build.content_changed';
141
144
  const NOTIF_CONTENT_CREATED = 'typedown_build.content_created';
142
145
  const NOTIF_CONTENT_DELETED = 'typedown_build.content_deleted';
146
+ const NOTIF_CONTENT_RENAMED = 'typedown_build.content_renamed';
143
147
  const NOTIF_SCHEMA_CHANGED = 'typedown_build.schema_changed';
144
148
  const NOTIF_SCHEMA_CREATED = 'typedown_build.schema_created';
145
149
  const NOTIF_SCHEMA_DELETED = 'typedown_build.schema_deleted';
@@ -238,6 +242,10 @@ export class RpcClient {
238
242
  this.rpc.onNotification(NOTIF_CONTENT_DELETED, callback);
239
243
  }
240
244
 
245
+ onContentRenamed (callback: (notification: TdContentNotification) => void): void {
246
+ this.rpc.onNotification(NOTIF_CONTENT_RENAMED, callback);
247
+ }
248
+
241
249
  onSchemaChanged (callback: (notification: TdSchemaNotification) => void): void {
242
250
  this.rpc.onNotification(NOTIF_SCHEMA_CHANGED, callback);
243
251
  }