From 27ba752df97a8f870137b099dd6128ebbfef3226 Mon Sep 17 00:00:00 2001 From: Service Account Date: Sat, 28 Oct 2023 00:38:10 +0700 Subject: [PATCH] Add rebuild leveldown for arm on mac intel --- plugins/data-plugin/README.md | 1 - plugins/data-plugin/package.json | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/data-plugin/README.md b/plugins/data-plugin/README.md index c2fd319d2e..2197d9ad24 100644 --- a/plugins/data-plugin/README.md +++ b/plugins/data-plugin/README.md @@ -6,4 +6,3 @@ - module.ts: Defines the plugin module which would be executed by the main node process. - package.json: Defines the plugin metadata. - tsconfig.json: Defines the typescript configuration. - diff --git a/plugins/data-plugin/package.json b/plugins/data-plugin/package.json index 8ac3136f4e..7465e097af 100644 --- a/plugins/data-plugin/package.json +++ b/plugins/data-plugin/package.json @@ -12,7 +12,7 @@ ], "scripts": { "build": "tsc -b ./config/tsconfig.esm.json && tsc -b ./config/tsconfig.cjs.json && webpack --config webpack.config.js", - "build:deps": "electron-rebuild -f -w leveldown@5.6.0 --arch=arm64 -v 26.2.1 && electron-rebuild -f -w leveldown@5.6.0 --arch=x64 -v 26.2.1", + "build:deps": "electron-rebuild -f -w leveldown@5.6.0 --arch=arm64 -v 26.2.1 && node-gyp -C ./node_modules/leveldown clean && mkdir -p ./node_modules/leveldown/prebuilds/darwin-arm64 && cp ./node_modules/leveldown/bin/darwin-arm64-116/leveldown.node ./node_modules/leveldown/prebuilds/darwin-arm64/node.napi.node", "postinstall": "rimraf *.tgz --glob && npm run build", "build:publish": "npm pack && cpx *.tgz ../../electron/core/pre-install" }, @@ -40,6 +40,7 @@ "@janhq/core": "^0.1.7", "electron": "26.2.1", "electron-rebuild": "^3.2.9", + "node-gyp": "^9.4.1", "pouchdb-find": "^8.0.1", "pouchdb-node": "^8.0.1" }, @@ -47,4 +48,4 @@ "pouchdb-node", "pouchdb-find" ] -} \ No newline at end of file +}