From d9033b2636476e943a19f786532583f004586671 Mon Sep 17 00:00:00 2001 From: Gerard Burns Date: Mon, 25 Mar 2024 16:39:42 +0000 Subject: [PATCH] Un-revert Skeleton Loader PR (#13180) * wip * wip * wip * client versions init * wip * wip * wip * wip * wip * linting * remove log * comment client version script * lint * skeleton loader type fix * fix types * lint * fix types again * fix manifest not being served locally * remove preinstalled old client version * add constant for dev client version * linting * Dean PR Feedback * linting * pr feedback * wip * wip * clientVersions empty array * delete from git * empty array again * fix tests * pr feedback --------- Co-authored-by: Andrew Kingston --- .eslintignore | 3 +- .gitignore | 3 + package.json | 1 + .../deploy/RevertModalVersionSelect.svelte | 33 +++ .../src/components/deploy/VersionModal.svelte | 18 +- .../src/components/deploy/clientVersions.json | 1 + .../[screenId]/_components/AppPreview.svelte | 43 ++- .../builder/portal/apps/[appId]/index.svelte | 63 +++- packages/client/manifest.json | 3 +- .../client/src/components/ClientApp.svelte | 276 ++++++++++-------- .../client/src/components/FreeFooter.svelte | 1 + packages/client/src/licensing/features.js | 5 - packages/client/src/licensing/index.js | 7 - packages/client/src/licensing/utils.js | 32 -- packages/client/src/stores/features.js | 42 +++ packages/client/src/stores/index.js | 1 + packages/frontend-core/src/api/app.js | 9 + .../src/components/ClientAppSkeleton.svelte | 244 ++++++++++++++++ .../frontend-core/src/components/index.js | 1 + .../frontend-core/src/themes/midnight.css | 1 - packages/server/package.json | 1 + .../server/src/api/controllers/application.ts | 30 +- .../src/api/controllers/static/index.ts | 34 ++- .../static/templates/BudibaseApp.svelte | 10 + .../api/controllers/static/templates/app.hbs | 8 +- packages/server/src/api/routes/application.ts | 5 + packages/server/src/api/routes/static.ts | 2 +- packages/server/src/constants/index.ts | 2 + packages/server/src/constants/themes.ts | 54 ++++ .../server/src/utilities/fileSystem/app.ts | 33 ++- .../src/utilities/fileSystem/clientLibrary.ts | 56 +++- packages/types/src/documents/app/app.ts | 1 + scripts/build.js | 28 +- scripts/getPastClientVersion.js | 45 +++ 34 files changed, 850 insertions(+), 246 deletions(-) create mode 100644 packages/builder/src/components/deploy/RevertModalVersionSelect.svelte create mode 100644 packages/builder/src/components/deploy/clientVersions.json delete mode 100644 packages/client/src/licensing/features.js delete mode 100644 packages/client/src/licensing/index.js delete mode 100644 packages/client/src/licensing/utils.js create mode 100644 packages/client/src/stores/features.js create mode 100644 packages/frontend-core/src/components/ClientAppSkeleton.svelte create mode 100644 packages/server/src/constants/themes.ts create mode 100644 scripts/getPastClientVersion.js diff --git a/.eslintignore b/.eslintignore index f2c53c2fdc..94984a446f 100644 --- a/.eslintignore +++ b/.eslintignore @@ -12,4 +12,5 @@ packages/sdk/sdk packages/account-portal/packages/server/build packages/account-portal/packages/ui/.routify packages/account-portal/packages/ui/build -**/*.ivm.bundle.js \ No newline at end of file +**/*.ivm.bundle.js +packages/server/build/oldClientVersions/**/** diff --git a/.gitignore b/.gitignore index 8861a14d20..661c60e95e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,9 @@ packages/server/runtime_apps/ bb-airgapped.tar.gz *.iml +packages/server/build/oldClientVersions/**/* +packages/builder/src/components/deploy/clientVersions.json + # Logs logs *.log diff --git a/package.json b/package.json index 7de22ab456..79a7b06eff 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ }, "scripts": { "preinstall": "node scripts/syncProPackage.js", + "get-past-client-version": "node scripts/getPastClientVersion.js", "setup": "git config submodule.recurse true && git submodule update && node ./hosting/scripts/setup.js && yarn && yarn build && yarn dev", "build": "NODE_OPTIONS=--max-old-space-size=1500 lerna run build --stream", "build:dev": "lerna run --stream prebuild && yarn nx run-many --target=build --output-style=dynamic --watch --preserveWatchOutput", diff --git a/packages/builder/src/components/deploy/RevertModalVersionSelect.svelte b/packages/builder/src/components/deploy/RevertModalVersionSelect.svelte new file mode 100644 index 0000000000..ed40a101d0 --- /dev/null +++ b/packages/builder/src/components/deploy/RevertModalVersionSelect.svelte @@ -0,0 +1,33 @@ + + +
+