Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
fix(desktop): share theme not loaded
Elian Doran2bebed1b0fc2
diff --git a/apps/desktop/package.json b/apps/desktop/package.jsonindex 6ad210d468..10f6d2a4de 100644--- a/apps/desktop/package.json+++ b/apps/desktop/package.json@@ -98,6 +98,11 @@"input": "apps/server/dist/assets","output": "assets"},+ {+ "glob": "**/*",+ "input": "packages/share-theme/src/templates",+ "output": "share-theme/templates"+ },{"glob": "**/*","input": "apps/desktop/src/assets",diff --git a/apps/desktop/spec/build-checks/artifacts.spec.ts b/apps/desktop/spec/build-checks/artifacts.spec.tsnew file mode 100644index 0000000000..9b20eb6818--- /dev/null+++ b/apps/desktop/spec/build-checks/artifacts.spec.ts@@ -0,0 +1,46 @@+import { globSync } from "fs";+import { join } from "path";+import { it, describe, expect } from "vitest";++describe("Check artifacts are present", () => {+ const distPath = join(__dirname, "../../dist");++ it("has the necessary node modules", async () => {+ const paths = [+ "node_modules/better-sqlite3",+ "node_modules/bindings",+ "node_modules/file-uri-to-path"+ ];++ ensurePathsExist(paths);+ });++ it("includes the client", async () => {+ const paths = [+ "public/assets",+ "public/fonts",+ "public/node_modules",+ "public/src",+ "public/stylesheets",+ "public/translations"+ ];++ ensurePathsExist(paths);+ });++ it("includes necessary assets", async () => {+ const paths = [+ "assets",+ "share-theme"+ ];++ ensurePathsExist(paths);+ });++ function ensurePathsExist(paths: string[]) {+ for (const path of paths) {+ const result = globSync(join(distPath, path, "**"));+ expect(result, path).not.toHaveLength(0);+ }+ }+});diff --git a/apps/desktop/vitest.build.config.mts b/apps/desktop/vitest.build.config.mtsnew file mode 100644index 0000000000..f9542fd55f--- /dev/null+++ b/apps/desktop/vitest.build.config.mts@@ -0,0 +1,18 @@+/// <reference types='vitest' />+import { defineConfig } from 'vite';++export default defineConfig(() => ({+ root: __dirname,+ cacheDir: '../../node_modules/.vite/apps/server',+ plugins: [],+ test: {+ watch: false,+ globals: true,+ setupFiles: ["./spec/setup.ts"],+ environment: "node",+ include: ['spec/build-checks/**'],+ reporters: [+ "verbose"+ ]+ },+}));