@orchestrator-ui/orchestrator-ui-components 1.36.0 → 1.36.1

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,5 +1,5 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@1.36.0 build
2
+ > @orchestrator-ui/orchestrator-ui-components@1.36.1 build
3
3
  > tsup src/index.ts --format esm --dts --tsconfig tsconfig.build.json
4
4
 
5
5
  CLI Building entry: src/index.ts
@@ -9,6 +9,6 @@
9
9
  ESM Build start
10
10
  DTS Build start
11
11
  ESM dist/index.js 1.87 MB
12
- ESM ⚡️ Build success in 696ms
13
- DTS ⚡️ Build success in 14372ms
12
+ ESM ⚡️ Build success in 728ms
13
+ DTS ⚡️ Build success in 14082ms
14
14
  DTS dist/index.d.ts 177.40 KB
@@ -1,5 +1,5 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@1.36.0 lint
2
+ > @orchestrator-ui/orchestrator-ui-components@1.36.1 lint
3
3
  > eslint "src/**/*.ts*"
4
4
 
5
5
 
@@ -1,16 +1,16 @@
1
1
 
2
- > @orchestrator-ui/orchestrator-ui-components@1.36.0 test
2
+ > @orchestrator-ui/orchestrator-ui-components@1.36.1 test
3
3
  > jest
4
4
 
5
- PASS Wfo-UI Tests src/components/WfoForms/formFields/utils.spec.ts
6
5
  PASS Wfo-UI Tests src/components/WfoTree/treeUtils.spec.ts
6
+ PASS Wfo-UI Tests src/components/WfoForms/formFields/utils.spec.ts
7
7
  PASS Wfo-UI Tests src/components/WfoSubscription/utils/utils.spec.ts
8
8
  PASS Wfo-UI Tests src/pages/processes/timelineUtils.spec.ts
9
9
  PASS Wfo-UI Tests src/utils/date.spec.ts
10
10
  PASS Wfo-UI Tests src/utils/string.spec.ts
11
11
  PASS Wfo-UI Tests src/utils/getProductNamesFromProcess.spec.ts
12
- PASS Wfo-UI Tests src/components/WfoTable/WfoTableWithFilter/updateQueryString.spec.ts
13
12
  PASS Wfo-UI Tests src/components/WfoTable/WfoDataGridTable/WfodataGridColumns.spec.ts
13
+ PASS Wfo-UI Tests src/components/WfoTable/WfoTableWithFilter/updateQueryString.spec.ts
14
14
  PASS Wfo-UI Tests src/components/WfoTable/utils/tableConfigPersistence.spec.ts
15
15
  PASS Wfo-UI Tests src/components/WfoTable/utils/tableUtils.spec.ts
16
16
  PASS Wfo-UI Tests src/components/WfoTable/utils/mapSortableAndFilterableValuesToTableColumnConfig.spec.ts
@@ -19,23 +19,23 @@ PASS Wfo-UI Tests src/utils/resultFlattener.spec.ts
19
19
  PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoSidebar/utils/menuItemIsAllowed.spec.ts
20
20
  PASS Wfo-UI Tests src/utils/getEnvironmentVariables.spec.ts
21
21
  PASS Wfo-UI Tests src/messages/getTranslationMessages.spec.ts
22
- PASS Wfo-UI Tests src/utils/toSortedObjectKeys.spec.ts
23
22
  PASS Wfo-UI Tests src/utils/getToastMessage.spec.ts
24
- PASS Wfo-UI Tests src/components/WfoTable/utils/columns.spec.ts
25
23
  PASS Wfo-UI Tests src/utils/optionalArray.spec.ts
24
+ PASS Wfo-UI Tests src/utils/toSortedObjectKeys.spec.ts
25
+ PASS Wfo-UI Tests src/components/WfoTable/utils/columns.spec.ts
26
26
  PASS Wfo-UI Tests src/utils/filterData.spec.ts
27
- PASS Wfo-UI Tests src/utils/getTokenName.spec.ts
28
27
  PASS Wfo-UI Tests src/components/WfoWorkflowSteps/stepListUtils.spec.ts
29
- PASS Wfo-UI Tests src/utils/environmentVariables.spec.ts
28
+ PASS Wfo-UI Tests src/utils/getTokenName.spec.ts
30
29
  PASS Wfo-UI Tests src/utils/onlyUnique.spec.ts
30
+ PASS Wfo-UI Tests src/utils/environmentVariables.spec.ts
31
31
  PASS Wfo-UI Tests src/utils/uuid.spec.ts
32
- PASS Wfo-UI Tests src/utils/getTypedFieldFromObject.spec.ts
33
32
  PASS Wfo-UI Tests src/utils/cacheTag.spec.ts
33
+ PASS Wfo-UI Tests src/utils/getTypedFieldFromObject.spec.ts
34
34
  PASS Wfo-UI Tests src/utils/getQueryVariablesForExport.spec.ts
