Merge pull request #478 from survivant/feature/build-on-different-os

Add build support for different OS
This commit is contained in:
Anoop M D 2023-10-14 02:43:35 +05:30 committed by GitHub
commit e898ebdfa9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 502 additions and 28 deletions

428
package-lock.json generated
View File

@ -21,6 +21,7 @@
"@faker-js/faker": "^7.6.0", "@faker-js/faker": "^7.6.0",
"@jest/globals": "^29.2.0", "@jest/globals": "^29.2.0",
"@playwright/test": "^1.27.1", "@playwright/test": "^1.27.1",
"fs-extra": "^11.1.1",
"husky": "^8.0.3", "husky": "^8.0.3",
"jest": "^29.2.0", "jest": "^29.2.0",
"pretty-quick": "^3.1.3", "pretty-quick": "^3.1.3",
@ -5238,6 +5239,20 @@
"dev": true, "dev": true,
"license": "Python-2.0" "license": "Python-2.0"
}, },
"node_modules/app-builder-lib/node_modules/fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dev": true,
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/app-builder-lib/node_modules/js-yaml": { "node_modules/app-builder-lib/node_modules/js-yaml": {
"version": "4.1.0", "version": "4.1.0",
"dev": true, "dev": true,
@ -5519,6 +5534,75 @@
"node": ">=10.12.0" "node": ">=10.12.0"
} }
}, },
"node_modules/autoprefixer": {
"version": "10.4.16",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz",
"integrity": "sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/postcss/"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/autoprefixer"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"peer": true,
"dependencies": {
"browserslist": "^4.21.10",
"caniuse-lite": "^1.0.30001538",
"fraction.js": "^4.3.6",
"normalize-range": "^0.1.2",
"picocolors": "^1.0.0",
"postcss-value-parser": "^4.2.0"
},
"bin": {
"autoprefixer": "bin/autoprefixer"
},
"engines": {
"node": "^10 || ^12 || >=14"
},
"peerDependencies": {
"postcss": "^8.1.0"
}
},
"node_modules/autoprefixer/node_modules/browserslist": {
"version": "4.22.1",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz",
"integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==",
"funding": [
{
"type": "opencollective",
"url": "https://opencollective.com/browserslist"
},
{
"type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/browserslist"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
}
],
"peer": true,
"dependencies": {
"caniuse-lite": "^1.0.30001541",
"electron-to-chromium": "^1.4.535",
"node-releases": "^2.0.13",
"update-browserslist-db": "^1.0.13"
},
"bin": {
"browserslist": "cli.js"
},
"engines": {
"node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
}
},
"node_modules/aws-sign2": { "node_modules/aws-sign2": {
"version": "0.7.0", "version": "0.7.0",
"dev": true, "dev": true,
@ -5914,7 +5998,6 @@
}, },
"node_modules/browserslist": { "node_modules/browserslist": {
"version": "4.21.4", "version": "4.21.4",
"dev": true,
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",
@ -6075,6 +6158,20 @@
"dev": true, "dev": true,
"license": "Python-2.0" "license": "Python-2.0"
}, },
"node_modules/builder-util/node_modules/fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dev": true,
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/builder-util/node_modules/js-yaml": { "node_modules/builder-util/node_modules/js-yaml": {
"version": "4.1.0", "version": "4.1.0",
"dev": true, "dev": true,
@ -6235,7 +6332,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001445", "version": "1.0.30001547",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz",
"integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA==",
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",
@ -6244,9 +6343,12 @@
{ {
"type": "tidelift", "type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/caniuse-lite" "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
} }
], ]
"license": "CC-BY-4.0"
}, },
"node_modules/caseless": { "node_modules/caseless": {
"version": "0.12.0", "version": "0.12.0",
@ -7416,6 +7518,20 @@
"dev": true, "dev": true,
"license": "Python-2.0" "license": "Python-2.0"
}, },
"node_modules/dmg-builder/node_modules/fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dev": true,
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/dmg-builder/node_modules/iconv-lite": { "node_modules/dmg-builder/node_modules/iconv-lite": {
"version": "0.6.3", "version": "0.6.3",
"dev": true, "dev": true,
@ -7640,6 +7756,20 @@
"node": ">=14.0.0" "node": ">=14.0.0"
} }
}, },
"node_modules/electron-builder/node_modules/fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dev": true,
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/electron-icon-maker": { "node_modules/electron-icon-maker": {
"version": "0.0.5", "version": "0.0.5",
"dev": true, "dev": true,
@ -7751,6 +7881,20 @@
"mime": "^2.5.2" "mime": "^2.5.2"
} }
}, },
"node_modules/electron-publish/node_modules/fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dev": true,
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/electron-store": { "node_modules/electron-store": {
"version": "8.1.0", "version": "8.1.0",
"license": "MIT", "license": "MIT",
@ -7773,9 +7917,9 @@
} }
}, },
"node_modules/electron-to-chromium": { "node_modules/electron-to-chromium": {
"version": "1.4.284", "version": "1.4.554",
"dev": true, "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.554.tgz",
"license": "ISC" "integrity": "sha512-Q0umzPJjfBrrj8unkONTgbKQXzXRrH7sVV7D9ea2yBV3Oaogz991yhbpfvo2LMNkJItmruXTEzVpP9cp7vaIiQ=="
}, },
"node_modules/electron-util": { "node_modules/electron-util": {
"version": "0.17.2", "version": "0.17.2",
@ -8520,6 +8664,19 @@
"node": ">= 0.6" "node": ">= 0.6"
} }
}, },
"node_modules/fraction.js": {
"version": "4.3.7",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
"integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==",
"peer": true,
"engines": {
"node": "*"
},
"funding": {
"type": "patreon",
"url": "https://github.com/sponsors/rawify"
}
},
"node_modules/fresh": { "node_modules/fresh": {
"version": "0.5.2", "version": "0.5.2",
"license": "MIT", "license": "MIT",
@ -8532,15 +8689,17 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/fs-extra": { "node_modules/fs-extra": {
"version": "10.1.0", "version": "11.1.1",
"license": "MIT", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz",
"integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==",
"dev": true,
"dependencies": { "dependencies": {
"graceful-fs": "^4.2.0", "graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1", "jsonfile": "^6.0.1",
"universalify": "^2.0.0" "universalify": "^2.0.0"
}, },
"engines": { "engines": {
"node": ">=12" "node": ">=14.14"
} }
}, },
"node_modules/fs.realpath": { "node_modules/fs.realpath": {
@ -11695,9 +11854,9 @@
"license": "MIT" "license": "MIT"
}, },
"node_modules/node-releases": { "node_modules/node-releases": {
"version": "2.0.8", "version": "2.0.13",
"dev": true, "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz",
"license": "MIT" "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ=="
}, },
"node_modules/normalize-package-data": { "node_modules/normalize-package-data": {
"version": "2.5.0", "version": "2.5.0",
@ -11730,6 +11889,15 @@
"node": ">=0.10.0" "node": ">=0.10.0"
} }
}, },
"node_modules/normalize-range": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
"integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
"peer": true,
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/normalize-url": { "node_modules/normalize-url": {
"version": "6.1.0", "version": "6.1.0",
"dev": true, "dev": true,
@ -15109,6 +15277,19 @@
"postcss": "^8.0.9" "postcss": "^8.0.9"
} }
}, },
"node_modules/tailwindcss/node_modules/fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/tailwindcss/node_modules/glob-parent": { "node_modules/tailwindcss/node_modules/glob-parent": {
"version": "6.0.2", "version": "6.0.2",
"license": "ISC", "license": "ISC",
@ -15136,6 +15317,20 @@
"fs-extra": "^10.0.0" "fs-extra": "^10.0.0"
} }
}, },
"node_modules/temp-file/node_modules/fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dev": true,
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/terser": { "node_modules/terser": {
"version": "5.16.1", "version": "5.16.1",
"dev": true, "dev": true,
@ -15645,8 +15840,9 @@
} }
}, },
"node_modules/update-browserslist-db": { "node_modules/update-browserslist-db": {
"version": "1.0.10", "version": "1.0.13",
"dev": true, "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
"integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==",
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",
@ -15655,15 +15851,18 @@
{ {
"type": "tidelift", "type": "tidelift",
"url": "https://tidelift.com/funding/github/npm/browserslist" "url": "https://tidelift.com/funding/github/npm/browserslist"
},
{
"type": "github",
"url": "https://github.com/sponsors/ai"
} }
], ],
"license": "MIT",
"dependencies": { "dependencies": {
"escalade": "^3.1.1", "escalade": "^3.1.1",
"picocolors": "^1.0.0" "picocolors": "^1.0.0"
}, },
"bin": { "bin": {
"browserslist-lint": "cli.js" "update-browserslist-db": "cli.js"
}, },
"peerDependencies": { "peerDependencies": {
"browserslist": ">= 4.21.0" "browserslist": ">= 4.21.0"
@ -16481,6 +16680,19 @@
"node": ">=8" "node": ">=8"
} }
}, },
"packages/bruno-cli/node_modules/fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=12"
}
},
"packages/bruno-cli/node_modules/http-proxy-agent": { "packages/bruno-cli/node_modules/http-proxy-agent": {
"version": "7.0.0", "version": "7.0.0",
"license": "MIT", "license": "MIT",
@ -16505,7 +16717,7 @@
}, },
"packages/bruno-electron": { "packages/bruno-electron": {
"name": "bruno", "name": "bruno",
"version": "v0.23.0", "version": "v0.24.0",
"dependencies": { "dependencies": {
"@aws-sdk/credential-providers": "^3.425.0", "@aws-sdk/credential-providers": "^3.425.0",
"@usebruno/js": "0.8.0", "@usebruno/js": "0.8.0",
@ -16631,6 +16843,19 @@
"@types/yauzl": "^2.9.1" "@types/yauzl": "^2.9.1"
} }
}, },
"packages/bruno-electron/node_modules/fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dependencies": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
},
"engines": {
"node": ">=12"
}
},
"packages/bruno-electron/node_modules/get-stream": { "packages/bruno-electron/node_modules/get-stream": {
"version": "5.2.0", "version": "5.2.0",
"dev": true, "dev": true,
@ -20475,6 +20700,16 @@
"supports-color": "^7.1.0" "supports-color": "^7.1.0"
} }
}, },
"fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
},
"http-proxy-agent": { "http-proxy-agent": {
"version": "7.0.0", "version": "7.0.0",
"requires": { "requires": {
@ -20892,6 +21127,17 @@
"version": "2.0.1", "version": "2.0.1",
"dev": true "dev": true
}, },
"fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
},
"js-yaml": { "js-yaml": {
"version": "4.1.0", "version": "4.1.0",
"dev": true, "dev": true,
@ -21061,6 +21307,34 @@
"atomically": { "atomically": {
"version": "1.7.0" "version": "1.7.0"
}, },
"autoprefixer": {
"version": "10.4.16",
"resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.16.tgz",
"integrity": "sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==",
"peer": true,
"requires": {
"browserslist": "^4.21.10",
"caniuse-lite": "^1.0.30001538",
"fraction.js": "^4.3.6",
"normalize-range": "^0.1.2",
"picocolors": "^1.0.0",
"postcss-value-parser": "^4.2.0"
},
"dependencies": {
"browserslist": {
"version": "4.22.1",
"resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz",
"integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==",
"peer": true,
"requires": {
"caniuse-lite": "^1.0.30001541",
"electron-to-chromium": "^1.4.535",
"node-releases": "^2.0.13",
"update-browserslist-db": "^1.0.13"
}
}
}
},
"aws-sign2": { "aws-sign2": {
"version": "0.7.0", "version": "0.7.0",
"dev": true "dev": true
@ -21322,7 +21596,6 @@
}, },
"browserslist": { "browserslist": {
"version": "4.21.4", "version": "4.21.4",
"dev": true,
"requires": { "requires": {
"caniuse-lite": "^1.0.30001400", "caniuse-lite": "^1.0.30001400",
"electron-to-chromium": "^1.4.251", "electron-to-chromium": "^1.4.251",
@ -21420,6 +21693,16 @@
"yauzl": "^2.10.0" "yauzl": "^2.10.0"
} }
}, },
"fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
},
"get-stream": { "get-stream": {
"version": "5.2.0", "version": "5.2.0",
"dev": true, "dev": true,
@ -21525,6 +21808,17 @@
"version": "2.0.1", "version": "2.0.1",
"dev": true "dev": true
}, },
"fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
},
"js-yaml": { "js-yaml": {
"version": "4.1.0", "version": "4.1.0",
"dev": true, "dev": true,
@ -21638,7 +21932,9 @@
} }
}, },
"caniuse-lite": { "caniuse-lite": {
"version": "1.0.30001445" "version": "1.0.30001547",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001547.tgz",
"integrity": "sha512-W7CrtIModMAxobGhz8iXmDfuJiiKg1WADMO/9x7/CLNin5cpSbuBjooyoIUVB5eyCc36QuTVlkVa1iB2S5+/eA=="
}, },
"caseless": { "caseless": {
"version": "0.12.0", "version": "0.12.0",
@ -22365,6 +22661,17 @@
"version": "2.0.1", "version": "2.0.1",
"dev": true "dev": true
}, },
"fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
},
"iconv-lite": { "iconv-lite": {
"version": "0.6.3", "version": "0.6.3",
"dev": true, "dev": true,
@ -22515,6 +22822,19 @@
"read-config-file": "6.2.0", "read-config-file": "6.2.0",
"update-notifier": "^5.1.0", "update-notifier": "^5.1.0",
"yargs": "^17.0.1" "yargs": "^17.0.1"
},
"dependencies": {
"fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
}
} }
}, },
"electron-icon-maker": { "electron-icon-maker": {
@ -22598,6 +22918,19 @@
"fs-extra": "^10.0.0", "fs-extra": "^10.0.0",
"lazy-val": "^1.0.5", "lazy-val": "^1.0.5",
"mime": "^2.5.2" "mime": "^2.5.2"
},
"dependencies": {
"fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
}
} }
}, },
"electron-store": { "electron-store": {
@ -22613,8 +22946,9 @@
} }
}, },
"electron-to-chromium": { "electron-to-chromium": {
"version": "1.4.284", "version": "1.4.554",
"dev": true "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.554.tgz",
"integrity": "sha512-Q0umzPJjfBrrj8unkONTgbKQXzXRrH7sVV7D9ea2yBV3Oaogz991yhbpfvo2LMNkJItmruXTEzVpP9cp7vaIiQ=="
}, },
"electron-util": { "electron-util": {
"version": "0.17.2", "version": "0.17.2",
@ -23095,6 +23429,12 @@
"forwarded": { "forwarded": {
"version": "0.2.0" "version": "0.2.0"
}, },
"fraction.js": {
"version": "4.3.7",
"resolved": "https://registry.npmjs.org/fraction.js/-/fraction.js-4.3.7.tgz",
"integrity": "sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==",
"peer": true
},
"fresh": { "fresh": {
"version": "0.5.2" "version": "0.5.2"
}, },
@ -23102,7 +23442,10 @@
"version": "0.1.7" "version": "0.1.7"
}, },
"fs-extra": { "fs-extra": {
"version": "10.1.0", "version": "11.1.1",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.1.1.tgz",
"integrity": "sha512-MGIE4HOvQCeUCzmlHs0vXpih4ysz4wg9qiSAu6cd42lVwPbTM1TjV7RusoyQqMmk/95gdQZX72u+YW+c3eEpFQ==",
"dev": true,
"requires": { "requires": {
"graceful-fs": "^4.2.0", "graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1", "jsonfile": "^6.0.1",
@ -25098,8 +25441,9 @@
"version": "1.1.12" "version": "1.1.12"
}, },
"node-releases": { "node-releases": {
"version": "2.0.8", "version": "2.0.13",
"dev": true "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz",
"integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ=="
}, },
"normalize-package-data": { "normalize-package-data": {
"version": "2.5.0", "version": "2.5.0",
@ -25124,6 +25468,12 @@
"normalize-path": { "normalize-path": {
"version": "3.0.0" "version": "3.0.0"
}, },
"normalize-range": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz",
"integrity": "sha512-bdok/XvKII3nUpklnV6P2hxtMNrCboOjAcyBuQnWEhO665FwrSNRxU+AqpsyvO6LgGYPspN+lu5CLtw4jPRKNA==",
"peer": true
},
"normalize-url": { "normalize-url": {
"version": "6.1.0", "version": "6.1.0",
"dev": true "dev": true
@ -27224,6 +27574,16 @@
"tmp": "^0.2.1" "tmp": "^0.2.1"
}, },
"dependencies": { "dependencies": {
"fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
},
"glob-parent": { "glob-parent": {
"version": "6.0.2", "version": "6.0.2",
"requires": { "requires": {
@ -27242,6 +27602,19 @@
"requires": { "requires": {
"async-exit-hook": "^2.0.1", "async-exit-hook": "^2.0.1",
"fs-extra": "^10.0.0" "fs-extra": "^10.0.0"
},
"dependencies": {
"fs-extra": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
"integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
"dev": true,
"requires": {
"graceful-fs": "^4.2.0",
"jsonfile": "^6.0.1",
"universalify": "^2.0.0"
}
}
} }
}, },
"terser": { "terser": {
@ -27544,8 +27917,9 @@
"version": "1.0.0" "version": "1.0.0"
}, },
"update-browserslist-db": { "update-browserslist-db": {
"version": "1.0.10", "version": "1.0.13",
"dev": true, "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
"integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==",
"requires": { "requires": {
"escalade": "^3.1.1", "escalade": "^3.1.1",
"picocolors": "^1.0.0" "picocolors": "^1.0.0"

View File

@ -22,7 +22,8 @@
"jest": "^29.2.0", "jest": "^29.2.0",
"pretty-quick": "^3.1.3", "pretty-quick": "^3.1.3",
"randomstring": "^1.2.2", "randomstring": "^1.2.2",
"ts-jest": "^29.0.5" "ts-jest": "^29.0.5",
"fs-extra": "^11.1.1"
}, },
"scripts": { "scripts": {
"dev:web": "npm run dev --workspace=packages/bruno-app", "dev:web": "npm run dev --workspace=packages/bruno-app",
@ -31,6 +32,7 @@
"dev:electron": "npm run dev --workspace=packages/bruno-electron", "dev:electron": "npm run dev --workspace=packages/bruno-electron",
"build:bruno-query": "npm run build --workspace=packages/bruno-query", "build:bruno-query": "npm run build --workspace=packages/bruno-query",
"build:graphql-docs": "npm run build --workspace=packages/bruno-graphql-docs", "build:graphql-docs": "npm run build --workspace=packages/bruno-graphql-docs",
"build:electron": "node ./scripts/build-electron.js",
"build:electron:mac": "./scripts/build-electron.sh mac", "build:electron:mac": "./scripts/build-electron.sh mac",
"build:electron:win": "./scripts/build-electron.sh win", "build:electron:win": "./scripts/build-electron.sh win",
"build:electron:linux": "./scripts/build-electron.sh linux", "build:electron:linux": "./scripts/build-electron.sh linux",

98
scripts/build-electron.js Normal file
View File

@ -0,0 +1,98 @@
const os = require('os');
const fs = require('fs-extra');
const util = require('util');
const exec = util.promisify(require('child_process').exec);
async function deleteFileIfExists(filePath) {
try {
const exists = await fs.pathExists(filePath);
if (exists) {
await fs.remove(filePath);
console.log(`${filePath} has been successfully deleted.`);
} else {
console.log(`${filePath} does not exist.`);
}
} catch (err) {
console.error(`Error while checking the existence of ${filePath}: ${err}`);
}
}
async function copyFolderIfExists(srcPath, destPath) {
try {
const exists = await fs.pathExists(srcPath);
if (exists) {
await fs.copy(srcPath, destPath);
console.log(`${srcPath} has been successfully copied.`);
} else {
console.log(`${srcPath} was not copied as it does not exist.`);
}
} catch (err) {
console.error(`Error while checking the existence of ${srcPath}: ${err}`);
}
}
async function removeSourceMapFiles(directory) {
try {
const files = await fs.readdir(directory);
for (const file of files) {
if (file.endsWith('.map')) {
const filePath = path.join(directory, file);
await fs.remove(filePath);
console.log(`${filePath} has been successfully deleted.`);
}
}
} catch (error) {
console.error(`Error while deleting .map files: ${error}`);
}
}
async function main() {
try {
// Remove out directory
await deleteFileIfExists('packages/bruno-electron/out');
// Remove web directory
await deleteFileIfExists('packages/bruno-electron/web');
// Create a new web directory
await fs.ensureDir('packages/bruno-electron/web');
console.log('The directory has been created successfully!');
// Copy build
await copyFolderIfExists('packages/bruno-app/out', 'packages/bruno-electron/web');
// Change paths in next
const files = await fs.readdir('packages/bruno-electron/web');
for (const file of files) {
if (file.endsWith('.html')) {
let content = await fs.readFile(`packages/bruno-electron/web/${file}`, 'utf8');
content = content.replace(/\/_next\//g, '/_next/');
await fs.writeFile(`packages/bruno-electron/web/${file}`, content);
}
}
// Remove sourcemaps
await removeSourceMapFiles('packages/bruno-electron/web')
// Run npm dist command
console.log('Building the Electron distribution');
// Determine the OS and set the appropriate argument
let osArg;
if (os.platform() === 'win32') {
osArg = 'win';
} else if (os.platform() === 'darwin') {
osArg = 'mac';
} else {
osArg = 'linux';
}
await exec(`npm run dist-${osArg} --workspace=packages/bruno-electron`);
} catch (error) {
console.error('An error occurred:', error);
}
}
main();