@darajs/core 1.6.2 → 1.6.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"variable-state-provider.d.ts","sourceRoot":"","sources":["../../../js/shared/variable-state-provider/variable-state-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGjD,UAAU,0BAA0B;IAChC,QAAQ,EAAE,wBAAwB,CAAC;CACtC;AAED;;GAEG;AACH,iBAAS,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,GAAG,CAAC,OAAO,CAe7E;AAED,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"variable-state-provider.d.ts","sourceRoot":"","sources":["../../../js/shared/variable-state-provider/variable-state-provider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAGjD,UAAU,0BAA0B;IAChC,QAAQ,EAAE,wBAAwB,CAAC;CACtC;AAED;;GAEG;AACH,iBAAS,qBAAqB,CAAC,KAAK,EAAE,0BAA0B,GAAG,GAAG,CAAC,OAAO,CAsB7E;AAED,eAAe,qBAAqB,CAAC"}
@@ -8,8 +8,16 @@ function VariableStateProvider(props) {
8
8
  useEffect(() => {
9
9
  var _a;
10
10
  const sub = (_a = props.wsClient) === null || _a === void 0 ? void 0 : _a.variableRequests$().subscribe((req) => {
11
- const variableValue = getVariableState(req.message.variable);
12
- props.wsClient.sendVariable(variableValue, req.message.__rchan);
11
+ // Catch any errors when fetching the variable value otherwise this takes down the stream and no further
12
+ // requests are processed.
13
+ try {
14
+ const variableValue = getVariableState(req.message.variable);
15
+ props.wsClient.sendVariable(variableValue, req.message.__rchan);
16
+ }
17
+ catch (err) {
18
+ // eslint-disable-next-line no-console
19
+ console.warn(`Error when processing a getVariableValue request: ${err}`);
20
+ }
13
21
  });
14
22
  return () => {
15
23
  sub === null || sub === void 0 ? void 0 : sub.unsubscribe();
@@ -1 +1 @@
1
- {"version":3,"file":"variable-state-provider.js","sourceRoot":"","sources":["../../../js/shared/variable-state-provider/variable-state-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM1D;;GAEG;AACH,SAAS,qBAAqB,CAAC,KAAiC;IAC5D,MAAM,gBAAgB,GAAG,gBAAgB,EAAE,CAAC;IAE5C,SAAS,CAAC,GAAG,EAAE;;QACX,MAAM,GAAG,GAAG,MAAA,KAAK,CAAC,QAAQ,0CAAE,iBAAiB,GAAG,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE;YAC9D,MAAM,aAAa,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YAC7D,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,aAAa,EAAE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACR,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,WAAW,EAAE,CAAC;QACvB,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEvC,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"variable-state-provider.js","sourceRoot":"","sources":["../../../js/shared/variable-state-provider/variable-state-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAM1D;;GAEG;AACH,SAAS,qBAAqB,CAAC,KAAiC;IAC5D,MAAM,gBAAgB,GAAG,gBAAgB,EAAE,CAAC;IAE5C,SAAS,CAAC,GAAG,EAAE;;QACX,MAAM,GAAG,GAAG,MAAA,KAAK,CAAC,QAAQ,0CAAE,iBAAiB,GAAG,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE;YAC9D,wGAAwG;YACxG,0BAA0B;YAC1B,IAAI,CAAC;gBACD,MAAM,aAAa,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;gBAC7D,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,aAAa,EAAE,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;YACpE,CAAC;YAAC,OAAO,GAAG,EAAE,CAAC;gBACX,sCAAsC;gBACtC,OAAO,CAAC,IAAI,CAAC,qDAAqD,GAAG,EAAE,CAAC,CAAC;YAC7E,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,GAAG,EAAE;YACR,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,WAAW,EAAE,CAAC;QACvB,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC;IAEvC,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,eAAe,qBAAqB,CAAC"}
@@ -59027,8 +59027,12 @@ Inferred class string: "${iconClasses}."`
59027
59027
  React.useEffect(() => {
59028
59028
  var _a;
59029
59029
  const sub = (_a = props.wsClient) == null ? void 0 : _a.variableRequests$().subscribe((req) => {
59030
- const variableValue = getVariableState(req.message.variable);
59031
- props.wsClient.sendVariable(variableValue, req.message.__rchan);
59030
+ try {
59031
+ const variableValue = getVariableState(req.message.variable);
59032
+ props.wsClient.sendVariable(variableValue, req.message.__rchan);
59033
+ } catch (err2) {
59034
+ console.warn(`Error when processing a getVariableValue request: ${err2}`);
59035
+ }
59032
59036
  });
59033
59037
  return () => {
59034
59038
  sub == null ? void 0 : sub.unsubscribe();
package/package.json CHANGED
@@ -1,117 +1,117 @@
1
1
  {
2
- "name": "@darajs/core",
3
- "version": "1.6.2",
4
- "description": "Dara Framework core",
5
- "main": "dist/index.js",
6
- "module": "dist/index.js",
7
- "jsnext:main": "dist/index.js",
8
- "license": "Apache-2.0",
9
- "author": "Sam Smith <sam@causalens.com>",
10
- "homepage": "https://dara.causalens.com/",
11
- "repository": {
12
- "type": "git",
13
- "url": "https://github.com/causalens/dara.git",
14
- "directory": "packages/dara-core"
15
- },
16
- "contributors": [
17
- "Patricia Jacob <patricia@causalens.com>",
18
- "Krzysztof Bielikowicz <krzysztof@causalens.com>"
19
- ],
20
- "scripts": {
21
- "build": "rimraf dist && rimraf dara/core/umd && vite build && tsc && cp -R js/assets dist/ && cp js/index.css dist/ && tsc-alias && cp -R dist/umd/ dara/core/umd/",
22
- "build-dev": "tsc && (concurrently \"tsc -w\" \"tsc-alias -w\")",
23
- "clean": "rimraf api assets components shared types *.js.map *.d.ts '!(*.config).js' *.css",
24
- "cypress:open": "cypress open",
25
- "lint": "eslint js tests cypress --ext .tsx,.ts --max-warnings 0 && stylelint './js/**/*.tsx'",
26
- "lint:fix": "eslint js tests cypress --ext .tsx,.ts --max-warnings 0 --fix && stylelint --fix './js/**/*.tsx'",
27
- "package": "yarn build && yarn publish --no-git-tag-version",
28
- "test-watch": "jest --watch",
29
- "test": "jest",
30
- "test:e2e": "start-server-and-test 'poetry run dara start --config cypress.dara.main:config' http://localhost:8000/static/index.js 'cypress run'"
31
- },
32
- "prettier": "@darajs/prettier-config",
33
- "devDependencies": {
34
- "@babel/core": "^7.23.5",
35
- "@babel/preset-env": "^7.23.0",
36
- "@babel/preset-react": "^7.22.15",
37
- "@babel/preset-typescript": "^7.23.0",
38
- "@darajs/eslint-config": "~1.5.2",
39
- "@darajs/prettier-config": "~1.5.2",
40
- "@darajs/stylelint-config": "~1.5.2",
41
- "@rollup/plugin-inject": "^4.0.4",
42
- "@testing-library/dom": "^9.3.0",
43
- "@testing-library/jest-dom": "^5.16.5",
44
- "@testing-library/react": "^14.0.0",
45
- "@types/file-saver": "^2.0.5",
46
- "@types/history": "^4.7.0",
47
- "@types/jest": "^29.5.1",
48
- "@types/lodash": "^4.14.178",
49
- "@types/node": "^18.15.3",
50
- "@types/object-hash": "^2.2.1",
51
- "@types/react": "^18.2.6",
52
- "@types/react-collapse": "^5.0.1",
53
- "@types/react-dom": "^18.2.4",
54
- "@types/react-router": "^5.1.20",
55
- "@types/react-router-dom": "^5.3.3",
56
- "@types/recoil": "^0.0.9",
57
- "@types/shortid": "0.0.29",
58
- "@types/styled-components": "^5.1.23",
59
- "@vitejs/plugin-react": "2.1.0",
60
- "babel-jest": "^29.5.0",
61
- "concurrently": "^8.0.1",
62
- "cypress": "9.5.3",
63
- "jest": "^29.5.0",
64
- "jest-css-modules": "^2.1.0",
65
- "jest-environment-jsdom": "^29.5.0",
66
- "msw": "1.0.1",
67
- "postcss": "^8.4.30",
68
- "react-test-renderer": "^17.0.2",
69
- "rimraf": "^3.0.2",
70
- "start-server-and-test": "^1.14.0",
71
- "stylelint": "~14.5.0",
72
- "tsc-alias": "^1.8.5",
73
- "vite": "3.1.8",
74
- "whatwg-fetch": "^3.6.2"
75
- },
76
- "dependencies": {
77
- "@darajs/styled-components": "~1.5.2",
78
- "@darajs/ui-components": "~1.5.2",
79
- "@darajs/ui-notifications": "~1.5.2",
80
- "@darajs/ui-utils": "~1.5.2",
81
- "@fortawesome/fontawesome-free": "~6.4.0",
82
- "@recoiljs/refine": "^0.1.1",
83
- "@tanstack/query-core": "^4.0.0",
84
- "@tanstack/react-query": "^4.0.0",
85
- "date-fns": "2.9.0",
86
- "exceljs": "^4.3.0",
87
- "file-saver": "^2.0.5",
88
- "history": "^4.9.0",
89
- "jwt-decode": "^3.1.2",
90
- "lodash": "^4.17.21",
91
- "object-hash": "^3.0.0",
92
- "polished": "^4.1.1",
93
- "query-string": "^7.1.1",
94
- "react": "^18.2.0",
95
- "react-collapse": "^5.1.1",
96
- "react-dom": "^18.2.0",
97
- "react-error-boundary": "^4.0.0",
98
- "react-router": "^5.3.0",
99
- "react-router-dom": "^5.3.0",
100
- "react-virtualized-auto-sizer": "1.0.6",
101
- "react-window": "^1.8.6",
102
- "recoil": "^0.7.7",
103
- "recoil-sync": "^0.2.0",
104
- "rxjs": "^6.6.7",
105
- "shortid": "2.2.15",
106
- "styled-components": "^5.3.10",
107
- "typescript": "^5.0.4",
108
- "use-async-resource": "^2.2.2"
109
- },
110
- "files": [
111
- "dist"
112
- ],
113
- "publishConfig": {
114
- "access": "public"
115
- },
116
- "gitHead": "10a29a292669635aab11e09e9e357ebe8611b3fc"
2
+ "name": "@darajs/core",
3
+ "version": "1.6.4",
4
+ "description": "Dara Framework core",
5
+ "main": "dist/index.js",
6
+ "module": "dist/index.js",
7
+ "jsnext:main": "dist/index.js",
8
+ "license": "Apache-2.0",
9
+ "author": "Sam Smith <sam@causalens.com>",
10
+ "homepage": "https://dara.causalens.com/",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/causalens/dara.git",
14
+ "directory": "packages/dara-core"
15
+ },
16
+ "contributors": [
17
+ "Patricia Jacob <patricia@causalens.com>",
18
+ "Krzysztof Bielikowicz <krzysztof@causalens.com>"
19
+ ],
20
+ "scripts": {
21
+ "build": "rimraf dist && rimraf dara/core/umd && vite build && tsc && cp -R js/assets dist/ && cp js/index.css dist/ && tsc-alias && cp -R dist/umd/ dara/core/umd/",
22
+ "build-dev": "tsc && (concurrently \"tsc -w\" \"tsc-alias -w\")",
23
+ "clean": "rimraf api assets components shared types *.js.map *.d.ts '!(*.config).js' *.css",
24
+ "cypress:open": "cypress open",
25
+ "lint": "eslint js tests cypress --ext .tsx,.ts --max-warnings 0 && stylelint './js/**/*.tsx'",
26
+ "lint:fix": "eslint js tests cypress --ext .tsx,.ts --max-warnings 0 --fix && stylelint --fix './js/**/*.tsx'",
27
+ "package": "yarn build && yarn publish --no-git-tag-version",
28
+ "test-watch": "jest --watch",
29
+ "test": "jest",
30
+ "test:e2e": "start-server-and-test 'poetry run dara start --config cypress.dara.main:config' http://localhost:8000/static/index.js 'cypress run'"
31
+ },
32
+ "prettier": "@darajs/prettier-config",
33
+ "devDependencies": {
34
+ "@babel/core": "^7.23.5",
35
+ "@babel/preset-env": "^7.23.0",
36
+ "@babel/preset-react": "^7.22.15",
37
+ "@babel/preset-typescript": "^7.23.0",
38
+ "@darajs/eslint-config": "~1.5.4",
39
+ "@darajs/prettier-config": "~1.5.4",
40
+ "@darajs/stylelint-config": "~1.5.4",
41
+ "@rollup/plugin-inject": "^4.0.4",
42
+ "@testing-library/dom": "^9.3.0",
43
+ "@testing-library/jest-dom": "^5.16.5",
44
+ "@testing-library/react": "^14.0.0",
45
+ "@types/file-saver": "^2.0.5",
46
+ "@types/history": "^4.7.0",
47
+ "@types/jest": "^29.5.1",
48
+ "@types/lodash": "^4.14.178",
49
+ "@types/node": "^18.15.3",
50
+ "@types/object-hash": "^2.2.1",
51
+ "@types/react": "^18.2.6",
52
+ "@types/react-collapse": "^5.0.1",
53
+ "@types/react-dom": "^18.2.4",
54
+ "@types/react-router": "^5.1.20",
55
+ "@types/react-router-dom": "^5.3.3",
56
+ "@types/recoil": "^0.0.9",
57
+ "@types/shortid": "0.0.29",
58
+ "@types/styled-components": "^5.1.23",
59
+ "@vitejs/plugin-react": "2.1.0",
60
+ "babel-jest": "^29.5.0",
61
+ "concurrently": "^8.0.1",
62
+ "cypress": "9.5.3",
63
+ "jest": "^29.5.0",
64
+ "jest-css-modules": "^2.1.0",
65
+ "jest-environment-jsdom": "^29.5.0",
66
+ "msw": "1.0.1",
67
+ "postcss": "^8.4.30",
68
+ "react-test-renderer": "^17.0.2",
69
+ "rimraf": "^3.0.2",
70
+ "start-server-and-test": "^1.14.0",
71
+ "stylelint": "~14.5.0",
72
+ "tsc-alias": "^1.8.5",
73
+ "vite": "3.1.8",
74
+ "whatwg-fetch": "^3.6.2"
75
+ },
76
+ "dependencies": {
77
+ "@darajs/styled-components": "~1.5.4",
78
+ "@darajs/ui-components": "~1.5.4",
79
+ "@darajs/ui-notifications": "~1.5.4",
80
+ "@darajs/ui-utils": "~1.5.4",
81
+ "@fortawesome/fontawesome-free": "~6.4.0",
82
+ "@recoiljs/refine": "^0.1.1",
83
+ "@tanstack/query-core": "^4.0.0",
84
+ "@tanstack/react-query": "^4.0.0",
85
+ "date-fns": "2.9.0",
86
+ "exceljs": "^4.3.0",
87
+ "file-saver": "^2.0.5",
88
+ "history": "^4.9.0",
89
+ "jwt-decode": "^3.1.2",
90
+ "lodash": "^4.17.21",
91
+ "object-hash": "^3.0.0",
92
+ "polished": "^4.1.1",
93
+ "query-string": "^7.1.1",
94
+ "react": "^18.2.0",
95
+ "react-collapse": "^5.1.1",
96
+ "react-dom": "^18.2.0",
97
+ "react-error-boundary": "^4.0.0",
98
+ "react-router": "^5.3.0",
99
+ "react-router-dom": "^5.3.0",
100
+ "react-virtualized-auto-sizer": "1.0.6",
101
+ "react-window": "^1.8.6",
102
+ "recoil": "^0.7.7",
103
+ "recoil-sync": "^0.2.0",
104
+ "rxjs": "^6.6.7",
105
+ "shortid": "2.2.15",
106
+ "styled-components": "^5.3.10",
107
+ "typescript": "^5.0.4",
108
+ "use-async-resource": "^2.2.2"
109
+ },
110
+ "files": [
111
+ "dist"
112
+ ],
113
+ "publishConfig": {
114
+ "access": "public"
115
+ },
116
+ "gitHead": "df0906306b67d2aea31da799d27fd8e2dd704adc"
117
117
  }