Compare commits

..
Author SHA1 Message Date
ajnart 9fbdc7ab10 fix(widget-secrets): add missing drizzle snapshots for merge-url and widget_secret migrations
The merge_custom_widget_url migration (0039/0041/0007) was committed
without a corresponding snapshot, breaking drizzle-kit generate for
all future migrations. This adds:
- 0039/0041/0007 snapshots reflecting the merge-url changes
  (base_url+endpoint -> url, add enabled column)
- 0040/0042/0008 snapshots reflecting the widget_secret table

All snapshot chains now match journal entries (41/43/9 entries each).
2026-07-04 17:51:03 +02:00
ajnart 3e8a8fdfa1 fix(widget-secrets): add missing widget_secret migration and add error notifications
The widget_secret table was defined in all three Drizzle schema files but
no SQL migration was ever generated to create it, causing setSecret to
fail with 'no such table: widget_secret' in production (drizzle-kit push
in development hid the problem).

- Add migration SQL for sqlite (0040), mysql (0042), postgresql (0008)
- Update journal entries for all three dialects
- Add onError handlers to setSecret/deleteSecret mutations so errors
  are shown as red notifications instead of silently swallowed

Fixes #6186
2026-07-04 17:33:19 +02:00
homarr-renovate[bot] 59c084bc57 chore(deps): update testcontainers-node monorepo to ^12.0.4 (#6185)
Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
2026-07-04 12:18:18 +00:00
homarr-renovate[bot] f6cf262bab chore(deps): update dependency posthog-js to ^1.396.1 (#6183)
Co-authored-by: homarr-renovate[bot] <158783068+homarr-renovate[bot]@users.noreply.github.com>
2026-07-04 10:27:08 +00:00
15 changed files with 15205 additions and 76 deletions

No files matched your search

@@ -0,0 +1,9 @@
CREATE TABLE `widget_secret` (
`item_id` varchar(64) NOT NULL,
`kind` varchar(64) NOT NULL,
`value` text NOT NULL,
`updated_at` timestamp NOT NULL,
CONSTRAINT `widget_secret_item_id_kind_pk` PRIMARY KEY(`item_id`,`kind`)
);
--> statement-breakpoint
ALTER TABLE `widget_secret` ADD CONSTRAINT `widget_secret_item_id_item_id_fk` FOREIGN KEY (`item_id`) REFERENCES `item`(`id`) ON DELETE cascade ON UPDATE no action;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -295,6 +295,13 @@
"when": 1780764500000,
"tag": "0041_merge_custom_widget_url",
"breakpoints": true
},
{
"idx": 42,
"version": "5",
"when": 1783176100870,
"tag": "0042_add_widget_secret",
"breakpoints": true
}
]
}
@@ -0,0 +1,9 @@
CREATE TABLE "widget_secret" (
"item_id" varchar(64) NOT NULL,
"kind" varchar(64) NOT NULL,
"value" text NOT NULL,
"updated_at" timestamp NOT NULL,
CONSTRAINT "widget_secret_item_id_kind_pk" PRIMARY KEY("item_id","kind")
);
--> statement-breakpoint
ALTER TABLE "widget_secret" ADD CONSTRAINT "widget_secret_item_id_item_id_fk" FOREIGN KEY ("item_id") REFERENCES "public"."item"("id") ON DELETE cascade ON UPDATE no action;
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -57,6 +57,13 @@
"when": 1780764500000,
"tag": "0007_merge_custom_widget_url",
"breakpoints": true
},
{
"idx": 8,
"version": "7",
"when": 1783176100870,
"tag": "0008_add_widget_secret",
"breakpoints": true
}
]
}
@@ -0,0 +1,8 @@
CREATE TABLE `widget_secret` (
`item_id` text NOT NULL,
`kind` text NOT NULL,
`value` text NOT NULL,
`updated_at` integer NOT NULL,
PRIMARY KEY(`item_id`, `kind`),
FOREIGN KEY (`item_id`) REFERENCES `item`(`id`) ON UPDATE no action ON DELETE cascade
);
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
@@ -281,6 +281,13 @@
"when": 1780764500000,
"tag": "0039_merge_custom_widget_url",
"breakpoints": true
},
{
"idx": 40,
"version": "6",
"when": 1783176100870,
"tag": "0040_add_widget_secret",
"breakpoints": true
}
]
}
@@ -50,6 +50,7 @@ import {
} from "@homarr/definitions";
import { findBestIconMatch, IconPicker } from "@homarr/forms-collection";
import { createModal, useModalAction } from "@homarr/modals";
import { showErrorNotification } from "@homarr/notifications";
import { useScopedI18n } from "@homarr/translation/client";
import { MaskedImage } from "@homarr/ui";
@@ -269,8 +270,24 @@ const providersWithAuth: ReleaseProviderKind[] = [
const ProviderTokensSection = ({ itemId, repositories }: { itemId: string; repositories: ReleasesRepository[] }) => {
const tRepository = useScopedI18n("widget.releases.option.repositories");
const { data: configuredKinds = [], refetch } = clientApi.widget.secrets.getConfiguredKinds.useQuery({ itemId });
const setSecret = clientApi.widget.secrets.setSecret.useMutation({ onSuccess: () => refetch() });
const deleteSecret = clientApi.widget.secrets.deleteSecret.useMutation({ onSuccess: () => refetch() });
const setSecret = clientApi.widget.secrets.setSecret.useMutation({
onSuccess: () => refetch(),
onError: (error) => {
showErrorNotification({
title: "Failed to save token",
message: error.message,
});
},
});
const deleteSecret = clientApi.widget.secrets.deleteSecret.useMutation({
onSuccess: () => refetch(),
onError: (error) => {
showErrorNotification({
title: "Failed to delete token",
message: error.message,
});
},
});
const authProviders = useMemo(() => {
const usedProviders = repositories.map((r) => r.provider).filter((p): p is ReleaseProviderKind => p !== undefined);
+54 -69
View File
@@ -142,14 +142,14 @@ catalogs:
specifier: ^5.101.0
version: 5.101.0
'@testcontainers/mysql':
specifier: ^12.0.3
version: 12.0.3
specifier: ^12.0.4
version: 12.0.4
'@testcontainers/postgresql':
specifier: ^12.0.3
version: 12.0.3
specifier: ^12.0.4
version: 12.0.4
'@testcontainers/redis':
specifier: ^12.0.3
version: 12.0.3
specifier: ^12.0.4
version: 12.0.4
'@tiptap/extension-color':
specifier: 3.27.1
version: 3.27.1
@@ -442,8 +442,8 @@ catalogs:
specifier: ^1.18.0
version: 1.18.0
posthog-js:
specifier: ^1.395.0
version: 1.395.0
specifier: ^1.396.1
version: 1.396.3
posthog-node:
specifier: ^4.18.0
version: 4.18.0
@@ -496,8 +496,8 @@ catalogs:
specifier: ^5.3.1
version: 5.3.1
testcontainers:
specifier: ^12.0.3
version: 12.0.3
specifier: ^12.0.4
version: 12.0.4
timezones-ical-library:
specifier: ^2.2.1
version: 2.2.1
@@ -615,7 +615,7 @@ importers:
version: 14.1.1(semantic-release@25.0.5(typescript@6.0.3))
'@testcontainers/redis':
specifier: 'catalog:'
version: 12.0.3
version: 12.0.4
'@turbo/gen':
specifier: 'catalog:'
version: 2.10.0(@types/node@24.13.2)
@@ -651,7 +651,7 @@ importers:
version: 25.0.5(typescript@6.0.3)
testcontainers:
specifier: 'catalog:'
version: 12.0.3
version: 12.0.4
turbo:
specifier: 'catalog:'
version: 2.10.0
@@ -1012,7 +1012,7 @@ importers:
version: 1.18.0(postcss@8.5.15)
posthog-js:
specifier: 'catalog:'
version: 1.395.0
version: 1.396.3
prismjs:
specifier: 'catalog:'
version: 1.30.0
@@ -1688,10 +1688,10 @@ importers:
version: 3.3.0
'@testcontainers/mysql':
specifier: 'catalog:'
version: 12.0.3
version: 12.0.4
'@testcontainers/postgresql':
specifier: 'catalog:'
version: 12.0.3
version: 12.0.4
better-sqlite3:
specifier: 'catalog:'
version: 12.10.0
@@ -6400,11 +6400,11 @@ packages:
'@polka/url@1.0.0-next.25':
resolution: {integrity: sha512-j7P6Rgr3mmtdkeDGTe0E/aYyWEWVtc5yFXtHCRHs28/jptDEWfaVOc5T7cblqy1XKPPfCxJc/8DwQ5YgLOZOVQ==}
'@posthog/core@1.38.0':
resolution: {integrity: sha512-QLrJh0hMVpEJXHNyiJR9YhvIO5tzLDedw4UHdvB+ub4fXHMtHCA8H44qgl11HWR3ajpjxtJ8hs3HyOGVF3Zc1w==}
'@posthog/core@1.39.2':
resolution: {integrity: sha512-G/TL5Xykl+9xCDtBwHHPRSToS/43UjzyxKOfhlTwu/hJHt3v39Q2OFu8hdum71Iu7+tuxxISGVcFMlIST7ksjA==}
'@posthog/types@1.391.1':
resolution: {integrity: sha512-ASwd7Nf4pViqdYRYaNRyPYRVKWa1CcHUAUWR0XeQJLGdNnsWACBwe0sSieb/cHnKsRXjRwO/23KIY83lm/Ccpw==}
'@posthog/types@1.392.0':
resolution: {integrity: sha512-nctNujXL3FC1v99FktaTMSugSD9ZOZekEpahUSafkU2TSvW+XGKNkQZbokuJtiWvPBK208dwMJva8UfBkChqpw==}
'@protobufjs/aspromise@1.1.2':
resolution: {integrity: sha512-j+gKExEuLmKwvz3OgROXtrJ2UG2x8Ch2YZUxahh+s1F2HZ+wAceUNLkvy6zKCPVRkU++ZWQrdxsUeQXmcg4uoQ==}
@@ -7332,14 +7332,14 @@ packages:
peerDependencies:
vue: ^2.7.0 || ^3.0.0
'@testcontainers/mysql@12.0.3':
resolution: {integrity: sha512-xaub3gaAQKR4Q2/9d8B+81XM8LLTQHPOncCL3Ved04JUUIeTobMt3J36JXv/rvEpnrMpphlKYlmQU0aq48HeZA==}
'@testcontainers/mysql@12.0.4':
resolution: {integrity: sha512-XZWh/L6EN8XQa5lsBdESDolDmyUA56bDgYh5SicLzzC2b4jho4lc0yA0GOOVX/bd0zK6VQK6hmDDJE+T3rFrdA==}
'@testcontainers/postgresql@12.0.3':
resolution: {integrity: sha512-y0l/ItWxNfdMU783EOZ66lMq90uuuXPqE+fo1jNSRfMbtfUq/9Ez/wluDxxaS+D/i3I0juep+jmz/WVuip8i9Q==}
'@testcontainers/postgresql@12.0.4':
resolution: {integrity: sha512-a/pLU6j5lpKKAlUTPwqweqMGhOSjgTSb6HBX69TOrXn32ifU37nnQDmNFTj8ddOAw+BQL9oTRkeOxVbZkqhgZA==}
'@testcontainers/redis@12.0.3':
resolution: {integrity: sha512-hN3YedOSb6quFzG1IM4j/r/M635GcaYOxzbTuiSN7676BZHrx1VPl+xll3ojk8ds6TvenrfO37lrEVJYN2URlA==}
'@testcontainers/redis@12.0.4':
resolution: {integrity: sha512-44Ov3Lcptb3KqljcCy6xIJ2VxNsN+3Kw/YpBiotZpOcI4iLgLNmcOgvCFPVo+vDoh4rCfgtNUEbIpL5Mu7oRuw==}
'@tiptap/core@3.27.1':
resolution: {integrity: sha512-rV6Qn4wmC6BxfF+4mu6bqGWj9vA4oXXhsrpXaJL2uhjxeHAGofjwcHof2X84VYzeyXgdlsGmqKie4TAppVXZUQ==}
@@ -9673,10 +9673,6 @@ packages:
resolution: {integrity: sha512-XJgGhoR/CLpqshm4d3L7rzH6t8NgDFUIIpztYlLHIApeJjMZKYJMz2zxPsYxnejq5h3ELYSw/RBsi3t5h7gNTA==}
engines: {node: '>= 8.0'}
dockerode@5.0.0:
resolution: {integrity: sha512-C52mvJ+7lcyhWNfrzVfFsbTrBfy/ezE9FGEYLpu17FUeBcCkxERk9nN7uDl/478ynDiQ4U+5DbQC2vENHkVEtQ==}
engines: {node: '>= 14.17'}
dockerode@5.0.1:
resolution: {integrity: sha512-avsq/xk4YPIrn0CgleX5bjT9Y8IT1p9PxrNQ++RBQ2WEyFfHCTDsT9kmyxz+H/axnjAwg8wJWEIuPGOUuNupiA==}
engines: {node: '>= 14.17'}
@@ -10424,9 +10420,9 @@ packages:
get-own-enumerable-property-symbols@3.0.2:
resolution: {integrity: sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g==}
get-port@7.2.0:
resolution: {integrity: sha512-afP4W205ONCuMoPBqcR6PSXnzX35KTcJygfJfcp+QY+uwm3p20p1YczWXhlICIzGMCxYBQcySEcOgsJcrkyobg==}
engines: {node: '>=16'}
get-port@5.1.1:
resolution: {integrity: sha512-g/Q1aTSDOxFpchXC4i8ZWvxA1lnPqx/JHqcpIw0/LX9T8x/GBbi6YnlN5nhaKIFkT8oFsscUKgDJYxfwfS6QsQ==}
engines: {node: '>=8'}
get-proto@1.0.1:
resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==}
@@ -13115,8 +13111,8 @@ packages:
resolution: {integrity: sha512-Ray65LYEJrMMqDtsBUBXunEVP/g4wtATvq/xz9rchUoLy/9mSkkFgUko/8DVtGxgiP3vivpFMgfb9HpCuDrBHg==}
engines: {node: '>=10.15.1'}
posthog-js@1.395.0:
resolution: {integrity: sha512-5iTb00CGt2eQUUiBQysQiX89RAbCN6wK2sDNzvs9zv0alaY8mJ0ZySrUD3LQ+XyLhgM5pCpacBuUwChqiYDLDw==}
posthog-js@1.396.3:
resolution: {integrity: sha512-CL4mH3F2azsONko/zC2931RLdt6RxTsEr7x7Lyk0SDmj5hZuvBCTbg9MKViXwSRhBr3/SaGcaHS1n95WxTrsCw==}
posthog-node@4.18.0:
resolution: {integrity: sha512-XROs1h+DNatgKh/AlIlCtDxWzwrKdYDb2mOs58n4yN8BkGN9ewqeQwG5ApS4/IzwCb7HPttUkOVulkYatd2PIw==}
@@ -14372,8 +14368,8 @@ packages:
resolution: {integrity: sha512-vzCjQO/rgUuK9sf8VJZvjqiqiHFaZLnOiimmUuOKODxWL8mm/xua7viT7aqX7dgPY60otQjUotzFMmCB4VdmqQ==}
engines: {node: '>=10'}
testcontainers@12.0.3:
resolution: {integrity: sha512-6vfiL9CWIX0rWhTJitzrzHcv4Q/sUfUdBV12jMz6HZ58Lz6ZtXVecO6jljd1O3ookEWQHNICiYoYNEPpDLzuRw==}
testcontainers@12.0.4:
resolution: {integrity: sha512-QIR/8xF1+F/26cIM+9B4yyxNTbKJxAv3hygZyhPRgZ8Q2AhlPZjDdpXRuk16V37X4bgJRI3hXFhoEICMBA7Adg==}
text-decoder@1.2.0:
resolution: {integrity: sha512-n1yg1mOj9DNpk3NeZOx7T6jchTbyJS3i3cucbNN6FcdPriMZx7NsgrGpWWdWZZGxD7ES1XB+3uoqHMgOKaN+fg==}
@@ -14665,8 +14661,8 @@ packages:
resolution: {integrity: sha512-uZsKNuzQxDMUY6M3pIMvy5tvlGmtq8XJ2oLAkfRKGNu+1VQAIvLy2xIVG5ATZl5wDXl/tddByAWCizRbOme+TA==}
engines: {node: '>=20.18.1'}
undici@8.4.1:
resolution: {integrity: sha512-RNHlB4fxZK0IrkhBsxhlbx7s8kFWwr7rzzOqj5nvZugw3ig3RsB7KW3zVlV0eu8POl+rx5d1hmL7rRg0z1owow==}
undici@8.5.0:
resolution: {integrity: sha512-xamtWoB1EshgjpmlXd7GGm2VfdDtw1+rD8uhry8pSNW3If6S8E0m2T2+orSKeZXEn/aPJMviCpDBA65WJt8zhg==}
engines: {node: '>=22.19.0'}
unhead@2.1.15:
@@ -19875,11 +19871,11 @@ snapshots:
'@polka/url@1.0.0-next.25': {}
'@posthog/core@1.38.0':
'@posthog/core@1.39.2':
dependencies:
'@posthog/types': 1.391.1
'@posthog/types': 1.392.0
'@posthog/types@1.391.1': {}
'@posthog/types@1.392.0': {}
'@protobufjs/aspromise@1.1.2': {}
@@ -20957,23 +20953,23 @@ snapshots:
'@tanstack/virtual-core': 3.17.0
vue: 3.5.35(typescript@6.0.3)
'@testcontainers/mysql@12.0.3':
'@testcontainers/mysql@12.0.4':
dependencies:
testcontainers: 12.0.3
testcontainers: 12.0.4
transitivePeerDependencies:
- bare-buffer
- supports-color
'@testcontainers/postgresql@12.0.3':
'@testcontainers/postgresql@12.0.4':
dependencies:
testcontainers: 12.0.3
testcontainers: 12.0.4
transitivePeerDependencies:
- bare-buffer
- supports-color
'@testcontainers/redis@12.0.3':
'@testcontainers/redis@12.0.4':
dependencies:
testcontainers: 12.0.3
testcontainers: 12.0.4
transitivePeerDependencies:
- bare-buffer
- supports-color
@@ -23469,17 +23465,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
dockerode@5.0.0:
dependencies:
'@balena/dockerignore': 1.0.2
'@grpc/grpc-js': 1.12.5
'@grpc/proto-loader': 0.7.13
docker-modem: 5.0.7
protobufjs: 7.4.0
tar-fs: 2.1.4
transitivePeerDependencies:
- supports-color
dockerode@5.0.1:
dependencies:
'@balena/dockerignore': 1.0.2
@@ -24337,7 +24322,7 @@ snapshots:
get-own-enumerable-property-symbols@3.0.2: {}
get-port@7.2.0: {}
get-port@5.1.1: {}
get-proto@1.0.1:
dependencies:
@@ -27419,12 +27404,12 @@ snapshots:
posthog-docusaurus@2.0.5: {}
posthog-js@1.395.0:
posthog-js@1.396.3:
dependencies:
'@posthog/core': 1.38.0
'@posthog/types': 1.391.1
'@posthog/core': 1.39.2
'@posthog/types': 1.392.0
core-js: 3.49.0
dompurify: 3.4.10
dompurify: 3.4.11
fflate: 0.4.8
preact: 10.29.2
query-selector-shadow-dom: 1.0.1
@@ -29049,7 +29034,7 @@ snapshots:
commander: 2.20.3
source-map-support: 0.5.21
testcontainers@12.0.3:
testcontainers@12.0.4:
dependencies:
'@balena/dockerignore': 1.0.2
'@types/dockerode': 4.0.1
@@ -29058,14 +29043,14 @@ snapshots:
byline: 5.0.0
debug: 4.4.3
docker-compose: 1.4.2
dockerode: 5.0.0
get-port: 7.2.0
dockerode: 5.0.1
get-port: 5.1.1
proper-lockfile: 4.1.2
properties-reader: 3.0.1
ssh-remote-port-forward: 1.0.4
tar-fs: 3.1.2
tar-fs: 3.1.3
tmp: 0.2.7
undici: 8.4.1
undici: 8.5.0
transitivePeerDependencies:
- bare-buffer
- supports-color
@@ -29324,7 +29309,7 @@ snapshots:
undici@7.27.2: {}
undici@8.4.1: {}
undici@8.5.0: {}
unhead@2.1.15:
dependencies:
+5 -5
View File
@@ -50,9 +50,9 @@ catalog:
"@tanstack/react-query-devtools": ^5.101.0
"@tanstack/react-query-next-experimental": ^5.101.0
"@tanstack/react-query-persist-client": ^5.101.0
"@testcontainers/mysql": ^12.0.3
"@testcontainers/postgresql": ^12.0.3
"@testcontainers/redis": ^12.0.3
"@testcontainers/mysql": ^12.0.4
"@testcontainers/postgresql": ^12.0.4
"@testcontainers/redis": ^12.0.4
"@tiptap/extension-color": 3.27.1
"@tiptap/extension-highlight": 3.27.1
"@tiptap/extension-image": 3.27.1
@@ -93,7 +93,7 @@ catalog:
"@types/video.js": ^7.3.58
"@types/ws": ^8.18.1
"@types/xml2js": ^0.4.14
posthog-js: ^1.395.0
posthog-js: ^1.396.1
posthog-node: ^4.18.0
"@vitejs/plugin-react": ^6.0.3
"@vitest/coverage-v8": ^4.1.9
@@ -170,7 +170,7 @@ catalog:
semver-parser: ^4.2.1
superjson: 2.2.6
svgson: ^5.3.1
testcontainers: ^12.0.3
testcontainers: ^12.0.4
timezones-ical-library: ^2.2.1
trpc-to-mcp: ^1.3.2
trpc-to-openapi: ^3.3.0