35
35
  PASS Wfo-UI Tests src/components/WfoPageTemplate/WfoPageHeader/utils/toHexColorWithOpacity.spec.ts
36
36
 
37
37
  Test Suites: 31 passed, 31 total
38
38
  Tests: 192 passed, 192 total
39
39
  Snapshots: 0 total
40
- Time: 4.053 s
40
+ Time: 4.007 s
41
41
  Ran all test suites.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @orchestrator-ui/orchestrator-ui-components
2
2
 
3
+ ## 1.36.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f7571b1: 822 Removes debounce mechanism in the websocket logic
8
+
3
9
  ## 1.36.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.js CHANGED
@@ -33993,7 +33993,6 @@ var startButtonOptionsApi = orchestratorApi.injectEndpoints({
33993
33993
  var { useGetWorkflowOptionsQuery, useGetTaskOptionsQuery } = startButtonOptionsApi;
33994
33994
 
33995
33995
  // src/rtk/endpoints/streamMessages.ts
33996
- import { debounce } from "lodash";
33997
33996
  import { getSession as getSession2 } from "next-auth/react";
33998
33997
 
33999
33998
  // src/utils/getToastMessage.ts
@@ -34035,7 +34034,6 @@ var getWebSocket = (url) => __async(void 0, null, function* () {
34035
34034
  }
34036
34035
  });
34037
34036
  var PING_INTERVAL_MS = 45e3;
34038
- var DEBOUNCE_CLOSE_INTERVAL_MS = 6e4;
34039
34037
  var streamMessagesApi = orchestratorApi.injectEndpoints({
34040
34038
  endpoints: (build) => ({
34041
34039
  streamMessages: build.query({
@@ -34073,10 +34071,6 @@ var streamMessagesApi = orchestratorApi.injectEndpoints({
34073
34071
  const pingInterval = setInterval(() => {
34074
34072
  webSocket.send("__ping__");
34075
34073
  }, PING_INTERVAL_MS);
34076
- const debounceCloseWebSocket = debounce(() => {
34077
- webSocket.close();
34078
- }, DEBOUNCE_CLOSE_INTERVAL_MS);
34079
- debounceCloseWebSocket();
34080
34074
  yield cacheDataLoaded;
34081
34075
  const state = getState();
34082
34076
  const { orchestratorWebsocketUrl } = state.orchestratorConfig;
@@ -34090,7 +34084,6 @@ var streamMessagesApi = orchestratorApi.injectEndpoints({
34090
34084
  (messageEvent) => {
34091
34085
  const data = messageEvent.data;
34092
34086
  if (data === "__pong__") {
34093
- debounceCloseWebSocket();
34094
34087
  return;
34095
34088
  }
34096
34089
  const message = JSON.parse(data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@orchestrator-ui/orchestrator-ui-components",
3
- "version": "1.36.0",
3
+ "version": "1.36.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Library of UI Components used to display the workflow orchestrator frontend",
6
6
  "author": {
@@ -1,4 +1,3 @@
1
- import { debounce } from 'lodash';
2
1
  import { getSession } from 'next-auth/react';
3
2
 
4
3
  import type { WfoSession } from '@/hooks';
@@ -24,8 +23,11 @@ const getWebSocket = async (url: string) => {
24
23
  }
25
24
  };
26
25
 
27
- const PING_INTERVAL_MS = 45000; // Recommended values are between 30 and 60 seconds
28
- const DEBOUNCE_CLOSE_INTERVAL_MS = 60000;
26
+ // Recommended values are between 30 and 60 seconds
27
+ // Note: When the browser tab is suspended, the browser will give this suspended tab approximately every 60 seconds time
28
+ // to execute code. This means that the ping message will be sent every 60 seconds in suspended mode. This depends
29
+ // on the browser and can differ.
30
+ const PING_INTERVAL_MS = 45000;
29
31
 
30
32
  type WebSocketMessage = {
31
33
  name: MessageTypes;
@@ -88,12 +90,6 @@ const streamMessagesApi = orchestratorApi.injectEndpoints({
88
90
  webSocket.send('__ping__');
89
91
  }, PING_INTERVAL_MS);
90
92
 
91
- const debounceCloseWebSocket = debounce(() => {
92
- webSocket.close();
93
- }, DEBOUNCE_CLOSE_INTERVAL_MS);
94
- // Start the debounced function to close the websocket when no 'pong' message is received after DEBOUNCE_CLOSE_INTERVAL
95
- debounceCloseWebSocket();
96
-
97
93
  await cacheDataLoaded;
98
94
 
99
95
  const state = getState() as RootState;
@@ -114,8 +110,7 @@ const streamMessagesApi = orchestratorApi.injectEndpoints({
114
110
  const data = messageEvent.data;
115
111
 
116
112
  if (data === '__pong__') {
117
- // Reset the debounced every time a 'pong' message is received
118
- debounceCloseWebSocket();
113
+ // __pong__ is an accepted message, but should not be processed
119
114
  return;
120
115
  }
121
116
  const message = JSON.parse(data) as WebSocketMessage;