@typerighter/rpc-client 0.35.0 → 0.37.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
@@ -21,7 +21,6 @@ export interface TdDiagnosticItem {
21
21
  export interface TdContentNotification {
22
22
  filepath: string;
23
23
  affectedFiles?: string[];
24
- renamedTo?: string;
25
24
  }
26
25
  export interface TdFileMetadata {
27
26
  mtime: number;
@@ -130,12 +129,9 @@ export declare class RpcClient {
130
129
  getConfig(): Promise<TdSiteConfig>;
131
130
  checkVault(): Promise<TdDiagnosticReport>;
132
131
  formatFile(path: string): Promise<TdFormatResult>;
133
- onContentChanged(callback: (notification: TdContentNotification) => void): void;
134
- onContentCreated(callback: (notification: TdContentNotification) => void): void;
132
+ onContentUpdated(callback: (notification: TdContentNotification) => void): void;
135
133
  onContentDeleted(callback: (notification: TdContentNotification) => void): void;
136
- onContentRenamed(callback: (notification: TdContentNotification) => void): void;
137
- onSchemaChanged(callback: (notification: TdSchemaNotification) => void): void;
138
- onSchemaCreated(callback: (notification: TdSchemaNotification) => void): void;
134
+ onSchemaUpdated(callback: (notification: TdSchemaNotification) => void): void;
139
135
  onSchemaDeleted(callback: (notification: TdSchemaNotification) => void): void;
140
136
  onConfigChanged(callback: (config: TdSiteConfig) => void): void;
141
137
  }
package/dist/index.js CHANGED
@@ -24,12 +24,9 @@ const METHOD_GET_VERSION = 'typedown_build.get_version';
24
24
  const METHOD_GET_CONFIG = 'typedown_build.get_config';
25
25
  const METHOD_CHECK_VAULT = 'typedown_build.check_vault';
26
26
  const METHOD_FORMAT_FILE = 'typedown_build.format_file';
27
- const NOTIF_CONTENT_CHANGED = 'typedown_build.content_changed';
28
- const NOTIF_CONTENT_CREATED = 'typedown_build.content_created';
27
+ const NOTIF_CONTENT_UPDATED = 'typedown_build.content_updated';
29
28
  const NOTIF_CONTENT_DELETED = 'typedown_build.content_deleted';
30
- const NOTIF_CONTENT_RENAMED = 'typedown_build.content_renamed';
31
- const NOTIF_SCHEMA_CHANGED = 'typedown_build.schema_changed';
32
- const NOTIF_SCHEMA_CREATED = 'typedown_build.schema_created';
29
+ const NOTIF_SCHEMA_UPDATED = 'typedown_build.schema_updated';
33
30
  const NOTIF_SCHEMA_DELETED = 'typedown_build.schema_deleted';
34
31
  const NOTIF_CONFIG_CHANGED = 'typedown_build.config_changed';
35
32
  /**
@@ -94,23 +91,14 @@ export class RpcClient {
94
91
  return this.rpc.sendRequest(METHOD_FORMAT_FILE, { filePath: path });
95
92
  }
96
93
  /* Notification handlers, server pushes these when FS changes are detected */
97
- onContentChanged(callback) {
98
- this.rpc.onNotification(NOTIF_CONTENT_CHANGED, callback);
99
- }
100
- onContentCreated(callback) {
101
- this.rpc.onNotification(NOTIF_CONTENT_CREATED, callback);
94
+ onContentUpdated(callback) {
95
+ this.rpc.onNotification(NOTIF_CONTENT_UPDATED, callback);
102
96
  }
103
97
  onContentDeleted(callback) {
104
98
  this.rpc.onNotification(NOTIF_CONTENT_DELETED, callback);
105
99
  }
106
- onContentRenamed(callback) {
107
- this.rpc.onNotification(NOTIF_CONTENT_RENAMED, callback);
108
- }
109
- onSchemaChanged(callback) {
110
- this.rpc.onNotification(NOTIF_SCHEMA_CHANGED, callback);
111
- }
112
- onSchemaCreated(callback) {
113
- this.rpc.onNotification(NOTIF_SCHEMA_CREATED, callback);
100
+ onSchemaUpdated(callback) {
101
+ this.rpc.onNotification(NOTIF_SCHEMA_UPDATED, callback);
114
102
  }
115
103
  onSchemaDeleted(callback) {
116
104
  this.rpc.onNotification(NOTIF_SCHEMA_DELETED, callback);
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.35.0",
4
+ "version": "0.37.0",
5
5
  "description": "JSON-RPC client for Typedown over TCP/stdio.",
6
6
  "repository": {
7
7
  "type": "git",
package/src/index.ts CHANGED
@@ -29,7 +29,6 @@ export interface TdDiagnosticItem {
29
29
  export interface TdContentNotification {
30
30
  filepath: string;
31
31
  affectedFiles?: string[];
32
- renamedTo?: string;
33
32
  }
34
33
 
35
34
  export interface TdFileMetadata {
@@ -140,12 +139,9 @@ const METHOD_GET_CONFIG = 'typedown_build.get_config';
140
139
  const METHOD_CHECK_VAULT = 'typedown_build.check_vault';
141
140
  const METHOD_FORMAT_FILE = 'typedown_build.format_file';
142
141
 
143
- const NOTIF_CONTENT_CHANGED = 'typedown_build.content_changed';
144
- const NOTIF_CONTENT_CREATED = 'typedown_build.content_created';
142
+ const NOTIF_CONTENT_UPDATED = 'typedown_build.content_updated';
145
143
  const NOTIF_CONTENT_DELETED = 'typedown_build.content_deleted';
146
- const NOTIF_CONTENT_RENAMED = 'typedown_build.content_renamed';
147
- const NOTIF_SCHEMA_CHANGED = 'typedown_build.schema_changed';
148
- const NOTIF_SCHEMA_CREATED = 'typedown_build.schema_created';
144
+ const NOTIF_SCHEMA_UPDATED = 'typedown_build.schema_updated';
149
145
  const NOTIF_SCHEMA_DELETED = 'typedown_build.schema_deleted';
150
146
  const NOTIF_CONFIG_CHANGED = 'typedown_build.config_changed';
151
147
 
@@ -230,28 +226,16 @@ export class RpcClient {
230
226
 
231
227
  /* Notification handlers, server pushes these when FS changes are detected */
232
228
 
233
- onContentChanged (callback: (notification: TdContentNotification) => void): void {
234
- this.rpc.onNotification(NOTIF_CONTENT_CHANGED, callback);
235
- }
236
-
237
- onContentCreated (callback: (notification: TdContentNotification) => void): void {
238
- this.rpc.onNotification(NOTIF_CONTENT_CREATED, callback);
229
+ onContentUpdated (callback: (notification: TdContentNotification) => void): void {
230
+ this.rpc.onNotification(NOTIF_CONTENT_UPDATED, callback);
239
231
  }
240
232
 
241
233
  onContentDeleted (callback: (notification: TdContentNotification) => void): void {
242
234
  this.rpc.onNotification(NOTIF_CONTENT_DELETED, callback);
243
235
  }
244
236
 
245
- onContentRenamed (callback: (notification: TdContentNotification) => void): void {
246
- this.rpc.onNotification(NOTIF_CONTENT_RENAMED, callback);
247
- }
248
-
249
- onSchemaChanged (callback: (notification: TdSchemaNotification) => void): void {
250
- this.rpc.onNotification(NOTIF_SCHEMA_CHANGED, callback);
251
- }
252
-
253
- onSchemaCreated (callback: (notification: TdSchemaNotification) => void): void {
254
- this.rpc.onNotification(NOTIF_SCHEMA_CREATED, callback);
237
+ onSchemaUpdated (callback: (notification: TdSchemaNotification) => void): void {
238
+ this.rpc.onNotification(NOTIF_SCHEMA_UPDATED, callback);
255
239
  }
256
240
 
257
241
  onSchemaDeleted (callback: (notification: TdSchemaNotification) => void): void {