From 351b349403e300b02fdd1eecd4ca8c540b37a8fc Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Apr 2026 03:22:56 +0000 Subject: [PATCH 1/8] fix(ci): resolve server typecheck failures in installer workflow branch Agent-Logs-Url: https://github.com/crazyrob425/KDP-E-Book-Generator/sessions/1aa28512-a6bf-43bc-9b57-3fc3578a6443 Co-authored-by: crazyrob425 <247058665+crazyrob425@users.noreply.github.com> --- server/declarations.d.ts | 2 ++ server/tsconfig.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 server/declarations.d.ts diff --git a/server/declarations.d.ts b/server/declarations.d.ts new file mode 100644 index 0000000..4412bc1 --- /dev/null +++ b/server/declarations.d.ts @@ -0,0 +1,2 @@ +declare module 'express'; +declare module 'google-trends-api'; diff --git a/server/tsconfig.json b/server/tsconfig.json index 89d2c87..01637b2 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "target": "ES2020", "module": "commonjs", - "rootDir": "./", + "rootDir": "../", "outDir": "./dist", "esModuleInterop": true, "forceConsistentCasingInFileNames": true, From 57c95f949d60de67402dcca90ce77ce1c64e6351 Mon Sep 17 00:00:00 2001 From: Rob Date: Wed, 15 Apr 2026 02:47:51 -0700 Subject: [PATCH 2/8] Update server/tsconfig.json Co-authored-by: llamapreview[bot] <184758061+llamapreview[bot]@users.noreply.github.com> --- server/tsconfig.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/server/tsconfig.json b/server/tsconfig.json index 01637b2..d384748 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -1,3 +1,4 @@ +{ { "compilerOptions": { "target": "ES2020", @@ -8,5 +9,19 @@ "forceConsistentCasingInFileNames": true, "strict": true, "skipLibCheck": true + }, + "include": [ + "./**/*.ts", + "../types.ts" + ] +} + "target": "ES2020", + "module": "commonjs", + "rootDir": "../", + "outDir": "./dist", + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "strict": true, + "skipLibCheck": true } } From fe000e0a0a0942a675e5196af50b1af7adfcb8e3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 15 Apr 2026 09:54:48 +0000 Subject: [PATCH 3/8] fix: apply LlamaPReview suggestions for typed deps and tsconfig scope Agent-Logs-Url: https://github.com/crazyrob425/KDP-E-Book-Generator/sessions/7bb3ec99-a887-45fd-979a-bf88dbb24f6f Co-authored-by: crazyrob425 <247058665+crazyrob425@users.noreply.github.com> --- package-lock.json | 89 ++++++++++++++++++++++++++++++++++++++++ package.json | 1 + server/declarations.d.ts | 15 ++++++- server/tsconfig.json | 12 +----- 4 files changed, 104 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9a314d1..0ee801f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -58,6 +58,7 @@ "devDependencies": { "@tauri-apps/api": "^2.9.1", "@tauri-apps/cli": "^2.9.6", + "@types/express": "^5.0.6", "@types/node": "^22.14.0", "@vitejs/plugin-react": "^5.0.0", "concurrently": "^8.2.2", @@ -2443,6 +2444,27 @@ "@babel/types": "^7.28.2" } }, + "node_modules/@types/body-parser": { + "version": "1.19.6", + "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.6.tgz", + "integrity": "sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/connect": "*", + "@types/node": "*" + } + }, + "node_modules/@types/connect": { + "version": "3.4.38", + "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.38.tgz", + "integrity": "sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", @@ -2450,6 +2472,38 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/express": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@types/express/-/express-5.0.6.tgz", + "integrity": "sha512-sKYVuV7Sv9fbPIt/442koC7+IIwK5olP1KWeD88e/idgoJqDm3JV/YUiPwkoKK92ylff2MGxSz1CSjsXelx0YA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/body-parser": "*", + "@types/express-serve-static-core": "^5.0.0", + "@types/serve-static": "^2" + } + }, + "node_modules/@types/express-serve-static-core": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-5.1.1.tgz", + "integrity": "sha512-v4zIMr/cX7/d2BpAEX3KNKL/JrT1s43s96lLvvdTmza1oEvDudCqK9aF/djc/SWgy8Yh0h30TZx5VpzqFCxk5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@types/qs": "*", + "@types/range-parser": "*", + "@types/send": "*" + } + }, + "node_modules/@types/http-errors": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-2.0.5.tgz", + "integrity": "sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/long": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.2.tgz", @@ -2486,6 +2540,13 @@ "integrity": "sha512-BYOID+l2Aco2nBik+iYS4SZX0Lf20KPILP5RGmM1IgzdwNdTs0eebiFriOPcej1sX9mLnSoiNte5zcFxssgpGA==", "license": "MIT" }, + "node_modules/@types/qs": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.15.0.tgz", + "integrity": "sha512-JawvT8iBVWpzTrz3EGw9BTQFg3BQNmwERdKE22vlTxawwtbyUSlMppvZYKLZzB5zgACXdXxbD3m1bXaMqP/9ow==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/raf": { "version": "3.4.3", "resolved": "https://registry.npmjs.org/@types/raf/-/raf-3.4.3.tgz", @@ -2493,6 +2554,34 @@ "license": "MIT", "optional": true }, + "node_modules/@types/range-parser": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.7.tgz", + "integrity": "sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/send": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@types/send/-/send-1.2.1.tgz", + "integrity": "sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/serve-static": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-2.2.0.tgz", + "integrity": "sha512-8mam4H1NHLtu7nmtalF7eyBH14QyOASmcxHhSfEoRyr0nP/YdoesEtU+uSRvMe96TW/HPTtkoKqQLl53N7UXMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/http-errors": "*", + "@types/node": "*" + } + }, "node_modules/@types/trusted-types": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz", diff --git a/package.json b/package.json index 5174e8b..e64c050 100644 --- a/package.json +++ b/package.json @@ -61,6 +61,7 @@ "devDependencies": { "@tauri-apps/api": "^2.9.1", "@tauri-apps/cli": "^2.9.6", + "@types/express": "^5.0.6", "@types/node": "^22.14.0", "@vitejs/plugin-react": "^5.0.0", "concurrently": "^8.2.2", diff --git a/server/declarations.d.ts b/server/declarations.d.ts index 4412bc1..7b07995 100644 --- a/server/declarations.d.ts +++ b/server/declarations.d.ts @@ -1,2 +1,13 @@ -declare module 'express'; -declare module 'google-trends-api'; +declare module 'google-trends-api' { + interface GoogleTrendsQuery { + keyword: string; + } + + interface GoogleTrendsApi { + interestOverTime(options: GoogleTrendsQuery): Promise; + relatedQueries(options: GoogleTrendsQuery): Promise; + } + + const googleTrends: GoogleTrendsApi; + export default googleTrends; +} diff --git a/server/tsconfig.json b/server/tsconfig.json index d384748..336a4fd 100644 --- a/server/tsconfig.json +++ b/server/tsconfig.json @@ -1,4 +1,3 @@ -{ { "compilerOptions": { "target": "ES2020", @@ -12,16 +11,7 @@ }, "include": [ "./**/*.ts", + "./**/*.d.ts", "../types.ts" ] -} - "target": "ES2020", - "module": "commonjs", - "rootDir": "../", - "outDir": "./dist", - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "strict": true, - "skipLibCheck": true - } } From f61fc1a2c0a931ac72a4547c555e8b68d1a79d89 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 May 2026 00:30:09 +0000 Subject: [PATCH 4/8] fix: pin tauri API version for release packaging compatibility Agent-Logs-Url: https://github.com/crazyrob425/KDP-E-Book-Generator/sessions/803e3fc0-1461-4dc4-b8c5-4c5f1ccd945d Co-authored-by: crazyrob425 <247058665+crazyrob425@users.noreply.github.com> --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0ee801f..37b42c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,7 +56,7 @@ "ws": "^8.18.3" }, "devDependencies": { - "@tauri-apps/api": "^2.9.1", + "@tauri-apps/api": "2.9.1", "@tauri-apps/cli": "^2.9.6", "@types/express": "^5.0.6", "@types/node": "^22.14.0", @@ -2145,9 +2145,9 @@ } }, "node_modules/@tauri-apps/api": { - "version": "2.10.1", - "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.10.1.tgz", - "integrity": "sha512-hKL/jWf293UDSUN09rR69hrToyIXBb8CjGaWC7gfinvnQrBVvnLr08FeFi38gxtugAVyVcTa5/FD/Xnkb1siBw==", + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.9.1.tgz", + "integrity": "sha512-IGlhP6EivjXHepbBic618GOmiWe4URJiIeZFlB7x3czM0yDHHYviH1Xvoiv4FefdkQtn6v7TuwWCRfOGdnVUGw==", "license": "Apache-2.0 OR MIT", "funding": { "type": "opencollective", diff --git a/package.json b/package.json index f22782c..2d6bdb7 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "ws": "^8.18.3" }, "devDependencies": { - "@tauri-apps/api": "^2.9.1", + "@tauri-apps/api": "2.9.1", "@tauri-apps/cli": "^2.9.6", "@types/express": "^5.0.6", "@types/node": "^22.14.0", From 62310537af7cf03ffb7ab9768fba1101d20b8e3c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 May 2026 00:35:15 +0000 Subject: [PATCH 5/8] feat: force windows release bundles and support null library splash source Agent-Logs-Url: https://github.com/crazyrob425/KDP-E-Book-Generator/sessions/fac45baa-6182-411d-8265-b54099bdcdfc Co-authored-by: crazyrob425 <247058665+crazyrob425@users.noreply.github.com> --- .github/workflows/release.yml | 2 +- scripts/branding/build-nsis-assets.mjs | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b3e4571..a8cc6d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: - platform: ubuntu-22.04 args: "" - platform: windows-latest - args: "" + args: "--bundles nsis,msi" - platform: macos-latest args: "--target aarch64-apple-darwin" - platform: macos-latest diff --git a/scripts/branding/build-nsis-assets.mjs b/scripts/branding/build-nsis-assets.mjs index e249390..7a32c55 100644 --- a/scripts/branding/build-nsis-assets.mjs +++ b/scripts/branding/build-nsis-assets.mjs @@ -3,7 +3,9 @@ import path from 'node:path'; import sharp from 'sharp'; const root = process.cwd(); -const source = path.join(root, 'src-tauri', 'icons', 'icon.png'); +const preferredSource = path.join(root, 'null library.png'); +const fallbackSource = path.join(root, 'src-tauri', 'icons', 'icon.png'); +let source = fallbackSource; const outDir = path.join(root, 'src-tauri', 'installer-assets'); const sidebarImage = path.join(outDir, 'nsis-sidebar.bmp'); const headerImage = path.join(outDir, 'nsis-header.bmp'); @@ -11,6 +13,13 @@ const installerIcon = path.join(root, 'src-tauri', 'icons', 'icon.ico'); await fs.mkdir(outDir, { recursive: true }); +try { + await fs.access(preferredSource); + source = preferredSource; +} catch { + source = fallbackSource; +} + const toBmp24 = async (inputPath, width, height, outputPath) => { const { data, info } = await sharp(inputPath) .resize(width, height, { fit: 'cover' }) @@ -63,6 +72,7 @@ await toBmp24(source, 164, 314, sidebarImage); await toBmp24(source, 150, 57, headerImage); console.log('NSIS branding assets prepared:'); +console.log(`- source image: ${source}`); console.log(`- ${headerImage}`); console.log(`- ${sidebarImage}`); console.log(`- ${installerIcon}`); From 7888c271aa3cf4639a7324a3644eadd20938c696 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 May 2026 00:35:50 +0000 Subject: [PATCH 6/8] chore: log installer splash fallback when null library image missing Agent-Logs-Url: https://github.com/crazyrob425/KDP-E-Book-Generator/sessions/fac45baa-6182-411d-8265-b54099bdcdfc Co-authored-by: crazyrob425 <247058665+crazyrob425@users.noreply.github.com> --- scripts/branding/build-nsis-assets.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/branding/build-nsis-assets.mjs b/scripts/branding/build-nsis-assets.mjs index 7a32c55..aee47cc 100644 --- a/scripts/branding/build-nsis-assets.mjs +++ b/scripts/branding/build-nsis-assets.mjs @@ -16,8 +16,12 @@ await fs.mkdir(outDir, { recursive: true }); try { await fs.access(preferredSource); source = preferredSource; -} catch { +} catch (error) { source = fallbackSource; + if (error && typeof error === 'object' && 'code' in error && error.code !== 'ENOENT') { + throw error; + } + console.warn(`Preferred installer splash image not found at: ${preferredSource}. Falling back to ${fallbackSource}.`); } const toBmp24 = async (inputPath, width, height, outputPath) => { From 7f5875fa22005d29aaea8e94ec7502cbf75b4422 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 May 2026 00:36:12 +0000 Subject: [PATCH 7/8] refactor: simplify installer splash source initialization Agent-Logs-Url: https://github.com/crazyrob425/KDP-E-Book-Generator/sessions/fac45baa-6182-411d-8265-b54099bdcdfc Co-authored-by: crazyrob425 <247058665+crazyrob425@users.noreply.github.com> --- scripts/branding/build-nsis-assets.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/branding/build-nsis-assets.mjs b/scripts/branding/build-nsis-assets.mjs index aee47cc..d29e855 100644 --- a/scripts/branding/build-nsis-assets.mjs +++ b/scripts/branding/build-nsis-assets.mjs @@ -5,7 +5,7 @@ import sharp from 'sharp'; const root = process.cwd(); const preferredSource = path.join(root, 'null library.png'); const fallbackSource = path.join(root, 'src-tauri', 'icons', 'icon.png'); -let source = fallbackSource; +let source; const outDir = path.join(root, 'src-tauri', 'installer-assets'); const sidebarImage = path.join(outDir, 'nsis-sidebar.bmp'); const headerImage = path.join(outDir, 'nsis-header.bmp'); From 35f92b0f69bfe2f337f4433264c23353f5e6b481 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 7 May 2026 00:36:39 +0000 Subject: [PATCH 8/8] chore: simplify installer splash fallback error check Agent-Logs-Url: https://github.com/crazyrob425/KDP-E-Book-Generator/sessions/fac45baa-6182-411d-8265-b54099bdcdfc Co-authored-by: crazyrob425 <247058665+crazyrob425@users.noreply.github.com> --- scripts/branding/build-nsis-assets.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/branding/build-nsis-assets.mjs b/scripts/branding/build-nsis-assets.mjs index d29e855..81cef38 100644 --- a/scripts/branding/build-nsis-assets.mjs +++ b/scripts/branding/build-nsis-assets.mjs @@ -18,7 +18,7 @@ try { source = preferredSource; } catch (error) { source = fallbackSource; - if (error && typeof error === 'object' && 'code' in error && error.code !== 'ENOENT') { + if (error?.code && error.code !== 'ENOENT') { throw error; } console.warn(`Preferred installer splash image not found at: ${preferredSource}. Falling back to ${fallbackSource}.`);