haystack-nclient
Advanced tools
Comparing version 3.0.25 to 3.0.26
@@ -57,4 +57,24 @@ import { HGrid, HDict, HaysonDict, HList } from 'haystack-core'; | ||
/** | ||
* Evalulate a haystack filter request and return the result. | ||
* | ||
* This operation will automatically attempt to batch network calls | ||
* together to optimize client network requests. | ||
* | ||
* @param filter The haystack filter. | ||
* @returns The result of the filter query. | ||
*/ | ||
read(filter: string): Promise<HGrid>; | ||
/** | ||
* Used when evaluating batched eval requests. | ||
* | ||
* @param exprs The expressions to evaluate. | ||
* @returns The evalulated expression responses. | ||
*/ | ||
private batchEval; | ||
/** | ||
* Evaluate some code server side and return the response. | ||
* | ||
* This operation will automatically attempt to batch network calls | ||
* together to optimize client network requests. | ||
* | ||
* https://skyfoundry.com/doc/docSkySpark/Ops#eval | ||
@@ -67,2 +87,11 @@ * | ||
/** | ||
* Evaluate some code server side and return the response. | ||
* | ||
* https://skyfoundry.com/doc/docSkySpark/Ops#eval | ||
* | ||
* @param expr The expression to evaluate. | ||
* @returns The evaluated expression response. | ||
*/ | ||
private doEval; | ||
/** | ||
* Evalulate all the expressions and return the grids. | ||
@@ -74,4 +103,14 @@ * | ||
* @returns The evalulated expression responses. | ||
* @throws Any fetch or grid responses. | ||
*/ | ||
evalAll(exprs: string[]): Promise<HGrid[]>; | ||
/** | ||
* Evalulate all the expressions and return the grids. | ||
* | ||
* https://skyfoundry.com/doc/docSkySpark/Ops#evalAll | ||
* | ||
* @param exprs The expressions to evaluate. | ||
* @returns The evalulated expression responses. | ||
*/ | ||
private doEvalAll; | ||
} |
import { HGrid } from 'haystack-core'; | ||
import { FetchMethod } from './fetchVal'; | ||
/** | ||
* Convience method to fetch multiple grids from a response. | ||
* Convenience method to fetch multiple grids from a response. | ||
* | ||
* If the returned grid has an error then the returned promise | ||
* will be rejected with a `GridError` instance. | ||
* A caller will have to check each grid to see if it's in error. | ||
* | ||
@@ -18,4 +17,4 @@ * Please note: fetching multiple grids from a response is unorthodox. This | ||
* @returns A promise that resolves to a number of grids. | ||
* @throws A fetch or grid error. | ||
* @throws A fetch error. | ||
*/ | ||
export declare function fetchAllGrids(resource: RequestInfo, gridCount: number, options?: RequestInit, fetchFunc?: FetchMethod): Promise<HGrid[]>; |
@@ -7,9 +7,8 @@ import { HVal } from 'haystack-core'; | ||
/** | ||
* Validate the haystack value. | ||
* Validate the HTTP response object. | ||
* | ||
* @param hval The value to validate or a decoded string. | ||
* @returns The haystack value. | ||
* @throws Throws an error if we don't have a valid haystack value. | ||
* @param resp The response to validate. | ||
* @throws Error if the response is invalid. | ||
*/ | ||
export declare function validateValue<Value extends HVal>(val: Value | string | undefined | null, resp: Response): Value; | ||
export declare function validateResponse(resp: Response): void; | ||
/** | ||
@@ -16,0 +15,0 @@ * Make some haystack value options. |
@@ -32,1 +32,2 @@ /** | ||
export * from './util/http'; | ||
export * from './util/BatchProcessor'; |
/** | ||
* A deferred promise. | ||
*/ | ||
export interface Deferred { | ||
promise: Promise<void>; | ||
resolve: () => void; | ||
export interface Deferred<PromiseType = void> { | ||
promise: Promise<PromiseType>; | ||
resolve: (value: PromiseType) => void; | ||
reject: (reason?: unknown) => void; | ||
@@ -12,2 +12,2 @@ } | ||
*/ | ||
export declare function makeDeferred(): Deferred; | ||
export declare function makeDeferred<PromiseType = void>(): Deferred<PromiseType>; |
@@ -13,3 +13,3 @@ { | ||
"homepage": "https://github.com/j2inn/haystack-nclient", | ||
"version": "3.0.25", | ||
"version": "3.0.26", | ||
"module": "dist/index.es.js", | ||
@@ -35,23 +35,23 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@babel/core": "^7.18.10", | ||
"@babel/core": "^7.18.13", | ||
"@babel/preset-env": "^7.18.10", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@types/adm-zip": "^0.5.0", | ||
"@types/jest": "^28.1.6", | ||
"@types/lodash": "^4.14.182", | ||
"@types/node": "^18.7.3", | ||
"@types/jest": "^29.0.0", | ||
"@types/lodash": "^4.14.184", | ||
"@types/node": "^18.7.14", | ||
"@types/node-fetch": "^2.6.2", | ||
"@typescript-eslint/eslint-plugin": "^5.33.0", | ||
"@typescript-eslint/parser": "^5.33.0", | ||
"babel-jest": "^28.1.3", | ||
"@typescript-eslint/eslint-plugin": "^5.36.0", | ||
"@typescript-eslint/parser": "^5.36.0", | ||
"babel-jest": "^29.0.1", | ||
"copy-webpack-plugin": "^11.0.0", | ||
"copyfiles": "^2.4.1", | ||
"eslint": "^8.22.0", | ||
"eslint": "^8.23.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"fetch-mock": "^9.10.7", | ||
"haystack-core": "^2.0.35", | ||
"haystack-core": "^2.0.37", | ||
"html-loader": "^4.1.0", | ||
"html-webpack-plugin": "^5.5.0", | ||
"jest": "^28.1.3", | ||
"jest": "^29.0.1", | ||
"node-fetch": "^2.6.1", | ||
@@ -63,19 +63,19 @@ "nodemon": "^2.0.19", | ||
"prettier-eslint": "^15.0.1", | ||
"prettier-eslint-cli": "^7.0.0", | ||
"prettier-eslint-cli": "^7.1.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.78.0", | ||
"rollup": "^2.78.1", | ||
"ts-jest": "^28.0.8", | ||
"ts-loader": "^9.3.1", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "^0.23.10", | ||
"typescript": "^4.7.4", | ||
"typedoc": "^0.23.11", | ||
"typescript": "^4.8.2", | ||
"typescript-eslint-parser": "^22.0.0", | ||
"webpack": "^5.74.0", | ||
"webpack-cli": "^4.10.0", | ||
"webpack-dev-server": "^4.10.0", | ||
"webpack-dev-server": "^4.10.1", | ||
"write-file-webpack-plugin": "^4.5.1" | ||
}, | ||
"peerDependencies": { | ||
"haystack-core": "^2.0.35" | ||
"haystack-core": "^2.0.37" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
535209
41
14088