From 06e909f9c27abddf050cb7e3feeb77daec67a3ac Mon Sep 17 00:00:00 2001 From: akleinas Date: Mon, 19 Aug 2024 10:19:51 +0300 Subject: [PATCH 01/61] fixed undisplayed logical fields --- src/view/app/Query/query.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/view/app/Query/query.tsx b/src/view/app/Query/query.tsx index 6d599b07..868c24f2 100644 --- a/src/view/app/Query/query.tsx +++ b/src/view/app/Query/query.tsx @@ -366,7 +366,8 @@ function QueryForm({ } } const boolField = message.data.columns.filter( - (field) => field.type === OEDataTypePrimitive.Logical + (field) => + field.type.toUpperCase() === OEDataTypePrimitive.Logical ); if (boolField.length !== 0) { message.data.rawData.forEach((row) => { From 5dcf2536b1a43d874fa8c3974ec3f8e332bd1209 Mon Sep 17 00:00:00 2001 From: akleinas Date: Tue, 20 Aug 2024 09:09:24 +0300 Subject: [PATCH 02/61] moved components from query.tsx into seperate files --- .../Layout/Query/ColumnHeaderCell.tsx | 114 ++++++++++ .../Components/Layout/Query/FilterStyles.css | 5 + .../Components/Layout/Query/SortArrorIcon.tsx | 14 ++ src/view/app/Query/query.tsx | 214 ++++-------------- 4 files changed, 180 insertions(+), 167 deletions(-) create mode 100644 src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx create mode 100644 src/view/app/Components/Layout/Query/FilterStyles.css create mode 100644 src/view/app/Components/Layout/Query/SortArrorIcon.tsx diff --git a/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx b/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx new file mode 100644 index 00000000..3c3aa518 --- /dev/null +++ b/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx @@ -0,0 +1,114 @@ +import { Box, TextField, Typography } from '@mui/material'; +import { Fragment, useState, useEffect } from 'react'; +import SortArrowIcon from './SortArrorIcon'; +import './FilterStyles.css'; + +interface ColumnHeaderCellProps { + column: any; + sortDirection: 'ASC' | 'DESC'; + priority: number; + onSort: (multiColumnSort: boolean) => void; + isCellSelected: boolean; + filters: any; + setFilters: (filters: any) => void; + configuration: any; + reloadData: (batchSize: number) => void; +} + +const ColumnHeaderCell: React.FC = ({ + column, + sortDirection, + priority, + onSort, + isCellSelected, + filters, + setFilters, + configuration, + reloadData, +}) => { + const [timer, setTimer] = useState(null); + + const handleKeyDown = (event: React.KeyboardEvent) => { + if (event.key === ' ' || event.key === 'Enter') { + event.preventDefault(); + onSort(event.ctrlKey || event.metaKey); + } + }; + + const handleClick = (event: React.MouseEvent) => { + onSort(event.ctrlKey || event.metaKey); + }; + + const handleKeyInputTimeout = () => { + if (timer) { + clearTimeout(timer); + } + setTimer( + setTimeout(() => { + reloadData(configuration.initialBatchSizeLoad); + }, 500) + ); + }; + + const testKeyDown = (event: React.KeyboardEvent) => { + if (event.key === 'Enter') { + event.preventDefault(); + reloadData(configuration.initialBatchSizeLoad); + } + }; + + const handleInputKeyDown = (event) => { + const tempFilters = filters; + tempFilters.columns[column.key] = event.target.value; + setFilters(tempFilters); + if (configuration.filterAsYouType === true) { + handleKeyInputTimeout(); + } + }; + return ( + + + + + {column.name} + + + {priority} + + + {filters.enabled && ( + + + + )} + + ); +}; + +export default ColumnHeaderCell; diff --git a/src/view/app/Components/Layout/Query/FilterStyles.css b/src/view/app/Components/Layout/Query/FilterStyles.css new file mode 100644 index 00000000..7617400f --- /dev/null +++ b/src/view/app/Components/Layout/Query/FilterStyles.css @@ -0,0 +1,5 @@ +.filter-css { + inline-size: 100%; + padding: 4px; + font-size: 14px; +} \ No newline at end of file diff --git a/src/view/app/Components/Layout/Query/SortArrorIcon.tsx b/src/view/app/Components/Layout/Query/SortArrorIcon.tsx new file mode 100644 index 00000000..fb9c2fa6 --- /dev/null +++ b/src/view/app/Components/Layout/Query/SortArrorIcon.tsx @@ -0,0 +1,14 @@ +import SvgIcon from '@mui/material/SvgIcon'; + +interface SortArrowIconProps { + sortDirection: 'ASC' | 'DESC'; +} + +const SortArrowIcon: React.FC = ({ sortDirection }) => ( + + {sortDirection === 'ASC' && } + {sortDirection === 'DESC' && } + +); + +export default SortArrowIcon; diff --git a/src/view/app/Query/query.tsx b/src/view/app/Query/query.tsx index 6d599b07..c2e713c4 100644 --- a/src/view/app/Query/query.tsx +++ b/src/view/app/Query/query.tsx @@ -27,12 +27,7 @@ import { IFilters } from '@app/common/types'; import { getVSCodeAPI, getVSCodeConfiguration } from '@utils/vscode'; import { green, red } from '@mui/material/colors'; import { HighlightFieldsCommand } from '@src/common/commands/fieldsCommands'; - -const filterCSS: CSSProperties = { - inlineSize: '100%', - padding: '4px', - fontSize: '14px', -}; +import ColumnHeaderCell from '@app/Components/Layout/Query/ColumnHeaderCell'; interface IConfigProps { tableData: IOETableData; @@ -201,168 +196,53 @@ function QueryForm({ trace: message.data.trace, }); setIsDataRetrieved(false); - } else { - if (message.data.columns.length !== columns.length) { - const fontSize = +window - .getComputedStyle( - document.getElementsByClassName( - 'rdg-header-row' - )[0] - ) - .getPropertyValue('font-size') - .match(/\d+[.]?\d+/); - message.data.columns.forEach((column) => { - column.headerRenderer = function ({ - column, - sortDirection, - priority, - onSort, - isCellSelected, - }) { - function handleKeyDown(event) { - if ( - event.key === ' ' || - event.key === 'Enter' - ) { - event.preventDefault(); - onSort(event.ctrlKey || event.metaKey); - } - } - - function handleClick(event) { - onSort(event.ctrlKey || event.metaKey); - } - - let timer; - function handleKeyInputTimeout() { - clearTimeout(timer); - timer = setTimeout(() => { - reloadData( - configuration.initialBatchSizeLoad - ); - }, 500); - } - - function testKeyDown(event) { - if (event.key === 'Enter') { - event.preventDefault(); - reloadData( - configuration.initialBatchSizeLoad - ); - } - } - - function handleInputKeyDown(event) { - const tempFilters = filters; - tempFilters.columns[column.key] = - event.target.value; - setFilters(tempFilters); - if ( - configuration.filterAsYouType === true - ) { - handleKeyInputTimeout(); - } - } - - return ( - -
- - - {column.name} - - - - {sortDirection === - 'ASC' && ( - - )} - {sortDirection === - 'DESC' && ( - - )} - - {priority} - - -
- {filters.enabled && ( -
- -
- )} -
- ); - }; - column.minWidth = column.name.length * fontSize; - column.width = - getOEFormatLength(column.format ?? '') * - (fontSize - 4); - switch (column.type.toUpperCase()) { - case OEDataTypePrimitive.Integer: - case OEDataTypePrimitive.Decimal: - case OEDataTypePrimitive.Int64: - column.cellClass = 'rightAlign'; - column.headerCellClass = 'rightAlign'; - break; - default: - break; - } - }); - setColumns([SelectColumn, ...message.data.columns]); - if (message.columns !== undefined) { - setSelectedColumns([...message.columns]); - } else { - setSelectedColumns([ - ...message.data.columns.map( - (column) => column.name - ), - ]); + } else if (message.data.columns.length !== columns.length) { + const fontSize = +window + .getComputedStyle( + document.getElementsByClassName('rdg-header-row')[0] + ) + .getPropertyValue('font-size') + .match(/\d+[.]?\d+/); + message.data.columns.forEach((column) => { + column.headerRenderer = function (props) { + return ( + + ); + }; + column.minWidth = column.name.length * fontSize; + column.width = + getOEFormatLength(column.format ?? '') * + (fontSize - 4); + switch (column.type.toUpperCase()) { + case OEDataTypePrimitive.Integer: + case OEDataTypePrimitive.Decimal: + case OEDataTypePrimitive.Int64: + column.cellClass = 'rightAlign'; + column.headerCellClass = 'rightAlign'; + break; + default: + break; } + }); + setColumns([SelectColumn, ...message.data.columns]); + if (message.columns !== undefined) { + setSelectedColumns([...message.columns]); + } else { + setSelectedColumns([ + ...message.data.columns.map( + (column) => column.name + ), + ]); } } const boolField = message.data.columns.filter( From 07d51ed4e61acd2f8b17b1f7ba1e70cedf6828b9 Mon Sep 17 00:00:00 2001 From: akleinas Date: Thu, 22 Aug 2024 09:18:53 +0300 Subject: [PATCH 03/61] modified header component to property utilize MaterialUI --- .../Layout/Query/ColumnHeaderCell.tsx | 78 ++++++++++--------- .../Components/Layout/Query/FilterStyles.css | 5 -- .../Components/Layout/Query/SortArrorIcon.tsx | 5 +- 3 files changed, 44 insertions(+), 44 deletions(-) delete mode 100644 src/view/app/Components/Layout/Query/FilterStyles.css diff --git a/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx b/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx index 3c3aa518..7ebd553a 100644 --- a/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx +++ b/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx @@ -1,7 +1,6 @@ import { Box, TextField, Typography } from '@mui/material'; -import { Fragment, useState, useEffect } from 'react'; +import { Fragment, useState } from 'react'; import SortArrowIcon from './SortArrorIcon'; -import './FilterStyles.css'; interface ColumnHeaderCellProps { column: any; @@ -67,46 +66,49 @@ const ColumnHeaderCell: React.FC = ({ }; return ( - - - + - {column.name} - - - {priority} - - - {filters.enabled && ( - - + + {column.name} + + + {priority} + )} + ); }; diff --git a/src/view/app/Components/Layout/Query/FilterStyles.css b/src/view/app/Components/Layout/Query/FilterStyles.css deleted file mode 100644 index 7617400f..00000000 --- a/src/view/app/Components/Layout/Query/FilterStyles.css +++ /dev/null @@ -1,5 +0,0 @@ -.filter-css { - inline-size: 100%; - padding: 4px; - font-size: 14px; -} \ No newline at end of file diff --git a/src/view/app/Components/Layout/Query/SortArrorIcon.tsx b/src/view/app/Components/Layout/Query/SortArrorIcon.tsx index fb9c2fa6..8212606d 100644 --- a/src/view/app/Components/Layout/Query/SortArrorIcon.tsx +++ b/src/view/app/Components/Layout/Query/SortArrorIcon.tsx @@ -5,7 +5,10 @@ interface SortArrowIconProps { } const SortArrowIcon: React.FC = ({ sortDirection }) => ( - + {sortDirection === 'ASC' && } {sortDirection === 'DESC' && } From 155a542c179cbb183f064d1b88eac9d01301a203 Mon Sep 17 00:00:00 2001 From: akleinas Date: Thu, 22 Aug 2024 10:36:28 +0300 Subject: [PATCH 04/61] resolved pipeline errors --- .../Layout/Query/ColumnHeaderCell.tsx | 17 ++++++----------- src/view/app/Query/query.tsx | 9 +-------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx b/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx index 7ebd553a..2e3898fc 100644 --- a/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx +++ b/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx @@ -1,5 +1,5 @@ import { Box, TextField, Typography } from '@mui/material'; -import { Fragment, useState } from 'react'; +import { Fragment } from 'react'; import SortArrowIcon from './SortArrorIcon'; interface ColumnHeaderCellProps { @@ -25,8 +25,6 @@ const ColumnHeaderCell: React.FC = ({ configuration, reloadData, }) => { - const [timer, setTimer] = useState(null); - const handleKeyDown = (event: React.KeyboardEvent) => { if (event.key === ' ' || event.key === 'Enter') { event.preventDefault(); @@ -38,15 +36,12 @@ const ColumnHeaderCell: React.FC = ({ onSort(event.ctrlKey || event.metaKey); }; + let timer; const handleKeyInputTimeout = () => { - if (timer) { - clearTimeout(timer); - } - setTimer( - setTimeout(() => { - reloadData(configuration.initialBatchSizeLoad); - }, 500) - ); + clearTimeout(timer); + timer = setTimeout(() => { + reloadData(configuration.initialBatchSizeLoad); + }, 500); }; const testKeyDown = (event: React.KeyboardEvent) => { diff --git a/src/view/app/Query/query.tsx b/src/view/app/Query/query.tsx index c2e713c4..bf1c0982 100644 --- a/src/view/app/Query/query.tsx +++ b/src/view/app/Query/query.tsx @@ -1,11 +1,4 @@ -import { - CSSProperties, - Fragment, - UIEvent, - useEffect, - useRef, - useState, -} from 'react'; +import { Fragment, UIEvent, useEffect, useRef, useState } from 'react'; import DataGrid, { SortColumn, From 8ce6a7d2b4ddf3c94b1c12df8988c3947c97c742 Mon Sep 17 00:00:00 2001 From: akleinas Date: Thu, 22 Aug 2024 11:19:33 +0300 Subject: [PATCH 05/61] changed circleci config file to depend on a newer node version --- .circleci/config.yml | 100 +++++++++++++++++++++---------------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 573c1a37..7c0e1874 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,54 +1,54 @@ version: 2.1 jobs: - test-and-compile-front-end: - docker: - - image: circleci/node:16 - steps: - - checkout - - run: - name: Install Dependencies - command: npm install - - run: - name: Compile Extension - command: npm run compile:extension - - run: - name: Compile Views - command: npm run compile:views - - run: - name: Run Tests - command: npm run jestTest - - store_test_results: - path: test-results/jest - test-and-compile-back-end: - docker: - - image: kherring/oedb:latest - steps: - - checkout - - run: tr ' ' '\n' \<<< "$PROGRESS_CFG_BASE64" | base64 --decode > /psc/dlc/progress.cfg - - run: ant compile - - run: ant test - - persist_to_workspace: - root: . - paths: [ '.' ] - - store_artifacts: - path: target/results.xml - - store_test_results: - path: target/results.xml - build: - docker: - - image: circleci/node:16 - steps: - - checkout - - run: - name: Install vsce - command: npm install vsce - - run: - name: Build Extension - command: npm run vsce + test-and-compile-front-end: + docker: + - image: circleci/node:18 + steps: + - checkout + - run: + name: Install Dependencies + command: npm install + - run: + name: Compile Extension + command: npm run compile:extension + - run: + name: Compile Views + command: npm run compile:views + - run: + name: Run Tests + command: npm run jestTest + - store_test_results: + path: test-results/jest + test-and-compile-back-end: + docker: + - image: kherring/oedb:latest + steps: + - checkout + - run: tr ' ' '\n' \<<< "$PROGRESS_CFG_BASE64" | base64 --decode > /psc/dlc/progress.cfg + - run: ant compile + - run: ant test + - persist_to_workspace: + root: . + paths: ['.'] + - store_artifacts: + path: target/results.xml + - store_test_results: + path: target/results.xml + build: + docker: + - image: circleci/node:18 + steps: + - checkout + - run: + name: Install vsce + command: npm install vsce + - run: + name: Build Extension + command: npm run vsce workflows: - build: - jobs: - - test-and-compile-front-end - - test-and-compile-back-end - - build + build: + jobs: + - test-and-compile-front-end + - test-and-compile-back-end + - build From ce71d9db56367778240ad0e721ad084a73244137 Mon Sep 17 00:00:00 2001 From: akleinas Date: Thu, 22 Aug 2024 13:11:45 +0300 Subject: [PATCH 06/61] changed config file to use next generation circleci image tag --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7c0e1874..305cf558 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.1 jobs: test-and-compile-front-end: docker: - - image: circleci/node:18 + - image: cimg/node:18.0 steps: - checkout - run: @@ -37,7 +37,7 @@ jobs: path: target/results.xml build: docker: - - image: circleci/node:18 + - image: cimg/node:18.0 steps: - checkout - run: From c916156ad8150eacc3db3b52315583a3e5630f65 Mon Sep 17 00:00:00 2001 From: akleinas Date: Thu, 22 Aug 2024 15:15:22 +0300 Subject: [PATCH 07/61] removed underline from header cell --- src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx b/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx index 2e3898fc..c16f68f2 100644 --- a/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx +++ b/src/view/app/Components/Layout/Query/ColumnHeaderCell.tsx @@ -95,6 +95,7 @@ const ColumnHeaderCell: React.FC = ({ onChange={handleInputKeyDown} onKeyDown={testKeyDown} fullWidth={true} + InputProps={{ disableUnderline: true }} sx={{ '& .MuiInputBase-input': { fontSize: '0.8rem', From c20d858d6a2909cc52bc4ebbd5496c514cfd1eb9 Mon Sep 17 00:00:00 2001 From: akleinas Date: Wed, 28 Aug 2024 11:28:50 +0300 Subject: [PATCH 08/61] resolved most eslint errors and some warnings --- resources/oe/connectionPf.pf | 1 + src/common/Logger.ts | 11 +- src/common/OpenEdgeJsonReaded.ts | 4 +- src/db/DatabaseProcessor.ts | 1 + src/extension.ts | 11 +- src/providers/AblHoverProvider.ts | 10 +- src/repo/processor/database/DbProcessor.ts | 1 + src/repo/processor/mock/MockProcessor.ts | 7 +- src/test/nodeTest/testObjects.ts | 34 ++--- src/view/app/Fields/fields.tsx | 5 +- src/view/app/Query/Export/export.tsx | 64 ++++---- src/view/app/Query/index.tsx | 3 +- src/view/app/Query/query.tsx | 7 +- src/view/app/Welcome/index.tsx | 5 +- src/view/app/common/types.ts | 2 +- src/view/app/utils/PfParser.ts | 64 ++++---- src/view/app/utils/oe/format/oeFormat.ts | 59 +++++--- src/webview/DumpFileFormatter.ts | 161 ++++++++++++--------- 18 files changed, 248 insertions(+), 202 deletions(-) create mode 100644 resources/oe/connectionPf.pf diff --git a/resources/oe/connectionPf.pf b/resources/oe/connectionPf.pf new file mode 100644 index 00000000..83f232dd --- /dev/null +++ b/resources/oe/connectionPf.pf @@ -0,0 +1 @@ +-T C:\Users\akleinas\ProBro\TempFiles -b -param 23457 -debugalert \ No newline at end of file diff --git a/src/common/Logger.ts b/src/common/Logger.ts index 7326d25a..4a46cbc5 100644 --- a/src/common/Logger.ts +++ b/src/common/Logger.ts @@ -1,14 +1,13 @@ -export class Logger{ - +export class Logger { private readonly isLoggingEnabled: boolean; - constructor (doLog: boolean){ + constructor(doLog: boolean) { this.isLoggingEnabled = doLog; } - log(message: string, additionalData?: any): void{ - if (this.isLoggingEnabled){ + log(message: string, additionalData?: T): void { + if (this.isLoggingEnabled) { console.log(message, ': ', additionalData); } } -} \ No newline at end of file +} diff --git a/src/common/OpenEdgeJsonReaded.ts b/src/common/OpenEdgeJsonReaded.ts index 3851c276..5ebfd42b 100644 --- a/src/common/OpenEdgeJsonReaded.ts +++ b/src/common/OpenEdgeJsonReaded.ts @@ -1,14 +1,14 @@ import { PfParser } from '../view/app/utils/PfParser'; import { IConfig } from '../view/app/model'; import * as path from 'path'; +import * as fs from 'fs'; export function readFile(fileName: string): string { while (fileName.charAt(0) === '/') { fileName = fileName.substring(1); } - const fs = require('fs'); - const allFileContents = fs.readFileSync(fileName, 'utf-8'); + const allFileContents = fs.readFileSync(fileName, 'utf-8'); return allFileContents; } diff --git a/src/db/DatabaseProcessor.ts b/src/db/DatabaseProcessor.ts index 1a819a09..bdbb8141 100644 --- a/src/db/DatabaseProcessor.ts +++ b/src/db/DatabaseProcessor.ts @@ -17,6 +17,7 @@ export class DatabaseProcessor implements IProcessor { ); private logger = new Logger(this.configuration.get('logging.node')!); + // eslint-disable-next-line @typescript-eslint/no-empty-function private constructor() {} public static getInstance(): DatabaseProcessor { diff --git a/src/extension.ts b/src/extension.ts index 7e617aa7..fc1cf091 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -121,11 +121,10 @@ export function activate(context: vscode.ExtensionContext) { ); context.subscriptions.push(indexes); - let oeRuntimes: Array; - - oeRuntimes = vscode.workspace + const oeRuntimes: Array = vscode.workspace .getConfiguration('abl.configuration') .get>('runtimes')!; + if (oeRuntimes === undefined || oeRuntimes.length === 0) { vscode.window.showWarningMessage( 'No OpenEdge runtime configured on this machine' @@ -143,7 +142,6 @@ export function activate(context: vscode.ExtensionContext) { let importConnections = vscode.workspace .getConfiguration(Constants.globalExtensionKey) .get('importConnections'); - let fileWatcher: vscode.FileSystemWatcher; if (importConnections) { vscode.workspace.findFiles('**/openedge-project.json').then((list) => { @@ -153,9 +151,8 @@ export function activate(context: vscode.ExtensionContext) { clearDatabaseConfigState(); } - fileWatcher = vscode.workspace.createFileSystemWatcher( - '**/openedge-project.json' - ); + const fileWatcher: vscode.FileSystemWatcher = + vscode.workspace.createFileSystemWatcher('**/openedge-project.json'); fileWatcher.onDidChange((uri) => { if (importConnections) { createJsonDatabases(uri); diff --git a/src/providers/AblHoverProvider.ts b/src/providers/AblHoverProvider.ts index 0ab78caa..9aee065d 100644 --- a/src/providers/AblHoverProvider.ts +++ b/src/providers/AblHoverProvider.ts @@ -1,5 +1,4 @@ import { - CancellationToken, Hover, HoverProvider, MarkdownString, @@ -18,8 +17,7 @@ export class AblHoverProvider implements HoverProvider { provideHover( document: TextDocument, - position: Position, - token: CancellationToken + position: Position ): ProviderResult { const str = new MarkdownString(); str.isTrusted = true; @@ -36,9 +34,9 @@ export class AblHoverProvider implements HoverProvider { this.tableListProvider.selectDbConfig(tableNode); this.tableListProvider.node = tableNode; str.value = - '[Run Query for ' + - tableNode.tableName + - '](command:pro-bro.queryFromCode)'; + '[Run Query for ' + + tableNode.tableName + + '](command:pro-bro.queryFromCode)'; } }); diff --git a/src/repo/processor/database/DbProcessor.ts b/src/repo/processor/database/DbProcessor.ts index f66e2917..37b3525f 100644 --- a/src/repo/processor/database/DbProcessor.ts +++ b/src/repo/processor/database/DbProcessor.ts @@ -24,6 +24,7 @@ export class DbProcessor implements IProcessor { ); private logger = new Logger(this.configuration.get('logging.node')!); + // eslint-disable-next-line @typescript-eslint/no-empty-function private constructor() {} public static getInstance(): DbProcessor { diff --git a/src/repo/processor/mock/MockProcessor.ts b/src/repo/processor/mock/MockProcessor.ts index 92d8bf7f..5ac5b4d2 100644 --- a/src/repo/processor/mock/MockProcessor.ts +++ b/src/repo/processor/mock/MockProcessor.ts @@ -3,6 +3,7 @@ import { IProcessor } from '../IProcessor'; export class MockProcessor implements IProcessor { private static instance: MockProcessor | undefined = undefined; // singleton + // eslint-disable-next-line @typescript-eslint/no-empty-function private constructor() {} public static getInstance(): MockProcessor { @@ -20,15 +21,15 @@ export class MockProcessor implements IProcessor { getTablesList(): Promise { return Promise.resolve('Mock Tables List'); } - + getTableData(): Promise { return Promise.resolve('Mock Table Data'); } - + submitTableData(): Promise { return Promise.resolve('Mock Submit Table Data'); } - + getTableDetails(): Promise { return Promise.resolve('Mock Table Details'); } diff --git a/src/test/nodeTest/testObjects.ts b/src/test/nodeTest/testObjects.ts index 106e0864..4ad3b43b 100644 --- a/src/test/nodeTest/testObjects.ts +++ b/src/test/nodeTest/testObjects.ts @@ -86,7 +86,7 @@ export const testObjInput: IExportDumpData = { testDecimal: 0.01, testInt: 123, testIntPercent: 15, - testInt64: 12345678901234567890, + testInt64: 12345678901234567890n, testRaw: 'AAMBAQEBAQEBAQEBAQA=', testDate: '2023-02-20', testDatetime: '2023-02-20T11:11:11.111', @@ -98,7 +98,7 @@ export const testObjInput: IExportDumpData = { testDecimal: 0.11, testInt: 123, testIntPercent: 15, - testInt64: 12345678901234567890, + testInt64: 12345678901234567890n, testRaw: 'AAMBAQEBAQEBAQEBAQA=', testDate: '2023-02-20', testDatetime: '2023-02-20T11:11:11.111', @@ -110,7 +110,7 @@ export const testObjInput: IExportDumpData = { testDecimal: 0.22, testInt: -123, testIntPercent: 15, - testInt64: 12345678901234567890, + testInt64: 12345678901234567890n, testRaw: 'AAMBAQEBAQEBAQEBAQA=', testDate: '2023-02-20', testDatetime: '2023-02-20T11:11:11.111', @@ -122,7 +122,7 @@ export const testObjInput: IExportDumpData = { testDecimal: 0.33, testInt: 123, testIntPercent: 15, - testInt64: 12345678901234567890, + testInt64: 12345678901234567890n, testRaw: 'AAMBAQEBAQEBAQEBAQA=', testDate: '2023-02-20', testDatetime: '2023-02-20T11:11:11.111', @@ -132,18 +132,18 @@ export const testObjInput: IExportDumpData = { }; export const testOutputDumpData: string = - '"record no.1" .01 123 15 12345678901234567000 "AAMBAQEBAQEBAQEBAQA=" 02/20/23 2023-02-20T11:11:11.111 yes\r\n' + - '"record no.2" .11 123 0.15 12345678901234567000 "AAMBAQEBAQEBAQEBAQA=" 02/20/23 2023-02-20T11:11:11.111 no\r\n' + - '"record no.3" .22 -123 15 12345678901234567000 "AAMBAQEBAQEBAQEBAQA=" 02/20/23 2023-02-20T11:11:11.111 yes\r\n' + - '"record no.4" .33 123 15 12345678901234567000 "AAMBAQEBAQEBAQEBAQA=" 02/20/23 2023-02-20T11:11:11.111 no\r\n'; + '"record no.1" .01 123 15 12345678901234567000 "AAMBAQEBAQEBAQEBAQA=" 02/20/23 2023-02-20T11:11:11.111 yes\r\n' + + '"record no.2" .11 123 0.15 12345678901234567000 "AAMBAQEBAQEBAQEBAQA=" 02/20/23 2023-02-20T11:11:11.111 no\r\n' + + '"record no.3" .22 -123 15 12345678901234567000 "AAMBAQEBAQEBAQEBAQA=" 02/20/23 2023-02-20T11:11:11.111 yes\r\n' + + '"record no.4" .33 123 15 12345678901234567000 "AAMBAQEBAQEBAQEBAQA=" 02/20/23 2023-02-20T11:11:11.111 no\r\n'; export const testOutputTrailerInfo: string = - 'PSC\r\n' + - 'filename=testing\r\n' + - 'records=0000000000004\r\n' + - 'ldbname=testDb\r\n' + - 'timestamp=2023/02/20-15:36:36\r\n' + - 'numformat=44,46\r\n' + - 'dateformat=mdy-1950\r\n' + - 'map=NO-MAP\r\n' + - 'cpstream=UTF-8\r\n'; + 'PSC\r\n' + + 'filename=testing\r\n' + + 'records=0000000000004\r\n' + + 'ldbname=testDb\r\n' + + 'timestamp=2023/02/20-15:36:36\r\n' + + 'numformat=44,46\r\n' + + 'dateformat=mdy-1950\r\n' + + 'map=NO-MAP\r\n' + + 'cpstream=UTF-8\r\n'; diff --git a/src/view/app/Fields/fields.tsx b/src/view/app/Fields/fields.tsx index 6b8c7245..2607ef1f 100644 --- a/src/view/app/Fields/fields.tsx +++ b/src/view/app/Fields/fields.tsx @@ -291,7 +291,7 @@ function Fields() { ); } else { const selected = message.data.fields.filter( - (row: { name: any }) => + (row: { name: string }) => message.data.selectedColumns.includes( row.name ) @@ -300,7 +300,8 @@ function Fields() { (): ReadonlySet => new Set( selected.map( - (row: { order: any }) => row.order + (row: { order: number }) => + row.order ) ) ); diff --git a/src/view/app/Query/Export/export.tsx b/src/view/app/Query/Export/export.tsx index c6ef06ae..1710ba94 100644 --- a/src/view/app/Query/Export/export.tsx +++ b/src/view/app/Query/Export/export.tsx @@ -42,6 +42,14 @@ export default function ExportPopup({ console.log(currentTarget.value); } + function extractRowIds(selectedRows: string[]): string[] { + const rowids: string[] = []; + selectedRows.forEach((element) => { + rowids.push(element); + }); + return rowids; + } + const exportList = ['dumpFile', 'json', 'csv', 'xls']; const getData = () => { @@ -77,10 +85,6 @@ export default function ExportPopup({ }; break; case DataToExport[DataToExport.Selection]: - const rowids: string[] = []; - selectedRows.forEach((element) => { - rowids.push(element); - }); command.params = { wherePhrase: wherePhrase, start: 0, @@ -90,7 +94,7 @@ export default function ExportPopup({ filters: filters, exportType: exportFormat, timeOut: 0, - crud: rowids, + crud: extractRowIds(selectedRows), minTime: 0, }; break; @@ -104,33 +108,31 @@ export default function ExportPopup({ const handleMessage = (event) => { const message = event.data; logger.log('got export data', message); - switch (message.command) { - case 'export': - if (message.format === 'dumpFile') { - logger.log('dumpfile export got.'); - exportFromJSON({ - data: message.data, - fileName: message.tableName, - exportType: exportFromJSON.types.txt, - extension: 'd', - }); - setIsSaving(false); - break; + if (message.command !== 'export') { + return; + } + + if (message.format === 'dumpFile') { + logger.log('dumpfile export got.'); + exportFromJSON({ + data: message.data, + fileName: message.tableName, + exportType: exportFromJSON.types.txt, + extension: 'd', + }); + setIsSaving(false); + } else { + const exportData = message.data.rawData.map( + ({ ROWID, RECID, ...rest }) => { + return rest; } - const exportData = message.data.rawData.map( - ({ ROWID, RECID, ...rest }) => { - return rest; - } - ); - exportFromJSON({ - data: exportData, - fileName: message.tableName, - exportType: exportFromJSON.types[message.format], - }); - setIsSaving(false); - break; - default: - break; + ); + exportFromJSON({ + data: exportData, + fileName: message.tableName, + exportType: exportFromJSON.types[message.format], + }); + setIsSaving(false); } }; diff --git a/src/view/app/Query/index.tsx b/src/view/app/Query/index.tsx index 89aadddc..b70e4141 100644 --- a/src/view/app/Query/index.tsx +++ b/src/view/app/Query/index.tsx @@ -4,10 +4,11 @@ import './query.css'; import QueryForm from './query'; import { IOETableData } from '@src/db/Oe'; import { ISettings } from '@src/common/IExtensionSettings'; +import { VSCode } from '@utils/vscode'; declare global { interface Window { - acquireVsCodeApi(): any; + acquireVsCodeApi(): VSCode; tableData: IOETableData; tableName: string; configuration: ISettings; diff --git a/src/view/app/Query/query.tsx b/src/view/app/Query/query.tsx index 868c24f2..36cf0aee 100644 --- a/src/view/app/Query/query.tsx +++ b/src/view/app/Query/query.tsx @@ -46,12 +46,7 @@ interface IStatisticsObject { connectTime: number; } -function QueryForm({ - tableData, - tableName, - isReadOnly, - ...props -}: IConfigProps) { +function QueryForm({ tableData, tableName, isReadOnly }: IConfigProps) { const [wherePhrase, setWherePhrase] = useState(''); const [isLoading, setIsLoading] = useState(false); const [windowHeight, setWindowHeight] = useState(window.innerHeight); diff --git a/src/view/app/Welcome/index.tsx b/src/view/app/Welcome/index.tsx index 7fda6383..2e6d097c 100644 --- a/src/view/app/Welcome/index.tsx +++ b/src/view/app/Welcome/index.tsx @@ -1,4 +1,5 @@ -import * as ReactDOM from 'react-dom'; import { Welcome } from './welcome'; +import { createRoot } from 'react-dom/client'; -ReactDOM.render(, document.getElementById('root')); +const root = createRoot(document.getElementById('root')); +root.render(); diff --git a/src/view/app/common/types.ts b/src/view/app/common/types.ts index 6ba6d0c8..5253bbd8 100644 --- a/src/view/app/common/types.ts +++ b/src/view/app/common/types.ts @@ -1,6 +1,6 @@ // file for type declarations export interface IFilters { - columns: {}; + columns: object; enabled: boolean; } diff --git a/src/view/app/utils/PfParser.ts b/src/view/app/utils/PfParser.ts index 38c248a2..19fc2bfe 100644 --- a/src/view/app/utils/PfParser.ts +++ b/src/view/app/utils/PfParser.ts @@ -22,14 +22,14 @@ export class PfParser { .split('\n') .filter((params) => { return ( - params && !new RegExp('^(\r)$').test(params) && params[0] !== '#' + params && params.trim() !== '' && !params.startsWith('#') ); }) .forEach((param) => { param.match(/(-[A-Za-z0-9]+)/g)?.forEach((key) => { let regexStr; - if (new RegExp(`(${key}\\s)(\'|\")`).test(param)) { - regexStr = `(${key}\\s)(\'|\")([^\'^\"]*)(\'|\")`; + if (new RegExp(`(${key}\\s)('|")`).test(param)) { + regexStr = `(${key}\\s)('|")([^'^"]*)('|")`; } else { regexStr = `(${key}\\s*)([\\S]+)*`; } @@ -38,34 +38,36 @@ export class PfParser { return; } switch (key) { - case '-db': - config.name = keyVal[0].substring(key.length + 1); - break; - case '-U': - config.user = keyVal[0].substring(key.length + 1); - break; - case '-P': - config.password = keyVal[0].substring(key.length + 1); - break; - case '-H': - config.host = keyVal[0].substring(key.length + 1); - break; - case '-S': - config.port = keyVal[0].substring(key.length + 1); - break; - case '-RO': - config.isReadOnly = true; - if (config.params) { - config.params += ' '; - } - config.params += keyVal[0]; - break; - default: - if (config.params) { - config.params += ' '; - } - config.params += keyVal[0]; - break; + case '-db': + config.name = keyVal[0].substring(key.length + 1); + break; + case '-U': + config.user = keyVal[0].substring(key.length + 1); + break; + case '-P': + config.password = keyVal[0].substring( + key.length + 1 + ); + break; + case '-H': + config.host = keyVal[0].substring(key.length + 1); + break; + case '-S': + config.port = keyVal[0].substring(key.length + 1); + break; + case '-RO': + config.isReadOnly = true; + if (config.params) { + config.params += ' '; + } + config.params += keyVal[0]; + break; + default: + if (config.params) { + config.params += ' '; + } + config.params += keyVal[0]; + break; } }); }); diff --git a/src/view/app/utils/oe/format/oeFormat.ts b/src/view/app/utils/oe/format/oeFormat.ts index 3ea9a9bc..60f93bbc 100644 --- a/src/view/app/utils/oe/format/oeFormat.ts +++ b/src/view/app/utils/oe/format/oeFormat.ts @@ -9,29 +9,29 @@ export const getOEFormatLength = (formatStr: string): number => { let length = 0; - for (let i = 0; i < formatStr.length; i++) { - const char = formatStr[i]; + for ( + let lengthIterator = 0; + lengthIterator < formatStr.length; + lengthIterator++ + ) { + const char = formatStr[lengthIterator]; switch (char) { - case '(': - // Handle the (n) format - const closingParenIndex = formatStr.indexOf(')', i + 1); - if (closingParenIndex !== -1) { - const repeatCount = parseInt( - formatStr.slice(i + 1, closingParenIndex), - 10 - ); - length += Math.max(repeatCount - 1, 0); // Ensure repeatCount is non-negative - i = closingParenIndex; // Skip the characters inside the parentheses - } - break; - case ',': - case '.': - // do nothing - break; - default: - length++; - break; + case '(': + // Handle the (n) format + ({ length, lengthIterator } = handleParentheses( + formatStr, + length, + lengthIterator + )); + break; + case ',': + case '.': + // do nothing + break; + default: + length++; + break; } } @@ -43,3 +43,20 @@ export const getOEFormatLength = (formatStr: string): number => { return length; }; + +function handleParentheses( + formatString: string, + length: number, + lengthIterator: number +) { + const closingParenIndex = formatString.indexOf(')', lengthIterator + 1); + if (closingParenIndex !== -1) { + const repeatCount = parseInt( + formatString.slice(lengthIterator + 1, closingParenIndex), + 10 + ); + length += Math.max(repeatCount - 1, 0); // Ensure repeatCount is non-negative + lengthIterator = closingParenIndex; // Skip the characters inside the parentheses + } + return { length, lengthIterator }; +} diff --git a/src/webview/DumpFileFormatter.ts b/src/webview/DumpFileFormatter.ts index 5c187e1c..cc24005f 100644 --- a/src/webview/DumpFileFormatter.ts +++ b/src/webview/DumpFileFormatter.ts @@ -21,69 +21,98 @@ export class DumpFileFormatter { protected combineDumpFile(): void { this.dumpFile = - this.dumpData + - '.\r\n' + - this.trailerInfo + - '.\r\n' + - `${String(this.dumpData.length + 3).padStart(10, '0')}\r\n`; + this.dumpData + + '.\r\n' + + this.trailerInfo + + '.\r\n' + + `${String(this.dumpData.length + 3).padStart(10, '0')}\r\n`; + } + + private formatDate( + unformattedDateString: string, + tempDateFormat: string + ): string { + const unformattedDate = new Date(unformattedDateString); + const tempYMD = { + y: unformattedDate.getFullYear().toString().slice(2), + m: (unformattedDate.getMonth() + 1).toString().padStart(2, '0'), + d: unformattedDate.getDate().toString().padStart(2, '0'), + }; + const date = tempDateFormat + .split('') + .map((letter: string) => { + return tempYMD[letter as keyof typeof tempYMD]; + }) + .join('/'); + return date; + } + + private formatCharacter(unformattedCharacter: string): string { + const formattedCharacter = unformattedCharacter.replace(/"/g, '""'); + return formattedCharacter; } protected formatDumpData(data: IExportDumpData): void { this.dumpData = data.rawData.reduce((accumulator: string, row: any) => { return ( accumulator + - Object.entries(row) - .filter((element) => element[0] !== 'ROWID') - .reduce((accumulator: any, element: any, index) => { - if (index > 0 && accumulator.length !== 0) { - accumulator += ' '; - } - // typeof null === "object" - if (typeof element[1] === 'object') { - return accumulator + '?'; - } - const column = data.columns.find( - (column) => column.name === element[0] - ); - switch (column!.type) { - case 'decimal': - if (element[1] < 1 && element[1] > 0) { - return accumulator + element[1].toString().slice(1); - } else if (element[1] > -1 && element[1] < 0) { - return accumulator + element[1].toString().slice(1); - } else {return accumulator + element[1].toString();} - case 'integer': - case 'int64': - return accumulator + element[1]; - case 'raw': - case 'character': - const formatted = element[1].replace(/\"/g, '""'); - return accumulator + `\"${formatted}\"`; - case 'date': - const tempDate = new Date(element[1]); - const tempYMD = { - y: tempDate.getFullYear().toString().slice(2), - m: (tempDate.getMonth() + 1).toString().padStart(2, '0'), - d: tempDate.getDate().toString().padStart(2, '0'), - }; - const tempDateFormat = data.psc.dateformat.substring(0, 3); - const date = tempDateFormat - .split('') - .map((letter: string) => { - return tempYMD[letter as keyof typeof tempYMD]; - }) - .join('/'); - return accumulator + date; - case 'datetime': - case 'datetime-tz': - return accumulator + element[1]; - case 'logical': - return accumulator + (element[1] ? 'yes' : 'no'); - default: - return accumulator.slice(0, -1); - } - }, '') + - '\r\n' + Object.entries(row) + .filter((element) => element[0] !== 'ROWID') + .reduce((accumulator: any, element: any, index) => { + if (index > 0 && accumulator.length !== 0) { + accumulator += ' '; + } + // typeof null === "object" + if (typeof element[1] === 'object') { + return accumulator + '?'; + } + const column = data.columns.find( + (column) => column.name === element[0] + ); + switch (column!.type) { + case 'decimal': + if (element[1] < 1 && element[1] > 0) { + return ( + accumulator + + element[1].toString().slice(1) + ); + } else if (element[1] > -1 && element[1] < 0) { + return ( + accumulator + + element[1].toString().slice(1) + ); + } else { + return accumulator + element[1].toString(); + } + case 'integer': + case 'int64': + return accumulator + element[1]; + case 'raw': + case 'character': + return ( + accumulator + + `"${this.formatCharacter(element[1])}"` + ); + case 'date': + return ( + accumulator + + this.formatDate( + element, + data.psc.dateformat.substring(0, 3) + ) + ); + case 'datetime': + case 'datetime-tz': + return accumulator + element[1]; + case 'logical': + return ( + accumulator + (element[1] ? 'yes' : 'no') + ); + default: + return accumulator.slice(0, -1); + } + }, '') + + '\r\n' ); }, ''); } @@ -95,14 +124,14 @@ export class DumpFileFormatter { recordNum: number ): void { this.trailerInfo = - 'PSC\r\n' + - `filename=${fileName}\r\n` + - `records=${String(recordNum).padStart(13, '0')}\r\n` + - `ldbname=${dbName}\r\n` + - `timestamp=${data.timestamp}\r\n` + - `numformat=${data.numformat}\r\n` + - `dateformat=${data.dateformat}\r\n` + - 'map=NO-MAP\r\n' + - `cpstream=${data.cpstream}\r\n`; + 'PSC\r\n' + + `filename=${fileName}\r\n` + + `records=${String(recordNum).padStart(13, '0')}\r\n` + + `ldbname=${dbName}\r\n` + + `timestamp=${data.timestamp}\r\n` + + `numformat=${data.numformat}\r\n` + + `dateformat=${data.dateformat}\r\n` + + 'map=NO-MAP\r\n' + + `cpstream=${data.cpstream}\r\n`; } } From 75464c8f986027837c43571b305005eb10b20a2d Mon Sep 17 00:00:00 2001 From: akleinas Date: Wed, 28 Aug 2024 13:41:08 +0300 Subject: [PATCH 09/61] extracted QueryFormTableComponent from query.tsx --- .../Layout/Query/QueryFormTable.tsx | 120 ++++++++++++++++++ src/view/app/Query/query.tsx | 76 +++-------- 2 files changed, 141 insertions(+), 55 deletions(-) create mode 100644 src/view/app/Components/Layout/Query/QueryFormTable.tsx diff --git a/src/view/app/Components/Layout/Query/QueryFormTable.tsx b/src/view/app/Components/Layout/Query/QueryFormTable.tsx new file mode 100644 index 00000000..ec34ddfc --- /dev/null +++ b/src/view/app/Components/Layout/Query/QueryFormTable.tsx @@ -0,0 +1,120 @@ +import { UIEvent, useMemo } from 'react'; + +import DataGrid, { + SortColumn, + CopyEvent, + DataGridHandle, +} from 'react-data-grid'; + +import { Box } from '@mui/material'; +import { IFilters } from '@app/common/types'; +import ColumnHeaderCell from './ColumnHeaderCell'; + +interface QueryFormTableProps { + queryGridRef: React.RefObject; + selected: any[]; + sortColumns: SortColumn[]; + handleScroll: (event: UIEvent) => void; + onSortClick: (inputSortColumns: SortColumn[]) => void; + filters: IFilters; + selectedRows: Set; + setSelectedRows: React.Dispatch>>; + rowKeyGetter: (row: any) => string; + readRecord: (row: any) => void; + handleCopy: (event: CopyEvent) => void; + windowHeight: number; + setRowHeight: () => number; + configuration: any; + rows: any[]; + reloadData: (loaded: number) => void; + setFilters: (data: IFilters) => void; +} + +const QueryFormTable: React.FC = ({ + queryGridRef, + selected, + sortColumns, + handleScroll, + onSortClick, + filters, + selectedRows, + setSelectedRows, + rowKeyGetter, + readRecord, + handleCopy, + windowHeight, + setRowHeight, + configuration, + rows, + reloadData, + setFilters, +}) => { + const adjustedColumns = useMemo( + () => + selected.map((col) => ({ + ...col, + headerRenderer: (props) => + ColumnHeaderCell({ + ...props, + reloadData, + configuration, + filters, + setFilters, + }), + })), + [selected] + ); + + const calculateHeight = () => { + const rowCount = rows.length; + const cellHeight = getCellHeight(); + const startingHeight = 85; + const calculatedHeight = startingHeight + rowCount * cellHeight; + return calculatedHeight; + }; + + const getCellHeight = () => { + if (configuration.gridTextSize === 'Large') { + return 40; + } else if (configuration.gridTextSize === 'Medium') { + return 30; + } else if (configuration.gridTextSize === 'Small') { + return 20; + } + return 30; + }; + + return ( + + + + ); +}; + +export default QueryFormTable; diff --git a/src/view/app/Query/query.tsx b/src/view/app/Query/query.tsx index bf1c0982..d16f5745 100644 --- a/src/view/app/Query/query.tsx +++ b/src/view/app/Query/query.tsx @@ -1,6 +1,6 @@ import { Fragment, UIEvent, useEffect, useRef, useState } from 'react'; -import DataGrid, { +import { SortColumn, SelectColumn, CopyEvent, @@ -14,13 +14,12 @@ import { getOEFormatLength } from '@utils/oe/format/oeFormat'; import { OEDataTypePrimitive } from '@utils/oe/oeDataTypeEnum'; import { IErrorObject, emptyErrorObj } from '@utils/error'; import QueryFormFooter from '@app/Components/Layout/Query/QueryFormFooter'; -import { Box } from '@mui/material'; import QueryFormHead from '@app/Components/Layout/Query/QueryFormHead'; import { IFilters } from '@app/common/types'; import { getVSCodeAPI, getVSCodeConfiguration } from '@utils/vscode'; import { green, red } from '@mui/material/colors'; import { HighlightFieldsCommand } from '@src/common/commands/fieldsCommands'; -import ColumnHeaderCell from '@app/Components/Layout/Query/ColumnHeaderCell'; +import QueryFormTable from '@app/Components/Layout/Query/QueryFormTable'; interface IConfigProps { tableData: IOETableData; @@ -197,21 +196,6 @@ function QueryForm({ .getPropertyValue('font-size') .match(/\d+[.]?\d+/); message.data.columns.forEach((column) => { - column.headerRenderer = function (props) { - return ( - - ); - }; column.minWidth = column.name.length * fontSize; column.width = getOEFormatLength(column.format ?? '') * @@ -461,14 +445,6 @@ function QueryForm({ return 30; }; - const calculateHeight = () => { - const rowCount = isFormatted ? formattedRows.length : rawRows.length; - const cellHeight = getCellHeight(); - const startingHeight = 85; - const calculatedHeight = startingHeight + rowCount * cellHeight; - return calculatedHeight; - }; - const setRowHeight = () => { let height = 0; @@ -514,35 +490,25 @@ function QueryForm({ readRow={readRow} isReadOnly={isReadOnly} /> - - - + Date: Fri, 30 Aug 2024 09:00:44 +0300 Subject: [PATCH 10/61] resolved aditional eslint errors and warnings --- src/common/OpenEdgeJsonReaded.ts | 2 +- src/db/DatabaseProcessor.ts | 4 +- src/db/OeClient.ts | 21 ++- src/extension.ts | 23 +-- src/repo/client/local/LocalClient.ts | 44 +++--- src/repo/client/remote/RemoteClientHelper.ts | 4 +- src/repo/processor/ProcessorFactory.ts | 24 ++-- src/repo/processor/database/DbProcessor.ts | 4 +- .../Components/Layout/Query/QueryFormHead.tsx | 2 - src/view/app/Connection/connectionForm.tsx | 2 +- src/view/app/Connection/index.tsx | 3 +- src/view/app/Fields/index.tsx | 3 +- src/view/app/Indexes/index.tsx | 3 +- src/webview/ConnectionEditor.ts | 133 ++++++++++-------- src/webview/DumpFileFormatter.ts | 9 +- src/webview/FieldsViewProvider.ts | 4 +- src/webview/QueryEditor.ts | 6 +- 17 files changed, 171 insertions(+), 120 deletions(-) diff --git a/src/common/OpenEdgeJsonReaded.ts b/src/common/OpenEdgeJsonReaded.ts index 5ebfd42b..2666c26e 100644 --- a/src/common/OpenEdgeJsonReaded.ts +++ b/src/common/OpenEdgeJsonReaded.ts @@ -22,7 +22,7 @@ export function parseOEFile(fileContent: string, filePath: string) { const directoryPath = path.dirname(filePath); - dbConnections.forEach((connection: { name: any; connect: any }) => { + dbConnections.forEach((connection: { name: string; connect: string }) => { const { name, connect } = connection; const pfParser = new PfParser(); diff --git a/src/db/DatabaseProcessor.ts b/src/db/DatabaseProcessor.ts index bdbb8141..1e281574 100644 --- a/src/db/DatabaseProcessor.ts +++ b/src/db/DatabaseProcessor.ts @@ -15,7 +15,9 @@ export class DatabaseProcessor implements IProcessor { private readonly configuration = vscode.workspace.getConfiguration( Constants.globalExtensionKey ); - private logger = new Logger(this.configuration.get('logging.node')!); + private logger = new Logger( + this.configuration.get('logging.node') ?? false + ); // eslint-disable-next-line @typescript-eslint/no-empty-function private constructor() {} diff --git a/src/db/OeClient.ts b/src/db/OeClient.ts index abcbaab5..b16b8a70 100644 --- a/src/db/OeClient.ts +++ b/src/db/OeClient.ts @@ -17,8 +17,10 @@ class OEClient { private readonly configuration = vscode.workspace.getConfiguration( Constants.globalExtensionKey ); - private logentrytypes: string = this.configuration.get('logging.openEdge')!; - private tempFilesPath: string = this.configuration.get('tempfiles')!; + private logentrytypes: string = + this.configuration.get('logging.openEdge') ?? 'not found'; + private tempFilesPath: string = + this.configuration.get('tempfiles') ?? 'not found'; private pfFilePath: string = path.join( Constants.context.extensionPath, 'resources', @@ -37,8 +39,8 @@ class OEClient { this.client.connect(this.port, this.host, () => { console.log( 'TCP connection established with the server at ' + - this.port.toString() + - '.' + this.port.toString() + + '.' ); }); // The client can also receive data from the server by reading from its socket. @@ -141,7 +143,8 @@ class OEClient { this.proc.on('exit', (code, signal) => { console.log( - 'child process exited with ' + `code ${code} and signal ${signal}` + 'child process exited with ' + + `code ${code} and signal ${signal}` ); }); @@ -153,7 +156,9 @@ class OEClient { console.log(`child stdout:\n${data}`); const dataString = this.enc.decode(data); if ( - dataString.startsWith('SERVER STARTED AT ' + this.port.toString()) + dataString.startsWith( + 'SERVER STARTED AT ' + this.port.toString() + ) ) { this.procFinish(dataString); } @@ -187,7 +192,9 @@ class OEClient { : null, ].join(' '); - fs.writeFile(this.pfFilePath, pfContent, () => {}); + fs.writeFile(this.pfFilePath, pfContent, () => { + console.log('pf file created'); + }); } } diff --git a/src/extension.ts b/src/extension.ts index fc1cf091..543b2eb2 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -39,9 +39,10 @@ export function activate(context: vscode.ExtensionContext) { return; } - const settingsPorts: number[] = vscode.workspace - .getConfiguration(Constants.globalExtensionKey) - .get('possiblePortsList')!; + const settingsPorts: number[] = + vscode.workspace + .getConfiguration(Constants.globalExtensionKey) + .get('possiblePortsList') ?? []; if (settingsPorts.length === 0) { context.globalState.update( `${Constants.globalExtensionKey}.portList`, @@ -52,7 +53,7 @@ export function activate(context: vscode.ExtensionContext) { let newGlobalStatePortList: IPort[] = []; const globalStatePorts = context.globalState.get<{ [id: string]: IPort; - }>(`${Constants.globalExtensionKey}.portList`)!; + }>(`${Constants.globalExtensionKey}.portList`); if (globalStatePorts) { newGlobalStatePortList = Object.values(globalStatePorts).filter( (gPort) => { @@ -121,11 +122,12 @@ export function activate(context: vscode.ExtensionContext) { ); context.subscriptions.push(indexes); - const oeRuntimes: Array = vscode.workspace - .getConfiguration('abl.configuration') - .get>('runtimes')!; + const oeRuntimes: Array = + vscode.workspace + .getConfiguration('abl.configuration') + .get>('runtimes') ?? []; - if (oeRuntimes === undefined || oeRuntimes.length === 0) { + if (oeRuntimes.length === 0) { vscode.window.showWarningMessage( 'No OpenEdge runtime configured on this machine' ); @@ -500,7 +502,7 @@ export function activate(context: vscode.ExtensionContext) { async (): Promise => { const portList = context.globalState.get<{ [id: string]: IPort }>( `${Constants.globalExtensionKey}.portList` - )!; + ); if (!portList) { await vscode.window .showErrorMessage( @@ -549,7 +551,8 @@ export function activate(context: vscode.ExtensionContext) { for (const id of Object.keys(portList)) { if ( portList[id].isInUse && - Date.now() - portList[id].timestamp! > 35000 + portList[id].timestamp && + Date.now() - portList[id].timestamp > 35000 ) { portList[id].isInUse = false; portList[id].timestamp = undefined; diff --git a/src/repo/client/local/LocalClient.ts b/src/repo/client/local/LocalClient.ts index 5cb8df3a..402496bf 100644 --- a/src/repo/client/local/LocalClient.ts +++ b/src/repo/client/local/LocalClient.ts @@ -15,8 +15,10 @@ export class LocalClient extends AClient implements IClient { private readonly configuration = vscode.workspace.getConfiguration( Constants.globalExtensionKey ); - private logentrytypes: string = this.configuration.get('logging.openEdge')!; - private tempFilesPath: string = this.configuration.get('tempfiles')!; + private logentrytypes: string = + this.configuration.get('logging.openEdge') ?? 'not found'; + private tempFilesPath: string = + this.configuration.get('tempfiles') ?? 'not found'; protected proc!: cp.ChildProcessWithoutNullStreams; private constructor(connectionParams: ConnectionParams) { @@ -96,7 +98,11 @@ export class LocalClient extends AClient implements IClient { `"${this.pfFilePath}"`, ]; - private readonly windowsProPath = path.join(Constants.dlc, 'bin', '_progres'); + private readonly windowsProPath = path.join( + Constants.dlc, + 'bin', + '_progres' + ); protected readonly windowsConnectionString = [ '-p', @@ -134,17 +140,20 @@ export class LocalClient extends AClient implements IClient { this.createPfFile(); switch (process.platform) { - case 'linux': - this.proc = cp.spawn(this.linuxProPath, this.linuxConnectionString); - break; - case 'win32': - this.proc = cp.spawn( - this.windowsProPath, - this.windowsConnectionString - ); - break; - default: - reject('Unsupported platform'); + case 'linux': + this.proc = cp.spawn( + this.linuxProPath, + this.linuxConnectionString + ); + break; + case 'win32': + this.proc = cp.spawn( + this.windowsProPath, + this.windowsConnectionString + ); + break; + default: + reject('Unsupported platform'); } this.proc.stdout.on('data', (data) => { @@ -153,7 +162,8 @@ export class LocalClient extends AClient implements IClient { const dataString = this.enc.decode(data); if ( dataString.startsWith( - 'SERVER STARTED AT ' + this.connectionParams.port.toString() + 'SERVER STARTED AT ' + + this.connectionParams.port.toString() ) ) { this.procFinish(dataString); @@ -192,6 +202,8 @@ export class LocalClient extends AClient implements IClient { : null, ].join(' '); - fs.writeFile(this.pfFilePath, pfContent, () => {}); + fs.writeFile(this.pfFilePath, pfContent, () => { + console.log('pf file created'); + }); } } diff --git a/src/repo/client/remote/RemoteClientHelper.ts b/src/repo/client/remote/RemoteClientHelper.ts index 44db888b..87619a59 100644 --- a/src/repo/client/remote/RemoteClientHelper.ts +++ b/src/repo/client/remote/RemoteClientHelper.ts @@ -13,7 +13,7 @@ export class RemoteClientHelper implements IClientHelper { return RemoteClientHelper.instance; } - public formConnectionString(config: IRemoteConnectionConfig): string { - return 'Hellp from RemoteClientHelper'; + public formConnectionString(_config: IRemoteConnectionConfig): string { + throw new Error('Method not yet implemented.'); } } diff --git a/src/repo/processor/ProcessorFactory.ts b/src/repo/processor/ProcessorFactory.ts index eb8b01d1..6650c580 100644 --- a/src/repo/processor/ProcessorFactory.ts +++ b/src/repo/processor/ProcessorFactory.ts @@ -7,27 +7,29 @@ import * as vscode from 'vscode'; import { Constants } from '../../common/Constants'; export class ProcessorFactory { - private static readonly processorType: ProcessorType = ProcessorType.Database; + private static readonly processorType: ProcessorType = + ProcessorType.Database; public static getProcessorInstance(): IProcessor { switch (ProcessorFactory.determineProcessorType()) { - case ProcessorType.Database: - return DbProcessor.getInstance(); - case ProcessorType.Mock: - return MockProcessor.getInstance(); - case ProcessorType.Old: - return DatabaseProcessor.getInstance(); - default: - throw new Error('Invalid processor type'); + case ProcessorType.Database: + return DbProcessor.getInstance(); + case ProcessorType.Mock: + return MockProcessor.getInstance(); + case ProcessorType.Old: + return DatabaseProcessor.getInstance(); + default: + throw new Error('Invalid processor type'); } } private static determineProcessorType(): ProcessorType { - // TODO: delete after old processor is removed + // TODO: delete after old processor is removed const configuration = vscode.workspace.getConfiguration( Constants.globalExtensionKey ); - const useNew: boolean = configuration.get('development.useNewDbClient')!; + const useNew: boolean = + configuration.get('development.useNewDbClient') ?? false; console.log('useNew: ' + useNew); if (useNew === true) { diff --git a/src/repo/processor/database/DbProcessor.ts b/src/repo/processor/database/DbProcessor.ts index 37b3525f..caaa2e4e 100644 --- a/src/repo/processor/database/DbProcessor.ts +++ b/src/repo/processor/database/DbProcessor.ts @@ -22,7 +22,9 @@ export class DbProcessor implements IProcessor { private readonly configuration = vscode.workspace.getConfiguration( Constants.globalExtensionKey ); - private logger = new Logger(this.configuration.get('logging.node')!); + private logger = new Logger( + this.configuration.get('logging.node') ?? false + ); // eslint-disable-next-line @typescript-eslint/no-empty-function private constructor() {} diff --git a/src/view/app/Components/Layout/Query/QueryFormHead.tsx b/src/view/app/Components/Layout/Query/QueryFormHead.tsx index 1ed202a8..4a6e84f0 100644 --- a/src/view/app/Components/Layout/Query/QueryFormHead.tsx +++ b/src/view/app/Components/Layout/Query/QueryFormHead.tsx @@ -31,8 +31,6 @@ const QueryFormHead: React.FC = ({ isWindowSmall, onLoad, onButtonClick, - formatButtonOnClick, - isFormatted, setIsFormatted, ...otherProps }) => { diff --git a/src/view/app/Connection/connectionForm.tsx b/src/view/app/Connection/connectionForm.tsx index d2b7cf9e..83d43522 100644 --- a/src/view/app/Connection/connectionForm.tsx +++ b/src/view/app/Connection/connectionForm.tsx @@ -128,7 +128,7 @@ function ConnectionForm({ input.id = 'inputVal'; input.type = 'file'; input.accept = '.pf'; - input.onchange = (ev) => { + input.onchange = (_ev) => { const [file] = Array.from(input.files); const reader = new FileReader(); reader.addEventListener('load', () => { diff --git a/src/view/app/Connection/index.tsx b/src/view/app/Connection/index.tsx index 3cfbeb9b..a4305fd1 100644 --- a/src/view/app/Connection/index.tsx +++ b/src/view/app/Connection/index.tsx @@ -4,10 +4,11 @@ import './connection.css'; import ConnectionForm from './connectionForm'; import { IConfig } from '@app/model'; import { ISettings } from '@src/common/IExtensionSettings'; +import { VSCode } from '@utils/vscode'; declare global { interface Window { - acquireVsCodeApi(): any; + acquireVsCodeApi(): VSCode; initialData: IConfig; configuration: ISettings; } diff --git a/src/view/app/Fields/index.tsx b/src/view/app/Fields/index.tsx index 882bcdfb..fd5e0fe6 100644 --- a/src/view/app/Fields/index.tsx +++ b/src/view/app/Fields/index.tsx @@ -1,10 +1,11 @@ import { createRoot } from 'react-dom/client'; import './fields.css'; import Fields from './fields'; +import { VSCode } from '@utils/vscode'; declare global { interface Window { - acquireVsCodeApi(): any; + acquireVsCodeApi(): VSCode; } } diff --git a/src/view/app/Indexes/index.tsx b/src/view/app/Indexes/index.tsx index 6f49d067..4687ba42 100644 --- a/src/view/app/Indexes/index.tsx +++ b/src/view/app/Indexes/index.tsx @@ -2,10 +2,11 @@ import { createRoot } from 'react-dom/client'; import './indexes.css'; import Indexes from './indexes'; import { ISettings } from '@src/common/IExtensionSettings'; +import { VSCode } from '@utils/vscode'; declare global { interface Window { - acquireVsCodeApi(): any; + acquireVsCodeApi(): VSCode; configuration: ISettings; } } diff --git a/src/webview/ConnectionEditor.ts b/src/webview/ConnectionEditor.ts index 54789b56..4fbaa4d4 100644 --- a/src/webview/ConnectionEditor.ts +++ b/src/webview/ConnectionEditor.ts @@ -15,12 +15,14 @@ export class ConnectionEditor { private readonly configuration = vscode.workspace.getConfiguration( Constants.globalExtensionKey ); - private logger = new Logger(this.configuration.get('logging.node')!); + private logger = new Logger( + this.configuration.get('logging.node') ?? false + ); constructor( - private context: vscode.ExtensionContext, - action: string, - id?: string + private context: vscode.ExtensionContext, + action: string, + id?: string ) { this.extensionPath = context.asAbsolutePath(''); this.context.globalState.get<{ [id: string]: IConfig }>( @@ -38,7 +40,9 @@ export class ConnectionEditor { enableScripts: true, retainContextWhenHidden: true, localResourceRoots: [ - vscode.Uri.file(path.join(context.asAbsolutePath(''), 'out')), + vscode.Uri.file( + path.join(context.asAbsolutePath(''), 'out') + ), ], } ); @@ -68,62 +72,69 @@ export class ConnectionEditor { (command: ICommand) => { this.logger.log('command:', command); let connections = this.context.globalState.get<{ - [id: string]: IConfig; - }>(`${Constants.globalExtensionKey}.dbconfig`); + [id: string]: IConfig; + }>(`${Constants.globalExtensionKey}.dbconfig`); switch (command.action) { - case CommandAction.Save: - if (!this.isTestedSuccesfully) { + case CommandAction.Save: + if (!this.isTestedSuccesfully) { + vscode.window.showInformationMessage( + 'Connection should be tested before saving.' + ); + return; + } + if (!connections) { + connections = {}; + } + connections[command.content!.id] = command.content!; + this.context.globalState.update( + `${Constants.globalExtensionKey}.dbconfig`, + connections + ); vscode.window.showInformationMessage( - 'Connection should be tested before saving.' + 'Connection saved succesfully.' + ); + this.panel?.dispose(); + vscode.commands.executeCommand( + `${Constants.globalExtensionKey}.refreshList` ); return; - } - if (!connections) { - connections = {}; - } - connections[command.content!.id] = command.content!; - this.context.globalState.update( - `${Constants.globalExtensionKey}.dbconfig`, - connections - ); - vscode.window.showInformationMessage( - 'Connection saved succesfully.' - ); - this.panel?.dispose(); - vscode.commands.executeCommand( - `${Constants.globalExtensionKey}.refreshList` - ); - return; - case CommandAction.Test: - ProcessorFactory.getProcessorInstance() - .getDBVersion(command.content!) - .then((oe) => { - if (oe.error) { - vscode.window.showErrorMessage( - `Error connecting DB: ${oe.description} (${oe.error})` - ); - } else { - this.logger.log('Requested version of DB', oe.dbversion); - vscode.window.showInformationMessage('Connection OK'); - this.isTestedSuccesfully = true; + case CommandAction.Test: + ProcessorFactory.getProcessorInstance() + .getDBVersion(command.content!) + .then((oe) => { + if (oe.error) { + vscode.window.showErrorMessage( + `Error connecting DB: ${oe.description} (${oe.error})` + ); + } else { + this.logger.log( + 'Requested version of DB', + oe.dbversion + ); + vscode.window.showInformationMessage( + 'Connection OK' + ); + this.isTestedSuccesfully = true; + } + }); + return; + case CommandAction.Group: + if (connections) { + const uniqueGroups = new Set(); // Specify that the Set will contain strings + + for (const id of Object.keys(connections)) { + const group = + connections[id].group.toUpperCase(); + uniqueGroups.add(group); } - }); - return; - case CommandAction.Group: - if (connections) { - const uniqueGroups = new Set(); // Specify that the Set will contain strings - - for (const id of Object.keys(connections)) { - const group = connections[id].group.toUpperCase(); - uniqueGroups.add(group); - } - const groupNames: string[] = Array.from(uniqueGroups); + const groupNames: string[] = + Array.from(uniqueGroups); - this.groupList(groupNames); - } + this.groupList(groupNames); + } - return; + return; } }, undefined, @@ -148,7 +159,7 @@ export class ConnectionEditor { } private getWebviewContent(): string { - // Local path to main script run in the webview + // Local path to main script run in the webview const reactAppPathOnDisk = vscode.Uri.file( path.join( vscode.Uri.file( @@ -159,7 +170,8 @@ export class ConnectionEditor { ) ); - const reactAppUri = this.panel?.webview.asWebviewUri(reactAppPathOnDisk); + const reactAppUri = + this.panel?.webview.asWebviewUri(reactAppPathOnDisk); const cspSource = this.panel?.webview.cspSource; let config: IConfig = { @@ -180,14 +192,15 @@ export class ConnectionEditor { }; if (this.id) { const connections = this.context.globalState.get<{ - [id: string]: IConfig; - }>(`${Constants.globalExtensionKey}.dbconfig`); + [id: string]: IConfig; + }>(`${Constants.globalExtensionKey}.dbconfig`); if (connections) { config = connections[this.id]; if (!config) { - const workspaceConnections = this.context.workspaceState.get<{ - [id: string]: IConfig; - }>(`${Constants.globalExtensionKey}.dbconfig`); + const workspaceConnections = + this.context.workspaceState.get<{ + [id: string]: IConfig; + }>(`${Constants.globalExtensionKey}.dbconfig`); if (workspaceConnections) { config = workspaceConnections[this.id]; config.workState = true; diff --git a/src/webview/DumpFileFormatter.ts b/src/webview/DumpFileFormatter.ts index cc24005f..322ad7ba 100644 --- a/src/webview/DumpFileFormatter.ts +++ b/src/webview/DumpFileFormatter.ts @@ -58,7 +58,7 @@ export class DumpFileFormatter { accumulator + Object.entries(row) .filter((element) => element[0] !== 'ROWID') - .reduce((accumulator: any, element: any, index) => { + .reduce((accumulator: string, element: any, index) => { if (index > 0 && accumulator.length !== 0) { accumulator += ' '; } @@ -69,7 +69,12 @@ export class DumpFileFormatter { const column = data.columns.find( (column) => column.name === element[0] ); - switch (column!.type) { + if (!column) { + throw new Error( + `Column not found for element: ${element[0]}` + ); + } + switch (column.type) { case 'decimal': if (element[1] < 1 && element[1] > 0) { return ( diff --git a/src/webview/FieldsViewProvider.ts b/src/webview/FieldsViewProvider.ts index 52a563ea..cbc877a8 100644 --- a/src/webview/FieldsViewProvider.ts +++ b/src/webview/FieldsViewProvider.ts @@ -9,7 +9,9 @@ import { HighlightFieldsCommand } from '../common/commands/fieldsCommands'; export class FieldsViewProvider extends PanelViewProvider { private queryEditors: QueryEditor[] = []; - private logger = new Logger(this.configuration.get('logging.node')!); + private logger = new Logger( + this.configuration.get('logging.node') ?? false + ); public addQueryEditor(queryEditor: QueryEditor) { this.queryEditors.push(queryEditor); diff --git a/src/webview/QueryEditor.ts b/src/webview/QueryEditor.ts index 5dacb329..ad8a3688 100644 --- a/src/webview/QueryEditor.ts +++ b/src/webview/QueryEditor.ts @@ -22,7 +22,9 @@ export class QueryEditor { Constants.globalExtensionKey ); private readOnly = false; - private logger = new Logger(this.configuration.get('logging.node')!); + private logger = new Logger( + this.configuration.get('logging.node') ?? false + ); constructor( private context: vscode.ExtensionContext, @@ -201,7 +203,7 @@ export class QueryEditor { dumpFileFormatter.formatDumpFile( oe, this.tableNode.tableName, - config!.label + config.label ?? '' ); exportData = dumpFileFormatter.getDumpFile(); From 154e446a40d7b297d2f64e9674d271d5f34a8668 Mon Sep 17 00:00:00 2001 From: akleinas Date: Fri, 30 Aug 2024 09:41:07 +0300 Subject: [PATCH 11/61] fixed pipeline issues --- src/extension.ts | 8 +++-- src/webview/QueryEditor.ts | 71 +++++++++++++++++++------------------- 2 files changed, 41 insertions(+), 38 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 543b2eb2..907845d8 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -549,10 +549,12 @@ export function activate(context: vscode.ExtensionContext) { } for (const id of Object.keys(portList)) { + const port = portList[id]; + const timestamp = port.timestamp; if ( - portList[id].isInUse && - portList[id].timestamp && - Date.now() - portList[id].timestamp > 35000 + port.isInUse && + timestamp && + Date.now() - timestamp > 35000 ) { portList[id].isInUse = false; portList[id].timestamp = undefined; diff --git a/src/webview/QueryEditor.ts b/src/webview/QueryEditor.ts index ad8a3688..ced3e863 100644 --- a/src/webview/QueryEditor.ts +++ b/src/webview/QueryEditor.ts @@ -184,42 +184,43 @@ export class QueryEditor { } break; case CommandAction.Export: - if (config) { - ProcessorFactory.getProcessorInstance() - .getTableData( - config, - this.tableNode.tableName, - command.params - ) - .then((oe) => { - if (this.panel) { - let exportData = oe; - if ( - command.params?.exportType === - 'dumpFile' - ) { - const dumpFileFormatter = - new DumpFileFormatter(); - dumpFileFormatter.formatDumpFile( - oe, - this.tableNode.tableName, - config.label ?? '' - ); - exportData = - dumpFileFormatter.getDumpFile(); - } - const obj = { - id: command.id, - command: 'export', - tableName: this.tableNode.tableName, - data: exportData, - format: command.params!.exportType, - }; - this.logger.log('data:', obj); - this.panel?.webview.postMessage(obj); - } - }); + if (!config) { + break; } + ProcessorFactory.getProcessorInstance() + .getTableData( + config, + this.tableNode.tableName, + command.params + ) + .then((oe) => { + if (this.panel) { + let exportData = oe; + if ( + command.params?.exportType === + 'dumpFile' + ) { + const dumpFileFormatter = + new DumpFileFormatter(); + dumpFileFormatter.formatDumpFile( + oe, + this.tableNode.tableName, + config.label ?? '' + ); + exportData = + dumpFileFormatter.getDumpFile(); + } + const obj = { + id: command.id, + command: 'export', + tableName: this.tableNode.tableName, + data: exportData, + format: command.params!.exportType, + }; + this.logger.log('data:', obj); + this.panel?.webview.postMessage(obj); + } + }); break; } }, From ae2a8a5eabeb12e66b62960dab8fbca91ab690e0 Mon Sep 17 00:00:00 2001 From: akleinas Date: Fri, 30 Aug 2024 09:48:13 +0300 Subject: [PATCH 12/61] fixed pipeline issue --- src/webview/QueryEditor.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/webview/QueryEditor.ts b/src/webview/QueryEditor.ts index ced3e863..460174fb 100644 --- a/src/webview/QueryEditor.ts +++ b/src/webview/QueryEditor.ts @@ -185,7 +185,9 @@ export class QueryEditor { break; case CommandAction.Export: if (!config) { - break; + throw new Error( + 'Configuration is missing or undefined.' + ); } ProcessorFactory.getProcessorInstance() .getTableData( From 5e21ff8acb5ee5ceb12968eb3aaffb40b2959782 Mon Sep 17 00:00:00 2001 From: akleinas Date: Fri, 30 Aug 2024 10:03:31 +0300 Subject: [PATCH 13/61] fixed pipeline issue --- src/webview/QueryEditor.ts | 57 +++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/src/webview/QueryEditor.ts b/src/webview/QueryEditor.ts index 460174fb..2c09c64c 100644 --- a/src/webview/QueryEditor.ts +++ b/src/webview/QueryEditor.ts @@ -185,9 +185,7 @@ export class QueryEditor { break; case CommandAction.Export: if (!config) { - throw new Error( - 'Configuration is missing or undefined.' - ); + break; } ProcessorFactory.getProcessorInstance() .getTableData( @@ -196,32 +194,35 @@ export class QueryEditor { command.params ) .then((oe) => { - if (this.panel) { - let exportData = oe; - if ( - command.params?.exportType === - 'dumpFile' - ) { - const dumpFileFormatter = - new DumpFileFormatter(); - dumpFileFormatter.formatDumpFile( - oe, - this.tableNode.tableName, - config.label ?? '' - ); - exportData = - dumpFileFormatter.getDumpFile(); - } - const obj = { - id: command.id, - command: 'export', - tableName: this.tableNode.tableName, - data: exportData, - format: command.params!.exportType, - }; - this.logger.log('data:', obj); - this.panel?.webview.postMessage(obj); + if (!this.panel) { + return; + } + if (!config) { + throw new Error( + 'Configuration became undefined unexpectedly.' + ); + } + let exportData = oe; + if (command.params?.exportType === 'dumpFile') { + const dumpFileFormatter = + new DumpFileFormatter(); + dumpFileFormatter.formatDumpFile( + oe, + this.tableNode.tableName, + config.label + ); + exportData = + dumpFileFormatter.getDumpFile(); } + const obj = { + id: command.id, + command: 'export', + tableName: this.tableNode.tableName, + data: exportData, + format: command.params!.exportType, + }; + this.logger.log('data:', obj); + this.panel?.webview.postMessage(obj); }); break; } From 324c07ad22afb3c6b6e4d34c53ebcea97a08b181 Mon Sep 17 00:00:00 2001 From: akleinas Date: Fri, 30 Aug 2024 10:27:31 +0300 Subject: [PATCH 14/61] refactored query.tsx --- src/view/app/Query/query.tsx | 219 ++++++++++++++++++----------------- 1 file changed, 113 insertions(+), 106 deletions(-) diff --git a/src/view/app/Query/query.tsx b/src/view/app/Query/query.tsx index d50f108b..b7215466 100644 --- a/src/view/app/Query/query.tsx +++ b/src/view/app/Query/query.tsx @@ -131,6 +131,115 @@ function QueryForm({ tableData, tableName, isReadOnly }: IConfigProps) { queryGridRef.current?.selectCell({ idx: columnIdx, rowIdx: rowIdx }); }; + const processBooleanFields = (columns: any[], rawData: any[]) => { + const boolField = columns.filter( + (field) => field.type.toUpperCase() === OEDataTypePrimitive.Logical + ); + if (boolField.length !== 0) { + rawData.forEach((row) => { + boolField.forEach((field) => { + if (row[field.name] !== null) { + row[field.name] = row[field.name].toString(); + } + }); + }); + } + }; + + const handleSubmit = (message: any) => { + if (message.data.error) { + // should be displayed in UpdatePopup window + setErrorObject({ + error: message.data.error, + description: message.data.description, + trace: message.data.trace, + }); + setIsDataRetrieved(false); + } else { + setSelectedRows(new Set()); + setOpen(false); + reloadData(loaded + (action === ProcessAction.Insert ? 1 : 0)); + } + }; + + const handleCrud = (message: any) => { + if (message.data.error) { + setErrorObject({ + error: message.data.error, + description: message.data.description, + trace: message.data.trace, + }); + setIsDataRetrieved(false); + } else { + setColumnsCRUD(message.data.columns); + setRecordsCRUD(message.data.rawData); + setOpen(true); + } + }; + + const handleData = (message: any) => { + if (message.data.error) { + setErrorObject({ + error: message.data.error, + description: message.data.description, + trace: message.data.trace, + }); + setIsDataRetrieved(false); + } else if (message.data.columns.length !== columns.length) { + const fontSize = +window + .getComputedStyle( + document.getElementsByClassName('rdg-header-row')[0] + ) + .getPropertyValue('font-size') + .match(/\d+[.]?\d+/); + message.data.columns.forEach((column) => { + column.minWidth = column.name.length * fontSize; + column.width = + getOEFormatLength(column.format ?? '') * (fontSize - 4); + switch (column.type.toUpperCase()) { + case OEDataTypePrimitive.Integer: + case OEDataTypePrimitive.Decimal: + case OEDataTypePrimitive.Int64: + column.cellClass = 'rightAlign'; + column.headerCellClass = 'rightAlign'; + break; + default: + break; + } + }); + setColumns([SelectColumn, ...message.data.columns]); + if (message.columns !== undefined) { + setSelectedColumns([...message.columns]); + } else { + setSelectedColumns([ + ...message.data.columns.map((column) => column.name), + ]); + } + } + processBooleanFields(message.data.columns, message.data.rawData); + + setRawRows([...rawRows, ...message.data.rawData]); + setRowID( + message.data.rawData.length > 0 + ? message.data.rawData[message.data.rawData.length - 1].ROWID + : rowID + ); + setLoaded(loaded + message.data.rawData.length); + setFormattedRows([...formattedRows, ...message.data.formattedData]); + setLoaded(loaded + message.data.formattedData.length); + setErrorObject(emptyErrorObj); + setIsDataRetrieved(true); + setStatisticsObject({ + recordsRetrieved: message.data.debug.recordsRetrieved, + recordsRetrievalTime: message.data.debug.recordsRetrievalTime, + connectTime: message.data.debug.timeConnect, + }); + allRecordsRetrieved( + message.data.debug.recordsRetrieved, + message.data.debug.recordsRetrievalTime + ); + }; + const messageEvent = (event) => { const message = event.data; logger.log('got query data', message); @@ -145,116 +254,14 @@ function QueryForm({ tableData, tableName, isReadOnly }: IConfigProps) { prepareQuery(); break; case 'submit': - if (message.data.error) { - // should be displayed in UpdatePopup window - setErrorObject({ - error: message.data.error, - description: message.data.description, - trace: message.data.trace, - }); - setIsDataRetrieved(false); - } else { - setSelectedRows(new Set()); - setOpen(false); - reloadData( - loaded + (action === ProcessAction.Insert ? 1 : 0) - ); - } + handleSubmit(message); break; case 'crud': - if (message.data.error) { - setErrorObject({ - error: message.data.error, - description: message.data.description, - trace: message.data.trace, - }); - setIsDataRetrieved(false); - } else { - setColumnsCRUD(message.data.columns); - setRecordsCRUD(message.data.rawData); - setOpen(true); - } + handleCrud(message); break; case 'data': - if (message.data.error) { - setErrorObject({ - error: message.data.error, - description: message.data.description, - trace: message.data.trace, - }); - setIsDataRetrieved(false); - } else if (message.data.columns.length !== columns.length) { - const fontSize = +window - .getComputedStyle( - document.getElementsByClassName('rdg-header-row')[0] - ) - .getPropertyValue('font-size') - .match(/\d+[.]?\d+/); - message.data.columns.forEach((column) => { - column.minWidth = column.name.length * fontSize; - column.width = - getOEFormatLength(column.format ?? '') * - (fontSize - 4); - switch (column.type.toUpperCase()) { - case OEDataTypePrimitive.Integer: - case OEDataTypePrimitive.Decimal: - case OEDataTypePrimitive.Int64: - column.cellClass = 'rightAlign'; - column.headerCellClass = 'rightAlign'; - break; - default: - break; - } - }); - setColumns([SelectColumn, ...message.data.columns]); - if (message.columns !== undefined) { - setSelectedColumns([...message.columns]); - } else { - setSelectedColumns([ - ...message.data.columns.map( - (column) => column.name - ), - ]); - } - } - const boolField = message.data.columns.filter( - (field) => - field.type.toUpperCase() === OEDataTypePrimitive.Logical - ); - if (boolField.length !== 0) { - message.data.rawData.forEach((row) => { - boolField.forEach((field) => { - if (row[field.name] !== null) { - row[field.name] = row[field.name].toString(); - } - }); - }); - } - setRawRows([...rawRows, ...message.data.rawData]); - setRowID( - message.data.rawData.length > 0 - ? message.data.rawData[message.data.rawData.length - 1] - .ROWID - : rowID - ); - setLoaded(loaded + message.data.rawData.length); - setFormattedRows([ - ...formattedRows, - ...message.data.formattedData, - ]); - setLoaded(loaded + message.data.formattedData.length); - setErrorObject(emptyErrorObj); - setIsDataRetrieved(true); - setStatisticsObject({ - recordsRetrieved: message.data.debug.recordsRetrieved, - recordsRetrievalTime: - message.data.debug.recordsRetrievalTime, - connectTime: message.data.debug.timeConnect, - }); - allRecordsRetrieved( - message.data.debug.recordsRetrieved, - message.data.debug.recordsRetrievalTime - ); + handleData(message); + break; } setIsLoading(false); }; From 9c8b5b21f5f5685662a7832fc58c1be7289acb20 Mon Sep 17 00:00:00 2001 From: akleinas Date: Fri, 30 Aug 2024 10:40:41 +0300 Subject: [PATCH 15/61] added connectionPF.pf to .gitignore --- .gitignore | 1 + resources/oe/connectionPf.pf | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 resources/oe/connectionPf.pf diff --git a/.gitignore b/.gitignore index f848ae4c..17877614 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ resources/oe/oeSocket.pro .builder/** docker/.builder/** .scannerwork +connectionPF.pf diff --git a/resources/oe/connectionPf.pf b/resources/oe/connectionPf.pf deleted file mode 100644 index 83f232dd..00000000 --- a/resources/oe/connectionPf.pf +++ /dev/null @@ -1 +0,0 @@ --T C:\Users\akleinas\ProBro\TempFiles -b -param 23457 -debugalert \ No newline at end of file From b4f62d46f2210c398bab87646ac482e27eda677e Mon Sep 17 00:00:00 2001 From: akleinas Date: Mon, 2 Sep 2024 10:25:30 +0300 Subject: [PATCH 16/61] partial bug fix --- .../Layout/Query/QueryFormTable.tsx | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/view/app/Components/Layout/Query/QueryFormTable.tsx b/src/view/app/Components/Layout/Query/QueryFormTable.tsx index ec34ddfc..19582129 100644 --- a/src/view/app/Components/Layout/Query/QueryFormTable.tsx +++ b/src/view/app/Components/Layout/Query/QueryFormTable.tsx @@ -51,18 +51,21 @@ const QueryFormTable: React.FC = ({ }) => { const adjustedColumns = useMemo( () => - selected.map((col) => ({ + selected.map((col, index) => ({ ...col, - headerRenderer: (props) => - ColumnHeaderCell({ - ...props, - reloadData, - configuration, - filters, - setFilters, - }), + headerRenderer: + index === 0 + ? undefined + : (props) => + ColumnHeaderCell({ + ...props, + reloadData, + configuration, + filters, + setFilters, + }), })), - [selected] + [selected, reloadData, configuration, filters, setFilters] ); const calculateHeight = () => { From 3b2185bd49896335f878aeafdc93b249a8b24953 Mon Sep 17 00:00:00 2001 From: akleinas Date: Mon, 2 Sep 2024 14:37:49 +0300 Subject: [PATCH 17/61] made select all rows checkbox visible again --- .../Layout/Query/QueryFormTable.tsx | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/src/view/app/Components/Layout/Query/QueryFormTable.tsx b/src/view/app/Components/Layout/Query/QueryFormTable.tsx index 19582129..1e4f2d2f 100644 --- a/src/view/app/Components/Layout/Query/QueryFormTable.tsx +++ b/src/view/app/Components/Layout/Query/QueryFormTable.tsx @@ -49,25 +49,30 @@ const QueryFormTable: React.FC = ({ reloadData, setFilters, }) => { - const adjustedColumns = useMemo( - () => - selected.map((col, index) => ({ - ...col, - headerRenderer: - index === 0 - ? undefined - : (props) => - ColumnHeaderCell({ - ...props, - reloadData, - configuration, - filters, - setFilters, - }), - })), - [selected, reloadData, configuration, filters, setFilters] - ); + const adjustedColumns = selected.map((column, index) => { + if (index === 0) { + return column; + } + return { + ...column, + headerRenderer: function (props) { + return ( + + ); + }, + }; + }); const calculateHeight = () => { const rowCount = rows.length; const cellHeight = getCellHeight(); From 2114fb0c21a66f00e02eef6a8681c033ad1c57d0 Mon Sep 17 00:00:00 2001 From: akleinas Date: Mon, 2 Sep 2024 14:40:24 +0300 Subject: [PATCH 18/61] removed unnecesarry import --- src/view/app/Components/Layout/Query/QueryFormTable.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/view/app/Components/Layout/Query/QueryFormTable.tsx b/src/view/app/Components/Layout/Query/QueryFormTable.tsx index 1e4f2d2f..6f6706f2 100644 --- a/src/view/app/Components/Layout/Query/QueryFormTable.tsx +++ b/src/view/app/Components/Layout/Query/QueryFormTable.tsx @@ -1,4 +1,4 @@ -import { UIEvent, useMemo } from 'react'; +import { UIEvent } from 'react'; import DataGrid, { SortColumn, From 0bdd8d399767b347826416e2bc1f5c8786a82419 Mon Sep 17 00:00:00 2001 From: Carl Verbiest Date: Fri, 27 Sep 2024 07:33:19 +0200 Subject: [PATCH 19/61] #574 Use oe.pf to ignore $DLC/startup.pf --- resources/oe/scripts/oe.bat | 4 +++- resources/oe/scripts/oe.pf | 5 +++++ resources/oe/scripts/oe.sh | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 resources/oe/scripts/oe.pf diff --git a/resources/oe/scripts/oe.bat b/resources/oe/scripts/oe.bat index 885f9f23..e942a4c6 100644 --- a/resources/oe/scripts/oe.bat +++ b/resources/oe/scripts/oe.bat @@ -11,8 +11,10 @@ if not "%PROEXE%"=="" goto START if "%ICU_DATA%"=="" set ICU_DATA="%DLC%\bin\icu\data\\" +set PROSTARTUP=%~dp0\oe.pf + cd %~dp0/.. -"%PROEXE%" %1 %2 %3 %4 %5 %6 %8 %9 -cpinternal UTF-8 -cpstream UTF-8 -cpcoll Basic -cpcase Basic +"%PROEXE%" %1 %2 %3 %4 %5 %6 %8 %9 :END diff --git a/resources/oe/scripts/oe.pf b/resources/oe/scripts/oe.pf new file mode 100644 index 00000000..ec64968d --- /dev/null +++ b/resources/oe/scripts/oe.pf @@ -0,0 +1,5 @@ +# oe.pf to replace $DLC/startup.pf ensuring startup parameters ProBro expects +-cpinternal UTF-8 +-cpstream UTF-8 +-cpcoll Basic +-cpcase Basic diff --git a/resources/oe/scripts/oe.sh b/resources/oe/scripts/oe.sh index 30a437e2..29872818 100755 --- a/resources/oe/scripts/oe.sh +++ b/resources/oe/scripts/oe.sh @@ -1,4 +1,6 @@ #!/bin/sh +echo $0 called with +echo $* export DLC="$7" export TERM=xterm @@ -7,6 +9,8 @@ export PROPATH=$PROPATH:$(dirname "$PWD") called_path=${0%/*} parent_path=$(dirname $called_path) +export PROSTARTUP=$called_path/oe.pf + export PROPATH=$PROPATH:$parent_path PROEXE=${PROEXE-$DLC/bin/_progres} @@ -42,4 +46,4 @@ fi # Set the Progress Shared lib environment . $DLC/bin/slib_env -exec $PROEXE -1 "$1" "$2" "$3" "$4" "$5" "$6" -cpinternal UTF-8 -cpstream UTF-8 -cpcoll Basic -cpcase Basic +exec $PROEXE -1 "$1" "$2" "$3" "$4" "$5" "$6" From 7fa073c4adade47f7443c48aa6d78b27974c0dab Mon Sep 17 00:00:00 2001 From: Carl Verbiest Date: Sat, 28 Sep 2024 08:07:55 +0200 Subject: [PATCH 20/61] 577 npm audit fix --- .vscode/settings.json | 8 +- package-lock.json | 410 ++++++++++++++++++++---------------------- 2 files changed, 200 insertions(+), 218 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index aef762fd..00f0b9e3 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,7 +4,10 @@ "PowerShell": { "source": "PowerShell", "icon": "terminal-powershell", - "args": ["-ExecutionPolicy", "Bypass"] + "args": [ + "-ExecutionPolicy", + "Bypass" + ] } }, "terminal.integrated.defaultProfile.windows": "PowerShell", @@ -26,5 +29,6 @@ }, "[typescriptreact]": { "editor.defaultFormatter": "esbenp.prettier-vscode" - } + }, + "workbench.colorCustomizations": {} } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index af1d9899..70af2c30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pro-bro", - "version": "1.5.2", + "version": "1.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pro-bro", - "version": "1.5.2", + "version": "1.7.0", "dependencies": { "@emotion/react": "^11.10.0", "@emotion/styled": "^11.10.0", @@ -84,11 +84,12 @@ } }, "node_modules/@babel/code-frame": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", - "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", "dependencies": { - "@babel/highlight": "^7.22.5" + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" @@ -134,14 +135,14 @@ } }, "node_modules/@babel/generator": { - "version": "7.22.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.22.9.tgz", - "integrity": "sha512-KtLMbmicyuK2Ak/FTCJVbDnkN1SlT8/kceFTiuDiiRUUSMnHMidxSCdG4ndkTOHHpoomWe/4xkvHkEOncwjYIw==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.6.tgz", + "integrity": "sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==", "dev": true, "dependencies": { - "@babel/types": "^7.22.5", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", + "@babel/types": "^7.25.6", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" }, "engines": { @@ -415,17 +416,17 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", "engines": { "node": ">=6.9.0" } @@ -468,23 +469,27 @@ } }, "node_modules/@babel/highlight": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", - "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/parser": { - "version": "7.22.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.22.7.tgz", - "integrity": "sha512-7NF8pOkHP5o2vpmGgNGcfAeCvOYhGLyA3Z4eBQkT1RJlWu47n63bCs93QfJ2hIAFCil7L5P2IWhs1oToVgrL0Q==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.6.tgz", + "integrity": "sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==", "dev": true, + "dependencies": { + "@babel/types": "^7.25.6" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -1766,34 +1771,31 @@ } }, "node_modules/@babel/template": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.5.tgz", - "integrity": "sha512-X7yV7eiwAxdj9k94NEylvbVHLiVG1nvzCV2EAowhxLTwODV1jl9UzZ48leOC0sH7OnuHrIkllaBgneUykIcZaw==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", + "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/parser": "^7.22.5", - "@babel/types": "^7.22.5" + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.22.8", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.22.8.tgz", - "integrity": "sha512-y6LPR+wpM2I3qJrsheCTwhIinzkETbplIgPBbwvqPKc+uljeA5gP+3nP8irdYt1mjQaDnlIcG+dw8OjAco4GXw==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.6.tgz", + "integrity": "sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.5", - "@babel/generator": "^7.22.7", - "@babel/helper-environment-visitor": "^7.22.5", - "@babel/helper-function-name": "^7.22.5", - "@babel/helper-hoist-variables": "^7.22.5", - "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.22.7", - "@babel/types": "^7.22.5", - "debug": "^4.1.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.25.6", + "@babel/parser": "^7.25.6", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6", + "debug": "^4.3.1", "globals": "^11.1.0" }, "engines": { @@ -1801,12 +1803,12 @@ } }, "node_modules/@babel/types": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.22.5.tgz", - "integrity": "sha512-zo3MIHGOkPOfoRXitsgHLjEXmlDaD/5KU1Uzuc9GNiZPhSqVxVRtxuPaSBZDsYZ9qV88AjtMtWW7ww98loJ9KA==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz", + "integrity": "sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==", "dependencies": { - "@babel/helper-string-parser": "^7.22.5", - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-string-parser": "^7.24.8", + "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, "engines": { @@ -3105,13 +3107,13 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", - "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -3126,9 +3128,9 @@ } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "engines": { "node": ">=6.0.0" } @@ -3148,19 +3150,14 @@ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.18", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz", - "integrity": "sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==", + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==" - }, "node_modules/@mui/base": { "version": "5.0.0-beta.8", "resolved": "https://registry.npmjs.org/@mui/base/-/base-5.0.0-beta.8.tgz", @@ -3528,28 +3525,10 @@ "@types/ms": "*" } }, - "node_modules/@types/eslint": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.0.tgz", - "integrity": "sha512-gsF+c/0XOguWgaOgvFs+xnnRqt9GwgTvIks36WpE6ueeI4KCEHHd8K/CKHqhOqrJKsYH8m27kRzQEvWXAwXUTw==", - "dependencies": { - "@types/estree": "*", - "@types/json-schema": "*" - } - }, - "node_modules/@types/eslint-scope": { - "version": "3.7.4", - "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz", - "integrity": "sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA==", - "dependencies": { - "@types/eslint": "*", - "@types/estree": "*" - } - }, "node_modules/@types/estree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz", - "integrity": "sha512-LG4opVs2ANWZ1TJoKc937iMmNstM/d0ae1vNbnBvBhqCSezgVUOzcLCqbI5elV8Vy6WKwKjaqR+zO9VKirBBCA==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", + "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==" }, "node_modules/@types/glob": { "version": "7.2.0", @@ -4083,9 +4062,9 @@ "dev": true }, "node_modules/@webassemblyjs/ast": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", - "integrity": "sha512-IN1xI7PwOvLPgjcf180gC1bqn3q/QaOCwYUahIOhbYUu8KA/3tw2RT/T0Gidi1l7Hhj5D/INhJxiICObqpMu4Q==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", + "integrity": "sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg==", "dependencies": { "@webassemblyjs/helper-numbers": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6" @@ -4102,9 +4081,9 @@ "integrity": "sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q==" }, "node_modules/@webassemblyjs/helper-buffer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.6.tgz", - "integrity": "sha512-z3nFzdcp1mb8nEOFFk8DrYLpHvhKC3grJD2ardfKOzmbmJvEf/tPIqCY+sNcwZIY8ZD7IkB2l7/pqhUhqm7hLA==" + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz", + "integrity": "sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw==" }, "node_modules/@webassemblyjs/helper-numbers": { "version": "1.11.6", @@ -4122,14 +4101,14 @@ "integrity": "sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA==" }, "node_modules/@webassemblyjs/helper-wasm-section": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.6.tgz", - "integrity": "sha512-LPpZbSOwTpEC2cgn4hTydySy1Ke+XEu+ETXuoyvuyezHO3Kjdu90KK95Sh9xTbmjrCsUwvWwCOQQNta37VrS9g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz", + "integrity": "sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6" + "@webassemblyjs/wasm-gen": "1.12.1" } }, "node_modules/@webassemblyjs/ieee754": { @@ -4154,26 +4133,26 @@ "integrity": "sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA==" }, "node_modules/@webassemblyjs/wasm-edit": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.6.tgz", - "integrity": "sha512-Ybn2I6fnfIGuCR+Faaz7YcvtBKxvoLV3Lebn1tM4o/IAJzmi9AWYIPWpyBfU8cC+JxAO57bk4+zdsTjJR+VTOw==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz", + "integrity": "sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", - "@webassemblyjs/helper-wasm-section": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-opt": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6", - "@webassemblyjs/wast-printer": "1.11.6" + "@webassemblyjs/helper-wasm-section": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-opt": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1", + "@webassemblyjs/wast-printer": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-gen": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.6.tgz", - "integrity": "sha512-3XOqkZP/y6B4F0PBAXvI1/bky7GryoogUtfwExeP/v7Nzwo1QLcq5oQmpKlftZLbT+ERUOAZVQjuNVak6UXjPA==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz", + "integrity": "sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", "@webassemblyjs/leb128": "1.11.6", @@ -4181,22 +4160,22 @@ } }, "node_modules/@webassemblyjs/wasm-opt": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.6.tgz", - "integrity": "sha512-cOrKuLRE7PCe6AsOVl7WasYf3wbSo4CeOk6PkrjS7g57MFfVUF9u6ysQBBODX0LdgSvQqRiGz3CXvIDKcPNy4g==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz", + "integrity": "sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", - "@webassemblyjs/helper-buffer": "1.11.6", - "@webassemblyjs/wasm-gen": "1.11.6", - "@webassemblyjs/wasm-parser": "1.11.6" + "@webassemblyjs/ast": "1.12.1", + "@webassemblyjs/helper-buffer": "1.12.1", + "@webassemblyjs/wasm-gen": "1.12.1", + "@webassemblyjs/wasm-parser": "1.12.1" } }, "node_modules/@webassemblyjs/wasm-parser": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.6.tgz", - "integrity": "sha512-6ZwPeGzMJM3Dqp3hCsLgESxBGtT/OeCvCZ4TA1JUPYgmhAx38tTPR9JaKy0S5H3evQpO/h2uWs2j6Yc/fjkpTQ==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz", + "integrity": "sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@webassemblyjs/helper-api-error": "1.11.6", "@webassemblyjs/helper-wasm-bytecode": "1.11.6", "@webassemblyjs/ieee754": "1.11.6", @@ -4205,11 +4184,11 @@ } }, "node_modules/@webassemblyjs/wast-printer": { - "version": "1.11.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.6.tgz", - "integrity": "sha512-JM7AhRcE+yW2GWYaKeHL5vt4xqee5N2WcezptmgyhNS+ScggqcT1OtXykhAb13Sn5Yas0j2uv9tHgrjwvzAP4A==", + "version": "1.12.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz", + "integrity": "sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA==", "dependencies": { - "@webassemblyjs/ast": "1.11.6", + "@webassemblyjs/ast": "1.12.1", "@xtuc/long": "4.2.2" } }, @@ -4270,10 +4249,10 @@ "node": ">=0.4.0" } }, - "node_modules/acorn-import-assertions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", - "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", + "node_modules/acorn-import-attributes": { + "version": "1.9.5", + "resolved": "https://registry.npmjs.org/acorn-import-attributes/-/acorn-import-attributes-1.9.5.tgz", + "integrity": "sha512-n02Vykv5uA3eHGM/Z2dQrcD56kL8TyDb2p1+0P83PClMnC/nc+anbQRhIOWnSq4Ke/KvDPrY3C9hDtC/A3eHnQ==", "peerDependencies": { "acorn": "^8" } @@ -4798,12 +4777,12 @@ } }, "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", "dev": true, "dependencies": { - "fill-range": "^7.0.1" + "fill-range": "^7.1.1" }, "engines": { "node": ">=8" @@ -4816,9 +4795,9 @@ "dev": true }, "node_modules/browserslist": { - "version": "4.21.9", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.9.tgz", - "integrity": "sha512-M0MFoZzbUrRU4KNfCrDLnvyE7gub+peetoTid3TBIqtunaDJyXlwhakT+/VkvSXcfIzFfK/nkCs4nmyTmxdNSg==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", + "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", "funding": [ { "type": "opencollective", @@ -4834,10 +4813,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001503", - "electron-to-chromium": "^1.4.431", - "node-releases": "^2.0.12", - "update-browserslist-db": "^1.0.11" + "caniuse-lite": "^1.0.30001663", + "electron-to-chromium": "^1.5.28", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" }, "bin": { "browserslist": "cli.js" @@ -4901,9 +4880,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001517", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001517.tgz", - "integrity": "sha512-Vdhm5S11DaFVLlyiKu4hiUTkpZu+y1KA/rZZqVQfOD5YdDT/eQKlkt7NaE0WGOFgX32diqt9MiP9CAiFeRklaA==", + "version": "1.0.30001664", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz", + "integrity": "sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==", "funding": [ { "type": "opencollective", @@ -5522,9 +5501,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.468", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.468.tgz", - "integrity": "sha512-6M1qyhaJOt7rQtNti1lBA0GwclPH+oKCmsra/hkcWs5INLxfXXD/dtdnaKUYQu/pjOBP/8Osoe4mAcNvvzoFag==" + "version": "1.5.29", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz", + "integrity": "sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw==" }, "node_modules/emittery": { "version": "0.13.1", @@ -5553,9 +5532,9 @@ } }, "node_modules/enhanced-resolve": { - "version": "5.15.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", - "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "version": "5.17.1", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz", + "integrity": "sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg==", "dependencies": { "graceful-fs": "^4.2.4", "tapable": "^2.2.0" @@ -5749,9 +5728,9 @@ } }, "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "engines": { "node": ">=6" } @@ -6342,9 +6321,9 @@ } }, "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", "dev": true, "dependencies": { "to-regex-range": "^5.0.1" @@ -10069,12 +10048,12 @@ ] }, "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { - "braces": "^3.0.2", + "braces": "^3.0.3", "picomatch": "^2.3.1" }, "engines": { @@ -10418,9 +10397,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==" + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==" }, "node_modules/normalize-package-data": { "version": "2.5.0", @@ -10866,9 +10845,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==" }, "node_modules/picomatch": { "version": "2.3.1", @@ -10925,9 +10904,9 @@ } }, "node_modules/postcss": { - "version": "8.4.27", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz", - "integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "dev": true, "funding": [ { @@ -10944,9 +10923,9 @@ } ], "dependencies": { - "nanoid": "^3.3.6", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" + "nanoid": "^3.3.7", + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -11031,9 +11010,9 @@ "dev": true }, "node_modules/postcss/node_modules/nanoid": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", - "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", "dev": true, "funding": [ { @@ -11892,9 +11871,9 @@ } }, "node_modules/source-map-js": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", - "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, "engines": { "node": ">=0.10.0" @@ -12206,9 +12185,9 @@ } }, "node_modules/terser": { - "version": "5.19.2", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.19.2.tgz", - "integrity": "sha512-qC5+dmecKJA4cpYxRa5aVkKehYsQKc+AHeKl0Oe62aYjBL8ZA33tTljktDHJSaxxMnbI5ZYw+o/S2DxxLu8OfA==", + "version": "5.34.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz", + "integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==", "dependencies": { "@jridgewell/source-map": "^0.3.3", "acorn": "^8.8.2", @@ -12223,15 +12202,15 @@ } }, "node_modules/terser-webpack-plugin": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.9.tgz", - "integrity": "sha512-ZuXsqE07EcggTWQjXUj+Aot/OMcD0bMKGgF63f7UxYcu5/AJF53aIpK1YoP5xR9l6s/Hy2b+t1AM0bLNPRuhwA==", + "version": "5.3.10", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz", + "integrity": "sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w==", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.17", + "@jridgewell/trace-mapping": "^0.3.20", "jest-worker": "^27.4.5", "schema-utils": "^3.1.1", "serialize-javascript": "^6.0.1", - "terser": "^5.16.8" + "terser": "^5.26.0" }, "engines": { "node": ">= 10.13.0" @@ -12277,9 +12256,9 @@ } }, "node_modules/terser-webpack-plugin/node_modules/serialize-javascript": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz", - "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", "dependencies": { "randombytes": "^2.1.0" } @@ -12809,9 +12788,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz", - "integrity": "sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "funding": [ { "type": "opencollective", @@ -12827,8 +12806,8 @@ } ], "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { "update-browserslist-db": "cli.js" @@ -12964,9 +12943,9 @@ } }, "node_modules/watchpack": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz", - "integrity": "sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg==", + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", + "integrity": "sha512-TnbFSbcOCcDgjZ4piURLCbJ3nJhznVh9kw6F6iokjiFPl8ONxe9A6nMDVXDiNbrSfLILs6vB07F7wLBrwPYzJw==", "dependencies": { "glob-to-regexp": "^0.4.1", "graceful-fs": "^4.1.2" @@ -12976,33 +12955,32 @@ } }, "node_modules/webpack": { - "version": "5.88.2", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.88.2.tgz", - "integrity": "sha512-JmcgNZ1iKj+aiR0OvTYtWQqJwq37Pf683dY9bVORwVbUrDhLhdn/PlO2sHsFHPkj7sHNQF3JwaAkp49V+Sq1tQ==", - "dependencies": { - "@types/eslint-scope": "^3.7.3", - "@types/estree": "^1.0.0", - "@webassemblyjs/ast": "^1.11.5", - "@webassemblyjs/wasm-edit": "^1.11.5", - "@webassemblyjs/wasm-parser": "^1.11.5", + "version": "5.95.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.95.0.tgz", + "integrity": "sha512-2t3XstrKULz41MNMBF+cJ97TyHdyQ8HCt//pqErqDvNjU9YQBnZxIHa11VXsi7F3mb5/aO2tuDxdeTPdU7xu9Q==", + "dependencies": { + "@types/estree": "^1.0.5", + "@webassemblyjs/ast": "^1.12.1", + "@webassemblyjs/wasm-edit": "^1.12.1", + "@webassemblyjs/wasm-parser": "^1.12.1", "acorn": "^8.7.1", - "acorn-import-assertions": "^1.9.0", - "browserslist": "^4.14.5", + "acorn-import-attributes": "^1.9.5", + "browserslist": "^4.21.10", "chrome-trace-event": "^1.0.2", - "enhanced-resolve": "^5.15.0", + "enhanced-resolve": "^5.17.1", "es-module-lexer": "^1.2.1", "eslint-scope": "5.1.1", "events": "^3.2.0", "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.2.9", + "graceful-fs": "^4.2.11", "json-parse-even-better-errors": "^2.3.1", "loader-runner": "^4.2.0", "mime-types": "^2.1.27", "neo-async": "^2.6.2", "schema-utils": "^3.2.0", "tapable": "^2.1.1", - "terser-webpack-plugin": "^5.3.7", - "watchpack": "^2.4.0", + "terser-webpack-plugin": "^5.3.10", + "watchpack": "^2.4.1", "webpack-sources": "^3.2.3" }, "bin": { From ecd0aae8491abaca0b0b7bf3f42e7af21e7d4776 Mon Sep 17 00:00:00 2001 From: Carl Verbiest Date: Sat, 28 Sep 2024 09:53:09 +0200 Subject: [PATCH 21/61] 579 enhance dev_env_setup.md --- .gitignore | 2 ++ build.xml | 24 ++++++++++----- resources/markdown/dev_env_setup.md | 35 ++++++++++++++++++---- resources/oe/ablunitRunWin/launch_unit.bat | 11 +++++-- resources/oe/ablunitRunWin/propath.ini | 1 - resources/oe/ablunitRunWin/sports2020.pf | 1 + 6 files changed, 58 insertions(+), 16 deletions(-) create mode 100644 resources/oe/ablunitRunWin/sports2020.pf diff --git a/.gitignore b/.gitignore index 17877614..f5e462e5 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ resources/oe/oeSocket.pro docker/.builder/** .scannerwork connectionPF.pf +resources/oe/results.xml +target/** diff --git a/build.xml b/build.xml index e5fee50f..379b0c41 100644 --- a/build.xml +++ b/build.xml @@ -1,7 +1,9 @@ - - + + DLC=${env.DLC} @@ -12,14 +14,19 @@ - + - + + + + + + - + @@ -28,12 +35,13 @@ - - + + - + diff --git a/resources/markdown/dev_env_setup.md b/resources/markdown/dev_env_setup.md index 9b2a2314..f8e32026 100644 --- a/resources/markdown/dev_env_setup.md +++ b/resources/markdown/dev_env_setup.md @@ -23,21 +23,46 @@ To start vscode extension, you need to run project: - ```run -> start Debugging``` or run extension without debugging. - another instance of vsCode IDE runs with ProBro extension. Now you can test your code. +## Testing -## Launching OE tests (only for Windows) +### vscode config + +You can add DLC to your user or workspace `settings.json`, eliminating the need to specify DLC in each new terminal. +``` + "terminal.integrated.env.windows": { + "DLC": "path-to-progress" + } +``` + +`.vscode/settings.json` is part of the repo adding it there makes settings.json appear as changed in git. +Adding it to user settings may not be suitable if you work with multiple OpenEdge versions + +### Create sp2k db + +1. from vscode terminal in the workspace directory +2. execute +``` +$env:DLC="path-to-progress" +&$env:DLC\ant\bin\ant.bat create_db +``` + +### Launching OE tests (only for Windows) To test OE part communication with database, tests were written. Sports2020 (not modified) was selected as a testing database. To launch tests: -1. Set DLC parameter in ```resources/oe/propath.ini``` file 1. from vscode terminal get to ```resources/oe/ablunitRunWin``` directory -2. run ```./launch_unit.bat PathToPfFile``` +2. execute +``` +$env:DLC="path-to-progress" +./launch_unit.bat sports2020.pf +``` 3. test result will be saved in ```oe/results.xml``` file. -## Launching Node tests +### Launching Node tests TODO -## Launching scenario tests +### Launching scenario tests TODO \ No newline at end of file diff --git a/resources/oe/ablunitRunWin/launch_unit.bat b/resources/oe/ablunitRunWin/launch_unit.bat index f6bd19f3..26216c83 100644 --- a/resources/oe/ablunitRunWin/launch_unit.bat +++ b/resources/oe/ablunitRunWin/launch_unit.bat @@ -1,7 +1,12 @@ @ECHO OFF echo Starting tests... -C:\Progress\OpenEdge\bin\prowin.exe -basekey "INI" -ininame propath.ini -pf %1 -p ABLUnitCore.p -param "CFG=./ablunit.json" +if exist "%DLC%"\promsgs goto RUNTEST + echo DLC environment variable not set correctly - Please set DLC variable + goto END + +:RUNTEST +%DLC%\bin\prowin.exe -zdlc "%DLC%" -basekey "INI" -ininame propath.ini -pf %1 -p ABLUnitCore.p -param "CFG=./ablunit.json" findstr /m "" ..\results.xml > nul if %errorlevel%==0 ( @@ -10,4 +15,6 @@ echo Seems there are failing tests... echo Finished! Check 'results.xml' -pause \ No newline at end of file +pause + +:END diff --git a/resources/oe/ablunitRunWin/propath.ini b/resources/oe/ablunitRunWin/propath.ini index 3d46e77d..3282d027 100644 --- a/resources/oe/ablunitRunWin/propath.ini +++ b/resources/oe/ablunitRunWin/propath.ini @@ -1,3 +1,2 @@ [Startup] -DLC=C:\Progress\OpenEdge PROPATH=..,..\ \ No newline at end of file diff --git a/resources/oe/ablunitRunWin/sports2020.pf b/resources/oe/ablunitRunWin/sports2020.pf new file mode 100644 index 00000000..1e0d7a4d --- /dev/null +++ b/resources/oe/ablunitRunWin/sports2020.pf @@ -0,0 +1 @@ +-db ../../../target/db/sp2k/sp2k -1 \ No newline at end of file From 8c69b9abda971670aacab2b612fe87cb85fba20e Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Thu, 3 Oct 2024 13:32:08 +0300 Subject: [PATCH 22/61] Windows OS theme bug fix --- src/view/app/Fields/fields.css | 9 +++++++++ src/view/app/Indexes/indexes.css | 9 +++++++++ src/view/app/Query/query.css | 11 ++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/view/app/Fields/fields.css b/src/view/app/Fields/fields.css index 70b66bb7..09feed9e 100644 --- a/src/view/app/Fields/fields.css +++ b/src/view/app/Fields/fields.css @@ -13,6 +13,15 @@ --rdg-border-color: none; } +.r104f42s700-beta13:not(.rdg-light) { + --rdg-background-color: inherit; + --rdg-header-background-color: var(--vscode-editorWidget-background); + --rdg-row-hover-background-color: rgba(0, 0, 0, 0.2); + --rdg-row-selected-background-color: var(--vscode-list-inactiveSelectionBackground); + --rdg-checkbox-color: inherit; + --rdg-border-color: none; +} + .rdg-row-even { --rdg-background-color: rgba(0, 0, 0, 0.1); } diff --git a/src/view/app/Indexes/indexes.css b/src/view/app/Indexes/indexes.css index 520c3d24..a15735e8 100644 --- a/src/view/app/Indexes/indexes.css +++ b/src/view/app/Indexes/indexes.css @@ -11,6 +11,15 @@ --rdg-border-color: none; } +.r104f42s700-beta13:not(.rdg-light) { + --rdg-background-color: inherit; + --rdg-header-background-color: var(--vscode-editorWidget-background); + --rdg-row-hover-background-color: rgba(0, 0, 0, 0.2); + --rdg-row-selected-background-color: var(--vscode-list-inactiveSelectionBackground); + --rdg-checkbox-color: inherit; + --rdg-border-color: none; +} + .rdg-row-even { --rdg-background-color: rgba(0, 0, 0, 0.1); } diff --git a/src/view/app/Query/query.css b/src/view/app/Query/query.css index 37805b6f..5698ca13 100644 --- a/src/view/app/Query/query.css +++ b/src/view/app/Query/query.css @@ -13,6 +13,15 @@ } +.r104f42s700-beta13:not(.rdg-light) { + --rdg-background-color: inherit; + --rdg-header-background-color: var(--vscode-editorWidget-background); + --rdg-row-hover-background-color: rgba(0, 0, 0, 0.2); + --rdg-row-selected-background-color: var(--vscode-list-inactiveSelectionBackground); + --rdg-checkbox-color: inherit; + --rdg-border-color: none; +} + .c1wupbe700-beta13 { padding-inline: 4px; } @@ -109,4 +118,4 @@ body.vscode-dark .rdg-row-even { .font-size-small { font-size: 1em; -} +} \ No newline at end of file From bacf16713857c4cb1bf6704b6648c484b4f6f093 Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Mon, 14 Oct 2024 12:46:04 +0300 Subject: [PATCH 23/61] version changes --- openedge-project.json | 2 +- package-lock.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openedge-project.json b/openedge-project.json index eeee8199..f7437ce3 100644 --- a/openedge-project.json +++ b/openedge-project.json @@ -1,7 +1,7 @@ { "name": "pro-bro", "version": "1.0", - "oeversion": "12.6", + "oeversion": "12.8", "graphicalMode": false, "charset": "utf-8", "extraParameters": "", diff --git a/package-lock.json b/package-lock.json index af1d9899..19038eed 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pro-bro", - "version": "1.5.2", + "version": "1.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pro-bro", - "version": "1.5.2", + "version": "1.7.0", "dependencies": { "@emotion/react": "^11.10.0", "@emotion/styled": "^11.10.0", From 5d710cde38897db7230c83232d3b3c089d5dc886 Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Tue, 22 Oct 2024 17:37:20 +0300 Subject: [PATCH 24/61] Update button disabled for read only db --- src/view/app/Query/Update/update.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/view/app/Query/Update/update.tsx b/src/view/app/Query/Update/update.tsx index 41d7ae23..a29892a1 100644 --- a/src/view/app/Query/Update/update.tsx +++ b/src/view/app/Query/Update/update.tsx @@ -318,6 +318,7 @@ const UpdatePopup: React.FC = ({ setOpen(false); updateRecord(); }} + disabled={isReadOnly === true ? true : false} > UPDATE From 0b14fdb7ad26f549cd17aaf988af17853f352fe9 Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Wed, 23 Oct 2024 00:05:27 +0300 Subject: [PATCH 25/61] Fixing argument strings with extra quotation marks and enabling shell scripts --- src/treeview/DbConnectionNode.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/treeview/DbConnectionNode.ts b/src/treeview/DbConnectionNode.ts index 81ec95b9..2724c5b8 100644 --- a/src/treeview/DbConnectionNode.ts +++ b/src/treeview/DbConnectionNode.ts @@ -154,7 +154,13 @@ export class DbConnectionNode implements INode { ) { const dlc = Constants.dlc; // Spawn the child process to execute the .bat script - const child = spawn(scriptPath, [dlc, procedureName, dbContent]); + const child = spawn( + scriptPath, + [`${dlc}`, `"${procedureName}"`, `"${dbContent}"`], + { + shell: true, + } + ); // Listen for data from the .bat script (if needed) child.stdout.on('data', (data) => { From f78009c21b503bbbd5bec4bf87a9f31112590ae3 Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Wed, 23 Oct 2024 10:08:57 +0300 Subject: [PATCH 26/61] removed template literal for dlc argument --- src/treeview/DbConnectionNode.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/treeview/DbConnectionNode.ts b/src/treeview/DbConnectionNode.ts index 2724c5b8..6c17237c 100644 --- a/src/treeview/DbConnectionNode.ts +++ b/src/treeview/DbConnectionNode.ts @@ -156,7 +156,7 @@ export class DbConnectionNode implements INode { // Spawn the child process to execute the .bat script const child = spawn( scriptPath, - [`${dlc}`, `"${procedureName}"`, `"${dbContent}"`], + [dlc, `"${procedureName}"`, `"${dbContent}"`], { shell: true, } From 71b87f5d74777fcd013a276ad3536cdc871e6ca2 Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Wed, 23 Oct 2024 15:31:40 +0300 Subject: [PATCH 27/61] icons appear beside db in extension dev --- package-lock.json | 236 +++++++++++++++++++++++++++++++++++++++++++++- package.json | 3 +- webpack.config.js | 8 ++ 3 files changed, 241 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index af1d9899..34d5d934 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pro-bro", - "version": "1.5.2", + "version": "1.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pro-bro", - "version": "1.5.2", + "version": "1.7.0", "dependencies": { "@emotion/react": "^11.10.0", "@emotion/styled": "^11.10.0", @@ -43,6 +43,7 @@ "@typescript-eslint/parser": "^5.21.0", "@vscode/test-electron": "^2.1.3", "babel-jest": "^29.4.3", + "copy-webpack-plugin": "^12.0.2", "css-loader": "^6.7.1", "eslint": "^8.14.0", "eslint-plugin-react": "^7.33.2", @@ -3452,6 +3453,19 @@ "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==", "dev": true }, + "node_modules/@sindresorhus/merge-streams": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/merge-streams/-/merge-streams-2.3.0.tgz", + "integrity": "sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@sinonjs/commons": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz", @@ -4314,6 +4328,48 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ajv-formats": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ajv-formats/node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, "node_modules/ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", @@ -5144,6 +5200,145 @@ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==" }, + "node_modules/copy-webpack-plugin": { + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-12.0.2.tgz", + "integrity": "sha512-SNwdBeHyII+rWvee/bTnAYyO8vfVdcSTud4EIb6jcZ8inLeWucJE0DnxXQBjlQ5zlteuuvooGQy3LIyGxhvlOA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-glob": "^3.3.2", + "glob-parent": "^6.0.1", + "globby": "^14.0.0", + "normalize-path": "^3.0.0", + "schema-utils": "^4.2.0", + "serialize-javascript": "^6.0.2" + }, + "engines": { + "node": ">= 18.12.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + }, + "peerDependencies": { + "webpack": "^5.1.0" + } + }, + "node_modules/copy-webpack-plugin/node_modules/ajv": { + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/copy-webpack-plugin/node_modules/ajv-keywords": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz", + "integrity": "sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3" + }, + "peerDependencies": { + "ajv": "^8.8.2" + } + }, + "node_modules/copy-webpack-plugin/node_modules/globby": { + "version": "14.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-14.0.2.tgz", + "integrity": "sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sindresorhus/merge-streams": "^2.1.0", + "fast-glob": "^3.3.2", + "ignore": "^5.2.4", + "path-type": "^5.0.0", + "slash": "^5.1.0", + "unicorn-magic": "^0.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/copy-webpack-plugin/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/copy-webpack-plugin/node_modules/path-type": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-5.0.0.tgz", + "integrity": "sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/copy-webpack-plugin/node_modules/schema-utils": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-4.2.0.tgz", + "integrity": "sha512-L0jRsrPpjdckP3oPug3/VxNKt2trR8TcabrM6FOAAlvC/9Phcmm+cuAgTlxBqdBR1WJx7Naj9WHw+aOmheSVbw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json-schema": "^7.0.9", + "ajv": "^8.9.0", + "ajv-formats": "^2.1.1", + "ajv-keywords": "^5.1.0" + }, + "engines": { + "node": ">= 12.13.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/copy-webpack-plugin/node_modules/serialize-javascript": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz", + "integrity": "sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "randombytes": "^2.1.0" + } + }, + "node_modules/copy-webpack-plugin/node_modules/slash": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-5.1.0.tgz", + "integrity": "sha512-ZA6oR3T/pEyuqwMgAKT0/hAv8oAXckzbkmR0UkUosQ+Mc4RxGoJkRmwHgHufaenlyAgE1Mxgpdcrf75y6XcnDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/core-js-compat": { "version": "3.31.1", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.31.1.tgz", @@ -6264,10 +6459,11 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, + "license": "MIT", "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", @@ -6302,6 +6498,13 @@ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true }, + "node_modules/fast-uri": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.3.tgz", + "integrity": "sha512-aLrHthzCjH5He4Z2H9YZ+v6Ujb9ocRuW6ZzkJQOrTxleEijANq4v1TsaPaVG1PZcuurEzrLcWRyYBYXD5cEiaw==", + "dev": true, + "license": "BSD-3-Clause" + }, "node_modules/fastest-levenshtein": { "version": "1.0.16", "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.16.tgz", @@ -11553,6 +11756,16 @@ "node": ">=0.10.0" } }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/resolve": { "version": "1.22.2", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", @@ -12718,6 +12931,19 @@ "node": ">=4" } }, + "node_modules/unicorn-magic": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/unicorn-magic/-/unicorn-magic-0.1.0.tgz", + "integrity": "sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/unified": { "version": "10.1.2", "resolved": "https://registry.npmjs.org/unified/-/unified-10.1.2.tgz", diff --git a/package.json b/package.json index e0525cfb..6e0dda58 100644 --- a/package.json +++ b/package.json @@ -370,6 +370,7 @@ "@typescript-eslint/parser": "^5.21.0", "@vscode/test-electron": "^2.1.3", "babel-jest": "^29.4.3", + "copy-webpack-plugin": "^12.0.2", "css-loader": "^6.7.1", "eslint": "^8.14.0", "eslint-plugin-react": "^7.33.2", @@ -406,4 +407,4 @@ "reactjs-popup": "^2.0.5", "uuid": "^9.0.0" } -} \ No newline at end of file +} diff --git a/webpack.config.js b/webpack.config.js index 0685ed4a..168a5bd1 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -1,6 +1,7 @@ const path = require('path'); const HtmlWebpackPlugin = require('html-webpack-plugin'); const { resolveTsAliases } = require('resolve-ts-aliases'); +const CopyWebpackPlugin = require('copy-webpack-plugin'); module.exports = { entry: { @@ -56,6 +57,13 @@ module.exports = { }, ], }, + plugins: [ + new CopyWebpackPlugin({ + patterns: [ + { from: './resources/icon', to: '../../resources/icon' } + ] + }) + ], performance: { hints: false, }, From 4a9058d30228cbf7571f3ebd776e8d7964c5b95b Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Thu, 24 Oct 2024 10:09:20 +0300 Subject: [PATCH 28/61] Fixed boolean value converting to string in json --- src/view/app/Query/Update/update.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/view/app/Query/Update/update.tsx b/src/view/app/Query/Update/update.tsx index a29892a1..336f271e 100644 --- a/src/view/app/Query/Update/update.tsx +++ b/src/view/app/Query/Update/update.tsx @@ -233,8 +233,8 @@ const UpdatePopup: React.FC = ({ data: submitData, mode: ProcessAction[action], minTime: 0, - useWriteTriggers: useWriteTriggers, - useDeleteTriggers: useDeleteTriggers, + useWriteTriggers: Boolean(useWriteTriggers), + useDeleteTriggers: Boolean(useDeleteTriggers), }, }; From 28a2a00f703a6e7c8344c0df09515a397e39d126 Mon Sep 17 00:00:00 2001 From: "Erik.Klusovskij" Date: Thu, 24 Oct 2024 15:56:55 +0300 Subject: [PATCH 29/61] Support for multiple installed OE installations --- resources/oe/scripts/oe.bat | 2 +- src/common/OpenEdgeJsonReaded.ts | 7 +++++ src/db/OeClient.ts | 3 ++ src/extension.ts | 47 ++++++++++++++++++++++---------- 4 files changed, 43 insertions(+), 16 deletions(-) diff --git a/resources/oe/scripts/oe.bat b/resources/oe/scripts/oe.bat index 885f9f23..9d94a303 100644 --- a/resources/oe/scripts/oe.bat +++ b/resources/oe/scripts/oe.bat @@ -1,6 +1,6 @@ @echo off -if "%DLC%"=="" set DLC=%7 +if not "%~7"=="" set DLC=%~7 if exist "%DLC%"\promsgs goto BIN echo DLC environment variable not set correctly - Please set DLC variable goto END diff --git a/src/common/OpenEdgeJsonReaded.ts b/src/common/OpenEdgeJsonReaded.ts index 2666c26e..2b38e1aa 100644 --- a/src/common/OpenEdgeJsonReaded.ts +++ b/src/common/OpenEdgeJsonReaded.ts @@ -12,6 +12,13 @@ export function readFile(fileName: string): string { return allFileContents; } +export function getOEVersion(fileContent: string){ + const data = JSON.parse(fileContent); + const {oeversion} = data; + + return oeversion; +} + export function parseOEFile(fileContent: string, filePath: string) { const data = JSON.parse(fileContent); const { name, dbConnections } = data; diff --git a/src/db/OeClient.ts b/src/db/OeClient.ts index b16b8a70..218d3266 100644 --- a/src/db/OeClient.ts +++ b/src/db/OeClient.ts @@ -162,6 +162,9 @@ class OEClient { ) { this.procFinish(dataString); } + else if (dataString.startsWith( 'DLC environment variable not set correctly ')){ + vscode.window.showErrorMessage(dataString); + } }); this.proc.stderr.on('data', (data) => { diff --git a/src/extension.ts b/src/extension.ts index 907845d8..86ea924a 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -11,7 +11,7 @@ import { TableNode } from './treeview/TableNode'; import { TablesListProvider } from './treeview/TablesListProvider'; import { DbConnectionUpdater } from './treeview/DbConnectionUpdater'; import { IPort, IConfig } from './view/app/model'; -import { readFile, parseOEFile } from './common/OpenEdgeJsonReaded'; +import { readFile, getOEVersion, parseOEFile } from './common/OpenEdgeJsonReaded'; import { VersionChecker } from './view/app/Welcome/VersionChecker'; import { WelcomePageProvider } from './webview/WelcomePageProvider'; @@ -19,7 +19,7 @@ import { AblHoverProvider } from './providers/AblHoverProvider'; import { queryEditorCache } from './webview/queryEditor/queryEditorCache'; import { FavoritesProvider } from './treeview/FavoritesProvider'; -export function activate(context: vscode.ExtensionContext) { +export async function activate(context: vscode.ExtensionContext) { let extensionPort: number; Constants.context = context; @@ -122,23 +122,40 @@ export function activate(context: vscode.ExtensionContext) { ); context.subscriptions.push(indexes); - const oeRuntimes: Array = - vscode.workspace - .getConfiguration('abl.configuration') - .get>('runtimes') ?? []; + const ablConfig = vscode.workspace.getConfiguration('abl.configuration'); + const defaultRuntimeName = ablConfig.get('defaultRuntime'); + const oeRuntimes: Array = ablConfig.get>('runtimes') ?? []; - if (oeRuntimes.length === 0) { - vscode.window.showWarningMessage( - 'No OpenEdge runtime configured on this machine' - ); + const oejRuntimeName = await vscode.workspace.findFiles('openedge-project.json').then((files) => { + if (files.length > 0) { + return getOEJRuntime(files[0]); + } else { + vscode.window.showWarningMessage('No openedge-project.json file found at the root.'); + return null; + } + }); + + function getOEJRuntime (uri: vscode.Uri) + { + allFileContent = readFile(uri.path); + const oeRuntime = getOEVersion(allFileContent); + return oeRuntime; + } + + let defaultRuntime; + if (Array.isArray(oeRuntimes) && oeRuntimes.length > 0) { + defaultRuntime = + oeRuntimes.some((runtime) => runtime.name === oejRuntimeName) + ? oeRuntimes.find((runtime) => runtime.name === oejRuntimeName) + : oeRuntimes.find((runtime) => runtime.name === defaultRuntimeName) || oeRuntimes[0]; + } else { + vscode.window.showWarningMessage('No OpenEdge runtime configured on this machine.'); + defaultRuntime = null; } - const defaultRuntime = - oeRuntimes.length === 1 - ? oeRuntimes[0] - : oeRuntimes.find((runtime) => runtime.default); - if (defaultRuntime !== undefined) { + if (defaultRuntime !== null) { Constants.dlc = defaultRuntime.path; + vscode.window.showInformationMessage(`Runtime selected : ${defaultRuntime.name}, Path: ${defaultRuntime.path}`); } let importConnections = vscode.workspace From a1b0809748835221d333c26b8baf3f4573e541ef Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Thu, 24 Oct 2024 16:42:35 +0300 Subject: [PATCH 30/61] Fix for bad query error bug --- src/view/app/Query/query.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/view/app/Query/query.tsx b/src/view/app/Query/query.tsx index b7215466..586d02c0 100644 --- a/src/view/app/Query/query.tsx +++ b/src/view/app/Query/query.tsx @@ -184,7 +184,10 @@ function QueryForm({ tableData, tableName, isReadOnly }: IConfigProps) { description: message.data.description, trace: message.data.trace, }); + setIsDataRetrieved(false); + + return; } else if (message.data.columns.length !== columns.length) { const fontSize = +window .getComputedStyle( @@ -210,6 +213,7 @@ function QueryForm({ tableData, tableName, isReadOnly }: IConfigProps) { setColumns([SelectColumn, ...message.data.columns]); if (message.columns !== undefined) { setSelectedColumns([...message.columns]); + } else { setSelectedColumns([ ...message.data.columns.map((column) => column.name), From 80aa0ed01f7c36bcda97d14d0fc60c717f35df59 Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Fri, 25 Oct 2024 10:31:45 +0300 Subject: [PATCH 31/61] Fixed pro-bro setting boolean values --- package.json | 10 +++++----- src/view/app/Query/Update/update.tsx | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index e0525cfb..ce50d4a0 100644 --- a/package.json +++ b/package.json @@ -79,17 +79,17 @@ }, "pro-bro.importConnections": { "type": "boolean", - "default": "true", + "default": true, "markdownDescription": "Import connections from openedge-project.json" }, "pro-bro.useWriteTriggers": { "type": "boolean", - "default": "true", + "default": true, "markdownDescription": "Use write triggers" }, "pro-bro.useDeleteTriggers": { "type": "boolean", - "default": "true", + "default": true, "markdownDescription": "Use delete triggers" }, "pro-bro.tempfiles": { @@ -98,7 +98,7 @@ }, "pro-bro.filterAsYouType": { "type": "boolean", - "default": "true", + "default": true, "markdownDescription": "Use filter as you type" }, "pro-bro.logging.react": { @@ -115,7 +115,7 @@ }, "pro-bro.development.useNewDbClient": { "type": "boolean", - "default": "false", + "default": false, "markdownDescription": "Use New DB Client implementation" }, "pro-bro.gridTextSize": { diff --git a/src/view/app/Query/Update/update.tsx b/src/view/app/Query/Update/update.tsx index 336f271e..19b58af4 100644 --- a/src/view/app/Query/Update/update.tsx +++ b/src/view/app/Query/Update/update.tsx @@ -66,8 +66,8 @@ const UpdatePopup: React.FC = ({ isWindowSmall, }) => { const configuration = getVSCodeConfiguration(); - const defaultWriteTrigger = configuration.useWriteTriggers ?? true; - const defaultDeleteTrigger = configuration.useDeleteTriggers ?? true; + const defaultWriteTrigger = configuration.useWriteTriggers; + const defaultDeleteTrigger = configuration.useDeleteTriggers; const [useWriteTriggers, setUseWriteTriggers] = useState(defaultWriteTrigger); @@ -233,8 +233,8 @@ const UpdatePopup: React.FC = ({ data: submitData, mode: ProcessAction[action], minTime: 0, - useWriteTriggers: Boolean(useWriteTriggers), - useDeleteTriggers: Boolean(useDeleteTriggers), + useWriteTriggers: useWriteTriggers, + useDeleteTriggers: useDeleteTriggers, }, }; From d572103bb0abaf55cab3dac7cc9331cb0b4e92f8 Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Fri, 25 Oct 2024 21:31:18 +0300 Subject: [PATCH 32/61] fixed oeCore.i not found by child process --- src/repo/client/local/LocalClient.ts | 7 ++++++- src/view/app/Query/Update/update.tsx | 8 +++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/repo/client/local/LocalClient.ts b/src/repo/client/local/LocalClient.ts index 402496bf..c83ec364 100644 --- a/src/repo/client/local/LocalClient.ts +++ b/src/repo/client/local/LocalClient.ts @@ -124,6 +124,10 @@ export class LocalClient extends AClient implements IClient { this.pfFilePath, ]; + protected readonly windowsOptions = { + cwd: path.join(Constants.context.extensionPath, 'resources', 'oe'), + }; + protected async startAndListen(): Promise { return this.start() .then(() => { @@ -149,7 +153,8 @@ export class LocalClient extends AClient implements IClient { case 'win32': this.proc = cp.spawn( this.windowsProPath, - this.windowsConnectionString + this.windowsConnectionString, + this.windowsOptions ); break; default: diff --git a/src/view/app/Query/Update/update.tsx b/src/view/app/Query/Update/update.tsx index 19b58af4..b9d2a5bd 100644 --- a/src/view/app/Query/Update/update.tsx +++ b/src/view/app/Query/Update/update.tsx @@ -233,8 +233,8 @@ const UpdatePopup: React.FC = ({ data: submitData, mode: ProcessAction[action], minTime: 0, - useWriteTriggers: useWriteTriggers, - useDeleteTriggers: useDeleteTriggers, + useWriteTriggers, + useDeleteTriggers, }, }; @@ -318,7 +318,9 @@ const UpdatePopup: React.FC = ({ setOpen(false); updateRecord(); }} - disabled={isReadOnly === true ? true : false} + disabled={ + isReadOnly === true ? true : false + } > UPDATE From 7137fe1119952dc6db6018fb4e1865171285a82d Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Sat, 26 Oct 2024 17:20:37 +0300 Subject: [PATCH 33/61] Fix refresh button bug --- src/treeview/DbConnectionUpdater.ts | 99 +++++++++++++++++++++-------- 1 file changed, 71 insertions(+), 28 deletions(-) diff --git a/src/treeview/DbConnectionUpdater.ts b/src/treeview/DbConnectionUpdater.ts index 45a966b3..f6c89e95 100644 --- a/src/treeview/DbConnectionUpdater.ts +++ b/src/treeview/DbConnectionUpdater.ts @@ -28,8 +28,8 @@ export class DbConnectionUpdater { private async updateWorkStateStatuses() { const connections = this.context.workspaceState.get<{ - [id: string]: IConfig; - }>('pro-bro.dbconfig'); + [id: string]: IConfig; + }>('pro-bro.dbconfig'); if (!connections || Object.keys(connections).length === 0) { this.callback.refresh(); @@ -41,9 +41,10 @@ export class DbConnectionUpdater { this.updateWorkStateStatus(connections); await this.wait(); - const data = await ProcessorFactory.getProcessorInstance().getDBVersion( - connections[id] - ); + const data = + await ProcessorFactory.getProcessorInstance().getDBVersion( + connections[id] + ); if (data instanceof Error || 'error' in data) { connections[id].conStatus = ConnectionStatus.NotConnected; @@ -54,15 +55,47 @@ export class DbConnectionUpdater { } } + public async updateSingleWorkStateStatus(connectionId: string) { + const connections = this.context.workspaceState.get<{ + [id: string]: IConfig; + }>('pro-bro.dbconfig'); + if (!connections || !connections[connectionId]) { + return; + } + + connections[connectionId].conStatus = ConnectionStatus.Connecting; + this.updateWorkStateStatus(connections); + await this.wait(); + + try { + const data = + await ProcessorFactory.getProcessorInstance().getDBVersion( + connections[connectionId] + ); + + if (data instanceof Error || 'error' in data) { + connections[connectionId].conStatus = + ConnectionStatus.NotConnected; + } else { + connections[connectionId].conStatus = + ConnectionStatus.Connected; + } + } catch (error) { + connections[connectionId].conStatus = ConnectionStatus.NotConnected; + } finally { + this.updateWorkStateStatus(connections); + } + } + private updateWorkStateStatus(connections: { [id: string]: IConfig }) { this.context.workspaceState.update('pro-bro.dbconfig', connections); this.callback.refresh(); } private async updateStatuses() { - const connections = this.context.globalState.get<{ [id: string]: IConfig }>( - 'pro-bro.dbconfig' - ); + const connections = this.context.globalState.get<{ + [id: string]: IConfig; + }>('pro-bro.dbconfig'); if (!connections || Object.keys(connections).length === 0) { this.callback.refresh(); @@ -74,9 +107,10 @@ export class DbConnectionUpdater { this.updateStatus(connections); await this.wait(); - const data = await ProcessorFactory.getProcessorInstance().getDBVersion( - connections[id] - ); + const data = + await ProcessorFactory.getProcessorInstance().getDBVersion( + connections[id] + ); if (data instanceof Error || 'error' in data) { connections[id].conStatus = ConnectionStatus.NotConnected; @@ -94,39 +128,49 @@ export class DbConnectionUpdater { ) { this.context = context; this.callback = callback; - + try { if (this.locked === false) { this.locked = true; - await this.updateSingleConnectionStatus(connectionId); + + if (this.context.globalState) { + await this.updateSingleConnectionStatus(connectionId); + } + + if (this.context.workspaceState) { + await this.updateSingleWorkStateStatus(connectionId); + } } } finally { this.locked = false; } } - + private async updateSingleConnectionStatus(connectionId: string) { - const connections = this.context.globalState.get<{ [id: string]: IConfig }>( - 'pro-bro.dbconfig' - ); - + const connections = this.context.globalState.get<{ + [id: string]: IConfig; + }>('pro-bro.dbconfig'); + if (!connections || !connections[connectionId]) { return; } - + connections[connectionId].conStatus = ConnectionStatus.Connecting; this.updateStatus(connections); await this.wait(); - + try { - const data = await ProcessorFactory.getProcessorInstance().getDBVersion( - connections[connectionId] - ); - + const data = + await ProcessorFactory.getProcessorInstance().getDBVersion( + connections[connectionId] + ); + if (data instanceof Error || 'error' in data) { - connections[connectionId].conStatus = ConnectionStatus.NotConnected; + connections[connectionId].conStatus = + ConnectionStatus.NotConnected; } else { - connections[connectionId].conStatus = ConnectionStatus.Connected; + connections[connectionId].conStatus = + ConnectionStatus.Connected; } } catch (error) { connections[connectionId].conStatus = ConnectionStatus.NotConnected; @@ -134,13 +178,12 @@ export class DbConnectionUpdater { this.updateStatus(connections); } } - + private updateStatus(connections: { [id: string]: IConfig }) { this.context.globalState.update('pro-bro.dbconfig', connections); this.callback.refresh(); } - private wait(): Promise { return new Promise((resolve) => { setTimeout(() => { From 95fcad7c1acc0c42b04c1ff19e74e4b2fc0b0b81 Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Tue, 29 Oct 2024 07:16:27 +0200 Subject: [PATCH 34/61] Fixing -RO flag to not include any additional flags after it. --- src/view/app/utils/PfParser.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/view/app/utils/PfParser.ts b/src/view/app/utils/PfParser.ts index 19fc2bfe..3860f636 100644 --- a/src/view/app/utils/PfParser.ts +++ b/src/view/app/utils/PfParser.ts @@ -56,11 +56,12 @@ export class PfParser { config.port = keyVal[0].substring(key.length + 1); break; case '-RO': + const ROFlag = keyVal[0].split(/\s+/)[0]; config.isReadOnly = true; if (config.params) { config.params += ' '; } - config.params += keyVal[0]; + config.params += ROFlag; break; default: if (config.params) { From 243233e2e567373a584268c1e67c1ea5ed9da5eb Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Tue, 29 Oct 2024 09:45:10 +0200 Subject: [PATCH 35/61] config change --- .circleci/config.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 305cf558..d257c4cd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,7 +26,16 @@ jobs: steps: - checkout - run: tr ' ' '\n' \<<< "$PROGRESS_CFG_BASE64" | base64 --decode > /psc/dlc/progress.cfg - - run: ant compile + - run: cat /psc/dlc/progress.cfg || echo "Not created" + - run: | + if [ -f "${HOME}/.ant/lib/PCT.jar" ]; then + echo "PCT.jar found in ${HOME}/.ant/lib" + jar tf "${HOME}/.ant/lib/PCT.jar" | head -n 20 # Show first 20 entries + else + echo "Error: PCT.jar not found in ${HOME}/.ant/lib" + exit 1 + fi + - run: ant -verbose compile - run: ant test - persist_to_workspace: root: . From f512f2fc433b00a837c4234b2c3afac648bc7c23 Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Tue, 29 Oct 2024 11:40:17 +0200 Subject: [PATCH 36/61] changes to config --- .circleci/config.yml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d257c4cd..c399aa56 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,16 +26,9 @@ jobs: steps: - checkout - run: tr ' ' '\n' \<<< "$PROGRESS_CFG_BASE64" | base64 --decode > /psc/dlc/progress.cfg - - run: cat /psc/dlc/progress.cfg || echo "Not created" - - run: | - if [ -f "${HOME}/.ant/lib/PCT.jar" ]; then - echo "PCT.jar found in ${HOME}/.ant/lib" - jar tf "${HOME}/.ant/lib/PCT.jar" | head -n 20 # Show first 20 entries - else - echo "Error: PCT.jar not found in ${HOME}/.ant/lib" - exit 1 - fi - - run: ant -verbose compile + - run: printenv + - run: /bin/bash -c "echo $DLC" + - run: ant compile - run: ant test - persist_to_workspace: root: . From 1ac9300d4f3060ae48ee5bbab1120f41b85d85a3 Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Tue, 29 Oct 2024 11:47:02 +0200 Subject: [PATCH 37/61] changing config --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c399aa56..cc5d87a2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,8 +26,7 @@ jobs: steps: - checkout - run: tr ' ' '\n' \<<< "$PROGRESS_CFG_BASE64" | base64 --decode > /psc/dlc/progress.cfg - - run: printenv - - run: /bin/bash -c "echo $DLC" + - run: export DLC=/psc/dlc - run: ant compile - run: ant test - persist_to_workspace: From 3d05d2fbfa16c8c26ae74ef4941738a275d07572 Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Tue, 29 Oct 2024 11:51:09 +0200 Subject: [PATCH 38/61] changing config --- .circleci/config.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index cc5d87a2..532a510e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -26,8 +26,7 @@ jobs: steps: - checkout - run: tr ' ' '\n' \<<< "$PROGRESS_CFG_BASE64" | base64 --decode > /psc/dlc/progress.cfg - - run: export DLC=/psc/dlc - - run: ant compile + - run: DLC=/psc/dlc ant compile - run: ant test - persist_to_workspace: root: . From 7ac928d4501d69cc046b59038e2385359127f901 Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Tue, 29 Oct 2024 12:26:26 +0200 Subject: [PATCH 39/61] changes to config --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 532a510e..f97807ab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,10 +23,14 @@ jobs: test-and-compile-back-end: docker: - image: kherring/oedb:latest + steps: - checkout - run: tr ' ' '\n' \<<< "$PROGRESS_CFG_BASE64" | base64 --decode > /psc/dlc/progress.cfg - - run: DLC=/psc/dlc ant compile + - run: + command: ant compile + environment: + DLC: /psc/dlc - run: ant test - persist_to_workspace: root: . From 5c4dde92ebfbdc5e35f4da62c937569cd5295028 Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Wed, 30 Oct 2024 08:31:26 +0200 Subject: [PATCH 40/61] changes to config --- .circleci/config.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f97807ab..957498d1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,14 +23,13 @@ jobs: test-and-compile-back-end: docker: - image: kherring/oedb:latest + environment: + DLC: /psc/dlc steps: - checkout - run: tr ' ' '\n' \<<< "$PROGRESS_CFG_BASE64" | base64 --decode > /psc/dlc/progress.cfg - - run: - command: ant compile - environment: - DLC: /psc/dlc + - run: ant -Denv.DLC=/psc/dlc compile - run: ant test - persist_to_workspace: root: . From b7d8659751ad81ccf5f9f13ac914296df2d25364 Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Wed, 30 Oct 2024 09:15:58 +0200 Subject: [PATCH 41/61] changed config --- .circleci/config.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 957498d1..abefd864 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -29,7 +29,9 @@ jobs: steps: - checkout - run: tr ' ' '\n' \<<< "$PROGRESS_CFG_BASE64" | base64 --decode > /psc/dlc/progress.cfg - - run: ant -Denv.DLC=/psc/dlc compile + - run: echo $DLC + - run: ls -l /psc/dlc/pct + - run: ant compile - run: ant test - persist_to_workspace: root: . From e8dc26727b8ca90a5c6d6b15cb92551cb0f1508a Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Wed, 30 Oct 2024 09:54:31 +0200 Subject: [PATCH 42/61] changing build.xml --- build.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.xml b/build.xml index 379b0c41..18918689 100644 --- a/build.xml +++ b/build.xml @@ -1,9 +1,9 @@ + classpath="${user.home}/.ant/lib/PCT.jar;/usr/share/ant/lib/PCT.jar;${env.DLC}/pct/PCT.jar" /> + classpath="${user.home}/.ant/lib/PCT.jar;/usr/share/ant/lib/PCT.jar;${env.DLC}/pct/PCT.jar" /> DLC=${env.DLC} From d8c3c5c79d456a5cb04af51ac4a726bc37e740c6 Mon Sep 17 00:00:00 2001 From: pjaskutelis Date: Wed, 30 Oct 2024 10:08:29 +0200 Subject: [PATCH 43/61] reverting config changes --- .circleci/config.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index abefd864..3857697e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,14 +23,10 @@ jobs: test-and-compile-back-end: docker: - image: kherring/oedb:latest - environment: - DLC: /psc/dlc steps: - checkout - run: tr ' ' '\n' \<<< "$PROGRESS_CFG_BASE64" | base64 --decode > /psc/dlc/progress.cfg - - run: echo $DLC - - run: ls -l /psc/dlc/pct - run: ant compile - run: ant test - persist_to_workspace: From d62269bf998f17d03ae9b4db38814393a8b5739e Mon Sep 17 00:00:00 2001 From: "Erik.Klusovskij" Date: Wed, 30 Oct 2024 11:14:55 +0200 Subject: [PATCH 44/61] Fixed vscode error message when Client fails to initialize with missing _progres executable. --- resources/oe/scripts/oe.bat | 4 ++-- resources/oe/scripts/oe.sh | 5 +++++ src/db/OeClient.ts | 20 +++++++++++++++++--- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/resources/oe/scripts/oe.bat b/resources/oe/scripts/oe.bat index 958ad463..2445e32d 100644 --- a/resources/oe/scripts/oe.bat +++ b/resources/oe/scripts/oe.bat @@ -1,8 +1,8 @@ @echo off if not "%~7"=="" set DLC=%~7 -if exist "%DLC%"\promsgs goto BIN - echo DLC environment variable not set correctly - Please set DLC variable +if exist %DLC%\bin\_progres goto BIN + echo Failed to initialize client: _progres executable is missing in %DLC%\bin. goto END :BIN diff --git a/resources/oe/scripts/oe.sh b/resources/oe/scripts/oe.sh index 29872818..1e6205ce 100755 --- a/resources/oe/scripts/oe.sh +++ b/resources/oe/scripts/oe.sh @@ -13,6 +13,11 @@ export PROSTARTUP=$called_path/oe.pf export PROPATH=$PROPATH:$parent_path +if [ -z "$DLC" ] || [ ! -f "$DLC/bin/_progres" ]; then + echo "Failed to initialize client: _progres executable is missing in $DLC/bin." + exit 1 +fi + PROEXE=${PROEXE-$DLC/bin/_progres} # set the Progress shared lib environment diff --git a/src/db/OeClient.ts b/src/db/OeClient.ts index 218d3266..9626bd24 100644 --- a/src/db/OeClient.ts +++ b/src/db/OeClient.ts @@ -58,6 +58,11 @@ class OEClient { console.log('V1: OE Client initialized'); return this; + }) + .catch((err) => { + return new Promise(() => { + throw new Error(err); + }); }); } @@ -162,8 +167,10 @@ class OEClient { ) { this.procFinish(dataString); } - else if (dataString.startsWith( 'DLC environment variable not set correctly ')){ - vscode.window.showErrorMessage(dataString); + else if (dataString.startsWith('Failed to initialize client:')){ + return this.procFinish(new Promise(() => { + throw new Error(dataString); + })); } }); @@ -222,7 +229,14 @@ async function getOEClient(): Promise { }); } client = new OEClient(port, host); - return client.init(); + + try { + return await client.init(); + } catch (err : any) { + return new Promise(() => { + throw new Error(err.message); + }); + } } return Promise.resolve(client); } From 6e3b58361c287891f0dcc9e895f52ef7610fd1ae Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Wed, 30 Oct 2024 11:56:57 +0200 Subject: [PATCH 45/61] modal update --- src/view/app/Query/Export/export.css | 9 +++-- src/view/app/Query/Export/export.tsx | 44 +++++++++++++++++++- src/view/app/Query/Update/update.css | 60 +++++++++++++++------------- src/view/app/Query/Update/update.tsx | 50 +++++++++++++++++++++-- 4 files changed, 129 insertions(+), 34 deletions(-) diff --git a/src/view/app/Query/Export/export.css b/src/view/app/Query/Export/export.css index a135e633..245c72ca 100644 --- a/src/view/app/Query/Export/export.css +++ b/src/view/app/Query/Export/export.css @@ -3,12 +3,15 @@ width: 250px; height: 210px; background-color: var(--vscode-notifications-background); - border: var(--vscode-notifications-border); justify-content: center; align-items:center; font-size: inherit; font-style: inherit; - margin: auto; + cursor: grab; + border: 1px solid var(--vscode-notifications-foreground); + padding: 5px; + margin: 5px; + border-radius: 5px; } .menu { @@ -41,7 +44,7 @@ } .popup-overlay { - background: rgba(0, 0, 0, 0.3); + background: rgba(0, 0, 0, 0.5); z-index: 997 !important; pointer-events: none !important; display: none; diff --git a/src/view/app/Query/Export/export.tsx b/src/view/app/Query/Export/export.tsx index 1710ba94..82a178af 100644 --- a/src/view/app/Query/Export/export.tsx +++ b/src/view/app/Query/Export/export.tsx @@ -25,6 +25,10 @@ export default function ExportPopup({ selectedRows, isWindowSmall, }) { + + const [position, setPosition] = React.useState({ x: 0, y: 0 }); + const [dragging, setDragging] = React.useState(false); + const [offset, setOffset] = React.useState({ x: 0, y: 0 }); const [exportFormat, setExportFormat] = React.useState('dumpFile'); const [radioSelection, setRadioSelection] = React.useState( Object.keys(DataToExport).filter((key) => Number.isNaN(+key))[0] @@ -35,6 +39,28 @@ export default function ExportPopup({ const logger = new Logger(logValue); const vscode = getVSCodeAPI(); + + const handleMouseDown = (e: React.MouseEvent) => { + setDragging(true); + setOffset({ + x: e.clientX - position.x, + y: e.clientY - position.y, + }); + }; + + const handleMouseMove = (e: globalThis.MouseEvent) => { + if (dragging) { + setPosition({ + x: e.clientX - offset.x, + y: e.clientY - offset.y, + }); + } + }; + + const handleMouseUp = () => { + setDragging(false); + }; + function handleChange({ currentTarget, }: React.ChangeEvent) { @@ -144,6 +170,16 @@ export default function ExportPopup({ }; }, []); + React.useEffect(() => { + window.addEventListener('mousemove', handleMouseMove as EventListener); + window.addEventListener('mouseup', handleMouseUp as EventListener); + + return () => { + window.removeEventListener('mousemove', handleMouseMove as EventListener); + window.removeEventListener('mouseup', handleMouseUp as EventListener); + }; + }, [dragging, offset]); + return ( {(close) => ( -
+
Export to {exportFormat}
Select export format: diff --git a/src/view/app/Query/Update/update.css b/src/view/app/Query/Update/update.css index 5806f874..aaae3511 100644 --- a/src/view/app/Query/Update/update.css +++ b/src/view/app/Query/Update/update.css @@ -1,41 +1,47 @@ .update-modal { - top: 50px; - background-color: var(--vscode-notifications-background); - border: var(--vscode-notifications-border); - justify-content: center; - align-items:center; - font-size: inherit; - font-style: inherit; - max-height: 85%; - height: fit-content; - width:auto; - box-sizing: border-box; - display: flex; - flex-direction: column; - overflow: hidden; - align-self: center; - position: fixed; - - } + top: 50px; + background-color: var(--vscode-notifications-background); + justify-content: center; + align-items: center; + font-size: inherit; + font-style: inherit; + max-height: 85%; + height: fit-content; + width: auto; + box-sizing: border-box; + display: flex; + flex-direction: column; + overflow: hidden; + align-self: center; + position: fixed; + cursor: grab; + border: 1px solid var(--vscode-editor-foreground); + background-color: var(--vscode-editorWidget-background); + padding: 5px; + margin: 5px; + border-radius: 5px; - .update-btn-container { - bottom: 0; - width: 100%; - text-align: center; - padding: 5px; +} + +.update-btn-container { + bottom: 0; + width: 100%; + text-align: center; + padding: 5px; } .body { - margin:5px; + margin: 5px; /* max-height: 70%; */ - overflow-y:scroll; + overflow-y: scroll; + border-radius: 5px; } .update-header { background-color: var(--vscode-notificationCenterHeader-background); width: 100%; height: 30px; - text-align:justify; + text-align: justify; font-size: 16px; font-weight: bold; padding: 5px; @@ -47,7 +53,7 @@ } .popup-overlay { - background: rgba(0, 0, 0, 0.3); + background: rgba(0, 0, 0, 0.5); } .popup-content { diff --git a/src/view/app/Query/Update/update.tsx b/src/view/app/Query/Update/update.tsx index a29892a1..43861ed1 100644 --- a/src/view/app/Query/Update/update.tsx +++ b/src/view/app/Query/Update/update.tsx @@ -2,7 +2,8 @@ import { CommandAction, ICommand, ProcessAction } from '../../model'; import './update.css'; import { Logger } from '../../../../common/Logger'; import { getVSCodeAPI, getVSCodeConfiguration } from '@utils/vscode'; -import { Fragment, MouseEvent, ReactNode, useState } from 'react'; +import { Fragment, MouseEvent, ReactNode, useEffect, useState } from 'react'; + import { ProBroButton } from '@assets/button'; import AddIcon from '@mui/icons-material/AddTwoTone'; import DeleteIcon from '@mui/icons-material/DeleteTwoTone'; @@ -69,6 +70,10 @@ const UpdatePopup: React.FC = ({ const defaultWriteTrigger = configuration.useWriteTriggers ?? true; const defaultDeleteTrigger = configuration.useDeleteTriggers ?? true; + const [position, setPosition] = useState({ x: 0, y: 0 }); + const [dragging, setDragging] = useState(false); + const [offset, setOffset] = useState({ x: 0, y: 0 }); + const [useWriteTriggers, setUseWriteTriggers] = useState(defaultWriteTrigger); const [useDeleteTriggers, setUseDeleteTriggers] = @@ -82,6 +87,27 @@ const UpdatePopup: React.FC = ({ valueType: string; }[] = []; + const handleMouseDown = (e: React.MouseEvent) => { + setDragging(true); + setOffset({ + x: e.clientX - position.x, + y: e.clientY - position.y, + }); + }; + + const handleMouseMove = (e: globalThis.MouseEvent) => { + if (dragging) { + setPosition({ + x: e.clientX - offset.x, + y: e.clientY - offset.y, + }); + } + }; + + const handleMouseUp = () => { + setDragging(false); + }; + const processRecord = (mode: ProcessAction) => { setAction(mode); const rowids: string[] = []; @@ -259,11 +285,27 @@ const UpdatePopup: React.FC = ({ } }; + useEffect(() => { + window.addEventListener('mousemove', handleMouseMove as EventListener); + window.addEventListener('mouseup', handleMouseUp as EventListener); + + return () => { + window.removeEventListener('mousemove', handleMouseMove as EventListener); + window.removeEventListener('mouseup', handleMouseUp as EventListener); + }; + }, [dragging, offset]); + return ( setOpen(false)} modal> {(close) => ( -
+
{tableName}, {ProcessAction[action]}
@@ -318,7 +360,9 @@ const UpdatePopup: React.FC = ({ setOpen(false); updateRecord(); }} - disabled={isReadOnly === true ? true : false} + disabled={ + isReadOnly === true ? true : false + } > UPDATE From 7a4832ac9369eef226726c24a6f40c9161938e22 Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Wed, 30 Oct 2024 12:01:22 +0200 Subject: [PATCH 46/61] pipeline fail fix --- build.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.xml b/build.xml index 379b0c41..18918689 100644 --- a/build.xml +++ b/build.xml @@ -1,9 +1,9 @@ + classpath="${user.home}/.ant/lib/PCT.jar;/usr/share/ant/lib/PCT.jar;${env.DLC}/pct/PCT.jar" /> + classpath="${user.home}/.ant/lib/PCT.jar;/usr/share/ant/lib/PCT.jar;${env.DLC}/pct/PCT.jar" /> DLC=${env.DLC} From 39b360f441d07edafeda93ce8bf68a9594b61d77 Mon Sep 17 00:00:00 2001 From: "Erik.Klusovskij" Date: Wed, 30 Oct 2024 13:35:41 +0200 Subject: [PATCH 47/61] fixing bat not able to find _progres executable. --- resources/oe/scripts/oe.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/oe/scripts/oe.bat b/resources/oe/scripts/oe.bat index 2445e32d..6fa5d9aa 100644 --- a/resources/oe/scripts/oe.bat +++ b/resources/oe/scripts/oe.bat @@ -1,7 +1,7 @@ @echo off if not "%~7"=="" set DLC=%~7 -if exist %DLC%\bin\_progres goto BIN +if exist %DLC%\bin\_progres.exe goto BIN echo Failed to initialize client: _progres executable is missing in %DLC%\bin. goto END From 0efb7bc603d8fa95e6f6e64d805d0877fd078016 Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Thu, 31 Oct 2024 14:16:26 +0200 Subject: [PATCH 48/61] code refactor --- src/treeview/DbConnectionUpdater.ts | 58 ++++++++++------------------- 1 file changed, 20 insertions(+), 38 deletions(-) diff --git a/src/treeview/DbConnectionUpdater.ts b/src/treeview/DbConnectionUpdater.ts index f6c89e95..282c5bdc 100644 --- a/src/treeview/DbConnectionUpdater.ts +++ b/src/treeview/DbConnectionUpdater.ts @@ -55,38 +55,6 @@ export class DbConnectionUpdater { } } - public async updateSingleWorkStateStatus(connectionId: string) { - const connections = this.context.workspaceState.get<{ - [id: string]: IConfig; - }>('pro-bro.dbconfig'); - if (!connections || !connections[connectionId]) { - return; - } - - connections[connectionId].conStatus = ConnectionStatus.Connecting; - this.updateWorkStateStatus(connections); - await this.wait(); - - try { - const data = - await ProcessorFactory.getProcessorInstance().getDBVersion( - connections[connectionId] - ); - - if (data instanceof Error || 'error' in data) { - connections[connectionId].conStatus = - ConnectionStatus.NotConnected; - } else { - connections[connectionId].conStatus = - ConnectionStatus.Connected; - } - } catch (error) { - connections[connectionId].conStatus = ConnectionStatus.NotConnected; - } finally { - this.updateWorkStateStatus(connections); - } - } - private updateWorkStateStatus(connections: { [id: string]: IConfig }) { this.context.workspaceState.update('pro-bro.dbconfig', connections); this.callback.refresh(); @@ -134,11 +102,11 @@ export class DbConnectionUpdater { this.locked = true; if (this.context.globalState) { - await this.updateSingleConnectionStatus(connectionId); + await this.updateSingleStatus(connectionId, 'globalState'); } if (this.context.workspaceState) { - await this.updateSingleWorkStateStatus(connectionId); + await this.updateSingleStatus(connectionId, 'workspaceState'); } } } finally { @@ -146,8 +114,11 @@ export class DbConnectionUpdater { } } - private async updateSingleConnectionStatus(connectionId: string) { - const connections = this.context.globalState.get<{ + private async updateSingleStatus( + connectionId: string, + stateType: 'workspaceState' | 'globalState' + ) { + const connections = this.context[stateType].get<{ [id: string]: IConfig; }>('pro-bro.dbconfig'); @@ -156,7 +127,8 @@ export class DbConnectionUpdater { } connections[connectionId].conStatus = ConnectionStatus.Connecting; - this.updateStatus(connections); + this.updateStatusBasedOnType(connections, stateType); + await this.wait(); try { @@ -164,7 +136,6 @@ export class DbConnectionUpdater { await ProcessorFactory.getProcessorInstance().getDBVersion( connections[connectionId] ); - if (data instanceof Error || 'error' in data) { connections[connectionId].conStatus = ConnectionStatus.NotConnected; @@ -175,6 +146,17 @@ export class DbConnectionUpdater { } catch (error) { connections[connectionId].conStatus = ConnectionStatus.NotConnected; } finally { + this.updateStatusBasedOnType(connections, stateType); + } + } + + private updateStatusBasedOnType( + connections: { [id: string]: IConfig }, + stateType: 'workspaceState' | 'globalState' + ) { + if (stateType === 'workspaceState') { + this.updateWorkStateStatus(connections); + } else { this.updateStatus(connections); } } From 429a3b4454444c9127b8c25881af225aa418100f Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Thu, 31 Oct 2024 15:59:23 +0200 Subject: [PATCH 49/61] query error fix --- src/view/app/Query/query.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/view/app/Query/query.tsx b/src/view/app/Query/query.tsx index b7215466..84798b29 100644 --- a/src/view/app/Query/query.tsx +++ b/src/view/app/Query/query.tsx @@ -185,6 +185,7 @@ function QueryForm({ tableData, tableName, isReadOnly }: IConfigProps) { trace: message.data.trace, }); setIsDataRetrieved(false); + return; } else if (message.data.columns.length !== columns.length) { const fontSize = +window .getComputedStyle( From 60d4e97d0a825b18d8293705d1a5835abd86b2fd Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Mon, 4 Nov 2024 18:55:18 +0200 Subject: [PATCH 50/61] modal update, movable on header --- src/view/app/Query/Export/export.css | 8 +++++++- src/view/app/Query/Export/export.tsx | 18 ++++++++++++------ src/view/app/Query/Update/update.css | 9 ++++++++- src/view/app/Query/Update/update.tsx | 4 ++-- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/src/view/app/Query/Export/export.css b/src/view/app/Query/Export/export.css index 245c72ca..312b33d4 100644 --- a/src/view/app/Query/Export/export.css +++ b/src/view/app/Query/Export/export.css @@ -7,7 +7,6 @@ align-items:center; font-size: inherit; font-style: inherit; - cursor: grab; border: 1px solid var(--vscode-notifications-foreground); padding: 5px; margin: 5px; @@ -25,6 +24,13 @@ text-align: center; font-size: 16px; font-weight: bold; + cursor: grab; +} + +.header:hover{ + opacity: 0.5; + border-bottom: 1px solid var(--vscode-notifications-foreground); + transition: all 0.3s ease-in-out; } #dropdown { diff --git a/src/view/app/Query/Export/export.tsx b/src/view/app/Query/Export/export.tsx index 82a178af..609ad111 100644 --- a/src/view/app/Query/Export/export.tsx +++ b/src/view/app/Query/Export/export.tsx @@ -25,7 +25,6 @@ export default function ExportPopup({ selectedRows, isWindowSmall, }) { - const [position, setPosition] = React.useState({ x: 0, y: 0 }); const [dragging, setDragging] = React.useState(false); const [offset, setOffset] = React.useState({ x: 0, y: 0 }); @@ -39,7 +38,6 @@ export default function ExportPopup({ const logger = new Logger(logValue); const vscode = getVSCodeAPI(); - const handleMouseDown = (e: React.MouseEvent) => { setDragging(true); setOffset({ @@ -175,8 +173,14 @@ export default function ExportPopup({ window.addEventListener('mouseup', handleMouseUp as EventListener); return () => { - window.removeEventListener('mousemove', handleMouseMove as EventListener); - window.removeEventListener('mouseup', handleMouseUp as EventListener); + window.removeEventListener( + 'mousemove', + handleMouseMove as EventListener + ); + window.removeEventListener( + 'mouseup', + handleMouseUp as EventListener + ); }; }, [dragging, offset]); @@ -195,9 +199,11 @@ export default function ExportPopup({ style={{ transform: `translate(${position.x}px, ${position.y}px)`, }} - onMouseDown={handleMouseDown} > -
Export to {exportFormat}
+
+ {' '} + Export to {exportFormat}{' '} +
Select export format:
diff --git a/src/view/app/Query/Update/update.css b/src/view/app/Query/Update/update.css index aaae3511..67340fea 100644 --- a/src/view/app/Query/Update/update.css +++ b/src/view/app/Query/Update/update.css @@ -14,7 +14,6 @@ overflow: hidden; align-self: center; position: fixed; - cursor: grab; border: 1px solid var(--vscode-editor-foreground); background-color: var(--vscode-editorWidget-background); padding: 5px; @@ -42,9 +41,17 @@ width: 100%; height: 30px; text-align: justify; + text-align: center; font-size: 16px; font-weight: bold; padding: 5px; + cursor: grab; +} + +.update-header:hover{ + border-bottom: 1px solid var(--vscode-input-foreground); + opacity: 0.5; + transition: all 0.3s ease-in-out; } .textInput { diff --git a/src/view/app/Query/Update/update.tsx b/src/view/app/Query/Update/update.tsx index 43861ed1..c5d0f55e 100644 --- a/src/view/app/Query/Update/update.tsx +++ b/src/view/app/Query/Update/update.tsx @@ -304,9 +304,9 @@ const UpdatePopup: React.FC = ({ style={{ transform: `translate(${position.x}px, ${position.y}px)`, }} - onMouseDown={handleMouseDown} + > -
+
{tableName}, {ProcessAction[action]}
From df91739cd33762837163584c0590ddf42b3809e1 Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Tue, 5 Nov 2024 09:15:38 +0200 Subject: [PATCH 51/61] header selection bug fix --- src/view/app/Query/Export/export.tsx | 6 +++++- src/view/app/Query/Update/update.tsx | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/view/app/Query/Export/export.tsx b/src/view/app/Query/Export/export.tsx index 609ad111..a7f67d7a 100644 --- a/src/view/app/Query/Export/export.tsx +++ b/src/view/app/Query/Export/export.tsx @@ -200,7 +200,11 @@ export default function ExportPopup({ transform: `translate(${position.x}px, ${position.y}px)`, }} > -
+
{' '} Export to {exportFormat}{' '}
diff --git a/src/view/app/Query/Update/update.tsx b/src/view/app/Query/Update/update.tsx index c5d0f55e..0c528be9 100644 --- a/src/view/app/Query/Update/update.tsx +++ b/src/view/app/Query/Update/update.tsx @@ -290,8 +290,14 @@ const UpdatePopup: React.FC = ({ window.addEventListener('mouseup', handleMouseUp as EventListener); return () => { - window.removeEventListener('mousemove', handleMouseMove as EventListener); - window.removeEventListener('mouseup', handleMouseUp as EventListener); + window.removeEventListener( + 'mousemove', + handleMouseMove as EventListener + ); + window.removeEventListener( + 'mouseup', + handleMouseUp as EventListener + ); }; }, [dragging, offset]); @@ -304,11 +310,15 @@ const UpdatePopup: React.FC = ({ style={{ transform: `translate(${position.x}px, ${position.y}px)`, }} - > -
+
{tableName}, {ProcessAction[action]}
+
{action === ProcessAction.Delete ? ( From a103cf2a97148553722d8c38a17d110ce1cbde28 Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Tue, 5 Nov 2024 11:30:31 +0200 Subject: [PATCH 52/61] modal reset position on close --- src/view/app/Query/Export/export.tsx | 4 ++++ src/view/app/Query/Update/update.tsx | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/view/app/Query/Export/export.tsx b/src/view/app/Query/Export/export.tsx index a7f67d7a..f7bf80d6 100644 --- a/src/view/app/Query/Export/export.tsx +++ b/src/view/app/Query/Export/export.tsx @@ -186,6 +186,9 @@ export default function ExportPopup({ return ( { + setPosition({ x: 0, y: 0 }); + }} trigger={ }> {isWindowSmall ? '' : 'Export'} @@ -259,6 +262,7 @@ export default function ExportPopup({ > Export + close()} diff --git a/src/view/app/Query/Update/update.tsx b/src/view/app/Query/Update/update.tsx index 0c528be9..9cc59989 100644 --- a/src/view/app/Query/Update/update.tsx +++ b/src/view/app/Query/Update/update.tsx @@ -303,7 +303,14 @@ const UpdatePopup: React.FC = ({ return ( - setOpen(false)} modal> + { + setOpen(false); + setPosition({ x: 0, y: 0 }); + }} + modal + > {(close) => (
Date: Tue, 5 Nov 2024 21:43:43 +0200 Subject: [PATCH 53/61] Changed file writing method and added try catch for errors. --- src/repo/client/local/LocalClient.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/repo/client/local/LocalClient.ts b/src/repo/client/local/LocalClient.ts index c83ec364..0a17b25f 100644 --- a/src/repo/client/local/LocalClient.ts +++ b/src/repo/client/local/LocalClient.ts @@ -207,8 +207,11 @@ export class LocalClient extends AClient implements IClient { : null, ].join(' '); - fs.writeFile(this.pfFilePath, pfContent, () => { + try { + fs.writeFileSync(this.pfFilePath, pfContent); console.log('pf file created'); - }); + } catch (error) { + console.log('error while creating pf file', error); + } } } From 4ad48550ef26e8af8da4c10e78c46a9239031ba7 Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Wed, 6 Nov 2024 11:51:34 +0200 Subject: [PATCH 54/61] Copy records bug fix --- src/view/app/Query/query.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/view/app/Query/query.tsx b/src/view/app/Query/query.tsx index 0c09e234..799b0ef8 100644 --- a/src/view/app/Query/query.tsx +++ b/src/view/app/Query/query.tsx @@ -158,7 +158,7 @@ function QueryForm({ tableData, tableName, isReadOnly }: IConfigProps) { } else { setSelectedRows(new Set()); setOpen(false); - reloadData(loaded + (action === ProcessAction.Insert ? 1 : 0)); + reloadData(loaded + (action === ProcessAction.Insert || action === ProcessAction.Copy ? 1 : 0)); } }; @@ -184,10 +184,9 @@ function QueryForm({ tableData, tableName, isReadOnly }: IConfigProps) { description: message.data.description, trace: message.data.trace, }); - setIsDataRetrieved(false); - return; + } else if (message.data.columns.length !== columns.length) { const fontSize = +window .getComputedStyle( @@ -213,7 +212,6 @@ function QueryForm({ tableData, tableName, isReadOnly }: IConfigProps) { setColumns([SelectColumn, ...message.data.columns]); if (message.columns !== undefined) { setSelectedColumns([...message.columns]); - } else { setSelectedColumns([ ...message.data.columns.map((column) => column.name), @@ -439,8 +437,15 @@ function QueryForm({ tableData, tableName, isReadOnly }: IConfigProps) { if (window.isSecureContext) { navigator.clipboard.writeText(sourceRow[sourceColumnKey]); } + console.log( + `Copied ${sourceColumnKey} from row ${sourceRow.ROWID}`); + + reloadData(loaded); + console.log("reloadData", loaded); + } + const getCellHeight = () => { if (configuration.gridTextSize === 'Large') { return 40; From de9feb6607554b6304af6338a803a64952db2a69 Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Thu, 7 Nov 2024 12:40:28 +0200 Subject: [PATCH 55/61] delete console log --- src/view/app/Query/query.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/view/app/Query/query.tsx b/src/view/app/Query/query.tsx index 799b0ef8..e991a749 100644 --- a/src/view/app/Query/query.tsx +++ b/src/view/app/Query/query.tsx @@ -436,13 +436,7 @@ function QueryForm({ tableData, tableName, isReadOnly }: IConfigProps) { function handleCopy({ sourceRow, sourceColumnKey }: CopyEvent): void { if (window.isSecureContext) { navigator.clipboard.writeText(sourceRow[sourceColumnKey]); - } - console.log( - `Copied ${sourceColumnKey} from row ${sourceRow.ROWID}`); - - reloadData(loaded); - console.log("reloadData", loaded); - + } } From 875698e151287d02791a991ac4dcbe5d210525b1 Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Fri, 8 Nov 2024 09:54:35 +0200 Subject: [PATCH 56/61] update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e2cea90..b889445d 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "DB", "Explorer" ], - "version": "1.7.0", + "version": "1.8.0", "repository": { "type": "git", "url": "https://github.com/BalticAmadeus/ProBro" From ab3098b4644df53d2932492daa074d7c586f0ea2 Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Fri, 8 Nov 2024 10:16:55 +0200 Subject: [PATCH 57/61] changelog update --- CHANGELOG.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85968f90..25549315 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Change Log +## 1.8.0 (2024-11-08) + +### Changed + +- Fixed create, edit and delete issue. +- Windows OS theme adaptabtability bug fix. +- Fixed logical fields disappearing in JSON format. +- Fixed issue where query errors prevented proceeding, subsequent valid queries can be executed to obtain results. +- Refresh button works both for workspace and global connections. +- Fixed various small bugs. + +### Added + +- Support for multiple OE versions. +- Data Administration, Data Dictionary or Procedure Editor tools open with connection to selected database. +- Interactive modals with improved UI. + ## 1.7.0 (2024-04-08) ### Changed From f057754b99d6c97f4a226b4d8ca61d3b73228de7 Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Fri, 8 Nov 2024 10:21:38 +0200 Subject: [PATCH 58/61] Update Readme --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index cfd96d3e..56b719d5 100644 --- a/README.md +++ b/README.md @@ -18,13 +18,16 @@ This open source project is in active development. Our goal is to simplify the a - Connection status indicator - Shortcuts to OE tools - Possibility to import from `openedge-project.json` + - Data Administration, Data Dictionary or Procedure Editor tools open with connection to selected database + - Support for multiple OE versions - Tables - Hidden tables - Launch query - Launch query on double click - Select tables form multiple databases - - Favourite tables (_new_) + - Favourite tables + - Interactive modals with improved UI - Indexes - Fields - Filtering From 8aeba3f8342aa304978cf6278d8502d71607ef1e Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Fri, 8 Nov 2024 10:41:13 +0200 Subject: [PATCH 59/61] package json update --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b889445d..79757865 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ }, "pro-bro.filterAsYouType": { "type": "boolean", - "default": true, + "default": false, "markdownDescription": "Use filter as you type" }, "pro-bro.logging.react": { @@ -115,7 +115,7 @@ }, "pro-bro.development.useNewDbClient": { "type": "boolean", - "default": false, + "default": true, "markdownDescription": "Use New DB Client implementation" }, "pro-bro.gridTextSize": { From 221cda92a3c4a7ef18acb89c64c03664cf8470b4 Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Fri, 8 Nov 2024 10:41:56 +0200 Subject: [PATCH 60/61] readme update --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 56b719d5..29c55beb 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,8 @@ This open source project is in active development. Our goal is to simplify the a - Connection status indicator - Shortcuts to OE tools - Possibility to import from `openedge-project.json` - - Data Administration, Data Dictionary or Procedure Editor tools open with connection to selected database - - Support for multiple OE versions + - Data Administration, Data Dictionary or Procedure Editor tools open with connection to selected database (_new_) + - Support for multiple OE versions (_new_) - Tables - Hidden tables @@ -27,7 +27,7 @@ This open source project is in active development. Our goal is to simplify the a - Launch query on double click - Select tables form multiple databases - Favourite tables - - Interactive modals with improved UI + - Interactive modals with improved UI (_new_) - Indexes - Fields - Filtering From 1e202cda8dfc641162a05e29e55fea0d7e9625e0 Mon Sep 17 00:00:00 2001 From: dpurynzin Date: Fri, 8 Nov 2024 14:42:57 +0200 Subject: [PATCH 61/61] updated package --- package-lock.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6f4d3972..9b7f2c6a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "pro-bro", - "version": "1.7.0", + "version": "1.8.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "pro-bro", - "version": "1.7.0", + "version": "1.8.0", "dependencies": { "@emotion/react": "^11.10.0", "@emotion/styled": "^11.10.0",