Skip to content

Commit ae90a2c

Browse files
[ENGG-4015]: local sync schema changes and migration setup to support GraphQL request (#200)
1 parent b7f9cdc commit ae90a2c

File tree

9 files changed

+385
-79
lines changed

9 files changed

+385
-79
lines changed

package-lock.json

Lines changed: 20 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@
210210
"@types/lodash": "^4.17.16",
211211
"@types/node": "17.0.23",
212212
"@types/node-forge": "^1.3.11",
213+
"@types/semver": "^7.7.0",
213214
"@types/terser-webpack-plugin": "^5.0.4",
214215
"@types/uuid": "^10.0.0",
215216
"@types/webpack-env": "^1.16.3",
@@ -299,6 +300,7 @@
299300
"rimraf": "^3.0.2",
300301
"rmfr": "^2.0.0",
301302
"semaphore": "^1.1.0",
303+
"semver": "^7.7.2",
302304
"stream-browserify": "^3.0.0",
303305
"stream-http": "^3.2.0",
304306
"tmp": "^0.2.1",

src/renderer/actions/local-sync/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { homedir } from "os";
22

33
export const CORE_CONFIG_FILE_VERSION = 0.1;
4+
export const WORKSPACE_CONFIG_FILE_VERSION = "0.0.2";
45
export const CONFIG_FILE = "requestly.json";
56
export const COLLECTION_AUTH_FILE = "auth.json";
67
export const DESCRIPTION_FILE = "README.md";

src/renderer/actions/local-sync/fs-manager-builder.rpc-service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export class FsManagerBuilderRPCService extends RPCServiceOverIPC {
2525
return;
2626
}
2727
const manager = new FsManagerRPCService(rootPath);
28-
manager.init();
28+
await manager.init();
2929
this.exposedWorkspacePaths.set(rootPath, manager);
3030
}
3131

src/renderer/actions/local-sync/fs-manager.rpc-service.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,17 @@ export class FsManagerRPCService extends RPCServiceOverIPC {
1313
this.fsManager.reload();
1414
}
1515

16-
init() {
16+
async init(): Promise<void> {
17+
try {
18+
await this.fsManager.init();
19+
} catch (error) {
20+
throw new Error(
21+
`Failed to initialize FsManager for ${this.rootPath}: ${
22+
error instanceof Error ? error.message : String(error)
23+
}`
24+
);
25+
}
26+
1727
this.exposeMethodOverIPC(
1828
"getAllRecords",
1929
this.fsManager.getAllRecords.bind(this.fsManager)

0 commit comments

Comments
 (0)