@deephaven/app-utils 1.18.2 → 1.19.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.
@@ -1,12 +1,16 @@
1
- import { type PluginModuleMap, type AuthPlugin, type AuthPluginComponent, type LegacyAuthPlugin, type LegacyPlugin, type Plugin, type PluginModule } from '@deephaven/plugin';
2
- export type PluginManifestPluginInfo = {
3
- name: string;
4
- main: string;
5
- version: string;
6
- };
7
- export type PluginManifest = {
8
- plugins: PluginManifestPluginInfo[];
9
- };
1
+ import { type PluginModuleMap, type AuthPlugin, type AuthPluginComponent, type LegacyAuthPlugin, type LegacyPlugin, type Plugin, type PluginManifest, type PluginManifestPluginInfo, getPluginModuleValue } from '@deephaven/plugin';
2
+ /**
3
+ * @deprecated Import from `@deephaven/plugin` instead.
4
+ */
5
+ export type { PluginManifestPluginInfo };
6
+ /**
7
+ * @deprecated Import from `@deephaven/plugin` instead.
8
+ */
9
+ export type { PluginManifest };
10
+ /**
11
+ * @deprecated Import from `@deephaven/plugin` instead.
12
+ */
13
+ export { getPluginModuleValue };
10
14
  /**
11
15
  * Imports a commonjs plugin module from the provided URL
12
16
  * @param pluginUrl The URL of the plugin to load
@@ -21,11 +25,11 @@ export declare function loadModulePlugin(pluginUrl: string): Promise<LegacyPlugi
21
25
  * @returns The JSON object of the manifest file
22
26
  */
23
27
  export declare function loadJson(jsonUrl: string): Promise<PluginManifest>;
24
- export declare function getPluginModuleValue(value: LegacyPlugin | Plugin | {
25
- default: Plugin;
26
- }): PluginModule | null;
27
28
  /**
28
- * Load all plugin modules available based on the manifest file at the provided base URL
29
+ * Load all plugin modules available based on the manifest file at the provided base URL.
30
+ * Plugins are loaded sequentially so that each plugin's exports are registered
31
+ * in the module resolve map before subsequent plugins load. This enables
32
+ * cross-plugin imports via standard import statements.
29
33
  * @param modulePluginsUrl The base URL of the module plugins to load
30
34
  * @returns A map from the name of the plugin to the plugin module that was loaded
31
35
  */
