From 74f37996634a7364e348ca2263243732475ab36e Mon Sep 17 00:00:00 2001 From: KshitijThareja Date: Sat, 16 Dec 2023 16:47:34 +0530 Subject: [PATCH 1/5] Add error message when kds path not specified --- package.json | 2 +- packages/kolibri-tools/lib/cli.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7ad6866acef..f0c15921e99 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "app-devserver": "concurrently --passthrough-arguments --kill-others \"yarn:watch --watchonly {1}\" yarn:app-python-devserver yarn:hashi-dev --", "devserver": "concurrently --passthrough-arguments --kill-others \"yarn:watch --watchonly {1}\" yarn:python-devserver yarn:hashi-dev --", "devserver-hot": "concurrently --passthrough-arguments --kill-others \"yarn:watch-hot --watchonly {1}\" yarn:python-devserver yarn:hashi-dev --", - "devserver-with-kds": "concurrently --passthrough-arguments --kill-others \"yarn:watch --watchonly --kds-path={1}\" yarn:python-devserver yarn:hashi-dev --", + "devserver-with-kds": "concurrently --passthrough-arguments --kill-others \"yarn:watch --watchonly --kds --kds-path={1}\" yarn:python-devserver yarn:hashi-dev --", "bundle-stats": "kolibri-tools build stats --file ./build_tools/build_plugins.txt --transpile", "clean": "kolibri-tools build clean --file ./build_tools/build_plugins.txt", "preinstall": "node ./packages/kolibri-tools/lib/npm_deprecation_warning.js", diff --git a/packages/kolibri-tools/lib/cli.js b/packages/kolibri-tools/lib/cli.js index 866fab7ea1e..453b7e9db09 100755 --- a/packages/kolibri-tools/lib/cli.js +++ b/packages/kolibri-tools/lib/cli.js @@ -81,6 +81,7 @@ function runWebpackBuild(mode, bundleData, devServer, options, cb = null) { cache: options.cache, transpile: options.transpile, devServer, + kds: options.kds, kdsPath: options.kdsPath, }; @@ -226,8 +227,15 @@ program list, [] ) + .option('--kds', 'Flag to use local kds', false) .option('--kds-path ', 'Full path to local kds directory', String, '') .action(function(mode, options) { + if (options.kds) { + if (!options.kdsPath) { + cliLogging.error('Path to the local KDS directory not specified.'); + process.exit(1); + } + } if (typeof mode !== 'string') { cliLogging.error('Build mode must be specified'); process.exit(1); From 51a24abf9d43c09f731fb7e733e352832154e474 Mon Sep 17 00:00:00 2001 From: KshitijThareja Date: Tue, 19 Dec 2023 21:28:40 +0530 Subject: [PATCH 2/5] Change descriptions for errors and flags --- package.json | 2 +- packages/kolibri-tools/lib/cli.js | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index f0c15921e99..19814fc4140 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "app-devserver": "concurrently --passthrough-arguments --kill-others \"yarn:watch --watchonly {1}\" yarn:app-python-devserver yarn:hashi-dev --", "devserver": "concurrently --passthrough-arguments --kill-others \"yarn:watch --watchonly {1}\" yarn:python-devserver yarn:hashi-dev --", "devserver-hot": "concurrently --passthrough-arguments --kill-others \"yarn:watch-hot --watchonly {1}\" yarn:python-devserver yarn:hashi-dev --", - "devserver-with-kds": "concurrently --passthrough-arguments --kill-others \"yarn:watch --watchonly --kds --kds-path={1}\" yarn:python-devserver yarn:hashi-dev --", + "devserver-with-kds": "concurrently --passthrough-arguments --kill-others \"yarn:watch --watchonly={2} --require-kds-path --kds-path={1}\" yarn:python-devserver yarn:hashi-dev --", "bundle-stats": "kolibri-tools build stats --file ./build_tools/build_plugins.txt --transpile", "clean": "kolibri-tools build clean --file ./build_tools/build_plugins.txt", "preinstall": "node ./packages/kolibri-tools/lib/npm_deprecation_warning.js", diff --git a/packages/kolibri-tools/lib/cli.js b/packages/kolibri-tools/lib/cli.js index 453b7e9db09..e87ffbb7b3c 100755 --- a/packages/kolibri-tools/lib/cli.js +++ b/packages/kolibri-tools/lib/cli.js @@ -81,7 +81,7 @@ function runWebpackBuild(mode, bundleData, devServer, options, cb = null) { cache: options.cache, transpile: options.transpile, devServer, - kds: options.kds, + requireKdsPath: options.requireKdsPath, kdsPath: options.kdsPath, }; @@ -227,12 +227,18 @@ program list, [] ) - .option('--kds', 'Flag to use local kds', false) + .option( + '--require-kds-path', + 'Flag to check if yarn command is run using devserver-with-kds', + false + ) .option('--kds-path ', 'Full path to local kds directory', String, '') .action(function(mode, options) { - if (options.kds) { + if (options.requireKdsPath) { if (!options.kdsPath) { - cliLogging.error('Path to the local KDS directory not specified.'); + cliLogging.error( + 'The --require-kds-path flag was specified, but no --kds-path value was provided. Please include the path to the local KDS directory.' + ); process.exit(1); } } From 07a2036e42e84ecd4d135c9d6811ceb30c91edc5 Mon Sep 17 00:00:00 2001 From: iskipu Date: Fri, 22 Dec 2023 00:15:10 +0530 Subject: [PATCH 3/5] Fix card widths on ultra wide screen --- kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue b/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue index e4c88c89820..95642ed9d15 100644 --- a/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue +++ b/kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue @@ -1,6 +1,6 @@