@voltro/client 0.89.1 → 0.90.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/CHANGELOG.md +1835 -0
- package/README.md +22 -0
- package/dist/analytics.d.ts +68 -0
- package/dist/analytics.js +1 -0
- package/dist/awaitResolvedApi.js +45 -19
- package/dist/bootstrap.d.ts +0 -115
- package/dist/connectionSetupController.js +93 -61
- package/dist/index.d.ts +148 -162
- package/dist/index.js +87 -85
- package/dist/invocationWait.js +14 -0
- package/dist/mutationsBus.js +92 -35
- package/dist/outbox.js +147 -118
- package/dist/outboxState.js +7 -0
- package/dist/query.js +3 -10
- package/dist/rpcCallOnce.js +30 -0
- package/dist/rpcDeclared.js +7 -0
- package/dist/runRpc.js +9 -6
- package/dist/runtime.d.ts +16 -116
- package/dist/runtime.js +16 -16
- package/dist/traceBus.js +7 -1
- package/dist/unknownRpcTag.js +7 -0
- package/dist/uploadBytes.js +83 -0
- package/dist/uploadClient.js +153 -0
- package/dist/useAction.js +146 -72
- package/dist/useMutation.js +220 -133
- package/dist/useRpcCaller.js +74 -12
- package/dist/useRpcInvocationOwner.js +29 -0
- package/dist/useSubscription.js +52 -49
- package/dist/useTranscription.js +114 -42
- package/dist/useUpload.js +160 -242
- package/dist/useWorkflow.js +111 -246
- package/dist/workflowClient.js +126 -0
- package/package.json +7 -2
package/dist/index.js
CHANGED
|
@@ -1,87 +1,89 @@
|
|
|
1
1
|
import { registerCellMerger as e, registeredCellMerger as t } from "./cellMerger.js";
|
|
2
|
-
import { publishClientTrace as n,
|
|
3
|
-
import { clearClientDiagnostics as
|
|
4
|
-
import { stableKey as
|
|
5
|
-
import { LoadingSubscriptionCache as
|
|
6
|
-
import { publishClientError as
|
|
7
|
-
import { RpcErrorBus as
|
|
8
|
-
import { apiConnectivity as
|
|
9
|
-
import { INITIAL_RECOVERY_SNAPSHOT as
|
|
10
|
-
import { globalContext as
|
|
11
|
-
import { FrameworkRuntimesContext as
|
|
12
|
-
import { _resetFrameworkRuntimesWarning as
|
|
13
|
-
import { resolveByTag as
|
|
14
|
-
import { buildApiRuntime as
|
|
15
|
-
import { startApiSupervisor as
|
|
16
|
-
import { FrameworkRuntimesProvider as
|
|
17
|
-
import { browserStoreStorage as
|
|
18
|
-
import { applyStoreSeeds as
|
|
19
|
-
import { browserOnlineSource as
|
|
20
|
-
import { browserPlatform as
|
|
21
|
-
import { deepLinkHref as
|
|
22
|
-
import { useSubscription as
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
77
|
-
import {
|
|
78
|
-
import {
|
|
79
|
-
import {
|
|
80
|
-
import {
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
83
|
-
import {
|
|
84
|
-
import {
|
|
2
|
+
import { publishClientTrace as n, publishClientTraceRefusal as r, subscribeClientTraceRefusals as i, subscribeClientTraces as a } from "./traceBus.js";
|
|
3
|
+
import { clearClientDiagnostics as o, clientDiagnosticsSnapshot as s, disableClientDiagnosticsPersistence as c, enableClientDiagnosticsPersistence as l, recordClientDiagnostic as u, subscribeClientDiagnostics as d } from "./clientDiagnostics.js";
|
|
4
|
+
import { stableKey as f } from "./stableKey.js";
|
|
5
|
+
import { LoadingSubscriptionCache as p, SubscriptionCache as m, supersedesConfirmedPatches as h } from "./subscriptionCache.js";
|
|
6
|
+
import { publishClientError as g, reportClientError as _, subscribeClientErrors as v } from "./clientErrorBus.js";
|
|
7
|
+
import { RpcErrorBus as y } from "./rpcErrorBus.js";
|
|
8
|
+
import { apiConnectivity as b } from "./apiConnectivity.js";
|
|
9
|
+
import { INITIAL_RECOVERY_SNAPSHOT as x, RecoveryCoordinator as S, recoveryCoordinatorFor as C, resolveRecoveryOptions as w } from "./recoveryCoordinator.js";
|
|
10
|
+
import { globalContext as T } from "./globalContext.js";
|
|
11
|
+
import { FrameworkRuntimesContext as E, isUnresolvedApi as D, unknownApiError as O } from "./frameworkRuntimesContext.js";
|
|
12
|
+
import { _resetFrameworkRuntimesWarning as k, _resetSsrDescriptors as A, registerSsrDescriptors as j, ssrClientProxy as M, ssrDescriptorsFor as N, ssrStubHandle as P, useFrameworkApi as F, useFrameworkRuntimes as I } from "./runtimeContext.js";
|
|
13
|
+
import { resolveByTag as L } from "./tagWalk.js";
|
|
14
|
+
import { buildApiRuntime as R, makeProtocolOpenRecovery as z } from "./apiRuntime.js";
|
|
15
|
+
import { startApiSupervisor as B } from "./apiSupervisor.js";
|
|
16
|
+
import { FrameworkRuntimesProvider as V } from "./provider.js";
|
|
17
|
+
import { browserStoreStorage as H, resetStoreStorageForTest as U, resolveStoreStorage as W, setStoreStorage as G } from "./storeStorage.js";
|
|
18
|
+
import { applyStoreSeeds as K, clearStoreHistory as q, defineStore as J, definedStores as Y, makeStoreSeedBag as X, resetStoreRegistryForTests as Z, seedStore as Q, setStoreSeedResolver as $, shallow as ee, storeHistory as te, subscribeStoreHistory as ne, travelToStoreState as re } from "./store.js";
|
|
19
|
+
import { browserOnlineSource as ie } from "./onlineSource.js";
|
|
20
|
+
import { browserPlatform as ae, capabilitiesOf as oe, currentPlatform as se, definePlatform as ce, installPlatform as le, isPlatformInstalled as ue, isStandaloneDisplay as de, memoryTokenStore as fe, refusingTokenStore as pe, resetPlatformForTest as me, usePlatform as he, useShellExtension as ge } from "./platform.js";
|
|
21
|
+
import { deepLinkHref as _e, defineDeepLink as ve, dispatchDeepLink as ye, matchDeepLink as be, matchFirstDeepLink as xe, runDeepLink as Se } from "./deepLink.js";
|
|
22
|
+
import { useSubscription as Ce } from "./useSubscription.js";
|
|
23
|
+
import { useRpcDeclared as we } from "./rpcDeclared.js";
|
|
24
|
+
import { clearMutations as Te, getMutations as Ee, omitMutationInputs as De, omitMutationOutputs as Oe, startMutation as ke, subscribeMutations as Ae } from "./mutationsBus.js";
|
|
25
|
+
import { freshIdempotencyKey as je, withIdempotencyKey as Me } from "./mutationIdentity.js";
|
|
26
|
+
import { MutationSerialExecutionError as Ne } from "./mutationSerialExecution.js";
|
|
27
|
+
import { getMutationNotifier as Pe, setMutationNotifier as Fe, useMutation as Ie } from "./useMutation.js";
|
|
28
|
+
import { useAction as Le } from "./useAction.js";
|
|
29
|
+
import { formField as Re, formSections as ze, schemaToColumns as Be, schemaToFields as Ve } from "./schemaFields.js";
|
|
30
|
+
import { decodeFieldIssues as He, documentLocale as Ue, resolveValidationMessage as We, restrictToSchema as Ge, validateFields as Ke } from "./formBinding.js";
|
|
31
|
+
import { ValidationMessagesProvider as qe, useValidationMessages as Je } from "./validationMessages.js";
|
|
32
|
+
import { RICH_TEXT_MARKS as Ye, RICH_TEXT_MAX_NODES as Xe, RichTextDocument as Ze, emptyRichTextDocument as Qe, isRichTextDocument as $e, isSafeHref as et, parseRichText as tt, richTextToPlainText as nt, serializeRichText as rt } from "./richText.js";
|
|
33
|
+
import { FORM_FLASH_SCRIPT_ID as it } from "./formFlashId.js";
|
|
34
|
+
import { FORM_CAPTURE_FIELD as at, FORM_CAPTURE_META_NAME as ot, FORM_KEY_FIELD as st, FORM_PATH_PREFIX as ct, FORM_REDIRECT_FIELD as lt, FORM_SOURCE_FIELD as ut, encodeNativeFormCapture as dt, formActionPath as ft, formCaptureSource as pt, formSourcePath as mt, readFormCaptureSource as ht } from "./formSource.js";
|
|
35
|
+
import { formDataToInput as gt, recoverNativeFormValues as _t } from "./formData.js";
|
|
36
|
+
import { ServerRequestContext as vt, ServerRequestProvider as yt, useFormCapture as bt, useFormFlash as xt, useServerRequest as St } from "./serverRequest.js";
|
|
37
|
+
import { FormBindingProvider as Ct, useFormBinding as wt, useFormBindingContext as Tt, useFormField as Et, useSchemaFormBinding as Dt } from "./useFormBinding.js";
|
|
38
|
+
import { useConnectionSetup as Ot } from "./useConnectionSetup.js";
|
|
39
|
+
import { createHooks as kt } from "./createHooks.js";
|
|
40
|
+
import { applyPreloadSeeds as At, makePreloadSeedBag as jt, readPreloadedSeedOutcome as Mt, readPreloadedSnapshot as Nt, resetPreloadSeeds as Pt, seedPreloadedSubscription as Ft, seedPreloadedSubscriptionFailure as It, setPreloadSeedResolver as Lt } from "./preloadSeed.js";
|
|
41
|
+
import { usePreloadedSubscription as Rt } from "./usePreloadedSubscription.js";
|
|
42
|
+
import { useEvent as zt } from "./useEvent.js";
|
|
43
|
+
import { runSequence as Bt, sequence as Vt } from "./sequence.js";
|
|
44
|
+
import { useSequence as Ht } from "./useSequence.js";
|
|
45
|
+
import { useRpcCaller as Ut } from "./useRpcCaller.js";
|
|
46
|
+
import { useUpload as Wt } from "./useUpload.js";
|
|
47
|
+
import { useTranscription as Gt } from "./useTranscription.js";
|
|
48
|
+
import { useWorkflow as Kt, useWorkflowDomainEvents as qt, useWorkflowEventDeliveries as Jt, useWorkflowEvents as Yt, useWorkflowRun as Xt, useWorkflowRunEvents as Zt, useWorkflowRunSteps as Qt, useWorkflowRuns as $t, useWorkflowSignal as en, useWorkflowUpdate as tn } from "./useWorkflow.js";
|
|
49
|
+
import { useWorkflowRunState as nn } from "./useWorkflowRunState.js";
|
|
50
|
+
import { useAgentStream as rn } from "./useAgentStream.js";
|
|
51
|
+
import { resumableConsumeProgram as an, useResumableAgentStream as on } from "./useResumableAgentStream.js";
|
|
52
|
+
import { useAgentChat as sn } from "./useAgentChat.js";
|
|
53
|
+
import { useAgent as cn } from "./useAgent.js";
|
|
54
|
+
import { useDataCopilot as ln } from "./useDataCopilot.js";
|
|
55
|
+
import { useRefreshSubscription as un, useRefreshSubscriptions as dn } from "./useRefreshSubscriptions.js";
|
|
56
|
+
import { queryOnce as fn } from "./query.js";
|
|
57
|
+
import { isUnauthenticated as pn, wireAuthRefresh as mn } from "./authRefresh.js";
|
|
58
|
+
import { useOnRawRpcError as hn, useOnRpcError as gn } from "./useOnRpcError.js";
|
|
59
|
+
import { useSubscriptionHealth as _n } from "./useSubscriptionHealth.js";
|
|
60
|
+
import { encodeFormRejection as vn } from "./formRejection.js";
|
|
61
|
+
import { rowsToOptions as yn, useQueryField as bn } from "./useQueryField.js";
|
|
62
|
+
import { useDataTable as xn } from "./useDataTable.js";
|
|
63
|
+
import { provenanceUrl as Sn, useProvenance as Cn } from "./useProvenance.js";
|
|
64
|
+
import { ADMIN_SCOPE as wn, PermissionProvider as Tn, canCall as En, canCallAny as Dn, useCan as On, useCanAny as kn, usePermissions as An } from "./permissions.js";
|
|
65
|
+
import { decideAccess as jn, deriveEntityAdmins as Mn, manifestUrl as Nn, openAccessReason as Pn, requiredScopes as Fn, useAccessDecision as In, useCapabilityManifest as Ln } from "./useCapabilityManifest.js";
|
|
66
|
+
import { useUndo as Rn } from "./useUndo.js";
|
|
67
|
+
import { UNDO_APPLY_TAG as zn, UNDO_LOG_TAG as Bn, UNDO_REDO_TAG as Vn, useUndoLog as Hn } from "./useUndoLog.js";
|
|
68
|
+
import { defineTracking as Un, resolveTrackingEvent as Wn, useTracking as Gn, wrapTrackedCallbacks as Kn } from "./tracking.js";
|
|
69
|
+
import { useFormSkeleton as qn, useTableSkeleton as Jn } from "./useSkeleton.js";
|
|
70
|
+
import { shallowArrayEqual as Yn, sourceValues as Xn, useDerived as Zn } from "./useDerived.js";
|
|
71
|
+
import { useResourceCan as Qn, useResourceCans as $n } from "./useResourceCan.js";
|
|
72
|
+
import { filtersFromSchema as er, useQueryFilters as tr } from "./filters.js";
|
|
73
|
+
import { useRecord as nr } from "./useRecord.js";
|
|
74
|
+
import { useAsyncValidation as rr, useDebounced as ir, validationStatus as ar } from "./validation.js";
|
|
75
|
+
import { createAnalytics as or, defineEvent as sr, eventCatalog as cr, validateEventPayload as lr } from "./analyticsCatalog.js";
|
|
76
|
+
import { usePreview as ur } from "./usePreview.js";
|
|
77
|
+
import { readApiOnline as dr, subscribeApiOnline as fr, useApiOnline as pr } from "./useApiOnline.js";
|
|
78
|
+
import { clearSent as mr, defaultOutboxRetryDelay as hr, enqueueEntry as gr, markConflict as _r, markFailed as vr, markSent as yr, replayable as br, resolveConflictEntry as xr, useOutbox as Sr } from "./outbox.js";
|
|
79
|
+
import { OUTBOX_DB_NAME as Cr, OUTBOX_SYNC_TAG as wr, drainOutboxInWorker as Tr, drainOutboxOverHttp as Er, indexedDbOutboxPersistence as Dr, rpcHttpOutcome as Or } from "./outboxHttp.js";
|
|
80
|
+
import { computeWindow as kr, useWindowedSubscription as Ar } from "./useWindowedSubscription.js";
|
|
81
|
+
import { useConnectionStatus as jr } from "./useConnectionStatus.js";
|
|
82
|
+
import { runLocalQuery as Mr, useLocalQuery as Nr } from "./useLocalQuery.js";
|
|
83
|
+
import { CONNECTIONS_LIST_TAG as Pr, CONNECTION_DISCONNECT_TAG as Fr, CONNECTION_START_TAG as Ir, CONNECTION_SUBMIT_TOKEN_TAG as Lr, useConnection as Rr, useConnections as zr } from "./useConnections.js";
|
|
84
|
+
import { makeApiRoleSocketTracker as Br, makeApiSocketTracker as Vr } from "./apiSocketTracker.js";
|
|
85
|
+
import { DEV_ACTIVITY_EVENT as Hr, PAIRING_HOST as Ur, PAIRING_SCHEME as Wr, PAIRING_STORAGE_KEY as Gr, applyPairing as Kr, clearPairing as qr, errorMessage as Jr, errorTag as Yr, jsonSchemaDocumentOf as Xr, jsonSchemaOf as Zr, pairingLink as Qr, parsePairingLink as $r, readPairing as ei } from "@voltro/protocol";
|
|
86
|
+
import { DEFAULT_WEBHOOK_INSPECT_LIST as ti, MAX_WEBHOOK_INSPECT_OFFSET as ni, isWebhookEventActivity as ri, isWebhookInspectActivityStatus as ii, isWebhookInspectPagination as ai, webhookInspectListRequest as oi } from "@voltro/protocol/inspect";
|
|
85
87
|
// src/index.ts
|
|
86
|
-
var
|
|
87
|
-
export {
|
|
88
|
+
var si = "framework-client";
|
|
89
|
+
export { wn as ADMIN_SCOPE, si as CLIENT_NAME, Pr as CONNECTIONS_LIST_TAG, Fr as CONNECTION_DISCONNECT_TAG, Ir as CONNECTION_START_TAG, Lr as CONNECTION_SUBMIT_TOKEN_TAG, ti as DEFAULT_WEBHOOK_INSPECT_LIST, Hr as DEV_ACTIVITY_EVENT, at as FORM_CAPTURE_FIELD, ot as FORM_CAPTURE_META_NAME, it as FORM_FLASH_SCRIPT_ID, st as FORM_KEY_FIELD, ct as FORM_PATH_PREFIX, lt as FORM_REDIRECT_FIELD, ut as FORM_SOURCE_FIELD, Ct as FormBindingProvider, E as FrameworkRuntimesContext, V as FrameworkRuntimesProvider, x as INITIAL_RECOVERY_SNAPSHOT, p as LoadingSubscriptionCache, ni as MAX_WEBHOOK_INSPECT_OFFSET, Ne as MutationSerialExecutionError, Cr as OUTBOX_DB_NAME, wr as OUTBOX_SYNC_TAG, Ur as PAIRING_HOST, Wr as PAIRING_SCHEME, Gr as PAIRING_STORAGE_KEY, Tn as PermissionProvider, Ye as RICH_TEXT_MARKS, Xe as RICH_TEXT_MAX_NODES, S as RecoveryCoordinator, Ze as RichTextDocument, y as RpcErrorBus, vt as ServerRequestContext, yt as ServerRequestProvider, m as SubscriptionCache, zn as UNDO_APPLY_TAG, Bn as UNDO_LOG_TAG, Vn as UNDO_REDO_TAG, qe as ValidationMessagesProvider, k as _resetFrameworkRuntimesWarning, A as _resetSsrDescriptors, b as apiConnectivity, Kr as applyPairing, At as applyPreloadSeeds, K as applyStoreSeeds, ie as browserOnlineSource, ae as browserPlatform, H as browserStoreStorage, R as buildApiRuntime, En as canCall, Dn as canCallAny, oe as capabilitiesOf, o as clearClientDiagnostics, Te as clearMutations, qr as clearPairing, mr as clearSent, q as clearStoreHistory, s as clientDiagnosticsSnapshot, kr as computeWindow, or as createAnalytics, kt as createHooks, se as currentPlatform, jn as decideAccess, He as decodeFieldIssues, _e as deepLinkHref, hr as defaultOutboxRetryDelay, ve as defineDeepLink, sr as defineEvent, ce as definePlatform, J as defineStore, Un as defineTracking, Y as definedStores, Mn as deriveEntityAdmins, c as disableClientDiagnosticsPersistence, ye as dispatchDeepLink, Ue as documentLocale, Tr as drainOutboxInWorker, Er as drainOutboxOverHttp, Qe as emptyRichTextDocument, l as enableClientDiagnosticsPersistence, vn as encodeFormRejection, dt as encodeNativeFormCapture, gr as enqueueEntry, Jr as errorMessage, Yr as errorTag, cr as eventCatalog, er as filtersFromSchema, ft as formActionPath, pt as formCaptureSource, gt as formDataToInput, Re as formField, ze as formSections, mt as formSourcePath, je as freshIdempotencyKey, Pe as getMutationNotifier, Ee as getMutations, T as globalContext, Dr as indexedDbOutboxPersistence, le as installPlatform, ue as isPlatformInstalled, $e as isRichTextDocument, et as isSafeHref, de as isStandaloneDisplay, pn as isUnauthenticated, D as isUnresolvedApi, ri as isWebhookEventActivity, ii as isWebhookInspectActivityStatus, ai as isWebhookInspectPagination, Xr as jsonSchemaDocumentOf, Zr as jsonSchemaOf, Br as makeApiRoleSocketTracker, Vr as makeApiSocketTracker, jt as makePreloadSeedBag, z as makeProtocolOpenRecovery, X as makeStoreSeedBag, Nn as manifestUrl, _r as markConflict, vr as markFailed, yr as markSent, be as matchDeepLink, xe as matchFirstDeepLink, fe as memoryTokenStore, De as omitMutationInputs, Oe as omitMutationOutputs, Pn as openAccessReason, Qr as pairingLink, $r as parsePairingLink, tt as parseRichText, Sn as provenanceUrl, g as publishClientError, n as publishClientTrace, r as publishClientTraceRefusal, fn as queryOnce, dr as readApiOnline, ht as readFormCaptureSource, ei as readPairing, Mt as readPreloadedSeedOutcome, Nt as readPreloadedSnapshot, u as recordClientDiagnostic, _t as recoverNativeFormValues, C as recoveryCoordinatorFor, pe as refusingTokenStore, e as registerCellMerger, j as registerSsrDescriptors, t as registeredCellMerger, br as replayable, _ as reportClientError, Fn as requiredScopes, me as resetPlatformForTest, Pt as resetPreloadSeeds, Z as resetStoreRegistryForTests, U as resetStoreStorageForTest, L as resolveByTag, xr as resolveConflictEntry, w as resolveRecoveryOptions, W as resolveStoreStorage, Wn as resolveTrackingEvent, We as resolveValidationMessage, Ge as restrictToSchema, an as resumableConsumeProgram, nt as richTextToPlainText, yn as rowsToOptions, Or as rpcHttpOutcome, Se as runDeepLink, Mr as runLocalQuery, Bt as runSequence, Be as schemaToColumns, Ve as schemaToFields, Ft as seedPreloadedSubscription, It as seedPreloadedSubscriptionFailure, Q as seedStore, Vt as sequence, rt as serializeRichText, Fe as setMutationNotifier, Lt as setPreloadSeedResolver, $ as setStoreSeedResolver, G as setStoreStorage, ee as shallow, Yn as shallowArrayEqual, Xn as sourceValues, M as ssrClientProxy, N as ssrDescriptorsFor, P as ssrStubHandle, f as stableKey, B as startApiSupervisor, ke as startMutation, te as storeHistory, fr as subscribeApiOnline, d as subscribeClientDiagnostics, v as subscribeClientErrors, i as subscribeClientTraceRefusals, a as subscribeClientTraces, Ae as subscribeMutations, ne as subscribeStoreHistory, h as supersedesConfirmedPatches, re as travelToStoreState, O as unknownApiError, In as useAccessDecision, Le as useAction, cn as useAgent, sn as useAgentChat, rn as useAgentStream, pr as useApiOnline, rr as useAsyncValidation, On as useCan, kn as useCanAny, Ln as useCapabilityManifest, Rr as useConnection, Ot as useConnectionSetup, jr as useConnectionStatus, zr as useConnections, ln as useDataCopilot, xn as useDataTable, ir as useDebounced, Zn as useDerived, zt as useEvent, wt as useFormBinding, Tt as useFormBindingContext, bt as useFormCapture, Et as useFormField, xt as useFormFlash, qn as useFormSkeleton, F as useFrameworkApi, I as useFrameworkRuntimes, Nr as useLocalQuery, Ie as useMutation, hn as useOnRawRpcError, gn as useOnRpcError, Sr as useOutbox, An as usePermissions, he as usePlatform, Rt as usePreloadedSubscription, ur as usePreview, Cn as useProvenance, bn as useQueryField, tr as useQueryFilters, nr as useRecord, un as useRefreshSubscription, dn as useRefreshSubscriptions, Qn as useResourceCan, $n as useResourceCans, on as useResumableAgentStream, Ut as useRpcCaller, we as useRpcDeclared, Dt as useSchemaFormBinding, Ht as useSequence, St as useServerRequest, ge as useShellExtension, Ce as useSubscription, _n as useSubscriptionHealth, Jn as useTableSkeleton, Gn as useTracking, Gt as useTranscription, Rn as useUndo, Hn as useUndoLog, Wt as useUpload, Je as useValidationMessages, Ar as useWindowedSubscription, Kt as useWorkflow, qt as useWorkflowDomainEvents, Jt as useWorkflowEventDeliveries, Yt as useWorkflowEvents, Xt as useWorkflowRun, Zt as useWorkflowRunEvents, nn as useWorkflowRunState, Qt as useWorkflowRunSteps, $t as useWorkflowRuns, en as useWorkflowSignal, tn as useWorkflowUpdate, lr as validateEventPayload, Ke as validateFields, ar as validationStatus, oi as webhookInspectListRequest, mn as wireAuthRefresh, Me as withIdempotencyKey, Kn as wrapTrackedCallbacks };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/invocationWait.ts
|
|
2
|
+
var e = (e, t, n) => t === void 0 ? e : new Promise((r, i) => {
|
|
3
|
+
let a = !1, o = (e) => {
|
|
4
|
+
a || (a = !0, t.removeEventListener("abort", s), e());
|
|
5
|
+
}, s = () => o(() => {
|
|
6
|
+
try {
|
|
7
|
+
n(), i(new DOMException("operation aborted", "AbortError"));
|
|
8
|
+
} catch (e) {
|
|
9
|
+
i(e);
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
t.addEventListener("abort", s, { once: !0 }), e.then((e) => o(() => r(e)), (e) => o(() => i(e))), t.aborted && s();
|
|
13
|
+
});
|
|
14
|
+
export { e as waitForInvocation };
|
package/dist/mutationsBus.js
CHANGED
|
@@ -1,39 +1,96 @@
|
|
|
1
1
|
// src/mutationsBus.ts
|
|
2
|
-
var e = [], t = /* @__PURE__ */ new
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
r();
|
|
6
|
-
for (let e of t) try {
|
|
2
|
+
var e = [], t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set(), r = [], i = () => {
|
|
3
|
+
r = e.map((e) => e.event);
|
|
4
|
+
for (let e of n) try {
|
|
7
5
|
e();
|
|
8
6
|
} catch {}
|
|
9
|
-
}, a = (
|
|
10
|
-
let n =
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
7
|
+
}, a = (e) => {
|
|
8
|
+
let n = t.get(e.subject);
|
|
9
|
+
n?.entries.delete(e), n?.entries.size === 0 && (n.detach(), t.delete(e.subject));
|
|
10
|
+
}, o = (n) => {
|
|
11
|
+
let r = t.get(n);
|
|
12
|
+
if (r) {
|
|
13
|
+
t.delete(n), r.detach();
|
|
14
|
+
for (let t = e.length - 1; t >= 0; t--) r.entries.has(e[t]) && e.splice(t, 1);
|
|
15
|
+
r.entries.clear(), i();
|
|
16
|
+
}
|
|
17
|
+
}, s = (n, r) => {
|
|
18
|
+
if (r.aborted) return { settle: () => {} };
|
|
19
|
+
let s = {
|
|
20
|
+
subject: r,
|
|
21
|
+
event: {
|
|
22
|
+
...n,
|
|
23
|
+
input: n.inputOmitted === !0 ? void 0 : n.input,
|
|
24
|
+
subjectSignal: r,
|
|
25
|
+
kind: n.kind ?? "mutation",
|
|
26
|
+
status: "pending",
|
|
27
|
+
startedAt: Date.now()
|
|
28
|
+
}
|
|
29
|
+
}, c = t.get(r);
|
|
30
|
+
if (!c) {
|
|
31
|
+
let e = () => o(r);
|
|
32
|
+
c = {
|
|
33
|
+
entries: /* @__PURE__ */ new Set(),
|
|
34
|
+
detach: () => r.removeEventListener("abort", e)
|
|
35
|
+
}, t.set(r, c), r.addEventListener("abort", e, { once: !0 });
|
|
36
|
+
}
|
|
37
|
+
return c.entries.add(s), e.unshift(s), e.length > 100 && a(e.pop()), i(), { settle: (e) => {
|
|
38
|
+
if (r.aborted || s.event.status !== "pending" || !t.get(r)?.entries.has(s)) return;
|
|
39
|
+
let n = Date.now(), a = {
|
|
40
|
+
settledAt: n,
|
|
41
|
+
durationMs: n - s.event.startedAt
|
|
42
|
+
};
|
|
43
|
+
if (e.status === "error") s.event = {
|
|
44
|
+
...s.event,
|
|
45
|
+
status: "error",
|
|
46
|
+
error: e.error,
|
|
47
|
+
...a
|
|
48
|
+
};
|
|
49
|
+
else {
|
|
50
|
+
let { output: t, ...n } = s.event;
|
|
51
|
+
s.event = e.outputOmitted === !0 || n.outputOmitted === !0 ? {
|
|
52
|
+
...n,
|
|
53
|
+
status: "success",
|
|
54
|
+
outputOmitted: !0,
|
|
55
|
+
...a
|
|
56
|
+
} : {
|
|
57
|
+
...n,
|
|
58
|
+
status: "success",
|
|
59
|
+
output: e.output,
|
|
60
|
+
...a
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
i();
|
|
64
|
+
} };
|
|
65
|
+
}, c = () => r, l = (e) => (n.add(e), () => {
|
|
66
|
+
n.delete(e);
|
|
67
|
+
}), u = () => {
|
|
68
|
+
if (e.length !== 0) {
|
|
69
|
+
for (let e of t.values()) e.detach(), e.entries.clear();
|
|
70
|
+
t.clear(), e.length = 0, i();
|
|
71
|
+
}
|
|
72
|
+
}, d = (t, n) => {
|
|
73
|
+
let r = !1;
|
|
74
|
+
for (let i = 0; i < e.length; i++) {
|
|
75
|
+
let a = e[i];
|
|
76
|
+
if (!a || a.event.apiName !== t || a.event.tag !== n || a.event.outputOmitted === !0) continue;
|
|
77
|
+
let { output: o, ...s } = a.event;
|
|
78
|
+
a.event = {
|
|
79
|
+
...s,
|
|
80
|
+
outputOmitted: !0
|
|
81
|
+
}, r = !0;
|
|
82
|
+
}
|
|
83
|
+
r && i();
|
|
84
|
+
}, f = (t, n) => {
|
|
85
|
+
let r = !1;
|
|
86
|
+
for (let i = 0; i < e.length; i++) {
|
|
87
|
+
let a = e[i];
|
|
88
|
+
a && a.event.apiName === t && a.event.tag === n && a.event.inputOmitted !== !0 && (a.event = {
|
|
89
|
+
...a.event,
|
|
90
|
+
input: void 0,
|
|
91
|
+
inputOmitted: !0
|
|
92
|
+
}, r = !0);
|
|
93
|
+
}
|
|
94
|
+
r && i();
|
|
38
95
|
};
|
|
39
|
-
export {
|
|
96
|
+
export { u as clearMutations, c as getMutations, f as omitMutationInputs, d as omitMutationOutputs, s as startMutation, l as subscribeMutations };
|