From f2ca203bf2b089eb6572ea68ebc64a20b623f104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 10:52:07 +0200 Subject: [PATCH 01/23] add eslint-plugin-import dependency --- package-lock.json | 1378 +++++++++++++++++++++++++++++++++++++++++---- package.json | 1 + 2 files changed, 1273 insertions(+), 106 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4424d7fee6..1152bd441c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,6 +34,7 @@ "debug": "~4.3.4", "eslint": "~8.48.0", "eslint-config-prettier": "~9.0.0", + "eslint-plugin-import": "^2.28.1", "eslint-plugin-jest": "~27.2.3", "eslint-plugin-jest-extended": "^2.0.0", "eslint-plugin-notice": "~0.9.10", @@ -2325,6 +2326,12 @@ "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", "dev": true }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "node_modules/@types/lodash": { "version": "4.14.178", "dev": true, @@ -3080,6 +3087,38 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "node_modules/array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array-includes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", @@ -3089,6 +3128,81 @@ "node": ">=8" } }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", + "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", + "integrity": "sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==", + "dev": true, + "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -3132,6 +3246,18 @@ "postcss": "^8.1.0" } }, + "node_modules/available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/axios": { "version": "0.21.4", "dev": true, @@ -4253,14 +4379,19 @@ } }, "node_modules/define-properties": { - "version": "1.1.3", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", "dev": true, - "license": "MIT", "dependencies": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" }, "engines": { "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, "node_modules/delayed-stream": { @@ -4447,30 +4578,50 @@ } }, "node_modules/es-abstract": { - "version": "1.19.1", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", + "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", "dev": true, - "license": "MIT", "dependencies": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.1", + "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.2.1", "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", "has": "^1.0.3", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", + "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.0", + "safe-array-concat": "^1.0.0", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.10" }, "engines": { "node": ">= 0.4" @@ -4479,6 +4630,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + } + }, "node_modules/es-to-primitive": { "version": "1.2.1", "dev": true, @@ -4704,6 +4878,113 @@ "eslint": ">=7.0.0" } }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import": { + "version": "2.28.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz", + "integrity": "sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==", + "dev": true, + "dependencies": { + "array-includes": "^3.1.6", + "array.prototype.findlastindex": "^1.2.2", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.8.0", + "has": "^1.0.3", + "is-core-module": "^2.13.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.6", + "object.groupby": "^1.0.0", + "object.values": "^1.1.6", + "semver": "^6.3.1", + "tsconfig-paths": "^3.14.2" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/eslint-plugin-jest": { "version": "27.2.3", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.3.tgz", @@ -5352,6 +5633,15 @@ } } }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, "node_modules/foreground-child": { "version": "2.0.0", "dev": true, @@ -5456,6 +5746,33 @@ "dev": true, "license": "MIT" }, + "node_modules/function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "dev": true, @@ -5473,13 +5790,15 @@ } }, "node_modules/get-intrinsic": { - "version": "1.1.1", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, - "license": "MIT", "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -5606,6 +5925,21 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -5631,6 +5965,18 @@ "dev": true, "license": "MIT" }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/graceful-fs": { "version": "4.2.9", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", @@ -5655,9 +6001,10 @@ } }, "node_modules/has-bigints": { - "version": "1.0.1", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true, - "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -5670,10 +6017,35 @@ "node": ">=8" } }, + "node_modules/has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/has-symbols": { - "version": "1.0.2", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -5902,11 +6274,12 @@ "license": "ISC" }, "node_modules/internal-slot": { - "version": "1.0.3", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", "dev": true, - "license": "MIT", "dependencies": { - "get-intrinsic": "^1.1.0", + "get-intrinsic": "^1.2.0", "has": "^1.0.3", "side-channel": "^1.0.4" }, @@ -5914,6 +6287,20 @@ "node": ">= 0.4" } }, + "node_modules/is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-arrayish": { "version": "0.2.1", "dev": true, @@ -5921,8 +6308,9 @@ }, "node_modules/is-bigint": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, - "license": "MIT", "dependencies": { "has-bigints": "^1.0.1" }, @@ -5943,8 +6331,9 @@ }, "node_modules/is-boolean-object": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" @@ -5972,9 +6361,10 @@ } }, "node_modules/is-callable": { - "version": "1.2.4", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true, - "license": "MIT", "engines": { "node": ">= 0.4" }, @@ -5983,9 +6373,9 @@ } }, "node_modules/is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -6120,9 +6510,10 @@ } }, "node_modules/is-number-object": { - "version": "1.0.6", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, - "license": "MIT", "dependencies": { "has-tostringtag": "^1.0.0" }, @@ -6172,9 +6563,13 @@ } }, "node_modules/is-shared-array-buffer": { - "version": "1.0.1", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", "dev": true, - "license": "MIT", + "dependencies": { + "call-bind": "^1.0.2" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -6218,6 +6613,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.11" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-typedarray": { "version": "1.0.0", "dev": true, @@ -6253,6 +6663,12 @@ "node": ">=8" } }, + "node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "node_modules/isexe": { "version": "2.0.0", "dev": true, @@ -8605,13 +9021,14 @@ } }, "node_modules/object.assign": { - "version": "4.1.2", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, - "license": "MIT", "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, "engines": { @@ -8621,6 +9038,52 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object.fromentries": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", + "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", + "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1" + } + }, + "node_modules/object.values": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/once": { "version": "1.4.0", "dev": true, @@ -9986,6 +10449,23 @@ "regexp-tree": "bin/regexp-tree" } }, + "node_modules/regexp.prototype.flags": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regjsparser": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", @@ -10038,12 +10518,12 @@ "dev": true }, "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", "dev": true, "dependencies": { - "is-core-module": "^2.11.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -10368,11 +10848,43 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-array-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", + "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safe-buffer": { "version": "5.1.2", "dev": true, "license": "MIT" }, + "node_modules/safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -10458,8 +10970,9 @@ }, "node_modules/side-channel": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.0", "get-intrinsic": "^1.0.2", @@ -10781,25 +11294,46 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/string.prototype.trimend": { - "version": "1.0.4", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, "node_modules/string.prototype.trimstart": { - "version": "1.0.4", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", "dev": true, - "license": "MIT", "dependencies": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -11289,6 +11823,39 @@ } } }, + "node_modules/tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "dev": true, + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/tsconfig-paths/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/tsconfig-paths/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/tslib": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", @@ -11346,6 +11913,71 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typedarray-to-buffer": { "version": "3.1.5", "dev": true, @@ -11413,13 +12045,14 @@ } }, "node_modules/unbox-primitive": { - "version": "1.0.1", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, - "license": "MIT", "dependencies": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" }, "funding": { @@ -11812,8 +12445,9 @@ }, "node_modules/which-boxed-primitive": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, - "license": "MIT", "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -11830,6 +12464,25 @@ "dev": true, "license": "ISC" }, + "node_modules/which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/word-wrap": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", @@ -13690,6 +14343,12 @@ "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", "dev": true }, + "@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true + }, "@types/lodash": { "version": "4.14.178", "dev": true @@ -14169,12 +14828,86 @@ "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true }, + "array-buffer-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz", + "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "is-array-buffer": "^3.0.1" + } + }, + "array-includes": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.6.tgz", + "integrity": "sha512-sgTbLvL6cNnw24FnbaDyjmvddQ2ML8arZsgaJhoABMoplz/4QRhtrYS+alr1BUM1Bwp6dhx8vVCBSLG+StwOFw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "get-intrinsic": "^1.1.3", + "is-string": "^1.0.7" + } + }, "array-union": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", "dev": true }, + "array.prototype.findlastindex": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz", + "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "es-shim-unscopables": "^1.0.0", + "get-intrinsic": "^1.2.1" + } + }, + "array.prototype.flat": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.1.tgz", + "integrity": "sha512-roTU0KWIOmJ4DRLmwKd19Otg0/mT3qPNt0Qb3GWW8iObuZXxrjB/pzn0R3hqpRSWg4HCwqx+0vwOnWnvlOyeIA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + } + }, + "array.prototype.flatmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.1.tgz", + "integrity": "sha512-8UGn9O1FDVvMNB0UlLv4voxRMze7+FpHyF5mSMRjWHUMlpoDViniy05870VlxhfgTnLbpuwTzvD76MTtWxB/mQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4", + "es-shim-unscopables": "^1.0.0" + } + }, + "arraybuffer.prototype.slice": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.1.tgz", + "integrity": "sha512-09x0ZWFEjj4WD8PDbykUwo3t9arLn8NIzmmYEJFpYekOAQjpkGSyrQhNoRTcwwcFRu+ycWF78QZ63oWTqSjBcw==", + "dev": true, + "requires": { + "array-buffer-byte-length": "^1.0.0", + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "get-intrinsic": "^1.2.1", + "is-array-buffer": "^3.0.2", + "is-shared-array-buffer": "^1.0.2" + } + }, "asynckit": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", @@ -14195,6 +14928,12 @@ "postcss-value-parser": "^4.2.0" } }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", + "dev": true + }, "axios": { "version": "0.21.4", "dev": true, @@ -14949,10 +15688,13 @@ "dev": true }, "define-properties": { - "version": "1.1.3", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.0.tgz", + "integrity": "sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==", "dev": true, "requires": { - "object-keys": "^1.0.12" + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" } }, "delayed-stream": { @@ -15081,29 +15823,70 @@ } }, "es-abstract": { - "version": "1.19.1", + "version": "1.22.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", + "integrity": "sha512-ioRRcXMO6OFyRpyzV3kE1IIBd4WG5/kltnzdxSCqoP8CMGs/Li+M1uF5o7lOkZVFjDs+NLesthnF66Pg/0q0Lw==", "dev": true, "requires": { + "array-buffer-byte-length": "^1.0.0", + "arraybuffer.prototype.slice": "^1.0.1", + "available-typed-arrays": "^1.0.5", "call-bind": "^1.0.2", + "es-set-tostringtag": "^2.0.1", "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", + "function.prototype.name": "^1.1.5", + "get-intrinsic": "^1.2.1", "get-symbol-description": "^1.0.0", + "globalthis": "^1.0.3", + "gopd": "^1.0.1", "has": "^1.0.3", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", + "has-property-descriptors": "^1.0.0", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "internal-slot": "^1.0.5", + "is-array-buffer": "^3.0.2", + "is-callable": "^1.2.7", + "is-negative-zero": "^2.0.2", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", + "is-shared-array-buffer": "^1.0.2", "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", + "is-typed-array": "^1.1.10", + "is-weakref": "^1.0.2", + "object-inspect": "^1.12.3", "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" + "object.assign": "^4.1.4", + "regexp.prototype.flags": "^1.5.0", + "safe-array-concat": "^1.0.0", + "safe-regex-test": "^1.0.0", + "string.prototype.trim": "^1.2.7", + "string.prototype.trimend": "^1.0.6", + "string.prototype.trimstart": "^1.0.6", + "typed-array-buffer": "^1.0.0", + "typed-array-byte-length": "^1.0.0", + "typed-array-byte-offset": "^1.0.0", + "typed-array-length": "^1.0.4", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.10" + } + }, + "es-set-tostringtag": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz", + "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3", + "has": "^1.0.3", + "has-tostringtag": "^1.0.0" + } + }, + "es-shim-unscopables": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz", + "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==", + "dev": true, + "requires": { + "has": "^1.0.3" } }, "es-to-primitive": { @@ -15331,6 +16114,99 @@ "dev": true, "requires": {} }, + "eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "requires": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-module-utils": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", + "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", + "dev": true, + "requires": { + "debug": "^3.2.7" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "eslint-plugin-import": { + "version": "2.28.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz", + "integrity": "sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A==", + "dev": true, + "requires": { + "array-includes": "^3.1.6", + "array.prototype.findlastindex": "^1.2.2", + "array.prototype.flat": "^1.3.1", + "array.prototype.flatmap": "^1.3.1", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.7", + "eslint-module-utils": "^2.8.0", + "has": "^1.0.3", + "is-core-module": "^2.13.0", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.6", + "object.groupby": "^1.0.0", + "object.values": "^1.1.6", + "semver": "^6.3.1", + "tsconfig-paths": "^3.14.2" + }, + "dependencies": { + "debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true + } + } + }, "eslint-plugin-jest": { "version": "27.2.3", "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.2.3.tgz", @@ -15679,6 +16555,15 @@ "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==", "dev": true }, + "for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "requires": { + "is-callable": "^1.1.3" + } + }, "foreground-child": { "version": "2.0.0", "dev": true, @@ -15738,6 +16623,24 @@ "version": "1.1.1", "dev": true }, + "function.prototype.name": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz", + "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "functions-have-names": "^1.2.3" + } + }, + "functions-have-names": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", + "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", + "dev": true + }, "gensync": { "version": "1.0.0-beta.2", "dev": true @@ -15747,12 +16650,15 @@ "dev": true }, "get-intrinsic": { - "version": "1.1.1", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz", + "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==", "dev": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", - "has-symbols": "^1.0.1" + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3" } }, "get-package-type": { @@ -15830,6 +16736,15 @@ "type-fest": "^0.20.2" } }, + "globalthis": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz", + "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3" + } + }, "globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -15848,6 +16763,15 @@ "version": "1.1.2", "dev": true }, + "gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.3" + } + }, "graceful-fs": { "version": "4.2.9", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", @@ -15868,15 +16792,34 @@ } }, "has-bigints": { - "version": "1.0.1", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", + "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==", "dev": true }, "has-flag": { "version": "4.0.0", "dev": true }, + "has-property-descriptors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz", + "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==", + "dev": true, + "requires": { + "get-intrinsic": "^1.1.1" + } + }, + "has-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz", + "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==", + "dev": true + }, "has-symbols": { - "version": "1.0.2", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", "dev": true }, "has-tostringtag": { @@ -16021,20 +16964,35 @@ "dev": true }, "internal-slot": { - "version": "1.0.3", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz", + "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==", "dev": true, "requires": { - "get-intrinsic": "^1.1.0", + "get-intrinsic": "^1.2.0", "has": "^1.0.3", "side-channel": "^1.0.4" } }, + "is-array-buffer": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz", + "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "is-typed-array": "^1.1.10" + } + }, "is-arrayish": { "version": "0.2.1", "dev": true }, "is-bigint": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", + "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", "dev": true, "requires": { "has-bigints": "^1.0.1" @@ -16049,6 +17007,8 @@ }, "is-boolean-object": { "version": "1.1.2", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", + "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", "dev": true, "requires": { "call-bind": "^1.0.2", @@ -16065,13 +17025,15 @@ } }, "is-callable": { - "version": "1.2.4", + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", "dev": true }, "is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dev": true, "requires": { "has": "^1.0.3" @@ -16141,7 +17103,9 @@ "dev": true }, "is-number-object": { - "version": "1.0.6", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", + "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", "dev": true, "requires": { "has-tostringtag": "^1.0.0" @@ -16175,8 +17139,13 @@ } }, "is-shared-array-buffer": { - "version": "1.0.1", - "dev": true + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", + "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2" + } }, "is-stream": { "version": "2.0.1", @@ -16196,6 +17165,15 @@ "has-symbols": "^1.0.2" } }, + "is-typed-array": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz", + "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==", + "dev": true, + "requires": { + "which-typed-array": "^1.1.11" + } + }, "is-typedarray": { "version": "1.0.0", "dev": true @@ -16218,6 +17196,12 @@ "is-docker": "^2.0.0" } }, + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + }, "isexe": { "version": "2.0.0", "dev": true @@ -17894,15 +18878,51 @@ "dev": true }, "object.assign": { - "version": "4.1.2", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", + "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", "dev": true, "requires": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "has-symbols": "^1.0.3", "object-keys": "^1.1.1" } }, + "object.fromentries": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz", + "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + } + }, + "object.groupby": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz", + "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1", + "get-intrinsic": "^1.2.1" + } + }, + "object.values": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz", + "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + } + }, "once": { "version": "1.4.0", "dev": true, @@ -18744,6 +19764,17 @@ "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", "dev": true }, + "regexp.prototype.flags": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.0.tgz", + "integrity": "sha512-0SutC3pNudRKgquxGoRGIz946MZVHqbNfPjBdxeOhBrdgDKlRoXmYLQN9xRbrR09ZXWeGAdPuif7egofn6v5LA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "functions-have-names": "^1.2.3" + } + }, "regjsparser": { "version": "0.10.0", "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", @@ -18783,12 +19814,12 @@ "dev": true }, "resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", "dev": true, "requires": { - "is-core-module": "^2.11.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } @@ -19003,10 +20034,33 @@ "queue-microtask": "^1.2.2" } }, + "safe-array-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.0.tgz", + "integrity": "sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.0", + "has-symbols": "^1.0.3", + "isarray": "^2.0.5" + } + }, "safe-buffer": { "version": "5.1.2", "dev": true }, + "safe-regex-test": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz", + "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.3", + "is-regex": "^1.1.4" + } + }, "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -19073,6 +20127,8 @@ }, "side-channel": { "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "dev": true, "requires": { "call-bind": "^1.0.0", @@ -19304,20 +20360,37 @@ "es-abstract": "^1.19.1" } }, + "string.prototype.trim": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.7.tgz", + "integrity": "sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" + } + }, "string.prototype.trimend": { - "version": "1.0.4", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.6.tgz", + "integrity": "sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" } }, "string.prototype.trimstart": { - "version": "1.0.4", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.6.tgz", + "integrity": "sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==", "dev": true, "requires": { "call-bind": "^1.0.2", - "define-properties": "^1.1.3" + "define-properties": "^1.1.4", + "es-abstract": "^1.20.4" } }, "strip-ansi": { @@ -19647,6 +20720,35 @@ "yargs-parser": "^21.0.1" } }, + "tsconfig-paths": { + "version": "3.14.2", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz", + "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==", + "dev": true, + "requires": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + }, + "dependencies": { + "json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true + } + } + }, "tslib": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", @@ -19685,6 +20787,53 @@ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true }, + "typed-array-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", + "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.2.1", + "is-typed-array": "^1.1.10" + } + }, + "typed-array-byte-length": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz", + "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + } + }, + "typed-array-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz", + "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "has-proto": "^1.0.1", + "is-typed-array": "^1.1.10" + } + }, + "typed-array-length": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz", + "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "is-typed-array": "^1.1.9" + } + }, "typedarray-to-buffer": { "version": "3.1.5", "dev": true, @@ -19731,12 +20880,14 @@ "dev": true }, "unbox-primitive": { - "version": "1.0.1", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz", + "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==", "dev": true, "requires": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", + "call-bind": "^1.0.2", + "has-bigints": "^1.0.2", + "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" } }, @@ -19981,6 +21132,8 @@ }, "which-boxed-primitive": { "version": "1.0.2", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", + "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", "dev": true, "requires": { "is-bigint": "^1.0.1", @@ -19994,6 +21147,19 @@ "version": "2.0.0", "dev": true }, + "which-typed-array": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz", + "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } + }, "word-wrap": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.4.tgz", diff --git a/package.json b/package.json index 2a1dc29ee3..7b8f4207b7 100644 --- a/package.json +++ b/package.json @@ -124,6 +124,7 @@ "debug": "~4.3.4", "eslint": "~8.48.0", "eslint-config-prettier": "~9.0.0", + "eslint-plugin-import": "^2.28.1", "eslint-plugin-jest": "~27.2.3", "eslint-plugin-jest-extended": "^2.0.0", "eslint-plugin-notice": "~0.9.10", From 49e9d8ab8e84cbb4c370db4a18f405ba87719bd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 10:52:24 +0200 Subject: [PATCH 02/23] add plugin:import/recommended rules --- .eslintrc.cjs | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 73c397f19f..6ace56ca1e 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -20,6 +20,7 @@ module.exports = { parser: '@typescript-eslint/parser', // Specifies the ESLint parser extends: [ 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. + 'plugin:import/recommended', ], parserOptions: { ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features From 107f4b591a1bb89d5682420a9a5f8aa4edb89876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 11:06:36 +0200 Subject: [PATCH 03/23] Add typescript support --- .eslintrc.cjs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 6ace56ca1e..054b9c53ac 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -49,7 +49,16 @@ module.exports = { 'plugin:@typescript-eslint/recommended', // Uses the recommended rules from the @typescript-eslint/eslint-plugin 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. 'plugin:@typescript-eslint/stylistic', + 'plugin:import/typescript', ], + settings: { + 'import/resolver': { + // You will also need to install and configure the TypeScript resolver + // See also https://github.com/import-js/eslint-import-resolver-typescript#configuration + typescript: true, + node: true, + }, + }, parserOptions: { // This setting is required if you want to use rules which require type information // https://typescript-eslint.io/packages/parser/#project From 0fb105c76469a3336237e3194823b8eb15c2ed0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 11:10:07 +0200 Subject: [PATCH 04/23] add eslint-import-resolver-typescript dependency --- package-lock.json | 115 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 1 + 2 files changed, 116 insertions(+) diff --git a/package-lock.json b/package-lock.json index 1152bd441c..430dcc45a3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -34,6 +34,7 @@ "debug": "~4.3.4", "eslint": "~8.48.0", "eslint-config-prettier": "~9.0.0", + "eslint-import-resolver-typescript": "^3.6.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-jest": "~27.2.3", "eslint-plugin-jest-extended": "^2.0.0", @@ -4557,6 +4558,19 @@ "dev": true, "license": "MIT" }, + "node_modules/enhanced-resolve": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + }, + "engines": { + "node": ">=10.13.0" + } + }, "node_modules/entities": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", @@ -4898,6 +4912,31 @@ "ms": "^2.1.1" } }, + "node_modules/eslint-import-resolver-typescript": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz", + "integrity": "sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==", + "dev": true, + "dependencies": { + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "fast-glob": "^3.3.1", + "get-tsconfig": "^4.5.0", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts/projects/eslint-import-resolver-ts" + }, + "peerDependencies": { + "eslint": "*", + "eslint-plugin-import": "*" + } + }, "node_modules/eslint-module-utils": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", @@ -5846,6 +5885,18 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-tsconfig": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.0.tgz", + "integrity": "sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==", + "dev": true, + "dependencies": { + "resolve-pkg-maps": "^1.0.0" + }, + "funding": { + "url": "https://github.com/privatenumber/get-tsconfig?sponsor=1" + } + }, "node_modules/glob": { "version": "7.1.3", "dev": true, @@ -10576,6 +10627,15 @@ "node": ">=4" } }, + "node_modules/resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true, + "funding": { + "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" + } + }, "node_modules/resolve.exports": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.0.tgz", @@ -11600,6 +11660,15 @@ "node": ">=10.13.0" } }, + "node_modules/tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/terser": { "version": "5.17.4", "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.4.tgz", @@ -15809,6 +15878,16 @@ "version": "9.2.2", "dev": true }, + "enhanced-resolve": { + "version": "5.15.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz", + "integrity": "sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, "entities": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/entities/-/entities-4.3.1.tgz", @@ -16136,6 +16215,21 @@ } } }, + "eslint-import-resolver-typescript": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz", + "integrity": "sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg==", + "dev": true, + "requires": { + "debug": "^4.3.4", + "enhanced-resolve": "^5.12.0", + "eslint-module-utils": "^2.7.4", + "fast-glob": "^3.3.1", + "get-tsconfig": "^4.5.0", + "is-core-module": "^2.11.0", + "is-glob": "^4.0.3" + } + }, "eslint-module-utils": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", @@ -16681,6 +16775,15 @@ "get-intrinsic": "^1.1.1" } }, + "get-tsconfig": { + "version": "4.7.0", + "resolved": "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.0.tgz", + "integrity": "sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw==", + "dev": true, + "requires": { + "resolve-pkg-maps": "^1.0.0" + } + }, "glob": { "version": "7.1.3", "dev": true, @@ -19855,6 +19958,12 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, + "resolve-pkg-maps": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz", + "integrity": "sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==", + "dev": true + }, "resolve.exports": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.0.tgz", @@ -20572,6 +20681,12 @@ } } }, + "tapable": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", + "integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==", + "dev": true + }, "terser": { "version": "5.17.4", "resolved": "https://registry.npmjs.org/terser/-/terser-5.17.4.tgz", diff --git a/package.json b/package.json index 7b8f4207b7..cd379051c8 100644 --- a/package.json +++ b/package.json @@ -124,6 +124,7 @@ "debug": "~4.3.4", "eslint": "~8.48.0", "eslint-config-prettier": "~9.0.0", + "eslint-import-resolver-typescript": "^3.6.0", "eslint-plugin-import": "^2.28.1", "eslint-plugin-jest": "~27.2.3", "eslint-plugin-jest-extended": "^2.0.0", From 733fff3800a8a7f998e2139973512b3d7ad87378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 16:00:26 +0200 Subject: [PATCH 05/23] fix in tests: import/no-unresolved --- .eslintrc.cjs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 054b9c53ac..b0c25d3572 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -53,10 +53,10 @@ module.exports = { ], settings: { 'import/resolver': { - // You will also need to install and configure the TypeScript resolver - // See also https://github.com/import-js/eslint-import-resolver-typescript#configuration - typescript: true, - node: true, + typescript: { + alwaysTryTypes: true, // always try to resolve types under `@types` directory even it doesn't contain any source code, like `@types/unist` + project: '**/tsconfig.json', + }, }, }, parserOptions: { From edc2651b5b021cdd59f46700ed3352d2509f36ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 16:00:55 +0200 Subject: [PATCH 06/23] fix: Multiple exports of name 'IconPainter' import/export --- src/bpmn-visualization.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/bpmn-visualization.ts b/src/bpmn-visualization.ts index e33c24abdc..3527af987f 100644 --- a/src/bpmn-visualization.ts +++ b/src/bpmn-visualization.ts @@ -26,7 +26,6 @@ export type { Navigation } from './component/navigation'; export * from './model/bpmn/internal'; // not part of the public API but needed for the custom theme examples -export { IconPainter } from './component/mxgraph/shape/render/icon-painter'; export { StyleConfigurator } from './component/mxgraph/config/StyleConfigurator'; export * from './component/mxgraph/style'; export * from './component/mxgraph/shape/render'; From 429d899e149d0df2ee94b133d7eee1093c0dfa78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 16:40:57 +0200 Subject: [PATCH 07/23] fix: Unable to resolve path to module 'fs-extra/esm' import/no-unresolved --- scripts/docs.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docs.mjs b/scripts/docs.mjs index 9c5ca95537..3f4c441847 100644 --- a/scripts/docs.mjs +++ b/scripts/docs.mjs @@ -15,7 +15,7 @@ limitations under the License. */ import { readFileSync } from 'node:fs'; -import { copySync, ensureDirSync, removeSync } from 'fs-extra/esm'; +import { copySync, ensureDirSync, removeSync } from 'fs-extra'; import asciidoctor from '@asciidoctor/core'; function log(...data) { From 666e8c14bc5120c196eda36c2a325033213d6c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 16:52:04 +0200 Subject: [PATCH 08/23] fix: Unable to resolve path to module 'rollup-plugin-node-externals' import/no-unresolved The package.json of 'rollup-plugin-node-externals' is malformed, so the import doesn't work with 'eslint-plugin-import'. --- rollup.config.mjs | 2 +- scripts/utils/rollup.config.mjs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rollup.config.mjs b/rollup.config.mjs index 41e46616e6..e70caba948 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -21,7 +21,7 @@ import pkg from './package.json' assert { type: 'json' }; import terser from '@rollup/plugin-terser'; import cleanup from 'rollup-plugin-cleanup'; -import externals from 'rollup-plugin-node-externals'; +import externals from 'rollup-plugin-node-externals/dist'; import sizes from 'rollup-plugin-sizes'; import typescript from 'rollup-plugin-typescript2'; diff --git a/scripts/utils/rollup.config.mjs b/scripts/utils/rollup.config.mjs index 4e11f2f067..756ab1ba85 100644 --- a/scripts/utils/rollup.config.mjs +++ b/scripts/utils/rollup.config.mjs @@ -15,7 +15,7 @@ limitations under the License. */ import typescript from 'rollup-plugin-typescript2'; -import externals from 'rollup-plugin-node-externals'; +import externals from 'rollup-plugin-node-externals/dist'; export default { input: 'scripts/utils/parseBpmn.ts', From 662ab461a2427ff6043ec6483fd16e6e6d1e7ccc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 17:01:56 +0200 Subject: [PATCH 09/23] fix : Unable to resolve path to module 'bpmn-visualization' import/no-unresolved --- .eslintrc.cjs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index b0c25d3572..424c418d2e 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -87,6 +87,12 @@ module.exports = { '@typescript-eslint/consistent-type-imports': ['error'], // We choose to disable it and choose later if we want to enable it. See https://github.com/process-analytics/bpmn-visualization-js/pull/2821. '@typescript-eslint/consistent-type-definitions': 'off', + 'import/no-unresolved': [ + 'error', + { + ignore: ['^bpmn-visualization$'], + }, + ], }, }, ], From d36e87abf6251eeb71e961b39c99ea2e42c45a19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 17:12:50 +0200 Subject: [PATCH 10/23] add import/newline-after-import rule --- .eslintrc.cjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 424c418d2e..182bd19b09 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -16,7 +16,7 @@ limitations under the License. module.exports = { root: true, - plugins: ['notice', 'unicorn'], + plugins: ['notice', 'unicorn', 'import'], parser: '@typescript-eslint/parser', // Specifies the ESLint parser extends: [ 'plugin:prettier/recommended', // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array. @@ -40,6 +40,7 @@ module.exports = { }, }, ], + 'import/newline-after-import': ['error', { count: 1 }], }, overrides: [ // typescript From 681bb500504efbece6b73b443c482712277fe0de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 17:15:26 +0200 Subject: [PATCH 11/23] run linting --- test/config/ts-jest.cjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/config/ts-jest.cjs b/test/config/ts-jest.cjs index f48a042dcb..335cc484d2 100644 --- a/test/config/ts-jest.cjs +++ b/test/config/ts-jest.cjs @@ -19,6 +19,7 @@ const { pathsToModuleNameMapper } = require('ts-jest'); // Cannot use const { compilerOptions } = require('../../tsconfig.test.json'); // parsing fails as the file contains comment, so use the following hack taken from https://stackoverflow.com/questions/61996234/requiring-a-json-with-comments-in-node-js const fs = require('fs'); + let jsonTxt; try { jsonTxt = fs.readFileSync('./tsconfig.test.json', 'utf8'); @@ -30,6 +31,7 @@ try { } const JSON5 = require('json5'); + const tsconfig = JSON5.parse(jsonTxt); const compilerOptions = tsconfig.compilerOptions; From b31ccf13f0bf3e6cbfdb719aff26bd4cdc3599f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 17:18:57 +0200 Subject: [PATCH 12/23] add import/first rule --- .eslintrc.cjs | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 182bd19b09..ee9c66fe82 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -41,6 +41,7 @@ module.exports = { }, ], 'import/newline-after-import': ['error', { count: 1 }], + 'import/first': ['error'], }, overrides: [ // typescript From 268f3b0c32db11c8d017bc86f411a35f440c71e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 17:19:10 +0200 Subject: [PATCH 13/23] run linting --- src/model/bpmn/internal/index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/model/bpmn/internal/index.ts b/src/model/bpmn/internal/index.ts index 05d2c33b1f..7fa1535a4c 100644 --- a/src/model/bpmn/internal/index.ts +++ b/src/model/bpmn/internal/index.ts @@ -14,11 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -export * from './shape'; -export * from './edge/kinds'; - import type { FlowKind } from './edge/kinds'; import type { ShapeBpmnElementKind } from './shape'; + +export * from './shape'; +export * from './edge/kinds'; /** * @category BPMN */ From 313aadb3d1f877d7df87bb92abe73532ba5c88b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 17:20:49 +0200 Subject: [PATCH 14/23] add import/order rule --- .eslintrc.cjs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index ee9c66fe82..a765fdfa49 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -41,7 +41,19 @@ module.exports = { }, ], 'import/newline-after-import': ['error', { count: 1 }], - 'import/first': ['error'], + 'import/first': 'error', + 'import/order': [ + 'error', + { + groups: ['type', 'builtin', 'external', 'parent', 'sibling', 'index', 'internal'], + 'newlines-between': 'always', + alphabetize: { + order: 'asc', + orderImportKind: 'asc', + caseInsensitive: true, + }, + }, + ], }, overrides: [ // typescript From be7f3bb699d12db30f05a0c489b3ef1e097f22ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 17:35:45 +0200 Subject: [PATCH 15/23] run linting --- dev/ts/component/SvgExporter.ts | 3 +- dev/ts/component/ThemedBpmnVisualization.ts | 2 +- dev/ts/pages/elements-identification.ts | 1 + dev/ts/pages/index.ts | 1 + dev/ts/pages/overlays.ts | 1 + dev/ts/shared/main.ts | 10 +++-- rollup.config.mjs | 10 ++--- scripts/add-license-header.mjs | 1 + scripts/docs.mjs | 3 +- ...te-types-for-not-supported-ts-versions.mjs | 4 +- scripts/shared/types-info.mjs | 1 + scripts/utils/parseBpmn.ts | 9 ++-- scripts/utils/rollup.config.mjs | 2 +- src/component/BpmnVisualization.ts | 11 ++--- src/component/mxgraph/BpmnCellRenderer.ts | 3 +- src/component/mxgraph/BpmnGraph.ts | 11 +++-- src/component/mxgraph/BpmnRenderer.ts | 16 ++++--- src/component/mxgraph/GraphConfigurator.ts | 9 ++-- .../mxgraph/config/MarkerConfigurator.ts | 5 ++- .../mxgraph/config/ShapeConfigurator.ts | 12 ++--- .../mxgraph/config/StyleConfigurator.ts | 7 +-- src/component/mxgraph/overlay/converter.ts | 3 +- .../mxgraph/overlay/custom-overlay.ts | 5 ++- src/component/mxgraph/overlay/shapes.ts | 5 ++- src/component/mxgraph/overlay/updater.ts | 6 ++- .../mxgraph/renderer/CoordinatesTranslator.ts | 3 +- .../mxgraph/renderer/StyleComputer.ts | 15 ++++--- src/component/mxgraph/renderer/style-utils.ts | 1 + .../mxgraph/shape/activity-shapes.ts | 6 ++- src/component/mxgraph/shape/edges.ts | 3 +- src/component/mxgraph/shape/event-shapes.ts | 6 ++- src/component/mxgraph/shape/flow-shapes.ts | 8 ++-- src/component/mxgraph/shape/gateway-shapes.ts | 6 ++- .../mxgraph/shape/render/BpmnCanvas.ts | 3 +- .../mxgraph/shape/render/icon-painter.ts | 4 +- .../mxgraph/shape/text-annotation-shapes.ts | 5 ++- .../mxgraph/style/css-classes-updater.ts | 7 ++- src/component/mxgraph/style/style-updater.ts | 15 ++++--- src/component/mxgraph/style/utils.ts | 4 +- src/component/parser/BpmnParser.ts | 7 +-- src/component/parser/json/BpmnJsonParser.ts | 7 +-- .../json/converter/CategoryConverter.ts | 5 ++- .../json/converter/CollaborationConverter.ts | 18 ++++---- .../parser/json/converter/DiagramConverter.ts | 19 ++++---- .../converter/EventDefinitionConverter.ts | 5 ++- .../json/converter/GlobalTaskConverter.ts | 7 +-- .../parser/json/converter/ProcessConverter.ts | 44 ++++++++++--------- src/component/parser/json/converter/utils.ts | 7 +-- src/component/parser/json/warnings.ts | 3 +- src/component/parser/xml/BpmnXmlParser.ts | 3 +- .../registry/bpmn-elements-registry.ts | 10 +++-- src/component/registry/bpmn-model-filters.ts | 3 +- src/component/registry/bpmn-model-registry.ts | 12 ++--- src/component/registry/css-registry.ts | 3 +- src/component/registry/overlays-registry.ts | 3 +- src/component/registry/style-registry.ts | 1 + src/model/bpmn/internal/BpmnModel.ts | 2 +- src/model/bpmn/internal/edge/edge.ts | 5 ++- .../bpmn/internal/shape/ShapeBpmnElement.ts | 1 + src/model/bpmn/internal/shape/utils.ts | 4 +- .../bpmn/json/baseElement/baseElement.ts | 4 +- .../bpmn/json/baseElement/correlation.ts | 2 +- src/model/bpmn/json/baseElement/data.ts | 2 +- .../bpmn/json/baseElement/flowElement.ts | 2 +- .../baseElement/flowNode/activity/activity.ts | 10 ++--- .../baseElement/flowNode/activity/task.ts | 4 +- .../flowNode/choreographyActivity.ts | 12 ++--- .../bpmn/json/baseElement/flowNode/event.ts | 2 +- .../json/baseElement/loopCharacteristics.ts | 4 +- .../baseElement/rootElement/collaboration.ts | 12 ++--- .../baseElement/rootElement/globalTask.ts | 2 +- .../baseElement/rootElement/rootElement.ts | 14 +++--- src/model/bpmn/json/bpmn20.ts | 34 +++++++------- src/model/bpmn/json/bpmndi.ts | 2 +- src/model/bpmn/json/di.ts | 2 +- test/bundles/bundles.test.ts | 6 ++- test/config/jest-playwright.cjs | 4 +- test/config/jest.image.ts | 9 ++-- test/config/ts-jest.cjs | 6 +-- test/e2e/bpmn.colors.test.ts | 2 + test/e2e/bpmn.elements.collapsed.test.ts | 2 + test/e2e/bpmn.elements.filter.pools.test.ts | 4 +- test/e2e/bpmn.rendering.test.ts | 8 ++-- test/e2e/bpmn.theme.test.ts | 4 +- test/e2e/diagram.navigation.fit.test.ts | 12 +++-- test/e2e/diagram.navigation.zoom.pan.test.ts | 12 +++-- .../e2e/helpers/visu/image-snapshot-config.ts | 4 +- test/e2e/overlays.rendering.test.ts | 14 +++--- test/e2e/style.api.test.ts | 4 +- test/integration/BpmnVisualization.test.ts | 6 ++- .../cross.css.and.style.api.test.ts | 10 +++-- test/integration/diagram.navigation.test.ts | 3 +- test/integration/dom.bpmn.elements.test.ts | 16 ++++--- test/integration/dom.container.div.test.ts | 4 +- test/integration/dom.css.classes.test.ts | 3 +- test/integration/dom.overlays.test.ts | 6 ++- .../bpmn-visualization-initialization.ts | 3 +- test/integration/helpers/html-utils.ts | 1 + test/integration/helpers/model-expect.ts | 8 ++-- .../helpers/semantic-with-svg-utils.ts | 4 +- test/integration/matchers/matcher-utils.ts | 9 ++-- test/integration/matchers/toBeCell/index.ts | 8 ++-- test/integration/matchers/toBeEdge/index.ts | 11 +++-- test/integration/matchers/toBeShape/index.ts | 9 ++-- test/integration/model.elements.api.test.ts | 8 ++-- .../mxGraph.model.bpmn.colors.test.ts | 1 + .../mxGraph.model.bpmn.elements.test.ts | 24 +++++----- .../integration/mxGraph.model.css.api.test.ts | 1 + .../mxGraph.model.overlays.test.ts | 3 +- .../mxGraph.model.style.api.test.ts | 6 ++- .../performance/bpmn.load.performance.test.ts | 9 ++-- .../bpmn.navigation.performance.test.ts | 13 +++--- test/shared/model/bpmn-semantic-utils.ts | 1 + test/shared/visu/bpmn-page-utils.ts | 15 ++++--- test/shared/visu/test-utils.ts | 4 +- .../mxgraph/overlay/converter.test.ts | 5 ++- .../mxgraph/renderer/StyleComputer.test.ts | 32 +++++++------- .../mxgraph/renderer/style-utils.test.ts | 2 +- .../mxgraph/shape/render/BpmnCanvas.test.ts | 1 + test/unit/component/parser/BpmnParser.test.ts | 8 ++-- .../json/BpmnJsonParser.association.test.ts | 7 +-- .../json/BpmnJsonParser.callActivity.test.ts | 9 ++-- .../json/BpmnJsonParser.diagram.test.ts | 5 ++- .../parser/json/BpmnJsonParser.edge.test.ts | 3 +- .../parser/json/BpmnJsonParser.event.test.ts | 13 +++--- .../json/BpmnJsonParser.flowNode.test.ts | 11 ++--- .../parser/json/BpmnJsonParser.group.test.ts | 7 +-- .../json/BpmnJsonParser.label.bounds.test.ts | 4 +- .../json/BpmnJsonParser.label.font.test.ts | 3 +- .../parser/json/BpmnJsonParser.label.test.ts | 4 +- .../parser/json/BpmnJsonParser.lane.test.ts | 7 +-- .../parser/json/BpmnJsonParser.marker.test.ts | 9 ++-- .../json/BpmnJsonParser.messageFlow.test.ts | 15 ++++--- .../json/BpmnJsonParser.process.test.ts | 7 +-- ...sonParser.sequenceFlow.conditional.test.ts | 5 ++- ...pmnJsonParser.sequenceFlow.default.test.ts | 5 ++- ...BpmnJsonParser.sequenceFlow.normal.test.ts | 7 +-- .../json/BpmnJsonParser.sub.process.test.ts | 15 ++++--- .../BpmnJsonParser.text.annotation.test.ts | 7 +-- .../component/parser/parsing-messages.test.ts | 4 +- ...XmlParser.00.special.parsing.cases.test.ts | 5 ++- .../xml/BpmnXmlParser.activiti.5_14_1.test.ts | 3 +- .../xml/BpmnXmlParser.adonis-np.8_0.test.ts | 3 +- ...mnXmlParser.bic-cloud-design.6_2_0.test.ts | 5 ++- ...mnXmlParser.bizagi-modeler.2_8_0_8.test.ts | 3 +- ...nXmlParser.bonita-community.2021_1.test.ts | 3 +- ...mlParser.bpmn-plus-composer.v_10_4.test.ts | 3 +- ...Parser.camuda-eclipse-plugin.3_0_0.test.ts | 3 +- .../parser/xml/BpmnXmlParser.miwg.test.ts | 5 ++- ...pmnXmlParser.omnitracker-bpmn.11_5.test.ts | 3 +- ...arser.trisotech-bpmn-modeler.6_2_0.test.ts | 13 +++--- .../registry/bpmn-model-filters.test.ts | 13 +++--- .../registry/bpmn-model-registry.test.ts | 4 +- test/unit/helpers/JsonBuilder.test.ts | 7 +-- test/unit/helpers/JsonBuilder.ts | 11 ++--- test/unit/helpers/JsonTestUtils.ts | 9 ++-- test/unit/helpers/TestUtils.ts | 3 +- test/unit/helpers/bpmn-model-expect.ts | 7 +-- test/unit/helpers/bpmn-model-utils.ts | 5 ++- vite.config.js | 1 + 160 files changed, 643 insertions(+), 442 deletions(-) diff --git a/dev/ts/component/SvgExporter.ts b/dev/ts/component/SvgExporter.ts index b6602c5e07..1dee6c2ca1 100644 --- a/dev/ts/component/SvgExporter.ts +++ b/dev/ts/component/SvgExporter.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { mxgraph, mxClient, mxConstants, mxSvgCanvas2D, mxUtils } from '../../../src/component/mxgraph/initializer'; import type { mxGraph, mxSvgCanvas2D as mxSvgCanvas2DType } from 'mxgraph'; +import { mxgraph, mxClient, mxConstants, mxSvgCanvas2D, mxUtils } from '../../../src/component/mxgraph/initializer'; + interface SvgExportOptions { scale: number; border: number; diff --git a/dev/ts/component/ThemedBpmnVisualization.ts b/dev/ts/component/ThemedBpmnVisualization.ts index 680ba84f50..4b2ebed0d5 100644 --- a/dev/ts/component/ThemedBpmnVisualization.ts +++ b/dev/ts/component/ThemedBpmnVisualization.ts @@ -15,8 +15,8 @@ limitations under the License. */ import { BpmnVisualization, FlowKind, ShapeBpmnElementKind, ShapeUtil, StyleConfigurator, StyleDefault } from '../../../src/bpmn-visualization'; -import { logStartup } from '../shared/internal-helpers'; import { mxConstants } from '../../../src/component/mxgraph/initializer'; +import { logStartup } from '../shared/internal-helpers'; interface Theme { defaultFillColor: string; diff --git a/dev/ts/pages/elements-identification.ts b/dev/ts/pages/elements-identification.ts index 44a528c139..c1ecbd1eb1 100644 --- a/dev/ts/pages/elements-identification.ts +++ b/dev/ts/pages/elements-identification.ts @@ -15,6 +15,7 @@ limitations under the License. */ import type { BpmnElementKind, BpmnSemantic, Overlay, ShapeStyleUpdate, StyleUpdate } from '../dev-bundle-index'; + import { addCssClasses, addOverlays, diff --git a/dev/ts/pages/index.ts b/dev/ts/pages/index.ts index 53ca88d651..82f0b78169 100644 --- a/dev/ts/pages/index.ts +++ b/dev/ts/pages/index.ts @@ -15,6 +15,7 @@ limitations under the License. */ import type { FitOptions, FitType } from '../dev-bundle-index'; + import { documentReady, handleFileSelect, diff --git a/dev/ts/pages/overlays.ts b/dev/ts/pages/overlays.ts index e850365eac..d699a448b3 100644 --- a/dev/ts/pages/overlays.ts +++ b/dev/ts/pages/overlays.ts @@ -15,6 +15,7 @@ limitations under the License. */ import type { Overlay, OverlayPosition } from '../dev-bundle-index'; + import { addOverlays, configureControlsPanel, configureMousePointer, documentReady, getModelElementsByIds, removeAllOverlays, startBpmnVisualization } from '../dev-bundle-index'; const bpmnIdInputElt = document.getElementById('bpmn-id-input') as HTMLInputElement; diff --git a/dev/ts/shared/main.ts b/dev/ts/shared/main.ts index 0eb775f615..1f2012dd2b 100644 --- a/dev/ts/shared/main.ts +++ b/dev/ts/shared/main.ts @@ -14,7 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { mxCell } from 'mxgraph'; import type { BpmnElementKind, BpmnSemantic, @@ -31,14 +30,17 @@ import type { Version, ZoomType, } from '../../../src/bpmn-visualization'; +import type { mxCell } from 'mxgraph'; + import { FlowKind, ShapeBpmnElementKind } from '../../../src/bpmn-visualization'; -import { fetchBpmnContent, logDownload, logError, logErrorAndOpenAlert, logStartup } from './internal-helpers'; -import { log } from './shared-helpers'; +import { downloadAsPng, downloadAsSvg } from '../component/download'; import { DropFileUserInterface } from '../component/DropFileUserInterface'; import { SvgExporter } from '../component/SvgExporter'; -import { downloadAsPng, downloadAsSvg } from '../component/download'; import { ThemedBpmnVisualization } from '../component/ThemedBpmnVisualization'; +import { fetchBpmnContent, logDownload, logError, logErrorAndOpenAlert, logStartup } from './internal-helpers'; +import { log } from './shared-helpers'; + let bpmnVisualization: ThemedBpmnVisualization; let loadOptions: LoadOptions = {}; let statusKoNotifier: (errorMsg: string) => void; diff --git a/rollup.config.mjs b/rollup.config.mjs index e70caba948..5605d04edf 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -14,19 +14,19 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { computeBanner } from './scripts/shared/banner.mjs'; // generate warning when running with Node 18 // (node:75278) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time -import pkg from './package.json' assert { type: 'json' }; +import commonjs from '@rollup/plugin-commonjs'; // at least, needed to bundle mxGraph which is only available as a CommonJS module +import resolve from '@rollup/plugin-node-resolve'; import terser from '@rollup/plugin-terser'; import cleanup from 'rollup-plugin-cleanup'; import externals from 'rollup-plugin-node-externals/dist'; import sizes from 'rollup-plugin-sizes'; - import typescript from 'rollup-plugin-typescript2'; -import commonjs from '@rollup/plugin-commonjs'; // at least, needed to bundle mxGraph which is only available as a CommonJS module -import resolve from '@rollup/plugin-node-resolve'; + +import pkg from './package.json' assert { type: 'json' }; +import { computeBanner } from './scripts/shared/banner.mjs'; const libInput = 'src/bpmn-visualization.ts'; const pluginsBundleIIFE = [ diff --git a/scripts/add-license-header.mjs b/scripts/add-license-header.mjs index 2c7d622830..987040a4d0 100644 --- a/scripts/add-license-header.mjs +++ b/scripts/add-license-header.mjs @@ -15,6 +15,7 @@ limitations under the License. */ import fs, { readFileSync } from 'node:fs'; + import { computeBanner } from './shared/banner.mjs'; import { getTypeFilesInformation } from './shared/types-info.mjs'; diff --git a/scripts/docs.mjs b/scripts/docs.mjs index 3f4c441847..fa04df1772 100644 --- a/scripts/docs.mjs +++ b/scripts/docs.mjs @@ -15,8 +15,9 @@ limitations under the License. */ import { readFileSync } from 'node:fs'; -import { copySync, ensureDirSync, removeSync } from 'fs-extra'; + import asciidoctor from '@asciidoctor/core'; +import { copySync, ensureDirSync, removeSync } from 'fs-extra'; function log(...data) { // eslint-disable-next-line no-console diff --git a/scripts/generate-types-for-not-supported-ts-versions.mjs b/scripts/generate-types-for-not-supported-ts-versions.mjs index 507db72f0f..20a881fd87 100644 --- a/scripts/generate-types-for-not-supported-ts-versions.mjs +++ b/scripts/generate-types-for-not-supported-ts-versions.mjs @@ -15,10 +15,12 @@ limitations under the License. */ import * as fs from 'node:fs'; + +import packageJSON from '../package.json' assert { type: 'json' }; + import { getTypeFilesInformation } from './shared/types-info.mjs'; // generate warning when running with Node 18 // (node:75278) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time -import packageJSON from '../package.json' assert { type: 'json' }; // generate a definition file for not supported TS versions. It provokes syntax error to show an explicit message about what are the supported versions. // inspired from https://github.com/graphql/graphql-js/blob/743f42b6ef6006d35bf9e0b45e3b70d6e9100596/resources/build-npm.ts#L86-L97 diff --git a/scripts/shared/types-info.mjs b/scripts/shared/types-info.mjs index 02b270c384..fdcba1fff2 100644 --- a/scripts/shared/types-info.mjs +++ b/scripts/shared/types-info.mjs @@ -15,6 +15,7 @@ limitations under the License. */ import assert from 'node:assert'; + // generate warning when running with Node 18 // (node:75278) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time import packageJSON from '../../package.json' assert { type: 'json' }; diff --git a/scripts/utils/parseBpmn.ts b/scripts/utils/parseBpmn.ts index 72f3bca0a0..8140fc47d9 100644 --- a/scripts/utils/parseBpmn.ts +++ b/scripts/utils/parseBpmn.ts @@ -14,14 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type BpmnModel from '../../src/model/bpmn/internal/BpmnModel'; +import type { BpmnJsonModel } from '../../src/model/bpmn/json/bpmn20'; + import { resolve as resolvePath } from 'node:path'; + import clipboardy from 'clipboardy'; import parseArgs from 'minimist'; -import type BpmnModel from '../../src/model/bpmn/internal/BpmnModel'; -import type { BpmnJsonModel } from '../../src/model/bpmn/json/bpmn20'; -import BpmnXmlParser from '../../src/component/parser/xml/BpmnXmlParser'; + import { newBpmnJsonParser } from '../../src/component/parser/json/BpmnJsonParser'; import { ParsingMessageCollector } from '../../src/component/parser/parsing-messages'; +import BpmnXmlParser from '../../src/component/parser/xml/BpmnXmlParser'; import { readFileSync } from '../../test/shared/file-helper'; const __dirname = resolvePath(); diff --git a/scripts/utils/rollup.config.mjs b/scripts/utils/rollup.config.mjs index 756ab1ba85..870efc6d3d 100644 --- a/scripts/utils/rollup.config.mjs +++ b/scripts/utils/rollup.config.mjs @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import typescript from 'rollup-plugin-typescript2'; import externals from 'rollup-plugin-node-externals/dist'; +import typescript from 'rollup-plugin-typescript2'; export default { input: 'scripts/utils/parseBpmn.ts', diff --git a/src/component/BpmnVisualization.ts b/src/component/BpmnVisualization.ts index b678ab8ecc..410b8fe513 100644 --- a/src/component/BpmnVisualization.ts +++ b/src/component/BpmnVisualization.ts @@ -14,16 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ -import GraphConfigurator from './mxgraph/GraphConfigurator'; -import { newBpmnRenderer } from './mxgraph/BpmnRenderer'; -import { newBpmnParser } from './parser/BpmnParser'; import type { BpmnGraph } from './mxgraph/BpmnGraph'; import type { GlobalOptions, LoadOptions, ParserOptions, RendererOptions } from './options'; import type { BpmnElementsRegistry } from './registry'; -import { createNewBpmnElementsRegistry } from './registry/bpmn-elements-registry'; -import { BpmnModelRegistry } from './registry/bpmn-model-registry'; + import { htmlElement } from './helpers/dom-utils'; +import { newBpmnRenderer } from './mxgraph/BpmnRenderer'; +import GraphConfigurator from './mxgraph/GraphConfigurator'; import { Navigation } from './navigation'; +import { newBpmnParser } from './parser/BpmnParser'; +import { createNewBpmnElementsRegistry } from './registry/bpmn-elements-registry'; +import { BpmnModelRegistry } from './registry/bpmn-model-registry'; import { version, type Version } from './version'; /** diff --git a/src/component/mxgraph/BpmnCellRenderer.ts b/src/component/mxgraph/BpmnCellRenderer.ts index 8154c07794..076eb095dc 100644 --- a/src/component/mxgraph/BpmnCellRenderer.ts +++ b/src/component/mxgraph/BpmnCellRenderer.ts @@ -14,8 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { mxgraph, mxRectangle } from './initializer'; import type { mxCellState, mxImageShape, mxShape } from 'mxgraph'; + +import { mxgraph, mxRectangle } from './initializer'; import { MxGraphCustomOverlay } from './overlay/custom-overlay'; import { OverlayBadgeShape } from './overlay/shapes'; diff --git a/src/component/mxgraph/BpmnGraph.ts b/src/component/mxgraph/BpmnGraph.ts index 463e2d9cc1..e73c0b33a3 100644 --- a/src/component/mxgraph/BpmnGraph.ts +++ b/src/component/mxgraph/BpmnGraph.ts @@ -15,12 +15,15 @@ limitations under the License. */ import type { FitOptions, ZoomConfiguration } from '../options'; -import { FitType } from '../options'; -import { ensurePositiveValue, ensureValidZoomConfiguration } from '../helpers/validators'; +import type { mxCellRenderer, mxCellState, mxGraphView, mxPoint } from 'mxgraph'; + import { debounce, throttle } from 'lodash-es'; -import { mxgraph, mxEvent } from './initializer'; + +import { ensurePositiveValue, ensureValidZoomConfiguration } from '../helpers/validators'; +import { FitType } from '../options'; + import { BpmnCellRenderer } from './BpmnCellRenderer'; -import type { mxCellRenderer, mxCellState, mxGraphView, mxPoint } from 'mxgraph'; +import { mxgraph, mxEvent } from './initializer'; const zoomFactorIn = 1.25; const zoomFactorOut = 1 / zoomFactorIn; diff --git a/src/component/mxgraph/BpmnRenderer.ts b/src/component/mxgraph/BpmnRenderer.ts index ee3059c6da..886a9f0fa6 100644 --- a/src/component/mxgraph/BpmnRenderer.ts +++ b/src/component/mxgraph/BpmnRenderer.ts @@ -14,20 +14,22 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { BpmnGraph } from './BpmnGraph'; +import type Bounds from '../../model/bpmn/internal/Bounds'; import type { Edge, Waypoint } from '../../model/bpmn/internal/edge/edge'; -import { MessageFlow } from '../../model/bpmn/internal/edge/flows'; import type Shape from '../../model/bpmn/internal/shape/Shape'; import type ShapeBpmnElement from '../../model/bpmn/internal/shape/ShapeBpmnElement'; -import type Bounds from '../../model/bpmn/internal/Bounds'; -import { MessageVisibleKind, ShapeUtil } from '../../model/bpmn/internal'; -import CoordinatesTranslator from './renderer/CoordinatesTranslator'; -import StyleComputer from './renderer/StyleComputer'; -import type { BpmnGraph } from './BpmnGraph'; import type { FitOptions, RendererOptions } from '../options'; import type { RenderedModel } from '../registry/bpmn-model-registry'; -import { mxPoint } from './initializer'; import type { mxCell } from 'mxgraph'; +import { MessageVisibleKind, ShapeUtil } from '../../model/bpmn/internal'; +import { MessageFlow } from '../../model/bpmn/internal/edge/flows'; + +import { mxPoint } from './initializer'; +import CoordinatesTranslator from './renderer/CoordinatesTranslator'; +import StyleComputer from './renderer/StyleComputer'; + /** * @internal */ diff --git a/src/component/mxgraph/GraphConfigurator.ts b/src/component/mxgraph/GraphConfigurator.ts index 7f50f19f08..84c6f0de08 100644 --- a/src/component/mxgraph/GraphConfigurator.ts +++ b/src/component/mxgraph/GraphConfigurator.ts @@ -14,13 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { StyleConfigurator } from './config/StyleConfigurator'; -import ShapeConfigurator from './config/ShapeConfigurator'; -import MarkerConfigurator from './config/MarkerConfigurator'; import type { GlobalOptions } from '../options'; +import type { mxMouseEvent } from 'mxgraph'; + import { BpmnGraph } from './BpmnGraph'; +import MarkerConfigurator from './config/MarkerConfigurator'; +import ShapeConfigurator from './config/ShapeConfigurator'; +import { StyleConfigurator } from './config/StyleConfigurator'; import { mxEvent } from './initializer'; -import type { mxMouseEvent } from 'mxgraph'; /** * Configure the BpmnMxGraph graph that can be used by the lib diff --git a/src/component/mxgraph/config/MarkerConfigurator.ts b/src/component/mxgraph/config/MarkerConfigurator.ts index 5b7b50ac14..ec76142dc4 100644 --- a/src/component/mxgraph/config/MarkerConfigurator.ts +++ b/src/component/mxgraph/config/MarkerConfigurator.ts @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { MarkerIdentifier } from '../style'; -import { mxgraph } from '../initializer'; import type { mxAbstractCanvas2D, mxCell, mxPoint, mxShape } from 'mxgraph'; +import { mxgraph } from '../initializer'; +import { MarkerIdentifier } from '../style'; + /** * @internal */ diff --git a/src/component/mxgraph/config/ShapeConfigurator.ts b/src/component/mxgraph/config/ShapeConfigurator.ts index 301c6752a3..409cf00145 100644 --- a/src/component/mxgraph/config/ShapeConfigurator.ts +++ b/src/component/mxgraph/config/ShapeConfigurator.ts @@ -14,10 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { mxgraph, mxCellRenderer, mxConstants, mxSvgCanvas2D } from '../initializer'; import { ShapeBpmnElementKind } from '../../../model/bpmn/internal'; -import { EndEventShape, EventShape, IntermediateEventShape, ThrowIntermediateEventShape } from '../shape/event-shapes'; -import { ComplexGatewayShape, EventBasedGatewayShape, ExclusiveGatewayShape, InclusiveGatewayShape, ParallelGatewayShape } from '../shape/gateway-shapes'; +import { mxgraph, mxCellRenderer, mxConstants, mxSvgCanvas2D } from '../initializer'; +import { computeAllBpmnClassNamesOfCell } from '../renderer/style-utils'; import { BusinessRuleTaskShape, CallActivityShape, @@ -30,11 +29,12 @@ import { TaskShape, UserTaskShape, } from '../shape/activity-shapes'; -import { TextAnnotationShape } from '../shape/text-annotation-shapes'; +import { BpmnConnector } from '../shape/edges'; +import { EndEventShape, EventShape, IntermediateEventShape, ThrowIntermediateEventShape } from '../shape/event-shapes'; import { MessageFlowIconShape } from '../shape/flow-shapes'; +import { ComplexGatewayShape, EventBasedGatewayShape, ExclusiveGatewayShape, InclusiveGatewayShape, ParallelGatewayShape } from '../shape/gateway-shapes'; +import { TextAnnotationShape } from '../shape/text-annotation-shapes'; import { BpmnStyleIdentifier } from '../style'; -import { computeAllBpmnClassNamesOfCell } from '../renderer/style-utils'; -import { BpmnConnector } from '../shape/edges'; /** * @internal diff --git a/src/component/mxgraph/config/StyleConfigurator.ts b/src/component/mxgraph/config/StyleConfigurator.ts index 61f84aeb84..5af5dc3278 100644 --- a/src/component/mxgraph/config/StyleConfigurator.ts +++ b/src/component/mxgraph/config/StyleConfigurator.ts @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { AssociationDirectionKind, FlowKind, SequenceFlowKind, ShapeBpmnElementKind, ShapeUtil } from '../../../model/bpmn/internal'; -import { BpmnStyleIdentifier, MarkerIdentifier, StyleDefault } from '../style'; import type { BpmnGraph } from '../BpmnGraph'; -import { mxConstants, mxPerimeter } from '../initializer'; import type { mxStylesheet, StyleMap } from 'mxgraph'; +import { AssociationDirectionKind, FlowKind, SequenceFlowKind, ShapeBpmnElementKind, ShapeUtil } from '../../../model/bpmn/internal'; +import { mxConstants, mxPerimeter } from '../initializer'; +import { BpmnStyleIdentifier, MarkerIdentifier, StyleDefault } from '../style'; + const arrowDefaultSize = 12; /** diff --git a/src/component/mxgraph/overlay/converter.ts b/src/component/mxgraph/overlay/converter.ts index 557d3ecf03..3c9eca6b10 100644 --- a/src/component/mxgraph/overlay/converter.ts +++ b/src/component/mxgraph/overlay/converter.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { MxGraphCustomOverlayOptions, MxGraphCustomOverlayPosition, MxGraphCustomOverlayStyle } from './custom-overlay'; import type { Overlay, OverlayFont, OverlayPosition, OverlayFill, OverlayStroke } from '../../registry'; + import { StyleDefault } from '../style'; -import type { MxGraphCustomOverlayOptions, MxGraphCustomOverlayPosition, MxGraphCustomOverlayStyle } from './custom-overlay'; export class OverlayConverter { private overlayPositions = new Map([ diff --git a/src/component/mxgraph/overlay/custom-overlay.ts b/src/component/mxgraph/overlay/custom-overlay.ts index ee46d9d924..ad5b0361c1 100644 --- a/src/component/mxgraph/overlay/custom-overlay.ts +++ b/src/component/mxgraph/overlay/custom-overlay.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { mxgraph, mxConstants, mxPoint, mxRectangle } from '../initializer'; -import type { mxCellState, mxPoint as mxPointType, mxRectangle as mxRectangleType } from 'mxgraph'; import type { OverlayStyle } from '../../registry'; +import type { mxCellState, mxPoint as mxPointType, mxRectangle as mxRectangleType } from 'mxgraph'; + +import { mxgraph, mxConstants, mxPoint, mxRectangle } from '../initializer'; export type VerticalAlignType = 'bottom' | 'middle' | 'top'; export type HorizontalAlignType = 'left' | 'center' | 'right'; diff --git a/src/component/mxgraph/overlay/shapes.ts b/src/component/mxgraph/overlay/shapes.ts index 0cce8de3ae..34db8935d0 100644 --- a/src/component/mxgraph/overlay/shapes.ts +++ b/src/component/mxgraph/overlay/shapes.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { mxgraph } from '../initializer'; -import type { mxRectangle } from 'mxgraph'; import type { MxGraphCustomOverlayStyle } from './custom-overlay'; +import type { mxRectangle } from 'mxgraph'; + +import { mxgraph } from '../initializer'; export class OverlayBadgeShape extends mxgraph.mxText { constructor(value: string, bounds: mxRectangle, style: MxGraphCustomOverlayStyle) { diff --git a/src/component/mxgraph/overlay/updater.ts b/src/component/mxgraph/overlay/updater.ts index 56e29dd5d8..4ddc3a7e80 100644 --- a/src/component/mxgraph/overlay/updater.ts +++ b/src/component/mxgraph/overlay/updater.ts @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { BpmnGraph } from '../BpmnGraph'; -import { OverlayConverter } from './converter'; import type { Overlay } from '../../registry'; +import type { BpmnGraph } from '../BpmnGraph'; + import { ensureIsArray } from '../../helpers/array-utils'; + +import { OverlayConverter } from './converter'; import { MxGraphCustomOverlay } from './custom-overlay'; export function createNewOverlaysUpdater(graph: BpmnGraph): OverlaysUpdater { diff --git a/src/component/mxgraph/renderer/CoordinatesTranslator.ts b/src/component/mxgraph/renderer/CoordinatesTranslator.ts index 2f85a21eaa..4e0d2c1519 100644 --- a/src/component/mxgraph/renderer/CoordinatesTranslator.ts +++ b/src/component/mxgraph/renderer/CoordinatesTranslator.ts @@ -15,9 +15,10 @@ limitations under the License. */ import type { BpmnGraph } from '../BpmnGraph'; -import { mxPoint } from '../initializer'; import type { mxCell, mxPoint as mxPointType } from 'mxgraph'; +import { mxPoint } from '../initializer'; + /** * @internal */ diff --git a/src/component/mxgraph/renderer/StyleComputer.ts b/src/component/mxgraph/renderer/StyleComputer.ts index 0fcff0d6a7..bfca941319 100644 --- a/src/component/mxgraph/renderer/StyleComputer.ts +++ b/src/component/mxgraph/renderer/StyleComputer.ts @@ -14,10 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { mxConstants } from '../initializer'; -import Shape from '../../../model/bpmn/internal/shape/Shape'; -import type { Edge } from '../../../model/bpmn/internal/edge/edge'; import type Bounds from '../../../model/bpmn/internal/Bounds'; +import type { Edge } from '../../../model/bpmn/internal/edge/edge'; +import type { Font } from '../../../model/bpmn/internal/Label'; +import type { RendererOptions } from '../../options'; + +import { MessageVisibleKind, ShapeBpmnCallActivityKind, ShapeBpmnElementKind, ShapeBpmnMarkerKind, ShapeUtil } from '../../../model/bpmn/internal'; +import { AssociationFlow, SequenceFlow } from '../../../model/bpmn/internal/edge/flows'; +import Shape from '../../../model/bpmn/internal/shape/Shape'; import { ShapeBpmnActivity, ShapeBpmnBoundaryEvent, @@ -27,11 +31,8 @@ import { ShapeBpmnStartEvent, ShapeBpmnSubProcess, } from '../../../model/bpmn/internal/shape/ShapeBpmnElement'; +import { mxConstants } from '../initializer'; import { BpmnStyleIdentifier } from '../style'; -import { MessageVisibleKind, ShapeBpmnCallActivityKind, ShapeBpmnElementKind, ShapeBpmnMarkerKind, ShapeUtil } from '../../../model/bpmn/internal'; -import { AssociationFlow, SequenceFlow } from '../../../model/bpmn/internal/edge/flows'; -import type { Font } from '../../../model/bpmn/internal/Label'; -import type { RendererOptions } from '../../options'; /** * @internal diff --git a/src/component/mxgraph/renderer/style-utils.ts b/src/component/mxgraph/renderer/style-utils.ts index c78a9e64dc..e371b06d1c 100644 --- a/src/component/mxgraph/renderer/style-utils.ts +++ b/src/component/mxgraph/renderer/style-utils.ts @@ -15,6 +15,7 @@ limitations under the License. */ import type { mxCell } from 'mxgraph'; + import { ShapeUtil } from '../../../model/bpmn/internal'; import { isFlowKind } from '../../../model/bpmn/internal/edge/utils'; import { BpmnStyleIdentifier } from '../style/identifiers'; diff --git a/src/component/mxgraph/shape/activity-shapes.ts b/src/component/mxgraph/shape/activity-shapes.ts index 354fc2dbc8..505b831162 100644 --- a/src/component/mxgraph/shape/activity-shapes.ts +++ b/src/component/mxgraph/shape/activity-shapes.ts @@ -14,14 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { BpmnCanvas, PaintParameter, ShapeConfiguration } from './render'; import type { mxAbstractCanvas2D } from 'mxgraph'; + +import { ShapeBpmnElementKind, ShapeBpmnMarkerKind, ShapeBpmnSubProcessKind } from '../../../model/bpmn/internal'; import { mxRectangleShape, mxUtils } from '../initializer'; import { BpmnStyleIdentifier, StyleDefault } from '../style'; import { getBpmnIsInstantiating } from '../style/utils'; -import type { BpmnCanvas, PaintParameter, ShapeConfiguration } from './render'; + import { IconPainterProvider } from './render'; import { buildPaintParameter } from './render/icon-painter'; -import { ShapeBpmnElementKind, ShapeBpmnMarkerKind, ShapeBpmnSubProcessKind } from '../../../model/bpmn/internal'; import { orderActivityMarkers } from './render/utils'; function paintEnvelopeIcon(paintParameter: PaintParameter, isFilled: boolean): void { diff --git a/src/component/mxgraph/shape/edges.ts b/src/component/mxgraph/shape/edges.ts index 9a44ca6535..3ea2d7160b 100644 --- a/src/component/mxgraph/shape/edges.ts +++ b/src/component/mxgraph/shape/edges.ts @@ -14,8 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { mxgraph, mxSvgCanvas2D, mxUtils } from '../initializer'; import type { mxAbstractCanvas2D, mxPoint } from 'mxgraph'; + +import { mxgraph, mxSvgCanvas2D, mxUtils } from '../initializer'; import { BpmnStyleIdentifier } from '../style'; export class BpmnConnector extends mxgraph.mxConnector { diff --git a/src/component/mxgraph/shape/event-shapes.ts b/src/component/mxgraph/shape/event-shapes.ts index b9af0ebead..429d292210 100644 --- a/src/component/mxgraph/shape/event-shapes.ts +++ b/src/component/mxgraph/shape/event-shapes.ts @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { BpmnCanvas, PaintParameter } from './render'; import type { mxAbstractCanvas2D } from 'mxgraph'; + +import { ShapeBpmnEventDefinitionKind } from '../../../model/bpmn/internal'; import { mxgraph, mxUtils } from '../initializer'; import { BpmnStyleIdentifier, StyleDefault } from '../style'; -import { ShapeBpmnEventDefinitionKind } from '../../../model/bpmn/internal'; -import type { BpmnCanvas, PaintParameter } from './render'; + import { IconPainterProvider } from './render'; import { buildPaintParameter } from './render/icon-painter'; diff --git a/src/component/mxgraph/shape/flow-shapes.ts b/src/component/mxgraph/shape/flow-shapes.ts index 599c389662..62e07e2a23 100644 --- a/src/component/mxgraph/shape/flow-shapes.ts +++ b/src/component/mxgraph/shape/flow-shapes.ts @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { mxAbstractCanvas2D } from 'mxgraph'; + +import { mxRectangleShape, mxUtils } from '../initializer'; +import { BpmnStyleIdentifier } from '../style'; + import { IconPainterProvider } from './render'; import { buildPaintParameter } from './render/icon-painter'; -import { BpmnStyleIdentifier } from '../style'; -import { mxRectangleShape, mxUtils } from '../initializer'; -import type { mxAbstractCanvas2D } from 'mxgraph'; /** * @internal diff --git a/src/component/mxgraph/shape/gateway-shapes.ts b/src/component/mxgraph/shape/gateway-shapes.ts index 45170806e3..d705665d75 100644 --- a/src/component/mxgraph/shape/gateway-shapes.ts +++ b/src/component/mxgraph/shape/gateway-shapes.ts @@ -14,12 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { PaintParameter } from './render'; import type { mxAbstractCanvas2D } from 'mxgraph'; + +import { ShapeBpmnEventBasedGatewayKind } from '../../../model/bpmn/internal'; import { mxgraph, mxUtils } from '../initializer'; import { BpmnStyleIdentifier, StyleDefault } from '../style'; import { getBpmnIsInstantiating } from '../style/utils'; -import { ShapeBpmnEventBasedGatewayKind } from '../../../model/bpmn/internal'; -import type { PaintParameter } from './render'; + import { IconPainterProvider } from './render'; import { buildPaintParameter } from './render/icon-painter'; diff --git a/src/component/mxgraph/shape/render/BpmnCanvas.ts b/src/component/mxgraph/shape/render/BpmnCanvas.ts index d8415ccb53..8a6535ffbd 100644 --- a/src/component/mxgraph/shape/render/BpmnCanvas.ts +++ b/src/component/mxgraph/shape/render/BpmnCanvas.ts @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { StyleDefault } from '../../style'; import type { IconConfiguration, IconStyleConfiguration, ShapeConfiguration, Size } from './render-types'; import type { mxAbstractCanvas2D } from 'mxgraph'; +import { StyleDefault } from '../../style'; + /** * **WARN**: You may use it to customize the BPMN Theme as suggested in the examples. But be aware that the way the default BPMN theme can be modified is subject to change. * diff --git a/src/component/mxgraph/shape/render/icon-painter.ts b/src/component/mxgraph/shape/render/icon-painter.ts index ec23e37d63..269d384dbf 100644 --- a/src/component/mxgraph/shape/render/icon-painter.ts +++ b/src/component/mxgraph/shape/render/icon-painter.ts @@ -14,11 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { IconStyleConfiguration, ShapeConfiguration, Size } from './render-types'; import type { mxAbstractCanvas2D, mxShape } from 'mxgraph'; + import { mxConstants, mxUtils } from '../../initializer'; import { StyleDefault } from '../../style'; + import { BpmnCanvas } from './BpmnCanvas'; -import type { IconStyleConfiguration, ShapeConfiguration, Size } from './render-types'; /** * **WARN**: You may use it to customize the BPMN Theme as suggested in the examples. But be aware that the way the default BPMN theme can be modified is subject to change. diff --git a/src/component/mxgraph/shape/text-annotation-shapes.ts b/src/component/mxgraph/shape/text-annotation-shapes.ts index dc937e7104..6c516c7753 100644 --- a/src/component/mxgraph/shape/text-annotation-shapes.ts +++ b/src/component/mxgraph/shape/text-annotation-shapes.ts @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { StyleDefault } from '../style'; -import { mxRectangleShape } from '../initializer'; import type { mxAbstractCanvas2D } from 'mxgraph'; +import { mxRectangleShape } from '../initializer'; +import { StyleDefault } from '../style'; + /** * @internal */ diff --git a/src/component/mxgraph/style/css-classes-updater.ts b/src/component/mxgraph/style/css-classes-updater.ts index 6748cf5fb4..fe924a2328 100644 --- a/src/component/mxgraph/style/css-classes-updater.ts +++ b/src/component/mxgraph/style/css-classes-updater.ts @@ -14,11 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { BpmnStyleIdentifier } from './index'; -import { setStyle } from './utils'; import type { BpmnGraph } from '../BpmnGraph'; + import { messageFlowIconId } from '../BpmnRenderer'; +import { setStyle } from './utils'; + +import { BpmnStyleIdentifier } from './index'; + /** * @internal */ diff --git a/src/component/mxgraph/style/style-updater.ts b/src/component/mxgraph/style/style-updater.ts index 472953991e..9056d1cb57 100644 --- a/src/component/mxgraph/style/style-updater.ts +++ b/src/component/mxgraph/style/style-updater.ts @@ -14,15 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { mxCell, mxGraphModel } from 'mxgraph'; -import { BpmnStyleIdentifier } from '.'; -import { getStyleValue, isShapeStyleUpdate, setStyle, updateFill, updateFont, updateStroke } from './utils'; -import { mxConstants } from '../initializer'; +import type { StyleUpdate } from '../../registry'; import type { BpmnGraph } from '../BpmnGraph'; -import { messageFlowIconId } from '../BpmnRenderer'; +import type { mxCell, mxGraphModel } from 'mxgraph'; + import { ensureIsArray } from '../../helpers/array-utils'; import { ensureOpacityValue } from '../../helpers/validators'; -import type { StyleUpdate } from '../../registry'; +import { messageFlowIconId } from '../BpmnRenderer'; +import { mxConstants } from '../initializer'; + +import { getStyleValue, isShapeStyleUpdate, setStyle, updateFill, updateFont, updateStroke } from './utils'; + +import { BpmnStyleIdentifier } from '.'; export function createNewStyleUpdater(graph: BpmnGraph): StyleUpdater { return new StyleUpdater(graph, new StyleManager(graph.getModel())); diff --git a/src/component/mxgraph/style/utils.ts b/src/component/mxgraph/style/utils.ts index 69e5115487..04242b2a0e 100644 --- a/src/component/mxgraph/style/utils.ts +++ b/src/component/mxgraph/style/utils.ts @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ensureOpacityValue, ensureStrokeWidthValue } from '../../helpers/validators'; import type { Fill, Font, ShapeStyleUpdate, Stroke, StyleUpdate, GradientDirection, FillColorGradient } from '../../registry'; + import { ShapeBpmnElementKind } from '../../../model/bpmn/internal'; +import { ensureOpacityValue, ensureStrokeWidthValue } from '../../helpers/validators'; import { mxConstants, mxUtils } from '../initializer'; + import { BpmnStyleIdentifier } from './identifiers'; /** diff --git a/src/component/parser/BpmnParser.ts b/src/component/parser/BpmnParser.ts index b6ae6b6982..8bdb32f5cd 100644 --- a/src/component/parser/BpmnParser.ts +++ b/src/component/parser/BpmnParser.ts @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type BpmnModel from '../../model/bpmn/internal/BpmnModel'; -import BpmnXmlParser from './xml/BpmnXmlParser'; import type BpmnJsonParser from './json/BpmnJsonParser'; +import type BpmnModel from '../../model/bpmn/internal/BpmnModel'; +import type { ParserOptions } from '../options'; + import { newBpmnJsonParser } from './json/BpmnJsonParser'; import { ParsingMessageCollector } from './parsing-messages'; -import type { ParserOptions } from '../options'; +import BpmnXmlParser from './xml/BpmnXmlParser'; /** * @internal diff --git a/src/component/parser/json/BpmnJsonParser.ts b/src/component/parser/json/BpmnJsonParser.ts index d7261e330b..d8474ea545 100644 --- a/src/component/parser/json/BpmnJsonParser.ts +++ b/src/component/parser/json/BpmnJsonParser.ts @@ -16,14 +16,15 @@ limitations under the License. import type BpmnModel from '../../../model/bpmn/internal/BpmnModel'; import type { BpmnJsonModel, TDefinitions } from '../../../model/bpmn/json/bpmn20'; +import type { ParsingMessageCollector } from '../parsing-messages'; + +import CategoryConverter from './converter/CategoryConverter'; import CollaborationConverter from './converter/CollaborationConverter'; -import ProcessConverter from './converter/ProcessConverter'; import DiagramConverter from './converter/DiagramConverter'; import EventDefinitionConverter from './converter/EventDefinitionConverter'; import GlobalTaskConverter from './converter/GlobalTaskConverter'; +import ProcessConverter from './converter/ProcessConverter'; import { ConvertedElements } from './converter/utils'; -import CategoryConverter from './converter/CategoryConverter'; -import type { ParsingMessageCollector } from '../parsing-messages'; /** * @internal diff --git a/src/component/parser/json/converter/CategoryConverter.ts b/src/component/parser/json/converter/CategoryConverter.ts index af77ff6922..7936fb3047 100644 --- a/src/component/parser/json/converter/CategoryConverter.ts +++ b/src/component/parser/json/converter/CategoryConverter.ts @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { TDefinitions } from '../../../../model/bpmn/json/bpmn20'; import type { ConvertedElements } from './utils'; -import { ensureIsArray } from '../../../helpers/array-utils'; import type { TCategory } from '../../../../model/bpmn/json/baseElement/rootElement/rootElement'; +import type { TDefinitions } from '../../../../model/bpmn/json/bpmn20'; + +import { ensureIsArray } from '../../../helpers/array-utils'; /** * @internal diff --git a/src/component/parser/json/converter/CollaborationConverter.ts b/src/component/parser/json/converter/CollaborationConverter.ts index d69da7cb01..8da1f986f0 100644 --- a/src/component/parser/json/converter/CollaborationConverter.ts +++ b/src/component/parser/json/converter/CollaborationConverter.ts @@ -14,18 +14,20 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ShapeBpmnElementKind } from '../../../../model/bpmn/internal'; -import ShapeBpmnElement from '../../../../model/bpmn/internal/shape/ShapeBpmnElement'; -import { MessageFlow } from '../../../../model/bpmn/internal/edge/flows'; -import type { TCollaboration } from '../../../../model/bpmn/json/baseElement/rootElement/collaboration'; -import type { TParticipant } from '../../../../model/bpmn/json/baseElement/participant'; -import type { TMessageFlow } from '../../../../model/bpmn/json/baseElement/baseElement'; -import { buildShapeBpmnGroup } from './utils'; import type { ConvertedElements } from './utils'; -import { ensureIsArray } from '../../../helpers/array-utils'; import type { TGroup } from '../../../../model/bpmn/json/baseElement/artifact'; +import type { TMessageFlow } from '../../../../model/bpmn/json/baseElement/baseElement'; +import type { TParticipant } from '../../../../model/bpmn/json/baseElement/participant'; +import type { TCollaboration } from '../../../../model/bpmn/json/baseElement/rootElement/collaboration'; import type { ParsingMessageCollector } from '../../parsing-messages'; +import { ShapeBpmnElementKind } from '../../../../model/bpmn/internal'; +import { MessageFlow } from '../../../../model/bpmn/internal/edge/flows'; +import ShapeBpmnElement from '../../../../model/bpmn/internal/shape/ShapeBpmnElement'; +import { ensureIsArray } from '../../../helpers/array-utils'; + +import { buildShapeBpmnGroup } from './utils'; + /** * @internal */ diff --git a/src/component/parser/json/converter/DiagramConverter.ts b/src/component/parser/json/converter/DiagramConverter.ts index e365bda0d8..9eaaa95507 100644 --- a/src/component/parser/json/converter/DiagramConverter.ts +++ b/src/component/parser/json/converter/DiagramConverter.ts @@ -14,20 +14,21 @@ See the License for the specific language governing permissions and limitations under the License. */ -import Shape from '../../../../model/bpmn/internal/shape/Shape'; -import Bounds from '../../../../model/bpmn/internal/Bounds'; -import type ShapeBpmnElement from '../../../../model/bpmn/internal/shape/ShapeBpmnElement'; -import { ShapeBpmnCallActivity, ShapeBpmnSubProcess } from '../../../../model/bpmn/internal/shape/ShapeBpmnElement'; -import { Edge, Waypoint } from '../../../../model/bpmn/internal/edge/edge'; +import type { ConvertedElements } from './utils'; import type { Shapes } from '../../../../model/bpmn/internal/BpmnModel'; import type BpmnModel from '../../../../model/bpmn/internal/BpmnModel'; -import Label, { Font } from '../../../../model/bpmn/internal/Label'; -import { MessageVisibleKind, ShapeBpmnCallActivityKind, ShapeBpmnMarkerKind, ShapeUtil } from '../../../../model/bpmn/internal'; +import type ShapeBpmnElement from '../../../../model/bpmn/internal/shape/ShapeBpmnElement'; import type { BPMNDiagram, BPMNEdge, BPMNLabel, BPMNLabelStyle, BPMNShape } from '../../../../model/bpmn/json/bpmndi'; import type { Point } from '../../../../model/bpmn/json/dc'; -import type { ConvertedElements } from './utils'; -import { ensureIsArray } from '../../../helpers/array-utils'; import type { ParsingMessageCollector } from '../../parsing-messages'; + +import { MessageVisibleKind, ShapeBpmnCallActivityKind, ShapeBpmnMarkerKind, ShapeUtil } from '../../../../model/bpmn/internal'; +import Bounds from '../../../../model/bpmn/internal/Bounds'; +import { Edge, Waypoint } from '../../../../model/bpmn/internal/edge/edge'; +import Label, { Font } from '../../../../model/bpmn/internal/Label'; +import Shape from '../../../../model/bpmn/internal/shape/Shape'; +import { ShapeBpmnCallActivity, ShapeBpmnSubProcess } from '../../../../model/bpmn/internal/shape/ShapeBpmnElement'; +import { ensureIsArray } from '../../../helpers/array-utils'; import { EdgeUnknownBpmnElementWarning, LabelStyleMissingFontWarning, ShapeUnknownBpmnElementWarning } from '../warnings'; /** diff --git a/src/component/parser/json/converter/EventDefinitionConverter.ts b/src/component/parser/json/converter/EventDefinitionConverter.ts index a78044b8eb..95e6a2cbcd 100644 --- a/src/component/parser/json/converter/EventDefinitionConverter.ts +++ b/src/component/parser/json/converter/EventDefinitionConverter.ts @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { ConvertedElements } from './utils'; +import type { TEventDefinition } from '../../../../model/bpmn/json/baseElement/rootElement/eventDefinition'; import type { TDefinitions } from '../../../../model/bpmn/json/bpmn20'; + import { eventDefinitionKinds } from '../../../../model/bpmn/internal/shape/utils'; -import type { TEventDefinition } from '../../../../model/bpmn/json/baseElement/rootElement/eventDefinition'; -import type { ConvertedElements } from './utils'; import { ensureIsArray } from '../../../helpers/array-utils'; type EventDefinitions = string | TEventDefinition | (string | TEventDefinition)[]; diff --git a/src/component/parser/json/converter/GlobalTaskConverter.ts b/src/component/parser/json/converter/GlobalTaskConverter.ts index 346b6b9ad5..3a8ef1f6f5 100644 --- a/src/component/parser/json/converter/GlobalTaskConverter.ts +++ b/src/component/parser/json/converter/GlobalTaskConverter.ts @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { TDefinitions } from '../../../../model/bpmn/json/bpmn20'; import type { ConvertedElements } from './utils'; -import type { TGlobalTask } from '../../../../model/bpmn/json/baseElement/rootElement/globalTask'; -import { ensureIsArray } from '../../../helpers/array-utils'; import type { GlobalTaskKind } from '../../../../model/bpmn/internal'; +import type { TGlobalTask } from '../../../../model/bpmn/json/baseElement/rootElement/globalTask'; +import type { TDefinitions } from '../../../../model/bpmn/json/bpmn20'; + import { ShapeBpmnElementKind } from '../../../../model/bpmn/internal'; +import { ensureIsArray } from '../../../helpers/array-utils'; /** * @internal diff --git a/src/component/parser/json/converter/ProcessConverter.ts b/src/component/parser/json/converter/ProcessConverter.ts index b76e399576..9e9a1a30f1 100644 --- a/src/component/parser/json/converter/ProcessConverter.ts +++ b/src/component/parser/json/converter/ProcessConverter.ts @@ -14,16 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -import ShapeBpmnElement, { - ShapeBpmnActivity, - ShapeBpmnBoundaryEvent, - ShapeBpmnCallActivity, - ShapeBpmnEvent, - ShapeBpmnEventBasedGateway, - ShapeBpmnStartEvent, - ShapeBpmnSubProcess, -} from '../../../../model/bpmn/internal/shape/ShapeBpmnElement'; +import type { ConvertedElements } from './utils'; import type { AssociationDirectionKind, BpmnEventKind } from '../../../../model/bpmn/internal'; +import type { TAssociation, TGroup, TTextAnnotation } from '../../../../model/bpmn/json/baseElement/artifact'; +import type { TLane, TLaneSet } from '../../../../model/bpmn/json/baseElement/baseElement'; +import type { TFlowNode, TSequenceFlow } from '../../../../model/bpmn/json/baseElement/flowElement'; +import type { TActivity, TCallActivity, TSubProcess } from '../../../../model/bpmn/json/baseElement/flowNode/activity/activity'; +import type { TReceiveTask } from '../../../../model/bpmn/json/baseElement/flowNode/activity/task'; +import type { TBoundaryEvent, TCatchEvent, TThrowEvent } from '../../../../model/bpmn/json/baseElement/flowNode/event'; +import type { TEventBasedGateway } from '../../../../model/bpmn/json/baseElement/flowNode/gateway'; +import type { TProcess } from '../../../../model/bpmn/json/baseElement/rootElement/rootElement'; +import type { ParsingMessageCollector } from '../../parsing-messages'; + import { SequenceFlowKind, ShapeBpmnCallActivityKind, @@ -34,22 +36,22 @@ import { ShapeBpmnSubProcessKind, ShapeUtil, } from '../../../../model/bpmn/internal'; -import { eventDefinitionKinds } from '../../../../model/bpmn/internal/shape/utils'; import { AssociationFlow, SequenceFlow } from '../../../../model/bpmn/internal/edge/flows'; -import type { TProcess } from '../../../../model/bpmn/json/baseElement/rootElement/rootElement'; -import type { TBoundaryEvent, TCatchEvent, TThrowEvent } from '../../../../model/bpmn/json/baseElement/flowNode/event'; -import type { TActivity, TCallActivity, TSubProcess } from '../../../../model/bpmn/json/baseElement/flowNode/activity/activity'; -import type { TLane, TLaneSet } from '../../../../model/bpmn/json/baseElement/baseElement'; -import type { TFlowNode, TSequenceFlow } from '../../../../model/bpmn/json/baseElement/flowElement'; -import type { TAssociation, TGroup, TTextAnnotation } from '../../../../model/bpmn/json/baseElement/artifact'; -import type { ConvertedElements } from './utils'; -import { buildShapeBpmnGroup } from './utils'; -import type { TEventBasedGateway } from '../../../../model/bpmn/json/baseElement/flowNode/gateway'; -import type { TReceiveTask } from '../../../../model/bpmn/json/baseElement/flowNode/activity/task'; +import ShapeBpmnElement, { + ShapeBpmnActivity, + ShapeBpmnBoundaryEvent, + ShapeBpmnCallActivity, + ShapeBpmnEvent, + ShapeBpmnEventBasedGateway, + ShapeBpmnStartEvent, + ShapeBpmnSubProcess, +} from '../../../../model/bpmn/internal/shape/ShapeBpmnElement'; +import { eventDefinitionKinds } from '../../../../model/bpmn/internal/shape/utils'; import { ensureIsArray } from '../../../helpers/array-utils'; -import type { ParsingMessageCollector } from '../../parsing-messages'; import { BoundaryEventNotAttachedToActivityWarning, LaneUnknownFlowNodeRefWarning } from '../warnings'; +import { buildShapeBpmnGroup } from './utils'; + interface EventDefinition { kind: ShapeBpmnEventDefinitionKind; counter: number; diff --git a/src/component/parser/json/converter/utils.ts b/src/component/parser/json/converter/utils.ts index f9a89b03e2..34dc56f6d4 100644 --- a/src/component/parser/json/converter/utils.ts +++ b/src/component/parser/json/converter/utils.ts @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -import ShapeBpmnElement from '../../../../model/bpmn/internal/shape/ShapeBpmnElement'; -import type { Flow, AssociationFlow, MessageFlow, SequenceFlow } from '../../../../model/bpmn/internal/edge/flows'; import type { GlobalTaskKind, ShapeBpmnEventDefinitionKind } from '../../../../model/bpmn/internal'; -import { ShapeBpmnElementKind } from '../../../../model/bpmn/internal'; +import type { Flow, AssociationFlow, MessageFlow, SequenceFlow } from '../../../../model/bpmn/internal/edge/flows'; import type { TGroup } from '../../../../model/bpmn/json/baseElement/artifact'; import type { ParsingMessageCollector } from '../../parsing-messages'; + +import { ShapeBpmnElementKind } from '../../../../model/bpmn/internal'; +import ShapeBpmnElement from '../../../../model/bpmn/internal/shape/ShapeBpmnElement'; import { GroupUnknownCategoryValueWarning } from '../warnings'; /** diff --git a/src/component/parser/json/warnings.ts b/src/component/parser/json/warnings.ts index 6a874f684b..540534a2fc 100644 --- a/src/component/parser/json/warnings.ts +++ b/src/component/parser/json/warnings.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { ShapeBpmnElementKind } from '../../../model/bpmn/internal'; import type { MessageDetails } from '../parsing-messages'; + import { JsonParsingWarning } from '../parsing-messages'; -import type { ShapeBpmnElementKind } from '../../../model/bpmn/internal'; export class GroupUnknownCategoryValueWarning extends JsonParsingWarning { constructor( diff --git a/src/component/parser/xml/BpmnXmlParser.ts b/src/component/parser/xml/BpmnXmlParser.ts index c29b6eb1f2..d3cb0f5249 100644 --- a/src/component/parser/xml/BpmnXmlParser.ts +++ b/src/component/parser/xml/BpmnXmlParser.ts @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { XMLParser, type X2jOptions } from 'fast-xml-parser'; import type { BpmnJsonModel } from '../../../model/bpmn/json/bpmn20'; import type { ParserOptions } from '../../options'; +import { XMLParser, type X2jOptions } from 'fast-xml-parser'; + type Replacement = { regex: RegExp; val: string; diff --git a/src/component/registry/bpmn-elements-registry.ts b/src/component/registry/bpmn-elements-registry.ts index 068c4c4c23..5e6de9a80e 100644 --- a/src/component/registry/bpmn-elements-registry.ts +++ b/src/component/registry/bpmn-elements-registry.ts @@ -14,16 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ensureIsArray } from '../helpers/array-utils'; +import type { BpmnModelRegistry } from './bpmn-model-registry'; +import type { BpmnElement, BpmnSemantic, CssClassesRegistry, ElementsRegistry, Overlay, OverlaysRegistry, StyleRegistry, StyleUpdate } from './types'; +import type { BpmnElementKind } from '../../model/bpmn/internal'; import type { BpmnGraph } from '../mxgraph/BpmnGraph'; + +import { ensureIsArray } from '../helpers/array-utils'; import { computeBpmnBaseClassName } from '../mxgraph/renderer/style-utils'; -import type { BpmnModelRegistry } from './bpmn-model-registry'; + import { createNewCssRegistry, type CssClassesRegistryImpl } from './css-registry'; import { createNewOverlaysRegistry } from './overlays-registry'; import { BpmnQuerySelectors } from './query-selectors'; import { createNewStyleRegistry, type StyleRegistryImpl } from './style-registry'; -import type { BpmnElement, BpmnSemantic, CssClassesRegistry, ElementsRegistry, Overlay, OverlaysRegistry, StyleRegistry, StyleUpdate } from './types'; -import type { BpmnElementKind } from '../../model/bpmn/internal'; /** * @internal diff --git a/src/component/registry/bpmn-model-filters.ts b/src/component/registry/bpmn-model-filters.ts index e9c8295c2d..dc8ee58e05 100644 --- a/src/component/registry/bpmn-model-filters.ts +++ b/src/component/registry/bpmn-model-filters.ts @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type BpmnModel from '../../model/bpmn/internal/BpmnModel'; import type { Edge } from '../../model/bpmn/internal/edge/edge'; import type Shape from '../../model/bpmn/internal/shape/Shape'; -import type BpmnModel from '../../model/bpmn/internal/BpmnModel'; import type { ModelFilter } from '../options'; + import { ensureIsArray } from '../helpers/array-utils'; /** diff --git a/src/component/registry/bpmn-model-registry.ts b/src/component/registry/bpmn-model-registry.ts index 3fea669fc1..eb9aa26ab9 100644 --- a/src/component/registry/bpmn-model-registry.ts +++ b/src/component/registry/bpmn-model-registry.ts @@ -14,15 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { BaseBpmnSemantic, BpmnSemantic, EdgeBpmnSemantic, ShapeBpmnSemantic } from './types'; import type BpmnModel from '../../model/bpmn/internal/BpmnModel'; -import type Shape from '../../model/bpmn/internal/shape/Shape'; import type { Edge } from '../../model/bpmn/internal/edge/edge'; -import { Flow } from '../../model/bpmn/internal/edge/flows'; -import type { BaseBpmnSemantic, BpmnSemantic, EdgeBpmnSemantic, ShapeBpmnSemantic } from './types'; -import { ShapeBpmnMarkerKind, ShapeUtil } from '../../model/bpmn/internal'; +import type Shape from '../../model/bpmn/internal/shape/Shape'; import type { ShapeBpmnSubProcess } from '../../model/bpmn/internal/shape/ShapeBpmnElement'; -import ShapeBpmnElement from '../../model/bpmn/internal/shape/ShapeBpmnElement'; import type { ModelFilter } from '../options'; + +import { ShapeBpmnMarkerKind, ShapeUtil } from '../../model/bpmn/internal'; +import { Flow } from '../../model/bpmn/internal/edge/flows'; +import ShapeBpmnElement from '../../model/bpmn/internal/shape/ShapeBpmnElement'; + import { ModelFiltering } from './bpmn-model-filters'; /** diff --git a/src/component/registry/css-registry.ts b/src/component/registry/css-registry.ts index 785c141739..8dc6c91c2b 100644 --- a/src/component/registry/css-registry.ts +++ b/src/component/registry/css-registry.ts @@ -15,8 +15,9 @@ limitations under the License. */ import type { CssClassesRegistry } from './types'; -import { ensureIsArray } from '../helpers/array-utils'; import type { BpmnGraph } from '../mxgraph/BpmnGraph'; + +import { ensureIsArray } from '../helpers/array-utils'; import { createNewCssClassesUpdater, type CssClassesUpdater } from '../mxgraph/style/css-classes-updater'; export function createNewCssRegistry(graph: BpmnGraph): CssClassesRegistryImpl { diff --git a/src/component/registry/overlays-registry.ts b/src/component/registry/overlays-registry.ts index 0b311e69e0..e7c9e7d076 100644 --- a/src/component/registry/overlays-registry.ts +++ b/src/component/registry/overlays-registry.ts @@ -15,9 +15,10 @@ limitations under the License. */ import type { Overlay, OverlaysRegistry } from './types'; -import { createNewOverlaysUpdater, type OverlaysUpdater } from '../mxgraph/overlay/updater'; import type { BpmnGraph } from '../mxgraph/BpmnGraph'; +import { createNewOverlaysUpdater, type OverlaysUpdater } from '../mxgraph/overlay/updater'; + export function createNewOverlaysRegistry(graph: BpmnGraph): OverlaysRegistry { return new OverlaysRegistryImpl(createNewOverlaysUpdater(graph)); } diff --git a/src/component/registry/style-registry.ts b/src/component/registry/style-registry.ts index 57d0169cd4..e305521a8d 100644 --- a/src/component/registry/style-registry.ts +++ b/src/component/registry/style-registry.ts @@ -16,6 +16,7 @@ limitations under the License. import type { StyleRegistry, StyleUpdate } from './types'; import type { BpmnGraph } from '../mxgraph/BpmnGraph'; + import { createNewStyleUpdater, type StyleUpdater } from '../mxgraph/style/style-updater'; export function createNewStyleRegistry(graph: BpmnGraph): StyleRegistryImpl { diff --git a/src/model/bpmn/internal/BpmnModel.ts b/src/model/bpmn/internal/BpmnModel.ts index 7fe71fd414..2dabd7d475 100644 --- a/src/model/bpmn/internal/BpmnModel.ts +++ b/src/model/bpmn/internal/BpmnModel.ts @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type Shape from './shape/Shape'; import type { Edge } from './edge/edge'; +import type Shape from './shape/Shape'; /** * @internal diff --git a/src/model/bpmn/internal/edge/edge.ts b/src/model/bpmn/internal/edge/edge.ts index 3285d53a83..a8aa4b2816 100644 --- a/src/model/bpmn/internal/edge/edge.ts +++ b/src/model/bpmn/internal/edge/edge.ts @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type Label from '../Label'; import type { Flow } from './flows'; -import { MessageVisibleKind } from './kinds'; +import type Label from '../Label'; import type { EdgeExtensions } from '../types'; +import { MessageVisibleKind } from './kinds'; + /** * @internal */ diff --git a/src/model/bpmn/internal/shape/ShapeBpmnElement.ts b/src/model/bpmn/internal/shape/ShapeBpmnElement.ts index efd35c33bc..5174d1a097 100644 --- a/src/model/bpmn/internal/shape/ShapeBpmnElement.ts +++ b/src/model/bpmn/internal/shape/ShapeBpmnElement.ts @@ -15,6 +15,7 @@ limitations under the License. */ import type { BpmnEventKind, GlobalTaskKind, ShapeBpmnCallActivityKind, ShapeBpmnEventDefinitionKind } from './kinds'; + import { ShapeBpmnElementKind, ShapeBpmnEventBasedGatewayKind, ShapeBpmnSubProcessKind, ShapeBpmnMarkerKind } from './kinds'; /** diff --git a/src/model/bpmn/internal/shape/utils.ts b/src/model/bpmn/internal/shape/utils.ts index ed8d9a63c3..673bbc63ef 100644 --- a/src/model/bpmn/internal/shape/utils.ts +++ b/src/model/bpmn/internal/shape/utils.ts @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ShapeBpmnElementKind, ShapeBpmnEventDefinitionKind } from './kinds'; import type { FilterParameter } from '../../../../component/helpers/array-utils'; + import { filter } from '../../../../component/helpers/array-utils'; +import { ShapeBpmnElementKind, ShapeBpmnEventDefinitionKind } from './kinds'; + /** * Utils to simplify the management of {@link ShapeBpmnElementKind}. * diff --git a/src/model/bpmn/json/baseElement/baseElement.ts b/src/model/bpmn/json/baseElement/baseElement.ts index 8fb5bc9c39..dfaab799a0 100644 --- a/src/model/bpmn/json/baseElement/baseElement.ts +++ b/src/model/bpmn/json/baseElement/baseElement.ts @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { TImplicitThrowEvent } from './flowNode/event'; -import type { TDocumentation, TExtensionElements } from '../Semantic'; import type { TDataState } from './data'; import type { TExpression, TFormalExpression } from './expression'; +import type { TImplicitThrowEvent } from './flowNode/event'; +import type { TDocumentation, TExtensionElements } from '../Semantic'; // abstract="true" // diff --git a/src/model/bpmn/json/baseElement/correlation.ts b/src/model/bpmn/json/baseElement/correlation.ts index 2e31c10f75..8001209648 100644 --- a/src/model/bpmn/json/baseElement/correlation.ts +++ b/src/model/bpmn/json/baseElement/correlation.ts @@ -15,8 +15,8 @@ limitations under the License. */ import type { TBaseElement } from './baseElement'; -import type { TRootElement } from './rootElement/rootElement'; import type { TFormalExpression } from './expression'; +import type { TRootElement } from './rootElement/rootElement'; export interface TCorrelationProperty extends TRootElement { correlationPropertyRetrievalExpression: TCorrelationPropertyRetrievalExpression | TCorrelationPropertyRetrievalExpression[]; diff --git a/src/model/bpmn/json/baseElement/data.ts b/src/model/bpmn/json/baseElement/data.ts index dcef62d522..e4ab8477e1 100644 --- a/src/model/bpmn/json/baseElement/data.ts +++ b/src/model/bpmn/json/baseElement/data.ts @@ -15,9 +15,9 @@ limitations under the License. */ import type { TAssignment, TBaseElement } from './baseElement'; -import type { TRootElement } from './rootElement/rootElement'; import type { TFormalExpression } from './expression'; import type { TFlowElement } from './flowElement'; +import type { TRootElement } from './rootElement/rootElement'; export type TDataInputAssociation = TDataAssociation; diff --git a/src/model/bpmn/json/baseElement/flowElement.ts b/src/model/bpmn/json/baseElement/flowElement.ts index 29a8b75559..59d332457a 100644 --- a/src/model/bpmn/json/baseElement/flowElement.ts +++ b/src/model/bpmn/json/baseElement/flowElement.ts @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { TExpression } from './expression'; import type { TAuditing, TBaseElement, TMonitoring } from './baseElement'; +import type { TExpression } from './expression'; export interface TFlowElement extends TBaseElement { auditing?: TAuditing; diff --git a/src/model/bpmn/json/baseElement/flowNode/activity/activity.ts b/src/model/bpmn/json/baseElement/flowNode/activity/activity.ts index adcf482a33..f50be0c7dc 100644 --- a/src/model/bpmn/json/baseElement/flowNode/activity/activity.ts +++ b/src/model/bpmn/json/baseElement/flowNode/activity/activity.ts @@ -14,18 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { TInputOutputSpecification } from '../../input-output'; +import type { TBusinessRuleTask, TManualTask, TReceiveTask, TScriptTask, TSendTask, TServiceTask, TTask, TUserTask } from './task'; +import type { TArtifact, TAssociation, TGroup, TTextAnnotation } from '../../artifact'; import type { TLaneSet, TProperty } from '../../baseElement'; import type { TDataInputAssociation, TDataObject, TDataObjectReference, TDataOutputAssociation, TDataStoreReference } from '../../data'; -import type { THumanPerformer, TPerformer, TPotentialOwner, TResourceRole } from '../../resource'; -import type { TLoopCharacteristics, TMultiInstanceLoopCharacteristics, TStandardLoopCharacteristics } from '../../loopCharacteristics'; import type { TExpression } from '../../expression'; -import type { TArtifact, TAssociation, TGroup, TTextAnnotation } from '../../artifact'; import type { TFlowElement, TFlowNode, TSequenceFlow } from '../../flowElement'; +import type { TInputOutputSpecification } from '../../input-output'; +import type { TLoopCharacteristics, TMultiInstanceLoopCharacteristics, TStandardLoopCharacteristics } from '../../loopCharacteristics'; +import type { THumanPerformer, TPerformer, TPotentialOwner, TResourceRole } from '../../resource'; import type { TCallChoreography, TChoreographyTask, TSubChoreography } from '../choreographyActivity'; import type { TBoundaryEvent, TEndEvent, TEvent, TImplicitThrowEvent, TIntermediateCatchEvent, TIntermediateThrowEvent, TStartEvent } from '../event'; import type { TComplexGateway, TEventBasedGateway, TExclusiveGateway, TInclusiveGateway, TParallelGateway } from '../gateway'; -import type { TBusinessRuleTask, TManualTask, TReceiveTask, TScriptTask, TSendTask, TServiceTask, TTask, TUserTask } from './task'; // abstract="true" export interface TActivity extends TFlowNode { diff --git a/src/model/bpmn/json/baseElement/flowNode/activity/task.ts b/src/model/bpmn/json/baseElement/flowNode/activity/task.ts index 6e2228536a..1804573e58 100644 --- a/src/model/bpmn/json/baseElement/flowNode/activity/task.ts +++ b/src/model/bpmn/json/baseElement/flowNode/activity/task.ts @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { TScript } from '../../../Semantic'; import type { TActivity } from './activity'; -import type { tImplementation } from '../../rootElement/globalTask'; +import type { TScript } from '../../../Semantic'; import type { TRendering } from '../../baseElement'; +import type { tImplementation } from '../../rootElement/globalTask'; export type TTask = TActivity; diff --git a/src/model/bpmn/json/baseElement/flowNode/choreographyActivity.ts b/src/model/bpmn/json/baseElement/flowNode/choreographyActivity.ts index 46c367fbc9..6889f6a113 100644 --- a/src/model/bpmn/json/baseElement/flowNode/choreographyActivity.ts +++ b/src/model/bpmn/json/baseElement/flowNode/choreographyActivity.ts @@ -14,15 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { TCorrelationKey } from '../correlation'; -import type { TParticipantAssociation } from '../participant'; -import type { TArtifact, TAssociation, TGroup, TTextAnnotation } from '../artifact'; -import type { TFlowElement, TFlowNode, TSequenceFlow } from '../flowElement'; import type { TAdHocSubProcess, TCallActivity, TSubProcess, TTransaction } from './activity/activity'; -import type { TDataObject, TDataObjectReference, TDataStoreReference } from '../data'; +import type { TBusinessRuleTask, TManualTask, TReceiveTask, TScriptTask, TSendTask, TServiceTask, TTask, TUserTask } from './activity/task'; import type { TBoundaryEvent, TEndEvent, TEvent, TImplicitThrowEvent, TIntermediateCatchEvent, TIntermediateThrowEvent, TStartEvent } from './event'; import type { TComplexGateway, TEventBasedGateway, TExclusiveGateway, TInclusiveGateway, TParallelGateway } from './gateway'; -import type { TBusinessRuleTask, TManualTask, TReceiveTask, TScriptTask, TSendTask, TServiceTask, TTask, TUserTask } from './activity/task'; +import type { TArtifact, TAssociation, TGroup, TTextAnnotation } from '../artifact'; +import type { TCorrelationKey } from '../correlation'; +import type { TDataObject, TDataObjectReference, TDataStoreReference } from '../data'; +import type { TFlowElement, TFlowNode, TSequenceFlow } from '../flowElement'; +import type { TParticipantAssociation } from '../participant'; // abstract="true" export interface TChoreographyActivity extends TFlowNode { diff --git a/src/model/bpmn/json/baseElement/flowNode/event.ts b/src/model/bpmn/json/baseElement/flowNode/event.ts index 0f645e0429..ad2c21927c 100644 --- a/src/model/bpmn/json/baseElement/flowNode/event.ts +++ b/src/model/bpmn/json/baseElement/flowNode/event.ts @@ -16,6 +16,7 @@ limitations under the License. import type { TProperty } from '../baseElement'; import type { TDataInput, TDataInputAssociation, TDataOutput, TDataOutputAssociation } from '../data'; +import type { TFlowNode } from '../flowElement'; import type { TInputSet, TOutputSet } from '../input-output'; import type { TCancelEventDefinition, @@ -30,7 +31,6 @@ import type { TTerminateEventDefinition, TTimerEventDefinition, } from '../rootElement/eventDefinition'; -import type { TFlowNode } from '../flowElement'; // abstract="true" export interface TEvent extends TFlowNode { diff --git a/src/model/bpmn/json/baseElement/loopCharacteristics.ts b/src/model/bpmn/json/baseElement/loopCharacteristics.ts index 5b8ab0a54e..e38452f1c0 100644 --- a/src/model/bpmn/json/baseElement/loopCharacteristics.ts +++ b/src/model/bpmn/json/baseElement/loopCharacteristics.ts @@ -14,9 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { TExpression } from './expression'; -import type { TDataInput, TDataOutput } from './data'; import type { TBaseElement, TComplexBehaviorDefinition } from './baseElement'; +import type { TDataInput, TDataOutput } from './data'; +import type { TExpression } from './expression'; // abstract="true" export type TLoopCharacteristics = TBaseElement; diff --git a/src/model/bpmn/json/baseElement/rootElement/collaboration.ts b/src/model/bpmn/json/baseElement/rootElement/collaboration.ts index db84677042..e13c970200 100644 --- a/src/model/bpmn/json/baseElement/rootElement/collaboration.ts +++ b/src/model/bpmn/json/baseElement/rootElement/collaboration.ts @@ -15,18 +15,18 @@ limitations under the License. */ import type { TRootElement } from './rootElement'; -import type { TCallConversation, TConversation, TConversationAssociation, TConversationLink, TConversationNode, TSubConversation } from '../conversation'; -import type { TMessageFlow, TMessageFlowAssociation } from '../baseElement'; -import type { TParticipant, TParticipantAssociation } from '../participant'; import type { TArtifact, TAssociation, TGroup, TTextAnnotation } from '../artifact'; +import type { TMessageFlow, TMessageFlowAssociation } from '../baseElement'; +import type { TCallConversation, TConversation, TConversationAssociation, TConversationLink, TConversationNode, TSubConversation } from '../conversation'; import type { TCorrelationKey } from '../correlation'; +import type { TDataObject, TDataObjectReference, TDataStoreReference } from '../data'; import type { TFlowElement, TSequenceFlow } from '../flowElement'; -import type { TCallChoreography, TChoreographyTask, TSubChoreography } from '../flowNode/choreographyActivity'; import type { TAdHocSubProcess, TCallActivity, TSubProcess, TTransaction } from '../flowNode/activity/activity'; -import type { TDataObject, TDataObjectReference, TDataStoreReference } from '../data'; +import type { TBusinessRuleTask, TManualTask, TReceiveTask, TScriptTask, TSendTask, TServiceTask, TTask, TUserTask } from '../flowNode/activity/task'; +import type { TCallChoreography, TChoreographyTask, TSubChoreography } from '../flowNode/choreographyActivity'; import type { TBoundaryEvent, TEndEvent, TEvent, TImplicitThrowEvent, TIntermediateCatchEvent, TIntermediateThrowEvent, TStartEvent } from '../flowNode/event'; import type { TComplexGateway, TEventBasedGateway, TExclusiveGateway, TInclusiveGateway, TParallelGateway } from '../flowNode/gateway'; -import type { TBusinessRuleTask, TManualTask, TReceiveTask, TScriptTask, TSendTask, TServiceTask, TTask, TUserTask } from '../flowNode/activity/task'; +import type { TParticipant, TParticipantAssociation } from '../participant'; export interface TCollaboration extends TRootElement { participant?: TParticipant | TParticipant[]; diff --git a/src/model/bpmn/json/baseElement/rootElement/globalTask.ts b/src/model/bpmn/json/baseElement/rootElement/globalTask.ts index 64c9055eb1..c0e7ff8524 100644 --- a/src/model/bpmn/json/baseElement/rootElement/globalTask.ts +++ b/src/model/bpmn/json/baseElement/rootElement/globalTask.ts @@ -15,9 +15,9 @@ limitations under the License. */ import type { TCallableElement } from './rootElement'; -import type { THumanPerformer, TPerformer, TPotentialOwner, TResourceRole } from '../resource'; import type { TScript } from '../../Semantic'; import type { TRendering } from '../baseElement'; +import type { THumanPerformer, TPerformer, TPotentialOwner, TResourceRole } from '../resource'; export interface TGlobalTask extends TCallableElement { // resourceRole diff --git a/src/model/bpmn/json/baseElement/rootElement/rootElement.ts b/src/model/bpmn/json/baseElement/rootElement/rootElement.ts index 0ceac0a1cb..086de5eccb 100644 --- a/src/model/bpmn/json/baseElement/rootElement/rootElement.ts +++ b/src/model/bpmn/json/baseElement/rootElement/rootElement.ts @@ -14,18 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { TInputOutputBinding, TInputOutputSpecification } from '../input-output'; +import type { TArtifact, TAssociation, TGroup, TTextAnnotation } from '../artifact'; import type { TAuditing, TBaseElement, TCategoryValue, TLaneSet, TMonitoring, TOperation, TProperty } from '../baseElement'; -import type { THumanPerformer, TPerformer, TPotentialOwner, TResourceParameter, TResourceRole } from '../resource'; import type { TCorrelationSubscription } from '../correlation'; -import type { TArtifact, TAssociation, TGroup, TTextAnnotation } from '../artifact'; +import type { TDataObject, TDataObjectReference, TDataStoreReference } from '../data'; import type { TFlowElement, TSequenceFlow } from '../flowElement'; -import type { TBoundaryEvent, TEndEvent, TEvent, TImplicitThrowEvent, TIntermediateCatchEvent, TIntermediateThrowEvent, TStartEvent } from '../flowNode/event'; -import type { TCallChoreography, TChoreographyTask, TSubChoreography } from '../flowNode/choreographyActivity'; import type { TAdHocSubProcess, TCallActivity, TSubProcess, TTransaction } from '../flowNode/activity/activity'; -import type { TComplexGateway, TEventBasedGateway, TExclusiveGateway, TInclusiveGateway, TParallelGateway } from '../flowNode/gateway'; -import type { TDataObject, TDataObjectReference, TDataStoreReference } from '../data'; import type { TBusinessRuleTask, TManualTask, TReceiveTask, TScriptTask, TSendTask, TServiceTask, TTask, TUserTask } from '../flowNode/activity/task'; +import type { TCallChoreography, TChoreographyTask, TSubChoreography } from '../flowNode/choreographyActivity'; +import type { TBoundaryEvent, TEndEvent, TEvent, TImplicitThrowEvent, TIntermediateCatchEvent, TIntermediateThrowEvent, TStartEvent } from '../flowNode/event'; +import type { TComplexGateway, TEventBasedGateway, TExclusiveGateway, TInclusiveGateway, TParallelGateway } from '../flowNode/gateway'; +import type { TInputOutputBinding, TInputOutputSpecification } from '../input-output'; +import type { THumanPerformer, TPerformer, TPotentialOwner, TResourceParameter, TResourceRole } from '../resource'; // abstract="true" export type TRootElement = TBaseElement; diff --git a/src/model/bpmn/json/bpmn20.ts b/src/model/bpmn/json/bpmn20.ts index bf16bffab8..b7aadfa318 100644 --- a/src/model/bpmn/json/bpmn20.ts +++ b/src/model/bpmn/json/bpmn20.ts @@ -14,12 +14,24 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { BPMNDiagram } from './bpmndi'; import type { TRelationship } from './baseElement/baseElement'; -import type { TExtension } from './Semantic'; -import type { TGlobalBusinessRuleTask, TGlobalManualTask, TGlobalScriptTask, TGlobalTask, TGlobalUserTask } from './baseElement/rootElement/globalTask'; import type { TCorrelationProperty } from './baseElement/correlation'; import type { TDataStore } from './baseElement/data'; +import type { TChoreography, TCollaboration, TGlobalChoreographyTask, TGlobalConversation } from './baseElement/rootElement/collaboration'; +import type { + TCancelEventDefinition, + TCompensateEventDefinition, + TConditionalEventDefinition, + TErrorEventDefinition, + TEscalationEventDefinition, + TEventDefinition, + TLinkEventDefinition, + TMessageEventDefinition, + TSignalEventDefinition, + TTerminateEventDefinition, + TTimerEventDefinition, +} from './baseElement/rootElement/eventDefinition'; +import type { TGlobalBusinessRuleTask, TGlobalManualTask, TGlobalScriptTask, TGlobalTask, TGlobalUserTask } from './baseElement/rootElement/globalTask'; import type { TCategory, TEndPoint, @@ -35,20 +47,8 @@ import type { TRootElement, TSignal, } from './baseElement/rootElement/rootElement'; -import type { TChoreography, TCollaboration, TGlobalChoreographyTask, TGlobalConversation } from './baseElement/rootElement/collaboration'; -import type { - TCancelEventDefinition, - TCompensateEventDefinition, - TConditionalEventDefinition, - TErrorEventDefinition, - TEscalationEventDefinition, - TEventDefinition, - TLinkEventDefinition, - TMessageEventDefinition, - TSignalEventDefinition, - TTerminateEventDefinition, - TTimerEventDefinition, -} from './baseElement/rootElement/eventDefinition'; +import type { BPMNDiagram } from './bpmndi'; +import type { TExtension } from './Semantic'; export interface BpmnJsonModel { definitions: TDefinitions; diff --git a/src/model/bpmn/json/bpmndi.ts b/src/model/bpmn/json/bpmndi.ts index 083f444470..803855e85d 100644 --- a/src/model/bpmn/json/bpmndi.ts +++ b/src/model/bpmn/json/bpmndi.ts @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { Diagram, Label, LabeledEdge, LabeledShape, Plane, Style } from './di'; import type { Font } from './dc'; +import type { Diagram, Label, LabeledEdge, LabeledShape, Plane, Style } from './di'; export interface BPMNDiagram extends Diagram { BPMNPlane: BPMNPlane; diff --git a/src/model/bpmn/json/di.ts b/src/model/bpmn/json/di.ts index 2345a15e7b..561f316f84 100644 --- a/src/model/bpmn/json/di.ts +++ b/src/model/bpmn/json/di.ts @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { Bounds, Point } from './dc'; import type { BPMNEdge, BPMNLabel, BPMNShape } from './bpmndi'; +import type { Bounds, Point } from './dc'; import type { TExtension } from './Semantic'; // diff --git a/test/bundles/bundles.test.ts b/test/bundles/bundles.test.ts index 6f39ca67ca..c3abaaab8d 100644 --- a/test/bundles/bundles.test.ts +++ b/test/bundles/bundles.test.ts @@ -15,9 +15,11 @@ limitations under the License. */ import 'jest-playwright-preset'; -import { resolve } from 'node:path'; -import type { Page } from 'playwright'; import type { TargetedPageConfiguration } from '@test/shared/visu/bpmn-page-utils'; +import type { Page } from 'playwright'; + +import { resolve } from 'node:path'; + import { BpmnPageSvgTester } from '@test/shared/visu/bpmn-page-utils'; describe('bundles', () => { diff --git a/test/config/jest-playwright.cjs b/test/config/jest-playwright.cjs index 2db6a1ddd1..7f8e937e16 100644 --- a/test/config/jest-playwright.cjs +++ b/test/config/jest-playwright.cjs @@ -14,10 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -const { isRunningOnCISlowOS, isRunningOnCi } = require('../shared/environment-utils.cjs'); - const log = require('debug')('bv:test:config:pw'); +const { isRunningOnCISlowOS, isRunningOnCi } = require('../shared/environment-utils.cjs'); + const computeBrowsersAndChannelConfiguration = defaultBrowsers => { log('Default browsers list', defaultBrowsers); const rawBrowsers = (process.env.BROWSERS || defaultBrowsers).split(','); diff --git a/test/config/jest.image.ts b/test/config/jest.image.ts index b78d428550..d8055b18db 100644 --- a/test/config/jest.image.ts +++ b/test/config/jest.image.ts @@ -14,11 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -import debugLogger from 'debug'; import type { MatchImageSnapshotOptions } from 'jest-image-snapshot'; -import { toMatchImageSnapshot } from 'jest-image-snapshot'; -import { addAttach } from 'jest-html-reporters/helper'; + import { copyFileSync } from 'node:fs'; + +import debugLogger from 'debug'; +import { addAttach } from 'jest-html-reporters/helper'; +import { toMatchImageSnapshot } from 'jest-image-snapshot'; + import MatcherContext = jest.MatcherContext; import CustomMatcherResult = jest.CustomMatcherResult; diff --git a/test/config/ts-jest.cjs b/test/config/ts-jest.cjs index 335cc484d2..b7426df7eb 100644 --- a/test/config/ts-jest.cjs +++ b/test/config/ts-jest.cjs @@ -15,10 +15,12 @@ limitations under the License. */ // Inspired from https://kulshekhar.github.io/ts-jest/docs/getting-started/paths-mapping/ +const fs = require('fs'); + +const JSON5 = require('json5'); const { pathsToModuleNameMapper } = require('ts-jest'); // Cannot use const { compilerOptions } = require('../../tsconfig.test.json'); // parsing fails as the file contains comment, so use the following hack taken from https://stackoverflow.com/questions/61996234/requiring-a-json-with-comments-in-node-js -const fs = require('fs'); let jsonTxt; try { @@ -30,8 +32,6 @@ try { jsonTxt = fs.readFileSync('../../tsconfig.test.json', 'utf8'); } -const JSON5 = require('json5'); - const tsconfig = JSON5.parse(jsonTxt); const compilerOptions = tsconfig.compilerOptions; diff --git a/test/e2e/bpmn.colors.test.ts b/test/e2e/bpmn.colors.test.ts index b25053f425..9bd3909889 100644 --- a/test/e2e/bpmn.colors.test.ts +++ b/test/e2e/bpmn.colors.test.ts @@ -15,7 +15,9 @@ limitations under the License. */ import type { ImageSnapshotThresholdConfig } from './helpers/visu/image-snapshot-config'; + import { ImageSnapshotConfigurator, MultiBrowserImageSnapshotThresholds } from './helpers/visu/image-snapshot-config'; + import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; import { getBpmnDiagramNames } from '@test/shared/visu/test-utils'; diff --git a/test/e2e/bpmn.elements.collapsed.test.ts b/test/e2e/bpmn.elements.collapsed.test.ts index 0e7beb37f4..a8406d4614 100644 --- a/test/e2e/bpmn.elements.collapsed.test.ts +++ b/test/e2e/bpmn.elements.collapsed.test.ts @@ -15,7 +15,9 @@ limitations under the License. */ import type { MatchImageSnapshotOptions } from 'jest-image-snapshot'; + import { ImageSnapshotConfigurator, MultiBrowserImageSnapshotThresholds } from './helpers/visu/image-snapshot-config'; + import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; import { getBpmnDiagramNames } from '@test/shared/visu/test-utils'; diff --git a/test/e2e/bpmn.elements.filter.pools.test.ts b/test/e2e/bpmn.elements.filter.pools.test.ts index e1b6664e00..c4a7333107 100644 --- a/test/e2e/bpmn.elements.filter.pools.test.ts +++ b/test/e2e/bpmn.elements.filter.pools.test.ts @@ -14,9 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { MatchImageSnapshotOptions } from 'jest-image-snapshot'; + import { ImageSnapshotConfigurator, MultiBrowserImageSnapshotThresholds } from './helpers/visu/image-snapshot-config'; + import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; -import type { MatchImageSnapshotOptions } from 'jest-image-snapshot'; class FilterPoolsImageSnapshotConfigurator extends ImageSnapshotConfigurator { override getConfig(name: string): MatchImageSnapshotOptions { diff --git a/test/e2e/bpmn.rendering.test.ts b/test/e2e/bpmn.rendering.test.ts index fadaf9eb89..8b231359f2 100644 --- a/test/e2e/bpmn.rendering.test.ts +++ b/test/e2e/bpmn.rendering.test.ts @@ -15,12 +15,14 @@ limitations under the License. */ import 'jest-playwright-preset'; -import { getBpmnDiagramNames } from '@test/shared/visu/test-utils'; -import type { StyleOptions } from '@test/shared/visu/bpmn-page-utils'; -import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; import type { ImageSnapshotThresholdConfig } from './helpers/visu/image-snapshot-config'; +import type { StyleOptions } from '@test/shared/visu/bpmn-page-utils'; + import { ImageSnapshotConfigurator, MultiBrowserImageSnapshotThresholds } from './helpers/visu/image-snapshot-config'; +import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; +import { getBpmnDiagramNames } from '@test/shared/visu/test-utils'; + class ImageSnapshotThresholds extends MultiBrowserImageSnapshotThresholds { constructor() { // threshold for webkit is taken from macOS only diff --git a/test/e2e/bpmn.theme.test.ts b/test/e2e/bpmn.theme.test.ts index 8a1020e5dc..6fd6ee15ff 100644 --- a/test/e2e/bpmn.theme.test.ts +++ b/test/e2e/bpmn.theme.test.ts @@ -15,9 +15,11 @@ limitations under the License. */ import type { StyleOptions } from '@test/shared/visu/bpmn-page-utils'; -import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; + import { ImageSnapshotConfigurator, MultiBrowserImageSnapshotThresholds } from './helpers/visu/image-snapshot-config'; +import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; + const styleOptionsPerUseCase = new Map([ [ 'container-background', diff --git a/test/e2e/diagram.navigation.fit.test.ts b/test/e2e/diagram.navigation.fit.test.ts index 72be8fae00..6638ecf673 100644 --- a/test/e2e/diagram.navigation.fit.test.ts +++ b/test/e2e/diagram.navigation.fit.test.ts @@ -14,14 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { ImageSnapshotThresholdConfig } from './helpers/visu/image-snapshot-config'; import type { MatchImageSnapshotOptions } from 'jest-image-snapshot'; -import 'jest-playwright-preset'; + import { join } from 'node:path'; + +import 'jest-playwright-preset'; + +import { ImageSnapshotConfigurator, MultiBrowserImageSnapshotThresholds } from './helpers/visu/image-snapshot-config'; + import { FitType } from '@lib/component/options'; -import { getBpmnDiagramNames } from '@test/shared/visu/test-utils'; import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; -import type { ImageSnapshotThresholdConfig } from './helpers/visu/image-snapshot-config'; -import { ImageSnapshotConfigurator, MultiBrowserImageSnapshotThresholds } from './helpers/visu/image-snapshot-config'; +import { getBpmnDiagramNames } from '@test/shared/visu/test-utils'; class FitImageSnapshotConfigurator extends ImageSnapshotConfigurator { override getConfig(param: { diff --git a/test/e2e/diagram.navigation.zoom.pan.test.ts b/test/e2e/diagram.navigation.zoom.pan.test.ts index 748634f530..d6135ec0b8 100644 --- a/test/e2e/diagram.navigation.zoom.pan.test.ts +++ b/test/e2e/diagram.navigation.zoom.pan.test.ts @@ -14,14 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { ImageSnapshotThresholdConfig } from './helpers/visu/image-snapshot-config'; +import type { Point } from '@test/shared/visu/bpmn-page-utils'; + +import { join } from 'node:path'; + import debugLogger from 'debug'; import 'jest-playwright-preset'; -import { join } from 'node:path'; -import type { Point } from '@test/shared/visu/bpmn-page-utils'; -import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; -import type { ImageSnapshotThresholdConfig } from './helpers/visu/image-snapshot-config'; + import { ImageSnapshotConfigurator, MultiBrowserImageSnapshotThresholds } from './helpers/visu/image-snapshot-config'; + import { ZoomType } from '@lib/component/options'; +import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; const log = debugLogger('bv:test:e2e:navigation:zoom-pan'); diff --git a/test/e2e/helpers/visu/image-snapshot-config.ts b/test/e2e/helpers/visu/image-snapshot-config.ts index 7f4d11b3a5..9d2e75ce09 100644 --- a/test/e2e/helpers/visu/image-snapshot-config.ts +++ b/test/e2e/helpers/visu/image-snapshot-config.ts @@ -14,8 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { dirname, join } from 'node:path'; import type { MatchImageSnapshotOptions } from 'jest-image-snapshot'; + +import { dirname, join } from 'node:path'; + import { configLog, getSimplePlatformName, getTestedBrowserFamily } from '@test/shared/visu/test-utils'; export interface ImageSnapshotThresholdConfig { diff --git a/test/e2e/overlays.rendering.test.ts b/test/e2e/overlays.rendering.test.ts index ec3b142e20..936f619679 100644 --- a/test/e2e/overlays.rendering.test.ts +++ b/test/e2e/overlays.rendering.test.ts @@ -15,16 +15,20 @@ limitations under the License. */ import 'jest-playwright-preset'; +import type { ImageSnapshotThresholdConfig } from './helpers/visu/image-snapshot-config'; +import type { OverlayEdgePosition, OverlayPosition, OverlayShapePosition } from '@lib/component/registry'; +import type { Point } from '@test/shared/visu/bpmn-page-utils'; + import { join } from 'node:path'; + +import debugLogger from 'debug'; + +import { ImageSnapshotConfigurator, MultiBrowserImageSnapshotThresholds } from './helpers/visu/image-snapshot-config'; + import { ensureIsArray } from '@lib/component/helpers/array-utils'; -import type { OverlayEdgePosition, OverlayPosition, OverlayShapePosition } from '@lib/component/registry'; import { ZoomType } from '@lib/component/options'; import { overlayEdgePositionValues, overlayShapePositionValues } from '@test/shared/overlays'; -import type { Point } from '@test/shared/visu/bpmn-page-utils'; import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; -import type { ImageSnapshotThresholdConfig } from './helpers/visu/image-snapshot-config'; -import { ImageSnapshotConfigurator, MultiBrowserImageSnapshotThresholds } from './helpers/visu/image-snapshot-config'; -import debugLogger from 'debug'; const log = debugLogger('bv:test:e2e:overlays'); diff --git a/test/e2e/style.api.test.ts b/test/e2e/style.api.test.ts index dadfc57d38..c6a1e3721e 100644 --- a/test/e2e/style.api.test.ts +++ b/test/e2e/style.api.test.ts @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; import type { ImageSnapshotThresholdConfig } from './helpers/visu/image-snapshot-config'; + import { ImageSnapshotConfigurator, MultiBrowserImageSnapshotThresholds } from './helpers/visu/image-snapshot-config'; +import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; + class StyleImageSnapshotThresholds extends MultiBrowserImageSnapshotThresholds { constructor() { // chromium max for all OS: 0.04661214552819093% diff --git a/test/integration/BpmnVisualization.test.ts b/test/integration/BpmnVisualization.test.ts index b9f8bed811..9e10ae66d1 100644 --- a/test/integration/BpmnVisualization.test.ts +++ b/test/integration/BpmnVisualization.test.ts @@ -14,15 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { FitType } from '@lib/component/options'; + import { type GlobalOptionsWithoutContainer, initializeBpmnVisualizationWithContainerId, initializeBpmnVisualizationWithHtmlElement, } from './helpers/bpmn-visualization-initialization'; -import { readFileSync } from '@test/shared/file-helper'; import { allTestedFitTypes } from './helpers/fit-utils'; -import type { FitType } from '@lib/component/options'; + import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; +import { readFileSync } from '@test/shared/file-helper'; describe('BpmnVisualization initialization', () => { it.each` diff --git a/test/integration/cross.css.and.style.api.test.ts b/test/integration/cross.css.and.style.api.test.ts index 4928f061f1..659bd1f0ab 100644 --- a/test/integration/cross.css.and.style.api.test.ts +++ b/test/integration/cross.css.and.style.api.test.ts @@ -14,15 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { ExpectedEdgeModelElement, ExpectedShapeModelElement } from './helpers/model-expect'; import type { mxCell } from 'mxgraph'; -import { ShapeBpmnElementKind, ShapeBpmnEventDefinitionKind } from '@lib/model/bpmn/internal'; -import { readFileSync } from '@test/shared/file-helper'; + import { initializeBpmnVisualizationWithContainerId } from './helpers/bpmn-visualization-initialization'; import { HtmlElementLookup } from './helpers/html-utils'; -import type { ExpectedEdgeModelElement, ExpectedShapeModelElement } from './helpers/model-expect'; import { buildReceivedResolvedModelCellStyle, buildReceivedViewStateStyle } from './matchers/matcher-utils'; -import { buildExpectedShapeCellStyle } from './matchers/toBeShape'; import { buildExpectedEdgeCellStyle } from './matchers/toBeEdge'; +import { buildExpectedShapeCellStyle } from './matchers/toBeShape'; + +import { ShapeBpmnElementKind, ShapeBpmnEventDefinitionKind } from '@lib/model/bpmn/internal'; +import { readFileSync } from '@test/shared/file-helper'; // Here, we are checking both the model and the DOM. // This fully ensures that the usage of both APIs have no impact on the model update and that the repaints are correctly done. diff --git a/test/integration/diagram.navigation.test.ts b/test/integration/diagram.navigation.test.ts index c87ba50e87..c5d475f666 100644 --- a/test/integration/diagram.navigation.test.ts +++ b/test/integration/diagram.navigation.test.ts @@ -15,9 +15,10 @@ limitations under the License. */ import { initializeBpmnVisualizationWithHtmlElement } from './helpers/bpmn-visualization-initialization'; -import { readFileSync } from '@test/shared/file-helper'; import { allTestedFitTypes } from './helpers/fit-utils'; + import { type FitType, ZoomType } from '@lib/component/options'; +import { readFileSync } from '@test/shared/file-helper'; const bpmnVisualization = initializeBpmnVisualizationWithHtmlElement('bpmn-container', true); diff --git a/test/integration/dom.bpmn.elements.test.ts b/test/integration/dom.bpmn.elements.test.ts index 8027394f37..a7116144d7 100644 --- a/test/integration/dom.bpmn.elements.test.ts +++ b/test/integration/dom.bpmn.elements.test.ts @@ -15,7 +15,13 @@ limitations under the License. */ import type { BpmnVisualization } from '@lib/bpmn-visualization'; -import { FlowKind, ShapeBpmnElementKind } from '@lib/bpmn-visualization'; + +import { + initializeBpmnVisualization, + initializeBpmnVisualizationWithContainerId, + initializeBpmnVisualizationWithHtmlElement, + initializeBpmnVisualizationWithoutId, +} from './helpers/bpmn-visualization-initialization'; import { expectEndEventBpmnElement, expectPoolBpmnElement, @@ -24,12 +30,8 @@ import { expectStartEventBpmnElement, expectTaskBpmnElement, } from './helpers/semantic-with-svg-utils'; -import { - initializeBpmnVisualization, - initializeBpmnVisualizationWithContainerId, - initializeBpmnVisualizationWithHtmlElement, - initializeBpmnVisualizationWithoutId, -} from './helpers/bpmn-visualization-initialization'; + +import { FlowKind, ShapeBpmnElementKind } from '@lib/bpmn-visualization'; import { readFileSync } from '@test/shared/file-helper'; describe('Bpmn Elements registry - retrieve BPMN elements', () => { diff --git a/test/integration/dom.container.div.test.ts b/test/integration/dom.container.div.test.ts index 137f01fe14..a2aa75e50c 100644 --- a/test/integration/dom.container.div.test.ts +++ b/test/integration/dom.container.div.test.ts @@ -15,13 +15,15 @@ limitations under the License. */ import type { BpmnVisualization } from '@lib/bpmn-visualization'; -import { ShapeBpmnEventDefinitionKind } from '@lib/bpmn-visualization'; + import { initializeBpmnVisualizationWithContainerId, initializeBpmnVisualizationWithHtmlElement, initializeBpmnVisualizationWithoutId, } from './helpers/bpmn-visualization-initialization'; import { HtmlElementLookup } from './helpers/html-utils'; + +import { ShapeBpmnEventDefinitionKind } from '@lib/bpmn-visualization'; import { readFileSync } from '@test/shared/file-helper'; describe.each` diff --git a/test/integration/dom.css.classes.test.ts b/test/integration/dom.css.classes.test.ts index cbe99b09fc..da887bbd2d 100644 --- a/test/integration/dom.css.classes.test.ts +++ b/test/integration/dom.css.classes.test.ts @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { readFileSync } from '@test/shared/file-helper'; import { initializeBpmnVisualizationWithContainerId } from './helpers/bpmn-visualization-initialization'; import { HtmlElementLookup } from './helpers/html-utils'; + import { ShapeBpmnEventDefinitionKind } from '@lib/model/bpmn/internal'; +import { readFileSync } from '@test/shared/file-helper'; describe('Bpmn Elements registry - CSS class management', () => { const bpmnVisualization = initializeBpmnVisualizationWithContainerId(); diff --git a/test/integration/dom.overlays.test.ts b/test/integration/dom.overlays.test.ts index 9daa34cb39..da2f035dca 100644 --- a/test/integration/dom.overlays.test.ts +++ b/test/integration/dom.overlays.test.ts @@ -15,11 +15,13 @@ limitations under the License. */ import type { OverlayEdgePosition, OverlayShapePosition } from '@lib/bpmn-visualization'; -import { readFileSync } from '@test/shared/file-helper'; -import { overlayEdgePositionValues, overlayShapePositionValues } from '@test/shared/overlays'; + import { initializeBpmnVisualizationWithContainerId } from './helpers/bpmn-visualization-initialization'; import { HtmlElementLookup } from './helpers/html-utils'; +import { readFileSync } from '@test/shared/file-helper'; +import { overlayEdgePositionValues, overlayShapePositionValues } from '@test/shared/overlays'; + describe('Bpmn Elements registry - Overlay management', () => { const bpmnVisualization = initializeBpmnVisualizationWithContainerId(); const htmlElementLookup = new HtmlElementLookup(bpmnVisualization); diff --git a/test/integration/helpers/bpmn-visualization-initialization.ts b/test/integration/helpers/bpmn-visualization-initialization.ts index 76301d2bd2..7c136f17a5 100644 --- a/test/integration/helpers/bpmn-visualization-initialization.ts +++ b/test/integration/helpers/bpmn-visualization-initialization.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { BpmnVisualization, type GlobalOptions } from '@lib/bpmn-visualization'; import { insertBpmnContainer, insertBpmnContainerWithoutId } from './dom-utils'; +import { BpmnVisualization, type GlobalOptions } from '@lib/bpmn-visualization'; + export type GlobalOptionsWithoutContainer = Omit; export const initializeBpmnVisualizationWithContainerId = (bpmnContainerId = 'bpmn-visualization-container', globalOptions?: GlobalOptionsWithoutContainer): BpmnVisualization => { diff --git a/test/integration/helpers/html-utils.ts b/test/integration/helpers/html-utils.ts index 07a07588c9..b48e43d3b4 100644 --- a/test/integration/helpers/html-utils.ts +++ b/test/integration/helpers/html-utils.ts @@ -15,6 +15,7 @@ limitations under the License. */ import type { BpmnVisualization, ShapeBpmnEventDefinitionKind } from '@lib/bpmn-visualization'; + import { BpmnQuerySelectorsForTests } from '@test/shared/query-selectors'; /* eslint-disable jest/no-standalone-expect */ diff --git a/test/integration/helpers/model-expect.ts b/test/integration/helpers/model-expect.ts index 5a600583b9..339932af5b 100644 --- a/test/integration/helpers/model-expect.ts +++ b/test/integration/helpers/model-expect.ts @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { ExpectedOverlay } from '../matchers/matcher-utils'; import type { FlowKind, GlobalTaskKind, @@ -26,7 +27,8 @@ import type { ShapeBpmnSubProcessKind, Stroke, } from '@lib/bpmn-visualization'; -import { BpmnVisualization, ShapeBpmnElementKind } from '@lib/bpmn-visualization'; +import type { mxCell, mxGeometry } from 'mxgraph'; + import { toBeAssociationFlow, toBeBoundaryEvent, @@ -57,10 +59,10 @@ import { toBeTextAnnotation, toBeUserTask, } from '../matchers'; -import type { mxCell, mxGeometry } from 'mxgraph'; -import type { ExpectedOverlay } from '../matchers/matcher-utils'; import { getCell } from '../matchers/matcher-utils'; +import { BpmnVisualization, ShapeBpmnElementKind } from '@lib/bpmn-visualization'; + declare global { // eslint-disable-next-line @typescript-eslint/no-namespace namespace jest { diff --git a/test/integration/helpers/semantic-with-svg-utils.ts b/test/integration/helpers/semantic-with-svg-utils.ts index 1d822f600b..aee63a41dc 100644 --- a/test/integration/helpers/semantic-with-svg-utils.ts +++ b/test/integration/helpers/semantic-with-svg-utils.ts @@ -16,9 +16,11 @@ limitations under the License. import type { BpmnElement, EdgeBpmnSemantic, ShapeBpmnSemantic } from '@lib/component/registry'; import type { ExpectedBaseBpmnElement, ExpectedFlowElement, ExpectedFlowNodeElement } from '@test/shared/model/bpmn-semantic-utils'; -import { expectEndEvent, expectPool, expectSequenceFlow, expectServiceTask, expectStartEvent, expectTask } from '@test/shared/model/bpmn-semantic-utils'; + import { expectSvgEvent, expectSvgPool, expectSvgSequenceFlow, expectSvgTask } from './html-utils'; +import { expectEndEvent, expectPool, expectSequenceFlow, expectServiceTask, expectStartEvent, expectTask } from '@test/shared/model/bpmn-semantic-utils'; + export function expectStartEventBpmnElement(bpmnElement: BpmnElement, expected: ExpectedFlowNodeElement): void { expectStartEvent(bpmnElement.bpmnSemantic as ShapeBpmnSemantic, expected); expectSvgEvent(bpmnElement.htmlElement); diff --git a/test/integration/matchers/matcher-utils.ts b/test/integration/matchers/matcher-utils.ts index b86f977f70..74fa7925b2 100644 --- a/test/integration/matchers/matcher-utils.ts +++ b/test/integration/matchers/matcher-utils.ts @@ -15,13 +15,16 @@ limitations under the License. */ import type { ExpectedEdgeModelElement, ExpectedFont, ExpectedShapeModelElement, HorizontalAlign, VerticalAlign } from '../helpers/model-expect'; -import { bpmnVisualization } from '../helpers/model-expect'; -import type { mxCell, mxGeometry, StyleMap } from 'mxgraph'; -import type { Opacity } from '@lib/component/registry'; import type { MxGraphCustomOverlay, MxGraphCustomOverlayStyle } from '@lib/component/mxgraph/overlay/custom-overlay'; +import type { Opacity } from '@lib/component/registry'; +import type { mxCell, mxGeometry, StyleMap } from 'mxgraph'; + +import { bpmnVisualization } from '../helpers/model-expect'; + import { getFontStyleValue as computeFontStyleValue } from '@lib/component/mxgraph/renderer/StyleComputer'; import { BpmnStyleIdentifier } from '@lib/component/mxgraph/style'; import { Font } from '@lib/model/bpmn/internal/Label'; + import MatcherContext = jest.MatcherContext; import CustomMatcherResult = jest.CustomMatcherResult; diff --git a/test/integration/matchers/toBeCell/index.ts b/test/integration/matchers/toBeCell/index.ts index 7e7139b46b..6d0312a0ed 100644 --- a/test/integration/matchers/toBeCell/index.ts +++ b/test/integration/matchers/toBeCell/index.ts @@ -14,13 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { ExpectedCellWithGeometry } from '../../helpers/model-expect'; import type { ExpectedCell } from '../matcher-utils'; +import type { mxCell } from 'mxgraph'; + +import { getDefaultParentId } from '../../helpers/model-expect'; import { buildCellMatcher, getCell } from '../matcher-utils'; + import MatcherContext = jest.MatcherContext; import CustomMatcherResult = jest.CustomMatcherResult; -import type { ExpectedCellWithGeometry } from '../../helpers/model-expect'; -import { getDefaultParentId } from '../../helpers/model-expect'; -import type { mxCell } from 'mxgraph'; export function toBeCell(this: MatcherContext, received: string): CustomMatcherResult { const pass = getCell(received) ? true : false; diff --git a/test/integration/matchers/toBeEdge/index.ts b/test/integration/matchers/toBeEdge/index.ts index 1e5d69f76a..b38daefdcc 100644 --- a/test/integration/matchers/toBeEdge/index.ts +++ b/test/integration/matchers/toBeEdge/index.ts @@ -14,13 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { BpmnCellStyle, ExpectedCell } from '../matcher-utils'; -import { buildCellMatcher, buildExpectedCellStyleWithCommonAttributes, buildReceivedCellWithCommonAttributes } from '../matcher-utils'; -import { FlowKind, MessageVisibleKind } from '@lib/model/bpmn/internal'; import type { ExpectedEdgeModelElement, ExpectedSequenceFlowModelElement } from '../../helpers/model-expect'; +import type { BpmnCellStyle, ExpectedCell } from '../matcher-utils'; + import { getDefaultParentId } from '../../helpers/model-expect'; -import { BpmnStyleIdentifier } from '@lib/component/mxgraph/style'; +import { buildCellMatcher, buildExpectedCellStyleWithCommonAttributes, buildReceivedCellWithCommonAttributes } from '../matcher-utils'; + import { mxConstants } from '@lib/component/mxgraph/initializer'; +import { BpmnStyleIdentifier } from '@lib/component/mxgraph/style'; +import { FlowKind, MessageVisibleKind } from '@lib/model/bpmn/internal'; + import MatcherContext = jest.MatcherContext; import CustomMatcherResult = jest.CustomMatcherResult; diff --git a/test/integration/matchers/toBeShape/index.ts b/test/integration/matchers/toBeShape/index.ts index 7736802983..b547edb58f 100644 --- a/test/integration/matchers/toBeShape/index.ts +++ b/test/integration/matchers/toBeShape/index.ts @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { BpmnCellStyle, ExpectedCell } from '../matcher-utils'; -import { buildCellMatcher, buildExpectedCellStyleWithCommonAttributes, buildReceivedCellWithCommonAttributes } from '../matcher-utils'; import type { ExpectedBoundaryEventModelElement, ExpectedCallActivityModelElement, @@ -25,9 +23,14 @@ import type { ExpectedStartEventModelElement, ExpectedSubProcessModelElement, } from '../../helpers/model-expect'; +import type { BpmnCellStyle, ExpectedCell } from '../matcher-utils'; + import { getDefaultParentId } from '../../helpers/model-expect'; -import { ShapeBpmnElementKind, ShapeBpmnMarkerKind, ShapeBpmnSubProcessKind } from '@lib/model/bpmn/internal'; +import { buildCellMatcher, buildExpectedCellStyleWithCommonAttributes, buildReceivedCellWithCommonAttributes } from '../matcher-utils'; + import { mxConstants } from '@lib/component/mxgraph/initializer'; +import { ShapeBpmnElementKind, ShapeBpmnMarkerKind, ShapeBpmnSubProcessKind } from '@lib/model/bpmn/internal'; + import MatcherContext = jest.MatcherContext; import CustomMatcherResult = jest.CustomMatcherResult; diff --git a/test/integration/model.elements.api.test.ts b/test/integration/model.elements.api.test.ts index 0db6d3b336..cb4f7160ce 100644 --- a/test/integration/model.elements.api.test.ts +++ b/test/integration/model.elements.api.test.ts @@ -14,8 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { type BpmnElementKind, FlowKind, ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; import type { BpmnSemantic, EdgeBpmnSemantic, ShapeBpmnSemantic } from '@lib/component/registry'; + +import { initializeBpmnVisualization } from './helpers/bpmn-visualization-initialization'; +import { bpmnVisualization } from './helpers/model-expect'; + +import { type BpmnElementKind, FlowKind, ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; import { readFileSync } from '@test/shared/file-helper'; import { expectBoundaryEvent, @@ -26,8 +30,6 @@ import { expectSubprocess, expectUserTask, } from '@test/shared/model/bpmn-semantic-utils'; -import { initializeBpmnVisualization } from './helpers/bpmn-visualization-initialization'; -import { bpmnVisualization } from './helpers/model-expect'; describe('Registry API - retrieve Model Bpmn elements', () => { describe('Get by ids', () => { diff --git a/test/integration/mxGraph.model.bpmn.colors.test.ts b/test/integration/mxGraph.model.bpmn.colors.test.ts index 383670c5cb..8bf1b0750b 100644 --- a/test/integration/mxGraph.model.bpmn.colors.test.ts +++ b/test/integration/mxGraph.model.bpmn.colors.test.ts @@ -15,6 +15,7 @@ limitations under the License. */ import { bpmnVisualization } from './helpers/model-expect'; + import { readFileSync } from '@test/shared/file-helper'; describe('mxGraph model - BPMN colors', () => { diff --git a/test/integration/mxGraph.model.bpmn.elements.test.ts b/test/integration/mxGraph.model.bpmn.elements.test.ts index f139e09d18..cd3e166313 100644 --- a/test/integration/mxGraph.model.bpmn.elements.test.ts +++ b/test/integration/mxGraph.model.bpmn.elements.test.ts @@ -14,18 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { - MarkerIdentifier, - MessageVisibleKind, - SequenceFlowKind, - ShapeBpmnElementKind, - ShapeBpmnEventBasedGatewayKind, - ShapeBpmnEventDefinitionKind, - ShapeBpmnMarkerKind, - ShapeBpmnSubProcessKind, -} from '@lib/bpmn-visualization'; -import { readFileSync } from '@test/shared/file-helper'; import type { ExpectedShapeModelElement } from './helpers/model-expect'; + import { bpmnVisualization, expectEdgesInModel, @@ -35,7 +25,19 @@ import { expectTotalShapesInModel, getDefaultParentId, } from './helpers/model-expect'; + +import { + MarkerIdentifier, + MessageVisibleKind, + SequenceFlowKind, + ShapeBpmnElementKind, + ShapeBpmnEventBasedGatewayKind, + ShapeBpmnEventDefinitionKind, + ShapeBpmnMarkerKind, + ShapeBpmnSubProcessKind, +} from '@lib/bpmn-visualization'; import { mxgraph, mxConstants, mxPoint } from '@lib/component/mxgraph/initializer'; +import { readFileSync } from '@test/shared/file-helper'; const mxGeometry = mxgraph.mxGeometry; diff --git a/test/integration/mxGraph.model.css.api.test.ts b/test/integration/mxGraph.model.css.api.test.ts index 7bfad0efd2..7fe287188e 100644 --- a/test/integration/mxGraph.model.css.api.test.ts +++ b/test/integration/mxGraph.model.css.api.test.ts @@ -15,6 +15,7 @@ limitations under the License. */ import { bpmnVisualization } from './helpers/model-expect'; + import { readFileSync } from '@test/shared/file-helper'; // Most of the test are done in dom.css.classes.test.ts diff --git a/test/integration/mxGraph.model.overlays.test.ts b/test/integration/mxGraph.model.overlays.test.ts index fca9f31baf..7abc891a21 100644 --- a/test/integration/mxGraph.model.overlays.test.ts +++ b/test/integration/mxGraph.model.overlays.test.ts @@ -15,8 +15,9 @@ limitations under the License. */ import { bpmnVisualization } from './helpers/model-expect'; -import { readFileSync } from '@test/shared/file-helper'; + import { ShapeBpmnEventDefinitionKind } from '@lib/bpmn-visualization'; +import { readFileSync } from '@test/shared/file-helper'; describe('mxGraph model - Overlays', () => { describe('Add overlays', () => { diff --git a/test/integration/mxGraph.model.style.api.test.ts b/test/integration/mxGraph.model.style.api.test.ts index 92f17717e5..1ad73cf9d4 100644 --- a/test/integration/mxGraph.model.style.api.test.ts +++ b/test/integration/mxGraph.model.style.api.test.ts @@ -15,10 +15,12 @@ limitations under the License. */ import type { ExpectedDirection, ExpectedFill } from './helpers/model-expect'; +import type { EdgeStyleUpdate, Fill, Font, GradientDirection, Stroke, StyleUpdate } from '@lib/component/registry'; + import { bpmnVisualization } from './helpers/model-expect'; -import { readFileSync } from '@test/shared/file-helper'; + import { MessageVisibleKind, ShapeBpmnEventDefinitionKind } from '@lib/model/bpmn/internal'; -import type { EdgeStyleUpdate, Fill, Font, GradientDirection, Stroke, StyleUpdate } from '@lib/component/registry'; +import { readFileSync } from '@test/shared/file-helper'; describe('mxGraph model - update style', () => { describe('Shapes', () => { diff --git a/test/performance/bpmn.load.performance.test.ts b/test/performance/bpmn.load.performance.test.ts index c37227bee4..b22c5c3ce3 100644 --- a/test/performance/bpmn.load.performance.test.ts +++ b/test/performance/bpmn.load.performance.test.ts @@ -14,12 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { ChartData, PerformanceMetric } from './helpers/perf-utils'; + import * as fs from 'node:fs'; -import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; + +import { performanceDataFilePath } from './helpers/file-utils'; import { ChromiumMetricsCollector } from './helpers/metrics-chromium'; -import type { ChartData, PerformanceMetric } from './helpers/perf-utils'; import { calculateMetrics } from './helpers/perf-utils'; -import { performanceDataFilePath } from './helpers/file-utils'; + +import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; const metricsArray: PerformanceMetric[] = []; diff --git a/test/performance/bpmn.navigation.performance.test.ts b/test/performance/bpmn.navigation.performance.test.ts index 139c35df2d..f0dc20de7f 100644 --- a/test/performance/bpmn.navigation.performance.test.ts +++ b/test/performance/bpmn.navigation.performance.test.ts @@ -14,15 +14,18 @@ See the License for the specific language governing permissions and limitations under the License. */ -import * as fs from 'node:fs'; -import { delay } from '@test/shared/visu/test-utils'; +import type { ChartData, PerformanceMetric } from './helpers/perf-utils'; import type { Point } from '@test/shared/visu/bpmn-page-utils'; -import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; + +import * as fs from 'node:fs'; + +import { performanceDataFilePath } from './helpers/file-utils'; import { ChromiumMetricsCollector } from './helpers/metrics-chromium'; -import type { ChartData, PerformanceMetric } from './helpers/perf-utils'; import { calculateMetrics } from './helpers/perf-utils'; + import { ZoomType } from '@lib/component/options'; -import { performanceDataFilePath } from './helpers/file-utils'; +import { AvailableTestPages, PageTester } from '@test/shared/visu/bpmn-page-utils'; +import { delay } from '@test/shared/visu/test-utils'; const metricsArray: PerformanceMetric[] = []; diff --git a/test/shared/model/bpmn-semantic-utils.ts b/test/shared/model/bpmn-semantic-utils.ts index 451eddf3d2..aaa32da676 100644 --- a/test/shared/model/bpmn-semantic-utils.ts +++ b/test/shared/model/bpmn-semantic-utils.ts @@ -15,6 +15,7 @@ limitations under the License. */ import type { BpmnSemantic, EdgeBpmnSemantic, ShapeBpmnSemantic } from '@lib/component/registry'; + import { FlowKind, ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; export interface ExpectedBaseBpmnElement { diff --git a/test/shared/visu/bpmn-page-utils.ts b/test/shared/visu/bpmn-page-utils.ts index 6ac062f260..c805c7db8c 100644 --- a/test/shared/visu/bpmn-page-utils.ts +++ b/test/shared/visu/bpmn-page-utils.ts @@ -18,17 +18,22 @@ limitations under the License. // see https://github.com/jest-community/jest-extended/issues/367 /// -import debugLogger from 'debug'; -import 'expect-playwright'; +import type { StyleUpdate } from '@lib/component/registry'; import type { PageWaitForSelectorOptions } from 'expect-playwright'; import type { ElementHandle, Page } from 'playwright'; + +import debugLogger from 'debug'; + +import 'expect-playwright'; + +import envUtils = require('../environment-utils.cjs'); + +import { delay } from './test-utils'; + import { type LoadOptions, FitType, ZoomType } from '@lib/component/options'; -import type { StyleUpdate } from '@lib/component/registry'; import { BpmnQuerySelectorsForTests } from '@test/shared/query-selectors'; -import { delay } from './test-utils'; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore js file with commonjs export -import envUtils = require('../environment-utils.cjs'); const pageCheckLog = debugLogger('bv:test:page-check'); diff --git a/test/shared/visu/test-utils.ts b/test/shared/visu/test-utils.ts index baae10f726..2c5f65c207 100644 --- a/test/shared/visu/test-utils.ts +++ b/test/shared/visu/test-utils.ts @@ -14,9 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +import { join } from 'node:path'; + import debugLogger from 'debug'; import 'jest-playwright-preset'; -import { join } from 'node:path'; + import { findFiles } from '@test/shared/file-helper'; export const configLog = debugLogger('bv:test:config'); diff --git a/test/unit/component/mxgraph/overlay/converter.test.ts b/test/unit/component/mxgraph/overlay/converter.test.ts index a6b2d3427f..13c9859536 100644 --- a/test/unit/component/mxgraph/overlay/converter.test.ts +++ b/test/unit/component/mxgraph/overlay/converter.test.ts @@ -17,11 +17,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { OverlayConverter } from '@lib/component/mxgraph/overlay/converter'; import type { MxGraphCustomOverlayPosition } from '@lib/component/mxgraph/overlay/custom-overlay'; -import { StyleDefault } from '@lib/component/mxgraph/style'; import type { Overlay, OverlayPosition } from '@lib/component/registry/types'; +import { OverlayConverter } from '@lib/component/mxgraph/overlay/converter'; +import { StyleDefault } from '@lib/component/mxgraph/style'; + describe('overlay converter', () => { const overlayConverter = new OverlayConverter(); diff --git a/test/unit/component/mxgraph/renderer/StyleComputer.test.ts b/test/unit/component/mxgraph/renderer/StyleComputer.test.ts index 1be24d4de8..947c57b780 100644 --- a/test/unit/component/mxgraph/renderer/StyleComputer.test.ts +++ b/test/unit/component/mxgraph/renderer/StyleComputer.test.ts @@ -17,18 +17,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -import StyleComputer from '@lib/component/mxgraph/renderer/StyleComputer'; -import Shape from '@lib/model/bpmn/internal/shape/Shape'; -import ShapeBpmnElement, { - ShapeBpmnActivity, - ShapeBpmnBoundaryEvent, - ShapeBpmnCallActivity, - ShapeBpmnEvent, - ShapeBpmnEventBasedGateway, - ShapeBpmnStartEvent, - ShapeBpmnSubProcess, -} from '@lib/model/bpmn/internal/shape/ShapeBpmnElement'; +import type { ExpectedFont } from '../../../helpers/bpmn-model-expect'; import type { BpmnEventKind, GlobalTaskKind } from '@lib/model/bpmn/internal'; + +import { getExpectedMarkers } from '../../../helpers/bpmn-model-expect'; + +import StyleComputer from '@lib/component/mxgraph/renderer/StyleComputer'; import { AssociationDirectionKind, MessageVisibleKind, @@ -41,12 +35,20 @@ import { ShapeBpmnSubProcessKind, ShapeUtil, } from '@lib/model/bpmn/internal'; -import Label, { Font } from '@lib/model/bpmn/internal/Label'; +import Bounds from '@lib/model/bpmn/internal/Bounds'; import { Edge } from '@lib/model/bpmn/internal/edge/edge'; import { AssociationFlow, MessageFlow, SequenceFlow } from '@lib/model/bpmn/internal/edge/flows'; -import Bounds from '@lib/model/bpmn/internal/Bounds'; -import type { ExpectedFont } from '../../../helpers/bpmn-model-expect'; -import { getExpectedMarkers } from '../../../helpers/bpmn-model-expect'; +import Label, { Font } from '@lib/model/bpmn/internal/Label'; +import Shape from '@lib/model/bpmn/internal/shape/Shape'; +import ShapeBpmnElement, { + ShapeBpmnActivity, + ShapeBpmnBoundaryEvent, + ShapeBpmnCallActivity, + ShapeBpmnEvent, + ShapeBpmnEventBasedGateway, + ShapeBpmnStartEvent, + ShapeBpmnSubProcess, +} from '@lib/model/bpmn/internal/shape/ShapeBpmnElement'; function toFont(font: ExpectedFont): Font { return new Font(font.name, font.size, font.isBold, font.isItalic, font.isUnderline, font.isStrikeThrough); diff --git a/test/unit/component/mxgraph/renderer/style-utils.test.ts b/test/unit/component/mxgraph/renderer/style-utils.test.ts index 3032b21e0a..23678ae793 100644 --- a/test/unit/component/mxgraph/renderer/style-utils.test.ts +++ b/test/unit/component/mxgraph/renderer/style-utils.test.ts @@ -14,8 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { FlowKind, ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; import { computeBpmnBaseClassName, computeAllBpmnClassNames } from '@lib/component/mxgraph/renderer/style-utils'; +import { FlowKind, ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; describe('compute base css class names of BPMN elements', () => { it.each` diff --git a/test/unit/component/mxgraph/shape/render/BpmnCanvas.test.ts b/test/unit/component/mxgraph/shape/render/BpmnCanvas.test.ts index 6cce638f9d..6adf4ba9c9 100644 --- a/test/unit/component/mxgraph/shape/render/BpmnCanvas.test.ts +++ b/test/unit/component/mxgraph/shape/render/BpmnCanvas.test.ts @@ -18,6 +18,7 @@ limitations under the License. */ import type { IconStyleConfiguration, ShapeConfiguration, Size } from '@lib/component/mxgraph/shape/render'; + import { computeScaledIconSize } from '@lib/component/mxgraph/shape/render/BpmnCanvas'; describe('compute scaled icon size', () => { diff --git a/test/unit/component/parser/BpmnParser.test.ts b/test/unit/component/parser/BpmnParser.test.ts index 337f040e2a..12287c0b8c 100644 --- a/test/unit/component/parser/BpmnParser.test.ts +++ b/test/unit/component/parser/BpmnParser.test.ts @@ -14,12 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; import type BpmnModel from '@lib/model/bpmn/internal/BpmnModel'; + +import { getEdgeByBpmnElementId, getFlowNodeByBpmnElementId, getLaneByBpmnElementId, getPoolByBpmnElementId, verifyEdge, verifyShape } from '../../helpers/bpmn-model-expect'; +import { expectPoolLaneEdgeFlowNode, verifyLabel } from '../../helpers/JsonTestUtils'; + import { newBpmnParser } from '@lib/component/parser/BpmnParser'; +import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; import { readFileSync } from '@test/shared/file-helper'; -import { expectPoolLaneEdgeFlowNode, verifyLabel } from '../../helpers/JsonTestUtils'; -import { getEdgeByBpmnElementId, getFlowNodeByBpmnElementId, getLaneByBpmnElementId, getPoolByBpmnElementId, verifyEdge, verifyShape } from '../../helpers/bpmn-model-expect'; describe('parse xml to model', () => { it('Single process with no participant', () => { diff --git a/test/unit/component/parser/json/BpmnJsonParser.association.test.ts b/test/unit/component/parser/json/BpmnJsonParser.association.test.ts index 019ed87e5d..fbc84ccc57 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.association.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.association.test.ts @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { buildDefinitions } from '../../../helpers/JsonBuilder'; import type { BuildProcessParameter } from '../../../helpers/JsonBuilder'; -import { parseJsonAndExpectOnlyEdges } from '../../../helpers/JsonTestUtils'; +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + import { verifyEdge } from '../../../helpers/bpmn-model-expect'; +import { buildDefinitions } from '../../../helpers/JsonBuilder'; +import { parseJsonAndExpectOnlyEdges } from '../../../helpers/JsonTestUtils'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; import { Waypoint } from '@lib/model/bpmn/internal/edge/edge'; describe('parse bpmn as json for association', () => { diff --git a/test/unit/component/parser/json/BpmnJsonParser.callActivity.test.ts b/test/unit/component/parser/json/BpmnJsonParser.callActivity.test.ts index 17e94c1f1d..19d0dd4439 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.callActivity.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.callActivity.test.ts @@ -14,15 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { ExpectedShape } from '../../../helpers/bpmn-model-expect'; import type { BuildCallActivityParameter, BuildGatewayKind, BuildTaskKind, OtherBuildEventKind, BpmnGlobalTaskKind } from '../../../helpers/JsonBuilder'; +import type { GlobalTaskKind } from '@lib/model/bpmn/internal'; +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + +import { verifyEdge, verifyShape } from '../../../helpers/bpmn-model-expect'; import { buildDefinitions, EventDefinitionOn } from '../../../helpers/JsonBuilder'; import { parseJsonAndExpect, parseJsonAndExpectOnlyEdgesAndFlowNodes, parseJsonAndExpectOnlyFlowNodes } from '../../../helpers/JsonTestUtils'; -import type { ExpectedShape } from '../../../helpers/bpmn-model-expect'; -import { verifyEdge, verifyShape } from '../../../helpers/bpmn-model-expect'; -import type { GlobalTaskKind } from '@lib/model/bpmn/internal'; import { ShapeBpmnCallActivityKind, ShapeBpmnElementKind, ShapeBpmnMarkerKind } from '@lib/model/bpmn/internal'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; const expectedBounds = { x: 346, y: 856, width: 45, height: 56 }; diff --git a/test/unit/component/parser/json/BpmnJsonParser.diagram.test.ts b/test/unit/component/parser/json/BpmnJsonParser.diagram.test.ts index 0e3866d021..3b815b9c04 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.diagram.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.diagram.test.ts @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { parseJsonAndExpectOnlyFlowNodes } from '../../../helpers/JsonTestUtils'; +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + import { verifyShape } from '../../../helpers/bpmn-model-expect'; +import { parseJsonAndExpectOnlyFlowNodes } from '../../../helpers/JsonTestUtils'; import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; describe('parse bpmn as json for diagram', () => { const jsonModelWithoutBPMNDiagram: BpmnJsonModel = { diff --git a/test/unit/component/parser/json/BpmnJsonParser.edge.test.ts b/test/unit/component/parser/json/BpmnJsonParser.edge.test.ts index 19235eba61..eeebb116b3 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.edge.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.edge.test.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + import { expectAsWarning, parseJsonAndExpectOnlyWarnings, parsingMessageCollector } from '../../../helpers/JsonTestUtils'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; import { EdgeUnknownBpmnElementWarning } from '@lib/component/parser/json/warnings'; describe('parse bpmn as json for edges', () => { diff --git a/test/unit/component/parser/json/BpmnJsonParser.event.test.ts b/test/unit/component/parser/json/BpmnJsonParser.event.test.ts index 9f7f7924a1..c5b0120c31 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.event.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.event.test.ts @@ -14,10 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { ExpectedBoundaryEventShape, ExpectedEventShape, ExpectedShape } from '../../../helpers/bpmn-model-expect'; +import type { BuildDefinitionParameter, BuildEventsParameter, OtherBuildEventKind } from '../../../helpers/JsonBuilder'; import type { TEventDefinition } from '@lib/model/bpmn/json/baseElement/rootElement/eventDefinition'; -import { ShapeBpmnElementKind, ShapeBpmnEventDefinitionKind } from '@lib/model/bpmn/internal'; -import { BoundaryEventNotAttachedToActivityWarning, ShapeUnknownBpmnElementWarning } from '@lib/component/parser/json/warnings'; +import { verifyShape } from '../../../helpers/bpmn-model-expect'; +import { buildDefinitions, EventDefinitionOn } from '../../../helpers/JsonBuilder'; import { expectAsWarning, parseJsonAndExpectEvent, @@ -25,12 +27,11 @@ import { parseJsonAndExpectOnlyFlowNodes, parsingMessageCollector, } from '../../../helpers/JsonTestUtils'; -import type { ExpectedBoundaryEventShape, ExpectedEventShape, ExpectedShape } from '../../../helpers/bpmn-model-expect'; -import { verifyShape } from '../../../helpers/bpmn-model-expect'; -import type { BuildDefinitionParameter, BuildEventsParameter, OtherBuildEventKind } from '../../../helpers/JsonBuilder'; -import { buildDefinitions, EventDefinitionOn } from '../../../helpers/JsonBuilder'; import { getEventShapes } from '../../../helpers/TestUtils'; +import { BoundaryEventNotAttachedToActivityWarning, ShapeUnknownBpmnElementWarning } from '@lib/component/parser/json/warnings'; +import { ShapeBpmnElementKind, ShapeBpmnEventDefinitionKind } from '@lib/model/bpmn/internal'; + type OmitExpectedEventShape = Omit | Omit; const expectedBounds = { x: 362, y: 232, width: 36, height: 45 }; diff --git a/test/unit/component/parser/json/BpmnJsonParser.flowNode.test.ts b/test/unit/component/parser/json/BpmnJsonParser.flowNode.test.ts index c22072bb71..1c9e1f37d8 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.flowNode.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.flowNode.test.ts @@ -14,15 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { buildDefinitions } from '../../../helpers/JsonBuilder'; -import { parseJsonAndExpectOnlyEdgesAndFlowNodes, parseJsonAndExpectOnlyFlowNodes } from '../../../helpers/JsonTestUtils'; import type { ExpectedShape } from '../../../helpers/bpmn-model-expect'; +import type { ShapeBpmnEventBasedGateway } from '@lib/model/bpmn/internal/shape/ShapeBpmnElement'; +import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + import { verifyShape } from '../../../helpers/bpmn-model-expect'; +import { buildDefinitions } from '../../../helpers/JsonBuilder'; +import { parseJsonAndExpectOnlyEdgesAndFlowNodes, parseJsonAndExpectOnlyFlowNodes } from '../../../helpers/JsonTestUtils'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; -import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; import { ShapeBpmnElementKind, ShapeBpmnEventBasedGatewayKind, ShapeUtil } from '@lib/model/bpmn/internal'; -import type { ShapeBpmnEventBasedGateway } from '@lib/model/bpmn/internal/shape/ShapeBpmnElement'; describe.each([ ['task', ShapeBpmnElementKind.TASK], diff --git a/test/unit/component/parser/json/BpmnJsonParser.group.test.ts b/test/unit/component/parser/json/BpmnJsonParser.group.test.ts index 6f07040d8c..5281777a83 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.group.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.group.test.ts @@ -14,6 +14,9 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + +import { verifyShape } from '../../../helpers/bpmn-model-expect'; import { expectAsWarning, parseJsonAndExpectOnlyFlowNodes, @@ -22,11 +25,9 @@ import { parseJsonAndExpectOnlyWarnings, parsingMessageCollector, } from '../../../helpers/JsonTestUtils'; -import { verifyShape } from '../../../helpers/bpmn-model-expect'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; -import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; import { GroupUnknownCategoryValueWarning, ShapeUnknownBpmnElementWarning } from '@lib/component/parser/json/warnings'; +import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; describe('parse bpmn as json for group', () => { it('Single Group with label in process', () => { diff --git a/test/unit/component/parser/json/BpmnJsonParser.label.bounds.test.ts b/test/unit/component/parser/json/BpmnJsonParser.label.bounds.test.ts index 283bc6e69b..db849d2d7e 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.label.bounds.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.label.bounds.test.ts @@ -17,11 +17,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + import { parseJsonAndExpectOnlyEdges, parseJsonAndExpectOnlyFlowNodes, verifyLabelBounds } from '../../../helpers/JsonTestUtils'; import { shapeBpmnElementKindForLabelTests } from '../../../helpers/TestUtils'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; - describe('parse bpmn as json for label bounds', () => { describe.each(shapeBpmnElementKindForLabelTests)('parse bpmn as json for label bounds on %s', sourceKind => { it(`should convert as Shape, when a BPMNShape (attached to ${sourceKind} & with bounds with all attributes) is an attribute (as object) of 'BPMNPlane' (as object)`, () => { diff --git a/test/unit/component/parser/json/BpmnJsonParser.label.font.test.ts b/test/unit/component/parser/json/BpmnJsonParser.label.font.test.ts index 04ef079172..e1a6358d70 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.label.font.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.label.font.test.ts @@ -17,10 +17,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + import { expectAsWarning, parseJsonAndExpectOnlyEdges, parseJsonAndExpectOnlyFlowNodes, parsingMessageCollector, verifyLabelFont } from '../../../helpers/JsonTestUtils'; import { shapeBpmnElementKindForLabelTests } from '../../../helpers/TestUtils'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; import { LabelStyleMissingFontWarning } from '@lib/component/parser/json/warnings'; function expectMissingFontWarning(shapeOrEdgeId: string, labelStyleId: string): void { diff --git a/test/unit/component/parser/json/BpmnJsonParser.label.test.ts b/test/unit/component/parser/json/BpmnJsonParser.label.test.ts index 266c49eee7..9b7b3c2867 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.label.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.label.test.ts @@ -17,11 +17,11 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + import { parseJsonAndExpectOnlyEdges, parseJsonAndExpectOnlyFlowNodes } from '../../../helpers/JsonTestUtils'; import { shapeBpmnElementKindForLabelTests } from '../../../helpers/TestUtils'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; - describe('parse bpmn as json for label', () => { it.each(shapeBpmnElementKindForLabelTests)( "should convert as Shape without Label, when a BPMNShape (attached to %s & with empty BPMNLabel) is an attribute (as object) of 'BPMNPlane' (as object)", diff --git a/test/unit/component/parser/json/BpmnJsonParser.lane.test.ts b/test/unit/component/parser/json/BpmnJsonParser.lane.test.ts index c77b60c49e..d462e79aa0 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.lane.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.lane.test.ts @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; -import { LaneUnknownFlowNodeRefWarning } from '@lib/component/parser/json/warnings'; import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; -import { expectAsWarning, parseJson, parseJsonAndExpectOnlyLanes, parsingMessageCollector } from '../../../helpers/JsonTestUtils'; import { verifyShape } from '../../../helpers/bpmn-model-expect'; +import { expectAsWarning, parseJson, parseJsonAndExpectOnlyLanes, parsingMessageCollector } from '../../../helpers/JsonTestUtils'; + +import { LaneUnknownFlowNodeRefWarning } from '@lib/component/parser/json/warnings'; +import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; describe('parse bpmn as json for lane', () => { it('json containing one process with a single lane without flowNodeRef', () => { diff --git a/test/unit/component/parser/json/BpmnJsonParser.marker.test.ts b/test/unit/component/parser/json/BpmnJsonParser.marker.test.ts index 22c67ab514..e176aa7963 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.marker.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.marker.test.ts @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { parseJsonAndExpectOnlyFlowNodes } from '../../../helpers/JsonTestUtils'; +import type { TMultiInstanceLoopCharacteristics, TStandardLoopCharacteristics } from '@lib/model/bpmn/json/baseElement/loopCharacteristics'; +import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + import { getExpectedMarkers, verifyShape } from '../../../helpers/bpmn-model-expect'; +import { parseJsonAndExpectOnlyFlowNodes } from '../../../helpers/JsonTestUtils'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; -import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; -import type { TMultiInstanceLoopCharacteristics, TStandardLoopCharacteristics } from '@lib/model/bpmn/json/baseElement/loopCharacteristics'; import { ShapeBpmnCallActivityKind, ShapeBpmnElementKind, ShapeBpmnMarkerKind } from '@lib/model/bpmn/internal'; describe.each([ diff --git a/test/unit/component/parser/json/BpmnJsonParser.messageFlow.test.ts b/test/unit/component/parser/json/BpmnJsonParser.messageFlow.test.ts index 74332c1107..aabadd3a03 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.messageFlow.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.messageFlow.test.ts @@ -15,19 +15,20 @@ limitations under the License. */ /** Internal model */ +import type { BuildProcessParameter, BuildEventsParameter, OtherBuildEventKind } from '../../../helpers/JsonBuilder'; +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + +import { verifyEdge } from '../../../helpers/bpmn-model-expect'; +import { buildDefinitions, EventDefinitionOn } from '../../../helpers/JsonBuilder'; +import { parseJson, parseJsonAndExpectOnlyEdges } from '../../../helpers/JsonTestUtils'; + +/** Json model */ import { ShapeBpmnElementKind, ShapeUtil } from '@lib/model/bpmn/internal'; import { Waypoint } from '@lib/model/bpmn/internal/edge/edge'; import { MessageVisibleKind } from '@lib/model/bpmn/internal/edge/kinds'; - -/** Json model */ -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; import * as bpmndi from '@lib/model/bpmn/json/bpmndi'; /** Test utils */ -import { parseJson, parseJsonAndExpectOnlyEdges } from '../../../helpers/JsonTestUtils'; -import type { BuildProcessParameter, BuildEventsParameter, OtherBuildEventKind } from '../../../helpers/JsonBuilder'; -import { buildDefinitions, EventDefinitionOn } from '../../../helpers/JsonBuilder'; -import { verifyEdge } from '../../../helpers/bpmn-model-expect'; describe('parse bpmn as json for message flow', () => { it(`should convert as Edge, when an message flow is an attribute (as object) of 'collaboration' (as object)`, () => { diff --git a/test/unit/component/parser/json/BpmnJsonParser.process.test.ts b/test/unit/component/parser/json/BpmnJsonParser.process.test.ts index 5baa5708bd..3983676caa 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.process.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.process.test.ts @@ -14,13 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { buildDefinitions } from '../../../helpers/JsonBuilder'; -import { parseJsonAndExpect, parseJsonAndExpectOnlyPools, parseJsonAndExpectOnlyPoolsAndFlowNodes, parseJsonAndExpectOnlyPoolsAndLanes } from '../../../helpers/JsonTestUtils'; import type { ExpectedShape } from '../../../helpers/bpmn-model-expect'; +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + import { verifyShape } from '../../../helpers/bpmn-model-expect'; +import { buildDefinitions } from '../../../helpers/JsonBuilder'; +import { parseJsonAndExpect, parseJsonAndExpectOnlyPools, parseJsonAndExpectOnlyPoolsAndFlowNodes, parseJsonAndExpectOnlyPoolsAndLanes } from '../../../helpers/JsonTestUtils'; import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; describe('parse bpmn as json for process/pool', () => { describe.each([ diff --git a/test/unit/component/parser/json/BpmnJsonParser.sequenceFlow.conditional.test.ts b/test/unit/component/parser/json/BpmnJsonParser.sequenceFlow.conditional.test.ts index a3dafe55ef..08010627ae 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.sequenceFlow.conditional.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.sequenceFlow.conditional.test.ts @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { parseJsonAndExpectOnlyEdgesAndFlowNodes } from '../../../helpers/JsonTestUtils'; +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + import { verifyEdge } from '../../../helpers/bpmn-model-expect'; +import { parseJsonAndExpectOnlyEdgesAndFlowNodes } from '../../../helpers/JsonTestUtils'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; import { SequenceFlowKind } from '@lib/model/bpmn/internal'; import { Waypoint } from '@lib/model/bpmn/internal/edge/edge'; diff --git a/test/unit/component/parser/json/BpmnJsonParser.sequenceFlow.default.test.ts b/test/unit/component/parser/json/BpmnJsonParser.sequenceFlow.default.test.ts index 4a7b6157bd..f0304c98c0 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.sequenceFlow.default.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.sequenceFlow.default.test.ts @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { parseJsonAndExpectOnlyEdgesAndFlowNodes } from '../../../helpers/JsonTestUtils'; +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + import { verifyEdge } from '../../../helpers/bpmn-model-expect'; +import { parseJsonAndExpectOnlyEdgesAndFlowNodes } from '../../../helpers/JsonTestUtils'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; import { SequenceFlowKind } from '@lib/model/bpmn/internal'; import { Waypoint } from '@lib/model/bpmn/internal/edge/edge'; diff --git a/test/unit/component/parser/json/BpmnJsonParser.sequenceFlow.normal.test.ts b/test/unit/component/parser/json/BpmnJsonParser.sequenceFlow.normal.test.ts index b094261106..52c5db6189 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.sequenceFlow.normal.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.sequenceFlow.normal.test.ts @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { parseJsonAndExpectOnlyEdges } from '../../../helpers/JsonTestUtils'; +import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + import { verifyEdge } from '../../../helpers/bpmn-model-expect'; +import { parseJsonAndExpectOnlyEdges } from '../../../helpers/JsonTestUtils'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; import { Waypoint } from '@lib/model/bpmn/internal/edge/edge'; -import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; describe('parse bpmn as json for sequence flow', () => { const processWithSequenceFlowAsObject = { diff --git a/test/unit/component/parser/json/BpmnJsonParser.sub.process.test.ts b/test/unit/component/parser/json/BpmnJsonParser.sub.process.test.ts index 52a90a6bb3..ade093a2f3 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.sub.process.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.sub.process.test.ts @@ -14,7 +14,14 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { ExpectedActivityShape, ExpectedBounds, ExpectedShape } from '../../../helpers/bpmn-model-expect'; import type { BuildProcessParameter } from '../../../helpers/JsonBuilder'; +import type BpmnModel from '@lib/model/bpmn/internal/BpmnModel'; +import type Shape from '@lib/model/bpmn/internal/shape/Shape'; +import type { ShapeBpmnEvent } from '@lib/model/bpmn/internal/shape/ShapeBpmnElement'; +import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; + +import { getExpectedMarkers, verifyEdge, verifyShape } from '../../../helpers/bpmn-model-expect'; import { buildDefinitions } from '../../../helpers/JsonBuilder'; import { parseJson, @@ -24,15 +31,9 @@ import { verifySubProcess, } from '../../../helpers/JsonTestUtils'; import { getEventShapes } from '../../../helpers/TestUtils'; -import type { ExpectedActivityShape, ExpectedBounds, ExpectedShape } from '../../../helpers/bpmn-model-expect'; -import { getExpectedMarkers, verifyEdge, verifyShape } from '../../../helpers/bpmn-model-expect'; -import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; -import type BpmnModel from '@lib/model/bpmn/internal/BpmnModel'; -import { Waypoint } from '@lib/model/bpmn/internal/edge/edge'; import { ShapeBpmnElementKind, ShapeBpmnEventDefinitionKind, ShapeBpmnMarkerKind, ShapeBpmnSubProcessKind } from '@lib/model/bpmn/internal'; -import type { ShapeBpmnEvent } from '@lib/model/bpmn/internal/shape/ShapeBpmnElement'; -import type Shape from '@lib/model/bpmn/internal/shape/Shape'; +import { Waypoint } from '@lib/model/bpmn/internal/edge/edge'; function expectNoPoolLane(model: BpmnModel): void { expect(model.lanes).toHaveLength(0); diff --git a/test/unit/component/parser/json/BpmnJsonParser.text.annotation.test.ts b/test/unit/component/parser/json/BpmnJsonParser.text.annotation.test.ts index 1b683a5fab..93e8e4bab4 100644 --- a/test/unit/component/parser/json/BpmnJsonParser.text.annotation.test.ts +++ b/test/unit/component/parser/json/BpmnJsonParser.text.annotation.test.ts @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { buildDefinitions } from '../../../helpers/JsonBuilder'; -import type { BuildProcessParameter } from '../../../helpers/JsonBuilder'; -import { parseJsonAndExpectOnlyEdgesAndFlowNodes, parseJsonAndExpectOnlyFlowNodes } from '../../../helpers/JsonTestUtils'; import type { ExpectedShape } from '../../../helpers/bpmn-model-expect'; +import type { BuildProcessParameter } from '../../../helpers/JsonBuilder'; + import { verifyShape } from '../../../helpers/bpmn-model-expect'; +import { buildDefinitions } from '../../../helpers/JsonBuilder'; +import { parseJsonAndExpectOnlyEdgesAndFlowNodes, parseJsonAndExpectOnlyFlowNodes } from '../../../helpers/JsonTestUtils'; import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; diff --git a/test/unit/component/parser/parsing-messages.test.ts b/test/unit/component/parser/parsing-messages.test.ts index 9a66b5cce4..4b46a68efb 100644 --- a/test/unit/component/parser/parsing-messages.test.ts +++ b/test/unit/component/parser/parsing-messages.test.ts @@ -14,8 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; -import { ParsingMessageCollector } from '@lib/component/parser/parsing-messages'; import { EdgeUnknownBpmnElementWarning, GroupUnknownCategoryValueWarning, @@ -24,6 +22,8 @@ import { ShapeUnknownBpmnElementWarning, BoundaryEventNotAttachedToActivityWarning, } from '@lib/component/parser/json/warnings'; +import { ParsingMessageCollector } from '@lib/component/parser/parsing-messages'; +import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; describe('parsing message collector', () => { jest.spyOn(console, 'warn').mockImplementation(() => { diff --git a/test/unit/component/parser/xml/BpmnXmlParser.00.special.parsing.cases.test.ts b/test/unit/component/parser/xml/BpmnXmlParser.00.special.parsing.cases.test.ts index 8e4b8efe4f..950a2cd646 100644 --- a/test/unit/component/parser/xml/BpmnXmlParser.00.special.parsing.cases.test.ts +++ b/test/unit/component/parser/xml/BpmnXmlParser.00.special.parsing.cases.test.ts @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { readFileSync } from '@test/shared/file-helper'; -import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import type { BPMNDiagram, BPMNLabel, BPMNShape } from '@lib/model/bpmn/json/bpmndi'; + +import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import Bounds from '@lib/model/bpmn/internal/Bounds'; +import { readFileSync } from '@test/shared/file-helper'; describe('Special parsing cases', () => { it('Parse a text file', () => { diff --git a/test/unit/component/parser/xml/BpmnXmlParser.activiti.5_14_1.test.ts b/test/unit/component/parser/xml/BpmnXmlParser.activiti.5_14_1.test.ts index ecf320da7d..cea1cf0369 100644 --- a/test/unit/component/parser/xml/BpmnXmlParser.activiti.5_14_1.test.ts +++ b/test/unit/component/parser/xml/BpmnXmlParser.activiti.5_14_1.test.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; import type { BPMNDiagram } from '@lib/model/bpmn/json/bpmndi'; + +import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import { readFileSync } from '@test/shared/file-helper'; describe('parse bpmn as xml for Activiti Designer 5.14.1', () => { diff --git a/test/unit/component/parser/xml/BpmnXmlParser.adonis-np.8_0.test.ts b/test/unit/component/parser/xml/BpmnXmlParser.adonis-np.8_0.test.ts index b7f83d225a..39493dffd1 100644 --- a/test/unit/component/parser/xml/BpmnXmlParser.adonis-np.8_0.test.ts +++ b/test/unit/component/parser/xml/BpmnXmlParser.adonis-np.8_0.test.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; import type { BPMNDiagram } from '@lib/model/bpmn/json/bpmndi'; + +import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import { readFileSync } from '@test/shared/file-helper'; describe('parse bpmn as xml for ADONIS NP 8.0', () => { diff --git a/test/unit/component/parser/xml/BpmnXmlParser.bic-cloud-design.6_2_0.test.ts b/test/unit/component/parser/xml/BpmnXmlParser.bic-cloud-design.6_2_0.test.ts index 2984af9e56..c5e755eb46 100644 --- a/test/unit/component/parser/xml/BpmnXmlParser.bic-cloud-design.6_2_0.test.ts +++ b/test/unit/component/parser/xml/BpmnXmlParser.bic-cloud-design.6_2_0.test.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; -import type { BPMNDiagram } from '@lib/model/bpmn/json/bpmndi'; import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; +import type { BPMNDiagram } from '@lib/model/bpmn/json/bpmndi'; + +import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import { readFileSync } from '@test/shared/file-helper'; describe('parse bpmn as xml for bic cloud design', () => { diff --git a/test/unit/component/parser/xml/BpmnXmlParser.bizagi-modeler.2_8_0_8.test.ts b/test/unit/component/parser/xml/BpmnXmlParser.bizagi-modeler.2_8_0_8.test.ts index 3893d6a82b..3cb3d13b19 100644 --- a/test/unit/component/parser/xml/BpmnXmlParser.bizagi-modeler.2_8_0_8.test.ts +++ b/test/unit/component/parser/xml/BpmnXmlParser.bizagi-modeler.2_8_0_8.test.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; import type { BPMNDiagram } from '@lib/model/bpmn/json/bpmndi'; + +import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import { readFileSync } from '@test/shared/file-helper'; describe('parse bpmn as xml for Bizagi Modeler 2.8.0.8', () => { diff --git a/test/unit/component/parser/xml/BpmnXmlParser.bonita-community.2021_1.test.ts b/test/unit/component/parser/xml/BpmnXmlParser.bonita-community.2021_1.test.ts index 3183d8a27a..70a54cc518 100644 --- a/test/unit/component/parser/xml/BpmnXmlParser.bonita-community.2021_1.test.ts +++ b/test/unit/component/parser/xml/BpmnXmlParser.bonita-community.2021_1.test.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; import type { BPMNDiagram } from '@lib/model/bpmn/json/bpmndi'; + +import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import { readFileSync } from '@test/shared/file-helper'; describe('parse bpmn as xml for Bonita Community 2021.1', () => { diff --git a/test/unit/component/parser/xml/BpmnXmlParser.bpmn-plus-composer.v_10_4.test.ts b/test/unit/component/parser/xml/BpmnXmlParser.bpmn-plus-composer.v_10_4.test.ts index 2f2b16c17a..62eda09872 100644 --- a/test/unit/component/parser/xml/BpmnXmlParser.bpmn-plus-composer.v_10_4.test.ts +++ b/test/unit/component/parser/xml/BpmnXmlParser.bpmn-plus-composer.v_10_4.test.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; import type { BPMNDiagram } from '@lib/model/bpmn/json/bpmndi'; + +import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import { readFileSync } from '@test/shared/file-helper'; describe('parse bpmn as xml for BPMN+ Composer V.10.4', () => { diff --git a/test/unit/component/parser/xml/BpmnXmlParser.camuda-eclipse-plugin.3_0_0.test.ts b/test/unit/component/parser/xml/BpmnXmlParser.camuda-eclipse-plugin.3_0_0.test.ts index e08b35b14f..2f8cf1ea95 100644 --- a/test/unit/component/parser/xml/BpmnXmlParser.camuda-eclipse-plugin.3_0_0.test.ts +++ b/test/unit/component/parser/xml/BpmnXmlParser.camuda-eclipse-plugin.3_0_0.test.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; import type { BPMNDiagram } from '@lib/model/bpmn/json/bpmndi'; + +import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import { readFileSync } from '@test/shared/file-helper'; describe('parse bpmn as xml for Camunda Eclipse Plugin 3.0.0', () => { diff --git a/test/unit/component/parser/xml/BpmnXmlParser.miwg.test.ts b/test/unit/component/parser/xml/BpmnXmlParser.miwg.test.ts index 80a887c2b1..70bd130b7d 100644 --- a/test/unit/component/parser/xml/BpmnXmlParser.miwg.test.ts +++ b/test/unit/component/parser/xml/BpmnXmlParser.miwg.test.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; -import type { BPMNDiagram } from '@lib/model/bpmn/json/bpmndi'; import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; +import type { BPMNDiagram } from '@lib/model/bpmn/json/bpmndi'; + +import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import { readFileSync } from '@test/shared/file-helper'; describe('parse bpmn as xml for MIWG', () => { diff --git a/test/unit/component/parser/xml/BpmnXmlParser.omnitracker-bpmn.11_5.test.ts b/test/unit/component/parser/xml/BpmnXmlParser.omnitracker-bpmn.11_5.test.ts index 670e4c17dd..7b91d4d257 100644 --- a/test/unit/component/parser/xml/BpmnXmlParser.omnitracker-bpmn.11_5.test.ts +++ b/test/unit/component/parser/xml/BpmnXmlParser.omnitracker-bpmn.11_5.test.ts @@ -14,9 +14,10 @@ See the License for the specific language governing permissions and limitations under the License. */ -import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; import type { BPMNDiagram } from '@lib/model/bpmn/json/bpmndi'; + +import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; import { readFileSync } from '@test/shared/file-helper'; describe('parse bpmn as xml for OMNITRACKER BPMN 11.5', () => { diff --git a/test/unit/component/parser/xml/BpmnXmlParser.trisotech-bpmn-modeler.6_2_0.test.ts b/test/unit/component/parser/xml/BpmnXmlParser.trisotech-bpmn-modeler.6_2_0.test.ts index e1157085f2..80be157bf9 100644 --- a/test/unit/component/parser/xml/BpmnXmlParser.trisotech-bpmn-modeler.6_2_0.test.ts +++ b/test/unit/component/parser/xml/BpmnXmlParser.trisotech-bpmn-modeler.6_2_0.test.ts @@ -14,14 +14,15 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { readFileSync } from '@test/shared/file-helper'; -import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; -import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; +import type { TSequenceFlow } from '@lib/model/bpmn/json/baseElement/flowElement'; import type { TSubProcess } from '@lib/model/bpmn/json/baseElement/flowNode/activity/activity'; -import { ensureIsArray } from '@lib/component/helpers/array-utils'; -import type { TStartEvent } from '@lib/model/bpmn/json/baseElement/flowNode/event'; import type { TTask } from '@lib/model/bpmn/json/baseElement/flowNode/activity/task'; -import type { TSequenceFlow } from '@lib/model/bpmn/json/baseElement/flowElement'; +import type { TStartEvent } from '@lib/model/bpmn/json/baseElement/flowNode/event'; +import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; + +import { ensureIsArray } from '@lib/component/helpers/array-utils'; +import BpmnXmlParser from '@lib/component/parser/xml/BpmnXmlParser'; +import { readFileSync } from '@test/shared/file-helper'; describe('parse bpmn as xml for Trisotech BPMN Modeler 6.2.0', () => { it('bpmn with process with extension, ensure elements are present', () => { diff --git a/test/unit/component/registry/bpmn-model-filters.test.ts b/test/unit/component/registry/bpmn-model-filters.test.ts index 48dfe613c4..d76988bab1 100644 --- a/test/unit/component/registry/bpmn-model-filters.test.ts +++ b/test/unit/component/registry/bpmn-model-filters.test.ts @@ -14,15 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ModelFiltering } from '@lib/component/registry/bpmn-model-filters'; -import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; -import type Shape from '@lib/model/bpmn/internal/shape/Shape'; -import type { Edge } from '@lib/model/bpmn/internal/edge/edge'; +import type { ExpectedEdge, ExpectedShape } from '../../helpers/bpmn-model-expect'; import type { ModelFilter } from '@lib/component/options'; +import type { Edge } from '@lib/model/bpmn/internal/edge/edge'; +import type Shape from '@lib/model/bpmn/internal/shape/Shape'; -import { buildEdgeId, buildShapeId, poolInModel, toBpmnModel } from '../../helpers/bpmn-model-utils'; -import type { ExpectedEdge, ExpectedShape } from '../../helpers/bpmn-model-expect'; import { verifyEdge as baseVerifyEdge, verifyShape as baseVerifyShape } from '../../helpers/bpmn-model-expect'; +import { buildEdgeId, buildShapeId, poolInModel, toBpmnModel } from '../../helpers/bpmn-model-utils'; + +import { ModelFiltering } from '@lib/component/registry/bpmn-model-filters'; +import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; // use a single instance to detect any side effects const modelFiltering = new ModelFiltering(); diff --git a/test/unit/component/registry/bpmn-model-registry.test.ts b/test/unit/component/registry/bpmn-model-registry.test.ts index 8ca73cd155..71ce11bf9b 100644 --- a/test/unit/component/registry/bpmn-model-registry.test.ts +++ b/test/unit/component/registry/bpmn-model-registry.test.ts @@ -15,9 +15,11 @@ limitations under the License. */ import type { EdgeBpmnSemantic, ShapeBpmnSemantic } from '@lib/component/registry'; + +import { associationFlowInModel, laneInModel, messageFlowInModel, poolInModel, sequenceFlowInModel, startEventInModel } from '../../helpers/bpmn-model-utils'; + import { BpmnModelRegistry } from '@lib/component/registry/bpmn-model-registry'; import { expectAssociationFlow, expectLane, expectMessageFlow, expectPool, expectSequenceFlow, expectStartEvent } from '@test/shared/model/bpmn-semantic-utils'; -import { associationFlowInModel, laneInModel, messageFlowInModel, poolInModel, sequenceFlowInModel, startEventInModel } from '../../helpers/bpmn-model-utils'; const bpmnModelRegistry = new BpmnModelRegistry(); diff --git a/test/unit/helpers/JsonBuilder.test.ts b/test/unit/helpers/JsonBuilder.test.ts index 8a28620f7a..95e63205cc 100644 --- a/test/unit/helpers/JsonBuilder.test.ts +++ b/test/unit/helpers/JsonBuilder.test.ts @@ -14,12 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { tAssociationDirection } from '@lib/model/bpmn/json/baseElement/artifact'; -import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; - import type { BuildEventDefinitionParameter, OtherBuildEventKind, BuildTaskKind, BuildGatewayKind, BpmnGlobalTaskKind } from './JsonBuilder'; + import { buildDefinitions, EventDefinitionOn } from './JsonBuilder'; +import { ShapeBpmnElementKind } from '@lib/model/bpmn/internal'; +import { tAssociationDirection } from '@lib/model/bpmn/json/baseElement/artifact'; + describe('build json', () => { it('build json of definitions containing one empty process', () => { const json = buildDefinitions({ diff --git a/test/unit/helpers/JsonBuilder.ts b/test/unit/helpers/JsonBuilder.ts index be7b49547f..1ea4e22879 100644 --- a/test/unit/helpers/JsonBuilder.ts +++ b/test/unit/helpers/JsonBuilder.ts @@ -14,20 +14,17 @@ See the License for the specific language governing permissions and limitations under the License. */ -import type { TTextAnnotation } from '@lib/model/bpmn/json/baseElement/artifact'; -import type { TGlobalTask } from '@lib/model/bpmn/json/baseElement/rootElement/globalTask'; -import type { TArtifact } from '@lib/model/bpmn/json/baseElement/artifact'; -import type { TAssociation } from '@lib/model/bpmn/json/baseElement/artifact'; -import type { DiagramElement } from '@lib/model/bpmn/json/di'; +import type { TTextAnnotation, TArtifact, TAssociation } from '@lib/model/bpmn/json/baseElement/artifact'; import type { TBaseElement, TLane, TLaneSet, TMessageFlow } from '@lib/model/bpmn/json/baseElement/baseElement'; -import type { TFlowElement } from '@lib/model/bpmn/json/baseElement/flowElement'; -import type { TFlowNode } from '@lib/model/bpmn/json/baseElement/flowElement'; +import type { TFlowElement, TFlowNode } from '@lib/model/bpmn/json/baseElement/flowElement'; import type { TBoundaryEvent, TCatchEvent, TThrowEvent } from '@lib/model/bpmn/json/baseElement/flowNode/event'; import type { TCollaboration } from '@lib/model/bpmn/json/baseElement/rootElement/collaboration'; import type { TEventDefinition } from '@lib/model/bpmn/json/baseElement/rootElement/eventDefinition'; +import type { TGlobalTask } from '@lib/model/bpmn/json/baseElement/rootElement/globalTask'; import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; import type { BpmnJsonModel, TDefinitions } from '@lib/model/bpmn/json/bpmn20'; import type { BPMNEdge, BPMNPlane, BPMNShape } from '@lib/model/bpmn/json/bpmndi'; +import type { DiagramElement } from '@lib/model/bpmn/json/di'; type BuildProcessElementParameter = (Pick | Pick) & { index: number; diff --git a/test/unit/helpers/JsonTestUtils.ts b/test/unit/helpers/JsonTestUtils.ts index ae1f70307b..8658e3235e 100644 --- a/test/unit/helpers/JsonTestUtils.ts +++ b/test/unit/helpers/JsonTestUtils.ts @@ -14,15 +14,16 @@ See the License for the specific language governing permissions and limitations under the License. */ +import type { ExpectedBounds, ExpectedFont, ExpectedLabel } from './bpmn-model-expect'; +import type { JsonParsingWarning } from '@lib/component/parser/parsing-messages'; import type { ShapeBpmnSubProcessKind, ShapeBpmnEventDefinitionKind } from '@lib/model/bpmn/internal'; -import { newBpmnJsonParser } from '@lib/component/parser/json/BpmnJsonParser'; import type BpmnModel from '@lib/model/bpmn/internal/BpmnModel'; -import { ShapeBpmnEvent, ShapeBpmnSubProcess } from '@lib/model/bpmn/internal/shape/ShapeBpmnElement'; import type Label from '@lib/model/bpmn/internal/Label'; import type { BpmnJsonModel } from '@lib/model/bpmn/json/bpmn20'; -import type { JsonParsingWarning } from '@lib/component/parser/parsing-messages'; + +import { newBpmnJsonParser } from '@lib/component/parser/json/BpmnJsonParser'; import { ParsingMessageCollector } from '@lib/component/parser/parsing-messages'; -import type { ExpectedBounds, ExpectedFont, ExpectedLabel } from './bpmn-model-expect'; +import { ShapeBpmnEvent, ShapeBpmnSubProcess } from '@lib/model/bpmn/internal/shape/ShapeBpmnElement'; class ParsingMessageCollectorTester extends ParsingMessageCollector { private warnings: JsonParsingWarning[] = []; diff --git a/test/unit/helpers/TestUtils.ts b/test/unit/helpers/TestUtils.ts index c07232bb1c..dd5b4e9042 100644 --- a/test/unit/helpers/TestUtils.ts +++ b/test/unit/helpers/TestUtils.ts @@ -14,10 +14,11 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { ShapeBpmnElementKind, ShapeUtil } from '@lib/model/bpmn/internal'; import type BpmnModel from '@lib/model/bpmn/internal/BpmnModel'; import type Shape from '@lib/model/bpmn/internal/shape/Shape'; +import { ShapeBpmnElementKind, ShapeUtil } from '@lib/model/bpmn/internal'; + export const shapeBpmnElementKindForLabelTests = Object.values(ShapeBpmnElementKind) .filter(kind => !ShapeUtil.isPoolOrLane(kind)) // group as label is managed by category diff --git a/test/unit/helpers/bpmn-model-expect.ts b/test/unit/helpers/bpmn-model-expect.ts index 7433f9c8e8..04ad03a99b 100644 --- a/test/unit/helpers/bpmn-model-expect.ts +++ b/test/unit/helpers/bpmn-model-expect.ts @@ -15,15 +15,16 @@ limitations under the License. */ import type { GlobalTaskKind, ShapeBpmnCallActivityKind, ShapeBpmnElementKind, ShapeBpmnEventDefinitionKind } from '@lib/model/bpmn/internal'; -import { FlowKind, MessageVisibleKind, SequenceFlowKind, ShapeBpmnMarkerKind, ShapeBpmnSubProcessKind } from '@lib/model/bpmn/internal'; import type BpmnModel from '@lib/model/bpmn/internal/BpmnModel'; import type { Edge, Waypoint } from '@lib/model/bpmn/internal/edge/edge'; import type Shape from '@lib/model/bpmn/internal/shape/Shape'; -import { ShapeBpmnActivity, ShapeBpmnBoundaryEvent, ShapeBpmnCallActivity, ShapeBpmnEvent } from '@lib/model/bpmn/internal/shape/ShapeBpmnElement'; -import { SequenceFlow } from '@lib/model/bpmn/internal/edge/flows'; import type { EdgeExtensions, LabelExtensions, ShapeExtensions } from '@lib/model/bpmn/internal/types'; import type { TProcess } from '@lib/model/bpmn/json/baseElement/rootElement/rootElement'; +import { FlowKind, MessageVisibleKind, SequenceFlowKind, ShapeBpmnMarkerKind, ShapeBpmnSubProcessKind } from '@lib/model/bpmn/internal'; +import { SequenceFlow } from '@lib/model/bpmn/internal/edge/flows'; +import { ShapeBpmnActivity, ShapeBpmnBoundaryEvent, ShapeBpmnCallActivity, ShapeBpmnEvent } from '@lib/model/bpmn/internal/shape/ShapeBpmnElement'; + export interface ExpectedShape { shapeId: string; bpmnElementId: string; diff --git a/test/unit/helpers/bpmn-model-utils.ts b/test/unit/helpers/bpmn-model-utils.ts index bcbf1fa02f..f7daa25603 100644 --- a/test/unit/helpers/bpmn-model-utils.ts +++ b/test/unit/helpers/bpmn-model-utils.ts @@ -15,6 +15,9 @@ limitations under the License. */ import type BpmnModel from '@lib/model/bpmn/internal/BpmnModel'; + +import { ensureIsArray } from '@lib/component/helpers/array-utils'; +import { ShapeBpmnCallActivityKind, ShapeBpmnElementKind, ShapeBpmnEventDefinitionKind, ShapeBpmnMarkerKind, ShapeBpmnSubProcessKind } from '@lib/model/bpmn/internal'; import { Edge } from '@lib/model/bpmn/internal/edge/edge'; import { AssociationFlow, MessageFlow, SequenceFlow } from '@lib/model/bpmn/internal/edge/flows'; import Shape from '@lib/model/bpmn/internal/shape/Shape'; @@ -25,8 +28,6 @@ import ShapeBpmnElement, { ShapeBpmnStartEvent, ShapeBpmnSubProcess, } from '@lib/model/bpmn/internal/shape/ShapeBpmnElement'; -import { ShapeBpmnCallActivityKind, ShapeBpmnElementKind, ShapeBpmnEventDefinitionKind, ShapeBpmnMarkerKind, ShapeBpmnSubProcessKind } from '@lib/model/bpmn/internal'; -import { ensureIsArray } from '@lib/component/helpers/array-utils'; const newBpmnModel = (): BpmnModel => ({ edges: [], diff --git a/vite.config.js b/vite.config.js index b3c78a8935..0897b8e342 100644 --- a/vite.config.js +++ b/vite.config.js @@ -15,6 +15,7 @@ limitations under the License. */ import { resolve } from 'node:path'; + import { defineConfig } from 'vite'; export default defineConfig(({ mode }) => { From 121dd193dfd068cecc26818b3857508f9997d975 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 17:40:15 +0200 Subject: [PATCH 16/23] revert bad change --- scripts/docs.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/docs.mjs b/scripts/docs.mjs index fa04df1772..59e06d43b8 100644 --- a/scripts/docs.mjs +++ b/scripts/docs.mjs @@ -17,7 +17,8 @@ limitations under the License. import { readFileSync } from 'node:fs'; import asciidoctor from '@asciidoctor/core'; -import { copySync, ensureDirSync, removeSync } from 'fs-extra'; +// eslint-disable-next-line import/no-unresolved +import { copySync, ensureDirSync, removeSync } from 'fs-extra/esm'; function log(...data) { // eslint-disable-next-line no-console From fdda22f603085829acd6234b009c5271ffb6eafa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 17:45:41 +0200 Subject: [PATCH 17/23] revert bad change --- rollup.config.mjs | 3 ++- scripts/utils/rollup.config.mjs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/rollup.config.mjs b/rollup.config.mjs index 5605d04edf..dddc0bbafd 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -21,7 +21,8 @@ import commonjs from '@rollup/plugin-commonjs'; // at least, needed to bundle mx import resolve from '@rollup/plugin-node-resolve'; import terser from '@rollup/plugin-terser'; import cleanup from 'rollup-plugin-cleanup'; -import externals from 'rollup-plugin-node-externals/dist'; +// eslint-disable-next-line import/no-unresolved +import externals from 'rollup-plugin-node-externals'; import sizes from 'rollup-plugin-sizes'; import typescript from 'rollup-plugin-typescript2'; diff --git a/scripts/utils/rollup.config.mjs b/scripts/utils/rollup.config.mjs index 870efc6d3d..4c98a17944 100644 --- a/scripts/utils/rollup.config.mjs +++ b/scripts/utils/rollup.config.mjs @@ -14,7 +14,8 @@ See the License for the specific language governing permissions and limitations under the License. */ -import externals from 'rollup-plugin-node-externals/dist'; +// eslint-disable-next-line import/no-unresolved +import externals from 'rollup-plugin-node-externals'; import typescript from 'rollup-plugin-typescript2'; export default { From 1727933d25c27341977fa69dfb0f0e2e52a46bb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Fri, 1 Sep 2023 17:45:56 +0200 Subject: [PATCH 18/23] ignore require --- test/shared/visu/bpmn-page-utils.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/shared/visu/bpmn-page-utils.ts b/test/shared/visu/bpmn-page-utils.ts index c805c7db8c..bac7568840 100644 --- a/test/shared/visu/bpmn-page-utils.ts +++ b/test/shared/visu/bpmn-page-utils.ts @@ -20,18 +20,20 @@ limitations under the License. import type { StyleUpdate } from '@lib/component/registry'; import type { PageWaitForSelectorOptions } from 'expect-playwright'; +import 'expect-playwright'; import type { ElementHandle, Page } from 'playwright'; import debugLogger from 'debug'; -import 'expect-playwright'; - +// eslint-disable-next-line @typescript-eslint/ban-ts-comment +// @ts-ignore import envUtils = require('../environment-utils.cjs'); import { delay } from './test-utils'; -import { type LoadOptions, FitType, ZoomType } from '@lib/component/options'; +import { FitType, type LoadOptions, ZoomType } from '@lib/component/options'; import { BpmnQuerySelectorsForTests } from '@test/shared/query-selectors'; + // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore js file with commonjs export From 713799acfb96ac0658df29a8a91509c5c5f11c4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Mon, 4 Sep 2023 16:21:25 +0200 Subject: [PATCH 19/23] fix package.json declaration --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index cd379051c8..42bcc8474b 100644 --- a/package.json +++ b/package.json @@ -124,8 +124,8 @@ "debug": "~4.3.4", "eslint": "~8.48.0", "eslint-config-prettier": "~9.0.0", - "eslint-import-resolver-typescript": "^3.6.0", - "eslint-plugin-import": "^2.28.1", + "eslint-import-resolver-typescript": "~3.6.0", + "eslint-plugin-import": "~2.28.1", "eslint-plugin-jest": "~27.2.3", "eslint-plugin-jest-extended": "^2.0.0", "eslint-plugin-notice": "~0.9.10", From d540ffcba0e5e2319cd879a5116834f3b08765af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Mon, 4 Sep 2023 16:24:10 +0200 Subject: [PATCH 20/23] move comments --- rollup.config.mjs | 5 ++--- scripts/generate-types-for-not-supported-ts-versions.mjs | 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/rollup.config.mjs b/rollup.config.mjs index dddc0bbafd..fb0915928e 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -14,9 +14,6 @@ See the License for the specific language governing permissions and limitations under the License. */ -// generate warning when running with Node 18 -// (node:75278) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time - import commonjs from '@rollup/plugin-commonjs'; // at least, needed to bundle mxGraph which is only available as a CommonJS module import resolve from '@rollup/plugin-node-resolve'; import terser from '@rollup/plugin-terser'; @@ -26,6 +23,8 @@ import externals from 'rollup-plugin-node-externals'; import sizes from 'rollup-plugin-sizes'; import typescript from 'rollup-plugin-typescript2'; +// generate warning when running with Node 18 +// (node:75278) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time import pkg from './package.json' assert { type: 'json' }; import { computeBanner } from './scripts/shared/banner.mjs'; diff --git a/scripts/generate-types-for-not-supported-ts-versions.mjs b/scripts/generate-types-for-not-supported-ts-versions.mjs index 20a881fd87..e5fe045b6d 100644 --- a/scripts/generate-types-for-not-supported-ts-versions.mjs +++ b/scripts/generate-types-for-not-supported-ts-versions.mjs @@ -16,11 +16,11 @@ limitations under the License. import * as fs from 'node:fs'; +// generate warning when running with Node 18 +// (node:75278) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time import packageJSON from '../package.json' assert { type: 'json' }; import { getTypeFilesInformation } from './shared/types-info.mjs'; -// generate warning when running with Node 18 -// (node:75278) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time // generate a definition file for not supported TS versions. It provokes syntax error to show an explicit message about what are the supported versions. // inspired from https://github.com/graphql/graphql-js/blob/743f42b6ef6006d35bf9e0b45e3b70d6e9100596/resources/build-npm.ts#L86-L97 From 26caaee694b7087e8f8e7a843471c2f8584643d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Mon, 4 Sep 2023 16:28:10 +0200 Subject: [PATCH 21/23] Change the way to fix in /test/typescript-support/src/index.ts: Unable to resolve path to module 'bpmn-visualization' import/no-unresolved --- .eslintrc.cjs | 6 ------ test/typescript-support/src/index.ts | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.eslintrc.cjs b/.eslintrc.cjs index a765fdfa49..a38b3f05cc 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -101,12 +101,6 @@ module.exports = { '@typescript-eslint/consistent-type-imports': ['error'], // We choose to disable it and choose later if we want to enable it. See https://github.com/process-analytics/bpmn-visualization-js/pull/2821. '@typescript-eslint/consistent-type-definitions': 'off', - 'import/no-unresolved': [ - 'error', - { - ignore: ['^bpmn-visualization$'], - }, - ], }, }, ], diff --git a/test/typescript-support/src/index.ts b/test/typescript-support/src/index.ts index eaf3215706..838f454e3d 100644 --- a/test/typescript-support/src/index.ts +++ b/test/typescript-support/src/index.ts @@ -14,6 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ +// eslint-disable-next-line import/no-unresolved import { BpmnVisualization } from 'bpmn-visualization'; const bpmnVisualization = new BpmnVisualization({ container: 'bpmn-container' }); From 68b84ff407d5f9efc3f2cc73077f0bdc4a4cc003 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= <4921914+csouchet@users.noreply.github.com> Date: Wed, 6 Sep 2023 10:35:33 +0200 Subject: [PATCH 22/23] Apply suggestions from code review --- rollup.config.mjs | 2 +- scripts/generate-types-for-not-supported-ts-versions.mjs | 3 --- test/typescript-support/src/index.ts | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/rollup.config.mjs b/rollup.config.mjs index fb0915928e..269d548d6a 100644 --- a/rollup.config.mjs +++ b/rollup.config.mjs @@ -18,7 +18,7 @@ import commonjs from '@rollup/plugin-commonjs'; // at least, needed to bundle mx import resolve from '@rollup/plugin-node-resolve'; import terser from '@rollup/plugin-terser'; import cleanup from 'rollup-plugin-cleanup'; -// eslint-disable-next-line import/no-unresolved +// eslint-disable-next-line import/no-unresolved -- The package is malformed. So, the rule doesn't resolve it. import externals from 'rollup-plugin-node-externals'; import sizes from 'rollup-plugin-sizes'; import typescript from 'rollup-plugin-typescript2'; diff --git a/scripts/generate-types-for-not-supported-ts-versions.mjs b/scripts/generate-types-for-not-supported-ts-versions.mjs index e5fe045b6d..646aaaf2e8 100644 --- a/scripts/generate-types-for-not-supported-ts-versions.mjs +++ b/scripts/generate-types-for-not-supported-ts-versions.mjs @@ -16,9 +16,6 @@ limitations under the License. import * as fs from 'node:fs'; -// generate warning when running with Node 18 -// (node:75278) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time -import packageJSON from '../package.json' assert { type: 'json' }; import { getTypeFilesInformation } from './shared/types-info.mjs'; diff --git a/test/typescript-support/src/index.ts b/test/typescript-support/src/index.ts index 838f454e3d..b2ce04cf09 100644 --- a/test/typescript-support/src/index.ts +++ b/test/typescript-support/src/index.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// eslint-disable-next-line import/no-unresolved +// eslint-disable-next-line import/no-unresolved -- The bpmn-visualization package may not have been built prior running eslint (it happens when running GitHub Actions) import { BpmnVisualization } from 'bpmn-visualization'; const bpmnVisualization = new BpmnVisualization({ container: 'bpmn-container' }); From d066927d4e8b290d2bf3279ab3010e0dd85f96a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Souchet=20C=C3=A9line?= Date: Wed, 6 Sep 2023 10:37:50 +0200 Subject: [PATCH 23/23] fix lint --- scripts/generate-types-for-not-supported-ts-versions.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/generate-types-for-not-supported-ts-versions.mjs b/scripts/generate-types-for-not-supported-ts-versions.mjs index 646aaaf2e8..0039bd01df 100644 --- a/scripts/generate-types-for-not-supported-ts-versions.mjs +++ b/scripts/generate-types-for-not-supported-ts-versions.mjs @@ -16,7 +16,6 @@ limitations under the License. import * as fs from 'node:fs'; - import { getTypeFilesInformation } from './shared/types-info.mjs'; // generate a definition file for not supported TS versions. It provokes syntax error to show an explicit message about what are the supported versions.