Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: v3.1.2 #2297

Merged
merged 5 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "optimise",
"version": "3.1.0",
"version": "3.1.2",
"description": "Optimise:MS",
"keywords": [
"ms"
Expand Down Expand Up @@ -49,24 +49,24 @@
},
"devDependencies": {
"@commitlint/config-conventional": "19.5.0",
"@nx/eslint-plugin": "19.8.2",
"@nx/workspace": "19.8.2",
"@nx/eslint-plugin": "20.0.0",
"@nx/workspace": "20.0.0",
"babel-jest": "24.9.0",
"babel-loader": "8.4.1",
"babel-plugin-require-context-hook": "1.0.0",
"commitlint": "19.5.0",
"cross-env": "7.0.3",
"eslint": "8.57.1",
"eslint-plugin-import": "2.30.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jest": "28.8.3",
"eslint-plugin-jsonc": "2.16.0",
"eslint-plugin-jsx-a11y": "6.10.0",
"eslint-plugin-promise": "7.1.0",
"eslint-plugin-react": "7.37.0",
"eslint-plugin-react": "7.37.1",
"eslint-plugin-react-hooks": "4.6.2",
"husky": "9.1.6",
"levenary": "^1.1.1",
"nx": "19.8.2",
"nx": "20.0.0",
"typescript": "5.6.2",
"webpack": "5.95.0",
"webpack-cli": "5.1.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/optimise-core/docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"swagger": "2.0",
"info": {
"description": "API documentation for OPTIMISE MS",
"version": "3.1.0",
"version": "3.1.2",
"title": "OPTIMISE MS API",
"license": {
"name": "MIT License"
Expand Down
2 changes: 1 addition & 1 deletion packages/optimise-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "optimise-core",
"version": "3.1.0",
"version": "3.1.2",
"description": "Optimise:MS Backend",
"keywords": [
"ms"
Expand Down
4 changes: 2 additions & 2 deletions packages/optimise-docker/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "optimise-docker",
"version": "3.1.0",
"version": "3.1.2",
"description": "Optimise:MS Docker",
"keywords": [
"ms",
Expand All @@ -25,7 +25,7 @@
"dependencies": {
"compression": "1.7.4",
"express": "4.21.0",
"express-rate-limit": "7.4.0",
"express-rate-limit": "7.4.1",
"sqlite3": "5.1.7"
}
}
22 changes: 16 additions & 6 deletions packages/optimise-electron/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,10 @@ const optimise_server = new optimiseCore({

let cookie;
const httpify = ({ url, options = {} }) => new Promise((resolve, reject) => {
if (options.method === undefined) options.method = 'GET';

if (options.method === undefined)
options.method = 'GET';

if (cookie !== undefined) {
if (options.headers === undefined) options.headers = {};
options.headers.cookie = cookie;
Expand Down Expand Up @@ -131,21 +134,28 @@ const httpify = ({ url, options = {} }) => new Promise((resolve, reject) => {
});

let type;
res.writeHead(res.statusCode);
// res.writeHead(res.statusCode);
Object.keys(res._headers).forEach((e) => {
if (e.toLowerCase() === 'set-cookie')
cookie = res._headers[e][0].split(';')[0];
if (e.toLowerCase() === 'content-type')
type = res._headers[e];
});

if (type.search('application/json') >= 0)
if (type.search('application/json') >= 0) {
let json = {
error: 'Could not parse JSON response'
};
try {
json = JSON.parse(res._sent.toString());
} catch (e) {
console.error(e);
}
resolve({
headers: res._headers,
statusCode: res.statusCode,
json: JSON.parse(res._sent.toString())
json
});
else {
} else {
resolve({
headers: res._headers,
statusCode: res.statusCode,
Expand Down
6 changes: 3 additions & 3 deletions packages/optimise-electron/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "optimise-electron",
"productName": "Optimise MS Desktop",
"version": "3.1.0",
"version": "3.1.2",
"description": "Optimise:MS Desktop Application",
"keywords": [
"research",
Expand Down Expand Up @@ -116,14 +116,14 @@
"dependencies": {
"electron-log": "5.2.0",
"electron-unhandled": "4.0.1",
"electron-updater": "6.3.8",
"electron-updater": "6.3.9",
"express": "4.21.0",
"sqlite3": "5.1.7"
},
"devDependencies": {
"copy-webpack-plugin": "12.0.2",
"electron": "32.1.2",
"electron-builder": "25.1.6",
"electron-builder": "25.1.7",
"electron-reload": "1.5.0",
"html-webpack-plugin": "5.6.0"
}
Expand Down
9 changes: 6 additions & 3 deletions packages/optimise-electron/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@ ipcRenderer.on('update-message', function (__unused__event, message) {
});

ipcRenderer.on('optimiseApiResult', function (__unused__event, { cid, res }) {

callStack[cid]({
headers: new Headers(res.headers),
status: res.statusCode,
json: () => Promise.resolve(res.json)
headers: new Headers(res?.headers ?? {}),
status: res?.statusCode ?? 500,
json: () => Promise.resolve(res?.json ?? { error: 'An error occurred querying the API' })
});

delete callStack[cid];
});

window['ipcFetch'] = (url, options) => new Promise((resolve) => {

const cid = `${Math.random().toString(36).substr(2, 5)}`;
callStack[cid] = resolve;

Expand Down
2 changes: 1 addition & 1 deletion packages/optimise-remote-control/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "optimise-remote-control",
"version": "3.1.0",
"version": "3.1.2",
"description": "",
"main": "src/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/optimise-sync/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "optimise-sync",
"version": "3.1.0",
"version": "3.1.2",
"description": "Optimise:MS Synchroniser",
"keywords": [
"ms"
Expand Down
4 changes: 2 additions & 2 deletions packages/optimise-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "optimise-ui",
"productName": "Optimise MS",
"version": "3.1.0",
"version": "3.1.2",
"description": "Optimise:MS UI",
"keywords": [
"ms"
Expand Down Expand Up @@ -51,7 +51,7 @@
"rehype-raw": "6.1.1"
},
"devDependencies": {
"http-proxy-middleware": "3.0.2",
"http-proxy-middleware": "3.0.3",
"markdown-image-loader": "3.0.1",
"prop-types": "15.8.1",
"react-app-rewired": "2.2.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/optimise-website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<meta content="width=device-width,initial-scale=1" name="viewport">
<meta content="Optimise" name="description">
<meta content="Florian Guitton" name="author">
<title>Optimise MS v3.1.0 :: Welcome</title>
<title>Optimise MS v3.1.2 :: Welcome</title>
<link href="styles/bootstrap.min.css" rel="stylesheet" type="text/css">
<link href="styles/optimise.css" rel="stylesheet" type="text/css">
</head>
Expand Down Expand Up @@ -49,7 +49,7 @@
<ul class="nav navbar-nav">
<li>
<a rel="noopener" target="_blank"
href="https://github.com/dsi-icl/optimise/releases/download/v3.1.0/Optimise-MS-Desktop-Setup-3.1.0.exe">Download
href="https://github.com/dsi-icl/optimise/releases/download/v3.1.2/Optimise-MS-Desktop-Setup-3.1.2.exe">Download
Now</a>
</li>
</ul>
Expand Down Expand Up @@ -288,7 +288,7 @@ <h4>Note on usage</h4>
<div class="bs-callout bs-callout-warning" id="guarantee-note">
<h4>Guarantee</h4>
<p>Please note that Optimise MS
<code>v3.1.0</code> is currently released under
<code>v3.1.2</code> is currently released under
<strong>MIT</strong> license. It is provided with no guarantee.
</p>
</div>
Expand Down
Loading