haystack-nclient
Advanced tools
Comparing version 3.0.21 to 3.0.22-beta.1
@@ -0,0 +0,0 @@ import { HNamespace, HVal, HaysonVal } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { HNamespace } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { HGrid, HDict, HaysonDict, HList } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { HGrid } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { HVal } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { CsrfRequestInit } from './finCsrfFetch'; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { HGrid } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { HDict, HGrid, HMarker, HRef, HaysonDict, HList } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { HGrid, HRef, HDict, HaysonDict, HList, HaysonVal, HVal, HStr, HNum, HDate, HDateTime } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { ClientServiceConfig } from './ClientServiceConfig'; |
@@ -0,0 +0,0 @@ import { HGrid, HRef, HDict, HaysonDict, HList } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { HaysonDict, HDict, HGrid, HMarker, HRef } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { HDict, HGrid, HRef } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { HBool, HDate, HDateTime, HDict, HList, HNum, HRef, HStr, HTime, HVal } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { ClientServiceConfig } from './ClientServiceConfig'; |
@@ -0,0 +0,0 @@ import { HGrid, HDict, HRef } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { HRef, HDict } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { HRef, HDict } from 'haystack-core'; |
@@ -1,2 +0,2 @@ | ||
import { HGrid, HDict } from 'haystack-core'; | ||
import { HGrid, HDict, HRef } from 'haystack-core'; | ||
import { Ids } from '../../util/hval'; | ||
@@ -144,3 +144,3 @@ import { Subject } from './Subject'; | ||
* @param toAdd The ids to add. | ||
* @returns The new ids added. | ||
* @returns The ids added and those in error. | ||
*/ | ||
@@ -393,2 +393,23 @@ private addDictsToGrid; | ||
private computeSubjectPollRate; | ||
/** | ||
* @returns The ids of the records that are in error | ||
* and can't be watched on the server. | ||
*/ | ||
get errors(): string[]; | ||
/** | ||
* @returns the ids as refs of the records that in error | ||
* and can't be watched on the server. | ||
*/ | ||
get errorRefs(): HRef[]; | ||
/** | ||
* @returns True if the watch has errors. | ||
*/ | ||
hasErrors(): boolean; | ||
/** | ||
* Return true if the id or the record is currently in error. | ||
* | ||
* @param id The id or record to test. | ||
* @returns True if the id is in error. | ||
*/ | ||
hasErrorForId(id: string | HRef | HDict): boolean; | ||
} |
@@ -0,0 +0,0 @@ import { HNum } from 'haystack-core'; |
@@ -30,10 +30,32 @@ import { HVal } from 'haystack-core'; | ||
export declare enum WatchEventType { | ||
/** | ||
* A watch has been closed and is no longer active. | ||
*/ | ||
Closed = "closed", | ||
/** | ||
* A watch's records have changed. | ||
*/ | ||
Changed = "changed", | ||
/** | ||
* A watch has been refreshed. | ||
*/ | ||
Refreshed = "refreshed", | ||
/** | ||
* A watch has records added to it. | ||
*/ | ||
Added = "added", | ||
Removed = "removed" | ||
/** | ||
* A watch has records removed from it. | ||
*/ | ||
Removed = "removed", | ||
/** | ||
* A watch is attempting to watch records | ||
* that don't exist. | ||
*/ | ||
Error = "error" | ||
} | ||
/** | ||
* A watch changed event | ||
* A watch changed event. | ||
* | ||
* This is associated with a `changed` event. | ||
*/ | ||
@@ -47,2 +69,4 @@ export interface WatchChangedEvent extends WatchEvent { | ||
* A watch event with an array of ids associated with it. | ||
* | ||
* This is associated with `added`, `removed` and `error` events. | ||
*/ | ||
@@ -49,0 +73,0 @@ export interface WatchIdsEvent extends WatchEvent { |
@@ -0,0 +0,0 @@ import { ClientServiceConfig } from '../ClientServiceConfig'; |
@@ -0,0 +0,0 @@ import { ClientServiceConfig } from '../ClientServiceConfig'; |
@@ -0,0 +0,0 @@ import { HGrid } from 'haystack-core'; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { HList, HRef } from 'haystack-core'; |
@@ -0,0 +0,0 @@ import { HRef, HDict, HList, HGrid, HaysonDict } from 'haystack-core'; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { HDateTime, HDict, HRef } from 'haystack-core'; |
@@ -13,3 +13,3 @@ { | ||
"homepage": "https://github.com/j2inn/haystack-nclient", | ||
"version": "3.0.21", | ||
"version": "3.0.22-beta.1", | ||
"module": "dist/index.es.js", | ||
@@ -21,3 +21,3 @@ "main": "dist/index.js", | ||
"format": "prettier-eslint \"./**/*.ts\" --write", | ||
"test": "npm run lint && jest", | ||
"test": "npm run lint && jest --detectOpenHandles", | ||
"coverage": "npm run lint && jest --coverage", | ||
@@ -27,3 +27,2 @@ "doc": "npx rimraf ./docs && typedoc ./src --excludePrivate", | ||
"bundle": "webpack", | ||
"export": "webpack --config webpack.config.nointernal.js", | ||
"analyze": "webpack --profile --json > stats.json && webpack-bundle-analyzer stats.json", | ||
@@ -38,40 +37,41 @@ "prepack": "npm test && npm run build", | ||
"devDependencies": { | ||
"@babel/core": "^7.17.9", | ||
"@babel/preset-env": "^7.16.11", | ||
"@babel/preset-typescript": "^7.16.7", | ||
"@babel/core": "^7.18.9", | ||
"@babel/preset-env": "^7.18.9", | ||
"@babel/preset-typescript": "^7.18.6", | ||
"@types/adm-zip": "^0.5.0", | ||
"@types/jest": "^27.4.1", | ||
"@types/lodash": "^4.14.181", | ||
"@types/node": "^17.0.23", | ||
"@types/node-fetch": "^2.6.1", | ||
"@typescript-eslint/eslint-plugin": "^5.18.0", | ||
"@typescript-eslint/parser": "^5.18.0", | ||
"babel-jest": "^27.5.1", | ||
"copy-webpack-plugin": "^10.2.4", | ||
"eslint": "^7.25.0", | ||
"@types/jest": "^28.1.6", | ||
"@types/lodash": "^4.14.182", | ||
"@types/node": "^18.0.6", | ||
"@types/node-fetch": "^2.6.2", | ||
"@typescript-eslint/eslint-plugin": "^5.30.6", | ||
"@typescript-eslint/parser": "^5.30.6", | ||
"babel-jest": "^28.1.3", | ||
"copy-webpack-plugin": "^11.0.0", | ||
"copyfiles": "^2.4.1", | ||
"eslint": "^8.20.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"fetch-mock": "^9.10.7", | ||
"haystack-core": "^2.0.32", | ||
"html-loader": "^3.1.0", | ||
"haystack-core": "^2.0.33", | ||
"html-loader": "^4.1.0", | ||
"html-webpack-plugin": "^5.5.0", | ||
"jest": "^27.5.1", | ||
"jest": "^28.1.3", | ||
"node-fetch": "^2.6.1", | ||
"nodemon": "^2.0.15", | ||
"npm-dts": "^1.3.11", | ||
"npm-dts-webpack-plugin": "^1.3.11", | ||
"prettier": "^2.6.2", | ||
"prettier-eslint": "^13.0.0", | ||
"prettier-eslint-cli": "^5.0.1", | ||
"nodemon": "^2.0.19", | ||
"npm-dts": "^1.3.12", | ||
"npm-dts-webpack-plugin": "^1.3.12", | ||
"prettier": "^2.7.1", | ||
"prettier-eslint": "^15.0.1", | ||
"prettier-eslint-cli": "^6.0.1", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.70.1", | ||
"ts-jest": "^27.1.4", | ||
"ts-loader": "^9.2.8", | ||
"ts-node": "^10.7.0", | ||
"typedoc": "^0.22.14", | ||
"typescript": "^4.6.3", | ||
"rollup": "^2.77.0", | ||
"ts-jest": "^28.0.7", | ||
"ts-loader": "^9.3.1", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "^0.23.8", | ||
"typescript": "^4.7.4", | ||
"typescript-eslint-parser": "^22.0.0", | ||
"webpack": "^5.71.0", | ||
"webpack-cli": "^4.9.2", | ||
"webpack-dev-server": "^4.8.1", | ||
"webpack": "^5.73.0", | ||
"webpack-cli": "^4.10.0", | ||
"webpack-dev-server": "^4.9.3", | ||
"write-file-webpack-plugin": "^4.5.1" | ||
@@ -78,0 +78,0 @@ }, |
@@ -57,3 +57,3 @@ <p align="center"> | ||
Please note, since a Client instance contains state (i.e. maintains a list of watches), always cache and reuse a Client instance. Do *not* create a new Client instance everytime you use it! | ||
Please note, since a Client instance contains state (i.e. maintains a list of watches), always cache and reuse a Client instance. Do _not_ create a new Client instance everytime you use it! | ||
@@ -70,3 +70,3 @@ If you're using [haystack-react](hhttps://github.com/j2inn/haystack-react), the Client is created from a React Context. Use a hook called `useClient()` to get access to the Client. | ||
const client = new Client({ | ||
base: new URL(window.location.href) | ||
base: new URL(window.location.href), | ||
}) | ||
@@ -77,3 +77,3 @@ | ||
base: new URL(window.location.href), | ||
project: 'demo' | ||
project: 'demo', | ||
}) | ||
@@ -93,3 +93,3 @@ ``` | ||
// Create a watch and give it a display name. | ||
const watch = client.ops.watch.make('All SAT points', grid) | ||
const watch = await client.ops.watch.make('All SAT points', grid) | ||
@@ -96,0 +96,0 @@ // Add event handlers. We're only interested in 'curVal' changes. |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
462971
12110
12
40
1