@@ -1 +1 @@
1
- {"version":3,"file":"PluginUtils.d.ts","sourceRoot":"","sources":["../../src/plugins/PluginUtils.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,mBAAmB,EAExB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,MAAM,EAIX,KAAK,YAAY,EAGlB,MAAM,mBAAmB,CAAC;AAK3B,MAAM,MAAM,wBAAwB,GAAG;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAAE,OAAO,EAAE,wBAAwB,EAAE,CAAA;CAAE,CAAC;AAErE;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,YAAY,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAG7C;AAED;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAUvE;AAUD,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,YAAY,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GACjD,YAAY,GAAG,IAAI,CAerB;AAuBD;;;;GAIG;AACH,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,eAAe,CAAC,CAiD1B;AAED,wBAAgB,eAAe,CAC7B,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,MAAM,EAAE,CAEV;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,eAAe,EAC1B,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACrC,WAAW,6CAAmD,GAC7D,mBAAmB,CAwCrB"}
1
+ {"version":3,"file":"PluginUtils.d.ts","sourceRoot":"","sources":["../../src/plugins/PluginUtils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,mBAAmB,EAExB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,MAAM,EAKX,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,oBAAoB,EACrB,MAAM,mBAAmB,CAAC;AAM3B;;GAEG;AACH,YAAY,EAAE,wBAAwB,EAAE,CAAC;AAEzC;;GAEG;AACH,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B;;GAEG;AACH,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAEhC;;;;GAIG;AACH,wBAAsB,gBAAgB,CACpC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,YAAY,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAG7C;AAED;;;;GAIG;AACH,wBAAsB,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAUvE;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,gBAAgB,EAAE,MAAM,GACvB,OAAO,CAAC,eAAe,CAAC,CA2C1B;AAED,wBAAgB,eAAe,CAC7B,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GACpC,MAAM,EAAE,CAEV;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,eAAe,EAC1B,gBAAgB,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,EACrC,WAAW,6CAAmD,GAC7D,mBAAmB,CAwCrB"}
@@ -1,14 +1,24 @@
1
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
2
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
4
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
5
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
6
1
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
7
2
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
8
3
  import Log from '@deephaven/log';
9
- import { isAuthPlugin, PluginType, isLegacyAuthPlugin, isLegacyPlugin, isPlugin, isMultiPlugin } from '@deephaven/plugin';
4
+ import { isAuthPlugin, PluginType, isLegacyAuthPlugin, processLoadedModule, sortPluginsByDependency, getPluginModuleValue } from '@deephaven/plugin';
10
5
  import loadRemoteModule from "./loadRemoteModule.js";
6
+ import { resolve } from "./remote-component.config.js";
11
7
  var log = Log.module('@deephaven/app-utils.PluginUtils');
8
+
9
+ /**
10
+ * @deprecated Import from `@deephaven/plugin` instead.
11
+ */
12
+
13
+ /**
14
+ * @deprecated Import from `@deephaven/plugin` instead.
15
+ */
16
+
17
+ /**
18
+ * @deprecated Import from `@deephaven/plugin` instead.
19
+ */
20
+ export { getPluginModuleValue };
21
+
12
22
  /**
13
23
  * Imports a commonjs plugin module from the provided URL
14
24
  * @param pluginUrl The URL of the plugin to load
@@ -33,6 +43,15 @@ function _loadModulePlugin() {
33
43
  export function loadJson(_x2) {
34
44
  return _loadJson.apply(this, arguments);
35
45
  }
46
+
47
+ /**
48
+ * Load all plugin modules available based on the manifest file at the provided base URL.
49
+ * Plugins are loaded sequentially so that each plugin's exports are registered
50
+ * in the module resolve map before subsequent plugins load. This enables
51
+ * cross-plugin imports via standard import statements.
52
+ * @param modulePluginsUrl The base URL of the module plugins to load
53
+ * @returns A map from the name of the plugin to the plugin module that was loaded
54
+ */
36
55
  function _loadJson() {
37
56
  _loadJson = _asyncToGenerator(function* (jsonUrl) {
38
57
  var res = yield fetch(jsonUrl);
@@ -47,47 +66,6 @@ function _loadJson() {
47
66
  });
48
67
  return _loadJson.apply(this, arguments);
49
68
  }
50
- function hasDefaultExport(value) {
51
- return typeof value === 'object' && value != null && typeof value.default === 'object';
52
- }
53
- export function getPluginModuleValue(value) {
54
- // TypeScript builds CJS default exports differently depending on
55
- // whether there are also named exports. If the default is the only
56
- // export, it will be the value. If there are also named exports,
57
- // it will be assigned to the `default` property on the value.
58
- if (isPlugin(value)) {
59
- return value;
60
- }
61
- if (hasDefaultExport(value) && isPlugin(value.default)) {
62
- return value.default;
63
- }
64
- if (isLegacyPlugin(value)) {
65
- return value;
66
- }
67
- return null;
68
- }
69
-
70
- /**
71
- * Register a plugin in the plugin map, logging a warning if a plugin with the same name already exists.
72
- * @param pluginMap The plugin map to register the plugin in
73
- * @param name The name to register the plugin under
74
- * @param plugin The plugin to register
75
- * @param version Optional version to attach to the plugin
76
- */
77
- function registerPlugin(pluginMap, name, plugin, version) {
78
- if (pluginMap.has(name)) {
79
- log.warn("Plugin '".concat(name, "' is already registered. The existing plugin will be replaced."));
80
- }
81
- pluginMap.set(name, _objectSpread(_objectSpread({}, plugin), {}, {
82
- version
83
- }));
84
- }
85
-
86
- /**
87
- * Load all plugin modules available based on the manifest file at the provided base URL
88
- * @param modulePluginsUrl The base URL of the module plugins to load
89
- * @returns A map from the name of the plugin to the plugin module that was loaded
90
- */
91
69
  export function loadModulePlugins(_x3) {
92
70
  return _loadModulePlugins.apply(this, arguments);
93
71
  }
@@ -100,42 +78,26 @@ function _loadModulePlugins() {
100
78
  throw new Error('Plugin manifest JSON does not contain plugins array');
101
79
  }
102
80
  log.debug('Plugin manifest loaded:', manifest);
103
- var pluginPromises = [];
104
- for (var i = 0; i < manifest.plugins.length; i += 1) {
105
- var {
106
- name,
107
- main
108
- } = manifest.plugins[i];
109
- var pluginMainUrl = "".concat(modulePluginsUrl, "/").concat(name, "/").concat(main);
110
- pluginPromises.push(loadModulePlugin(pluginMainUrl));
111
- }
112
- var pluginModules = yield Promise.allSettled(pluginPromises);
81
+ var sortedPlugins = sortPluginsByDependency(manifest.plugins);
113
82
  var pluginMap = new Map();
114
- var _loop = function* _loop() {
115
- var module = pluginModules[_i];
83
+
84
+ // Load plugins sequentially so each plugin's exports are available
85
+ // to subsequently loaded plugins via import
86
+ for (var i = 0; i < sortedPlugins.length; i += 1) {
116
87
  var {
117
88
  name,
118
- version
119
- } = manifest.plugins[_i];
120
- if (module.status === 'fulfilled') {
121
- var moduleValue = getPluginModuleValue(module.value);
122
- if (moduleValue == null) {
123
- log.error("Plugin '".concat(name, "' is missing an exported value."));
124
- } else if (isMultiPlugin(moduleValue)) {
125
- // Flatten MultiPlugin: register each inner plugin by its own name
126
- log.debug("MultiPlugin '".concat(name, "' contains ").concat(moduleValue.plugins.length, " plugins"));
127
- moduleValue.plugins.forEach(innerPlugin => {
128
- registerPlugin(pluginMap, innerPlugin.name, innerPlugin, version);
129
- });
130
- } else {
131
- registerPlugin(pluginMap, name, moduleValue, version);
132
- }
133
- } else {
134
- log.error("Unable to load plugin '".concat(name, "'"), module.reason);
89
+ main,
90
+ version,
91
+ package: packageName
92
+ } = sortedPlugins[i];
93
+ var pluginMainUrl = "".concat(modulePluginsUrl, "/").concat(name, "/").concat(main);
94
+ try {
95
+ // eslint-disable-next-line no-await-in-loop
96
+ var pluginExports = yield loadModulePlugin(pluginMainUrl);
97
+ processLoadedModule(pluginMap, resolve, pluginExports, name, packageName, version);
98
+ } catch (e) {
99
+ log.error("Unable to load plugin '".concat(name, "'"), e);
135
100
  }
136
- };
137
- for (var _i = 0; _i < pluginModules.length; _i += 1) {
138
- yield* _loop();
139
101
  }
140
102
  log.info('Plugins loaded:', pluginMap);
141
103
  return pluginMap;
@@ -1 +1 @@
1
- {"version":3,"file":"PluginUtils.js","names":["Log","isAuthPlugin","PluginType","isLegacyAuthPlugin","isLegacyPlugin","isPlugin","isMultiPlugin","loadRemoteModule","log","module","loadModulePlugin","_x","_loadModulePlugin","apply","arguments","_asyncToGenerator","pluginUrl","myModule","loadJson","_x2","_loadJson","jsonUrl","res","fetch","ok","Error","statusText","json","_unused","hasDefaultExport","value","default","getPluginModuleValue","registerPlugin","pluginMap","name","plugin","version","has","warn","concat","set","_objectSpread","loadModulePlugins","_x3","_loadModulePlugins","modulePluginsUrl","debug","manifest","Array","isArray","plugins","pluginPromises","i","length","main","pluginMainUrl","push","pluginModules","Promise","allSettled","Map","_loop","status","moduleValue","error","forEach","innerPlugin","reason","info","e","getAuthHandlers","authConfigValues","_authConfigValues$get","_authConfigValues$get2","get","split","getAuthPluginComponent","corePlugins","undefined","authHandlers","authPlugins","entries","filter","_ref","map","_ref2","type","AUTH_PLUGIN","component","AuthPlugin","Component","isAvailable","availableAuthPlugins","_ref3","_ref4","join"],"sources":["../../src/plugins/PluginUtils.tsx"],"sourcesContent":["import Log from '@deephaven/log';\nimport {\n type PluginModuleMap,\n type AuthPlugin,\n type AuthPluginComponent,\n isAuthPlugin,\n type LegacyAuthPlugin,\n type LegacyPlugin,\n type Plugin,\n PluginType,\n isLegacyAuthPlugin,\n isLegacyPlugin,\n type PluginModule,\n isPlugin,\n isMultiPlugin,\n} from '@deephaven/plugin';\nimport loadRemoteModule from './loadRemoteModule';\n\nconst log = Log.module('@deephaven/app-utils.PluginUtils');\n\nexport type PluginManifestPluginInfo = {\n name: string;\n main: string;\n version: string;\n};\n\nexport type PluginManifest = { plugins: PluginManifestPluginInfo[] };\n\n/**\n * Imports a commonjs plugin module from the provided URL\n * @param pluginUrl The URL of the plugin to load\n * @returns The loaded module\n */\nexport async function loadModulePlugin(\n pluginUrl: string\n): Promise<LegacyPlugin | { default: Plugin }> {\n const myModule = await loadRemoteModule(pluginUrl);\n return myModule;\n}\n\n/**\n * Loads a JSON file and returns the JSON object\n * @param jsonUrl The URL of the JSON file to load\n * @returns The JSON object of the manifest file\n */\nexport async function loadJson(jsonUrl: string): Promise<PluginManifest> {\n const res = await fetch(jsonUrl);\n if (!res.ok) {\n throw new Error(res.statusText);\n }\n try {\n return await res.json();\n } catch {\n throw new Error('Could not be parsed as JSON');\n }\n}\n\nfunction hasDefaultExport(value: unknown): value is { default: Plugin } {\n return (\n typeof value === 'object' &&\n value != null &&\n typeof (value as { default?: unknown }).default === 'object'\n );\n}\n\nexport function getPluginModuleValue(\n value: LegacyPlugin | Plugin | { default: Plugin }\n): PluginModule | null {\n // TypeScript builds CJS default exports differently depending on\n // whether there are also named exports. If the default is the only\n // export, it will be the value. If there are also named exports,\n // it will be assigned to the `default` property on the value.\n if (isPlugin(value)) {\n return value;\n }\n if (hasDefaultExport(value) && isPlugin(value.default)) {\n return value.default;\n }\n if (isLegacyPlugin(value)) {\n return value;\n }\n return null;\n}\n\n/**\n * Register a plugin in the plugin map, logging a warning if a plugin with the same name already exists.\n * @param pluginMap The plugin map to register the plugin in\n * @param name The name to register the plugin under\n * @param plugin The plugin to register\n * @param version Optional version to attach to the plugin\n */\nfunction registerPlugin(\n pluginMap: PluginModuleMap,\n name: string,\n plugin: PluginModule,\n version?: string\n): void {\n if (pluginMap.has(name)) {\n log.warn(\n `Plugin '${name}' is already registered. The existing plugin will be replaced.`\n );\n }\n pluginMap.set(name, { ...plugin, version });\n}\n\n/**\n * Load all plugin modules available based on the manifest file at the provided base URL\n * @param modulePluginsUrl The base URL of the module plugins to load\n * @returns A map from the name of the plugin to the plugin module that was loaded\n */\nexport async function loadModulePlugins(\n modulePluginsUrl: string\n): Promise<PluginModuleMap> {\n log.debug('Loading plugins...');\n try {\n const manifest = await loadJson(`${modulePluginsUrl}/manifest.json`);\n\n if (!Array.isArray(manifest.plugins)) {\n throw new Error('Plugin manifest JSON does not contain plugins array');\n }\n\n log.debug('Plugin manifest loaded:', manifest);\n const pluginPromises: Promise<LegacyPlugin | { default: Plugin }>[] = [];\n for (let i = 0; i < manifest.plugins.length; i += 1) {\n const { name, main } = manifest.plugins[i];\n const pluginMainUrl = `${modulePluginsUrl}/${name}/${main}`;\n pluginPromises.push(loadModulePlugin(pluginMainUrl));\n }\n\n const pluginModules = await Promise.allSettled(pluginPromises);\n\n const pluginMap: PluginModuleMap = new Map();\n for (let i = 0; i < pluginModules.length; i += 1) {\n const module = pluginModules[i];\n const { name, version } = manifest.plugins[i];\n if (module.status === 'fulfilled') {\n const moduleValue = getPluginModuleValue(module.value);\n if (moduleValue == null) {\n log.error(`Plugin '${name}' is missing an exported value.`);\n } else if (isMultiPlugin(moduleValue)) {\n // Flatten MultiPlugin: register each inner plugin by its own name\n log.debug(\n `MultiPlugin '${name}' contains ${moduleValue.plugins.length} plugins`\n );\n moduleValue.plugins.forEach(innerPlugin => {\n registerPlugin(pluginMap, innerPlugin.name, innerPlugin, version);\n });\n } else {\n registerPlugin(pluginMap, name, moduleValue, version);\n }\n } else {\n log.error(`Unable to load plugin '${name}'`, module.reason);\n }\n }\n log.info('Plugins loaded:', pluginMap);\n\n return pluginMap;\n } catch (e) {\n log.error('Unable to load plugins:', e);\n return new Map();\n }\n}\n\nexport function getAuthHandlers(\n authConfigValues: Map<string, string>\n): string[] {\n return authConfigValues.get('AuthHandlers')?.split(',') ?? [];\n}\n\n/**\n * Get the auth plugin component from the plugin map and current configuration\n * Throws if no auth plugin is available\n *\n * @param pluginMap Map of plugins loaded from the server\n * @param authConfigValues Auth config values from the server\n * @param corePlugins Map of core auth plugins to include in the list. They are added after the loaded plugins\n * @returns The auth plugin component to render\n */\nexport function getAuthPluginComponent(\n pluginMap: PluginModuleMap,\n authConfigValues: Map<string, string>,\n corePlugins = new Map<string, AuthPlugin | LegacyAuthPlugin>()\n): AuthPluginComponent {\n const authHandlers = getAuthHandlers(authConfigValues);\n // User plugins take priority over core plugins\n const authPlugins = (\n [...pluginMap.entries(), ...corePlugins.entries()].filter(\n ([, plugin]) => isAuthPlugin(plugin) || isLegacyAuthPlugin(plugin)\n ) as [string, AuthPlugin | LegacyAuthPlugin][]\n ).map(([name, plugin]) => {\n if (isLegacyAuthPlugin(plugin)) {\n return {\n type: PluginType.AUTH_PLUGIN,\n name,\n component: plugin.AuthPlugin.Component,\n isAvailable: plugin.AuthPlugin.isAvailable,\n };\n }\n\n return plugin;\n });\n\n // Filter the available auth plugins\n const availableAuthPlugins = authPlugins.filter(({ isAvailable }) =>\n isAvailable(authHandlers, authConfigValues)\n );\n\n if (availableAuthPlugins.length === 0) {\n throw new Error(\n `No login plugins found, please register a login plugin for auth handlers: ${authHandlers}`\n );\n } else if (availableAuthPlugins.length > 1) {\n log.warn(\n 'More than one login plugin available, will use the first one: ',\n availableAuthPlugins.map(({ name }) => name).join(', ')\n );\n }\n\n const { name, component } = availableAuthPlugins[0];\n log.info('Using LoginPlugin', name);\n\n return component;\n}\n"],"mappings":";;;;;;;AAAA,OAAOA,GAAG,MAAM,gBAAgB;AAChC,SAIEC,YAAY,EAIZC,UAAU,EACVC,kBAAkB,EAClBC,cAAc,EAEdC,QAAQ,EACRC,aAAa,QACR,mBAAmB;AAAC,OACpBC,gBAAgB;AAEvB,IAAMC,GAAG,GAAGR,GAAG,CAACS,MAAM,CAAC,kCAAkC,CAAC;AAU1D;AACA;AACA;AACA;AACA;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ignoreList":[]}
1
+ {"version":3,"file":"PluginUtils.js","names":["Log","isAuthPlugin","PluginType","isLegacyAuthPlugin","processLoadedModule","sortPluginsByDependency","getPluginModuleValue","loadRemoteModule","resolve","log","module","loadModulePlugin","_x","_loadModulePlugin","apply","arguments","_asyncToGenerator","pluginUrl","myModule","loadJson","_x2","_loadJson","jsonUrl","res","fetch","ok","Error","statusText","json","_unused","loadModulePlugins","_x3","_loadModulePlugins","modulePluginsUrl","debug","manifest","concat","Array","isArray","plugins","sortedPlugins","pluginMap","Map","i","length","name","main","version","package","packageName","pluginMainUrl","pluginExports","e","error","info","getAuthHandlers","authConfigValues","_authConfigValues$get","_authConfigValues$get2","get","split","getAuthPluginComponent","corePlugins","undefined","authHandlers","authPlugins","entries","filter","_ref","plugin","map","_ref2","type","AUTH_PLUGIN","component","AuthPlugin","Component","isAvailable","availableAuthPlugins","_ref3","warn","_ref4","join"],"sources":["../../src/plugins/PluginUtils.ts"],"sourcesContent":["import Log from '@deephaven/log';\nimport {\n type PluginModuleMap,\n type AuthPlugin,\n type AuthPluginComponent,\n isAuthPlugin,\n type LegacyAuthPlugin,\n type LegacyPlugin,\n type Plugin,\n PluginType,\n isLegacyAuthPlugin,\n processLoadedModule,\n sortPluginsByDependency,\n type PluginManifest,\n type PluginManifestPluginInfo,\n getPluginModuleValue,\n} from '@deephaven/plugin';\nimport loadRemoteModule from './loadRemoteModule';\nimport { resolve } from './remote-component.config';\n\nconst log = Log.module('@deephaven/app-utils.PluginUtils');\n\n/**\n * @deprecated Import from `@deephaven/plugin` instead.\n */\nexport type { PluginManifestPluginInfo };\n\n/**\n * @deprecated Import from `@deephaven/plugin` instead.\n */\nexport type { PluginManifest };\n\n/**\n * @deprecated Import from `@deephaven/plugin` instead.\n */\nexport { getPluginModuleValue };\n\n/**\n * Imports a commonjs plugin module from the provided URL\n * @param pluginUrl The URL of the plugin to load\n * @returns The loaded module\n */\nexport async function loadModulePlugin(\n pluginUrl: string\n): Promise<LegacyPlugin | { default: Plugin }> {\n const myModule = await loadRemoteModule(pluginUrl);\n return myModule;\n}\n\n/**\n * Loads a JSON file and returns the JSON object\n * @param jsonUrl The URL of the JSON file to load\n * @returns The JSON object of the manifest file\n */\nexport async function loadJson(jsonUrl: string): Promise<PluginManifest> {\n const res = await fetch(jsonUrl);\n if (!res.ok) {\n throw new Error(res.statusText);\n }\n try {\n return await res.json();\n } catch {\n throw new Error('Could not be parsed as JSON');\n }\n}\n\n/**\n * Load all plugin modules available based on the manifest file at the provided base URL.\n * Plugins are loaded sequentially so that each plugin's exports are registered\n * in the module resolve map before subsequent plugins load. This enables\n * cross-plugin imports via standard import statements.\n * @param modulePluginsUrl The base URL of the module plugins to load\n * @returns A map from the name of the plugin to the plugin module that was loaded\n */\nexport async function loadModulePlugins(\n modulePluginsUrl: string\n): Promise<PluginModuleMap> {\n log.debug('Loading plugins...');\n try {\n const manifest = await loadJson(`${modulePluginsUrl}/manifest.json`);\n\n if (!Array.isArray(manifest.plugins)) {\n throw new Error('Plugin manifest JSON does not contain plugins array');\n }\n\n log.debug('Plugin manifest loaded:', manifest);\n\n const sortedPlugins = sortPluginsByDependency(manifest.plugins);\n\n const pluginMap: PluginModuleMap = new Map();\n\n // Load plugins sequentially so each plugin's exports are available\n // to subsequently loaded plugins via import\n for (let i = 0; i < sortedPlugins.length; i += 1) {\n const { name, main, version, package: packageName } = sortedPlugins[i];\n const pluginMainUrl = `${modulePluginsUrl}/${name}/${main}`;\n try {\n // eslint-disable-next-line no-await-in-loop\n const pluginExports = await loadModulePlugin(pluginMainUrl);\n\n processLoadedModule(\n pluginMap,\n resolve,\n pluginExports,\n name,\n packageName,\n version\n );\n } catch (e) {\n log.error(`Unable to load plugin '${name}'`, e);\n }\n }\n log.info('Plugins loaded:', pluginMap);\n\n return pluginMap;\n } catch (e) {\n log.error('Unable to load plugins:', e);\n return new Map();\n }\n}\n\nexport function getAuthHandlers(\n authConfigValues: Map<string, string>\n): string[] {\n return authConfigValues.get('AuthHandlers')?.split(',') ?? [];\n}\n\n/**\n * Get the auth plugin component from the plugin map and current configuration\n * Throws if no auth plugin is available\n *\n * @param pluginMap Map of plugins loaded from the server\n * @param authConfigValues Auth config values from the server\n * @param corePlugins Map of core auth plugins to include in the list. They are added after the loaded plugins\n * @returns The auth plugin component to render\n */\nexport function getAuthPluginComponent(\n pluginMap: PluginModuleMap,\n authConfigValues: Map<string, string>,\n corePlugins = new Map<string, AuthPlugin | LegacyAuthPlugin>()\n): AuthPluginComponent {\n const authHandlers = getAuthHandlers(authConfigValues);\n // User plugins take priority over core plugins\n const authPlugins = (\n [...pluginMap.entries(), ...corePlugins.entries()].filter(\n ([, plugin]) => isAuthPlugin(plugin) || isLegacyAuthPlugin(plugin)\n ) as [string, AuthPlugin | LegacyAuthPlugin][]\n ).map(([name, plugin]) => {\n if (isLegacyAuthPlugin(plugin)) {\n return {\n type: PluginType.AUTH_PLUGIN,\n name,\n component: plugin.AuthPlugin.Component,\n isAvailable: plugin.AuthPlugin.isAvailable,\n };\n }\n\n return plugin;\n });\n\n // Filter the available auth plugins\n const availableAuthPlugins = authPlugins.filter(({ isAvailable }) =>\n isAvailable(authHandlers, authConfigValues)\n );\n\n if (availableAuthPlugins.length === 0) {\n throw new Error(\n `No login plugins found, please register a login plugin for auth handlers: ${authHandlers}`\n );\n } else if (availableAuthPlugins.length > 1) {\n log.warn(\n 'More than one login plugin available, will use the first one: ',\n availableAuthPlugins.map(({ name }) => name).join(', ')\n );\n }\n\n const { name, component } = availableAuthPlugins[0];\n log.info('Using LoginPlugin', name);\n\n return component;\n}\n"],"mappings":";;AAAA,OAAOA,GAAG,MAAM,gBAAgB;AAChC,SAIEC,YAAY,EAIZC,UAAU,EACVC,kBAAkB,EAClBC,mBAAmB,EACnBC,uBAAuB,EAGvBC,oBAAoB,QACf,mBAAmB;AAAC,OACpBC,gBAAgB;AAAA,SACdC,OAAO;AAEhB,IAAMC,GAAG,GAAGT,GAAG,CAACU,MAAM,CAAC,kCAAkC,CAAC;;A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AACE;MACjC,CAAC;IACH;IAEA,OAAOR,MAAM;EACf,CAAC,CAAC;;EAEF;EACA,IAAMS,oBAAoB,GAAGb,WAAW,CAACE,MAAM,CAACY,KAAA;IAAA,IAAC;MAAEF;IAAY,CAAC,GAAAE,KAAA;IAAA,OAC9DF,WAAW,CAACb,YAAY,EAAER,gBAAgB,CAAC;EAAA,CAC7C,CAAC;EAED,IAAIsB,oBAAoB,CAAClC,MAAM,KAAK,CAAC,EAAE;IACrC,MAAM,IAAIlB,KAAK,8EAAAU,MAAA,CACgE4B,YAAY,CAC3F,CAAC;EACH,CAAC,MAAM,IAAIc,oBAAoB,CAAClC,MAAM,GAAG,CAAC,EAAE;IAC1CnC,GAAG,CAACuE,IAAI,CACN,gEAAgE,EAChEF,oBAAoB,CAACR,GAAG,CAACW,KAAA;MAAA,IAAC;QAAEpC;MAAK,CAAC,GAAAoC,KAAA;MAAA,OAAKpC,IAAI;IAAA,EAAC,CAACqC,IAAI,CAAC,IAAI,CACxD,CAAC;EACH;EAEA,IAAM;IAAErC,IAAI;IAAE6B;EAAU,CAAC,GAAGI,oBAAoB,CAAC,CAAC,CAAC;EACnDrE,GAAG,CAAC6C,IAAI,CAAC,mBAAmB,EAAET,IAAI,CAAC;EAEnC,OAAO6B,SAAS;AAClB","ignoreList":[]}
@@ -1,45 +1,2 @@
1
- /**
2
- * remote-component.config.js
3
- *
4
- * Dependencies for Remote Components
5
- */
6
- import react from 'react';
7
- import * as redux from 'redux';
8
- import * as reactRedux from 'react-redux';
9
- import ReactDOM from 'react-dom';
10
- import * as AdobeReactSpectrum from '@adobe/react-spectrum';
11
- import * as DeephavenAuthPlugins from '@deephaven/auth-plugins';
12
- import * as DeephavenChart from '@deephaven/chart';
13
- import * as DeephavenComponents from '@deephaven/components';
14
- import * as DeephavenDashboard from '@deephaven/dashboard';
15
- import * as DeephavenDashboardCorePlugins from '@deephaven/dashboard-core-plugins';
16
- import * as DeephavenIcons from '@deephaven/icons';
17
- import * as DeephavenIrisGrid from '@deephaven/iris-grid';
18
- import * as DeephavenJsapiBootstrap from '@deephaven/jsapi-bootstrap';
19
- import * as DeephavenJsapiComponents from '@deephaven/jsapi-components';
20
- import * as DeephavenJsapiUtils from '@deephaven/jsapi-utils';
21
- import * as DeephavenConsole from '@deephaven/console';
22
- import * as DeephavenReactHooks from '@deephaven/react-hooks';
23
- import * as DeephavenPlugin from '@deephaven/plugin';
24
- export declare const resolve: {
25
- react: typeof react;
26
- 'react-dom': typeof ReactDOM;
27
- redux: typeof redux;
28
- 'react-redux': typeof reactRedux;
29
- '@adobe/react-spectrum': typeof AdobeReactSpectrum;
30
- '@deephaven/auth-plugins': typeof DeephavenAuthPlugins;
31
- '@deephaven/chart': typeof DeephavenChart;
32
- '@deephaven/components': typeof DeephavenComponents;
33
- '@deephaven/console': typeof DeephavenConsole;
34
- '@deephaven/dashboard': typeof DeephavenDashboard;
35
- '@deephaven/dashboard-core-plugins': typeof DeephavenDashboardCorePlugins;
36
- '@deephaven/icons': typeof DeephavenIcons;
37
- '@deephaven/iris-grid': typeof DeephavenIrisGrid;
38
- '@deephaven/jsapi-bootstrap': typeof DeephavenJsapiBootstrap;
39
- '@deephaven/jsapi-components': typeof DeephavenJsapiComponents;
40
- '@deephaven/jsapi-utils': typeof DeephavenJsapiUtils;
41
- '@deephaven/log': import("packages/log/src/DefaultLogger").default;
42
- '@deephaven/plugin': typeof DeephavenPlugin;
43
- '@deephaven/react-hooks': typeof DeephavenReactHooks;
44
- };
1
+ export declare const resolve: Record<string, unknown>;
45
2
  //# sourceMappingURL=remote-component.config.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"remote-component.config.d.ts","sourceRoot":"","sources":["../../src/plugins/remote-component.config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,UAAU,MAAM,aAAa,CAAC;AAC1C,OAAO,QAAQ,MAAM,WAAW,CAAC;AAEjC,OAAO,KAAK,kBAAkB,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,oBAAoB,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,mBAAmB,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,kBAAkB,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,6BAA6B,MAAM,mCAAmC,CAAC;AACnF,OAAO,KAAK,cAAc,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,iBAAiB,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,uBAAuB,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,wBAAwB,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,mBAAmB,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,gBAAgB,MAAM,oBAAoB,CAAC;AAEvD,OAAO,KAAK,mBAAmB,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,eAAe,MAAM,mBAAmB,CAAC;AAGrD,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;CAoBnB,CAAC"}
1
+ {"version":3,"file":"remote-component.config.d.ts","sourceRoot":"","sources":["../../src/plugins/remote-component.config.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAoB3C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"remote-component.config.js","names":["react","redux","reactRedux","ReactDOM","AdobeReactSpectrum","DeephavenAuthPlugins","DeephavenChart","DeephavenComponents","DeephavenDashboard","DeephavenDashboardCorePlugins","DeephavenIcons","DeephavenIrisGrid","DeephavenJsapiBootstrap","DeephavenJsapiComponents","DeephavenJsapiUtils","DeephavenConsole","DeephavenLog","DeephavenReactHooks","DeephavenPlugin","resolve"],"sources":["../../src/plugins/remote-component.config.ts"],"sourcesContent":["/**\n * remote-component.config.js\n *\n * Dependencies for Remote Components\n */\nimport react from 'react';\nimport * as redux from 'redux';\nimport * as reactRedux from 'react-redux';\nimport ReactDOM from 'react-dom';\n// eslint-disable-next-line no-restricted-imports\nimport * as AdobeReactSpectrum from '@adobe/react-spectrum';\nimport * as DeephavenAuthPlugins from '@deephaven/auth-plugins';\nimport * as DeephavenChart from '@deephaven/chart';\nimport * as DeephavenComponents from '@deephaven/components';\nimport * as DeephavenDashboard from '@deephaven/dashboard';\nimport * as DeephavenDashboardCorePlugins from '@deephaven/dashboard-core-plugins';\nimport * as DeephavenIcons from '@deephaven/icons';\nimport * as DeephavenIrisGrid from '@deephaven/iris-grid';\nimport * as DeephavenJsapiBootstrap from '@deephaven/jsapi-bootstrap';\nimport * as DeephavenJsapiComponents from '@deephaven/jsapi-components';\nimport * as DeephavenJsapiUtils from '@deephaven/jsapi-utils';\nimport * as DeephavenConsole from '@deephaven/console';\nimport DeephavenLog from '@deephaven/log';\nimport * as DeephavenReactHooks from '@deephaven/react-hooks';\nimport * as DeephavenPlugin from '@deephaven/plugin';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const resolve = {\n react,\n 'react-dom': ReactDOM,\n redux,\n 'react-redux': reactRedux,\n '@adobe/react-spectrum': AdobeReactSpectrum,\n '@deephaven/auth-plugins': DeephavenAuthPlugins,\n '@deephaven/chart': DeephavenChart,\n '@deephaven/components': DeephavenComponents,\n '@deephaven/console': DeephavenConsole,\n '@deephaven/dashboard': DeephavenDashboard,\n '@deephaven/dashboard-core-plugins': DeephavenDashboardCorePlugins,\n '@deephaven/icons': DeephavenIcons,\n '@deephaven/iris-grid': DeephavenIrisGrid,\n '@deephaven/jsapi-bootstrap': DeephavenJsapiBootstrap,\n '@deephaven/jsapi-components': DeephavenJsapiComponents,\n '@deephaven/jsapi-utils': DeephavenJsapiUtils,\n '@deephaven/log': DeephavenLog,\n '@deephaven/plugin': DeephavenPlugin,\n '@deephaven/react-hooks': DeephavenReactHooks,\n};\n"],"mappings":"A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AAwB;EACvD,wBAAwB,EAAEC,mBAAmB;EAC7C,gBAAgB,EAAEE,YAAY;EAC9B,mBAAmB,EAAEE,eAAe;EACpC,wBAAwB,EAAED;AAC5B,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"remote-component.config.js","names":["react","redux","reactRedux","ReactDOM","AdobeReactSpectrum","DeephavenAuthPlugins","DeephavenChart","DeephavenComponents","DeephavenDashboard","DeephavenDashboardCorePlugins","DeephavenIcons","DeephavenIrisGrid","DeephavenJsapiBootstrap","DeephavenJsapiComponents","DeephavenJsapiUtils","DeephavenConsole","DeephavenLog","DeephavenReactHooks","DeephavenPlugin","resolve"],"sources":["../../src/plugins/remote-component.config.ts"],"sourcesContent":["/**\n * remote-component.config.js\n *\n * Dependencies for Remote Components\n */\nimport react from 'react';\nimport * as redux from 'redux';\nimport * as reactRedux from 'react-redux';\nimport ReactDOM from 'react-dom';\n// eslint-disable-next-line no-restricted-imports\nimport * as AdobeReactSpectrum from '@adobe/react-spectrum';\nimport * as DeephavenAuthPlugins from '@deephaven/auth-plugins';\nimport * as DeephavenChart from '@deephaven/chart';\nimport * as DeephavenComponents from '@deephaven/components';\nimport * as DeephavenDashboard from '@deephaven/dashboard';\nimport * as DeephavenDashboardCorePlugins from '@deephaven/dashboard-core-plugins';\nimport * as DeephavenIcons from '@deephaven/icons';\nimport * as DeephavenIrisGrid from '@deephaven/iris-grid';\nimport * as DeephavenJsapiBootstrap from '@deephaven/jsapi-bootstrap';\nimport * as DeephavenJsapiComponents from '@deephaven/jsapi-components';\nimport * as DeephavenJsapiUtils from '@deephaven/jsapi-utils';\nimport * as DeephavenConsole from '@deephaven/console';\nimport DeephavenLog from '@deephaven/log';\nimport * as DeephavenReactHooks from '@deephaven/react-hooks';\nimport * as DeephavenPlugin from '@deephaven/plugin';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const resolve: Record<string, unknown> = {\n react,\n 'react-dom': ReactDOM,\n redux,\n 'react-redux': reactRedux,\n '@adobe/react-spectrum': AdobeReactSpectrum,\n '@deephaven/auth-plugins': DeephavenAuthPlugins,\n '@deephaven/chart': DeephavenChart,\n '@deephaven/components': DeephavenComponents,\n '@deephaven/console': DeephavenConsole,\n '@deephaven/dashboard': DeephavenDashboard,\n '@deephaven/dashboard-core-plugins': DeephavenDashboardCorePlugins,\n '@deephaven/icons': DeephavenIcons,\n '@deephaven/iris-grid': DeephavenIrisGrid,\n '@deephaven/jsapi-bootstrap': DeephavenJsapiBootstrap,\n '@deephaven/jsapi-components': DeephavenJsapiComponents,\n '@deephaven/jsapi-utils': DeephavenJsapiUtils,\n '@deephaven/log': DeephavenLog,\n '@deephaven/plugin': DeephavenPlugin,\n '@deephaven/react-hooks': DeephavenReactHooks,\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,OAAO,KAAKC,UAAU,MAAM,aAAa;AACzC,OAAOC,QAAQ,MAAM,WAAW;AAChC;AACA,OAAO,KAAKC,kBAAkB,MAAM,uBAAuB;AAC3D,OAAO,KAAKC,oBAAoB,MAAM,yBAAyB;AAC/D,OAAO,KAAKC,cAAc,MAAM,kBAAkB;AAClD,OAAO,KAAKC,mBAAmB,MAAM,uBAAuB;AAC5D,OAAO,KAAKC,kBAAkB,MAAM,sBAAsB;AAC1D,OAAO,KAAKC,6BAA6B,MAAM,mCAAmC;AAClF,OAAO,KAAKC,cAAc,MAAM,kBAAkB;AAClD,OAAO,KAAKC,iBAAiB,MAAM,sBAAsB;AACzD,OAAO,KAAKC,uBAAuB,MAAM,4BAA4B;AACrE,OAAO,KAAKC,wBAAwB,MAAM,6BAA6B;AACvE,OAAO,KAAKC,mBAAmB,MAAM,wBAAwB;AAC7D,OAAO,KAAKC,gBAAgB,MAAM,oBAAoB;AACtD,OAAOC,YAAY,MAAM,gBAAgB;AACzC,OAAO,KAAKC,mBAAmB,MAAM,wBAAwB;AAC7D,OAAO,KAAKC,eAAe,MAAM,mBAAmB;;AAEpD;AACA,OAAO,IAAMC,OAAgC,GAAG;EAC9CnB,KAAK;EACL,WAAW,EAAEG,QAAQ;EACrBF,KAAK;EACL,aAAa,EAAEC,UAAU;EACzB,uBAAuB,EAAEE,kBAAkB;EAC3C,yBAAyB,EAAEC,oBAAoB;EAC/C,kBAAkB,EAAEC,cAAc;EAClC,uBAAuB,EAAEC,mBAAmB;EAC5C,oBAAoB,EAAEQ,gBAAgB;EACtC,sBAAsB,EAAEP,kBAAkB;EAC1C,mCAAmC,EAAEC,6BAA6B;EAClE,kBAAkB,EAAEC,cAAc;EAClC,sBAAsB,EAAEC,iBAAiB;EACzC,4BAA4B,EAAEC,uBAAuB;EACrD,6BAA6B,EAAEC,wBAAwB;EACvD,wBAAwB,EAAEC,mBAAmB;EAC7C,gBAAgB,EAAEE,YAAY;EAC9B,mBAAmB,EAAEE,eAAe;EACpC,wBAAwB,EAAED;AAC5B,CAAC","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deephaven/app-utils",
3
- "version": "1.18.2",
3
+ "version": "1.19.0",
4
4
  "description": "Deephaven App Utils",
5
5
  "author": "Deephaven Data Labs LLC",
6
6
  "license": "Apache-2.0",
@@ -26,12 +26,12 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@adobe/react-spectrum": "3.38.0",
29
- "@deephaven/auth-plugins": "^1.17.0",
29
+ "@deephaven/auth-plugins": "^1.19.0",
30
30
  "@deephaven/chart": "^1.17.0",
31
31
  "@deephaven/components": "^1.17.0",
32
32
  "@deephaven/console": "^1.17.0",
33
- "@deephaven/dashboard": "^1.18.1",
34
- "@deephaven/dashboard-core-plugins": "^1.18.2",
33
+ "@deephaven/dashboard": "^1.19.0",
34
+ "@deephaven/dashboard-core-plugins": "^1.19.0",
35
35
  "@deephaven/file-explorer": "^1.17.0",
36
36
  "@deephaven/golden-layout": "^1.18.1",
37
37
  "@deephaven/icons": "^1.2.0",
@@ -41,9 +41,9 @@
41
41
  "@deephaven/jsapi-types": "^1.0.0-dev0.40.4",
42
42
  "@deephaven/jsapi-utils": "^1.16.0",
43
43
  "@deephaven/log": "^1.8.0",
44
- "@deephaven/plugin": "^1.18.2",
44
+ "@deephaven/plugin": "^1.19.0",
45
45
  "@deephaven/react-hooks": "^1.14.0",
46
- "@deephaven/redux": "^1.17.0",
46
+ "@deephaven/redux": "^1.19.0",
47
47
  "@deephaven/storage": "^1.8.0",
48
48
  "@deephaven/utils": "^1.10.0",
49
49
  "@paciolan/remote-component": "2.13.0",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "90b8e4d1cbffabdceaf2dacf010e7286805361c2"
71
+ "gitHead": "8c0cabbd8c9bb2d85bdd2234deab3f43ae8bbcaf"
72
72
  }