@deephaven/app-utils 0.103.0 → 0.103.1-alpha-grpc-logging.3

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.
@@ -4,6 +4,8 @@ import { type Plugin } from '@deephaven/plugin';
4
4
  export type AppBootstrapProps = {
5
5
  /** URL of the server. */
6
6
  serverUrl: string;
7
+ /** Properties included in support logs. */
8
+ logMetadata?: Record<string, unknown>;
7
9
  /** URL of the plugins to load. */
8
10
  pluginsUrl: string;
9
11
  /** The core plugins to load. */
@@ -19,6 +21,6 @@ export type AppBootstrapProps = {
19
21
  * AppBootstrap component. Handles loading the fonts, client, and authentication.
20
22
  * Will display the children when everything is loaded and authenticated.
21
23
  */
22
- export declare function AppBootstrap({ fontClassNames, pluginsUrl, getCorePlugins, serverUrl, children, }: AppBootstrapProps): JSX.Element;
24
+ export declare function AppBootstrap({ fontClassNames, pluginsUrl, getCorePlugins, serverUrl, logMetadata, children, }: AppBootstrapProps): JSX.Element;
23
25
  export default AppBootstrap;
24
26
  //# sourceMappingURL=AppBootstrap.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AppBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/AppBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAG9D,OAAO,gDAAgD,CAAC;AAGxD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAWhD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAElB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IAEnB,gCAAgC;IAChC,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEzC,gCAAgC;IAChC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,cAAc,EACd,UAAU,EACV,cAAc,EACd,SAAS,EACT,QAAQ,GACT,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAwCjC;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"AppBootstrap.d.ts","sourceRoot":"","sources":["../../src/components/AppBootstrap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAG9D,OAAO,gDAAgD,CAAC;AAGxD,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAYhD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,yBAAyB;IACzB,SAAS,EAAE,MAAM,CAAC;IAElB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEtC,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IAEnB,gCAAgC;IAChC,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAEzC,gCAAgC;IAChC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAE1B;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,EAC3B,cAAc,EACd,UAAU,EACV,cAAc,EACd,SAAS,EACT,WAAW,EACX,QAAQ,GACT,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAgDjC;AAED,eAAe,YAAY,CAAC"}
@@ -4,16 +4,18 @@ import { store } from '@deephaven/redux';
4
4
  import '@deephaven/components/scss/BaseStyleSheet.scss';
5
5
  import { ClientBootstrap } from '@deephaven/jsapi-bootstrap';
6
6
  import { useBroadcastLoginListener } from '@deephaven/jsapi-components';
7
+ import { ContextActions, ContextMenuRoot } from '@deephaven/components';
7
8
  import FontBootstrap from "./FontBootstrap.js";
8
9
  import PluginsBootstrap from "./PluginsBootstrap.js";
9
10
  import AuthBootstrap from "./AuthBootstrap.js";
10
11
  import ConnectionBootstrap from "./ConnectionBootstrap.js";
11
- import { getConnectOptions } from "../utils/index.js";
12
+ import { getConnectOptions, createExportLogsContextAction } from "../utils/index.js";
12
13
  import FontsLoaded from "./FontsLoaded.js";
13
14
  import UserBootstrap from "./UserBootstrap.js";
14
15
  import ServerConfigBootstrap from "./ServerConfigBootstrap.js";
15
16
  import ThemeBootstrap from "./ThemeBootstrap.js";
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
18
+ import { jsxs as _jsxs } from "react/jsx-runtime";
17
19
  /**
18
20
  * AppBootstrap component. Handles loading the fonts, client, and authentication.
19
21
  * Will display the children when everything is loaded and authenticated.
@@ -24,6 +26,7 @@ export function AppBootstrap(_ref) {
24
26
  pluginsUrl,
25
27
  getCorePlugins,
26
28
  serverUrl,
29
+ logMetadata,
27
30
  children
28
31
  } = _ref;
29
32
  var clientOptions = useMemo(() => getConnectOptions(), []);
@@ -37,18 +40,19 @@ export function AppBootstrap(_ref) {
37
40
  });
38
41
  }, []);
39
42
  useBroadcastLoginListener(onLogin, onLogout);
40
- return /*#__PURE__*/_jsx(Provider, {
43
+ var contextActions = useMemo(() => [createExportLogsContextAction(logMetadata, true)], [logMetadata]);
44
+ return /*#__PURE__*/_jsxs(Provider, {
41
45
  store: store,
42
- children: /*#__PURE__*/_jsx(FontBootstrap, {
46
+ children: [/*#__PURE__*/_jsx(FontBootstrap, {
43
47
  fontClassNames: fontClassNames,
44
48
  children: /*#__PURE__*/_jsx(PluginsBootstrap, {
45
49
  getCorePlugins: getCorePlugins,
46
50
  pluginsUrl: pluginsUrl,
47
51
  children: /*#__PURE__*/_jsx(ThemeBootstrap, {
48
- children: /*#__PURE__*/_jsx(ClientBootstrap, {
52
+ children: /*#__PURE__*/_jsxs(ClientBootstrap, {
49
53
  serverUrl: serverUrl,
50
54
  options: clientOptions,
51
- children: /*#__PURE__*/_jsx(AuthBootstrap, {
55
+ children: [/*#__PURE__*/_jsx(AuthBootstrap, {
52
56
  children: /*#__PURE__*/_jsx(ServerConfigBootstrap, {
53
57
  children: /*#__PURE__*/_jsx(UserBootstrap, {
54
58
  children: /*#__PURE__*/_jsx(ConnectionBootstrap, {
@@ -58,11 +62,13 @@ export function AppBootstrap(_ref) {
58
62
  })
59
63
  })
60
64
  })
61
- })
65
+ }), /*#__PURE__*/_jsx(ContextActions, {
66
+ actions: contextActions
67
+ })]
62
68
  }, logoutCount)
63
69
  })
64
70
  })
65
- })
71
+ }), /*#__PURE__*/_jsx(ContextMenuRoot, {})]
66
72
  });
67
73
  }
68
74
  export default AppBootstrap;
@@ -1 +1 @@
1
- {"version":3,"file":"AppBootstrap.js","names":["React","useCallback","useMemo","useState","Provider","store","ClientBootstrap","useBroadcastLoginListener","FontBootstrap","PluginsBootstrap","AuthBootstrap","ConnectionBootstrap","getConnectOptions","FontsLoaded","UserBootstrap","ServerConfigBootstrap","ThemeBootstrap","jsx","_jsx","AppBootstrap","_ref","fontClassNames","pluginsUrl","getCorePlugins","serverUrl","children","clientOptions","logoutCount","setLogoutCount","onLogin","undefined","onLogout","requestAnimationFrame","value","options"],"sources":["../../src/components/AppBootstrap.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { Provider } from 'react-redux';\nimport { store } from '@deephaven/redux';\nimport '@deephaven/components/scss/BaseStyleSheet.scss';\nimport { ClientBootstrap } from '@deephaven/jsapi-bootstrap';\nimport { useBroadcastLoginListener } from '@deephaven/jsapi-components';\nimport { type Plugin } from '@deephaven/plugin';\nimport FontBootstrap from './FontBootstrap';\nimport PluginsBootstrap from './PluginsBootstrap';\nimport AuthBootstrap from './AuthBootstrap';\nimport ConnectionBootstrap from './ConnectionBootstrap';\nimport { getConnectOptions } from '../utils';\nimport FontsLoaded from './FontsLoaded';\nimport UserBootstrap from './UserBootstrap';\nimport ServerConfigBootstrap from './ServerConfigBootstrap';\nimport ThemeBootstrap from './ThemeBootstrap';\n\nexport type AppBootstrapProps = {\n /** URL of the server. */\n serverUrl: string;\n\n /** URL of the plugins to load. */\n pluginsUrl: string;\n\n /** The core plugins to load. */\n getCorePlugins?: () => Promise<Plugin[]>;\n\n /** Font class names to load. */\n fontClassNames?: string[];\n\n /**\n * The children to render wrapped when everything is loaded and authenticated.\n */\n children: React.ReactNode;\n};\n\n/**\n * AppBootstrap component. Handles loading the fonts, client, and authentication.\n * Will display the children when everything is loaded and authenticated.\n */\nexport function AppBootstrap({\n fontClassNames,\n pluginsUrl,\n getCorePlugins,\n serverUrl,\n children,\n}: AppBootstrapProps): JSX.Element {\n const clientOptions = useMemo(() => getConnectOptions(), []);\n\n // On logout, we reset the client and have user login again\n const [logoutCount, setLogoutCount] = useState(0);\n const onLogin = useCallback(() => undefined, []);\n const onLogout = useCallback(() => {\n requestAnimationFrame(() => {\n setLogoutCount(value => value + 1);\n });\n }, []);\n useBroadcastLoginListener(onLogin, onLogout);\n return (\n <Provider store={store}>\n <FontBootstrap fontClassNames={fontClassNames}>\n <PluginsBootstrap\n getCorePlugins={getCorePlugins}\n pluginsUrl={pluginsUrl}\n >\n <ThemeBootstrap>\n <ClientBootstrap\n serverUrl={serverUrl}\n options={clientOptions}\n key={logoutCount}\n >\n <AuthBootstrap>\n <ServerConfigBootstrap>\n <UserBootstrap>\n <ConnectionBootstrap>\n <FontsLoaded>{children}</FontsLoaded>\n </ConnectionBootstrap>\n </UserBootstrap>\n </ServerConfigBootstrap>\n </AuthBootstrap>\n </ClientBootstrap>\n </ThemeBootstrap>\n </PluginsBootstrap>\n </FontBootstrap>\n </Provider>\n );\n}\n\nexport default AppBootstrap;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC7D,SAASC,QAAQ,QAAQ,aAAa;AACtC,SAASC,KAAK,QAAQ,kBAAkB;AACxC,OAAO,gDAAgD;AACvD,SAASC,eAAe,QAAQ,4BAA4B;AAC5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D,QAAA,eAGvBP,IAAA,CAACR,aAAa;cAAAe,QAAA,eACZP,IAAA,CAACH,qBAAqB;gBAAAU,QAAA,eACpBP,IAAA,CAACJ,aAAa;kBAAAW,QAAA,eACZP,IAAA,CAACP,mBAAmB;oBAAAc,QAAA,eAClBP,IAAA,CAACL,WAAW;sBAAAY,QAAA,EAAEA;oBAAQ,CAAc;kBAAC,CAClB;gBAAC,CACT;cAAC,CACK;YAAC,CACX;UAAC,GAVXE,WAWU;QAAC,CACJ;MAAC,CACD;IAAC,CACN;EAAC,CACR,CAAC;AAEf;AAEA,eAAeR,YAAY"}
1
+ {"version":3,"file":"AppBootstrap.js","names":["React","useCallback","useMemo","useState","Provider","store","ClientBootstrap","useBroadcastLoginListener","ContextActions","ContextMenuRoot","FontBootstrap","PluginsBootstrap","AuthBootstrap","ConnectionBootstrap","getConnectOptions","createExportLogsContextAction","FontsLoaded","UserBootstrap","ServerConfigBootstrap","ThemeBootstrap","jsx","_jsx","jsxs","_jsxs","AppBootstrap","_ref","fontClassNames","pluginsUrl","getCorePlugins","serverUrl","logMetadata","children","clientOptions","logoutCount","setLogoutCount","onLogin","undefined","onLogout","requestAnimationFrame","value","contextActions","options","actions"],"sources":["../../src/components/AppBootstrap.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useState } from 'react';\nimport { Provider } from 'react-redux';\nimport { store } from '@deephaven/redux';\nimport '@deephaven/components/scss/BaseStyleSheet.scss';\nimport { ClientBootstrap } from '@deephaven/jsapi-bootstrap';\nimport { useBroadcastLoginListener } from '@deephaven/jsapi-components';\nimport { type Plugin } from '@deephaven/plugin';\nimport { ContextActions, ContextMenuRoot } from '@deephaven/components';\nimport FontBootstrap from './FontBootstrap';\nimport PluginsBootstrap from './PluginsBootstrap';\nimport AuthBootstrap from './AuthBootstrap';\nimport ConnectionBootstrap from './ConnectionBootstrap';\nimport { getConnectOptions, createExportLogsContextAction } from '../utils';\nimport FontsLoaded from './FontsLoaded';\nimport UserBootstrap from './UserBootstrap';\nimport ServerConfigBootstrap from './ServerConfigBootstrap';\nimport ThemeBootstrap from './ThemeBootstrap';\n\nexport type AppBootstrapProps = {\n /** URL of the server. */\n serverUrl: string;\n\n /** Properties included in support logs. */\n logMetadata?: Record<string, unknown>;\n\n /** URL of the plugins to load. */\n pluginsUrl: string;\n\n /** The core plugins to load. */\n getCorePlugins?: () => Promise<Plugin[]>;\n\n /** Font class names to load. */\n fontClassNames?: string[];\n\n /**\n * The children to render wrapped when everything is loaded and authenticated.\n */\n children: React.ReactNode;\n};\n\n/**\n * AppBootstrap component. Handles loading the fonts, client, and authentication.\n * Will display the children when everything is loaded and authenticated.\n */\nexport function AppBootstrap({\n fontClassNames,\n pluginsUrl,\n getCorePlugins,\n serverUrl,\n logMetadata,\n children,\n}: AppBootstrapProps): JSX.Element {\n const clientOptions = useMemo(() => getConnectOptions(), []);\n\n // On logout, we reset the client and have user login again\n const [logoutCount, setLogoutCount] = useState(0);\n const onLogin = useCallback(() => undefined, []);\n const onLogout = useCallback(() => {\n requestAnimationFrame(() => {\n setLogoutCount(value => value + 1);\n });\n }, []);\n useBroadcastLoginListener(onLogin, onLogout);\n\n const contextActions = useMemo(\n () => [createExportLogsContextAction(logMetadata, true)],\n [logMetadata]\n );\n\n return (\n <Provider store={store}>\n <FontBootstrap fontClassNames={fontClassNames}>\n <PluginsBootstrap\n getCorePlugins={getCorePlugins}\n pluginsUrl={pluginsUrl}\n >\n <ThemeBootstrap>\n <ClientBootstrap\n serverUrl={serverUrl}\n options={clientOptions}\n key={logoutCount}\n >\n <AuthBootstrap>\n <ServerConfigBootstrap>\n <UserBootstrap>\n <ConnectionBootstrap>\n <FontsLoaded>{children}</FontsLoaded>\n </ConnectionBootstrap>\n </UserBootstrap>\n </ServerConfigBootstrap>\n </AuthBootstrap>\n <ContextActions actions={contextActions} />\n </ClientBootstrap>\n </ThemeBootstrap>\n </PluginsBootstrap>\n </FontBootstrap>\n <ContextMenuRoot />\n </Provider>\n );\n}\n\nexport default AppBootst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,OAAO,CAC5B,MAAM,CAACa,6BAA6B,CAACe,WAAW,EAAE,IAAI,CAAC,CAAC,EACxD,CAACA,WAAW,CACd,CAAC;EAED,oBACEP,KAAA,CAACnB,QAAQ;IAACC,KAAK,EAAEA,KAAM;IAAA0B,QAAA,gBACrBV,IAAA,CAACX,aAAa;MAACgB,cAAc,EAAEA,cAAe;MAAAK,QAAA,eAC5CV,IAAA,CAACV,gBAAgB;QACfiB,cAAc,EAAEA,cAAe;QAC/BD,UAAU,EAAEA,UAAW;QAAAI,QAAA,eAEvBV,IAAA,CAACF,cAAc;UAAAY,QAAA,eACbR,KAAA,CAACjB,eAAe;YACduB,SAAS,EAAEA,SAAU;YACrBY,OAAO,EAAET,aAAc;YAAAD,QAAA,gBAGvBV,IAAA,CAACT,aAAa;cAAAmB,QAAA,eACZV,IAAA,CAACH,qBAAqB;gBAAAa,QAAA,eACpBV,IAAA,CAACJ,aAAa;kBAAAc,QAAA,eACZV,IAAA,CAACR,mBAAmB;oBAAAkB,QAAA,eAClBV,IAAA,CAACL,WAAW;sBAAAe,QAAA,EAAEA;oBAAQ,CAAc;kBAAC,CAClB;gBAAC,CACT;cAAC,CACK;YAAC,CACX,CAAC,eAChBV,IAAA,CAACb,cAAc;cAACkC,OAAO,EAAEF;YAAe,CAAE,CAAC;UAAA,GAXtCP,WAYU;QAAC,CACJ;MAAC,CACD;IAAC,CACN,CAAC,eAChBZ,IAAA,CAACZ,eAAe,IAAE,CAAC;EAAA,CACX,CAAC;AAEf;AAEA,eAAee,YAAY"}
@@ -0,0 +1,4 @@
1
+ import { type ContextAction } from '@deephaven/components';
2
+ export declare function createExportLogsContextAction(metadata?: Record<string, unknown>, isGlobal?: boolean): ContextAction;
3
+ export default createExportLogsContextAction;
4
+ //# sourceMappingURL=createExportLogsContextAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createExportLogsContextAction.d.ts","sourceRoot":"","sources":["../../src/utils/createExportLogsContextAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAoB,MAAM,uBAAuB,CAAC;AAI7E,wBAAgB,6BAA6B,CAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,QAAQ,UAAQ,GACf,aAAa,CAef;AAED,eAAe,6BAA6B,CAAC"}
@@ -0,0 +1,22 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
3
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
5
+ function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
6
+ import { GLOBAL_SHORTCUTS } from '@deephaven/components';
7
+ import { exportLogs, logHistory } from '@deephaven/log';
8
+ import { store } from '@deephaven/redux';
9
+ export function createExportLogsContextAction(metadata) {
10
+ var isGlobal = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
11
+ return {
12
+ action: () => {
13
+ exportLogs(logHistory, _objectSpread(_objectSpread({}, metadata), {}, {
14
+ userAgent: navigator.userAgent
15
+ }), store.getState());
16
+ },
17
+ shortcut: GLOBAL_SHORTCUTS.EXPORT_LOGS,
18
+ isGlobal
19
+ };
20
+ }
21
+ export default createExportLogsContextAction;
22
+ //# sourceMappingURL=createExportLogsContextAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createExportLogsContextAction.js","names":["GLOBAL_SHORTCUTS","exportLogs","logHistory","store","createExportLogsContextAction","metadata","isGlobal","arguments","length","undefined","action","_objectSpread","userAgent","navigator","getState","shortcut","EXPORT_LOGS"],"sources":["../../src/utils/createExportLogsContextAction.ts"],"sourcesContent":["import { type ContextAction, GLOBAL_SHORTCUTS } from '@deephaven/components';\nimport { exportLogs, logHistory } from '@deephaven/log';\nimport { store } from '@deephaven/redux';\n\nexport function createExportLogsContextAction(\n metadata?: Record<string, unknown>,\n isGlobal = false\n): ContextAction {\n return {\n action: () => {\n exportLogs(\n logHistory,\n {\n ...metadata,\n userAgent: navigator.userAgent,\n },\n store.getState()\n );\n },\n shortcut: GLOBAL_SHORTCUTS.EXPORT_LOGS,\n isGlobal,\n };\n}\n\nexport default createExportLogsContextAction;\n"],"mappings":";;;;;AAAA,SAA6BA,gBAAgB,QAAQ,uBAAuB;AAC5E,SAASC,UAAU,EAAEC,UAAU,QAAQ,gBAAgB;AACvD,SAASC,KAAK,QAAQ,kBAAkB;AAExC,OAAO,SAASC,6BAA6BA,CAC3CC,QAAkC,EAEnB;EAAA,IADfC,QAAQ,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAEhB,OAAO;IACLG,MAAM,EAAEA,CAAA,KAAM;MACZT,UAAU,CACRC,UAAU,EAAAS,aAAA,CAAAA,aAAA,KAELN,QAAQ;QACXO,SAAS,EAAEC,SAAS,CAACD;MAAS,IAEhCT,KAAK,CAACW,QAAQ,CAAC,CACjB,CAAC;IACH,CAAC;IACDC,QAAQ,EAAEf,gBAAgB,CAACgB,WAAW;IACtCV;EACF,CAAC;AACH;AAEA,eAAeF,6BAA6B"}
@@ -1,2 +1,3 @@
1
1
  export * from './ConnectUtils';
2
+ export * from './createExportLogsContextAction';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iCAAiC,CAAC"}
@@ -1,2 +1,3 @@
1
1
  export * from "./ConnectUtils.js";
2
+ export * from "./createExportLogsContextAction.js";
2
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from './ConnectUtils';\n"],"mappings":""}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/utils/index.ts"],"sourcesContent":["export * from './ConnectUtils';\nexport * from './createExportLogsContextAction';\n"],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/app-utils",
3
- "version": "0.103.0",
3
+ "version": "0.103.1-alpha-grpc-logging.3+9c67ac81",
4
4
  "description": "Deephaven App Utils",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -22,7 +22,7 @@
22
22
  "build:babel": "babel ./src --out-dir ./dist --extensions \".ts,.tsx,.js,.jsx\" --source-maps --root-mode upward"
23
23
  },
24
24
  "devDependencies": {
25
- "@deephaven/test-utils": "^0.103.0",
25
+ "@deephaven/test-utils": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
26
26
  "react": "^17.x",
27
27
  "react-dom": "^17.x",
28
28
  "react-redux": "^7.x",
@@ -30,26 +30,26 @@
30
30
  },
31
31
  "dependencies": {
32
32
  "@adobe/react-spectrum": "3.38.0",
33
- "@deephaven/auth-plugins": "^0.103.0",
34
- "@deephaven/chart": "^0.103.0",
35
- "@deephaven/components": "^0.103.0",
36
- "@deephaven/console": "^0.103.0",
37
- "@deephaven/dashboard": "^0.103.0",
38
- "@deephaven/dashboard-core-plugins": "^0.103.0",
39
- "@deephaven/file-explorer": "^0.103.0",
40
- "@deephaven/golden-layout": "^0.103.0",
41
- "@deephaven/icons": "^0.103.0",
42
- "@deephaven/iris-grid": "^0.103.0",
43
- "@deephaven/jsapi-bootstrap": "^0.103.0",
44
- "@deephaven/jsapi-components": "^0.103.0",
33
+ "@deephaven/auth-plugins": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
34
+ "@deephaven/chart": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
35
+ "@deephaven/components": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
36
+ "@deephaven/console": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
37
+ "@deephaven/dashboard": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
38
+ "@deephaven/dashboard-core-plugins": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
39
+ "@deephaven/file-explorer": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
40
+ "@deephaven/golden-layout": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
41
+ "@deephaven/icons": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
42
+ "@deephaven/iris-grid": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
43
+ "@deephaven/jsapi-bootstrap": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
44
+ "@deephaven/jsapi-components": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
45
45
  "@deephaven/jsapi-types": "^1.0.0-dev0.37.2",
46
- "@deephaven/jsapi-utils": "^0.103.0",
47
- "@deephaven/log": "^0.103.0",
48
- "@deephaven/plugin": "^0.103.0",
49
- "@deephaven/react-hooks": "^0.103.0",
50
- "@deephaven/redux": "^0.103.0",
51
- "@deephaven/storage": "^0.103.0",
52
- "@deephaven/utils": "^0.103.0",
46
+ "@deephaven/jsapi-utils": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
47
+ "@deephaven/log": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
48
+ "@deephaven/plugin": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
49
+ "@deephaven/react-hooks": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
50
+ "@deephaven/redux": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
51
+ "@deephaven/storage": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
52
+ "@deephaven/utils": "^0.103.1-alpha-grpc-logging.3+9c67ac81",
53
53
  "@fontsource/fira-mono": "5.0.13",
54
54
  "@fontsource/fira-sans": "5.0.20",
55
55
  "@paciolan/remote-component": "2.13.0",
@@ -74,5 +74,5 @@
74
74
  "publishConfig": {
75
75
  "access": "public"
76
76
  },
77
- "gitHead": "7e3575107a3ae41867b16bfac21a8edf3a5ab5b2"
77
+ "gitHead": "9c67ac81ffe5579bf2ca3d0fa9b5f943e30aee79"
78
78
  }