From 190721fe46e7fbda7fccc09fa586f08d864733c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Tue, 5 Nov 2024 17:17:35 +0100 Subject: [PATCH 01/38] op source and targetdir same on project load --- src/electron/electron_settings.js | 6 +++++- src/utils/helper_util.js | 2 +- src/utils/projects_util.js | 11 ++--------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/electron/electron_settings.js b/src/electron/electron_settings.js index 851a25e..0484a7b 100644 --- a/src/electron/electron_settings.js +++ b/src/electron/electron_settings.js @@ -337,7 +337,11 @@ class ElectronSettings _setCurrentProject(projectFile, project) { this._currentProject = project; - if (project) this.set(this.PATCHID_FIELD, project._id); + projectsUtil.invalidateProjectCaches(); + if (project) + { + this.set(this.PATCHID_FIELD, project._id); + } if (projectFile && project) { const projectName = path.basename(projectFile, "." + projectsUtil.CABLES_PROJECT_FILE_EXTENSION); diff --git a/src/utils/helper_util.js b/src/utils/helper_util.js index 5f67fcc..61b671e 100644 --- a/src/utils/helper_util.js +++ b/src/utils/helper_util.js @@ -57,7 +57,7 @@ class HelperUtil extends SharedHelperUtil } else { - return pathToFileURL(thePath).href; + return thePath ? pathToFileURL(thePath).href : null; } } diff --git a/src/utils/projects_util.js b/src/utils/projects_util.js index 982e669..2da3656 100644 --- a/src/utils/projects_util.js +++ b/src/utils/projects_util.js @@ -173,16 +173,9 @@ class ProjectsUtil extends SharedProjectsUtil urls.forEach((url) => { let fullPath = helper.fileURLToPath(url, true); - if (fullPath) + if (fullPath && fs.existsSync(fullPath)) { - if (fs.existsSync(fullPath)) - { - fileNames.push(fullPath); - } - else - { - this._log.warn("missing file", url, fullPath); - } + fileNames.push(fullPath); } }); return helper.uniqueArray(fileNames); From 3d1f75ac99dceefa611f36eb8432d97f747db079 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Tue, 5 Nov 2024 17:21:17 +0100 Subject: [PATCH 02/38] try smaller write-threshold --- src/utils/files_util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/files_util.js b/src/utils/files_util.js index 622c081..7507c1a 100644 --- a/src/utils/files_util.js +++ b/src/utils/files_util.js @@ -23,7 +23,7 @@ class FilesUtil extends SharedFilesUtil "followSymlinks": true, "disableGlobbing": true, "awaitWriteFinish": { - "stabilityThreshold": 1000 + "stabilityThreshold": 200 } }; From 8f1df90dfbfe883d022b1d7e8793a0017f2f053f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Wed, 6 Nov 2024 13:01:08 +0100 Subject: [PATCH 03/38] lower default loglevel, send opcode in external execute request --- package-lock.json | 1533 +++++++++++++++++++++++++++------- package.json | 6 +- src/electron/electron_api.js | 2 +- src/utils/files_util.js | 3 +- 4 files changed, 1236 insertions(+), 308 deletions(-) diff --git a/package-lock.json b/package-lock.json index 862b1d6..2b8096f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,11 +34,11 @@ "uuid-v4": "0.1.0" }, "devDependencies": { - "@electron/notarize": "2.3.2", + "@electron/notarize": "2.5.0", "copy-webpack-plugin": "12.0.2", "cross-env": "5.2.0", - "electron": "31.2.1", - "electron-builder": "24.13.3", + "electron": "32.2.2", + "electron-builder": "25.1.8", "git-last-commit": "1.0.1", "gulp": "5.0.0", "terser-webpack-plugin": "5.3.10", @@ -204,9 +204,9 @@ } }, "node_modules/@electron/asar": { - "version": "3.2.10", - "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.2.10.tgz", - "integrity": "sha512-mvBSwIBUeiRscrCeJE1LwctAriBj65eUDm0Pc11iE5gRwzkmsdbS7FnZ1XUWjpSeQWL1L5g12Fc/SchPM9DUOw==", + "version": "3.2.16", + "resolved": "https://registry.npmjs.org/@electron/asar/-/asar-3.2.16.tgz", + "integrity": "sha512-5M6EyPGmU35bYdXGOvjlzLE5bAVPN2nbcNtHPMt407KR8wNoHj+36AhUTwGUSZ03u2LleAp4qz9ga9lfNxak8g==", "dev": true, "dependencies": { "commander": "^5.0.0", @@ -305,9 +305,9 @@ } }, "node_modules/@electron/notarize": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.3.2.tgz", - "integrity": "sha512-zfayxCe19euNwRycCty1C7lF7snk9YwfRpB5M8GLr1a4ICH63znxaPNAubrMvj0yDvVozqfgsdYpXVUnpWBDpg==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.5.0.tgz", + "integrity": "sha512-jNT8nwH1f9X5GEITXaQ8IF/KdskvIkOFfB2CvwumsveVidzpSc+mvhhTMdAGSYF3O+Nq49lJ7y+ssODRXu06+A==", "dev": true, "dependencies": { "debug": "^4.1.1", @@ -334,9 +334,9 @@ } }, "node_modules/@electron/osx-sign": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.0.5.tgz", - "integrity": "sha512-k9ZzUQtamSoweGQDV2jILiRIHUu7lYlJ3c6IEmjv1hC17rclE+eb9U+f6UFlOOETo0JzY1HNlXy4YOlCvl+Lww==", + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@electron/osx-sign/-/osx-sign-1.3.1.tgz", + "integrity": "sha512-BAfviURMHpmb1Yb50YbCxnOY0wfwaLXH5KJ4+80zS0gUkzDX3ec23naTlEqKsN+PwYn+a1cCzM7BJ4Wcd3sGzw==", "dev": true, "dependencies": { "compare-version": "^0.1.2", @@ -380,59 +380,91 @@ "url": "https://github.com/sponsors/gjtorikian/" } }, - "node_modules/@electron/universal": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@electron/universal/-/universal-1.5.1.tgz", - "integrity": "sha512-kbgXxyEauPJiQQUNG2VgUeyfQNFk6hBF11ISN2PNI6agUgPl55pv4eQmaqHzTAzchBvqZ2tQuRVaPStGf0mxGw==", + "node_modules/@electron/rebuild": { + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/@electron/rebuild/-/rebuild-3.6.1.tgz", + "integrity": "sha512-f6596ZHpEq/YskUd8emYvOUne89ij8mQgjYFA5ru25QwbrRO+t1SImofdDv7kKOuWCmVOuU5tvfkbgGxIl3E/w==", "dev": true, "dependencies": { - "@electron/asar": "^3.2.1", - "@malept/cross-spawn-promise": "^1.1.0", - "debug": "^4.3.1", - "dir-compare": "^3.0.0", - "fs-extra": "^9.0.1", - "minimatch": "^3.0.4", - "plist": "^3.0.4" + "@malept/cross-spawn-promise": "^2.0.0", + "chalk": "^4.0.0", + "debug": "^4.1.1", + "detect-libc": "^2.0.1", + "fs-extra": "^10.0.0", + "got": "^11.7.0", + "node-abi": "^3.45.0", + "node-api-version": "^0.2.0", + "node-gyp": "^9.0.0", + "ora": "^5.1.0", + "read-binary-file-arch": "^1.0.6", + "semver": "^7.3.5", + "tar": "^6.0.5", + "yargs": "^17.0.1" + }, + "bin": { + "electron-rebuild": "lib/cli.js" }, "engines": { - "node": ">=8.6" + "node": ">=12.13.0" } }, - "node_modules/@electron/universal/node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/@electron/universal/node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "node_modules/@electron/rebuild/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": { - "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@electron/rebuild/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, "engines": { "node": ">=10" } }, + "node_modules/@electron/universal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@electron/universal/-/universal-2.0.1.tgz", + "integrity": "sha512-fKpv9kg4SPmt+hY7SVBnIYULE9QJl8L3sCfcBsnqbJwwBwAeTLokJ9TRt9y7bK0JAzIW2y78TVVjvnQEms/yyA==", + "dev": true, + "dependencies": { + "@electron/asar": "^3.2.7", + "@malept/cross-spawn-promise": "^2.0.0", + "debug": "^4.3.1", + "dir-compare": "^4.2.0", + "fs-extra": "^11.1.1", + "minimatch": "^9.0.3", + "plist": "^3.1.0" + }, + "engines": { + "node": ">=16.4" + } + }, "node_modules/@electron/universal/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/@eslint/eslintrc": { @@ -499,6 +531,12 @@ "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==" }, + "node_modules/@gar/promisify": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.3.tgz", + "integrity": "sha512-k2Ty1JcVojjJFwrg/ThKi2ujJ7XNLYaFGNB/bWT9wGR+oSMJHMa5w+CUq6p/pVrKeNNgA7pCqEcjSnHVoqJQFw==", + "dev": true + }, "node_modules/@gulpjs/messages": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@gulpjs/messages/-/messages-1.1.0.tgz", @@ -576,9 +614,9 @@ } }, "node_modules/@isaacs/cliui/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", + "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", "dev": true, "engines": { "node": ">=12" @@ -713,9 +751,9 @@ } }, "node_modules/@malept/cross-spawn-promise": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz", - "integrity": "sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-2.0.0.tgz", + "integrity": "sha512-1DpKU0Z5ThltBwjNySMC14g0CkbyhCaz9FkhxqNsZI6uAPJXFS8cMXlBKo26FJ8ZuW6S9GCMcR9IO5k2X5/9Fg==", "dev": true, "funding": [ { @@ -731,7 +769,7 @@ "cross-spawn": "^7.0.1" }, "engines": { - "node": ">= 10" + "node": ">= 12.13.0" } }, "node_modules/@malept/cross-spawn-promise/node_modules/cross-spawn": { @@ -858,6 +896,57 @@ "node": ">= 8" } }, + "node_modules/@npmcli/fs": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@npmcli/fs/-/fs-2.1.2.tgz", + "integrity": "sha512-yOJKRvohFOaLqipNtwYB9WugyZKhC/DZC4VYPmpaCzDBrA8YpK3qHZ8/HGscMnE4GqbkLNuVcCnxkeQEdGt6LQ==", + "dev": true, + "dependencies": { + "@gar/promisify": "^1.1.3", + "semver": "^7.3.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/@npmcli/fs/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/@npmcli/move-file": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@npmcli/move-file/-/move-file-2.0.1.tgz", + "integrity": "sha512-mJd2Z5TjYWq/ttPLLGqArdtnC74J6bOzg4rMDnN+p1xTacZ2yPRCk2y0oSWQtygLR9YVQXgOcONrwtnk3JupxQ==", + "deprecated": "This functionality has been moved to @npmcli/fs", + "dev": true, + "dependencies": { + "mkdirp": "^1.0.4", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/@npmcli/move-file/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", @@ -1226,6 +1315,12 @@ "integrity": "sha512-ukTPVhqG4jNzMro2qA9HSCSSVJN3aN7tlb+hfqYCt3ER0yWroeA2VR38MNrOHLQ/cVj+DaIMad0kFCtWWowh/A==", "dev": true }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, "node_modules/acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -1270,15 +1365,40 @@ } }, "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", + "integrity": "sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==", "dev": true, "dependencies": { - "debug": "4" + "debug": "^4.3.4" }, "engines": { - "node": ">= 6.0.0" + "node": ">= 14" + } + }, + "node_modules/agentkeepalive": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.5.0.tgz", + "integrity": "sha512-5GG/5IbQQpC9FpkRGsSvZI5QYeSCzlJHdpBQntCsuTOxhKD8lqKhrleg2Yi7yvMIf82Ycmmqln9U8V9qwEiJew==", + "dev": true, + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" } }, "node_modules/ajv": { @@ -1387,40 +1507,45 @@ } }, "node_modules/app-builder-bin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-4.0.0.tgz", - "integrity": "sha512-xwdG0FJPQMe0M0UA4Tz0zEB8rBJTRA5a476ZawAqiBkMv16GRK5xpXThOjMaEOFnZ6zabejjG4J3da0SXG63KA==", + "version": "5.0.0-alpha.10", + "resolved": "https://registry.npmjs.org/app-builder-bin/-/app-builder-bin-5.0.0-alpha.10.tgz", + "integrity": "sha512-Ev4jj3D7Bo+O0GPD2NMvJl+PGiBAfS7pUGawntBNpCbxtpncfUixqFj9z9Jme7V7s3LBGqsWZZP54fxBX3JKJw==", "dev": true }, "node_modules/app-builder-lib": { - "version": "24.13.3", - "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-24.13.3.tgz", - "integrity": "sha512-FAzX6IBit2POXYGnTCT8YHFO/lr5AapAII6zzhQO3Rw4cEDOgK+t1xhLc5tNcKlicTHlo9zxIwnYCX9X2DLkig==", + "version": "25.1.8", + "resolved": "https://registry.npmjs.org/app-builder-lib/-/app-builder-lib-25.1.8.tgz", + "integrity": "sha512-pCqe7dfsQFBABC1jeKZXQWhGcCPF3rPCXDdfqVKjIeWBcXzyC1iOWZdfFhGl+S9MyE/k//DFmC6FzuGAUudNDg==", "dev": true, "dependencies": { "@develar/schema-utils": "~2.6.5", - "@electron/notarize": "2.2.1", - "@electron/osx-sign": "1.0.5", - "@electron/universal": "1.5.1", + "@electron/notarize": "2.5.0", + "@electron/osx-sign": "1.3.1", + "@electron/rebuild": "3.6.1", + "@electron/universal": "2.0.1", "@malept/flatpak-bundler": "^0.4.0", "@types/fs-extra": "9.0.13", "async-exit-hook": "^2.0.1", "bluebird-lst": "^1.0.9", - "builder-util": "24.13.1", - "builder-util-runtime": "9.2.4", + "builder-util": "25.1.7", + "builder-util-runtime": "9.2.10", "chromium-pickle-js": "^0.2.0", + "config-file-ts": "0.2.8-rc1", "debug": "^4.3.4", + "dotenv": "^16.4.5", + "dotenv-expand": "^11.0.6", "ejs": "^3.1.8", - "electron-publish": "24.13.1", + "electron-publish": "25.1.7", "form-data": "^4.0.0", "fs-extra": "^10.1.0", "hosted-git-info": "^4.1.0", "is-ci": "^3.0.0", "isbinaryfile": "^5.0.0", "js-yaml": "^4.1.0", + "json5": "^2.2.3", "lazy-val": "^1.0.5", - "minimatch": "^5.1.1", - "read-config-file": "6.3.2", + "minimatch": "^10.0.0", + "resedit": "^1.7.0", "sanitize-filename": "^1.6.3", "semver": "^7.3.8", "tar": "^6.1.12", @@ -1430,57 +1555,43 @@ "node": ">=14.0.0" }, "peerDependencies": { - "dmg-builder": "24.13.3", - "electron-builder-squirrel-windows": "24.13.3" - } - }, - "node_modules/app-builder-lib/node_modules/@electron/notarize": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@electron/notarize/-/notarize-2.2.1.tgz", - "integrity": "sha512-aL+bFMIkpR0cmmj5Zgy0LMKEpgy43/hw5zadEArgmAMWWlKc5buwFvFT9G/o/YJkvXAJm5q3iuTuLaiaXW39sg==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "fs-extra": "^9.0.1", - "promise-retry": "^2.0.1" - }, - "engines": { - "node": ">= 10.0.0" + "dmg-builder": "25.1.8", + "electron-builder-squirrel-windows": "25.1.8" } }, - "node_modules/app-builder-lib/node_modules/@electron/notarize/node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", + "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": { - "at-least-node": "^1.0.0", "graceful-fs": "^4.2.0", "jsonfile": "^6.0.1", "universalify": "^2.0.0" }, "engines": { - "node": ">=10" + "node": ">=12" } }, - "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==", + "node_modules/app-builder-lib/node_modules/minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", "dev": true, "dependencies": { - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=12" + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/app-builder-lib/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -1489,6 +1600,12 @@ "node": ">=10" } }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true + }, "node_modules/archiver": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/archiver/-/archiver-5.3.1.tgz", @@ -1558,6 +1675,20 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/are-we-there-yet": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-3.0.1.tgz", + "integrity": "sha512-QZW4EDmGwlYur0Yyf/b2uGucHQMa8aFUP7eu9ddR73vvhFyt4V0Vl3QHPcTNJ8l6qYOBdxgXdnBXQrHilfRQBg==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/argparse": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", @@ -1928,18 +2059,6 @@ "node": "*" } }, - "node_modules/buffer-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", - "integrity": "sha512-QoV3ptgEaQpvVwbXdSO39iqPQTCxSF7A5U99AxbHYqUdCizL/lH2Z0A2y6nbZucxMEOtNyZfG2s6gsVugGpKkg==", - "dev": true, - "engines": { - "node": ">=0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -1947,22 +2066,22 @@ "dev": true }, "node_modules/builder-util": { - "version": "24.13.1", - "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-24.13.1.tgz", - "integrity": "sha512-NhbCSIntruNDTOVI9fdXz0dihaqX2YuE1D6zZMrwiErzH4ELZHE6mdiB40wEgZNprDia+FghRFgKoAqMZRRjSA==", + "version": "25.1.7", + "resolved": "https://registry.npmjs.org/builder-util/-/builder-util-25.1.7.tgz", + "integrity": "sha512-7jPjzBwEGRbwNcep0gGNpLXG9P94VA3CPAZQCzxkFXiV2GMQKlziMbY//rXPI7WKfhsvGgFXjTcXdBEwgXw9ww==", "dev": true, "dependencies": { "@types/debug": "^4.1.6", "7zip-bin": "~5.2.0", - "app-builder-bin": "4.0.0", + "app-builder-bin": "5.0.0-alpha.10", "bluebird-lst": "^1.0.9", - "builder-util-runtime": "9.2.4", + "builder-util-runtime": "9.2.10", "chalk": "^4.1.2", "cross-spawn": "^7.0.3", "debug": "^4.3.4", "fs-extra": "^10.1.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", "is-ci": "^3.0.0", "js-yaml": "^4.1.0", "source-map-support": "^0.5.19", @@ -1971,9 +2090,9 @@ } }, "node_modules/builder-util-runtime": { - "version": "9.2.4", - "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-9.2.4.tgz", - "integrity": "sha512-upp+biKpN/XZMLim7aguUyW8s0FUpDvOtK6sbanMFDAMBzpHDqdhgVYm6zc9HJ6nWo7u2Lxk60i2M6Jd3aiNrA==", + "version": "9.2.10", + "resolved": "https://registry.npmjs.org/builder-util-runtime/-/builder-util-runtime-9.2.10.tgz", + "integrity": "sha512-6p/gfG1RJSQeIbz8TK5aPNkoztgY1q5TgmGFMAXcY8itsGW6Y2ld1ALsZ5UJn8rog7hKF3zHx5iQbNQ8uLcRlw==", "dev": true, "dependencies": { "debug": "^4.3.4", @@ -2064,6 +2183,76 @@ "resolved": "../shared/client", "link": true }, + "node_modules/cacache": { + "version": "16.1.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-16.1.3.tgz", + "integrity": "sha512-/+Emcj9DAXxX4cwlLmRI9c166RuL3w30zp4R7Joiv2cQTtTtA+jeuCAjH3ZlGnYS3tKENSrKhAzVVP9GVyzeYQ==", + "dev": true, + "dependencies": { + "@npmcli/fs": "^2.1.0", + "@npmcli/move-file": "^2.0.0", + "chownr": "^2.0.0", + "fs-minipass": "^2.1.0", + "glob": "^8.0.1", + "infer-owner": "^1.0.4", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "mkdirp": "^1.0.4", + "p-map": "^4.0.0", + "promise-inflight": "^1.0.1", + "rimraf": "^3.0.2", + "ssri": "^9.0.0", + "tar": "^6.1.11", + "unique-filename": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/cacache/node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/cacache/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/cacache/node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/cacheable-lookup": { "version": "5.0.4", "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-5.0.4.tgz", @@ -2240,6 +2429,39 @@ "node": ">=8" } }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-truncate": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", @@ -2314,6 +2536,15 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true, + "bin": { + "color-support": "bin.js" + } + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -2364,41 +2595,39 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" }, "node_modules/config-file-ts": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/config-file-ts/-/config-file-ts-0.2.6.tgz", - "integrity": "sha512-6boGVaglwblBgJqGyxm4+xCmEGcWgnWHSWHY5jad58awQhB6gftq0G8HbzU39YqCIYHMLAiL1yjwiZ36m/CL8w==", + "version": "0.2.8-rc1", + "resolved": "https://registry.npmjs.org/config-file-ts/-/config-file-ts-0.2.8-rc1.tgz", + "integrity": "sha512-GtNECbVI82bT4RiDIzBSVuTKoSHufnU7Ce7/42bkWZJZFLjmDF2WBpVsvRkhKCfKBnTBb3qZrBwPpFBU/Myvhg==", "dev": true, "dependencies": { - "glob": "^10.3.10", - "typescript": "^5.3.3" + "glob": "^10.3.12", + "typescript": "^5.4.3" } }, "node_modules/config-file-ts/node_modules/glob": { - "version": "10.3.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.15.tgz", - "integrity": "sha512-0c6RlJt1TICLyvJYIApxb8GsXoai0KUP7AxKKAtsYXdgJR1mGEUa7DgwShbdk1nly0PYoZj01xd4hzbq3fsjpw==", + "version": "10.4.5", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.4.5.tgz", + "integrity": "sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.6", - "minimatch": "^9.0.1", - "minipass": "^7.0.4", - "path-scurry": "^1.11.0" + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, "bin": { "glob": "dist/esm/bin.mjs" }, - "engines": { - "node": ">=16 || 14 >=14.18" - }, "funding": { "url": "https://github.com/sponsors/isaacs" } }, "node_modules/config-file-ts/node_modules/minimatch": { - "version": "9.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", - "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "dependencies": { "brace-expansion": "^2.0.1" @@ -2411,9 +2640,9 @@ } }, "node_modules/config-file-ts/node_modules/minipass": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.1.tgz", - "integrity": "sha512-UZ7eQ+h8ywIRAW1hIEl2AqdwzJucU/Kp59+8kkZeSvafXhZjul247BvIJjEVFVeON6d7lM46XX1HXCduKAS8VA==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, "engines": { "node": ">=16 || 14 >=14.17" @@ -2424,6 +2653,12 @@ "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz", "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==" }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "dev": true + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2640,6 +2875,27 @@ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==" }, + "node_modules/defaults": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", + "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", + "dev": true, + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/defaults/node_modules/clone": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", + "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", + "dev": true, + "engines": { + "node": ">=0.8" + } + }, "node_modules/defer-to-connect": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-2.0.1.tgz", @@ -2690,6 +2946,12 @@ "node": ">=0.4.0" } }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "dev": true + }, "node_modules/detect-file": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", @@ -2699,6 +2961,15 @@ "node": ">=0.10.0" } }, + "node_modules/detect-libc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/detect-node": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz", @@ -2707,13 +2978,13 @@ "optional": true }, "node_modules/dir-compare": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/dir-compare/-/dir-compare-3.3.0.tgz", - "integrity": "sha512-J7/et3WlGUCxjdnD3HAAzQ6nsnc0WL6DD7WcwJb7c39iH1+AWfg+9OqzJNaI6PkBwBvm1mhZNL9iY/nRiZXlPg==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/dir-compare/-/dir-compare-4.2.0.tgz", + "integrity": "sha512-2xMCmOoMrdQIPHdsTawECdNPwlVFB9zGcz3kuhmBO6U3oU+UQjsue0i8ayLKpgBcm+hcXPMVSGUN9d+pvJ6+VQ==", "dev": true, "dependencies": { - "buffer-equal": "^1.0.0", - "minimatch": "^3.0.4" + "minimatch": "^3.0.5", + "p-limit": "^3.1.0 " } }, "node_modules/dir-compare/node_modules/brace-expansion": { @@ -2739,14 +3010,14 @@ } }, "node_modules/dmg-builder": { - "version": "24.13.3", - "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-24.13.3.tgz", - "integrity": "sha512-rcJUkMfnJpfCboZoOOPf4L29TRtEieHNOeAbYPWPxlaBw/Z1RKrRA86dOI9rwaI4tQSc/RD82zTNHprfUHXsoQ==", + "version": "25.1.8", + "resolved": "https://registry.npmjs.org/dmg-builder/-/dmg-builder-25.1.8.tgz", + "integrity": "sha512-NoXo6Liy2heSklTI5OIZbCgXC1RzrDQsZkeEwXhdOro3FT1VBOvbubvscdPnjVuQ4AMwwv61oaH96AbiYg9EnQ==", "dev": true, "dependencies": { - "app-builder-lib": "24.13.3", - "builder-util": "24.13.1", - "builder-util-runtime": "9.2.4", + "app-builder-lib": "25.1.8", + "builder-util": "25.1.7", + "builder-util-runtime": "9.2.10", "fs-extra": "^10.1.0", "iconv-lite": "^0.6.2", "js-yaml": "^4.1.0" @@ -2807,19 +3078,31 @@ } }, "node_modules/dotenv": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-9.0.2.tgz", - "integrity": "sha512-I9OvvrHp4pIARv4+x9iuewrWycX6CcZtoAu1XrzPxc5UygMJXJZYmBsynku8IkrJwgypE5DGNjDPmPRhDCptUg==", + "version": "16.4.5", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", + "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", "dev": true, "engines": { - "node": ">=10" + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" } }, "node_modules/dotenv-expand": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-5.1.0.tgz", - "integrity": "sha512-YXQl1DSa4/PQyRfgrv6aoNjhasp/p4qs9FjJ4q4cQk+8m4r6k4ZSiEyytKG8f8W9gi8WsQtIObNmKd+tMzNTmA==", - "dev": true + "version": "11.0.6", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.6.tgz", + "integrity": "sha512-8NHi73otpWsZGBSZwwknTXS5pqMOrk9+Ssrna8xCaxkzEpU9OTf9R5ArQGVw03//Zmk9MOwLPng9WwndvpAJ5g==", + "dev": true, + "dependencies": { + "dotenv": "^16.4.4" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } }, "node_modules/duplexer": { "version": "0.1.2", @@ -2862,9 +3145,9 @@ } }, "node_modules/electron": { - "version": "31.2.1", - "resolved": "https://registry.npmjs.org/electron/-/electron-31.2.1.tgz", - "integrity": "sha512-g3CLKjl4yuXt6VWm/KpgEjYYhFiCl19RgUn8lOC8zV/56ZXAS3+mqV4wWzicE/7vSYXs6GRO7vkYRwrwhX3Gaw==", + "version": "32.2.2", + "resolved": "https://registry.npmjs.org/electron/-/electron-32.2.2.tgz", + "integrity": "sha512-c7TRE42JcgEmJ4elJyCdKk/2os0UX7YMkRDeXBkxFEoM34iX1/2x+c5T9PgeroKz8FEG7omRU5TvjulqVtXvdw==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -2880,20 +3163,19 @@ } }, "node_modules/electron-builder": { - "version": "24.13.3", - "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-24.13.3.tgz", - "integrity": "sha512-yZSgVHft5dNVlo31qmJAe4BVKQfFdwpRw7sFp1iQglDRCDD6r22zfRJuZlhtB5gp9FHUxCMEoWGq10SkCnMAIg==", + "version": "25.1.8", + "resolved": "https://registry.npmjs.org/electron-builder/-/electron-builder-25.1.8.tgz", + "integrity": "sha512-poRgAtUHHOnlzZnc9PK4nzG53xh74wj2Jy7jkTrqZ0MWPoHGh1M2+C//hGeYdA+4K8w4yiVCNYoLXF7ySj2Wig==", "dev": true, "dependencies": { - "app-builder-lib": "24.13.3", - "builder-util": "24.13.1", - "builder-util-runtime": "9.2.4", + "app-builder-lib": "25.1.8", + "builder-util": "25.1.7", + "builder-util-runtime": "9.2.10", "chalk": "^4.1.2", - "dmg-builder": "24.13.3", + "dmg-builder": "25.1.8", "fs-extra": "^10.1.0", "is-ci": "^3.0.0", "lazy-val": "^1.0.5", - "read-config-file": "6.3.2", "simple-update-notifier": "2.0.0", "yargs": "^17.6.2" }, @@ -2906,15 +3188,15 @@ } }, "node_modules/electron-builder-squirrel-windows": { - "version": "24.13.3", - "resolved": "https://registry.npmjs.org/electron-builder-squirrel-windows/-/electron-builder-squirrel-windows-24.13.3.tgz", - "integrity": "sha512-oHkV0iogWfyK+ah9ZIvMDpei1m9ZRpdXcvde1wTpra2U8AFDNNpqJdnin5z+PM1GbQ5BoaKCWas2HSjtR0HwMg==", + "version": "25.1.8", + "resolved": "https://registry.npmjs.org/electron-builder-squirrel-windows/-/electron-builder-squirrel-windows-25.1.8.tgz", + "integrity": "sha512-2ntkJ+9+0GFP6nAISiMabKt6eqBB0kX1QqHNWFWAXgi0VULKGisM46luRFpIBiU3u/TDmhZMM8tzvo2Abn3ayg==", "dev": true, "peer": true, "dependencies": { - "app-builder-lib": "24.13.3", + "app-builder-lib": "25.1.8", "archiver": "^5.3.1", - "builder-util": "24.13.1", + "builder-util": "25.1.7", "fs-extra": "^10.1.0" } }, @@ -2972,14 +3254,14 @@ } }, "node_modules/electron-publish": { - "version": "24.13.1", - "resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-24.13.1.tgz", - "integrity": "sha512-2ZgdEqJ8e9D17Hwp5LEq5mLQPjqU3lv/IALvgp+4W8VeNhryfGhYEQC/PgDPMrnWUp+l60Ou5SJLsu+k4mhQ8A==", + "version": "25.1.7", + "resolved": "https://registry.npmjs.org/electron-publish/-/electron-publish-25.1.7.tgz", + "integrity": "sha512-+jbTkR9m39eDBMP4gfbqglDd6UvBC7RLh5Y0MhFSsc6UkGHj9Vj9TWobxevHYMMqmoujL11ZLjfPpMX+Pt6YEg==", "dev": true, "dependencies": { "@types/fs-extra": "^9.0.11", - "builder-util": "24.13.1", - "builder-util-runtime": "9.2.4", + "builder-util": "25.1.7", + "builder-util-runtime": "9.2.10", "chalk": "^4.1.2", "fs-extra": "^10.1.0", "lazy-val": "^1.0.5", @@ -3011,6 +3293,16 @@ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, + "node_modules/encoding": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, + "optional": true, + "dependencies": { + "iconv-lite": "^0.6.2" + } + }, "node_modules/end-of-stream": { "version": "1.4.4", "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", @@ -3755,6 +4047,12 @@ "node": ">=0.10.0" } }, + "node_modules/exponential-backoff": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", + "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", + "dev": true + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -4018,9 +4316,9 @@ } }, "node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", "dev": true, "dependencies": { "cross-spawn": "^7.0.0", @@ -4093,9 +4391,9 @@ } }, "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.1.tgz", + "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==", "dev": true, "dependencies": { "asynckit": "^0.4.0", @@ -4136,18 +4434,6 @@ "node": ">= 8" } }, - "node_modules/fs-minipass/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/fs-mkdirp-stream": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-2.0.1.tgz", @@ -4217,6 +4503,32 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/gauge": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz", + "integrity": "sha512-f9m+BEN5jkg6a0fZjleidjN51VE1X+mPFQ2DJ0uv1V39oCLCbsGe6yjbBnp7eK7z/+GAon99a3nHuqbuuthyPg==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.3", + "console-control-strings": "^1.1.0", + "has-unicode": "^2.0.1", + "signal-exit": "^3.0.7", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.5" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/gauge/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", @@ -4718,6 +5030,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "dev": true + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -4766,17 +5084,16 @@ "dev": true }, "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.2.tgz", + "integrity": "sha512-T1gkAiYYDWYx3V5Bmyu7HcfcvL7mUrTWiM6yOfa3PIphViJ/gFPbvidQ+veqSOHci/PxBcDabeUNCzpOODJZig==", "dev": true, "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" + "agent-base": "^7.1.0", + "debug": "^4.3.4" }, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/http2-wrapper": { @@ -4793,16 +5110,16 @@ } }, "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.5.tgz", + "integrity": "sha512-1e4Wqeblerz+tMKPIq2EMGiiWW1dIjZOksyHWSUm1rmuvw/how9hBHZ38lAGj5ID4Ik6EdkOw7NmWPy6LAwalw==", "dev": true, "dependencies": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" }, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/human-signals": { @@ -4813,6 +5130,15 @@ "node": ">=16.17.0" } }, + "node_modules/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dev": true, + "dependencies": { + "ms": "^2.0.0" + } + }, "node_modules/iconv-corefoundation": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/iconv-corefoundation/-/iconv-corefoundation-1.1.7.tgz", @@ -4906,6 +5232,21 @@ "node": ">=0.8.19" } }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/infer-owner": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/infer-owner/-/infer-owner-1.0.4.tgz", + "integrity": "sha512-IClj+Xz94+d7irH5qRyfJonOdfTzuDaifE6ZPWfx0N0+/ATZCbuTPq2prFl526urkQd90WyUKIh1DfBQ2hMz9A==", + "dev": true + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -4948,6 +5289,19 @@ "node": ">=10.13.0" } }, + "node_modules/ip-address": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/ip-address/-/ip-address-9.0.5.tgz", + "integrity": "sha512-zHtQzGojZXTwZTHQqra+ETKd4Sn3vgi7uBmlPoXVWZqYvuKmtI0l/VZTjqGmJY9x88GGOaZ9+G9ES8hC4T4X8g==", + "dev": true, + "dependencies": { + "jsbn": "1.1.0", + "sprintf-js": "^1.1.3" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/is-absolute": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", @@ -5102,6 +5456,21 @@ "node": ">=0.10.0" } }, + "node_modules/is-interactive": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", + "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-lambda": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-lambda/-/is-lambda-1.0.1.tgz", + "integrity": "sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ==", + "dev": true + }, "node_modules/is-negated-glob": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", @@ -5259,6 +5628,18 @@ "node": ">=0.10.0" } }, + "node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-valid-glob": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", @@ -5294,9 +5675,9 @@ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" }, "node_modules/isbinaryfile": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-5.0.2.tgz", - "integrity": "sha512-GvcjojwonMjWbTkfMpnVHVqXW/wKMYDfEpY94/8zy8HFMOqb/VL6oeONq9v87q4ttVlaTLnGXnJD4B5B1OTGIg==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-5.0.4.tgz", + "integrity": "sha512-YKBKVkKhty7s8rxddb40oOkuP0NbaeXrQvLin6QMHL7Ypiy2RW9LwOVrVgZRyOrhQlayMd9t+D8yDy8MKFTSDQ==", "dev": true, "engines": { "node": ">= 18.0.0" @@ -5320,16 +5701,13 @@ } }, "node_modules/jackspeak": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", - "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" }, - "engines": { - "node": ">=14" - }, "funding": { "url": "https://github.com/sponsors/isaacs" }, @@ -5338,9 +5716,9 @@ } }, "node_modules/jake": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.1.tgz", - "integrity": "sha512-61btcOHNnLnsOdtLgA5efqQWjnSi/vow5HbI7HMdKKWqvrKR1bLK3BPlJn9gcSaP2ewuamUSMB5XEy76KUIS2w==", + "version": "10.9.2", + "resolved": "https://registry.npmjs.org/jake/-/jake-10.9.2.tgz", + "integrity": "sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==", "dev": true, "dependencies": { "async": "^3.2.3", @@ -5423,6 +5801,12 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsbn": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-1.1.0.tgz", + "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==", + "dev": true + }, "node_modules/json-buffer": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", @@ -5638,6 +6022,22 @@ "resolved": "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz", "integrity": "sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw==" }, + "node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/lowercase-keys": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz", @@ -5659,6 +6059,81 @@ "node": ">=10" } }, + "node_modules/make-fetch-happen": { + "version": "10.2.1", + "resolved": "https://registry.npmjs.org/make-fetch-happen/-/make-fetch-happen-10.2.1.tgz", + "integrity": "sha512-NgOPbRiaQM10DYXvN3/hhGVI2M5MtITFryzBGxHM5p4wnFxsVCbxkrBrDsk+EZ5OB4jEOT7AjDxtdF+KVEFT7w==", + "dev": true, + "dependencies": { + "agentkeepalive": "^4.2.1", + "cacache": "^16.1.0", + "http-cache-semantics": "^4.1.0", + "http-proxy-agent": "^5.0.0", + "https-proxy-agent": "^5.0.0", + "is-lambda": "^1.0.1", + "lru-cache": "^7.7.1", + "minipass": "^3.1.6", + "minipass-collect": "^1.0.2", + "minipass-fetch": "^2.0.3", + "minipass-flush": "^1.0.5", + "minipass-pipeline": "^1.2.4", + "negotiator": "^0.6.3", + "promise-retry": "^2.0.1", + "socks-proxy-agent": "^7.0.0", + "ssri": "^9.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/make-fetch-happen/node_modules/http-proxy-agent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", + "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "dev": true, + "dependencies": { + "@tootallnate/once": "2", + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/make-fetch-happen/node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/make-fetch-happen/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, "node_modules/map-cache": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", @@ -5815,39 +6290,95 @@ } }, "node_modules/minipass": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", - "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, "engines": { "node": ">=8" } }, - "node_modules/minizlib": { + "node_modules/minipass-collect": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/minipass-collect/-/minipass-collect-1.0.2.tgz", + "integrity": "sha512-6T6lH0H8OG9kITm/Jm6tdooIbogG9e0tLgpY6mphXSm/A9u8Nq1ryBG+Qspiub9LjWlBPsPS3tWQ/Botq4FdxA==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minipass-fetch": { "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-2.1.2.tgz", + "integrity": "sha512-LT49Zi2/WMROHYoqGgdlQIZh8mLPZmOrN2NdJjMXxYe4nkN6FUyuPuOAOedNJDrx0IRGg9+4guZewtp8hE6TxA==", "dev": true, "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" + "minipass": "^3.1.6", + "minipass-sized": "^1.0.3", + "minizlib": "^2.1.2" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + }, + "optionalDependencies": { + "encoding": "^0.1.13" + } + }, + "node_modules/minipass-flush": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", + "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" }, "engines": { "node": ">= 8" } }, - "node_modules/minizlib/node_modules/minipass": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", - "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "node_modules/minipass-pipeline": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/minipass-pipeline/-/minipass-pipeline-1.2.4.tgz", + "integrity": "sha512-xuIq7cIOt09RPRJ19gdi4b+RiNvDFYe5JH+ggNvBqGqpQXcru3PcRmOZuHBKWK1Txf9+cQ+HMVN4d6z46LZP7A==", "dev": true, "dependencies": { - "yallist": "^4.0.0" + "minipass": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass-sized": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/minipass-sized/-/minipass-sized-1.0.3.tgz", + "integrity": "sha512-MbkQQ2CTiBMlA2Dm/5cY+9SWFEN8pzzOXi6rlM5Xxq0Yqbda5ZQy9sU75a673FE9ZK0Zsbr6Y5iP6u9nktfg2g==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" }, "engines": { "node": ">=8" } }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/mkdirp": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.3.tgz", @@ -5867,59 +6398,180 @@ "resolved": "https://registry.npmjs.org/moment-mini/-/moment-mini-2.29.4.tgz", "integrity": "sha512-uhXpYwHFeiTbY9KSgPPRoo1nt8OxNVdMVoTBYHfSEKeRkIkwGpO+gERmhuhBtzfaeOyTkykSrm2+noJBgqt3Hg==" }, - "node_modules/mrmime": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", - "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "node_modules/mrmime": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", + "integrity": "sha512-eu38+hdgojoyq63s+yTpN4XMBdt5l8HhMhc4VKLO9KM5caLIBvUm4thi7fFaxyTmCKeNnXZ5pAlBwCUnhA09uw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/mute-stdout": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-2.0.0.tgz", + "integrity": "sha512-32GSKM3Wyc8dg/p39lWPKYu8zci9mJFzV1Np9Of0ZEpe6Fhssn/FbI7ywAMd40uX+p3ZKh3T5EeCFv81qS3HmQ==", + "dev": true, + "engines": { + "node": ">= 10.13.0" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" + }, + "node_modules/negotiator": { + "version": "0.6.4", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.4.tgz", + "integrity": "sha512-myRT3DiWPHqho5PrJaIRyaMv2kgYf0mUVgBNOYMuCH5Ki1yEiQaf/ZJuQ62nvpc44wL5WDbTX7yGJi1Neevw8w==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node_modules/node-abi": { + "version": "3.71.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.71.0.tgz", + "integrity": "sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw==", + "dev": true, + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-abi/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-addon-api": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz", + "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==", + "dev": true, + "optional": true + }, + "node_modules/node-api-version": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/node-api-version/-/node-api-version-0.2.0.tgz", + "integrity": "sha512-fthTTsi8CxaBXMaBAD7ST2uylwvsnYxh2PfaScwpMhos6KlSFajXQPcM4ogNE1q2s3Lbz9GCGqeIHC+C6OZnKg==", + "dev": true, + "dependencies": { + "semver": "^7.3.5" + } + }, + "node_modules/node-api-version/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-gyp": { + "version": "9.4.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-9.4.1.tgz", + "integrity": "sha512-OQkWKbjQKbGkMf/xqI1jjy3oCTgMKJac58G2+bjZb3fza6gW2YrCSdMQYaoTb70crvE//Gngr4f0AgVHmqHvBQ==", + "dev": true, + "dependencies": { + "env-paths": "^2.2.0", + "exponential-backoff": "^3.1.1", + "glob": "^7.1.4", + "graceful-fs": "^4.2.6", + "make-fetch-happen": "^10.0.3", + "nopt": "^6.0.0", + "npmlog": "^6.0.0", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.2", + "which": "^2.0.2" + }, + "bin": { + "node-gyp": "bin/node-gyp.js" + }, + "engines": { + "node": "^12.13 || ^14.13 || >=16" + } + }, + "node_modules/node-gyp/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, + "bin": { + "semver": "bin/semver.js" + }, "engines": { "node": ">=10" } }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/mute-stdout": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-2.0.0.tgz", - "integrity": "sha512-32GSKM3Wyc8dg/p39lWPKYu8zci9mJFzV1Np9Of0ZEpe6Fhssn/FbI7ywAMd40uX+p3ZKh3T5EeCFv81qS3HmQ==", + "node_modules/node-gyp/node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, "engines": { - "node": ">= 10.13.0" + "node": ">= 8" } }, - "node_modules/natural-compare": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", - "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==" - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node_modules/node-addon-api": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.2.tgz", - "integrity": "sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg==", - "dev": true, - "optional": true - }, "node_modules/node-releases": { "version": "2.0.14", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, + "node_modules/nopt": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-6.0.0.tgz", + "integrity": "sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g==", + "dev": true, + "dependencies": { + "abbrev": "^1.0.0" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -8562,6 +9214,22 @@ "inBundle": true, "license": "ISC" }, + "node_modules/npmlog": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-6.0.2.tgz", + "integrity": "sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "are-we-there-yet": "^3.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^4.0.3", + "set-blocking": "^2.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/object-inspect": { "version": "1.13.1", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", @@ -8698,6 +9366,29 @@ "node": ">= 0.8.0" } }, + "node_modules/ora": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", + "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "dev": true, + "dependencies": { + "bl": "^4.1.0", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-spinners": "^2.5.0", + "is-interactive": "^1.0.0", + "is-unicode-supported": "^0.1.0", + "log-symbols": "^4.1.0", + "strip-ansi": "^6.0.0", + "wcwidth": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/p-cancelable": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-2.1.1.tgz", @@ -8707,6 +9398,42 @@ "node": ">=8" } }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz", + "integrity": "sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true + }, "node_modules/pako": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/pako/-/pako-2.1.0.tgz", @@ -8806,12 +9533,18 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.2.tgz", - "integrity": "sha512-9hp3Vp2/hFQUiIwKo8XCeFVnrg8Pk3TYNPIR7tJADKi5YfcF7vEaK7avFHTlSy3kOKYaJQaalfEo6YuXdceBOQ==", + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", + "dev": true + }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", "dev": true, "engines": { - "node": "14 || >=16.14" + "node": ">=16 || 14 >=14.17" } }, "node_modules/path-type": { @@ -8826,6 +9559,20 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pe-library": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/pe-library/-/pe-library-0.4.1.tgz", + "integrity": "sha512-eRWB5LBz7PpDu4PUlwT0PhnQfTQJlDDdPa35urV4Osrm0t0AqQFGn+UIkU3klZvwJ8KPO3VbBFsXquA6p6kqZw==", + "dev": true, + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jet2jet" + } + }, "node_modules/pend": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", @@ -8912,6 +9659,12 @@ "node": ">= 6" } }, + "node_modules/promise-inflight": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz", + "integrity": "sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g==", + "dev": true + }, "node_modules/promise-retry": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/promise-retry/-/promise-retry-2.0.1.tgz", @@ -8998,21 +9751,16 @@ "safe-buffer": "^5.1.0" } }, - "node_modules/read-config-file": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/read-config-file/-/read-config-file-6.3.2.tgz", - "integrity": "sha512-M80lpCjnE6Wt6zb98DoW8WHR09nzMSpu8XHtPkiTHrJ5Az9CybfeQhTJ8D7saeBHpGhLPIVyA8lcL6ZmdKwY6Q==", + "node_modules/read-binary-file-arch": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/read-binary-file-arch/-/read-binary-file-arch-1.0.6.tgz", + "integrity": "sha512-BNg9EN3DD3GsDXX7Aa8O4p92sryjkmzYYgmgTAc6CA4uGLEDzFfxOxugu21akOxpcXHiEgsYkC6nPsQvLLLmEg==", "dev": true, "dependencies": { - "config-file-ts": "^0.2.4", - "dotenv": "^9.0.2", - "dotenv-expand": "^5.1.0", - "js-yaml": "^4.1.0", - "json5": "^2.2.0", - "lazy-val": "^1.0.4" + "debug": "^4.3.4" }, - "engines": { - "node": ">=12.0.0" + "bin": { + "read-binary-file-arch": "cli.js" } }, "node_modules/readable-stream": { @@ -9128,6 +9876,23 @@ "node": ">=0.10.0" } }, + "node_modules/resedit": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/resedit/-/resedit-1.7.2.tgz", + "integrity": "sha512-vHjcY2MlAITJhC0eRD/Vv8Vlgmu9Sd3LX9zZvtGzU5ZImdTN3+d6e/4mnTyV8vEbyf1sgNIrWxhWlrys52OkEA==", + "dev": true, + "dependencies": { + "pe-library": "^0.4.1" + }, + "engines": { + "node": ">=12", + "npm": ">=6" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/jet2jet" + } + }, "node_modules/resolve": { "version": "1.22.8", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", @@ -9195,6 +9960,49 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/restore-cursor/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/restore-cursor/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/restore-cursor/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, "node_modules/retry": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/retry/-/retry-0.12.0.tgz", @@ -9336,9 +10144,9 @@ } }, "node_modules/sax": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", - "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", + "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", "dev": true }, "node_modules/schema-utils": { @@ -9460,6 +10268,12 @@ "randombytes": "^2.1.0" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true + }, "node_modules/set-function-length": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", @@ -9609,12 +10423,51 @@ "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", "dev": true, - "optional": true, "engines": { "node": ">= 6.0.0", "npm": ">= 3.0.0" } }, + "node_modules/socks": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.8.3.tgz", + "integrity": "sha512-l5x7VUUWbjVFbafGLxPWkYsHIhEvmF85tbIeFZWc8ZPtoMyybuEhL7Jye/ooC4/d48FgOjSJXgsF/AJPYCW8Zw==", + "dev": true, + "dependencies": { + "ip-address": "^9.0.5", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.0.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dev": true, + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/socks-proxy-agent/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -9647,8 +10500,19 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.3.tgz", "integrity": "sha512-Oo+0REFV59/rz3gfJNKQiBlwfHaSESl1pcGyABQsnnIfWOFt6JNj5gCog2U6MLZ//IGYD+nA8nI+mTShREReaA==", + "dev": true + }, + "node_modules/ssri": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/ssri/-/ssri-9.0.1.tgz", + "integrity": "sha512-o57Wcn66jMQvfHG1FlYbWeZWW/dHZhJXjpIcTfXldXEk5nz5lStPo3mK0OJQfGR3RbZUlbISexbljkJzuEj/8Q==", "dev": true, - "optional": true + "dependencies": { + "minipass": "^3.1.1" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } }, "node_modules/stat-mode": { "version": "1.0.0", @@ -9968,6 +10832,15 @@ "node": ">=6" } }, + "node_modules/tar/node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/tar/node_modules/mkdirp": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", @@ -10278,9 +11151,9 @@ } }, "node_modules/typescript": { - "version": "5.4.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", - "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", + "version": "5.6.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", + "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -10364,6 +11237,30 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/unique-filename": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-2.0.1.tgz", + "integrity": "sha512-ODWHtkkdx3IAR+veKxFV+VBkUMcN+FaqzUUd7IZzt+0zhDZFPFxhlqwPF3YQvMHx1TD0tdgYl+kuPnJ8E6ql7A==", + "dev": true, + "dependencies": { + "unique-slug": "^3.0.0" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, + "node_modules/unique-slug": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-3.0.0.tgz", + "integrity": "sha512-8EyMynh679x/0gqE9fT9oilG+qEt+ibFyqjuVTsZn1+CMxH+XLlpvr2UZx4nVcCwTpx81nICr2JQFkM+HPLq4w==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4" + }, + "engines": { + "node": "^12.13.0 || ^14.15.0 || >=16.0.0" + } + }, "node_modules/universalify": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", @@ -10585,6 +11482,15 @@ "node": ">=10.13.0" } }, + "node_modules/wcwidth": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", + "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", + "dev": true, + "dependencies": { + "defaults": "^1.0.3" + } + }, "node_modules/webpack": { "version": "5.91.0", "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz", @@ -10771,6 +11677,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "node_modules/word-wrap": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", @@ -10901,6 +11816,18 @@ "fd-slicer": "~1.1.0" } }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/zip-stream": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-4.1.1.tgz", diff --git a/package.json b/package.json index 5ce0cde..775add4 100644 --- a/package.json +++ b/package.json @@ -138,11 +138,11 @@ "uuid-v4": "0.1.0" }, "devDependencies": { - "@electron/notarize": "2.3.2", + "@electron/notarize": "2.5.0", "copy-webpack-plugin": "12.0.2", "cross-env": "5.2.0", - "electron": "31.2.1", - "electron-builder": "24.13.3", + "electron": "32.2.2", + "electron-builder": "25.1.8", "git-last-commit": "1.0.1", "gulp": "5.0.0", "terser-webpack-plugin": "5.3.10", diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index 50d6866..4951b11 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -1626,7 +1626,7 @@ class ElectronApi } } - error(msg, data = null, level = "error") + error(msg, data = null, level = "warn") { const error = { "error": true, "msg": msg, "level": level }; if (data) error.data = data; diff --git a/src/utils/files_util.js b/src/utils/files_util.js index 7507c1a..6224a17 100644 --- a/src/utils/files_util.js +++ b/src/utils/files_util.js @@ -34,7 +34,8 @@ class FilesUtil extends SharedFilesUtil if (opName) { const opId = opsUtil.getOpIdByObjName(opName); - electronApp.sendTalkerMessage("executeOp", { "name": opName, "forceReload": true, "id": opId }); + const code = opsUtil.getOpCode(opName); + electronApp.sendTalkerMessage("executeOp", { "name": opName, "forceReload": true, "id": opId, "code": code }); } }); From 6c77a063afca11c49078f71a07331af5b3d63be7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Thu, 7 Nov 2024 12:37:11 +0100 Subject: [PATCH 04/38] remember "allow pasting", add services and "hide" to about menu on osx --- src/electron/electron_settings.js | 2 +- src/electron/main.js | 53 ++++++++++++++++--------------- 2 files changed, 28 insertions(+), 27 deletions(-) diff --git a/src/electron/electron_settings.js b/src/electron/electron_settings.js index 0484a7b..7d05bbc 100644 --- a/src/electron/electron_settings.js +++ b/src/electron/electron_settings.js @@ -14,7 +14,7 @@ class ElectronSettings constructor(storageDir) { this._log = logger; - this.SESSION_PARTITION = "persist:cables:" + helper.generateUUID(); + this.SESSION_PARTITION = "persist:cables:standalone"; if (storageDir && !fs.existsSync(storageDir)) { diff --git a/src/electron/main.js b/src/electron/main.js index ad00251..d119766 100644 --- a/src/electron/main.js +++ b/src/electron/main.js @@ -15,13 +15,12 @@ import helper from "../utils/helper_util.js"; import Npm from "../../node_modules/npm/lib/npm.js"; import opsUtil from "../utils/ops_util.js"; -app.commandLine.appendSwitch("disable-http-cache"); -app.commandLine.appendSwitch("force_high_performance_gpu"); -app.commandLine.appendSwitch("unsafely-disable-devtools-self-xss-warnings"); +app.commandLine.appendSwitch("disable-http-cache", "true"); +app.commandLine.appendSwitch("force_high_performance_gpu", "true"); app.commandLine.appendSwitch("lang", "EN"); app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required"); app.commandLine.appendSwitch("no-user-gesture-required", "true"); -app.commandLine.appendSwitch("disable-hid-blocklist"); +app.commandLine.appendSwitch("disable-hid-blocklist", "true"); app.disableDomainBlockingFor3DAPIs(); @@ -389,32 +388,34 @@ class ElectronApp inspectElementAcc = "CmdOrCtrl+Option+C"; consoleAcc = "CmdOrCtrl+Option+J"; } + const aboutMenu = []; + aboutMenu.push({ + "label": "About Cables", + "click": () => { this._showAbout(); } + }); + aboutMenu.push({ "type": "separator" }); + if (isOsX) + { + aboutMenu.push({ "role": "services" }); + aboutMenu.push({ "type": "separator" }); + aboutMenu.push({ "role": "hide", "label": "Hide Cables" }); + aboutMenu.push({ "role": "hideOthers" }); + aboutMenu.push({ "role": "unhide" }); + aboutMenu.push({ "type": "separator" }); + } + + aboutMenu.push({ + "role": "quit", + "label": "Quit", + "accelerator": "CmdOrCtrl+Q", + "click": () => { app.quit(); } + }); const menuTemplate = [ { "role": "appMenu", - "label": "cables", - "submenu": [ - { - "label": "About Cables", - "click": () => - { - this._showAbout(); - } - }, - { - "type": "separator" - }, - { - "role": "quit", - "label": "Quit", - "accelerator": "CmdOrCtrl+Q", - "click": () => - { - app.quit(); - } - } - ] + "label": "Cables", + "submenu": aboutMenu }, { "label": "File", From 5541673f442db9a581ffb6f453c878687a476c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Thu, 7 Nov 2024 12:49:01 +0100 Subject: [PATCH 05/38] runtime info in "about" --- src/electron/main.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/electron/main.js b/src/electron/main.js index d119766..f6f7b97 100644 --- a/src/electron/main.js +++ b/src/electron/main.js @@ -957,10 +957,21 @@ class ElectronApp } if (buildInfo.api.platform) { - versionText += "\n"; + versionText += "\nbuilt with:\n"; if (buildInfo.api.platform.node) versionText += "node: " + buildInfo.api.platform.node + "\n"; if (buildInfo.api.platform.npm) versionText += "npm: " + buildInfo.api.platform.npm; } + if (process.versions) + { + versionText += "\n\nrunning in:\n"; + if (process.versions.electron) versionText += "electron: " + process.versions.electron + "\n"; + if (process.versions.chrome) versionText += "chrome: " + process.versions.chrome + "\n"; + if (process.versions.v8) versionText += "v8: " + process.versions.v8 + "\n"; + + if (process.versions.node) versionText += "node: " + process.versions.node + "\n"; + if (buildInfo.api.platform.npm) versionText += "npm: " + buildInfo.api.platform.npm; + } + options.detail = versionText; } dialog.showMessageBox(options); From 14af661db7535448e49a6bd0e9c4f6c9f4cfaac2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Thu, 7 Nov 2024 14:21:53 +0100 Subject: [PATCH 06/38] upgrading electron breaks file drop-upload - https://www.electronjs.org/docs/latest/breaking-changes#removed-filepath --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2b8096f..30712c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "@electron/notarize": "2.5.0", "copy-webpack-plugin": "12.0.2", "cross-env": "5.2.0", - "electron": "32.2.2", + "electron": "31.7.3", "electron-builder": "25.1.8", "git-last-commit": "1.0.1", "gulp": "5.0.0", @@ -3145,9 +3145,9 @@ } }, "node_modules/electron": { - "version": "32.2.2", - "resolved": "https://registry.npmjs.org/electron/-/electron-32.2.2.tgz", - "integrity": "sha512-c7TRE42JcgEmJ4elJyCdKk/2os0UX7YMkRDeXBkxFEoM34iX1/2x+c5T9PgeroKz8FEG7omRU5TvjulqVtXvdw==", + "version": "31.7.3", + "resolved": "https://registry.npmjs.org/electron/-/electron-31.7.3.tgz", + "integrity": "sha512-pZ3ChhQL5THjagmhVqgb2dsePDIyUKSalv8bARziTSTk1pLbtJRja0OLIuuHktl387vRcDJZ0x4YWzI52x/TlQ==", "dev": true, "hasInstallScript": true, "dependencies": { diff --git a/package.json b/package.json index 775add4..1cd0c25 100644 --- a/package.json +++ b/package.json @@ -141,7 +141,7 @@ "@electron/notarize": "2.5.0", "copy-webpack-plugin": "12.0.2", "cross-env": "5.2.0", - "electron": "32.2.2", + "electron": "31.7.3", "electron-builder": "25.1.8", "git-last-commit": "1.0.1", "gulp": "5.0.0", From d1cf3ae7fc657d853237c4f45f3addcc339c0521 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Thu, 7 Nov 2024 15:41:03 +0100 Subject: [PATCH 07/38] remove sourcecode zips for now --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4d6e1a3..9cfbee4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -127,3 +127,5 @@ jobs: assets: | *.yml *.blockmap + v${{ inputs.tag_name }}.zip + v${{ inputs.tag_name }}.tar.gz From 0cf79224b44d05f85661073f7bf75a44103de769 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Fri, 8 Nov 2024 11:05:36 +0100 Subject: [PATCH 08/38] notarize --- package.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/package.json b/package.json index 1cd0c25..8c2d991 100644 --- a/package.json +++ b/package.json @@ -66,9 +66,6 @@ ], "mac": { "artifactName": "${productName}-${version}-${os}-${arch}.${ext}", - "notarize": { - "teamId": "3HHYN68G6F" - }, "hardenedRuntime": true, "gatekeeperAssess": false, "entitlements": "resources/build/entitlements.mac.plist", From f2a021a15fe617f0e1d573a1a7eeb377b0bc80d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Fri, 8 Nov 2024 13:09:44 +0100 Subject: [PATCH 09/38] module loading --- package-lock.json | 27 +++++++++++++++++++++------ package.json | 5 ++++- src/electron/electron_api.js | 26 ++++++++++++++++++++++++++ src/electron/electron_endpoint.js | 7 +++++++ src_client/standalone.js | 10 ++++++++-- 5 files changed, 66 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 30712c9..0d77413 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,6 +25,7 @@ "jsonfile": "6.1.0", "marked": "12.0.2", "md5-file": "5.0.0", + "mime": "^4.0.4", "mkdirp": "2.1.3", "moment-mini": "2.29.4", "npm": "10.5.2", @@ -3282,6 +3283,18 @@ "node": ">=12" } }, + "node_modules/electron-publish/node_modules/mime": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", + "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", + "dev": true, + "bin": { + "mime": "cli.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/electron-to-chromium": { "version": "1.4.776", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.776.tgz", @@ -6218,15 +6231,17 @@ } }, "node_modules/mime": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-2.6.0.tgz", - "integrity": "sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==", - "dev": true, + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/mime/-/mime-4.0.4.tgz", + "integrity": "sha512-v8yqInVjhXyqP6+Kw4fV3ZzeMRqEW6FotRsKXjRS5VMTNIuXsdRoAvklpoRgSqXm6o9VNH4/C0mgedko9DdLsQ==", + "funding": [ + "https://github.com/sponsors/broofa" + ], "bin": { - "mime": "cli.js" + "mime": "bin/cli.js" }, "engines": { - "node": ">=4.0.0" + "node": ">=16" } }, "node_modules/mime-db": { diff --git a/package.json b/package.json index 8c2d991..31d817a 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,9 @@ "nodeVersion": "20.13.1", "asar": true, "includeSubNodeModules": true, - "electronLanguages": ["en-US"], + "electronLanguages": [ + "en-US" + ], "files": [ "cables.json", "src/**/*", @@ -126,6 +128,7 @@ "jsonfile": "6.1.0", "marked": "12.0.2", "md5-file": "5.0.0", + "mime": "^4.0.4", "mkdirp": "2.1.3", "moment-mini": "2.29.4", "npm": "10.5.2", diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index 4951b11..ab99f8b 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -8,6 +8,7 @@ import { promisify } from "util"; import jsonfile from "jsonfile"; import sanitizeFileName from "sanitize-filename"; import { utilProvider } from "cables-shared-api"; +import { createRequire } from "module"; import cables from "../cables.js"; import logger from "../utils/logger.js"; import doc from "../utils/doc_util.js"; @@ -73,6 +74,31 @@ class ElectronApi const opDir = opsUtil.getOpAbsolutePath(opName); event.returnValue = path.join(opDir, "node_modules", data.moduleName); }); + + ipcMain.on("getOpModuleFile", (event, data) => + { + let opName = opsUtil.getOpNameById(data.opId); + if (!opName) opName = data.opName; + const opDir = opsUtil.getOpAbsolutePath(opName); + const moduleDir = path.join(opDir, "node_modules"); + const moduleRequire = createRequire(moduleDir); + if (moduleRequire) + { + try + { + event.returnValue = helper.pathToFileURL(moduleRequire.resolve(data.moduleName)); + } + catch (e) + { + this._log.error(e.message); + event.returnValue = null; + } + } + else + { + event.returnValue = null; + } + }); } async talkerMessage(cmd, data, topicConfig = {}) diff --git a/src/electron/electron_endpoint.js b/src/electron/electron_endpoint.js index 2ef668f..d693d54 100644 --- a/src/electron/electron_endpoint.js +++ b/src/electron/electron_endpoint.js @@ -1,6 +1,7 @@ import { protocol, session, net, shell } from "electron"; import fs from "fs"; import path from "path"; +import mime from "mime"; import cables from "../cables.js"; import logger from "../utils/logger.js"; @@ -444,6 +445,12 @@ class ElectronEndpoint response.headers.append("Content-Range", "bytes 0-" + stats.size + "/" + (stats.size + 1)); response.headers.append("Last-Modified", stats.mtime.toUTCString()); } + let mimeType = mime.getType(existingFile); + if (mimeType) + { + if (mimeType === "application/node") mimeType = "text/javascript"; + response.headers.set("Content-Type", mimeType); + } } catch (e) {} return response; diff --git a/src_client/standalone.js b/src_client/standalone.js index 06b1a31..9ee2a70 100644 --- a/src_client/standalone.js +++ b/src_client/standalone.js @@ -224,9 +224,15 @@ export default class CablesStandalone } catch (e2) { - const errorMessage = "failed to load node module: " + moduleName; + const errorMessage = "require by name:\n" + e2 + "\n\nrequire by path:\n" + e; + const options = { + "title": "failed to load node module: " + moduleName, + "codeText": errorMessage.replace(/(.{80})/g, "$1\n") + }; + + new this.CABLES.UI.ModalError(options); if (op) op.setUiError("oprequire", errorMessage); - this._log.error(errorMessage, e2, e); + this._log.warn(errorMessage, e2, e); return ""; } } From 4dcc6ef5b02aa2142825d80b18e99d16d348839b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Mon, 11 Nov 2024 13:19:15 +0100 Subject: [PATCH 10/38] file dialog no error --- src/electron/electron_api.js | 16 +++++++++++----- src/export/export_zip_standalone.js | 1 - src_client/electron_editor.js | 14 ++++++++++---- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index ab99f8b..45e868c 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -126,7 +126,7 @@ class ElectronApi } else { - return this.error("no project dir chosen", null, "info"); + return this.error("no directory chosen", null, "info"); } } } @@ -1267,7 +1267,6 @@ class ElectronApi const projectFile = await electronApp.saveProjectFileDialog(); if (!projectFile) { - logger.info("no project dir chosen"); return this.error("no project dir chosen", null, "info"); } @@ -1362,7 +1361,7 @@ class ElectronApi } else { - return this.error("no project dir chosen", [], "info"); + return this.error("no directory chosen", [], "info"); } } @@ -1601,8 +1600,15 @@ class ElectronApi { let file = data.name; let pickedFileUrl = await electronApp.saveFileDialog(file); - if (pickedFileUrl) fs.writeFileSync(pickedFileUrl, ""); - return this.success("OK", pickedFileUrl, true); + if (pickedFileUrl) + { + fs.writeFileSync(pickedFileUrl, ""); + return this.success("OK", pickedFileUrl, true); + } + else + { + return this.success("NO_DIR_CHOSEN", null, true); + } } async exportPatch() diff --git a/src/export/export_zip_standalone.js b/src/export/export_zip_standalone.js index 3419e6a..4340e17 100644 --- a/src/export/export_zip_standalone.js +++ b/src/export/export_zip_standalone.js @@ -99,7 +99,6 @@ export default class StandaloneZipExport extends SharedExportService else { const outputErr = "no export directory chosen"; - this._log.error("export error", outputErr); const result = { "error": outputErr }; callbackFinished(result); } diff --git a/src_client/electron_editor.js b/src_client/electron_editor.js index 18f1c6f..7b3fbc5 100644 --- a/src_client/electron_editor.js +++ b/src_client/electron_editor.js @@ -144,11 +144,17 @@ export default class ElectronEditor { this.api("createFile", data, (error, r) => { - if (error) this._talker.send("logError", { "level": error.level, "message": error.msg || error }); - if (window.standalone && window.standalone.gui) + if (error) + { + this._talker.send("logError", { "level": error.level, "message": error.msg || error }); + } + else { - window.standalone.gui.patchView.addAssetOpAuto(r); - window.standalone.gui.fileManagerEditor.editAssetTextFile("file:" + r, "text"); + if (window.standalone && window.standalone.gui && r) + { + window.standalone.gui.patchView.addAssetOpAuto(r); + window.standalone.gui.fileManagerEditor.editAssetTextFile("file:" + r, "text"); + } } next(error, r); }); From 3100594ca1d92264a2a959ba94cae16e79c49fed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Tue, 12 Nov 2024 09:17:45 +0100 Subject: [PATCH 11/38] remove new namespace warning in standalone --- src/electron/electron_api.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index 45e868c..af87d5f 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -1708,13 +1708,6 @@ class ElectronApi const hints = {}; const consequences = opsUtil.getOpRenameConsequences(newName, oldName, targetDir); - const newNamespace = opsUtil.getNamespace(newName); - const existingNamespace = opsUtil.namespaceExists(newNamespace, opDocs); - if (!existingNamespace) - { - hints.new_namespace = "New op will create a new namespace " + newNamespace; - } - let newOpDocs = opDocs; if (!opsUtil.isCoreOp(newName)) newOpDocs = doc.getCollectionOpDocs(newName, currentUser); From 28b0bfc895f2bb68357b8c4249be6379d90cf062 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Tue, 12 Nov 2024 09:55:57 +0100 Subject: [PATCH 12/38] fix manage op numbers --- src/electron/electron_api.js | 29 +++++++++++++++++++++++++++++ src/utils/projects_util.js | 2 -- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index af87d5f..0267863 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -1345,6 +1345,35 @@ class ElectronApi { const currentProject = settings.getCurrentProject(); const dirInfos = projectsUtil.getOpDirs(currentProject, false); + + const opDirs = {}; + if (currentProject && currentProject.ops) + { + currentProject.ops.forEach((op) => + { + const opName = opsUtil.getOpNameById(op.opId); + const opPath = opsUtil.getOpAbsolutePath(opName); + if (opPath) + { + if (!opDirs.hasOwnProperty(opPath)) opDirs[opPath] = 0; + opDirs[opPath]++; + } + }); + } + + dirInfos.forEach((dirInfo) => + { + if (!dirInfo.hasOwnProperty("numUsedOps")) dirInfo.numUsedOps = 0; + for (const opDir in opDirs) + { + const count = opDirs[opDir]; + if (opDir.startsWith(dirInfo.dir)) + { + dirInfo.numUsedOps += count; + } + } + }); + return this.success("OK", dirInfos); } diff --git a/src/utils/projects_util.js b/src/utils/projects_util.js index 2da3656..8756433 100644 --- a/src/utils/projects_util.js +++ b/src/utils/projects_util.js @@ -242,14 +242,12 @@ class ProjectsUtil extends SharedProjectsUtil opLocations[jsonName] = path.dirname(path.join(dir, jsonLocation)); } }); - let numUsedOps = 0; const opNames = Object.keys(opLocations); dirInfos.push({ "dir": dir, "opLocations": opLocations, "numOps": opNames.length, - "numUsedOps": numUsedOps, "fixedPlace": this.isFixedPositionOpDir(dir) }); }); From 8e0038148d9cdce71190b9da5bb8c7e57f9b98be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Tue, 12 Nov 2024 10:41:23 +0100 Subject: [PATCH 13/38] default idlemode off --- src/electron/electron_settings.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/electron/electron_settings.js b/src/electron/electron_settings.js index 7d05bbc..56c163c 100644 --- a/src/electron/electron_settings.js +++ b/src/electron/electron_settings.js @@ -35,7 +35,9 @@ class ElectronSettings this.opts = {}; this.opts.defaults = {}; this.opts.configName = this.MAIN_CONFIG_NAME; - this.opts.defaults[this.USER_SETTINGS_FIELD] = {}; + this.opts.defaults[this.USER_SETTINGS_FIELD] = { + "noidlemode": true + }; this.opts.defaults[this.PATCHID_FIELD] = null; this.opts.defaults[this.PROJECTFILE_FIELD] = null; this.opts.defaults[this.CURRENTPROJECTDIR_FIELD] = null; From 636002e46801c58b1f333198512817b578602d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Tue, 12 Nov 2024 12:34:06 +0100 Subject: [PATCH 14/38] set new patch unsaved, handle rename and save --- src/electron/electron_api.js | 16 ++++++---------- src/electron/electron_settings.js | 4 +++- src/electron/main.js | 3 ++- src/utils/projects_util.js | 5 +++++ src_client/cmd_electron.js | 5 +++-- src_client/electron_editor.js | 2 +- src_client/standalone.js | 7 +++++++ 7 files changed, 27 insertions(+), 15 deletions(-) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index 0267863..89a635d 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -110,9 +110,9 @@ class ElectronApi if (topicConfig.needsProjectFile) { const projectFile = settings.getCurrentProjectFile(); - if (!projectFile || !projectFile.endsWith(projectsUtil.CABLES_PROJECT_FILE_EXTENSION)) + if (!projectFile) { - const newProjectFile = await electronApp.saveProjectFileDialog(); + const newProjectFile = await electronApp.saveProjectFileDialog(data.name); if (newProjectFile) { let patchData = null; @@ -126,7 +126,7 @@ class ElectronApi } else { - return this.error("no directory chosen", null, "info"); + return this.error("CANCELLED", null, "info"); } } } @@ -1262,9 +1262,9 @@ class ElectronApi return this.success("OK", { "assets": [], "countPatches": 0, "countOps": 0 }, true); } - async saveProjectAs() + async saveProjectAs(data) { - const projectFile = await electronApp.saveProjectFileDialog(); + const projectFile = await electronApp.saveProjectFileDialog(data.name); if (!projectFile) { return this.error("no project dir chosen", null, "info"); @@ -1386,12 +1386,8 @@ class ElectronApi { currentProject = projectsUtil.addOpDir(currentProject, opDir, true); projectsUtil.writeProjectToFile(settings.getCurrentProjectFile(), currentProject); - return this.success("OK", projectsUtil.getProjectOpDirs(currentProject, true)); - } - else - { - return this.error("no directory chosen", [], "info"); } + return this.success("OK", projectsUtil.getProjectOpDirs(currentProject, true)); } async removeProjectOpDir(dirName) diff --git a/src/electron/electron_settings.js b/src/electron/electron_settings.js index 56c163c..4357dc9 100644 --- a/src/electron/electron_settings.js +++ b/src/electron/electron_settings.js @@ -170,7 +170,9 @@ class ElectronSettings getCurrentProjectFile() { - return this.get(this.PROJECTFILE_FIELD); + const projectFile = this.get(this.PROJECTFILE_FIELD); + if (projectFile && projectFile.endsWith(projectsUtil.CABLES_PROJECT_FILE_EXTENSION)) return projectFile; + return null; } getBuildInfo() diff --git a/src/electron/main.js b/src/electron/main.js index f6f7b97..cac4733 100644 --- a/src/electron/main.js +++ b/src/electron/main.js @@ -329,7 +329,7 @@ class ElectronApp }); } - async saveProjectFileDialog() + async saveProjectFileDialog(defaultPath) { const extensions = []; extensions.push(projectsUtil.CABLES_PROJECT_FILE_EXTENSION); @@ -339,6 +339,7 @@ class ElectronApp return dialog.showSaveDialog(this.editorWindow, { "title": title, "properties": properties, + "defaultPath": defaultPath, "filters": [{ "name": "cables project", "extensions": extensions, diff --git a/src/utils/projects_util.js b/src/utils/projects_util.js index 8756433..8aa50d7 100644 --- a/src/utils/projects_util.js +++ b/src/utils/projects_util.js @@ -73,6 +73,11 @@ class ProjectsUtil extends SharedProjectsUtil }; } + getNewProjectName(randomize = false) + { + return "untitled"; + } + getProjectOpDirs(project, includeOsDir = true, reverse = false, addLocalCoreIfPackaged = true) { let opsDirs = []; diff --git a/src_client/cmd_electron.js b/src_client/cmd_electron.js index e5a7df1..3b82622 100644 --- a/src_client/cmd_electron.js +++ b/src_client/cmd_electron.js @@ -242,9 +242,10 @@ CABLES_CMD_STANDALONE.addOpPackage = (options, next) => }; CABLES_CMD_STANDALONE_OVERRIDES.PATCH = {}; -CABLES_CMD_STANDALONE_OVERRIDES.PATCH.saveAs = () => +CABLES_CMD_STANDALONE_OVERRIDES.PATCH.saveAs = (data) => { - standalone.editor.api("saveProjectAs", { }, (_err, r) => {}); + let patchName = standalone.gui.project() ? standalone.gui.project().name : null; + standalone.editor.api("saveProjectAs", { "name": patchName }, (_err, r) => {}); }; CABLES_CMD_STANDALONE_OVERRIDES.PATCH.uploadFileDialog = () => { diff --git a/src_client/electron_editor.js b/src_client/electron_editor.js index 7b3fbc5..e7292c0 100644 --- a/src_client/electron_editor.js +++ b/src_client/electron_editor.js @@ -198,7 +198,7 @@ export default class ElectronEditor "opSaveLayout": { }, "opSetSummary": { }, "checkNumAssetPatches": {}, - "saveProjectAs": {}, + "saveProjectAs": { }, "gotoPatch": {}, "getProjectOpDirs": {}, "openDir": {}, diff --git a/src_client/standalone.js b/src_client/standalone.js index 9ee2a70..bfc3561 100644 --- a/src_client/standalone.js +++ b/src_client/standalone.js @@ -87,6 +87,13 @@ export default class CablesStandalone }); } waitForAce(); + if (this.gui) + { + this.gui.on("uiloaded", () => + { + if (this.editor && this.editor.config && !this.editor.config.patchFile) this.gui.setStateUnsaved(); + }); + } }); }; if (this._settings.uiLoadStart) this.editorWindow.CABLESUILOADER.uiLoadStart -= this._settings.uiLoadStart; From 4ca4cffb876628bf78aea27562ca4dc34dee1611 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Mon, 18 Nov 2024 10:10:02 +0100 Subject: [PATCH 15/38] idlemode default off --- src/electron/electron_settings.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/electron/electron_settings.js b/src/electron/electron_settings.js index 4357dc9..1e6c3c5 100644 --- a/src/electron/electron_settings.js +++ b/src/electron/electron_settings.js @@ -35,9 +35,7 @@ class ElectronSettings this.opts = {}; this.opts.defaults = {}; this.opts.configName = this.MAIN_CONFIG_NAME; - this.opts.defaults[this.USER_SETTINGS_FIELD] = { - "noidlemode": true - }; + this.opts.defaults[this.USER_SETTINGS_FIELD] = {}; this.opts.defaults[this.PATCHID_FIELD] = null; this.opts.defaults[this.PROJECTFILE_FIELD] = null; this.opts.defaults[this.CURRENTPROJECTDIR_FIELD] = null; From 40eb7ce50c7a37f14988f21a417fa0a99115a842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Mon, 18 Nov 2024 14:20:21 +0100 Subject: [PATCH 16/38] only suggest local namespace in op create dropdown --- src/electron/electron_api.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index 89a635d..f91f0b1 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -1701,13 +1701,10 @@ class ElectronApi availableNamespaces = projectOpDocs.map((opDoc) => { return opsUtil.getNamespace(opDoc.name, true); }); } - availableNamespaces.unshift("Ops.Standalone."); availableNamespaces = availableNamespaces.map((availableNamespace) => { return availableNamespace.endsWith(".") ? availableNamespace : availableNamespace + "."; }); availableNamespaces = helper.uniqueArray(availableNamespaces); availableNamespaces = availableNamespaces.sort((a, b) => { return a.localeCompare(b); }); - availableNamespaces.unshift("Ops."); - if (project) { availableNamespaces.unshift(opsUtil.getPatchOpsNamespaceForProject(project)); From 7f4a8eeeb43646b4485e18c5a45969c7ba6af91d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Mon, 18 Nov 2024 15:05:14 +0100 Subject: [PATCH 17/38] bluetooth?! --- src/electron/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/electron/main.js b/src/electron/main.js index cac4733..09ff78b 100644 --- a/src/electron/main.js +++ b/src/electron/main.js @@ -21,7 +21,7 @@ app.commandLine.appendSwitch("lang", "EN"); app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required"); app.commandLine.appendSwitch("no-user-gesture-required", "true"); app.commandLine.appendSwitch("disable-hid-blocklist", "true"); - +app.commandLine.appendSwitch("enable-web-bluetooth"); app.disableDomainBlockingFor3DAPIs(); logger.info("--- starting"); From c11d2f5ad443922cde12fe30bd5ac29e275e1051 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Mon, 18 Nov 2024 15:29:50 +0100 Subject: [PATCH 18/38] add electron op commands - cables-gl/cables/issues/6654 --- src_client/cmd_electron.js | 44 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git a/src_client/cmd_electron.js b/src_client/cmd_electron.js index 3b82622..9714cc0 100644 --- a/src_client/cmd_electron.js +++ b/src_client/cmd_electron.js @@ -241,6 +241,33 @@ CABLES_CMD_STANDALONE.addOpPackage = (options, next) => }); }; +CABLES_CMD_STANDALONE.copyOpDirToClipboard = () => +{ + const gui = standalone.gui; + if (gui) + { + const ops = gui.patchView.getSelectedOps(); + if (!ops.length) return; + + const op = ops[0]; + const modulePath = window.ipcRenderer.sendSync("getOpDir", { "opId": op.opId, "opName": op.name }); + if (modulePath) navigator.clipboard.writeText(modulePath); + } +}; + +CABLES_CMD_STANDALONE.openOpDirectory = () => +{ + const gui = standalone.gui; + if (gui) + { + const ops = gui.patchView.getSelectedOps(); + if (!ops.length) return; + + const op = ops[0]; + CABLES_CMD_STANDALONE.openOpDir(op.opId, op.name); + } +}; + CABLES_CMD_STANDALONE_OVERRIDES.PATCH = {}; CABLES_CMD_STANDALONE_OVERRIDES.PATCH.saveAs = (data) => { @@ -310,13 +337,13 @@ CMD_STANDALONE_COMMANDS.push( "icon": "electron" }, { - "cmd": "copy assets into patch dir", + "cmd": "collect assets into patch dir", "category": "patch", "func": CABLES_CMD_STANDALONE.collectAssets, "icon": "file" }, { - "cmd": "copy ops into patch dir", + "cmd": "collect ops into patch dir", "category": "ops", "func": CABLES_CMD_STANDALONE.collectOps, "icon": "op" @@ -333,6 +360,19 @@ CMD_STANDALONE_COMMANDS.push( "func": CABLES_CMD_STANDALONE.addOpPackage, "icon": "op" }, + { + "cmd": "copy op dir to clipboard", + "category": "ops", + "func": CABLES_CMD_STANDALONE.copyOpDirToClipboard, + "icon": "op" + }, + { + "cmd": "open op directory", + "category": "ops", + "func": CABLES_CMD_STANDALONE.openOpDirectory, + "icon": "op" + + } ); export default { From 57a36baade7f48e302932ef0162afef8acbf2578 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Mon, 18 Nov 2024 15:40:20 +0100 Subject: [PATCH 19/38] opname --- src_client/cmd_electron.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src_client/cmd_electron.js b/src_client/cmd_electron.js index 9714cc0..4193001 100644 --- a/src_client/cmd_electron.js +++ b/src_client/cmd_electron.js @@ -290,17 +290,21 @@ CABLES_CMD_STANDALONE_OVERRIDES.PATCH.newPatch = () => standalone.editor.api("newPatch", { }, (_err, r) => {}); }; -CABLES_CMD_STANDALONE_OVERRIDES.PATCH.renameOp = () => +CABLES_CMD_STANDALONE_OVERRIDES.PATCH.renameOp = (opName) => { const gui = standalone.gui; if (gui) { - const ops = gui.patchView.getSelectedOps(); - if (!ops.length) return; + if (!opName) + { + const ops = gui.patchView.getSelectedOps(); + if (!ops.length) return; - const op = ops[0]; + const op = ops[0]; + opName = op.objName; + } - gui.serverOps.renameDialog(op.objName); + gui.serverOps.renameDialog(opName); } }; From 63b208cc371365b7d96a83470e3a8c68e79d0d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Mon, 18 Nov 2024 17:38:00 +0100 Subject: [PATCH 20/38] Ops.Local and flat opdirs --- src/electron/electron_api.js | 2 ++ src/utils/ops_util.js | 29 +++++++++++++++++++++++++++-- src/utils/projects_util.js | 2 +- 3 files changed, 30 insertions(+), 3 deletions(-) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index f91f0b1..39f1c36 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -1709,7 +1709,9 @@ class ElectronApi { availableNamespaces.unshift(opsUtil.getPatchOpsNamespaceForProject(project)); } + if (opNamespace && !availableNamespaces.includes(opNamespace)) availableNamespaces.unshift(opNamespace); + availableNamespaces = availableNamespaces.filter((availableNamespace) => { return availableNamespace.startsWith(opsUtil.PREFIX_OPS); }); let removeOld = newName && !(opsUtil.isExtensionOp(newName) && opsUtil.isCoreOp(newName)); diff --git a/src/utils/ops_util.js b/src/utils/ops_util.js index bda2ac9..0cdc3c0 100644 --- a/src/utils/ops_util.js +++ b/src/utils/ops_util.js @@ -6,6 +6,12 @@ import filesUtil from "./files_util.js"; class OpsUtil extends SharedOpsUtil { + constructor(provider) + { + super(provider); + this.PREFIX_LOCAL_OPS = "Ops.Local."; + } + validateAndFormatOpCode(code) { return { @@ -100,8 +106,17 @@ class OpsUtil extends SharedOpsUtil getOpTargetDir(opName, relative = false) { - if (relative) return super.getOpTargetDir(opName, relative); - return projectsUtil.getAbsoluteOpDirFromHierarchy(opName); + let targetDir = ""; + if (relative) + { + if (opName.endsWith(".")) opName = opName.substring(0, opName.length - 1); + return path.join(opName, "/"); + } + else + { + targetDir = projectsUtil.getAbsoluteOpDirFromHierarchy(opName); + } + return targetDir; } getOpSourceNoHierarchy(opName, relative = false) @@ -255,5 +270,15 @@ class OpsUtil extends SharedOpsUtil let newOpDir = oldOpDir.replace(oldName, newName); return this._renameOp(oldName, newName, currentUser, false, removeOld, newId, oldOpDir, newOpDir, cb); } + + getPatchOpNamespace(opName) + { + return this.getNamespace(opName); + } + + getPatchOpsNamespaceForProject(proj) + { + return this.PREFIX_LOCAL_OPS; + } } export default new OpsUtil(utilProvider); diff --git a/src/utils/projects_util.js b/src/utils/projects_util.js index 8aa50d7..d50f467 100644 --- a/src/utils/projects_util.js +++ b/src/utils/projects_util.js @@ -86,7 +86,7 @@ class ProjectsUtil extends SharedProjectsUtil if (projectDir) { const currentDir = path.join(projectDir, "ops/"); - if (fs.existsSync(currentDir)) opsDirs.push(currentDir); + opsDirs.push(currentDir); } if (project && project.dirs && project.dirs.ops) From e161acf4bff57414e4ff7a1505f6ebe34f6e5d5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Tue, 19 Nov 2024 15:51:01 +0100 Subject: [PATCH 21/38] unify npm error handling --- src/electron/electron_api.js | 19 ++++-- src/electron/main.js | 85 ++++++++++----------------- src/export/export_patch_standalone.js | 2 +- src_client/standalone.js | 23 ++++++-- 4 files changed, 64 insertions(+), 65 deletions(-) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index 39f1c36..d0386ed 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -1081,7 +1081,7 @@ class ElectronApi return this.success("OP_DELETED", { "opNames": [opName] }); } - async installOpDependencies(opName) + async _installOpDependencies(opName) { const results = []; if (opName) @@ -1100,7 +1100,7 @@ class ElectronApi const npmResults = await electronApp.installPackages(targetDir, opPackages, opName); if (npmResults.stderr) { - return this.error(npmResults.stderr); + return this.error("NPM_ERROR", npmResults, "error"); } else { @@ -1157,7 +1157,14 @@ class ElectronApi } const npmResults = await Promise.all(allNpmInstalls); - return this.success("OK", npmResults); + if (npmResults.some((result) => { return result.error; })) + { + return this.error("NPM_ERROR", npmResults, "error"); + } + else + { + return this.success("OK", npmResults); + } } } @@ -1561,7 +1568,7 @@ class ElectronApi opDoc = doc.cleanOpDocData(opDoc); jsonfile.writeFileSync(opDocFile, opDoc, { "encoding": "utf-8", "spaces": 4 }); doc.updateOpDocs(); - const npmResult = await this.installOpDependencies(opName); + const npmResult = await this._installOpDependencies(opName); if (npmResult.error) { // remove deps again on install error @@ -1574,7 +1581,7 @@ class ElectronApi opDoc = doc.cleanOpDocData(opDoc); jsonfile.writeFileSync(opDocFile, opDoc, { "encoding": "utf-8", "spaces": 4 }); doc.updateOpDocs(); - await this.installOpDependencies(opName); + await this._installOpDependencies(opName); } return npmResult; } @@ -1608,7 +1615,7 @@ class ElectronApi opDoc.dependencies = newDeps; if (opDoc.dependencies) jsonfile.writeFileSync(opDocFile, opDoc, { "encoding": "utf-8", "spaces": 4 }); doc.updateOpDocs(); - return this.installOpDependencies(opName); + return this._installOpDependencies(opName); } else { diff --git a/src/electron/main.js b/src/electron/main.js index 09ff78b..de57f9e 100644 --- a/src/electron/main.js +++ b/src/electron/main.js @@ -101,41 +101,10 @@ class ElectronApp async installPackages(targetDir, packageNames, opName = null) { if (!targetDir || !packageNames || packageNames.length === 0) return { "stdout": "nothing to install", "packages": [] }; - let result = { "stdout": "", "stderr": "", "packages": packageNames, "targetDir": targetDir }; + + const result = await this._installNpmPackages(packageNames, targetDir); if (opName) result.opName = opName; - this._npm.config.localPrefix = targetDir; - const logToVariable = (level, ...args) => - { - switch (level) - { - case "standard": - args.forEach((arg) => - { - result.stdout += arg; - }); - break; - case "error": - args.forEach((arg) => - { - result.stderr += arg; - }); - break; - case "buffer": - case "flush": - default: - } - }; - process.on("output", logToVariable); - this._log.debug("installing", packageNames, "to", opName, targetDir); - try - { - await this._npm.exec("install", packageNames); - } - catch (e) - { - result.stderr += e; - } - process.off("output", logToVariable); + if (fs.existsSync(path.join(targetDir, "package.json"))) fs.rmSync(path.join(targetDir, "package.json")); if (fs.existsSync(path.join(targetDir, "package-lock.json"))) fs.rmSync(path.join(targetDir, "package-lock.json")); return result; @@ -148,8 +117,31 @@ class ElectronApp const dirName = path.join(os.tmpdir(), "cables-oppackage-"); const tmpDir = fs.mkdtempSync(dirName); - let result = { "stdout": "", "stderr": "", "packages": [], "targetDir": targetDir }; - this._npm.config.localPrefix = tmpDir; + const result = await this._installNpmPackages([opPackageLocation], tmpDir); + + const nodeModulesDir = path.join(tmpDir, "node_modules"); + if (fs.existsSync(nodeModulesDir)) + { + const importedDocs = doc.getOpDocsInDir(nodeModulesDir); + Object.keys(importedDocs).forEach((opDocFile) => + { + const opDoc = importedDocs[opDocFile]; + const opName = opDoc.name; + const sourceDir = path.join(nodeModulesDir, path.dirname(opDocFile)); + let opTargetDir = path.join(targetDir, opsUtil.getOpTargetDir(opName, true)); + fs.cpSync(sourceDir, opTargetDir, { "recursive": true }); + result.packages.push(opName); + }); + fs.rmSync(tmpDir, { "recursive": true }); + } + return result; + } + + async _installNpmPackages(packageNames, targetDir) + { + this._npm.config.localPrefix = targetDir; + + let result = { "stdout": "", "stderr": "", "packages": packageNames, "targetDir": targetDir }; const logToVariable = (level, ...args) => { @@ -164,6 +156,7 @@ class ElectronApp case "error": args.forEach((arg) => { + result.error = true; result.stderr += arg; }); break; @@ -173,31 +166,17 @@ class ElectronApp } }; process.on("output", logToVariable); - this._log.debug("installing op package", opPackageLocation, "to", targetDir); + this._log.debug("installing", packageNames, "to", targetDir); try { - await this._npm.exec("install", [opPackageLocation]); + await this._npm.exec("install", packageNames); } catch (e) { + result.error = true; result.stderr += e; } process.off("output", logToVariable); - const nodeModulesDir = path.join(tmpDir, "node_modules"); - if (fs.existsSync(nodeModulesDir)) - { - const importedDocs = doc.getOpDocsInDir(nodeModulesDir); - Object.keys(importedDocs).forEach((opDocFile) => - { - const opDoc = importedDocs[opDocFile]; - const opName = opDoc.name; - const sourceDir = path.join(nodeModulesDir, path.dirname(opDocFile)); - let opTargetDir = path.join(targetDir, opsUtil.getOpTargetDir(opName, true)); - fs.cpSync(sourceDir, opTargetDir, { "recursive": true }); - result.packages.push(opName); - }); - fs.rmSync(tmpDir, { "recursive": true }); - } return result; } diff --git a/src/export/export_patch_standalone.js b/src/export/export_patch_standalone.js index 64d4655..e57263f 100644 --- a/src/export/export_patch_standalone.js +++ b/src/export/export_patch_standalone.js @@ -25,7 +25,7 @@ export default class StandaloneExport extends StandaloneZipExport static getName() { - return "standalone"; + return "patch"; } _replaceInString(replacements, theString) diff --git a/src_client/standalone.js b/src_client/standalone.js index bfc3561..2d68ca3 100644 --- a/src_client/standalone.js +++ b/src_client/standalone.js @@ -78,15 +78,28 @@ export default class CablesStandalone this._logStartup("checking/installing op dependencies..."); this._electron.ipcRenderer.invoke("talkerMessage", "installProjectDependencies").then((npmResult) => { - if (npmResult.msg !== "EMPTY" && npmResult.msg !== "UNSAVED_PROJECT") + waitForAce(); + + if (npmResult.error && npmResult.data) { - npmResult.data.forEach((result) => + npmResult.data.forEach((msg) => { - const npmText = result.stderr || result.stdout; - this._logStartup(result.opName + ": " + npmText); + const opName = msg.opName ? " for " + msg.opName : ""; + this._log.error("failed dependency" + opName + ": " + msg.stderr); }); } - waitForAce(); + else + { + if (npmResult.msg !== "EMPTY" && npmResult.msg !== "UNSAVED_PROJECT") + { + npmResult.data.forEach((result) => + { + const npmText = result.stderr || result.stdout; + this._logStartup(result.opName + ": " + npmText); + }); + } + } + if (this.gui) { this.gui.on("uiloaded", () => From 985fac841f0a4c5be596acd9418ee26b9884a41d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Tue, 19 Nov 2024 16:24:45 +0100 Subject: [PATCH 22/38] display errors with node-gyp and space in path - nodejs/node-gyp/issues/65 --- src/electron/main.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/electron/main.js b/src/electron/main.js index de57f9e..369c7f2 100644 --- a/src/electron/main.js +++ b/src/electron/main.js @@ -173,10 +173,22 @@ class ElectronApp } catch (e) { + result.exception = String(e); result.error = true; - result.stderr += e; + result.stderr += e + e.stderr; + if (e.script && e.script.includes("gyp")) result.nativeCompile = true; } process.off("output", logToVariable); + if (result.exception && result.exception === "Error: command failed") + { + if (result.nativeCompile) + { + if (targetDir.includes(" ")) + { + result.stderr = "tried to compile native module with a space in the pathname, try moving your op..."; + } + } + } return result; } From 4e026406a39ef0519d0754cb926b1275b661bb16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Tue, 19 Nov 2024 17:45:07 +0100 Subject: [PATCH 23/38] more handling of node-gyp errors --- src/electron/electron_api.js | 17 +---------------- src/electron/main.js | 16 ++++++++++++++-- src_client/standalone.js | 12 ++++-------- 3 files changed, 19 insertions(+), 26 deletions(-) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index d0386ed..e14f938 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -1568,22 +1568,7 @@ class ElectronApi opDoc = doc.cleanOpDocData(opDoc); jsonfile.writeFileSync(opDocFile, opDoc, { "encoding": "utf-8", "spaces": 4 }); doc.updateOpDocs(); - const npmResult = await this._installOpDependencies(opName); - if (npmResult.error) - { - // remove deps again on install error - const newDeps = []; - opDoc.dependencies.forEach((opDep) => - { - if (!(options.name === opDep.name && options.type === opDep.type)) newDeps.push(opDep); - }); - opDoc.dependencies = newDeps; - opDoc = doc.cleanOpDocData(opDoc); - jsonfile.writeFileSync(opDocFile, opDoc, { "encoding": "utf-8", "spaces": 4 }); - doc.updateOpDocs(); - await this._installOpDependencies(opName); - } - return npmResult; + return await this._installOpDependencies(opName); } else { diff --git a/src/electron/main.js b/src/electron/main.js index 369c7f2..465b079 100644 --- a/src/electron/main.js +++ b/src/electron/main.js @@ -102,7 +102,7 @@ class ElectronApp { if (!targetDir || !packageNames || packageNames.length === 0) return { "stdout": "nothing to install", "packages": [] }; - const result = await this._installNpmPackages(packageNames, targetDir); + const result = await this._installNpmPackages(packageNames, targetDir, opName); if (opName) result.opName = opName; if (fs.existsSync(path.join(targetDir, "package.json"))) fs.rmSync(path.join(targetDir, "package.json")); @@ -137,12 +137,13 @@ class ElectronApp return result; } - async _installNpmPackages(packageNames, targetDir) + async _installNpmPackages(packageNames, targetDir, opName = null) { this._npm.config.localPrefix = targetDir; let result = { "stdout": "", "stderr": "", "packages": packageNames, "targetDir": targetDir }; + const oldConsole = console.log; const logToVariable = (level, ...args) => { switch (level) @@ -166,6 +167,7 @@ class ElectronApp } }; process.on("output", logToVariable); + console.log = (l) => { result.stdout += l; }; this._log.debug("installing", packageNames, "to", targetDir); try { @@ -179,6 +181,7 @@ class ElectronApp if (e.script && e.script.includes("gyp")) result.nativeCompile = true; } process.off("output", logToVariable); + console.log = oldConsole; if (result.exception && result.exception === "Error: command failed") { if (result.nativeCompile) @@ -187,6 +190,15 @@ class ElectronApp { result.stderr = "tried to compile native module with a space in the pathname, try moving your op..."; } + else + { + result.stderr = "failed to natively compile using node-gyp"; + if (opName) + { + const onClick = "CABLES.CMD.STANDALONE.openOpDir('', '" + opName + "');"; + result.stderr += ", try running 'npm --prefix ./ install " + packageNames.join(" ") + "' manually in the op dir"; + } + } } } return result; diff --git a/src_client/standalone.js b/src_client/standalone.js index 2d68ca3..8af2167 100644 --- a/src_client/standalone.js +++ b/src_client/standalone.js @@ -244,15 +244,11 @@ export default class CablesStandalone } catch (e2) { - const errorMessage = "require by name:\n" + e2 + "\n\nrequire by path:\n" + e; - const options = { - "title": "failed to load node module: " + moduleName, - "codeText": errorMessage.replace(/(.{80})/g, "$1\n") - }; - - new this.CABLES.UI.ModalError(options); + let errorMessage = "failed to load node module: " + moduleName + "\n\n"; + errorMessage += "require by name:\n" + e2 + "\n\n"; + errorMessage += "require by path:\n" + e; if (op) op.setUiError("oprequire", errorMessage); - this._log.warn(errorMessage, e2, e); + this._log.error(errorMessage, e2, e); return ""; } } From 3af27e2d992b4d0b0f9b93e0f3a854f5d5f924db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Wed, 20 Nov 2024 17:10:16 +0100 Subject: [PATCH 24/38] more npm loading/installing help, loading and error handling --- package.json | 1 + src/electron/electron_api.js | 23 +++++++++++-- src/electron/main.js | 2 +- src/utils/ops_util.js | 15 ++++++++ src_client/standalone.js | 66 ++++++++++++++++++++++++++++++------ 5 files changed, 94 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 31d817a..d7c9072 100644 --- a/package.json +++ b/package.json @@ -126,6 +126,7 @@ "fs-extra": "11.2.0", "image-size": "1.0.2", "jsonfile": "6.1.0", + "import-sync": "2.2.2", "marked": "12.0.2", "md5-file": "5.0.0", "mime": "^4.0.4", diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index e14f938..94c5074 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -75,7 +75,7 @@ class ElectronApi event.returnValue = path.join(opDir, "node_modules", data.moduleName); }); - ipcMain.on("getOpModuleFile", (event, data) => + ipcMain.on("getOpModuleLocation", (event, data) => { let opName = opsUtil.getOpNameById(data.opId); if (!opName) opName = data.opName; @@ -86,7 +86,9 @@ class ElectronApi { try { - event.returnValue = helper.pathToFileURL(moduleRequire.resolve(data.moduleName)); + let location = moduleRequire.resolve(data.moduleName); + if (data.asUrl) location = helper.pathToFileURL(location); + event.returnValue = location; } catch (e) { @@ -99,6 +101,23 @@ class ElectronApi event.returnValue = null; } }); + + ipcMain.on("getOpModules", (event, data) => + { + let deps = []; + if (!data.opName) return []; + const opName = data.opName; + const opDocFile = opsUtil.getOpAbsoluteJsonFilename(opName); + if (fs.existsSync(opDocFile)) + { + let opDoc = jsonfile.readFileSync(opDocFile); + if (opDoc) + { + deps = opDoc.dependencies || []; + } + } + event.returnValue = deps.filter((dep) => { return dep.type === "npm"; }).map((dep) => { return dep.src[0]; }); + }); } async talkerMessage(cmd, data, topicConfig = {}) diff --git a/src/electron/main.js b/src/electron/main.js index 465b079..8f9766a 100644 --- a/src/electron/main.js +++ b/src/electron/main.js @@ -196,7 +196,7 @@ class ElectronApp if (opName) { const onClick = "CABLES.CMD.STANDALONE.openOpDir('', '" + opName + "');"; - result.stderr += ", try running 'npm --prefix ./ install " + packageNames.join(" ") + "' manually in the op dir"; + result.stderr += ", try running `npm --prefix ./ install " + packageNames.join(" ") + "` manually in the op dir"; } } } diff --git a/src/utils/ops_util.js b/src/utils/ops_util.js index 0cdc3c0..c41aad2 100644 --- a/src/utils/ops_util.js +++ b/src/utils/ops_util.js @@ -132,6 +132,21 @@ class OpsUtil extends SharedOpsUtil getOpRenameProblems(newName, oldName, userObj, teams = [], newOpProject = null, oldOpProject = null, opUsages = [], checkUsages = true, targetDir = null) { const problems = super.getOpRenameProblems(newName, oldName, userObj, teams, newOpProject, oldOpProject, opUsages, checkUsages); + if (problems.no_rights_target && targetDir) + { + if (fs.existsSync(targetDir)) + { + try + { + fs.accessSync(targetDir, fs.constants.R_OK | fs.constants.W_OK); + delete problems.no_rights_target; + } + catch (e) + { + // not allowed to read/write + } + } + } if (problems.target_exists && targetDir) { const newOpDir = path.join(targetDir, this.getOpTargetDir(newName, true), this.getOpFileName(newName)); diff --git a/src_client/standalone.js b/src_client/standalone.js index 8af2167..d50f24c 100644 --- a/src_client/standalone.js +++ b/src_client/standalone.js @@ -11,6 +11,7 @@ export default class CablesStandalone constructor() { this._electron = window.nodeRequire("electron"); + this._importSync = window.nodeRequire("import-sync"); window.ipcRenderer = this._electron.ipcRenderer; // needed to have ipcRenderer in electron_editor.js this._settings = this._electron.ipcRenderer.sendSync("platformSettings") || {}; @@ -22,6 +23,8 @@ export default class CablesStandalone this._startUpLogItems = this._electron.ipcRenderer.sendSync("getStartupLog") || []; if (!this._config.isPackaged) window.ELECTRON_DISABLE_SECURITY_WARNINGS = true; + + this._loadedModules = {}; } /** @@ -78,6 +81,23 @@ export default class CablesStandalone this._logStartup("checking/installing op dependencies..."); this._electron.ipcRenderer.invoke("talkerMessage", "installProjectDependencies").then((npmResult) => { + this.editorWindow.CABLESUILOADER.cfg.patchConfig.onError = (...args) => + { + // npm runtime error... + if (args && args[0] === "core_patch" && args[2] && args[2].message && args[2].message.includes("was compiled against a different Node.js version")) + { + const dirParts = args[2].message.split("/"); + const opNameIndex = dirParts.findIndex((part) => { return part.startsWith("Ops."); }); + const opName = dirParts[opNameIndex]; + const packageName = dirParts[opNameIndex + 2]; // opdir + "node_modules" + packagename + const onClick = "CABLES.CMD.STANDALONE.openOpDir('', '" + opName + "');"; + + const msg = "try running this in the op dir:"; + this._log.error(msg); + this._log.error("`npm --prefix ./ install " + packageName + "`"); + this._log.error("`npx \"@electron/rebuild\" -v " + process.versions.electron); + } + }; waitForAce(); if (npmResult.error && npmResult.data) @@ -230,26 +250,52 @@ export default class CablesStandalone { if (op) op.setUiError("oprequire", null); if (moduleName === "electron") return thisClass._electron; + if (this._loadedModules[moduleName]) return this._loadedModules[moduleName]; try { + // load module by directory name const modulePath = window.ipcRenderer.sendSync("getOpModuleDir", { "opName": op.objName || op._name, "opId": op.opId, "moduleName": moduleName }); - return window.nodeRequire(modulePath); + this._loadedModules[moduleName] = window.nodeRequire(modulePath); + return this._loadedModules[moduleName]; } - catch (e) + catch (ePath) { try { - return window.nodeRequire(moduleName); + // load module by resolved filename from package.json + const moduleFile = window.ipcRenderer.sendSync("getOpModuleLocation", { "opName": op.objName || op._name, "opId": op.opId, "moduleName": moduleName }); + this._loadedModules[moduleName] = window.nodeRequire(moduleFile); + return this._loadedModules[moduleName]; } - catch (e2) + catch (eFile) { - let errorMessage = "failed to load node module: " + moduleName + "\n\n"; - errorMessage += "require by name:\n" + e2 + "\n\n"; - errorMessage += "require by path:\n" + e; - if (op) op.setUiError("oprequire", errorMessage); - this._log.error(errorMessage, e2, e); - return ""; + try + { + // load module by module name + this._loadedModules[moduleName] = window.nodeRequire(moduleName); + return this._loadedModules[moduleName]; + } + catch (eName) + { + try + { + const moduleFile = window.ipcRenderer.sendSync("getOpModuleLocation", { "opName": op.objName || op._name, "opId": op.opId, "moduleName": moduleName, }); + this._loadedModules[moduleName] = this._importSync(moduleFile); + return this._loadedModules[moduleName]; + } + catch (eImport) + { + let errorMessage = "failed to load node module: " + moduleName + "\n\n"; + errorMessage += "require by import:\n" + eImport + "\n\n"; + errorMessage += "require by name:\n" + eName + "\n\n"; + errorMessage += "require by file:\n" + eFile + "\n\n"; + errorMessage += "require by path:\n" + ePath; + if (op) op.setUiError("oprequire", errorMessage); + this._log.error(errorMessage, eName, eFile, ePath); + return { }; + } + } } } } From 352430ff90d7b82c7afb743a71f0195e93e05faa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Thu, 21 Nov 2024 09:51:25 +0100 Subject: [PATCH 25/38] rename permissions --- src/electron/electron_api.js | 1 + src/utils/ops_util.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index 94c5074..88eda0d 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -1739,6 +1739,7 @@ class ElectronApi return result; } + if (fromRename) targetDir = opsUtil.getOpSourceDir(oldName); const problems = opsUtil.getOpRenameProblems(newName, oldName, currentUser, [], null, null, [], true, targetDir); const hints = {}; const consequences = opsUtil.getOpRenameConsequences(newName, oldName, targetDir); diff --git a/src/utils/ops_util.js b/src/utils/ops_util.js index c41aad2..b9a6c2a 100644 --- a/src/utils/ops_util.js +++ b/src/utils/ops_util.js @@ -100,6 +100,7 @@ class OpsUtil extends SharedOpsUtil getOpSourceDir(opName, relative = false) { + if (!opName) return null; if (relative) return super.getOpSourceDir(opName, relative); return projectsUtil.getAbsoluteOpDirFromHierarchy(opName); } From 5bcdbb7550c7f11ec2d4249337e42f8de6df717c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Thu, 21 Nov 2024 10:38:16 +0100 Subject: [PATCH 26/38] add "npm run clean" --- package.json | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index d7c9072..9c85531 100644 --- a/package.json +++ b/package.json @@ -16,15 +16,24 @@ "scripts": { "start": "cross-env npm_config_apiconfig=local gulp watch", "build": "cross-env npm_config_apiconfig=local gulp build", + "clean": "rimraf dist/", "analyze": "cross-env npm_config_apiconfig=local gulp analyze", - "pack": "electron-builder -mwl --dir", - "pack:mac": "electron-builder -m --dir -c.mac.identity=null", - "pack:win": "electron-builder -w --dir", - "pack:linux": "electron-builder -l --dir", - "dist": "electron-builder -mwl", - "dist:mac": "electron-builder -m", - "dist:win": "electron-builder -w", - "dist:linux": "electron-builder -l" + "pack": "run-s clean build _pack", + "pack:mac":"run-s clean build _pack:mac", + "pack:win":"run-s clean build _pack:win", + "pack:linux":"run-s clean build _pack:linux", + "dist": "run-s clean build _dist", + "dist:mac":"run-s clean build _dist:mac", + "dist:win":"run-s clean build _dist:win", + "dist:linux":"run-s clean build _dist:linux", + "_pack": "electron-builder -mwl --dir", + "_pack:mac": "electron-builder -m --dir -c.mac.identity=null", + "_pack:win": "electron-builder -w --dir", + "_pack:linux": "electron-builder -l --dir", + "_dist": "electron-builder -mwl", + "_dist:mac": "electron-builder -m", + "_dist:win": "electron-builder -w", + "_dist:linux": "electron-builder -l" }, "build": { "productName": "cables", @@ -146,6 +155,8 @@ "electron-builder": "25.1.8", "git-last-commit": "1.0.1", "gulp": "5.0.0", + "rimraf": "6.0.1", + "npm-run-all": "4.1.5", "terser-webpack-plugin": "5.3.10", "webpack": "5.91.0", "webpack-bundle-analyzer": "4.10.2" From 080f292f0190a3bb20d6527b31765239c15c031d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Thu, 21 Nov 2024 12:24:54 +0100 Subject: [PATCH 27/38] no clean before dist --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 9c85531..6b4e193 100644 --- a/package.json +++ b/package.json @@ -22,10 +22,10 @@ "pack:mac":"run-s clean build _pack:mac", "pack:win":"run-s clean build _pack:win", "pack:linux":"run-s clean build _pack:linux", - "dist": "run-s clean build _dist", - "dist:mac":"run-s clean build _dist:mac", - "dist:win":"run-s clean build _dist:win", - "dist:linux":"run-s clean build _dist:linux", + "dist": "run-s build _dist", + "dist:mac":"run-s build _dist:mac", + "dist:win":"run-s build _dist:win", + "dist:linux":"run-s build _dist:linux", "_pack": "electron-builder -mwl --dir", "_pack:mac": "electron-builder -m --dir -c.mac.identity=null", "_pack:win": "electron-builder -w --dir", From 512a1428cf934c15d22e05c99dd95cf4346ee8ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Fri, 22 Nov 2024 11:27:49 +0100 Subject: [PATCH 28/38] dist jobs --- package.json | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 6b4e193..708f805 100644 --- a/package.json +++ b/package.json @@ -22,18 +22,14 @@ "pack:mac":"run-s clean build _pack:mac", "pack:win":"run-s clean build _pack:win", "pack:linux":"run-s clean build _pack:linux", - "dist": "run-s build _dist", - "dist:mac":"run-s build _dist:mac", - "dist:win":"run-s build _dist:win", - "dist:linux":"run-s build _dist:linux", "_pack": "electron-builder -mwl --dir", "_pack:mac": "electron-builder -m --dir -c.mac.identity=null", "_pack:win": "electron-builder -w --dir", "_pack:linux": "electron-builder -l --dir", - "_dist": "electron-builder -mwl", - "_dist:mac": "electron-builder -m", - "_dist:win": "electron-builder -w", - "_dist:linux": "electron-builder -l" + "dist": "electron-builder -mwl", + "dist:mac": "electron-builder -m", + "dist:win": "electron-builder -w", + "dist:linux": "electron-builder -l" }, "build": { "productName": "cables", From 6e8efd20ccc251cf394fc02fce3d006d3a7f3990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Mon, 25 Nov 2024 15:13:10 +0100 Subject: [PATCH 29/38] dependencies in unsaved patch --- src_client/standalone.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src_client/standalone.js b/src_client/standalone.js index d50f24c..7182b74 100644 --- a/src_client/standalone.js +++ b/src_client/standalone.js @@ -100,7 +100,7 @@ export default class CablesStandalone }; waitForAce(); - if (npmResult.error && npmResult.data) + if (npmResult.error && npmResult.data && npmResult.msg !== "UNSAVED_PROJECT") { npmResult.data.forEach((msg) => { @@ -108,18 +108,16 @@ export default class CablesStandalone this._log.error("failed dependency" + opName + ": " + msg.stderr); }); } - else + else if (npmResult.msg !== "EMPTY" && npmResult.msg !== "UNSAVED_PROJECT") { - if (npmResult.msg !== "EMPTY" && npmResult.msg !== "UNSAVED_PROJECT") + npmResult.data.forEach((result) => { - npmResult.data.forEach((result) => - { - const npmText = result.stderr || result.stdout; - this._logStartup(result.opName + ": " + npmText); - }); - } + const npmText = result.stderr || result.stdout; + this._logStartup(result.opName + ": " + npmText); + }); } + if (this.gui) { this.gui.on("uiloaded", () => From ec8b9a29ada9adf5e0d2df62c4af3b4fda0debd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Mon, 25 Nov 2024 15:36:49 +0100 Subject: [PATCH 30/38] no duplicate dependencies --- src/electron/electron_api.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index 88eda0d..902283f 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -1582,7 +1582,10 @@ class ElectronApi if (opDoc) { const deps = opDoc.dependencies || []; - deps.push(dep); + if (!deps.some((d) => { return d.name === dep.name && d.name === dep.name; })) + { + deps.push(dep); + } opDoc.dependencies = deps; opDoc = doc.cleanOpDocData(opDoc); jsonfile.writeFileSync(opDocFile, opDoc, { "encoding": "utf-8", "spaces": 4 }); @@ -1619,7 +1622,8 @@ class ElectronApi opDoc.dependencies = newDeps; if (opDoc.dependencies) jsonfile.writeFileSync(opDocFile, opDoc, { "encoding": "utf-8", "spaces": 4 }); doc.updateOpDocs(); - return this._installOpDependencies(opName); + this._installOpDependencies(opName); + return this.success("OK"); } else { From 8f7442ab7472f2cdf990e4e00c5f48a3add84646 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Mon, 2 Dec 2024 18:03:51 +0100 Subject: [PATCH 31/38] use shared code --- src/electron/electron_api.js | 94 ++++++++++++------------------------ src/utils/ops_util.js | 28 +++++++---- 2 files changed, 50 insertions(+), 72 deletions(-) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index 902283f..666e6d2 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -1195,15 +1195,15 @@ class ElectronApi return this.success("OK", npmResults); } - async openDir(options = {}) + async openDir(data = {}) { - await shell.openPath(options.dir || app.getPath("home")); + await shell.openPath(data.dir || app.getPath("home")); return this.success("OK", {}, true); } - async openOpDir(options) + async openOpDir(data) { - const opName = opsUtil.getOpNameById(options.opId) || options.opName; + const opName = opsUtil.getOpNameById(data.opId) || data.opName; if (!opName) return; const opDir = opsUtil.getOpAbsoluteFileName(opName); if (opDir) @@ -1435,11 +1435,11 @@ class ElectronApi return this.success("OK", projectsUtil.getProjectOpDirs(currentProject, true)); } - setProjectName(options) + setProjectName(data) { const oldFile = settings.getCurrentProjectFile(); let project = settings.getCurrentProject(); - project.name = options.name; + project.name = data.name; const newFile = path.join(settings.getCurrentProjectDir(), projectsUtil.getProjectFileName(project)); project.name = path.basename(newFile); project.summary = project.summary || {}; @@ -1551,51 +1551,34 @@ class ElectronApi electronApp.updateTitle(); } - async addOpDependency(options) + async addOpDependency(data) { - if (!options.opName || !options.name || !options.type) return this.error("INVALID_DATA"); + if (!data.opName || !data.src || !data.type) return this.error("INVALID_DATA"); let version = ""; - if (options.type === "npm") + if (data.type === "npm") { - const parts = options.name.split("@"); - if (options.name.startsWith("@")) + const parts = data.src.split("@"); + if (data.src.startsWith("@")) { version = parts[2] || ""; - options.name = "@" + parts[1]; + data.src = "@" + parts[1]; } else { version = parts[1] || ""; } } - const opName = options.opName; + const opName = data.opName; const dep = { - "name": options.name, - "type": options.type, - "src": [options.name], - "version": version + "type": data.type, + "src": data.src, }; - const opDocFile = opsUtil.getOpAbsoluteJsonFilename(opName); - if (fs.existsSync(opDocFile)) + if (version) dep.version = version; + if (data.export) dep.export = data.export; + const added = opsUtil.addOpDependency(opName, dep); + if (added) { - let opDoc = jsonfile.readFileSync(opDocFile); - if (opDoc) - { - const deps = opDoc.dependencies || []; - if (!deps.some((d) => { return d.name === dep.name && d.name === dep.name; })) - { - deps.push(dep); - } - opDoc.dependencies = deps; - opDoc = doc.cleanOpDocData(opDoc); - jsonfile.writeFileSync(opDocFile, opDoc, { "encoding": "utf-8", "spaces": 4 }); - doc.updateOpDocs(); - return await this._installOpDependencies(opName); - } - else - { - return this.error("OP_NOT_FOUND"); - } + return await this._installOpDependencies(opName); } else { @@ -1603,32 +1586,19 @@ class ElectronApi } } - async removeOpDependency(options) + async removeOpDependency(data) { - if (!options.opName || !options.name || !options.type) return this.error("INVALID_DATA"); - const opName = options.opName; - const opDocFile = opsUtil.getOpAbsoluteJsonFilename(opName); - if (fs.existsSync(opDocFile)) + if (!data.opName || !data.src || !data.type) return this.error("INVALID_DATA"); + const opName = data.opName; + const dep = { + "src": data.src, + "type": data.type, + }; + const removed = opsUtil.removeOpDependency(opName, dep); + if (removed) { - let opDoc = jsonfile.readFileSync(opDocFile); - if (opDoc) - { - const newDeps = []; - const deps = opDoc.dependencies || []; - deps.forEach((dep) => - { - if (!(dep.name === options.name && dep.type === options.type)) newDeps.push(dep); - }); - opDoc.dependencies = newDeps; - if (opDoc.dependencies) jsonfile.writeFileSync(opDocFile, opDoc, { "encoding": "utf-8", "spaces": 4 }); - doc.updateOpDocs(); - this._installOpDependencies(opName); - return this.success("OK"); - } - else - { - return this.error("OP_NOT_FOUND"); - } + this._installOpDependencies(opName); + return this.success("OK"); } else { @@ -1774,7 +1744,7 @@ class ElectronApi } } - if (problems.illegal_ops || problems.illegal_references) + if (problems.illegal_ops) { suggestVersion = false; } diff --git a/src/utils/ops_util.js b/src/utils/ops_util.js index b9a6c2a..7d041a1 100644 --- a/src/utils/ops_util.js +++ b/src/utils/ops_util.js @@ -231,21 +231,29 @@ class OpsUtil extends SharedOpsUtil const version = npmDep.version || ""; if (npmDep.src) { - npmDep.src.forEach((src) => + if (Array.isArray(npmDep.src)) { + npmDep.src.forEach((src) => + { + if (version) + { + src = src + "@" + version; + } + if (!toInstall.includes(src)) + { + toInstall.push(src); + } + }); + } + else + { + let src = npmDep.src; if (version) { src = src + "@" + version; } - else - { - if (npmDep.name.includes("@")) src = npmDep.name; - } - if (!toInstall.includes(src)) - { - toInstall.push(src); - } - }); + toInstall.push(src); + } } }); } From 5ab297a6801776531da8fe4c48b0a94f03927ddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Mon, 2 Dec 2024 18:04:46 +0100 Subject: [PATCH 32/38] Revert "use shared code" This reverts commit 8f7442ab7472f2cdf990e4e00c5f48a3add84646. --- src/electron/electron_api.js | 94 ++++++++++++++++++++++++------------ src/utils/ops_util.js | 28 ++++------- 2 files changed, 72 insertions(+), 50 deletions(-) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index 666e6d2..902283f 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -1195,15 +1195,15 @@ class ElectronApi return this.success("OK", npmResults); } - async openDir(data = {}) + async openDir(options = {}) { - await shell.openPath(data.dir || app.getPath("home")); + await shell.openPath(options.dir || app.getPath("home")); return this.success("OK", {}, true); } - async openOpDir(data) + async openOpDir(options) { - const opName = opsUtil.getOpNameById(data.opId) || data.opName; + const opName = opsUtil.getOpNameById(options.opId) || options.opName; if (!opName) return; const opDir = opsUtil.getOpAbsoluteFileName(opName); if (opDir) @@ -1435,11 +1435,11 @@ class ElectronApi return this.success("OK", projectsUtil.getProjectOpDirs(currentProject, true)); } - setProjectName(data) + setProjectName(options) { const oldFile = settings.getCurrentProjectFile(); let project = settings.getCurrentProject(); - project.name = data.name; + project.name = options.name; const newFile = path.join(settings.getCurrentProjectDir(), projectsUtil.getProjectFileName(project)); project.name = path.basename(newFile); project.summary = project.summary || {}; @@ -1551,34 +1551,51 @@ class ElectronApi electronApp.updateTitle(); } - async addOpDependency(data) + async addOpDependency(options) { - if (!data.opName || !data.src || !data.type) return this.error("INVALID_DATA"); + if (!options.opName || !options.name || !options.type) return this.error("INVALID_DATA"); let version = ""; - if (data.type === "npm") + if (options.type === "npm") { - const parts = data.src.split("@"); - if (data.src.startsWith("@")) + const parts = options.name.split("@"); + if (options.name.startsWith("@")) { version = parts[2] || ""; - data.src = "@" + parts[1]; + options.name = "@" + parts[1]; } else { version = parts[1] || ""; } } - const opName = data.opName; + const opName = options.opName; const dep = { - "type": data.type, - "src": data.src, + "name": options.name, + "type": options.type, + "src": [options.name], + "version": version }; - if (version) dep.version = version; - if (data.export) dep.export = data.export; - const added = opsUtil.addOpDependency(opName, dep); - if (added) + const opDocFile = opsUtil.getOpAbsoluteJsonFilename(opName); + if (fs.existsSync(opDocFile)) { - return await this._installOpDependencies(opName); + let opDoc = jsonfile.readFileSync(opDocFile); + if (opDoc) + { + const deps = opDoc.dependencies || []; + if (!deps.some((d) => { return d.name === dep.name && d.name === dep.name; })) + { + deps.push(dep); + } + opDoc.dependencies = deps; + opDoc = doc.cleanOpDocData(opDoc); + jsonfile.writeFileSync(opDocFile, opDoc, { "encoding": "utf-8", "spaces": 4 }); + doc.updateOpDocs(); + return await this._installOpDependencies(opName); + } + else + { + return this.error("OP_NOT_FOUND"); + } } else { @@ -1586,19 +1603,32 @@ class ElectronApi } } - async removeOpDependency(data) + async removeOpDependency(options) { - if (!data.opName || !data.src || !data.type) return this.error("INVALID_DATA"); - const opName = data.opName; - const dep = { - "src": data.src, - "type": data.type, - }; - const removed = opsUtil.removeOpDependency(opName, dep); - if (removed) + if (!options.opName || !options.name || !options.type) return this.error("INVALID_DATA"); + const opName = options.opName; + const opDocFile = opsUtil.getOpAbsoluteJsonFilename(opName); + if (fs.existsSync(opDocFile)) { - this._installOpDependencies(opName); - return this.success("OK"); + let opDoc = jsonfile.readFileSync(opDocFile); + if (opDoc) + { + const newDeps = []; + const deps = opDoc.dependencies || []; + deps.forEach((dep) => + { + if (!(dep.name === options.name && dep.type === options.type)) newDeps.push(dep); + }); + opDoc.dependencies = newDeps; + if (opDoc.dependencies) jsonfile.writeFileSync(opDocFile, opDoc, { "encoding": "utf-8", "spaces": 4 }); + doc.updateOpDocs(); + this._installOpDependencies(opName); + return this.success("OK"); + } + else + { + return this.error("OP_NOT_FOUND"); + } } else { @@ -1744,7 +1774,7 @@ class ElectronApi } } - if (problems.illegal_ops) + if (problems.illegal_ops || problems.illegal_references) { suggestVersion = false; } diff --git a/src/utils/ops_util.js b/src/utils/ops_util.js index 7d041a1..b9a6c2a 100644 --- a/src/utils/ops_util.js +++ b/src/utils/ops_util.js @@ -231,29 +231,21 @@ class OpsUtil extends SharedOpsUtil const version = npmDep.version || ""; if (npmDep.src) { - if (Array.isArray(npmDep.src)) + npmDep.src.forEach((src) => { - npmDep.src.forEach((src) => - { - if (version) - { - src = src + "@" + version; - } - if (!toInstall.includes(src)) - { - toInstall.push(src); - } - }); - } - else - { - let src = npmDep.src; if (version) { src = src + "@" + version; } - toInstall.push(src); - } + else + { + if (npmDep.name.includes("@")) src = npmDep.name; + } + if (!toInstall.includes(src)) + { + toInstall.push(src); + } + }); } }); } From 7745eada862db32f17a14eab7d3bf1387871c819 Mon Sep 17 00:00:00 2001 From: pandrr Date: Tue, 3 Dec 2024 10:52:20 +0100 Subject: [PATCH 33/38] commands --- src_client/cmd_electron.js | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src_client/cmd_electron.js b/src_client/cmd_electron.js index 4193001..0b3eacd 100644 --- a/src_client/cmd_electron.js +++ b/src_client/cmd_electron.js @@ -241,17 +241,23 @@ CABLES_CMD_STANDALONE.addOpPackage = (options, next) => }); }; -CABLES_CMD_STANDALONE.copyOpDirToClipboard = () => +CABLES_CMD_STANDALONE.copyOpDirToClipboard = (opId) => { const gui = standalone.gui; if (gui) { - const ops = gui.patchView.getSelectedOps(); - if (!ops.length) return; - - const op = ops[0]; - const modulePath = window.ipcRenderer.sendSync("getOpDir", { "opId": op.opId, "opName": op.name }); - if (modulePath) navigator.clipboard.writeText(modulePath); + if (!opId) + { + const ops = gui.patchView.getSelectedOps(); + if (!ops.length) return; + opId = ops[0].opId; + } + const modulePath = window.ipcRenderer.sendSync("getOpDir", { "opId": opId }); + if (modulePath) + { + navigator.clipboard.writeText(modulePath); + CABLES.UI.notify("Op path copied to clipboard"); + } } }; From 6882dd6fd035c52cd8fa8f440fa5b20f1a93171d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Tue, 10 Dec 2024 10:40:31 +0100 Subject: [PATCH 34/38] add ko-fi --- .github/FUNDING.yml | 1 + src/cables.js | 1 - src/utils/doc_util.js | 1 - src_client/cmd_electron.js | 2 +- src_client/standalone.js | 2 ++ 5 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 74bcb51..a28e263 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,4 +1,5 @@ # These are supported funding model platforms patreon: cables_gl +ko_fi: cablesgl diff --git a/src/cables.js b/src/cables.js index 71a1ba3..002d47e 100644 --- a/src/cables.js +++ b/src/cables.js @@ -6,7 +6,6 @@ import fs from "fs"; import mkdirp from "mkdirp"; import { fileURLToPath } from "url"; import settings from "./electron/electron_settings.js"; -import helper from "./utils/helper_util.js"; class CablesElectron extends Cables { diff --git a/src/utils/doc_util.js b/src/utils/doc_util.js index cc608ac..25b7e01 100644 --- a/src/utils/doc_util.js +++ b/src/utils/doc_util.js @@ -3,7 +3,6 @@ import fs from "fs"; import path from "path"; import jsonfile from "jsonfile"; import opsUtil from "./ops_util.js"; -import projectsUtil from "./projects_util.js"; import helper from "./helper_util.js"; import cables from "../cables.js"; diff --git a/src_client/cmd_electron.js b/src_client/cmd_electron.js index 0b3eacd..cc18271 100644 --- a/src_client/cmd_electron.js +++ b/src_client/cmd_electron.js @@ -275,7 +275,7 @@ CABLES_CMD_STANDALONE.openOpDirectory = () => }; CABLES_CMD_STANDALONE_OVERRIDES.PATCH = {}; -CABLES_CMD_STANDALONE_OVERRIDES.PATCH.saveAs = (data) => +CABLES_CMD_STANDALONE_OVERRIDES.PATCH.saveAs = () => { let patchName = standalone.gui.project() ? standalone.gui.project().name : null; standalone.editor.api("saveProjectAs", { "name": patchName }, (_err, r) => {}); diff --git a/src_client/standalone.js b/src_client/standalone.js index 7182b74..82abc41 100644 --- a/src_client/standalone.js +++ b/src_client/standalone.js @@ -77,6 +77,8 @@ export default class CablesStandalone const waitForAce = this.editorWindow.waitForAce; this.editorWindow.waitForAce = () => { + this._log.info("loading", this._settings.patchFile); + this._incrementStartup(); this._logStartup("checking/installing op dependencies..."); this._electron.ipcRenderer.invoke("talkerMessage", "installProjectDependencies").then((npmResult) => From ec0118d17bd27873a225e1b04ea1c6455f6124b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Tue, 10 Dec 2024 18:28:37 +0100 Subject: [PATCH 35/38] upload path --- src/electron/electron_api.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index 902283f..2387188 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -306,7 +306,7 @@ class ElectronApi return; } let saveAs = data.filename; - if (!path.isAbsolute(data.filename)) saveAs = path.join(target, data.filename); + if (!path.isAbsolute(data.filename)) saveAs = path.join(target, path.join("/", data.filename)); const buffer = Buffer.from(data.fileStr.split(",")[1], "base64"); fs.writeFileSync(saveAs, buffer); return this.success("OK", { "filename": path.basename(saveAs) }, true); From 6e03831e4c81ca566de9ddfeeb61dcdb5aa70eb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Tue, 10 Dec 2024 18:32:30 +0100 Subject: [PATCH 36/38] null objects --- src/electron/electron_api.js | 14 +++++++------- src/electron/electron_settings.js | 18 +++++++++--------- src/export/export_zip_standalone.js | 2 +- src/utils/files_util.js | 2 +- src/utils/projects_util.js | 10 +++++----- src_client/cmd_electron.js | 10 +++++----- src_client/standalone.js | 2 +- webpack.electron.config.js | 2 +- 8 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index 2387188..9aec8e9 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -409,7 +409,7 @@ class ElectronApi { return {}; } - const result = {}; + const result = Object.create(null); result.opDocs = []; const opDoc = doc.getDocForOp(opName); @@ -813,7 +813,7 @@ class ElectronApi getChangelog(data) { - const obj = {}; + const obj = Object.create(null); obj.items = []; obj.ts = Date.now(); return this.success("OK", obj, true); @@ -1143,7 +1143,7 @@ class ElectronApi } const results = []; - let projectPackages = {}; + let projectPackages = Object.create(null); currentProject.ops.forEach((op) => { const opName = opsUtil.getOpNameById(op.opId); @@ -1372,7 +1372,7 @@ class ElectronApi const currentProject = settings.getCurrentProject(); const dirInfos = projectsUtil.getOpDirs(currentProject, false); - const opDirs = {}; + const opDirs = Object.create(null); if (currentProject && currentProject.ops) { currentProject.ops.forEach((op) => @@ -1463,7 +1463,7 @@ class ElectronApi const currentProject = settings.getCurrentProject(); const assetPorts = projectsUtil.getProjectAssetPorts(currentProject, true); - const oldNew = {}; + const oldNew = Object.create(null); let projectAssetPath = cables.getAssetPath(); projectAssetPath = path.join(projectAssetPath, "assets"); if (!fs.existsSync(projectAssetPath)) mkdirp.sync(projectAssetPath); @@ -1487,7 +1487,7 @@ class ElectronApi collectOps() { const currentProject = settings.getCurrentProject(); - const movedOps = {}; + const movedOps = Object.create(null); const allOpNames = []; if (currentProject && currentProject.ops) { @@ -1745,7 +1745,7 @@ class ElectronApi if (fromRename) targetDir = opsUtil.getOpSourceDir(oldName); const problems = opsUtil.getOpRenameProblems(newName, oldName, currentUser, [], null, null, [], true, targetDir); - const hints = {}; + const hints = Object.create(null); const consequences = opsUtil.getOpRenameConsequences(newName, oldName, targetDir); let newOpDocs = opDocs; diff --git a/src/electron/electron_settings.js b/src/electron/electron_settings.js index 1e6c3c5..926ef8a 100644 --- a/src/electron/electron_settings.js +++ b/src/electron/electron_settings.js @@ -32,15 +32,15 @@ class ElectronSettings this.WINDOW_BOUNDS = "windowBounds"; this.DOWNLOAD_PATH = "downloadPath"; - this.opts = {}; - this.opts.defaults = {}; + this.opts = Object.create(null); + this.opts.defaults = Object.create(null); this.opts.configName = this.MAIN_CONFIG_NAME; - this.opts.defaults[this.USER_SETTINGS_FIELD] = {}; + this.opts.defaults[this.USER_SETTINGS_FIELD] = Object.create(null); this.opts.defaults[this.PATCHID_FIELD] = null; this.opts.defaults[this.PROJECTFILE_FIELD] = null; this.opts.defaults[this.CURRENTPROJECTDIR_FIELD] = null; this.opts.defaults[this.STORAGEDIR_FIELD] = storageDir; - this.opts.defaults[this.RECENT_PROJECTS_FIELD] = {}; + this.opts.defaults[this.RECENT_PROJECTS_FIELD] = Object.create(null); this.opts.defaults[this.OPEN_DEV_TOOLS_FIELD] = false; this.opts.defaults[this.DOWNLOAD_PATH] = app.getPath("downloads"); @@ -178,7 +178,7 @@ class ElectronSettings const coreFile = path.join(cables.getUiDistPath(), "js", "buildinfo.json"); const uiFile = path.join(cables.getUiDistPath(), "buildinfo.json"); const standaloneFile = path.join(cables.getStandaloneDistPath(), "public", "js", "buildinfo.json"); - let core = {}; + let core = Object.create(null); if (fs.existsSync(coreFile)) { try @@ -191,7 +191,7 @@ class ElectronSettings } } - let ui = {}; + let ui = Object.create(null); if (fs.existsSync(uiFile)) { try @@ -204,7 +204,7 @@ class ElectronSettings } } - let api = {}; + let api = Object.create(null); if (fs.existsSync(standaloneFile)) { try @@ -262,7 +262,7 @@ class ElectronSettings setRecentProjects(recents) { - if (!recents) recents = {}; + if (!recents) recents = Object.create(null); return this.set(this.RECENT_PROJECTS_FIELD, recents); } @@ -291,7 +291,7 @@ class ElectronSettings return p2.updated - p1.updated; }); files = helper.uniqueArray(files); - const newRecents = {}; + const newRecents = Object.create(null); for (let i = 0; i < 10; i++) { if (i > files.length) break; diff --git a/src/export/export_zip_standalone.js b/src/export/export_zip_standalone.js index 4340e17..8efc57a 100644 --- a/src/export/export_zip_standalone.js +++ b/src/export/export_zip_standalone.js @@ -67,7 +67,7 @@ export default class StandaloneZipExport extends SharedExportService { this._log.info("exported file " + finalZipFileName + " / " + this.archive.pointer() / 1000000.0 + " mb"); - const result = {}; + const result = Object.create(null); result.size = this.archive.pointer() / 1000000.0; result.path = finalZipFileName; result.log = this.exportLog; diff --git a/src/utils/files_util.js b/src/utils/files_util.js index 6224a17..bfd58a3 100644 --- a/src/utils/files_util.js +++ b/src/utils/files_util.js @@ -243,7 +243,7 @@ class FilesUtil extends SharedFilesUtil getPatchFiles() { const arr = []; - const fileHierarchy = {}; + const fileHierarchy = Object.create(null); const project = settings.getCurrentProject(); if (!project) return arr; diff --git a/src/utils/projects_util.js b/src/utils/projects_util.js index d50f467..e1298f3 100644 --- a/src/utils/projects_util.js +++ b/src/utils/projects_util.js @@ -188,7 +188,7 @@ class ProjectsUtil extends SharedProjectsUtil addOpDir(project, opDir, atTop = false) { - if (!project.dirs) project.dirs = {}; + if (!project.dirs) project.dirs = Object.create(null); if (!project.dirs.ops) project.dirs.ops = []; if (atTop) { @@ -205,7 +205,7 @@ class ProjectsUtil extends SharedProjectsUtil removeOpDir(project, opDir) { - if (!project.dirs) project.dirs = {}; + if (!project.dirs) project.dirs = Object.create(null); if (!project.dirs.ops) project.dirs.ops = []; project.dirs.ops = project.dirs.ops.filter((dirName) => { @@ -238,7 +238,7 @@ class ProjectsUtil extends SharedProjectsUtil dirs.forEach((dir) => { const opJsons = helper.getFileNamesRecursive(dir, ".json"); - const opLocations = {}; + const opLocations = Object.create(null); opJsons.forEach((jsonLocation) => { const jsonName = path.basename(jsonLocation, ".json"); @@ -267,7 +267,7 @@ class ProjectsUtil extends SharedProjectsUtil { if (fs.existsSync(opDir)) newOrder.push(opDir); }); - if (!currentProject.dirs) currentProject.dirs = {}; + if (!currentProject.dirs) currentProject.dirs = Object.create(null); if (!currentProject.dirs.ops) currentProject.dirs.ops = []; currentProject.dirs.ops = newOrder.filter((dir) => { return !this.isFixedPositionOpDir(dir); }); currentProject.dirs.ops = helper.uniqueArray(currentProject.dirs.ops); @@ -308,7 +308,7 @@ class ProjectsUtil extends SharedProjectsUtil { if (this._projectOpDocs && !rebuildCache) return this._projectOpDocs; - const opDocs = {}; + const opDocs = Object.create(null); const opDirs = this.getProjectOpDirs(project, true, false, false); opDirs.forEach((opDir) => diff --git a/src_client/cmd_electron.js b/src_client/cmd_electron.js index cc18271..0cd3ede 100644 --- a/src_client/cmd_electron.js +++ b/src_client/cmd_electron.js @@ -1,13 +1,13 @@ import standalone from "./renderer.js"; -const CABLES_CMD_STANDALONE = {}; -const CABLES_CMD_STANDALONE_OVERRIDES = {}; +const CABLES_CMD_STANDALONE = Object.create(null); +const CABLES_CMD_STANDALONE_OVERRIDES = Object.create(null); const CMD_STANDALONE_COMMANDS = []; CABLES_CMD_STANDALONE.runNpm = () => { const loadingModal = standalone.gui.startModalLoading("Installing packages..."); - const options = {}; + const options = Object.create(null); standalone.editor.api("installProjectDependencies", options, (_err, result) => { if (result.data) @@ -274,7 +274,7 @@ CABLES_CMD_STANDALONE.openOpDirectory = () => } }; -CABLES_CMD_STANDALONE_OVERRIDES.PATCH = {}; +CABLES_CMD_STANDALONE_OVERRIDES.PATCH = Object.create(null); CABLES_CMD_STANDALONE_OVERRIDES.PATCH.saveAs = () => { let patchName = standalone.gui.project() ? standalone.gui.project().name : null; @@ -314,7 +314,7 @@ CABLES_CMD_STANDALONE_OVERRIDES.PATCH.renameOp = (opName) => } }; -CABLES_CMD_STANDALONE_OVERRIDES.RENDERER = {}; +CABLES_CMD_STANDALONE_OVERRIDES.RENDERER = Object.create(null); CABLES_CMD_STANDALONE_OVERRIDES.RENDERER.fullscreen = () => { standalone.editor.api("cycleFullscreen", { }, (_err, r) => {}); diff --git a/src_client/standalone.js b/src_client/standalone.js index 82abc41..31e3a38 100644 --- a/src_client/standalone.js +++ b/src_client/standalone.js @@ -24,7 +24,7 @@ export default class CablesStandalone if (!this._config.isPackaged) window.ELECTRON_DISABLE_SECURITY_WARNINGS = true; - this._loadedModules = {}; + this._loadedModules = Object.create(null); } /** diff --git a/webpack.electron.config.js b/webpack.electron.config.js index ed95b39..b604adb 100644 --- a/webpack.electron.config.js +++ b/webpack.electron.config.js @@ -25,7 +25,7 @@ export default (isLiveBuild, buildInfo, minify = false, analyze = false) => { if (!buildInfo.platform) { - buildInfo.platform = {}; + buildInfo.platform = Object.create(null); } if (process.env.BUILD_VERSION) { From b886f764c0abb940d8902d0e12db9240768f25d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Wed, 11 Dec 2024 11:37:46 +0100 Subject: [PATCH 37/38] Revert "null objects" This reverts commit 6e03831e4c81ca566de9ddfeeb61dcdb5aa70eb7. --- src/electron/electron_api.js | 14 +++++++------- src/electron/electron_settings.js | 18 +++++++++--------- src/export/export_zip_standalone.js | 2 +- src/utils/files_util.js | 2 +- src/utils/projects_util.js | 10 +++++----- src_client/cmd_electron.js | 10 +++++----- src_client/standalone.js | 2 +- webpack.electron.config.js | 2 +- 8 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/electron/electron_api.js b/src/electron/electron_api.js index 9aec8e9..2387188 100644 --- a/src/electron/electron_api.js +++ b/src/electron/electron_api.js @@ -409,7 +409,7 @@ class ElectronApi { return {}; } - const result = Object.create(null); + const result = {}; result.opDocs = []; const opDoc = doc.getDocForOp(opName); @@ -813,7 +813,7 @@ class ElectronApi getChangelog(data) { - const obj = Object.create(null); + const obj = {}; obj.items = []; obj.ts = Date.now(); return this.success("OK", obj, true); @@ -1143,7 +1143,7 @@ class ElectronApi } const results = []; - let projectPackages = Object.create(null); + let projectPackages = {}; currentProject.ops.forEach((op) => { const opName = opsUtil.getOpNameById(op.opId); @@ -1372,7 +1372,7 @@ class ElectronApi const currentProject = settings.getCurrentProject(); const dirInfos = projectsUtil.getOpDirs(currentProject, false); - const opDirs = Object.create(null); + const opDirs = {}; if (currentProject && currentProject.ops) { currentProject.ops.forEach((op) => @@ -1463,7 +1463,7 @@ class ElectronApi const currentProject = settings.getCurrentProject(); const assetPorts = projectsUtil.getProjectAssetPorts(currentProject, true); - const oldNew = Object.create(null); + const oldNew = {}; let projectAssetPath = cables.getAssetPath(); projectAssetPath = path.join(projectAssetPath, "assets"); if (!fs.existsSync(projectAssetPath)) mkdirp.sync(projectAssetPath); @@ -1487,7 +1487,7 @@ class ElectronApi collectOps() { const currentProject = settings.getCurrentProject(); - const movedOps = Object.create(null); + const movedOps = {}; const allOpNames = []; if (currentProject && currentProject.ops) { @@ -1745,7 +1745,7 @@ class ElectronApi if (fromRename) targetDir = opsUtil.getOpSourceDir(oldName); const problems = opsUtil.getOpRenameProblems(newName, oldName, currentUser, [], null, null, [], true, targetDir); - const hints = Object.create(null); + const hints = {}; const consequences = opsUtil.getOpRenameConsequences(newName, oldName, targetDir); let newOpDocs = opDocs; diff --git a/src/electron/electron_settings.js b/src/electron/electron_settings.js index 926ef8a..1e6c3c5 100644 --- a/src/electron/electron_settings.js +++ b/src/electron/electron_settings.js @@ -32,15 +32,15 @@ class ElectronSettings this.WINDOW_BOUNDS = "windowBounds"; this.DOWNLOAD_PATH = "downloadPath"; - this.opts = Object.create(null); - this.opts.defaults = Object.create(null); + this.opts = {}; + this.opts.defaults = {}; this.opts.configName = this.MAIN_CONFIG_NAME; - this.opts.defaults[this.USER_SETTINGS_FIELD] = Object.create(null); + this.opts.defaults[this.USER_SETTINGS_FIELD] = {}; this.opts.defaults[this.PATCHID_FIELD] = null; this.opts.defaults[this.PROJECTFILE_FIELD] = null; this.opts.defaults[this.CURRENTPROJECTDIR_FIELD] = null; this.opts.defaults[this.STORAGEDIR_FIELD] = storageDir; - this.opts.defaults[this.RECENT_PROJECTS_FIELD] = Object.create(null); + this.opts.defaults[this.RECENT_PROJECTS_FIELD] = {}; this.opts.defaults[this.OPEN_DEV_TOOLS_FIELD] = false; this.opts.defaults[this.DOWNLOAD_PATH] = app.getPath("downloads"); @@ -178,7 +178,7 @@ class ElectronSettings const coreFile = path.join(cables.getUiDistPath(), "js", "buildinfo.json"); const uiFile = path.join(cables.getUiDistPath(), "buildinfo.json"); const standaloneFile = path.join(cables.getStandaloneDistPath(), "public", "js", "buildinfo.json"); - let core = Object.create(null); + let core = {}; if (fs.existsSync(coreFile)) { try @@ -191,7 +191,7 @@ class ElectronSettings } } - let ui = Object.create(null); + let ui = {}; if (fs.existsSync(uiFile)) { try @@ -204,7 +204,7 @@ class ElectronSettings } } - let api = Object.create(null); + let api = {}; if (fs.existsSync(standaloneFile)) { try @@ -262,7 +262,7 @@ class ElectronSettings setRecentProjects(recents) { - if (!recents) recents = Object.create(null); + if (!recents) recents = {}; return this.set(this.RECENT_PROJECTS_FIELD, recents); } @@ -291,7 +291,7 @@ class ElectronSettings return p2.updated - p1.updated; }); files = helper.uniqueArray(files); - const newRecents = Object.create(null); + const newRecents = {}; for (let i = 0; i < 10; i++) { if (i > files.length) break; diff --git a/src/export/export_zip_standalone.js b/src/export/export_zip_standalone.js index 8efc57a..4340e17 100644 --- a/src/export/export_zip_standalone.js +++ b/src/export/export_zip_standalone.js @@ -67,7 +67,7 @@ export default class StandaloneZipExport extends SharedExportService { this._log.info("exported file " + finalZipFileName + " / " + this.archive.pointer() / 1000000.0 + " mb"); - const result = Object.create(null); + const result = {}; result.size = this.archive.pointer() / 1000000.0; result.path = finalZipFileName; result.log = this.exportLog; diff --git a/src/utils/files_util.js b/src/utils/files_util.js index bfd58a3..6224a17 100644 --- a/src/utils/files_util.js +++ b/src/utils/files_util.js @@ -243,7 +243,7 @@ class FilesUtil extends SharedFilesUtil getPatchFiles() { const arr = []; - const fileHierarchy = Object.create(null); + const fileHierarchy = {}; const project = settings.getCurrentProject(); if (!project) return arr; diff --git a/src/utils/projects_util.js b/src/utils/projects_util.js index e1298f3..d50f467 100644 --- a/src/utils/projects_util.js +++ b/src/utils/projects_util.js @@ -188,7 +188,7 @@ class ProjectsUtil extends SharedProjectsUtil addOpDir(project, opDir, atTop = false) { - if (!project.dirs) project.dirs = Object.create(null); + if (!project.dirs) project.dirs = {}; if (!project.dirs.ops) project.dirs.ops = []; if (atTop) { @@ -205,7 +205,7 @@ class ProjectsUtil extends SharedProjectsUtil removeOpDir(project, opDir) { - if (!project.dirs) project.dirs = Object.create(null); + if (!project.dirs) project.dirs = {}; if (!project.dirs.ops) project.dirs.ops = []; project.dirs.ops = project.dirs.ops.filter((dirName) => { @@ -238,7 +238,7 @@ class ProjectsUtil extends SharedProjectsUtil dirs.forEach((dir) => { const opJsons = helper.getFileNamesRecursive(dir, ".json"); - const opLocations = Object.create(null); + const opLocations = {}; opJsons.forEach((jsonLocation) => { const jsonName = path.basename(jsonLocation, ".json"); @@ -267,7 +267,7 @@ class ProjectsUtil extends SharedProjectsUtil { if (fs.existsSync(opDir)) newOrder.push(opDir); }); - if (!currentProject.dirs) currentProject.dirs = Object.create(null); + if (!currentProject.dirs) currentProject.dirs = {}; if (!currentProject.dirs.ops) currentProject.dirs.ops = []; currentProject.dirs.ops = newOrder.filter((dir) => { return !this.isFixedPositionOpDir(dir); }); currentProject.dirs.ops = helper.uniqueArray(currentProject.dirs.ops); @@ -308,7 +308,7 @@ class ProjectsUtil extends SharedProjectsUtil { if (this._projectOpDocs && !rebuildCache) return this._projectOpDocs; - const opDocs = Object.create(null); + const opDocs = {}; const opDirs = this.getProjectOpDirs(project, true, false, false); opDirs.forEach((opDir) => diff --git a/src_client/cmd_electron.js b/src_client/cmd_electron.js index 0cd3ede..cc18271 100644 --- a/src_client/cmd_electron.js +++ b/src_client/cmd_electron.js @@ -1,13 +1,13 @@ import standalone from "./renderer.js"; -const CABLES_CMD_STANDALONE = Object.create(null); -const CABLES_CMD_STANDALONE_OVERRIDES = Object.create(null); +const CABLES_CMD_STANDALONE = {}; +const CABLES_CMD_STANDALONE_OVERRIDES = {}; const CMD_STANDALONE_COMMANDS = []; CABLES_CMD_STANDALONE.runNpm = () => { const loadingModal = standalone.gui.startModalLoading("Installing packages..."); - const options = Object.create(null); + const options = {}; standalone.editor.api("installProjectDependencies", options, (_err, result) => { if (result.data) @@ -274,7 +274,7 @@ CABLES_CMD_STANDALONE.openOpDirectory = () => } }; -CABLES_CMD_STANDALONE_OVERRIDES.PATCH = Object.create(null); +CABLES_CMD_STANDALONE_OVERRIDES.PATCH = {}; CABLES_CMD_STANDALONE_OVERRIDES.PATCH.saveAs = () => { let patchName = standalone.gui.project() ? standalone.gui.project().name : null; @@ -314,7 +314,7 @@ CABLES_CMD_STANDALONE_OVERRIDES.PATCH.renameOp = (opName) => } }; -CABLES_CMD_STANDALONE_OVERRIDES.RENDERER = Object.create(null); +CABLES_CMD_STANDALONE_OVERRIDES.RENDERER = {}; CABLES_CMD_STANDALONE_OVERRIDES.RENDERER.fullscreen = () => { standalone.editor.api("cycleFullscreen", { }, (_err, r) => {}); diff --git a/src_client/standalone.js b/src_client/standalone.js index 31e3a38..82abc41 100644 --- a/src_client/standalone.js +++ b/src_client/standalone.js @@ -24,7 +24,7 @@ export default class CablesStandalone if (!this._config.isPackaged) window.ELECTRON_DISABLE_SECURITY_WARNINGS = true; - this._loadedModules = Object.create(null); + this._loadedModules = {}; } /** diff --git a/webpack.electron.config.js b/webpack.electron.config.js index b604adb..ed95b39 100644 --- a/webpack.electron.config.js +++ b/webpack.electron.config.js @@ -25,7 +25,7 @@ export default (isLiveBuild, buildInfo, minify = false, analyze = false) => { if (!buildInfo.platform) { - buildInfo.platform = Object.create(null); + buildInfo.platform = {}; } if (process.env.BUILD_VERSION) { From 30e3b107f02441b3a1543beb44ee873f98565ea2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20Maih=C3=B6fer?= Date: Wed, 11 Dec 2024 12:42:18 +0100 Subject: [PATCH 38/38] opdir --- src/electron/main.js | 3 ++- src_client/standalone.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/electron/main.js b/src/electron/main.js index 8f9766a..ed8eda9 100644 --- a/src/electron/main.js +++ b/src/electron/main.js @@ -196,7 +196,8 @@ class ElectronApp if (opName) { const onClick = "CABLES.CMD.STANDALONE.openOpDir('', '" + opName + "');"; - result.stderr += ", try running `npm --prefix ./ install " + packageNames.join(" ") + "` manually in the op dir"; + const opDir = opsUtil.getOpSourceDir(opName); + result.stderr += ", try running `npm --prefix ./ install " + packageNames.join(" ") + "` manually in the op dir: `" + opDir + "`"; } } } diff --git a/src_client/standalone.js b/src_client/standalone.js index 82abc41..9e0270b 100644 --- a/src_client/standalone.js +++ b/src_client/standalone.js @@ -91,7 +91,7 @@ export default class CablesStandalone const dirParts = args[2].message.split("/"); const opNameIndex = dirParts.findIndex((part) => { return part.startsWith("Ops."); }); const opName = dirParts[opNameIndex]; - const packageName = dirParts[opNameIndex + 2]; // opdir + "node_modules" + packagename + const packageName = dirParts[opNameIndex + 2]; const onClick = "CABLES.CMD.STANDALONE.openOpDir('', '" + opName + "');"; const msg = "try running this in the op dir:";