From e170eef1a44e8daf1862fdd71401b3732a4005e4 Mon Sep 17 00:00:00 2001 From: Dmitry S Date: Mon, 19 Dec 2022 12:44:57 -0500 Subject: [PATCH] (core) A few assorted one-line fixes Summary: - Use newer flag in .npmrc to avoid warnings - Fix check in WidgetRepository, useful for development but was broken - Fix macSandboxExec for Macs that require libRosettaRuntime - Make sure row count in Raw Data listing is visible when it takes more space Test Plan: Tested manually Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3759 --- app/client/components/DataTables.ts | 2 +- app/server/lib/NSandbox.ts | 1 + app/server/lib/WidgetRepository.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/client/components/DataTables.ts b/app/client/components/DataTables.ts index c8565137..6696e1e5 100644 --- a/app/client/components/DataTables.ts +++ b/app/client/components/DataTables.ts @@ -271,7 +271,7 @@ const cssTableIdWrapper = styled('div', ` const cssTableRowsWrapper = styled('div', ` display: flex; flex-shrink: 0; - width: 80px; + min-width: 100px; overflow: hidden; align-items: baseline; color: ${css.theme.lightText}; diff --git a/app/server/lib/NSandbox.ts b/app/server/lib/NSandbox.ts index 2262967c..f84ab8cb 100644 --- a/app/server/lib/NSandbox.ts +++ b/app/server/lib/NSandbox.ts @@ -736,6 +736,7 @@ function macSandboxExec(options: ISandboxOptions): SandboxProcess { // From another python installation variant. profile.push(`(allow file-read* (subpath "/usr/lib/"))`); profile.push(`(allow file-read* (subpath "/System/Library/Frameworks/"))`); + profile.push(`(allow file-read* (subpath "/Library/Apple/usr/libexec/oah/"))`); // Give access to Grist material. const cwd = path.join(process.cwd(), 'sandbox'); diff --git a/app/server/lib/WidgetRepository.ts b/app/server/lib/WidgetRepository.ts index 26d4a7a7..1115fcd2 100644 --- a/app/server/lib/WidgetRepository.ts +++ b/app/server/lib/WidgetRepository.ts @@ -69,7 +69,7 @@ class CachedWidgetRepository extends WidgetRepositoryImpl { private _cache = new LRUCache<1, ICustomWidget[]>({maxAge : 1000 * 60 /* minute */ * 2}); public async getWidgets() { // Don't cache for localhost - if (super._staticUrl && super._staticUrl.startsWith("http://localhost")) { + if (this._staticUrl && this._staticUrl.startsWith("http://localhost")) { this._cache.reset(); } if (this._cache.has(1)) {