A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
global: use node scripts directly everywhere
Abdullah Atta984e8f87805e
diff --git a/apps/desktop/package.json b/apps/desktop/package.jsonindex 3d0bf7898..2fb8aa017 100644--- a/apps/desktop/package.json+++ b/apps/desktop/package.json@@ -38,9 +38,9 @@"dmg-license": "^1.0.11"},"scripts": {- "start": "turbowatch scripts/dev.ts",- "staging": "zx scripts/build.mjs --run",- "release": "zx scripts/build.mjs",+ "start": "node scripts/dev.ts",+ "staging": "node scripts/build.mjs --run",+ "release": "node scripts/build.mjs","build": "tsc","bundle": "esbuild electron=./src/main.ts ./src/preload.ts --external:electron --external:fsevents --minify --bundle --outdir=./build --platform=node --tsconfig=tsconfig.json --define:MAC_APP_STORE=false --define:RELEASE=true","bundle:mas": "esbuild electron=./src/main.ts ./src/preload.ts --minify --external:electron --external:fsevents --bundle --outdir=./build --platform=node --tsconfig=tsconfig.json --define:MAC_APP_STORE=true --define:RELEASE=true",diff --git a/apps/desktop/scripts/build.mjs b/apps/desktop/scripts/build.mjsindex 61bedbc76..c66e94b4e 100644--- a/apps/desktop/scripts/build.mjs+++ b/apps/desktop/scripts/build.mjs@@ -20,9 +20,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.import path from "path";import fs from "fs/promises";import { existsSync } from "fs";-import { argv, os } from "zx";+import yargs from "yargs-parser";+import os from "os";import * as childProcess from "child_process";+import { fileURLToPath } from "url";+const args = yargs(process.argv);+const __filename = fileURLToPath(import.meta.url);+const __dirname = path.dirname(__filename);const sodiumNativePrebuildPath = (arch) =>path.join(`node_modules`,@@ -37,7 +42,7 @@ const sodiumNativePrebuildPath = (arch) =>`${os.platform()}-${arch}`);const webAppPath = path.resolve(path.join(__dirname, "..", "..", "web"));-if (argv.rebuild) {+if (args.rebuild) {await fs.rm("./build/", { force: true, recursive: true });await exec(`cd ${webAppPath} && npm run build:desktop`);@@ -48,7 +53,7 @@ if (argv.rebuild) {});}-if (argv.variant === "mas") {+if (args.variant === "mas") {await exec(`npm run bundle:mas`);} else {await exec(`npm run bundle`);@@ -92,7 +97,7 @@ if (existsSync(sodiumNativePrebuildPath("arm64"))) {);}-if (argv.run) {+if (args.run) {await exec(`npx electron-builder --dir --x64`);if (process.platform === "win32") {await exec(`.\\output\\win-unpacked\\Notesnook.exe`);diff --git a/package-lock.json b/package-lock.jsonindex 8540f4cdf..cabdddfd8 100644--- a/package-lock.json+++ b/package-lock.json@@ -13,8 +13,7 @@"lerna": "^7.0.0","nx": "^16.3.2","patch-package": "^7.0.0",- "typescript": "^5.1.3",- "zx": "^7.2.2"+ "typescript": "^5.1.3"},"devDependencies": {"@commitlint/cli": "^17.1.1",@@ -4544,15 +4543,6 @@"url": "https://github.com/sponsors/isaacs"}},- "node_modules/@types/fs-extra": {- "version": "11.0.1",- "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.1.tgz",- "integrity": "sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==",- "dependencies": {- "@types/jsonfile": "*",- "@types/node": "*"- }- },"node_modules/@types/json-schema": {"version": "7.0.11","resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",@@ -4565,14 +4555,6 @@"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==","dev": true},- "node_modules/@types/jsonfile": {- "version": "6.1.1",- "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.1.tgz",- "integrity": "sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==",- "dependencies": {- "@types/node": "*"- }- },"node_modules/@types/minimatch": {"version": "3.0.5","resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz",@@ -4586,7 +4568,8 @@"node_modules/@types/node": {"version": "18.16.16","resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.16.tgz",- "integrity": "sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g=="+ "integrity": "sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g==",+ "dev": true},"node_modules/@types/normalize-package-data": {"version": "2.4.1",@@ -4599,22 +4582,12 @@"integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==","dev": true},- "node_modules/@types/ps-tree": {- "version": "1.1.2",- "resolved": "https://registry.npmjs.org/@types/ps-tree/-/ps-tree-1.1.2.tgz",- "integrity": "sha512-ZREFYlpUmPQJ0esjxoG1fMvB2HNaD3z+mjqdSosZvd3RalncI9NEur73P8ZJz4YQdL64CmV1w0RuqoRUlhQRBw=="- },"node_modules/@types/semver": {"version": "7.3.13","resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz","integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==","dev": true},- "node_modules/@types/which": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/@types/which/-/which-3.0.0.tgz",- "integrity": "sha512-ASCxdbsrwNfSMXALlC3Decif9rwDMu+80KGp5zI2RLRotfMsTv7fHL8W8VDp24wymzDyIFudhUeSCugrgRFfHQ=="- },"node_modules/@typescript-eslint/eslint-plugin": {"version": "5.59.9","resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.9.tgz",@@ -6696,14 +6669,6 @@"node": ">=8"}},- "node_modules/data-uri-to-buffer": {- "version": "4.0.1",- "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",- "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",- "engines": {- "node": ">= 12"- }- },"node_modules/dateformat": {"version": "3.0.3","resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz",@@ -7829,31 +7794,6 @@"node": ">=0.10.0"}},- "node_modules/event-stream": {- "version": "3.3.4",- "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",- "integrity": "sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==",- "dependencies": {- "duplexer": "~0.1.1",- "from": "~0",- "map-stream": "~0.1.0",- "pause-stream": "0.0.11",- "split": "0.3",- "stream-combiner": "~0.0.4",- "through": "~2.3.1"- }- },- "node_modules/event-stream/node_modules/split": {- "version": "0.3.3",- "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz",- "integrity": "sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==",- "dependencies": {- "through": "2"- },- "engines": {- "node": "*"- }- },"node_modules/event-target-shim": {"version": "5.0.1","resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",@@ -7968,28 +7908,6 @@"reusify": "^1.0.4"}},- "node_modules/fetch-blob": {- "version": "3.2.0",- "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",- "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/jimmywarting"- },- {- "type": "paypal",- "url": "https://paypal.me/jimmywarting"- }- ],- "dependencies": {- "node-domexception": "^1.0.0",- "web-streams-polyfill": "^3.0.3"- },- "engines": {- "node": "^12.20 || >= 14.13"- }- },"node_modules/figures": {"version": "3.2.0","resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",@@ -8184,22 +8102,6 @@"node": ">= 6"}},- "node_modules/formdata-polyfill": {- "version": "4.0.10",- "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",- "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",- "dependencies": {- "fetch-blob": "^3.1.2"- },- "engines": {- "node": ">=12.20.0"- }- },- "node_modules/from": {- "version": "0.1.7",- "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz",- "integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g=="- },"node_modules/fs-constants": {"version": "1.0.0","resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",@@ -8266,14 +8168,6 @@"url": "https://github.com/sponsors/ljharb"}},- "node_modules/fx": {- "version": "28.0.0",- "resolved": "https://registry.npmjs.org/fx/-/fx-28.0.0.tgz",- "integrity": "sha512-vKQDA9g868cZiW8ulgs2uN1yx1i7/nsS33jTMOxekk0Z03BJLffVcdW6AVD32fWb3E6RtmWWuBXBZOk8cLXFNQ==",- "bin": {- "fx": "index.js"- }- },"node_modules/gauge": {"version": "4.0.4","resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz",@@ -10396,11 +10290,6 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/map-stream": {- "version": "0.1.0",- "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",- "integrity": "sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g=="- },"node_modules/meow": {"version": "8.1.2","resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz",@@ -10840,24 +10729,6 @@"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz","integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A=="},- "node_modules/node-domexception": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",- "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/jimmywarting"- },- {- "type": "github",- "url": "https://paypal.me/jimmywarting"- }- ],- "engines": {- "node": ">=10.5.0"- }- },"node_modules/node-fetch": {"version": "2.6.7","resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",@@ -12369,14 +12240,6 @@"node": ">=8"}},- "node_modules/pause-stream": {- "version": "0.0.11",- "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",- "integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==",- "dependencies": {- "through": "~2.3"- }- },"node_modules/picocolors": {"version": "1.0.0","resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",@@ -12614,20 +12477,6 @@"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz","integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="},- "node_modules/ps-tree": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz",- "integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==",- "dependencies": {- "event-stream": "=3.3.4"- },- "bin": {- "ps-tree": "bin/ps-tree.js"- },- "engines": {- "node": ">= 0.10"- }- },"node_modules/punycode": {"version": "1.4.1","resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",@@ -13860,14 +13709,6 @@"node": ">= 0.4"}},- "node_modules/stream-combiner": {- "version": "0.0.4",- "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz",- "integrity": "sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==",- "dependencies": {- "duplexer": "~0.1.1"- }- },"node_modules/string_decoder": {"version": "1.3.0","resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",@@ -14835,27 +14676,11 @@"defaults": "^1.0.3"}},- "node_modules/web-streams-polyfill": {- "version": "3.2.1",- "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",- "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==",- "engines": {- "node": ">= 8"- }- },"node_modules/webidl-conversions": {"version": "3.0.1","resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz","integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="},- "node_modules/webpod": {- "version": "0.0.2",- "resolved": "https://registry.npmjs.org/webpod/-/webpod-0.0.2.tgz",- "integrity": "sha512-cSwwQIeg8v4i3p4ajHhwgR7N6VyxAf+KYSSsY6Pd3aETE+xEU4vbitz7qQkB0I321xnhDdgtxuiSfk5r/FVtjg==",- "bin": {- "webpod": "dist/index.js"- }- },"node_modules/whatwg-url": {"version": "5.0.0","resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",@@ -15234,113 +15059,6 @@"funding": {"url": "https://github.com/sponsors/sindresorhus"}- },- "node_modules/zx": {- "version": "7.2.2",- "resolved": "https://registry.npmjs.org/zx/-/zx-7.2.2.tgz",- "integrity": "sha512-50Gjicd6ijTt7Zcz5fNX+rHrmE0uVqC+X6lYKhf2Cu8wIxDpNIzXwTmzchNdW+JY3LFsRcU43B1lHE4HBMmKgQ==",- "dependencies": {- "@types/fs-extra": "^11.0.1",- "@types/minimist": "^1.2.2",- "@types/node": "^18.16.3",- "@types/ps-tree": "^1.1.2",- "@types/which": "^3.0.0",- "chalk": "^5.2.0",- "fs-extra": "^11.1.1",- "fx": "*",- "globby": "^13.1.4",- "minimist": "^1.2.8",- "node-fetch": "3.3.1",- "ps-tree": "^1.2.0",- "webpod": "^0",- "which": "^3.0.0",- "yaml": "^2.2.2"- },- "bin": {- "zx": "build/cli.js"- },- "engines": {- "node": ">= 16.0.0"- }- },- "node_modules/zx/node_modules/chalk": {- "version": "5.2.0",- "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",- "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==",- "engines": {- "node": "^12.17.0 || ^14.13 || >=16.0.0"- },- "funding": {- "url": "https://github.com/chalk/chalk?sponsor=1"- }- },- "node_modules/zx/node_modules/globby": {- "version": "13.1.4",- "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.4.tgz",- "integrity": "sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==",- "dependencies": {- "dir-glob": "^3.0.1",- "fast-glob": "^3.2.11",- "ignore": "^5.2.0",- "merge2": "^1.4.1",- "slash": "^4.0.0"- },- "engines": {- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/zx/node_modules/node-fetch": {- "version": "3.3.1",- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",- "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",- "dependencies": {- "data-uri-to-buffer": "^4.0.0",- "fetch-blob": "^3.1.4",- "formdata-polyfill": "^4.0.10"- },- "engines": {- "node": "^12.20.0 || ^14.13.1 || >=16.0.0"- },- "funding": {- "type": "opencollective",- "url": "https://opencollective.com/node-fetch"- }- },- "node_modules/zx/node_modules/slash": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",- "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew==",- "engines": {- "node": ">=12"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },- "node_modules/zx/node_modules/which": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz",- "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==",- "dependencies": {- "isexe": "^2.0.0"- },- "bin": {- "node-which": "bin/which.js"- },- "engines": {- "node": "^14.17.0 || ^16.13.0 || >=18.0.0"- }- },- "node_modules/zx/node_modules/yaml": {- "version": "2.3.1",- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz",- "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==",- "engines": {- "node": ">= 14"- }}},"dependencies": {@@ -18565,15 +18283,6 @@}}},- "@types/fs-extra": {- "version": "11.0.1",- "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.1.tgz",- "integrity": "sha512-MxObHvNl4A69ofaTRU8DFqvgzzv8s9yRtaPPm5gud9HDNvpB3GPQFvNuTWAI59B9huVGV5jXYJwbCsmBsOGYWA==",- "requires": {- "@types/jsonfile": "*",- "@types/node": "*"- }- },"@types/json-schema": {"version": "7.0.11","resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",@@ -18586,14 +18295,6 @@"integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==","dev": true},- "@types/jsonfile": {- "version": "6.1.1",- "resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.1.tgz",- "integrity": "sha512-GSgiRCVeapDN+3pqA35IkQwasaCh/0YFH5dEF6S88iDvEn901DjOeH3/QPY+XYP1DFzDZPvIvfeEgk+7br5png==",- "requires": {- "@types/node": "*"- }- },"@types/minimatch": {"version": "3.0.5","resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz",@@ -18607,7 +18308,8 @@"@types/node": {"version": "18.16.16","resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.16.tgz",- "integrity": "sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g=="+ "integrity": "sha512-NpaM49IGQQAUlBhHMF82QH80J08os4ZmyF9MkpCzWAGuOHqE4gTEbhzd7L3l5LmWuZ6E0OiC1FweQ4tsiW35+g==",+ "dev": true},"@types/normalize-package-data": {"version": "2.4.1",@@ -18620,22 +18322,12 @@"integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA==","dev": true},- "@types/ps-tree": {- "version": "1.1.2",- "resolved": "https://registry.npmjs.org/@types/ps-tree/-/ps-tree-1.1.2.tgz",- "integrity": "sha512-ZREFYlpUmPQJ0esjxoG1fMvB2HNaD3z+mjqdSosZvd3RalncI9NEur73P8ZJz4YQdL64CmV1w0RuqoRUlhQRBw=="- },"@types/semver": {"version": "7.3.13","resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.3.13.tgz","integrity": "sha512-21cFJr9z3g5dW8B0CVI9g2O9beqaThGQ6ZFBqHfwhzLDKUxaqTIy3vnfah/UPkfOiF2pLq+tGz+W8RyCskuslw==","dev": true},- "@types/which": {- "version": "3.0.0",- "resolved": "https://registry.npmjs.org/@types/which/-/which-3.0.0.tgz",- "integrity": "sha512-ASCxdbsrwNfSMXALlC3Decif9rwDMu+80KGp5zI2RLRotfMsTv7fHL8W8VDp24wymzDyIFudhUeSCugrgRFfHQ=="- },"@typescript-eslint/eslint-plugin": {"version": "5.59.9","resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.9.tgz",@@ -20060,11 +19752,6 @@"resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz","integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg=="},- "data-uri-to-buffer": {- "version": "4.0.1",- "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",- "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A=="- },"dateformat": {"version": "3.0.3","resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz",@@ -20895,30 +20582,6 @@"resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz","integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g=="},- "event-stream": {- "version": "3.3.4",- "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz",- "integrity": "sha512-QHpkERcGsR0T7Qm3HNJSyXKEEj8AHNxkY3PK8TS2KJvQ7NiSHe3DDpwVKKtoYprL/AreyzFBeIkBIWChAqn60g==",- "requires": {- "duplexer": "~0.1.1",- "from": "~0",- "map-stream": "~0.1.0",- "pause-stream": "0.0.11",- "split": "0.3",- "stream-combiner": "~0.0.4",- "through": "~2.3.1"- },- "dependencies": {- "split": {- "version": "0.3.3",- "resolved": "https://registry.npmjs.org/split/-/split-0.3.3.tgz",- "integrity": "sha512-wD2AeVmxXRBoX44wAycgjVpMhvbwdI2aZjCkvfNcH1YqHQvJVa1duWc73OyVGJUc05fhFaTZeQ/PYsrmyH0JVA==",- "requires": {- "through": "2"- }- }- }- },"event-target-shim": {"version": "5.0.1","resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz",@@ -21014,15 +20677,6 @@"reusify": "^1.0.4"}},- "fetch-blob": {- "version": "3.2.0",- "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz",- "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",- "requires": {- "node-domexception": "^1.0.0",- "web-streams-polyfill": "^3.0.3"- }- },"figures": {"version": "3.2.0","resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz",@@ -21161,19 +20815,6 @@"mime-types": "^2.1.12"}},- "formdata-polyfill": {- "version": "4.0.10",- "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",- "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",- "requires": {- "fetch-blob": "^3.1.2"- }- },- "from": {- "version": "0.1.7",- "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz",- "integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g=="- },"fs-constants": {"version": "1.0.0","resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz",@@ -21225,11 +20866,6 @@"integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==","dev": true},- "fx": {- "version": "28.0.0",- "resolved": "https://registry.npmjs.org/fx/-/fx-28.0.0.tgz",- "integrity": "sha512-vKQDA9g868cZiW8ulgs2uN1yx1i7/nsS33jTMOxekk0Z03BJLffVcdW6AVD32fWb3E6RtmWWuBXBZOk8cLXFNQ=="- },"gauge": {"version": "4.0.4","resolved": "https://registry.npmjs.org/gauge/-/gauge-4.0.4.tgz",@@ -22793,11 +22429,6 @@"resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz","integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ=="},- "map-stream": {- "version": "0.1.0",- "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.1.0.tgz",- "integrity": "sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g=="- },"meow": {"version": "8.1.2","resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz",@@ -23130,11 +22761,6 @@"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz","integrity": "sha512-mmcei9JghVNDYydghQmeDX8KoAm0FAiYyIcUt/N4nhyAipB17pllZQDOJD2fotxABnt4Mdz+dKTO7eftLg4d0A=="},- "node-domexception": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz",- "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ=="- },"node-fetch": {"version": "2.6.7","resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",@@ -24242,14 +23868,6 @@"resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz","integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw=="},- "pause-stream": {- "version": "0.0.11",- "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz",- "integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==",- "requires": {- "through": "~2.3"- }- },"picocolors": {"version": "1.0.0","resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",@@ -24419,14 +24037,6 @@"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz","integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg=="},- "ps-tree": {- "version": "1.2.0",- "resolved": "https://registry.npmjs.org/ps-tree/-/ps-tree-1.2.0.tgz",- "integrity": "sha512-0VnamPPYHl4uaU/nSFeZZpR21QAWRz+sRv4iW9+v/GS/J5U5iZB5BNN6J0RMoOvdx2gWM2+ZFMIm58q24e4UYA==",- "requires": {- "event-stream": "=3.3.4"- }- },"punycode": {"version": "1.4.1","resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz",@@ -25343,14 +24953,6 @@"internal-slot": "^1.0.4"}},- "stream-combiner": {- "version": "0.0.4",- "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.0.4.tgz",- "integrity": "sha512-rT00SPnTVyRsaSz5zgSPma/aHSOic5U1prhYdRy5HS2kTZviFpmDgzilbtsJsxiroqACmayynDN/9VzIbX5DOw==",- "requires": {- "duplexer": "~0.1.1"- }- },"string_decoder": {"version": "1.3.0","resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",@@ -26061,21 +25663,11 @@"defaults": "^1.0.3"}},- "web-streams-polyfill": {- "version": "3.2.1",- "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz",- "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q=="- },"webidl-conversions": {"version": "3.0.1","resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz","integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="},- "webpod": {- "version": "0.0.2",- "resolved": "https://registry.npmjs.org/webpod/-/webpod-0.0.2.tgz",- "integrity": "sha512-cSwwQIeg8v4i3p4ajHhwgR7N6VyxAf+KYSSsY6Pd3aETE+xEU4vbitz7qQkB0I321xnhDdgtxuiSfk5r/FVtjg=="- },"whatwg-url": {"version": "5.0.0","resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",@@ -26352,75 +25944,6 @@"version": "0.1.0","resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz","integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="- },- "zx": {- "version": "7.2.2",- "resolved": "https://registry.npmjs.org/zx/-/zx-7.2.2.tgz",- "integrity": "sha512-50Gjicd6ijTt7Zcz5fNX+rHrmE0uVqC+X6lYKhf2Cu8wIxDpNIzXwTmzchNdW+JY3LFsRcU43B1lHE4HBMmKgQ==",- "requires": {- "@types/fs-extra": "^11.0.1",- "@types/minimist": "^1.2.2",- "@types/node": "^18.16.3",- "@types/ps-tree": "^1.1.2",- "@types/which": "^3.0.0",- "chalk": "^5.2.0",- "fs-extra": "^11.1.1",- "fx": "*",- "globby": "^13.1.4",- "minimist": "^1.2.8",- "node-fetch": "3.3.1",- "ps-tree": "^1.2.0",- "webpod": "^0",- "which": "^3.0.0",- "yaml": "^2.2.2"- },- "dependencies": {- "chalk": {- "version": "5.2.0",- "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz",- "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA=="- },- "globby": {- "version": "13.1.4",- "resolved": "https://registry.npmjs.org/globby/-/globby-13.1.4.tgz",- "integrity": "sha512-iui/IiiW+QrJ1X1hKH5qwlMQyv34wJAYwH1vrf8b9kBA4sNiif3gKsMHa+BrdnOpEudWjpotfa7LrTzB1ERS/g==",- "requires": {- "dir-glob": "^3.0.1",- "fast-glob": "^3.2.11",- "ignore": "^5.2.0",- "merge2": "^1.4.1",- "slash": "^4.0.0"- }- },- "node-fetch": {- "version": "3.3.1",- "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.1.tgz",- "integrity": "sha512-cRVc/kyto/7E5shrWca1Wsea4y6tL9iYJE5FBCius3JQfb/4P4I295PfhgbJQBLTx6lATE4z+wK0rPM4VS2uow==",- "requires": {- "data-uri-to-buffer": "^4.0.0",- "fetch-blob": "^3.1.4",- "formdata-polyfill": "^4.0.10"- }- },- "slash": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz",- "integrity": "sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew=="- },- "which": {- "version": "3.0.1",- "resolved": "https://registry.npmjs.org/which/-/which-3.0.1.tgz",- "integrity": "sha512-XA1b62dzQzLfaEOSQFTCOd5KFf/1VSzZo7/7TUjnya6u0vGGKzU96UQBZTAThCb2j4/xjBAyii1OhRLJEivHvg==",- "requires": {- "isexe": "^2.0.0"- }- },- "yaml": {- "version": "2.3.1",- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.1.tgz",- "integrity": "sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ=="- }- }}}}diff --git a/package.json b/package.jsonindex fff638732..f6a462930 100644--- a/package.json+++ b/package.json@@ -53,7 +53,6 @@"@nrwl/nx-cloud": "^14.6.2","eslint-plugin-header": "^3.1.1","typescript": "^5.1.3",- "zx": "^7.2.2","lerna": "^7.0.0","nx": "^16.3.2","patch-package": "^7.0.0"diff --git a/packages/editor/package.json b/packages/editor/package.jsonindex ff68ec89d..ae579cd23 100644--- a/packages/editor/package.json+++ b/packages/editor/package.json@@ -75,8 +75,8 @@},"scripts": {"test": "vitest run",- "prebuild": "zx ./scripts/build.mjs",- "prewatch": "zx ./scripts/build.mjs",+ "prebuild": "node ./scripts/build.mjs",+ "prewatch": "node ./scripts/build.mjs","build": "tsc","watch": "tsc --watch","prepublishOnly": "npm run build && npm run test",diff --git a/packages/editor/scripts/build.mjs b/packages/editor/scripts/build.mjsindex f90cc75a8..6c6cb28ab 100755--- a/packages/editor/scripts/build.mjs+++ b/packages/editor/scripts/build.mjs@@ -17,9 +17,13 @@ You should have received a copy of the GNU General Public Licensealong with this program. If not, see <http://www.gnu.org/licenses/>.*/-import "zx/globals";+import path from "path";+import fs from "fs";import { langen } from "./langen.mjs";+import { fileURLToPath } from "url";+const __filename = fileURLToPath(import.meta.url);+const __dirname = path.dirname(__filename);const ROOT_DIR = path.resolve(path.join(__dirname, ".."));const pathsToCopy = {@@ -31,8 +35,8 @@ const pathsToCopy = {for (const name in pathsToCopy) {const src = pathsToCopy[name];const fullPath = path.join(ROOT_DIR, src);- fs.copySync(fullPath, path.join(ROOT_DIR, "styles", name), {- overwrite: true,+ fs.cpSync(fullPath, path.join(ROOT_DIR, "styles", name), {+ force: true,recursive: true,errorOnExist: false});diff --git a/packages/editor/scripts/langen.mjs b/packages/editor/scripts/langen.mjsindex 20fc1c526..1a794bb02 100644--- a/packages/editor/scripts/langen.mjs+++ b/packages/editor/scripts/langen.mjs@@ -21,7 +21,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.* Quick & dirty script to download & transform all language details from* the PrismJS repo.*/-require("isomorphic-fetch");+import "isomorphic-fetch";+import fs from "fs";+import path from "path";export async function langen(rootDirectory, saveDirectory) {const response = await fetch(