@warmhub/sdk-ts 0.87.0 → 0.88.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/checkpoint.js +1 -1
- package/dist/checkpoint.js.map +1 -1
- package/dist/chunk-CZI7BWOX.js +8 -0
- package/dist/chunk-CZI7BWOX.js.map +1 -0
- package/dist/{chunk-2SDARM7P.js → chunk-YWDIWGQP.js} +16 -16
- package/dist/chunk-YWDIWGQP.js.map +1 -0
- package/dist/index.d.ts +421 -51
- package/dist/index.js +1 -1
- package/dist/react.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-2SDARM7P.js.map +0 -1
- package/dist/chunk-7C47GTDA.js +0 -8
- package/dist/chunk-7C47GTDA.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{g as AllStreamOperationsFailedError,p as CliCallVerificationError,t as DEFAULT_API_URL,d as DEFAULT_STREAM_CHUNK_SIZE,e as MAX_STREAM_APPEND_OPERATION_COUNT,r as OperationBuilder,f as PartialStreamSubmissionError,o as SDK_VERSION,D as WarmHubClient,w as WarmHubError,m as aggregateSubmittedStreamResult,n as completedOperationsFrom,B as connectionErrorMessage,i as countStreamAppendResultStatuses,b as createOperationEventRequestId,a as createOperationEventSubmissionId,A as isConnectionError,j as isDefiniteStreamAppendRejection,z as isRetryable,y as isWarmHubError,s as normalizeWref,l as offsetChunkResultIndexes,c as operationEventStreamRequestId,u as resolveFunctionLogMode,v as sanitizeErrorMessage,C as sdkVersionIsBelowMinimum,h as streamAppendResultStatus,k as submitOperationsViaStream,x as toWarmHubError,q as verifyCliCall}from'./chunk-
|
|
1
|
+
export{g as AllStreamOperationsFailedError,p as CliCallVerificationError,t as DEFAULT_API_URL,d as DEFAULT_STREAM_CHUNK_SIZE,e as MAX_STREAM_APPEND_OPERATION_COUNT,r as OperationBuilder,f as PartialStreamSubmissionError,o as SDK_VERSION,D as WarmHubClient,w as WarmHubError,m as aggregateSubmittedStreamResult,n as completedOperationsFrom,B as connectionErrorMessage,i as countStreamAppendResultStatuses,b as createOperationEventRequestId,a as createOperationEventSubmissionId,A as isConnectionError,j as isDefiniteStreamAppendRejection,z as isRetryable,y as isWarmHubError,s as normalizeWref,l as offsetChunkResultIndexes,c as operationEventStreamRequestId,u as resolveFunctionLogMode,v as sanitizeErrorMessage,C as sdkVersionIsBelowMinimum,h as streamAppendResultStatus,k as submitOperationsViaStream,x as toWarmHubError,q as verifyCliCall}from'./chunk-CZI7BWOX.js';export{m as CLI_INSTALL_REPO_HEADER,n as CLI_SIGNATURE_HEADER,o as CLI_TIMESTAMP_HEADER,w as CONTENT_FIELD_LIMIT_ERROR,v as MAX_CONTENT_FIELD_BYTES,y as ORG_AUTH_SCOPES,r as REPO_AUTH_SCOPES,x as contentFieldLimitError,z as isKnownOrgAuthScope,s as isKnownRepoAuthScope,M as validateAgainstShape}from'./chunk-YWDIWGQP.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/react.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {D}from'./chunk-
|
|
1
|
+
import {D}from'./chunk-CZI7BWOX.js';export{t as DEFAULT_API_URL,o as SDK_VERSION,D as WarmHubClient,w as WarmHubError,x as toWarmHubError}from'./chunk-CZI7BWOX.js';import'./chunk-YWDIWGQP.js';import {createContext,useMemo,useState,useEffect,useContext}from'react';import {jsx}from'react/jsx-runtime';var b=createContext(null),p=createContext({isAuthenticated:false,isLoading:true});function P({apiUrl:e,children:t,auth:i,client:o}){let r=o?.name,n=o?.version,s=useMemo(()=>new D({apiUrl:e,accessToken:async()=>await i.getAccessToken()??void 0,client:{name:r,version:n}}),[e,i.getAccessToken,r,n]);return jsx(b.Provider,{value:s,children:jsx(g,{auth:i,client:s,children:t})})}function g({auth:e,client:t,children:i}){let[o,r]=useState(null),n=e.isAuthenticated&&o===t;useEffect(()=>{if(!e.isAuthenticated){r(null);return}let u=false;return t.auth.sync().then(()=>{u||r(t);}).catch(f=>{console.error("auth.sync failed:",f),u||r(t);}),()=>{u=true;}},[e.isAuthenticated,t]);let s=useMemo(()=>({isAuthenticated:e.isAuthenticated&&n,isLoading:e.isLoading||e.isAuthenticated&&!n}),[e.isAuthenticated,e.isLoading,n]);return e.isLoading||e.isAuthenticated&&!n?null:jsx(p.Provider,{value:s,children:i})}function v(){let e=useContext(b);if(!e)throw new Error("useWarmHubClient must be used within a WarmHubProvider");return e}function S(){return useContext(p)}export{P as WarmHubProvider,S as useWarmHubAuth,v as useWarmHubClient};//# sourceMappingURL=react.js.map
|
|
2
2
|
//# sourceMappingURL=react.js.map
|
package/package.json
CHANGED