From 5611e90fda18e83ea7bff7b014d068e326760e28 Mon Sep 17 00:00:00 2001 From: Chenlei Hu Date: Sat, 12 Oct 2024 11:56:49 -0400 Subject: [PATCH] Add ts-strict-ignore plugin (#1235) * Add ts-strict-ignore plugin * nit * Add to typecheck script --- package-lock.json | 663 ++++++++++++++++++ package.json | 3 +- .../common/__tests__/EditableText.spec.ts | 1 + .../__tests__/TreeExplorerTreeNode.spec.ts | 1 + .../tabs/queue/__tests__/ResultGallery.ts | 1 + src/extensions/core/clipspace.ts | 1 + src/extensions/core/colorPalette.ts | 1 + src/extensions/core/contextMenuFilter.ts | 1 + src/extensions/core/dynamicPrompts.ts | 1 + src/extensions/core/editAttention.ts | 1 + src/extensions/core/groupNode.ts | 1 + src/extensions/core/groupNodeManage.ts | 1 + src/extensions/core/groupOptions.ts | 1 + src/extensions/core/invertMenuScrolling.ts | 1 + src/extensions/core/linkRenderMode.ts | 1 + src/extensions/core/maskeditor.ts | 1 + src/extensions/core/nodeBadge.ts | 1 + src/extensions/core/nodeTemplates.ts | 1 + src/extensions/core/noteNode.ts | 1 + src/extensions/core/rerouteNode.ts | 1 + src/extensions/core/saveImageExtraOutput.ts | 1 + src/extensions/core/simpleTouchSupport.ts | 1 + src/extensions/core/slotDefaults.ts | 1 + src/extensions/core/snapToGrid.ts | 1 + src/extensions/core/uploadAudio.ts | 1 + src/extensions/core/uploadImage.ts | 1 + src/extensions/core/webcamCapture.ts | 1 + src/extensions/core/widgetInputs.ts | 1 + src/main.ts | 1 + src/scripts/api.ts | 1 + src/scripts/app.ts | 1 + src/scripts/changeTracker.ts | 1 + src/scripts/domWidget.ts | 1 + src/scripts/logging.ts | 1 + src/scripts/metadata/flac.ts | 1 + src/scripts/metadata/png.ts | 1 + src/scripts/pnginfo.ts | 1 + src/scripts/ui.ts | 1 + src/scripts/ui/components/asyncDialog.ts | 1 + src/scripts/ui/components/button.ts | 1 + src/scripts/ui/components/buttonGroup.ts | 1 + src/scripts/ui/components/popup.ts | 1 + src/scripts/ui/dialog.ts | 1 + src/scripts/ui/draggableList.ts | 1 + src/scripts/ui/imagePreview.ts | 1 + src/scripts/ui/settings.ts | 1 + src/scripts/ui/toggleSwitch.ts | 1 + src/scripts/ui/userSelection.ts | 1 + src/scripts/ui/utils.ts | 1 + src/scripts/utils.ts | 1 + src/scripts/widgets.ts | 1 + src/scripts/workflows.ts | 1 + src/services/nodeSearchService.ts | 1 + src/stores/commandStore.ts | 1 + src/stores/dialogStore.ts | 1 + src/stores/executionStore.ts | 1 + src/stores/modelStore.ts | 1 + src/stores/nodeBookmarkStore.ts | 1 + src/stores/nodeDefStore.ts | 1 + src/stores/queueStore.ts | 1 + src/stores/settingStore.ts | 1 + src/stores/workflowStore.ts | 1 + src/types/litegraphTypes.ts | 1 + src/utils/colorUtil.ts | 1 + src/utils/treeUtil.ts | 1 + tests-ui/extractExamples.ts | 1 + tests-ui/globalSetup.ts | 1 + tests-ui/tests/apiTypes.test.ts | 1 + tests-ui/tests/colorUtil.test.ts | 1 + tests-ui/tests/comfyWorkflow.test.ts | 1 + tests-ui/tests/extensions.test.ts | 1 + tests-ui/tests/groupNode.test.ts | 1 + tests-ui/tests/nodeDef.test.ts | 1 + tests-ui/tests/nodeSearchService.test.ts | 1 + tests-ui/tests/users.test.ts | 1 + tests-ui/tests/widgetInputs.test.ts | 1 + tests-ui/utils/ezgraph.ts | 1 + tests-ui/utils/index.ts | 1 + tests-ui/utils/litegraph.ts | 1 + tests-ui/utils/nopProxy.ts | 1 + tests-ui/utils/setup.ts | 1 + tsconfig.json | 8 +- 82 files changed, 751 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index c10217d08..3e9b17ee9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -61,6 +61,7 @@ "tsx": "^4.15.6", "typescript": "^5.4.5", "typescript-eslint": "^8.0.0", + "typescript-strict-plugin": "^2.4.4", "unplugin-icons": "^0.19.3", "unplugin-vue-components": "^0.27.4", "vite": "^5.4.6", @@ -5097,6 +5098,27 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/binary-extensions": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", @@ -5115,6 +5137,33 @@ "integrity": "sha512-PJvH288AWQhKs2v9zyfYdPzlPqf5bXbGMmhmUIY9x4dAUGIWgomO771oBQNwJnMQSnUIXhKu6sgzpBRXTlvb8Q==", "license": "MIT" }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/bl/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -5197,6 +5246,31 @@ "node-int64": "^0.4.0" } }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -5368,6 +5442,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "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, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cli-truncate": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", @@ -5477,6 +5564,16 @@ "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, + "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, + "license": "MIT", + "engines": { + "node": ">=0.8" + } + }, "node_modules/co": { "version": "4.6.0", "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", @@ -5825,6 +5922,19 @@ "node": ">=0.10.0" } }, + "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, + "license": "MIT", + "dependencies": { + "clone": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -6007,6 +6117,16 @@ "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", "dev": true }, + "node_modules/end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, "node_modules/entities": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", @@ -7103,6 +7223,27 @@ "node": ">=4" } }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, "node_modules/ignore": { "version": "5.3.1", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", @@ -7273,6 +7414,16 @@ "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, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", @@ -7300,6 +7451,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "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, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -9553,6 +9717,99 @@ "dev": true, "license": "MIT" }, + "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, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/log-symbols/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/log-symbols/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/log-symbols/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/log-update": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", @@ -9996,6 +10253,133 @@ "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, + "license": "MIT", + "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/ora/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/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, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/ora/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/ora/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/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, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ora/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/p-limit": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", @@ -10604,6 +10988,17 @@ "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", "dev": true }, + "node_modules/pump": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -11839,6 +12234,264 @@ } } }, + "node_modules/typescript-strict-plugin": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/typescript-strict-plugin/-/typescript-strict-plugin-2.4.4.tgz", + "integrity": "sha512-OXcWHQk+pW9gqEL/Mb1eTgj/Yiqk1oHBERr9v4VInPOYN++p+cXejmQK/h/VlUPGD++FXQ8pgiqVMyEtxU4T6A==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^3.0.0", + "execa": "^4.0.0", + "minimatch": "^9.0.3", + "ora": "^5.4.1", + "yargs": "^16.2.0" + }, + "bin": { + "tsc-strict": "dist/cli/tsc-strict/index.js", + "update-strict-comments": "dist/cli/update-strict-comments/index.js" + } + }, + "node_modules/typescript-strict-plugin/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/typescript-strict-plugin/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/typescript-strict-plugin/node_modules/chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/typescript-strict-plugin/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/typescript-strict-plugin/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/typescript-strict-plugin/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/typescript-strict-plugin/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/typescript-strict-plugin/node_modules/execa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", + "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.0", + "get-stream": "^5.0.0", + "human-signals": "^1.1.1", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.0", + "onetime": "^5.1.0", + "signal-exit": "^3.0.2", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/typescript-strict-plugin/node_modules/get-stream": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", + "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pump": "^3.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript-strict-plugin/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/typescript-strict-plugin/node_modules/human-signals": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", + "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8.12.0" + } + }, + "node_modules/typescript-strict-plugin/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/typescript-strict-plugin/node_modules/minimatch": { + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typescript-strict-plugin/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/typescript-strict-plugin/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/typescript-strict-plugin/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/typescript-strict-plugin/node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/typescript-strict-plugin/node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, "node_modules/ufo": { "version": "1.5.4", "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.5.4.tgz", @@ -12576,6 +13229,16 @@ "makeerror": "1.0.12" } }, + "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, + "license": "MIT", + "dependencies": { + "defaults": "^1.0.3" + } + }, "node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", diff --git a/package.json b/package.json index ddace9e32..f85decdee 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "build": "npm run typecheck && vite build", "deploy": "npm run build && node scripts/deploy.js", "zipdist": "node scripts/zipdist.js", - "typecheck": "tsc --noEmit", + "typecheck": "tsc --noEmit && tsc-strict", "format": "prettier --write './**/*.{js,ts,tsx,vue}'", "test": "npm run build && jest", "test:generate:examples": "npx tsx tests-ui/extractExamples", @@ -56,6 +56,7 @@ "tsx": "^4.15.6", "typescript": "^5.4.5", "typescript-eslint": "^8.0.0", + "typescript-strict-plugin": "^2.4.4", "unplugin-icons": "^0.19.3", "unplugin-vue-components": "^0.27.4", "vite": "^5.4.6", diff --git a/src/components/common/__tests__/EditableText.spec.ts b/src/components/common/__tests__/EditableText.spec.ts index 7bda13160..abe9e7702 100644 --- a/src/components/common/__tests__/EditableText.spec.ts +++ b/src/components/common/__tests__/EditableText.spec.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { mount } from '@vue/test-utils' import { describe, it, expect, beforeAll } from 'vitest' import EditableText from '../EditableText.vue' diff --git a/src/components/common/__tests__/TreeExplorerTreeNode.spec.ts b/src/components/common/__tests__/TreeExplorerTreeNode.spec.ts index 8a04d3828..669b71071 100644 --- a/src/components/common/__tests__/TreeExplorerTreeNode.spec.ts +++ b/src/components/common/__tests__/TreeExplorerTreeNode.spec.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { describe, it, expect, vi } from 'vitest' import { mount } from '@vue/test-utils' import TreeExplorerTreeNode from '@/components/common/TreeExplorerTreeNode.vue' diff --git a/src/components/sidebar/tabs/queue/__tests__/ResultGallery.ts b/src/components/sidebar/tabs/queue/__tests__/ResultGallery.ts index 2bd1c859b..068f32380 100644 --- a/src/components/sidebar/tabs/queue/__tests__/ResultGallery.ts +++ b/src/components/sidebar/tabs/queue/__tests__/ResultGallery.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore // Disabled because of https://github.com/Comfy-Org/ComfyUI_frontend/issues/1184 import { mount } from '@vue/test-utils' diff --git a/src/extensions/core/clipspace.ts b/src/extensions/core/clipspace.ts index 89906aef3..b0d6226bd 100644 --- a/src/extensions/core/clipspace.ts +++ b/src/extensions/core/clipspace.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '../../scripts/app' import { ComfyDialog, $el } from '../../scripts/ui' import { ComfyApp } from '../../scripts/app' diff --git a/src/extensions/core/colorPalette.ts b/src/extensions/core/colorPalette.ts index 6b804eade..5133d3931 100644 --- a/src/extensions/core/colorPalette.ts +++ b/src/extensions/core/colorPalette.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { useToastStore } from '@/stores/toastStore' import { app } from '../../scripts/app' import { $el } from '../../scripts/ui' diff --git a/src/extensions/core/contextMenuFilter.ts b/src/extensions/core/contextMenuFilter.ts index c104ff951..f96f2a5d6 100644 --- a/src/extensions/core/contextMenuFilter.ts +++ b/src/extensions/core/contextMenuFilter.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { LiteGraph, LGraphCanvas } from '@comfyorg/litegraph' import { app } from '../../scripts/app' diff --git a/src/extensions/core/dynamicPrompts.ts b/src/extensions/core/dynamicPrompts.ts index 6bf3eb8fc..ceb77a867 100644 --- a/src/extensions/core/dynamicPrompts.ts +++ b/src/extensions/core/dynamicPrompts.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '../../scripts/app' // Allows for simple dynamic prompt replacement diff --git a/src/extensions/core/editAttention.ts b/src/extensions/core/editAttention.ts index 359bf3a2a..a9f05b95d 100644 --- a/src/extensions/core/editAttention.ts +++ b/src/extensions/core/editAttention.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '../../scripts/app' // Allows you to edit the attention weight by holding ctrl (or cmd) and using the up/down arrow keys diff --git a/src/extensions/core/groupNode.ts b/src/extensions/core/groupNode.ts index 492a21653..290423325 100644 --- a/src/extensions/core/groupNode.ts +++ b/src/extensions/core/groupNode.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '../../scripts/app' import { api } from '../../scripts/api' import { mergeIfValid } from './widgetInputs' diff --git a/src/extensions/core/groupNodeManage.ts b/src/extensions/core/groupNodeManage.ts index 4f0efd3b8..61dfa6d2e 100644 --- a/src/extensions/core/groupNodeManage.ts +++ b/src/extensions/core/groupNodeManage.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { $el, ComfyDialog } from '../../scripts/ui' import { DraggableList } from '../../scripts/ui/draggableList' import { GroupNodeConfig, GroupNodeHandler } from './groupNode' diff --git a/src/extensions/core/groupOptions.ts b/src/extensions/core/groupOptions.ts index f3aac808c..ef40b8391 100644 --- a/src/extensions/core/groupOptions.ts +++ b/src/extensions/core/groupOptions.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { LGraphGroup } from '@comfyorg/litegraph' import { app } from '../../scripts/app' import { LGraphCanvas, LiteGraph } from '@comfyorg/litegraph' diff --git a/src/extensions/core/invertMenuScrolling.ts b/src/extensions/core/invertMenuScrolling.ts index f3271caa0..63806c37f 100644 --- a/src/extensions/core/invertMenuScrolling.ts +++ b/src/extensions/core/invertMenuScrolling.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { LiteGraph } from '@comfyorg/litegraph' import { app } from '../../scripts/app' diff --git a/src/extensions/core/linkRenderMode.ts b/src/extensions/core/linkRenderMode.ts index f9654fef3..aed8a2372 100644 --- a/src/extensions/core/linkRenderMode.ts +++ b/src/extensions/core/linkRenderMode.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '../../scripts/app' import { LiteGraph } from '@comfyorg/litegraph' const id = 'Comfy.LinkRenderMode' diff --git a/src/extensions/core/maskeditor.ts b/src/extensions/core/maskeditor.ts index cf8371b1a..8dd826179 100644 --- a/src/extensions/core/maskeditor.ts +++ b/src/extensions/core/maskeditor.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '../../scripts/app' import { ComfyDialog, $el } from '../../scripts/ui' import { ComfyApp } from '../../scripts/app' diff --git a/src/extensions/core/nodeBadge.ts b/src/extensions/core/nodeBadge.ts index 93a95e9a9..64a76235a 100644 --- a/src/extensions/core/nodeBadge.ts +++ b/src/extensions/core/nodeBadge.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app, type ComfyApp } from '@/scripts/app' import type { ComfyExtension } from '@/types/comfy' import type { LGraphNode } from '@comfyorg/litegraph' diff --git a/src/extensions/core/nodeTemplates.ts b/src/extensions/core/nodeTemplates.ts index 02da9f860..46fffdf2b 100644 --- a/src/extensions/core/nodeTemplates.ts +++ b/src/extensions/core/nodeTemplates.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '../../scripts/app' import { api } from '../../scripts/api' import { ComfyDialog, $el } from '../../scripts/ui' diff --git a/src/extensions/core/noteNode.ts b/src/extensions/core/noteNode.ts index bf35e5cf5..4a35da144 100644 --- a/src/extensions/core/noteNode.ts +++ b/src/extensions/core/noteNode.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { LiteGraph, LGraphCanvas } from '@comfyorg/litegraph' import { app } from '../../scripts/app' import { ComfyWidgets } from '../../scripts/widgets' diff --git a/src/extensions/core/rerouteNode.ts b/src/extensions/core/rerouteNode.ts index 6f4ff6425..447ac3123 100644 --- a/src/extensions/core/rerouteNode.ts +++ b/src/extensions/core/rerouteNode.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import type { IContextMenuValue } from '@comfyorg/litegraph' import { app } from '../../scripts/app' import { mergeIfValid, getWidgetConfig, setWidgetConfig } from './widgetInputs' diff --git a/src/extensions/core/saveImageExtraOutput.ts b/src/extensions/core/saveImageExtraOutput.ts index 029d5e78b..22a12534c 100644 --- a/src/extensions/core/saveImageExtraOutput.ts +++ b/src/extensions/core/saveImageExtraOutput.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '../../scripts/app' import { applyTextReplacements } from '../../scripts/utils' // Use widget values and dates in output filenames diff --git a/src/extensions/core/simpleTouchSupport.ts b/src/extensions/core/simpleTouchSupport.ts index 9aa793560..33d9ac3e5 100644 --- a/src/extensions/core/simpleTouchSupport.ts +++ b/src/extensions/core/simpleTouchSupport.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '../../scripts/app' import { LGraphCanvas, LiteGraph } from '@comfyorg/litegraph' diff --git a/src/extensions/core/slotDefaults.ts b/src/extensions/core/slotDefaults.ts index c8a62325e..db4c95d6f 100644 --- a/src/extensions/core/slotDefaults.ts +++ b/src/extensions/core/slotDefaults.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '../../scripts/app' import { ComfyWidgets } from '../../scripts/widgets' import { LiteGraph } from '@comfyorg/litegraph' diff --git a/src/extensions/core/snapToGrid.ts b/src/extensions/core/snapToGrid.ts index 9a5e49954..f7f56dd84 100644 --- a/src/extensions/core/snapToGrid.ts +++ b/src/extensions/core/snapToGrid.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import type { SettingParams } from '@/types/settingTypes' import { app } from '../../scripts/app' import { diff --git a/src/extensions/core/uploadAudio.ts b/src/extensions/core/uploadAudio.ts index 293dc007e..6f1d18694 100644 --- a/src/extensions/core/uploadAudio.ts +++ b/src/extensions/core/uploadAudio.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '../../scripts/app' import { api } from '../../scripts/api' import type { IWidget } from '@comfyorg/litegraph' diff --git a/src/extensions/core/uploadImage.ts b/src/extensions/core/uploadImage.ts index 81fc19a73..be81f318b 100644 --- a/src/extensions/core/uploadImage.ts +++ b/src/extensions/core/uploadImage.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '../../scripts/app' import { ComfyNodeDef } from '@/types/apiTypes' diff --git a/src/extensions/core/webcamCapture.ts b/src/extensions/core/webcamCapture.ts index 86c461a1c..fdcaac606 100644 --- a/src/extensions/core/webcamCapture.ts +++ b/src/extensions/core/webcamCapture.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '../../scripts/app' import { api } from '../../scripts/api' import { useToastStore } from '@/stores/toastStore' diff --git a/src/extensions/core/widgetInputs.ts b/src/extensions/core/widgetInputs.ts index 5baf0db62..2d07762c0 100644 --- a/src/extensions/core/widgetInputs.ts +++ b/src/extensions/core/widgetInputs.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { ComfyWidgets, addValueControlWidgets } from '../../scripts/widgets' import { app } from '../../scripts/app' import { applyTextReplacements } from '../../scripts/utils' diff --git a/src/main.ts b/src/main.ts index 7f3f32990..843d10d47 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import App from './App.vue' import router from '@/router' import { createApp } from 'vue' diff --git a/src/scripts/api.ts b/src/scripts/api.ts index cfde56b61..b0b4c90ef 100644 --- a/src/scripts/api.ts +++ b/src/scripts/api.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { ComfyWorkflowJSON } from '@/types/comfyWorkflow' import { DownloadModelStatus, diff --git a/src/scripts/app.ts b/src/scripts/app.ts index d1f250a10..2619484a6 100644 --- a/src/scripts/app.ts +++ b/src/scripts/app.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { ComfyLogging } from './logging' import { ComfyWidgetConstructor, ComfyWidgets, initWidgets } from './widgets' import { ComfyUI, $el } from './ui' diff --git a/src/scripts/changeTracker.ts b/src/scripts/changeTracker.ts index b3faed4de..2baf3f99b 100644 --- a/src/scripts/changeTracker.ts +++ b/src/scripts/changeTracker.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import type { ComfyApp } from './app' import { api } from './api' import { clone } from './utils' diff --git a/src/scripts/domWidget.ts b/src/scripts/domWidget.ts index fb1a2cb53..dc16ad501 100644 --- a/src/scripts/domWidget.ts +++ b/src/scripts/domWidget.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app, ANIM_PREVIEW_WIDGET } from './app' import { LGraphCanvas, LGraphNode, LiteGraph } from '@comfyorg/litegraph' import type { Vector4 } from '@comfyorg/litegraph' diff --git a/src/scripts/logging.ts b/src/scripts/logging.ts index 21750e920..842d781f9 100644 --- a/src/scripts/logging.ts +++ b/src/scripts/logging.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { $el, ComfyDialog } from './ui' import { api } from './api' import type { ComfyApp } from './app' diff --git a/src/scripts/metadata/flac.ts b/src/scripts/metadata/flac.ts index 1dd6d42f4..64009bf88 100644 --- a/src/scripts/metadata/flac.ts +++ b/src/scripts/metadata/flac.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore export function getFromFlacBuffer(buffer: ArrayBuffer): Record { const dataView = new DataView(buffer) diff --git a/src/scripts/metadata/png.ts b/src/scripts/metadata/png.ts index 9fc927bf9..30a3ca91c 100644 --- a/src/scripts/metadata/png.ts +++ b/src/scripts/metadata/png.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore export function getFromPngBuffer(buffer: ArrayBuffer) { // Get the PNG data as a Uint8Array const pngData = new Uint8Array(buffer) diff --git a/src/scripts/pnginfo.ts b/src/scripts/pnginfo.ts index 5e736e02e..3473cce2b 100644 --- a/src/scripts/pnginfo.ts +++ b/src/scripts/pnginfo.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { LiteGraph } from '@comfyorg/litegraph' import { api } from './api' import { getFromPngFile } from './metadata/png' diff --git a/src/scripts/ui.ts b/src/scripts/ui.ts index dc565d020..e96711cf5 100644 --- a/src/scripts/ui.ts +++ b/src/scripts/ui.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { api } from './api' import { ComfyDialog as _ComfyDialog } from './ui/dialog' import { toggleSwitch } from './ui/toggleSwitch' diff --git a/src/scripts/ui/components/asyncDialog.ts b/src/scripts/ui/components/asyncDialog.ts index 0b5915e72..8023c492d 100644 --- a/src/scripts/ui/components/asyncDialog.ts +++ b/src/scripts/ui/components/asyncDialog.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { ComfyDialog } from '../dialog' import { $el } from '../../ui' diff --git a/src/scripts/ui/components/button.ts b/src/scripts/ui/components/button.ts index 657c2353f..32b2f574a 100644 --- a/src/scripts/ui/components/button.ts +++ b/src/scripts/ui/components/button.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { $el } from '../../ui' import { applyClasses, ClassList, toggleElement } from '../utils' import { prop } from '../../utils' diff --git a/src/scripts/ui/components/buttonGroup.ts b/src/scripts/ui/components/buttonGroup.ts index b5d64fa02..a3d77ca23 100644 --- a/src/scripts/ui/components/buttonGroup.ts +++ b/src/scripts/ui/components/buttonGroup.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { $el } from '../../ui' import { ComfyButton } from './button' import { prop } from '../../utils' diff --git a/src/scripts/ui/components/popup.ts b/src/scripts/ui/components/popup.ts index 92dd24a10..73f0aa01f 100644 --- a/src/scripts/ui/components/popup.ts +++ b/src/scripts/ui/components/popup.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { prop } from '../../utils' import { $el } from '../../ui' import { applyClasses, ClassList } from '../utils' diff --git a/src/scripts/ui/dialog.ts b/src/scripts/ui/dialog.ts index c262178cf..26b823607 100644 --- a/src/scripts/ui/dialog.ts +++ b/src/scripts/ui/dialog.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { useDialogStore } from '@/stores/dialogStore' import { $el } from '../ui' diff --git a/src/scripts/ui/draggableList.ts b/src/scripts/ui/draggableList.ts index f732f5719..fb74a8baf 100644 --- a/src/scripts/ui/draggableList.ts +++ b/src/scripts/ui/draggableList.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore /* Original implementation: https://github.com/TahaSh/drag-to-reorder diff --git a/src/scripts/ui/imagePreview.ts b/src/scripts/ui/imagePreview.ts index 9e37f617e..1f06e46f9 100644 --- a/src/scripts/ui/imagePreview.ts +++ b/src/scripts/ui/imagePreview.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '../app' import { $el } from '../ui' diff --git a/src/scripts/ui/settings.ts b/src/scripts/ui/settings.ts index 720f4bd04..5cade7b5b 100644 --- a/src/scripts/ui/settings.ts +++ b/src/scripts/ui/settings.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { $el } from '../ui' import { api } from '../api' import { ComfyDialog } from './dialog' diff --git a/src/scripts/ui/toggleSwitch.ts b/src/scripts/ui/toggleSwitch.ts index 951980873..a2e0b24ba 100644 --- a/src/scripts/ui/toggleSwitch.ts +++ b/src/scripts/ui/toggleSwitch.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { $el } from '../ui' /** diff --git a/src/scripts/ui/userSelection.ts b/src/scripts/ui/userSelection.ts index 55704b72c..2c8154c35 100644 --- a/src/scripts/ui/userSelection.ts +++ b/src/scripts/ui/userSelection.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { api } from '../api' import { $el } from '../ui' import { createSpinner } from './spinner' diff --git a/src/scripts/ui/utils.ts b/src/scripts/ui/utils.ts index 590407714..d682e9b65 100644 --- a/src/scripts/ui/utils.ts +++ b/src/scripts/ui/utils.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore export type ClassList = string | string[] | Record export function applyClasses( diff --git a/src/scripts/utils.ts b/src/scripts/utils.ts index 27648c3a3..e3205ce74 100644 --- a/src/scripts/utils.ts +++ b/src/scripts/utils.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { api } from './api' import type { ComfyApp } from './app' import { $el } from './ui' diff --git a/src/scripts/widgets.ts b/src/scripts/widgets.ts index 5beaa75ea..a9b7edbc2 100644 --- a/src/scripts/widgets.ts +++ b/src/scripts/widgets.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { api } from './api' import './domWidget' import type { ComfyApp } from './app' diff --git a/src/scripts/workflows.ts b/src/scripts/workflows.ts index 578fdd4c1..5e8846fd5 100644 --- a/src/scripts/workflows.ts +++ b/src/scripts/workflows.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import type { ComfyApp } from './app' import { api } from './api' import { ChangeTracker } from './changeTracker' diff --git a/src/services/nodeSearchService.ts b/src/services/nodeSearchService.ts index 9b4fe97d7..c57e77217 100644 --- a/src/services/nodeSearchService.ts +++ b/src/services/nodeSearchService.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { ComfyNodeDefImpl } from '@/stores/nodeDefStore' import Fuse, { IFuseOptions, FuseSearchOptions } from 'fuse.js' import _ from 'lodash' diff --git a/src/stores/commandStore.ts b/src/stores/commandStore.ts index d246fc6fc..4ca6c4978 100644 --- a/src/stores/commandStore.ts +++ b/src/stores/commandStore.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { app } from '@/scripts/app' import { api } from '@/scripts/api' import { defineStore } from 'pinia' diff --git a/src/stores/dialogStore.ts b/src/stores/dialogStore.ts index 089f89859..10bb0283a 100644 --- a/src/stores/dialogStore.ts +++ b/src/stores/dialogStore.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore // We should consider moving to https://primevue.org/dynamicdialog/ once everything is in Vue. // Currently we need to bridge between legacy app code and Vue app with a Pinia store. diff --git a/src/stores/executionStore.ts b/src/stores/executionStore.ts index d116a41cf..016770083 100644 --- a/src/stores/executionStore.ts +++ b/src/stores/executionStore.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { ref, computed } from 'vue' import { defineStore } from 'pinia' import { api } from '../scripts/api' diff --git a/src/stores/modelStore.ts b/src/stores/modelStore.ts index 5fa1da7a9..fba2f3664 100644 --- a/src/stores/modelStore.ts +++ b/src/stores/modelStore.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { api } from '@/scripts/api' import { defineStore } from 'pinia' diff --git a/src/stores/nodeBookmarkStore.ts b/src/stores/nodeBookmarkStore.ts index 15047375f..173d9134f 100644 --- a/src/stores/nodeBookmarkStore.ts +++ b/src/stores/nodeBookmarkStore.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { defineStore } from 'pinia' import { computed } from 'vue' import { useSettingStore } from './settingStore' diff --git a/src/stores/nodeDefStore.ts b/src/stores/nodeDefStore.ts index 6002f46cc..4256f2a68 100644 --- a/src/stores/nodeDefStore.ts +++ b/src/stores/nodeDefStore.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { NodeSearchService, type SearchAuxScore diff --git a/src/stores/queueStore.ts b/src/stores/queueStore.ts index 0cbf4868f..380714afc 100644 --- a/src/stores/queueStore.ts +++ b/src/stores/queueStore.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { api } from '@/scripts/api' import type { ComfyApp } from '@/scripts/app' import type { diff --git a/src/stores/settingStore.ts b/src/stores/settingStore.ts index ee08102e4..c44957937 100644 --- a/src/stores/settingStore.ts +++ b/src/stores/settingStore.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore /** * TODO: Migrate scripts/ui/settings.ts here * diff --git a/src/stores/workflowStore.ts b/src/stores/workflowStore.ts index b88e71295..b645a502f 100644 --- a/src/stores/workflowStore.ts +++ b/src/stores/workflowStore.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { defineStore } from 'pinia' import { computed, ref } from 'vue' import { ComfyWorkflow } from '@/scripts/workflows' diff --git a/src/types/litegraphTypes.ts b/src/types/litegraphTypes.ts index 74d89cb84..892c0ab3b 100644 --- a/src/types/litegraphTypes.ts +++ b/src/types/litegraphTypes.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import type { ConnectingLink, LGraphNode, diff --git a/src/utils/colorUtil.ts b/src/utils/colorUtil.ts index d5586103f..162f30052 100644 --- a/src/utils/colorUtil.ts +++ b/src/utils/colorUtil.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { memoize } from 'lodash' type RGB = { r: number; g: number; b: number } diff --git a/src/utils/treeUtil.ts b/src/utils/treeUtil.ts index 50bb8c8d8..244bb9eb9 100644 --- a/src/utils/treeUtil.ts +++ b/src/utils/treeUtil.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import type { TreeNode } from 'primevue/treenode' export function buildTree( diff --git a/tests-ui/extractExamples.ts b/tests-ui/extractExamples.ts index 1b81cdd10..b9bdd5b22 100644 --- a/tests-ui/extractExamples.ts +++ b/tests-ui/extractExamples.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore /* Script to generate test API json from the ComfyUI_examples repo. Requires the repo to be cloned to the tests-ui directory or specified via the EXAMPLE_REPO_PATH env var. diff --git a/tests-ui/globalSetup.ts b/tests-ui/globalSetup.ts index e0e5365f0..b2296df33 100644 --- a/tests-ui/globalSetup.ts +++ b/tests-ui/globalSetup.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore module.exports = async function () { global.ResizeObserver = class ResizeObserver { observe() {} diff --git a/tests-ui/tests/apiTypes.test.ts b/tests-ui/tests/apiTypes.test.ts index c2c1f4038..3b51b74d8 100644 --- a/tests-ui/tests/apiTypes.test.ts +++ b/tests-ui/tests/apiTypes.test.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { ComfyNodeDef, validateComfyNodeDef } from '@/types/apiTypes' const fs = require('fs') const path = require('path') diff --git a/tests-ui/tests/colorUtil.test.ts b/tests-ui/tests/colorUtil.test.ts index 00de93ea4..744b06d2d 100644 --- a/tests-ui/tests/colorUtil.test.ts +++ b/tests-ui/tests/colorUtil.test.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { adjustColor } from '@/utils/colorUtil' interface ColorTestCase { diff --git a/tests-ui/tests/comfyWorkflow.test.ts b/tests-ui/tests/comfyWorkflow.test.ts index 19349fa82..456caec14 100644 --- a/tests-ui/tests/comfyWorkflow.test.ts +++ b/tests-ui/tests/comfyWorkflow.test.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { validateComfyWorkflow } from '../../src/types/comfyWorkflow' import { defaultGraph } from '../../src/scripts/defaultGraph' import fs from 'fs' diff --git a/tests-ui/tests/extensions.test.ts b/tests-ui/tests/extensions.test.ts index a4ee0be9f..501b10b16 100644 --- a/tests-ui/tests/extensions.test.ts +++ b/tests-ui/tests/extensions.test.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { start } from '../utils' import lg from '../utils/litegraph' diff --git a/tests-ui/tests/groupNode.test.ts b/tests-ui/tests/groupNode.test.ts index 894954bb6..227d1e1e2 100644 --- a/tests-ui/tests/groupNode.test.ts +++ b/tests-ui/tests/groupNode.test.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { createPinia, setActivePinia } from 'pinia' import { start, diff --git a/tests-ui/tests/nodeDef.test.ts b/tests-ui/tests/nodeDef.test.ts index 9a4e6e3ac..09bdd0f4c 100644 --- a/tests-ui/tests/nodeDef.test.ts +++ b/tests-ui/tests/nodeDef.test.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { ComfyInputsSpec, IntInputSpec, diff --git a/tests-ui/tests/nodeSearchService.test.ts b/tests-ui/tests/nodeSearchService.test.ts index e89244a30..726ee9f62 100644 --- a/tests-ui/tests/nodeSearchService.test.ts +++ b/tests-ui/tests/nodeSearchService.test.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { NodeSearchService } from '@/services/nodeSearchService' import { ComfyNodeDefImpl } from '@/stores/nodeDefStore' diff --git a/tests-ui/tests/users.test.ts b/tests-ui/tests/users.test.ts index e7e1cf42b..0b6f454ea 100644 --- a/tests-ui/tests/users.test.ts +++ b/tests-ui/tests/users.test.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { start } from '../utils' import lg from '../utils/litegraph' diff --git a/tests-ui/tests/widgetInputs.test.ts b/tests-ui/tests/widgetInputs.test.ts index 22b2c5435..4ddcae034 100644 --- a/tests-ui/tests/widgetInputs.test.ts +++ b/tests-ui/tests/widgetInputs.test.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { start, makeNodeDef, diff --git a/tests-ui/utils/ezgraph.ts b/tests-ui/utils/ezgraph.ts index eb665fbd6..a66434a8b 100644 --- a/tests-ui/utils/ezgraph.ts +++ b/tests-ui/utils/ezgraph.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import type { LiteGraph, LGraphCanvas } from '@comfyorg/litegraph' /** diff --git a/tests-ui/utils/index.ts b/tests-ui/utils/index.ts index 8fc0910ae..6d26aa493 100644 --- a/tests-ui/utils/index.ts +++ b/tests-ui/utils/index.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import { APIConfig, mockApi, mockSettingStore, mockNodeDefStore } from './setup' import { Ez, EzGraph, EzNameSpace } from './ezgraph' import lg from './litegraph' diff --git a/tests-ui/utils/litegraph.ts b/tests-ui/utils/litegraph.ts index 917de6be5..c2f4d5544 100644 --- a/tests-ui/utils/litegraph.ts +++ b/tests-ui/utils/litegraph.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import fs from 'fs' import path from 'path' import { nop } from '../utils/nopProxy' diff --git a/tests-ui/utils/nopProxy.ts b/tests-ui/utils/nopProxy.ts index 7b2b97cb9..ecf615675 100644 --- a/tests-ui/utils/nopProxy.ts +++ b/tests-ui/utils/nopProxy.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore export const nop = new Proxy(function () {}, { get: () => nop, set: () => true, diff --git a/tests-ui/utils/setup.ts b/tests-ui/utils/setup.ts index 16df4f220..eabcc6cd9 100644 --- a/tests-ui/utils/setup.ts +++ b/tests-ui/utils/setup.ts @@ -1,3 +1,4 @@ +// @ts-strict-ignore import type { ComfySettingsDialog } from '@/scripts/ui/settings' import type { ComfyApp } from '@/scripts/app' import '../../src/scripts/api' diff --git a/tsconfig.json b/tsconfig.json index a57e08027..77168c801 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -27,7 +27,13 @@ }, "typeRoots": ["src/types", "node_modules/@types"], "outDir": "./dist", - "rootDir": "./" + "rootDir": "./", + + "plugins": [ + { + "name": "typescript-strict-plugin" + } + ] }, "include": [ "src/**/*",