Skip to content

Commit 867126e

Browse files
update readme
1 parent 593d32f commit 867126e

File tree

5 files changed

+2
-292
lines changed

5 files changed

+2
-292
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ HawkClient is a powerful tool designed to test APIs and manage collections and r
1111
- **Environments**: Manage different environments (e.g., development, staging, production) and switch between them effortlessly.
1212
- **Variables**: Use variables at the environment, collection, and request levels to dynamically manage and manipulate data.
1313
- **Collection Runner**: Execute a series of API requests organized into collections.
14-
- **Flow Creation**: Design and execute complex flows that involve multiple API calls, with conditional logic and branching.
14+
- **Flow Creation**: Design and execute complex flows through drag and drop ui that involve multiple API calls, with conditional logic and branching.
1515
- **Pre-request and Post-response Hooks**: Customize API calls with scripts that run before a request is sent or after a response is received.
1616
- **Code Snippet Generation**: Automatically generate code snippets for API requests in various programming languages.
1717
- **Swagger/OpenAPI Support**: Import and manage Swagger/OpenAPI specifications at the collection level for comprehensive API documentation and testing.

packages/electron/lib/service/CollectionItemService.js

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ const { updateCollectionsConfig, getCollectionsConfig } = require("../database/C
99
const { getWorkSpaces } = require("../database/WorkSpacesDatabase")
1010
const cloneDeep = require('lodash/cloneDeep');
1111
let { window } = require("../constants/constants");
12-
let { addWatcher } = require("../watcher/watcher");
1312
const { convertPostmanToHawkClient } = require("../utils/postmanToHawkClient");
1413
const { hawkClientToPostman } = require("../utils/hawkClientToPostman");
1514
const { formatJSON, collectionFieldsToAvoidSpace, collectionJsonKeyOrder, replaceJsonWithYamlExtension, convertJsonToYaml, convertYamlToJson, requestJsonKeyOrder, reOrderJSONObject } = require("../utils/jsonFormatter")
@@ -213,19 +212,6 @@ const duplicateCollectionItem = async (request) => {
213212
updateCollectionsConfig({
214213
collectionsConfig: collectionsConfig
215214
})
216-
try {
217-
if (workspace != null) {
218-
219-
let item = {
220-
path: directoryPath,
221-
workspace: workspace
222-
}
223-
let isInitializing = false;
224-
addWatcher(item, window.win, () => isInitializing)
225-
}
226-
} catch (error) {
227-
console.log("error while addwatcher in collection duplicate", error)
228-
}
229215
}
230216
const collectionFolderPath = path.join(itemLocation, name);
231217

@@ -412,19 +398,6 @@ const addCollectionItem = async (request) => {
412398
updateCollectionsConfig({
413399
collectionsConfig: collectionsConfig
414400
})
415-
try {
416-
if (workspace != null) {
417-
418-
let item = {
419-
path: directoryPath,
420-
workspace: workspace
421-
}
422-
let isInitializing = false;
423-
addWatcher(item, window.win, () => isInitializing)
424-
}
425-
} catch (error) {
426-
console.log("error while addwatcher in collection create", error)
427-
}
428401
}
429402
const collectionFolderPath = path.join(itemLocation, name);
430403

@@ -666,20 +639,6 @@ const linkCollection = async (request) => {
666639
collectionsConfig: collectionsConfig
667640
})
668641

669-
try { // add watcher for new directory of collection
670-
if (workspace != null) {
671-
672-
let item = {
673-
path: updatedPath,
674-
workspace: workspace
675-
}
676-
let isInitializing = false;
677-
addWatcher(item, window.win, () => isInitializing)
678-
}
679-
} catch (error) {
680-
console.log("error while addwatcher in collection link", error)
681-
}
682-
683642
}
684643

685644
apiTesterCollectionJson = getAllCollectionData(workspace);
@@ -731,19 +690,6 @@ const postmanCollectionToHawkCollectionItem = async (request) => {
731690
updateCollectionsConfig({
732691
collectionsConfig: collectionsConfig
733692
})
734-
try {
735-
if (workspace != null) {
736-
737-
let item = {
738-
path: directoryPath,
739-
workspace: workspace
740-
}
741-
let isInitializing = false;
742-
addWatcher(item, window.win, () => isInitializing)
743-
}
744-
} catch (error) {
745-
console.log("error while addwatcher in collection duplicate", error)
746-
}
747693
}
748694
const collectionFolderPath = path.join(itemLocation, name);
749695

packages/electron/lib/service/WorkSpacesService.js

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
const { getWorkSpaces, updateWorkSpaces } = require("../database/WorkSpacesDatabase");
22
let { win, window } = require("../constants/constants");
3-
let { addWatcher } = require("../watcher/watcher")
43

54
// GetWorkSpaces - function to Get work spaces
65
const GetWorkSpaces = async (request) => {
@@ -14,29 +13,9 @@ const AddWorkSpaces = async (request) => {
1413
console.log("AddWorkSpaces() service")
1514
let workSpaces = getWorkSpaces();
1615
workSpaces = { workspaces: request.workspaces, selectedWorkSpace: request.selectedWorkSpace };
17-
let { isLinkCollectionTriggered, workspacePath, workSpaceName } = request
16+
1817
let resp = updateWorkSpaces(workSpaces);
19-
try {
20-
if (resp.updatedWorkSpaceData != null && typeof resp.updatedWorkSpaceData == 'object') {
2118

22-
let item = {
23-
path: resp.updatedWorkSpaceData.path,
24-
workspace: resp.updatedWorkSpaceData.workspace
25-
}
26-
let isInitializing = false;
27-
addWatcher(item, window.win, () => isInitializing)
28-
}
29-
if (isLinkCollectionTriggered) {
30-
let item = {
31-
path: workspacePath,
32-
workspace: workSpaceName
33-
}
34-
let isInitializing = false;
35-
addWatcher(item, window.win, () => isInitializing)
36-
}
37-
} catch (error) {
38-
console.log("error while addwatcher in workspace create", error)
39-
}
4019
return workSpaces;
4120
}
4221

packages/electron/lib/watcher/watcher.js

Lines changed: 0 additions & 211 deletions
This file was deleted.

packages/electron/main.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ const { fork, exec } = require('child_process');
1212
const { getAllCollectionData } = require("./lib/database/ItemsDatabase");
1313
const { GetWorkSpaces, AddWorkSpaces } = require("./lib/service/WorkSpacesService")
1414
const { dialog } = require('electron');
15-
const { watchFolders } = require("./lib/watcher/watcher")
1615

1716
const SettingsService = require('./lib/service/SettingsService');
1817
const { setContentSecurityPolicy } = require('electron-util');
@@ -33,7 +32,6 @@ const contentSecurityPolicy = [
3332
];
3433

3534
setContentSecurityPolicy(contentSecurityPolicy.join(';') + ';');
36-
let isInitializing = true;
3735
let serverProcess;
3836

3937
function createWindow() {
@@ -64,8 +62,6 @@ function createWindow() {
6462
return { action: "allow" };
6563
});
6664

67-
watchFolders(win, () => isInitializing);
68-
6965
win.on('closed', function () {
7066
win = null;
7167
if (serverProcess) {

0 commit comments

Comments
 (0)