diff --git a/.vscode/settings.json b/.vscode/settings.json index e0fd696e..3d84e408 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,6 +9,7 @@ "IIFE", "maximizable", "minimizable", + "noflo", "osascript", "Rwkv", "submenu", diff --git a/package.json b/package.json index 99dbb821..8ff2dcf7 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "scripts": { "start": "pnpm run clean && pnpm run init:git-submodule && pnpm run start:without-clean", "start:without-clean": "pnpm run build:plugin && cross-env NODE_ENV=development electron-forge start", + "clean": "rimraf -- ./out ./settings-dev ./node_modules/@tiddlygit/tiddlywiki/plugins/linonetwo ./cache-database-dev ./logs ./.webpack ./node_modules/.cache && cross-env NODE_ENV=development npx ts-node scripts/developmentMkdir.ts", "start:without-clean:debug-worker": "pnpm run build:plugin && cross-env NODE_ENV=development DEBUG_WORKER=true electron-forge start", "start:without-clean:debug-main": "pnpm run build:plugin && cross-env NODE_ENV=development DEBUG_MAIN=true electron-forge start", "build:plugin": "zx scripts/compilePlugins.mjs", @@ -20,7 +21,6 @@ "make:win-arm": "pnpm run build:plugin && cross-env NODE_ENV=production electron-forge make --platform=win32 --arch=arm64", "make:linux-x64": "pnpm run build:plugin && cross-env NODE_ENV=production electron-forge make --platform=linux --arch=x64", "make:linux-arm": "pnpm run build:plugin && cross-env NODE_ENV=production electron-forge make --platform=linux --arch=arm64", - "clean": "rimraf -- ./out ./settings-dev ./node_modules/@tiddlygit/tiddlywiki/plugins/linonetwo ./cache-database-dev ./logs ./.webpack ./node_modules/.cache && cross-env NODE_ENV=development npx ts-node scripts/developmentMkdir.ts", "init:git-submodule": "git submodule update --recursive && git submodule update --remote", "lint": "eslint ./src --ext js,ts,tsx,json", "lint:fix": "eslint ./src --ext js,ts,tsx,json --fix", @@ -180,7 +180,6 @@ "event-hooks-webpack-plugin": "2.3.0", "fbp-graph": "^0.7.0", "fbp-loader": "^0.1.2", - "fbp-manifest": "^0.3.1", "font-awesome": "^4.7.0", "fork-ts-checker-webpack-plugin": "8.0.0", "glob": "^10.3.3", @@ -224,7 +223,8 @@ }, "patchedDependencies": { "the-graph@0.13.1": "patches/the-graph@0.13.1.patch", - "klayjs-noflo@0.3.1": "patches/klayjs-noflo@0.3.1.patch" + "klayjs-noflo@0.3.1": "patches/klayjs-noflo@0.3.1.patch", + "noflo@1.4.3": "patches/noflo@1.4.3.patch" } }, "private": false diff --git a/patches/noflo@1.4.3.patch b/patches/noflo@1.4.3.patch new file mode 100644 index 00000000..47ae1791 --- /dev/null +++ b/patches/noflo@1.4.3.patch @@ -0,0 +1,28 @@ +diff --git a/lib/ComponentLoader.d.ts b/lib/ComponentLoader.d.ts +index 8e7731dbdaa53005d58d55e6a834d20d032eff7e..faa04bafb5667a24ceabbf0432439e9b42856f4b 100644 +--- a/lib/ComponentLoader.d.ts ++++ b/lib/ComponentLoader.d.ts +@@ -79,7 +79,7 @@ export class ComponentLoader { + * @param {import("fbp-graph/lib/Types").GraphNodeMetadata} metadata + * @returns {Promise} + */ +- protected createComponent(name: string, component: ComponentDefinitionWithoutGraph, metadata: import("fbp-graph/lib/Types").GraphNodeMetadata): Promise; ++ createComponent(name: string, component: ComponentDefinitionWithoutGraph, metadata: import("fbp-graph/lib/Types").GraphNodeMetadata): Promise; + /** + * @param {import("fbp-graph").Graph|object|string} cPath + * @returns {boolean} +diff --git a/src/lib/ComponentLoader.js b/src/lib/ComponentLoader.js +index b3215074ff63d5be2f352a4dc94635f82212836c..98c7b653da5ec47072656afaef1c50b6c7ebd646 100644 +--- a/src/lib/ComponentLoader.js ++++ b/src/lib/ComponentLoader.js +@@ -226,9 +226,8 @@ export class ComponentLoader { + return promise; + } + +- // Creates an instance of a component. + /** +- * @protected ++ * Creates an instance of a component. + * @param {string} name + * @param {ComponentDefinitionWithoutGraph} component + * @param {import("fbp-graph/lib/Types").GraphNodeMetadata} metadata \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6de9a42d..a8bab0de 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,9 @@ patchedDependencies: klayjs-noflo@0.3.1: hash: 6fjyliev4jv57qjijqsznbr3si path: patches/klayjs-noflo@0.3.1.patch + noflo@1.4.3: + hash: z4yxkvf4rxggiupjkyz3xxwazm + path: patches/noflo@1.4.3.patch the-graph@0.13.1: hash: 7l2bhm362kxjhsgmmhtyhvw7ga path: patches/the-graph@0.13.1.patch @@ -454,9 +457,6 @@ devDependencies: fbp-loader: specifier: ^0.1.2 version: 0.1.2 - fbp-manifest: - specifier: ^0.3.1 - version: 0.3.1 font-awesome: specifier: ^4.7.0 version: 4.7.0 @@ -486,7 +486,7 @@ devDependencies: version: 2.0.1(webpack@5.88.1) noflo: specifier: ^1.4.3 - version: 1.4.3 + version: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) noflo-component-loader: specifier: ^0.4.1 version: 0.4.1 @@ -5880,7 +5880,7 @@ packages: mimic-response: 1.0.1 /clone@1.0.4: - resolution: {integrity: sha1-2jCcwmPfFZlMaIypAheco8fNfH4=} + resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} dev: true @@ -8072,16 +8072,6 @@ packages: fbp: 1.8.0 tv4: 1.3.0 - /fbp-manifest@0.3.1: - resolution: {integrity: sha512-wP0jL8aTqEJZpSmC9AHW1KZs8s/eC5ven1OQ9ZmZkeF0CMChaNGA7UYIKkpRY2mPWu7Qt7t7XBtUQd/BPMqJhQ==} - hasBin: true - dependencies: - clone: 2.1.2 - commander: 6.2.1 - fbp-graph: 0.7.0 - tv4: 1.3.0 - dev: true - /fbp-protocol-client@0.3.3: resolution: {integrity: sha512-SAFDCdz0oohtBojR6dI3YO8AfDmNfk6QlQWcIAxC6/GnYpYsfu0bQmIh3V7mjNBwhhzftUqsBJQPpk7nhwFxTg==} dependencies: @@ -10741,7 +10731,7 @@ packages: /noflo-adapters@0.3.2: resolution: {integrity: sha1-6q7j21axABDe8rPBirAkbkt1N+A=} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) owl-deepcopy: 0.0.6 underscore: 1.8.3 transitivePeerDependencies: @@ -10751,7 +10741,7 @@ packages: /noflo-ajax@0.3.0: resolution: {integrity: sha1-NMxiaKsJTo9fjfWwzdMKPTTwjRk=} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10760,7 +10750,7 @@ packages: resolution: {integrity: sha512-p7q/CdFVSCb8DtVog6C9sIpM+/jlRXmJWw1vSa8SfBmC3B+Am83gkoBxpo/zAty1I/mbSkjNDUQPp+2XoEt2cg==} dependencies: jsonpath: 1.1.1 - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) noflo-assembly: 0.3.1 transitivePeerDependencies: - supports-color @@ -10769,7 +10759,7 @@ packages: /noflo-assembly@0.3.1: resolution: {integrity: sha512-tn1mMO5xNqvm7Mn7vZSg4qpgFlFr3mMpxlZ1R7RLCQ+39pkZnMhpkxy210Hd5OJtB9AOlHoxhY8RSLhZU9ZT5w==} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10777,7 +10767,7 @@ packages: /noflo-clmtrackr@0.3.0: resolution: {integrity: sha1-7do5atEDXT+enae73LHJvg/EXM4=} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10792,7 +10782,7 @@ packages: /noflo-core@0.6.1: resolution: {integrity: sha512-Vhc9icg72q/RF+9+6ztkb1kQBn6+YFsHq5hjIGsuAHfn0SviG0YZis+wDbzXoy/l8w1VRTRBiHkNt44ApmBQ8Q==} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) owl-deepcopy: 0.0.6 transitivePeerDependencies: - supports-color @@ -10801,7 +10791,7 @@ packages: /noflo-css@0.2.0: resolution: {integrity: sha1-uoz+DWQdK0axBUd5bfR5JKKdR1w=} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10809,7 +10799,7 @@ packages: /noflo-dom@0.3.0: resolution: {integrity: sha1-Y19xG7d1bsdhb0ooDmlRCaXojPQ=} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10820,7 +10810,7 @@ packages: dependencies: fs.extra: 1.3.2 mimetype: 0.0.8 - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10828,7 +10818,7 @@ packages: /noflo-flow@0.8.0: resolution: {integrity: sha512-5AKvlo44jRW1ZlJIkPAjvaungiFiWduitZ22yWroFmb/IwSWzUSJ54Y8fh30AasxgO5rd6yT/CPVjmiQjsU8yQ==} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10836,7 +10826,7 @@ packages: /noflo-geometry@0.3.0: resolution: {integrity: sha1-oMlzDgLSEE7spjTNl7PbxXOBXjs=} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10844,7 +10834,7 @@ packages: /noflo-graph@0.4.0: resolution: {integrity: sha512-hqWAyp6nedLkG0Wy0xvE8jgTvLtioMgls8Tm+R5klDKQ5T/NNawlw/aIBY+x+nLpb2MQubIqLKAMXqEklRtdaQ==} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10852,7 +10842,7 @@ packages: /noflo-groups@0.3.0: resolution: {integrity: sha1-o/lteLwEx8p/1/LWiUf38mMEn0c=} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) noflo-core: 0.6.1 uuid: 3.4.0 transitivePeerDependencies: @@ -10862,7 +10852,7 @@ packages: /noflo-gum@0.4.0: resolution: {integrity: sha512-YehNd9XkkqMtGpoPQEzMWOpPg4sYbozb13KVuwebNpfa1CLAqaOlKszBa7zPFXk/a1jzmgFl5nVbkVbmmqLxhQ==} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10871,7 +10861,7 @@ packages: resolution: {integrity: sha1-opqEOI4CQWSiGlfpTnbjBp7lmP0=} dependencies: coffeescript: 2.7.0 - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10879,7 +10869,7 @@ packages: /noflo-indexeddb@0.3.1: resolution: {integrity: sha1-OWOkq/1gGKmNjAFN33igJrBBLC4=} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10887,7 +10877,7 @@ packages: /noflo-interaction@0.3.1: resolution: {integrity: sha512-AekNNO5DvsBf+uyQoNEBXxBp9fA/q7GCcXkrYdqWUhC3xlWtIq1y8X2gLWlXgezSNhEBHKSBNKvMOphALrCzQg==} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10895,7 +10885,7 @@ packages: /noflo-localstorage@0.3.0: resolution: {integrity: sha1-TYvEVF0ufQgjKw16GZpBg012tJ0=} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10903,7 +10893,7 @@ packages: /noflo-math@0.4.0: resolution: {integrity: sha512-EjysrGuSiplGKssriAdrD2eSKk4WJcm9tXkpR76pMKbbiqHKGk/q6GPBbtVAcNCEf5pNVqg5cFDcWMYtshUi9w==} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10919,7 +10909,7 @@ packages: fbp-graph: 0.7.0 flowhub-registry: 0.2.0 mdns-js: 1.0.3 - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) noflo-runtime-base: 0.13.1 noflo-runtime-webrtc: 0.13.0 noflo-runtime-websocket: 0.13.0 @@ -10936,7 +10926,7 @@ packages: resolution: {integrity: sha512-7GC1Y4ms/Hzs6J98QywFMKdLJ7S1IwlAVaT9SAMaooI81Ip96oclxY96VHUbO4to3zkKIwFX5EyFS8Zmn8AbYg==} dependencies: jsonpath: 1.1.1 - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) owl-deepcopy: 0.0.6 underscore: 1.9.2 transitivePeerDependencies: @@ -10946,7 +10936,7 @@ packages: /noflo-packets@0.3.0: resolution: {integrity: sha512-yDGuyE5bLqVdMwgFQ5sYO6eMvXvcIyHNU7OqVG+uh2KtFJ2QiS7nQ1dWjqwKK3ySDbqpmRM+Jq8uUGggodjUhw==} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) underscore: 1.8.3 transitivePeerDependencies: - supports-color @@ -10955,7 +10945,7 @@ packages: /noflo-physics@0.3.0: resolution: {integrity: sha1-mT8q8D5RFqw+O8u4qzrPZ5C98Qc=} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10963,7 +10953,7 @@ packages: /noflo-routers@0.5.0: resolution: {integrity: sha512-F5oicc9OdfxJrs/vBmYtpU7TUQoNqrIKc/LagLFRIkqhzNtceTM4HcfeutCSA9nHl371gBpO2iraF8yeaF9w+A==} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -10975,7 +10965,7 @@ packages: debug: 4.3.4(supports-color@8.1.1) flowtrace: 0.1.10 json-stringify-safe: 5.0.1 - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - encoding - supports-color @@ -11012,7 +11002,7 @@ packages: resolution: {integrity: sha512-K+uWC9dUgjD2jSBSl+por8uedTEh4TGjROv3eTzB/b9K/F7a2OozNAtFxrdSCxXbmokVQ11N0d8KJgfjE2wPPg==} dependencies: btoa: 1.2.1 - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) sift-string: 0.0.2 underscore: 1.12.1 transitivePeerDependencies: @@ -11024,7 +11014,7 @@ packages: dependencies: debug: 4.3.4(supports-color@8.1.1) ease-component: 1.0.0 - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) transitivePeerDependencies: - supports-color dev: false @@ -11032,7 +11022,7 @@ packages: /noflo-webaudio@0.4.0: resolution: {integrity: sha1-LEjZ0zhYuv+SzN5KrgtJ8GToUsM=} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) noflo-helper-arrayable: 0.2.0 transitivePeerDependencies: - supports-color @@ -11041,13 +11031,13 @@ packages: /noflo-websocket@0.4.0: resolution: {integrity: sha1-qoXZFFXmmPTbpTUW7xDwGmEiEwM=} dependencies: - noflo: 1.4.3 + noflo: 1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm) websocket: 1.0.34 transitivePeerDependencies: - supports-color dev: false - /noflo@1.4.3: + /noflo@1.4.3(patch_hash=z4yxkvf4rxggiupjkyz3xxwazm): resolution: {integrity: sha512-1OAHp3H7L59nuNbdjKy59Lqugy+fRJEhLIat46+CqbIJIh9zdZ6qdrhwir0s47cVVF46b09WyJTlRdwsro/6Xg==} engines: {node: '>= 6'} hasBin: true @@ -11059,6 +11049,7 @@ packages: get-function-params: 2.0.7 transitivePeerDependencies: - supports-color + patched: true /noop-logger@0.1.1: resolution: {integrity: sha512-6kM8CLXvuW5crTxsAtva2YLrRrDaiTIkIePWs9moLHqbFWT94WpNFjwS/5dfLfECg5i/lkmw3aoqVidxt23TEQ==} diff --git a/webpack.rules.js b/webpack.rules.js index 7fba4600..ee497590 100644 --- a/webpack.rules.js +++ b/webpack.rules.js @@ -121,6 +121,9 @@ module.exports = [ }, }, { + /** + * Replace this file in noflo library's content with bundled components pack, so when noflo's internal code require this file, it will get the bundled components pack as result. + */ test: /noflo(\\+|\/)lib(\\+|\/)loader(\\+|\/)register.js$/, use: [ {