@get-bb/plugin-sdk 0.6.68 → 0.6.75
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/README.md +2 -2
- package/bundled-types/bb-plugin-sdk-app.d.ts +1138 -348
- package/bundled-types/bb-plugin-sdk-internal-plugin-app-collector.d.ts +31 -4
- package/bundled-types/bb-plugin-sdk-internal-rpc-query-host.d.ts +6 -1
- package/bundled-types/bb-plugin-sdk-testing-app.d.ts +40 -11
- package/bundled-types/bb-plugin-sdk-testing.d.ts +1 -0
- package/bundled-types/bb-plugin-sdk.d.ts +6425 -5651
- package/dist/app.js +103 -4
- package/dist/index.js +21 -0
- package/dist/internal/composer-handle.js +1 -1
- package/dist/internal/plugin-app-collector.js +188 -63
- package/dist/internal/rpc-query-host.js +1169 -27
- package/dist/testing/app.js +1717 -185
- package/dist/testing/index.js +14 -0
- package/package.json +1 -1
package/dist/testing/index.js
CHANGED
|
@@ -3248,13 +3248,21 @@ function createFakePluginHostInternal(options, sharedState) {
|
|
|
3248
3248
|
};
|
|
3249
3249
|
const rpcHandlers = /* @__PURE__ */ new Map();
|
|
3250
3250
|
const rpcInvalidations = [];
|
|
3251
|
+
const invalidationListeners = /* @__PURE__ */ new Set();
|
|
3251
3252
|
const rpc = {
|
|
3253
|
+
experimental_whileWatched(method) {
|
|
3254
|
+
assertLive();
|
|
3255
|
+
if (!rpcHandlers.has(method))
|
|
3256
|
+
throw new Error(`Unknown RPC method: ${method}`);
|
|
3257
|
+
},
|
|
3252
3258
|
experimental_invalidate(tags) {
|
|
3253
3259
|
assertLive();
|
|
3260
|
+
for (const listener of invalidationListeners) listener();
|
|
3254
3261
|
rpcInvalidations.push(rpcInvalidationTags.parse(tags));
|
|
3255
3262
|
},
|
|
3256
3263
|
experimental_invalidateAll() {
|
|
3257
3264
|
assertLive();
|
|
3265
|
+
for (const listener of invalidationListeners) listener();
|
|
3258
3266
|
rpcInvalidations.push(null);
|
|
3259
3267
|
},
|
|
3260
3268
|
register(contract, handlers, registrationOptions) {
|
|
@@ -3907,6 +3915,12 @@ function createFakePluginHostInternal(options, sharedState) {
|
|
|
3907
3915
|
},
|
|
3908
3916
|
pluginId,
|
|
3909
3917
|
logEntries,
|
|
3918
|
+
experimental_onRpcInvalidation(listener) {
|
|
3919
|
+
invalidationListeners.add(listener);
|
|
3920
|
+
return () => {
|
|
3921
|
+
invalidationListeners.delete(listener);
|
|
3922
|
+
};
|
|
3923
|
+
},
|
|
3910
3924
|
experimental_rpcInvalidations: rpcInvalidations,
|
|
3911
3925
|
realtimeSignals,
|
|
3912
3926
|
needsConfigurationMessages,
|