@punica/editor 1.6.13 → 1.6.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@punica/editor",
3
- "version": "1.6.13",
3
+ "version": "1.6.14",
4
4
  "description": "Punica Editor",
5
5
  "private": false,
6
6
  "type": "module",
@@ -192,6 +192,22 @@ declare module 'punica' {
192
192
  */
193
193
  cwd?: string;
194
194
 
195
+ /**
196
+ * Is a concrete provider installed behind this facade?
197
+ *
198
+ * **Substrate-provided — hosts must NOT implement this.** It exists only
199
+ * on the wrapper the substrate hands out as `punica.runtime.fs`, which is
200
+ * why it is optional: reading it off a raw provider object yields
201
+ * `undefined`, and a caller should treat that as "cannot tell, fall back".
202
+ *
203
+ * Answers without any filesystem access. Before it existed, the only way
204
+ * to detect a missing provider was to call a real method and match its
205
+ * error message — which cost a full recursive workspace walk for a
206
+ * boolean, and could not distinguish "no provider" from a provider that
207
+ * failed transiently.
208
+ */
209
+ hasProvider?(): boolean;
210
+
195
211
  /**
196
212
  * Returns the full file tree for the current workspace root.
197
213
  */
@@ -48,12 +48,26 @@ declare module 'punica' {
48
48
  query(options: SearchQueryOptions): Promise<SearchResponse>;
49
49
 
50
50
  /**
51
- * (Optional) Trigger a full or incremental index operation.
51
+ * (Optional) Trigger an index operation.
52
52
  * Implementations may ignore this if indexing is managed externally.
53
+ *
54
+ * Incremental by default — a host is expected to re-read only what
55
+ * changed since the last pass. `rebuild` asks for a from-scratch index,
56
+ * which a caller should only need after changing what gets indexed.
57
+ *
58
+ * `skipped` and `rebuilt` are optional so an older host stays conformant;
59
+ * a host that reports them makes "the index quietly grew to a gigabyte
60
+ * over a virtualenv" observable instead of invisible.
53
61
  */
54
62
  startIndex?(options?: {
55
63
  verbose?: boolean;
56
- }): Promise<void | { addedOrUpdated: number; removed: number }>;
64
+ rebuild?: boolean;
65
+ }): Promise<void | {
66
+ addedOrUpdated: number;
67
+ removed: number;
68
+ skipped?: number;
69
+ rebuilt?: boolean;
70
+ }>;
57
71
  }
58
72
  }
59
73
  }