diff --git a/e2e/server/core-requirements.txt b/e2e/server/core-requirements.txt index 3ff429e1d..c0e16dbc1 100644 --- a/e2e/server/core-requirements.txt +++ b/e2e/server/core-requirements.txt @@ -1,3 +1,3 @@ gunicorn==19.7.1 honcho==1.0.1 -git+https://github.com/superdesk/superdesk-core.git@develop#egg=superdesk-core \ No newline at end of file +git+https://github.com/superdesk/superdesk-core.git@release/2.7#egg=superdesk-core diff --git a/package-lock.json b/package-lock.json index aa5050f69..74195aeb9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -166,12 +166,6 @@ "react-sortable-hoc": "^1.11.0" }, "dependencies": { - "date-fns": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.7.0.tgz", - "integrity": "sha512-wxYp2PGoUDN5ZEACc61aOtYFvSsJUylIvCjpjDOqM1UDaKIIuMJ9fAnMYFHV3TQaDpfTVxhwNK/GiCaHKuemTA==", - "dev": true - }, "lodash": { "version": "4.17.19", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", @@ -201,9 +195,9 @@ }, "dependencies": { "csstype": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", - "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.2.tgz", + "integrity": "sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==", "dev": true }, "dom-helpers": { @@ -249,9 +243,9 @@ }, "dependencies": { "tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.1.tgz", + "integrity": "sha512-t0hLfiEKfMUoqhG+U1oid7Pva4bbDPHYfJNiB7BiIjRkj1pyC++4N3huJfqY6aRH6VTB0rvtzQwjM4K6qpfOig==", "dev": true } } @@ -263,9 +257,9 @@ "dev": true }, "@types/cheerio": { - "version": "0.22.35", - "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.35.tgz", - "integrity": "sha512-yD57BchKRvTV+JD53UZ6PD8KWY5g5rvvMLRnZR3EQBCZXiDT/HR+pKpMzFGlWNhFrXlo7VPZXtKvIEwZkAWOIA==", + "version": "0.22.31", + "resolved": "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.31.tgz", + "integrity": "sha512-Kt7Cdjjdi2XWSfrZ53v4Of0wG3ZcmaegFXjMmz9tfNrZSkzzo36G0AL1YqSdcIA78Etjt6E609pt5h1xnQkPUw==", "dev": true, "requires": { "@types/node": "*" @@ -300,9 +294,9 @@ } }, "@types/enzyme-adapter-react-16": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.0.9.tgz", - "integrity": "sha512-z24MMxGtUL8HhXdye3tWzjp+19QTsABqLaX2oOZpxMPHRJgLfahQmOeTTrEBQd9ogW20+UmPBXD9j+XOasFHvw==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@types/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.0.6.tgz", + "integrity": "sha512-VonDkZ15jzqDWL8mPFIQnnLtjwebuL9YnDkqeCDYnB4IVgwUm0mwKkqhrxLL6mb05xm7qqa3IE95m8CZE9imCg==", "dev": true, "requires": { "@types/enzyme": "*" @@ -331,13 +325,10 @@ "dev": true }, "@types/node": { - "version": "20.11.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.5.tgz", - "integrity": "sha512-g557vgQjUUfN76MZAN/dt1z3dzcUsimuysco0KeluHgrPdJXkP/XdAURgyO2W9fZWHRtRBiVKzKn8vyOAwlG+w==", - "dev": true, - "requires": { - "undici-types": "~5.26.4" - } + "version": "20.1.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.1.2.tgz", + "integrity": "sha512-CTO/wa8x+rZU626cL2BlbCDzydgnFNgc19h4YvizpTO88MFQxab8wqisxaofQJ/9bLGugRdWIuX/TbIs6VVF6g==", + "dev": true }, "@types/prop-types": { "version": "15.7.5", @@ -386,12 +377,20 @@ } }, "@types/redux-logger": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/redux-logger/-/redux-logger-3.0.12.tgz", - "integrity": "sha512-5vAlwokZi/Unb1eGoZfVVzIBTPNDflwXiDzPLT1SynP6hdJfsOEf+w6ZOySOyboLWciCRYeE5DGYUnwVCq+Uyg==", + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/@types/redux-logger/-/redux-logger-3.0.13.tgz", + "integrity": "sha512-jylqZXQfMxahkuPcO8J12AKSSCQngdEWQrw7UiLUJzMBcv1r4Qg77P6mjGLjM27e5gFQDPD8vwUMJ9AyVxFSsg==", "dev": true, "requires": { - "redux": "^4.0.0" + "redux": "^5.0.0" + }, + "dependencies": { + "redux": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/redux/-/redux-5.0.1.tgz", + "integrity": "sha512-M9/ELqF6fy8FwmkpnF0S3YKOqMyoWJ4+CS5Efg2ct3oY9daQvd/Pc71FpGZsVsbl3Cpb+IIcjBDUnnyBdQbq4w==", + "dev": true + } } }, "@types/sinon": { @@ -1893,6 +1892,32 @@ "define-properties": "^1.2.0", "es-abstract": "^1.22.1" } + }, + "which-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.4", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "dependencies": { + "call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "dev": true, + "requires": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + } + } + } } } }, @@ -2084,6 +2109,32 @@ "define-properties": "^1.2.0", "es-abstract": "^1.22.1" } + }, + "which-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.4", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + }, + "dependencies": { + "call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "dev": true, + "requires": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + } + } + } } } }, @@ -3028,9 +3079,9 @@ } }, "caniuse-db": { - "version": "1.0.30001581", - "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30001581.tgz", - "integrity": "sha512-EinDmiBt2zluuRUGkW1OonG4O/037ZcIGaCoz0CmFpMGAS2gCNd0DR6+6PUcpjtW9TUJZikhWH5vNTV7r3pFCg==", + "version": "1.0.30001582", + "resolved": "https://registry.npmjs.org/caniuse-db/-/caniuse-db-1.0.30001582.tgz", + "integrity": "sha512-bf2eeY5tUaWORL7/JkFSNysbI8rY6UXZYiitnWPr+FDEzitYYEkHxQVB3+tPOrIWN9DNKQ+BKaUC45zHsRSd6A==", "dev": true }, "caseless": { @@ -4143,30 +4194,10 @@ "optional": true }, "date-fns": { - "version": "2.30.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", - "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", - "dev": true, - "requires": { - "@babel/runtime": "^7.21.0" - }, - "dependencies": { - "@babel/runtime": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", - "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", - "dev": true, - "requires": { - "regenerator-runtime": "^0.14.0" - } - }, - "regenerator-runtime": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", - "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", - "dev": true - } - } + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.7.0.tgz", + "integrity": "sha512-wxYp2PGoUDN5ZEACc61aOtYFvSsJUylIvCjpjDOqM1UDaKIIuMJ9fAnMYFHV3TQaDpfTVxhwNK/GiCaHKuemTA==", + "dev": true }, "date-format": { "version": "1.2.0", @@ -4286,6 +4317,19 @@ "define-properties": "^1.2.0", "set-function-name": "^2.0.0" } + }, + "which-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", + "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "dev": true, + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.4", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.0" + } } } }, @@ -4838,9 +4882,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.4.648", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.648.tgz", - "integrity": "sha512-EmFMarXeqJp9cUKu/QEciEApn0S/xRcpZWuAm32U7NgoZCimjsilKXHRO9saeEW55eHZagIDg6XTUOv32w9pjg==", + "version": "1.4.653", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.653.tgz", + "integrity": "sha512-wA2A2LQCqnEwQAvwADQq3KpMpNwgAUBnRmrFgRzHnPhbQUFArTR32Ab46f4p0MovDLcg4uqd4nCsN2hTltslpA==", "dev": true }, "elliptic": { @@ -9185,22 +9229,16 @@ "is-typed-array": "^1.1.10" }, "dependencies": { - "function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true - }, "get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", + "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.2", + "function-bind": "^1.1.1", + "has": "^1.0.3", "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "has-symbols": "^1.0.3" } } } @@ -11428,9 +11466,9 @@ "dev": true }, "nan": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", - "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", + "version": "2.17.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.17.0.tgz", + "integrity": "sha512-2ZTgtl0nJsO0KQCjEpxcIr5D+Yv90plTitZt9JBfQvVJDS5seMl3FOvsh3+9CoYWXf/1l5OaZzzF6nDm4cagaQ==", "dev": true }, "nanomatch": { @@ -14202,9 +14240,9 @@ } }, "redux": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.1.tgz", - "integrity": "sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/redux/-/redux-4.2.0.tgz", + "integrity": "sha512-oSBmcKKIuIR4ME29/AeNUnl5L+hvBq7OaJWzaptTQJAntaPvxIJqfnjbaEiCzzaIz+XmVILfqAM3Ob0aXLPfjA==", "dev": true, "requires": { "@babel/runtime": "^7.9.2" @@ -14600,17 +14638,28 @@ } }, "safe-array-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", - "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", + "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==", "dev": true, "requires": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.2.1", + "call-bind": "^1.0.5", + "get-intrinsic": "^1.2.2", "has-symbols": "^1.0.3", "isarray": "^2.0.5" }, "dependencies": { + "call-bind": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", + "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", + "dev": true, + "requires": { + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.1", + "set-function-length": "^1.1.1" + } + }, "function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -15087,15 +15136,16 @@ "dev": true }, "set-function-length": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz", - "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz", + "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==", "dev": true, "requires": { "define-data-property": "^1.1.1", - "get-intrinsic": "^1.2.1", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.2", "gopd": "^1.0.1", - "has-property-descriptors": "^1.0.0" + "has-property-descriptors": "^1.0.1" }, "dependencies": { "function-bind": { @@ -15115,6 +15165,15 @@ "has-symbols": "^1.0.3", "hasown": "^2.0.0" } + }, + "has-property-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", + "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==", + "dev": true, + "requires": { + "get-intrinsic": "^1.2.2" + } } } }, @@ -16598,12 +16657,30 @@ "webpack-dev-server": "2.11.1" }, "dependencies": { + "@babel/runtime": { + "version": "7.23.9", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", + "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", + "dev": true, + "requires": { + "regenerator-runtime": "^0.14.0" + } + }, "classnames": { "version": "2.2.5", "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.5.tgz", "integrity": "sha512-DTt3GhOUDKhh4ONwIJW4lmhyotQmV2LjNlGK/J2hkwUcqcbKkCLAdJPtxQnxnlc7SR3f1CEXCyMmc7WLUsWbNA==", "dev": true }, + "date-fns": { + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz", + "integrity": "sha512-fnULvOpxnC5/Vg3NCiWelDsLiUc9bRwAPs/+LfTLNvetFCtCTN+yQz15C/fs4AwX1R9K5GLtLfn8QW+dWisaAw==", + "dev": true, + "requires": { + "@babel/runtime": "^7.21.0" + } + }, "json5": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", @@ -16672,6 +16749,12 @@ "symbol-observable": "^1.2.0" } }, + "regenerator-runtime": { + "version": "0.14.1", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz", + "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==", + "dev": true + }, "uuid": { "version": "8.3.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.1.tgz", @@ -16681,9 +16764,9 @@ } }, "superdesk-ui-framework": { - "version": "3.0.66", - "resolved": "https://registry.npmjs.org/superdesk-ui-framework/-/superdesk-ui-framework-3.0.66.tgz", - "integrity": "sha512-5JY/MLam/0Wykl4M6ToHJaWrtmuqc8t6VkiyH7i23wz07TPZGtk03b0x/3dixsGp65OZD9CEyNSzOcjSUjVNUQ==", + "version": "3.0.71", + "resolved": "https://registry.npmjs.org/superdesk-ui-framework/-/superdesk-ui-framework-3.0.71.tgz", + "integrity": "sha512-JF3pnmLWUnWXougST9fuwAQaQjMD2VzdvnNVOBm3wnytOmUUJC1cUaWUIouVabuHS3J74yZNLugO3TU9FhruPg==", "dev": true, "requires": { "@material-ui/lab": "^4.0.0-alpha.56", @@ -16711,12 +16794,6 @@ "resolved": "https://registry.npmjs.org/@types/node/-/node-14.18.63.tgz", "integrity": "sha512-fAtCfv4jJg+ExtXhvCkCqUKZ+4ok/JQk01qDKhL5BDDoS3AxKXhV5/MAVUZyQnSEd2GT92fkgZl0pz0Q0AzcIQ==", "dev": true - }, - "date-fns": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.7.0.tgz", - "integrity": "sha512-wxYp2PGoUDN5ZEACc61aOtYFvSsJUylIvCjpjDOqM1UDaKIIuMJ9fAnMYFHV3TQaDpfTVxhwNK/GiCaHKuemTA==", - "dev": true } } }, @@ -17392,12 +17469,6 @@ "integrity": "sha512-4FNx1KnBckIW9Z7XvptVBzhWZvyuaB9NC3fdqdAp6GIRY4r6eDAENOZx2dzPrriQVZctkTYw2J7Vi1vjHS2E3A==", "dev": true }, - "undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true - }, "union-value": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", @@ -18462,47 +18533,16 @@ "dev": true }, "which-typed-array": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz", - "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==", + "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.4", + "call-bind": "^1.0.2", "for-each": "^0.3.3", "gopd": "^1.0.1", "has-tostringtag": "^1.0.0" - }, - "dependencies": { - "call-bind": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", - "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==", - "dev": true, - "requires": { - "function-bind": "^1.1.2", - "get-intrinsic": "^1.2.1", - "set-function-length": "^1.1.1" - } - }, - "function-bind": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", - "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", - "dev": true - }, - "get-intrinsic": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz", - "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==", - "dev": true, - "requires": { - "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" - } - } } }, "wide-align": { diff --git a/package.json b/package.json index 122731afb..8a00044fe 100644 --- a/package.json +++ b/package.json @@ -78,6 +78,6 @@ "moment": "^2.29.4", "moment-timezone": "^0.5.41", "react": "^16.9.0", - "superdesk-ui-framework": "^3.0.59" + "superdesk-ui-framework": "^3.0.66" } } diff --git a/server/features/events_postpone.feature b/server/features/events_postpone.feature index 43c9d9380..897e365b7 100644 --- a/server/features/events_postpone.feature +++ b/server/features/events_postpone.feature @@ -499,6 +499,7 @@ Feature: Events Postpone @auth @notification + @planning_cvs Scenario: Published event gets updated after postpone Given we have sessions "/sessions" Given "desks" diff --git a/server/features/planning_duplicate.feature b/server/features/planning_duplicate.feature index 8e8e67949..66f36e792 100644 --- a/server/features/planning_duplicate.feature +++ b/server/features/planning_duplicate.feature @@ -357,8 +357,7 @@ Feature: Duplicate Planning }, "assigned_to": { "desk": "#desks._id#", - "user": "#CONTEXT_USER_ID#", - "assignment_id": "aaaaaaaaaaaaaaaaaaaaaaaa" + "user": "#CONTEXT_USER_ID#" } }], "expired": true diff --git a/server/planning/output_formatters/json_planning.py b/server/planning/output_formatters/json_planning.py index 3f4627af9..c23f4b23e 100644 --- a/server/planning/output_formatters/json_planning.py +++ b/server/planning/output_formatters/json_planning.py @@ -12,6 +12,7 @@ from flask import current_app as app from superdesk.publish.formatters import Formatter import superdesk +from apps.archive.common import ARCHIVE import json from superdesk.utils import json_serialize_datetime_objectId from copy import deepcopy @@ -171,11 +172,28 @@ def _expand_delivery(self, coverage): ) deliveries = list(delivery_service.get(req=None, lookup={"coverage_id": coverage.get("coverage_id")})) + # Get the associated article(s) linked to the coverage(s) + query = {"$and": [{"_id": {"$in": [item["item_id"] for item in deliveries]}}]} + articles = {item["_id"]: item for item in get_resource_service(ARCHIVE).get_from_mongo(req=None, lookup=query)} + # Check to see if in this delivery chain, whether the item has been published at least once item_never_published = True for delivery in deliveries: for f in remove_fields: delivery.pop(f, None) + + # TODO: This is a hack, need to find a better way of doing this + # If the linked article was auto-published, then use the ``ingest_id`` for the article ID + # This is required when the article was published using the ``NewsroomNinjsFormatter`` + # Otherwise this coverage in Newshub would point to a non-existing wire item + article = articles.get(delivery["item_id"]) + if ( + article is not None + and article.get("ingest_id") + and (article.get("auto_publish") or (article.get("extra") or {}).get("publish_ingest_id_as_guid")) + ): + delivery["item_id"] = article["ingest_id"] + if delivery.get("item_state") == CONTENT_STATE.PUBLISHED: item_never_published = False diff --git a/server/planning/planning/planning.py b/server/planning/planning/planning.py index e7a0b0186..dde524c57 100644 --- a/server/planning/planning/planning.py +++ b/server/planning/planning/planning.py @@ -65,7 +65,7 @@ from superdesk import Resource from lxml import etree from io import BytesIO -from planning.signals import planning_created +from planning.signals import planning_created, planning_ingested logger = logging.getLogger(__name__) @@ -85,6 +85,8 @@ def post_in_mongo(self, docs, **kwargs): resolve_document_etag(docs, self.datasource) ids = self.backend.create_in_mongo(self.datasource, docs, **kwargs) self.on_created(docs) + for doc in docs: + planning_ingested.send(self, item=doc) return ids def patch_in_mongo(self, id, document, original): @@ -93,6 +95,7 @@ def patch_in_mongo(self, id, document, original): update_ingest_on_patch(document, original) response = self.backend.update_in_mongo(self.datasource, id, document, original) self.on_updated(document, original, from_ingest=True) + planning_ingested.send(self, item=document, original=original) return response def is_new_version(self, new_item, old_item): @@ -463,6 +466,9 @@ def get_all_items_in_relationship(self, item): return all_items def remove_coverages(self, updates, original): + if "coverages" not in updates: + return + for coverage in (original or {}).get("coverages") or []: updated_coverage = next( ( @@ -523,14 +529,21 @@ def remove_coverage_entity(self, coverage_entity, original_planning, entity_type self._create_update_assignment(original_planning, {}, updated_coverage_entity, coverage_entity) def add_coverages(self, updates, original): + if "coverages" not in updates: + return + planning_date = original.get("planning_date") or updates.get("planning_date") + original_coverage_ids = [ + coverage["coverage_id"] for coverage in original.get("coverages") or [] if coverage.get("coverage_id") + ] for coverage in updates.get("coverages") or []: coverage_id = coverage.get("coverage_id", "") - if not coverage_id or TEMP_ID_PREFIX in coverage_id: + if not coverage_id or TEMP_ID_PREFIX in coverage_id or coverage_id not in original_coverage_ids: if "duplicate" in coverage_id: self.duplicate_xmp_file(coverage) # coverage to be created - coverage["coverage_id"] = generate_guid(type=GUID_NEWSML) + if not coverage_id or TEMP_ID_PREFIX in coverage_id: + coverage["coverage_id"] = generate_guid(type=GUID_NEWSML) coverage["firstcreated"] = utcnow() # Make sure the coverage has a ``scheduled`` date @@ -600,6 +613,9 @@ def update_scheduled_updates(self, updates, original, coverage, original_coverag self._create_update_assignment(original, updates, s, original_scheduled_update, coverage) def update_coverages(self, updates, original): + if "coverages" not in updates: + return + for coverage in updates.get("coverages") or []: coverage_id = coverage.get("coverage_id") original_coverage = next( diff --git a/server/planning/signals.py b/server/planning/signals.py index 2a343d06f..3c7097ac4 100644 --- a/server/planning/signals.py +++ b/server/planning/signals.py @@ -12,8 +12,10 @@ __all__ = [ "planning_created", + "planning_ingested", ] signals = blinker.Namespace() planning_created = signals.signal("planning:created") +planning_ingested = signals.signal("planning:ingested") diff --git a/server/planning/tests/output_formatters/json_planning_test.py b/server/planning/tests/output_formatters/json_planning_test.py index d4365786b..91f1eba98 100644 --- a/server/planning/tests/output_formatters/json_planning_test.py +++ b/server/planning/tests/output_formatters/json_planning_test.py @@ -319,6 +319,38 @@ def test_matching_product_ids(self): output_item = json.loads(output[1]) self.assertEqual(output_item["products"], [{"code": "prod-type-planning", "name": "planning-only"}]) + def test_expand_delivery_uses_ingest_id(self): + self.app.data.insert("assignments", self.assignment) + self.app.data.insert("delivery", self.delivery) + formatter = JsonPlanningFormatter() + item_id = self.delivery[0]["item_id"] + ingest_id = "urn:newsml:localhost:2024-01-24-ingest-1" + article = { + "_id": item_id, + "type": "text", + "headline": "test headline", + "slugline": "test slugline", + "ingest_id": ingest_id, + } + + self.app.data.insert("archive", [article]) + deliveries, _ = formatter._expand_delivery(deepcopy(self.item["coverages"][0])) + self.assertNotEqual(deliveries[0]["item_id"], ingest_id) + + article = self.app.data.find_one("archive", req=None, _id=item_id) + self.app.data.update("archive", item_id, {"auto_publish": True}, article) + deliveries, _ = formatter._expand_delivery(deepcopy(self.item["coverages"][0])) + self.assertEqual(deliveries[0]["item_id"], ingest_id) + + article = self.app.data.find_one("archive", req=None, _id=item_id) + updates = { + "auto_publish": None, + "extra": {"publish_ingest_id_as_guid": True}, + } + self.app.data.update("archive", item_id, updates, article) + deliveries, _ = formatter._expand_delivery(deepcopy(self.item["coverages"][0])) + self.assertEqual(deliveries[0]["item_id"], ingest_id) + def test_assigned_desk_user(self): with self.app.app_context(): item = deepcopy(self.item) diff --git a/server/requirements.txt b/server/requirements.txt index a798d6518..7989fe66b 100644 --- a/server/requirements.txt +++ b/server/requirements.txt @@ -19,4 +19,4 @@ pytest-env -e . # Install in editable state so we get feature fixtures --e git+https://github.com/superdesk/superdesk-core.git@develop#egg=superdesk-core +-e git+https://github.com/superdesk/superdesk-core.git@release/2.7#egg=superdesk-core