@warmhub/sdk-ts 0.101.0 → 0.102.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.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{n as AllStreamOperationsFailedError,u as CliCallVerificationError,y as DEFAULT_API_URL,k as DEFAULT_STREAM_CHUNK_SIZE,b as MAX_COMMIT_VALIDATION_ENCODED_BYTES,a as MAX_COMMIT_VALIDATION_OPERATIONS,l as MAX_STREAM_APPEND_OPERATION_COUNT,w as OperationBuilder,m as PartialStreamSubmissionError,t as SDK_VERSION,h as StreamSubmissionAggregator,s as StreamingSubmissionOutcomeUnknownError,I as WarmHubClient,B as WarmHubError,f as collectDurableTokens,e as commitValidateRequestBodyBytes,G as connectionErrorMessage,p as countStreamAppendResultStatuses,c as createCommitValidateInput,j as createOperationEventRequestId,i as createOperationEventSubmissionId,d as encodeCommitValidateRequestBody,g as getResponseDecorations,F as isConnectionError,q as isDefiniteStreamAppendRejection,E as isRetryable,D as isWarmHubError,x as normalizeWref,z as resolveFunctionLogMode,A as sanitizeErrorMessage,H as sdkVersionIsBelowMinimum,o as streamAppendResultStatus,r as submitOperationsViaStream,C as toWarmHubError,v as verifyCliCall}from'./chunk-
|
|
1
|
+
export{n as AllStreamOperationsFailedError,u as CliCallVerificationError,y as DEFAULT_API_URL,k as DEFAULT_STREAM_CHUNK_SIZE,b as MAX_COMMIT_VALIDATION_ENCODED_BYTES,a as MAX_COMMIT_VALIDATION_OPERATIONS,l as MAX_STREAM_APPEND_OPERATION_COUNT,w as OperationBuilder,m as PartialStreamSubmissionError,t as SDK_VERSION,h as StreamSubmissionAggregator,s as StreamingSubmissionOutcomeUnknownError,I as WarmHubClient,B as WarmHubError,f as collectDurableTokens,e as commitValidateRequestBodyBytes,G as connectionErrorMessage,p as countStreamAppendResultStatuses,c as createCommitValidateInput,j as createOperationEventRequestId,i as createOperationEventSubmissionId,d as encodeCommitValidateRequestBody,g as getResponseDecorations,F as isConnectionError,q as isDefiniteStreamAppendRejection,E as isRetryable,D as isWarmHubError,x as normalizeWref,z as resolveFunctionLogMode,A as sanitizeErrorMessage,H as sdkVersionIsBelowMinimum,o as streamAppendResultStatus,r as submitOperationsViaStream,C as toWarmHubError,v as verifyCliCall}from'./chunk-URX4K5LO.js';export{n as CLI_INSTALL_REPO_HEADER,o as CLI_SIGNATURE_HEADER,p as CLI_TIMESTAMP_HEADER,y as CONTENT_FIELD_LIMIT_ERROR,x as MAX_CONTENT_FIELD_BYTES,A as ORG_AUTH_SCOPES,s as REPO_AUTH_SCOPES,z as contentFieldLimitError,B as isKnownOrgAuthScope,t as isKnownRepoAuthScope,C as operationEventStreamRequestId,R as validateAgainstShape}from'./chunk-JBTUW4MQ.js';//# sourceMappingURL=index.js.map
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/react.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {I}from'./chunk-
|
|
1
|
+
import {I}from'./chunk-URX4K5LO.js';export{y as DEFAULT_API_URL,t as SDK_VERSION,I as WarmHubClient,B as WarmHubError,C as toWarmHubError}from'./chunk-URX4K5LO.js';import'./chunk-JBTUW4MQ.js';import {createContext,useMemo,useState,useEffect,useContext}from'react';import {jsx}from'react/jsx-runtime';var p=createContext(null),f=createContext({isAuthenticated:false,isLoading:true});function P({apiUrl:e,children:t,auth:o,client:s,decorateResponses:r}){let n=s?.name,u=s?.version,i=useMemo(()=>new I({apiUrl:e,accessToken:async()=>await o.getAccessToken()??void 0,client:{name:n,version:u},decorateResponses:r}),[e,o.getAccessToken,n,u,r]);return jsx(p.Provider,{value:i,children:jsx(g,{auth:o,client:i,children:t})})}function g({auth:e,client:t,children:o}){let[s,r]=useState(null),n=e.isAuthenticated&&s===t;useEffect(()=>{if(!e.isAuthenticated){r(null);return}let i=false;return t.auth.sync().then(()=>{i||r(t);}).catch(c=>{console.error("auth.sync failed:",c),i||r(t);}),()=>{i=true;}},[e.isAuthenticated,t]);let u=useMemo(()=>({isAuthenticated:e.isAuthenticated&&n,isLoading:e.isLoading||e.isAuthenticated&&!n}),[e.isAuthenticated,e.isLoading,n]);return e.isLoading||e.isAuthenticated&&!n?null:jsx(f.Provider,{value:u,children:o})}function v(){let e=useContext(p);if(!e)throw new Error("useWarmHubClient must be used within a WarmHubProvider");return e}function S(){return useContext(f)}export{P as WarmHubProvider,S as useWarmHubAuth,v as useWarmHubClient};//# sourceMappingURL=react.js.map
|
|
2
2
|
//# sourceMappingURL=react.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@warmhub/sdk-ts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.102.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "The TypeScript SDK for WarmHub — create repos, commit and query data, and compound knowledge with your AI agents.",
|
|
@@ -66,10 +66,10 @@
|
|
|
66
66
|
"build:types": "NODE_OPTIONS=--max-old-space-size=4096 tsup --config tsup.dts-core.config.ts && NODE_OPTIONS=--max-old-space-size=4096 tsup --config tsup.dts-checkpoint.config.ts",
|
|
67
67
|
"build:test-runtime": "tsup --config tsup.test-runtime.config.ts",
|
|
68
68
|
"generate:api-contract": "bun run scripts/generate-api-contract.ts",
|
|
69
|
-
"generate:backend-types": "bun run
|
|
69
|
+
"generate:backend-types": "bun run --cwd ../sdk-conformance generate:backend-types",
|
|
70
70
|
"audit:api-contract": "bun run scripts/audit-api-contract.ts",
|
|
71
|
-
"audit:backend-types": "bun run
|
|
72
|
-
"audit:sdk-result-types": "bun run
|
|
71
|
+
"audit:backend-types": "bun run --cwd ../sdk-conformance audit:backend-types",
|
|
72
|
+
"audit:sdk-result-types": "bun run --cwd ../sdk-conformance audit:sdk-result-types",
|
|
73
73
|
"audit:bundle": "bun run scripts/audit-bundle.ts",
|
|
74
74
|
"audit:pack": "bun run scripts/audit-pack.ts",
|
|
75
75
|
"audit:cleanroom": "bun run scripts/audit-cleanroom.ts",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"test": "vitest run",
|
|
84
84
|
"test:coverage": "vitest run --coverage",
|
|
85
85
|
"test:watch": "vitest",
|
|
86
|
-
"typecheck": "bun run check:contract &&
|
|
86
|
+
"typecheck": "bun run check:contract && tsc --noEmit",
|
|
87
87
|
"docs:api:json": "typedoc --options typedoc.json --json /tmp/warmhub-sdk-api.json",
|
|
88
88
|
"docs:api:check": "typedoc --options typedoc.json --treatValidationWarningsAsErrors --json /tmp/warmhub-sdk-api-check.json"
|
|
89
89
|
},
|