@hot-updater/console 1.0.0-rc.8 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.output/nitro.json +1 -1
- package/.output/public/assets/ConsoleFeatureUnavailable-jB4Loglh.js +1 -0
- package/.output/public/assets/EventDetails-B6yUsyNA.js +1 -0
- package/.output/public/assets/HashValueDisplay-BFX_kY3-.js +1 -0
- package/.output/public/assets/InsightsInfo-BNO0WznZ.js +1 -0
- package/.output/public/assets/InsightsPageHeader-B892oVml.js +1 -0
- package/.output/public/assets/NotFoundPage-DIqCpWa3.js +1 -0
- package/.output/public/assets/alert-dialog-Bbk_4-WJ.js +1 -0
- package/.output/public/assets/api-DCM0wr6O.js +1 -0
- package/.output/public/assets/api-keys-CIO9L_wu.js +1 -0
- package/.output/public/assets/api-keys-DVTL_--f.js +1 -0
- package/.output/public/assets/arrow-left-CnMYpqB7.js +1 -0
- package/.output/public/assets/arrow-up-right-BtffZA6e.js +1 -0
- package/.output/public/assets/chevron-right-BqD5wtFb.js +1 -0
- package/.output/public/assets/clipboard-DS9ucUQL.js +1 -0
- package/.output/public/assets/console-features-api-BH5m_PtQ.js +1 -0
- package/.output/public/assets/dialog-Bqbb7B0N.js +1 -0
- package/.output/public/assets/dist-LxKJB-Vu.js +1 -0
- package/.output/public/assets/empty-CuT2UhFp.js +1 -0
- package/.output/public/assets/field-BBDpjIqu.js +1 -0
- package/.output/public/assets/index-6o51GkFe.js +11 -0
- package/.output/public/assets/input-group-ja_30qaF.js +1 -0
- package/.output/public/assets/insights-CmraDzQh.js +1 -0
- package/.output/public/assets/insights-CxZ2GCYV.js +2 -0
- package/.output/public/assets/insights-api-BigAU9sZ.js +1 -0
- package/.output/public/assets/insights-usage-rpc-DYEhsCKT.js +1 -0
- package/.output/public/assets/insights-vNRCrfnS.js +42 -0
- package/.output/public/assets/insights_.distribution-ChOerfJt.js +1 -0
- package/.output/public/assets/insights_.distribution-D-e4iga8.js +1 -0
- package/.output/public/assets/insights_.distribution-DZtkibX1.js +2 -0
- package/.output/public/assets/installations-BazSJXE0.js +2 -0
- package/.output/public/assets/installations-ClHTqdAO.js +1 -0
- package/.output/public/assets/installations-DpKsBuHi.js +1 -0
- package/.output/public/assets/key-round-wS_SIZ6b.js +1 -0
- package/.output/public/assets/list-CgrYiadM.js +1 -0
- package/.output/public/assets/refresh-cw-BYgoNCco.js +1 -0
- package/.output/public/assets/remote-config-BWwHOkCK.js +1 -0
- package/.output/public/assets/remote-config-Br56BODb.js +6 -0
- package/.output/public/assets/remote-config-CXOi0LRu.js +1 -0
- package/.output/public/assets/routes-B88Erkpk.js +2 -0
- package/.output/public/assets/routes-CfzsAleC.js +1 -0
- package/.output/public/assets/search-DaTDPW25.js +1 -0
- package/.output/public/assets/select-BZZBXMkr.js +1 -0
- package/.output/public/assets/sidebar-DNVyJPfX.js +3 -0
- package/.output/public/assets/smartphone-DpTFgtKf.js +1 -0
- package/.output/public/assets/styles-DTGEAJFv.css +2 -0
- package/.output/public/assets/switch-DZ1TPwx-.js +1 -0
- package/.output/public/assets/table-Gm4qRWwE.js +1 -0
- package/.output/public/assets/tabs-C7FOEjFC.js +1 -0
- package/.output/public/assets/undo-2-CmrHjwFc.js +1 -0
- package/.output/public/assets/useCompositeListItem-9E4pj_CH.js +1 -0
- package/.output/public/assets/valueToPercent-CH8GCHaL.js +1 -0
- package/.output/server/__23tanstack-start-server-fn-resolver-BpRlos5Q.mjs +170 -0
- package/.output/server/_libs/@base-ui/react+[...].mjs +4389 -4207
- package/.output/server/_libs/@tanstack/react-router+[...].mjs +3802 -4022
- package/.output/server/_libs/@tanstack/react-router-ssr-query+[...].mjs +140 -97
- package/.output/server/_libs/lucide-react.mjs +221 -9
- package/.output/server/_libs/next-themes.mjs +1 -1
- package/.output/server/_libs/react-redux+[...].mjs +1 -1
- package/.output/server/_libs/recharts+[...].mjs +483 -901
- package/.output/server/_libs/sonner.mjs +1 -1
- package/.output/server/_libs/tanstack__history.mjs +68 -41
- package/.output/server/_libs/tanstack__query-core.mjs +2010 -309
- package/.output/server/_libs/tanstack__react-query.mjs +448 -21
- package/.output/server/_libs/verkit.mjs +102 -1
- package/.output/server/_ssr/BundleIdDisplay-x94o9rlU.mjs +13 -0
- package/.output/server/_ssr/ConsoleFeatureUnavailable-ldW8v8-q.mjs +58 -0
- package/.output/server/_ssr/EventDetails-Q8kfj9Nr.mjs +344 -0
- package/.output/server/_ssr/{HashValueDisplay-C5tS4oGo.mjs → HashValueDisplay-n1GholGS.mjs} +3 -3
- package/.output/server/_ssr/InsightsInfo-DuJFatQO.mjs +75 -0
- package/.output/server/_ssr/InsightsPageHeader-BSUX3Ye9.mjs +145 -0
- package/.output/server/_ssr/NotFoundPage-DZzOOzS3.mjs +37 -0
- package/.output/server/_ssr/{dialog-WiIAKl4L.mjs → alert-dialog-C43Doa0I.mjs} +6 -83
- package/.output/server/_ssr/{api-keys-aXriWrv7.mjs → api-keys-B4sYm8dM.mjs} +48 -9
- package/.output/server/_ssr/api-keys-CEnM9fqG.mjs +5 -0
- package/.output/server/_ssr/api-keys-rpc-BIFuUgMt.mjs +52 -0
- package/.output/server/_ssr/api-oZjRn9tP.mjs +186 -0
- package/.output/server/_ssr/api-rpc-BNiFRRK8.mjs +240 -0
- package/.output/server/_ssr/{auth-BF8mbAgF.mjs → auth-UP0wXs4i.mjs} +1 -1
- package/.output/server/_ssr/{auth-rpc-B7w3AdRr.mjs → auth-rpc-DnZqYxyq.mjs} +6 -6
- package/.output/server/_ssr/auth.server-DFpyxRDd.mjs +5374 -0
- package/.output/server/_ssr/bundleActivity-M5gzBFNg.mjs +18 -0
- package/.output/server/_ssr/config-WVX4IxSR.mjs +15 -0
- package/.output/server/_ssr/config.server-DskXCAyI.mjs +35 -0
- package/.output/server/_ssr/console-access-BJfAXknd.mjs +17 -0
- package/.output/server/_ssr/console-features-Oz0q20jJ.mjs +61 -0
- package/.output/server/_ssr/console-features-api-C9kiKvaV.mjs +43 -0
- package/.output/server/_ssr/console-features-rpc-P0GL7Z-R.mjs +19 -0
- package/.output/server/_ssr/{createServerFn-B2hcXoPM.mjs → createMiddleware-Cm6Tn0_Y.mjs} +67 -56
- package/.output/server/_ssr/{createServerRpc-DB29C_5p.mjs → createServerRpc-RLR4H-Fn.mjs} +2 -2
- package/.output/server/_ssr/databaseConfig-C5SkAyUy.mjs +5 -0
- package/.output/server/_ssr/{databaseJsonValue-d6I3nAS4.mjs → databaseJsonValue-Csbuzc9Q.mjs} +28 -5
- package/.output/server/_ssr/databaseRows-CPphvbag.mjs +73 -0
- package/.output/server/_ssr/dialog-BbYDMjdC.mjs +84 -0
- package/.output/server/_ssr/{dist-CyzPaI5v.mjs → dist-CbQbBIw-.mjs} +140 -7
- package/.output/server/_ssr/{downloadBundle-CI7JUKvC.mjs → downloadBundle-CZysjmNW.mjs} +10 -10
- package/.output/server/_ssr/empty-CVLGfxuu.mjs +60 -0
- package/.output/server/_ssr/{empty-plugin-adapters-B5QvGpEl.mjs → empty-plugin-adapters-CPtwX8a7.mjs} +1 -1
- package/.output/server/_ssr/failureReports-DKDhVsXA.mjs +33 -0
- package/.output/server/_ssr/field-asw83X0v.mjs +189 -0
- package/.output/server/_ssr/getBundleChildren-Cv9iz1As.mjs +22 -0
- package/.output/server/_ssr/{input-group-Coj6SwVP.mjs → input-group-CuYJHosb.mjs} +2 -2
- package/.output/server/_ssr/insights-B55FG5fm.mjs +14 -0
- package/.output/server/_ssr/insights-CWnHIFUV.mjs +5 -0
- package/.output/server/_ssr/insights-CpLpedFZ.mjs +2315 -0
- package/.output/server/_ssr/insights-api-sjws23WF.mjs +122 -0
- package/.output/server/_ssr/insights-errors-BjnFUyZj.mjs +34 -0
- package/.output/server/_ssr/insights-failures-rpc-BvbWvqNf.mjs +36 -0
- package/.output/server/_ssr/insights-failures-xaa41Buf.mjs +46 -0
- package/.output/server/_ssr/insights-recovery-BWQhiZaF.mjs +28 -0
- package/.output/server/_ssr/insights-recovery-rpc-GiYXdkaY.mjs +32 -0
- package/.output/server/_ssr/{insights-rpc-l2-oBYth.mjs → insights-rpc-DP_8Rmz4.mjs} +22 -14
- package/.output/server/_ssr/insights-usage-BpBM0U0c.mjs +29 -0
- package/.output/server/_ssr/insights-usage-rpc-BiolgB8e.mjs +29 -0
- package/.output/server/_ssr/insights-usage-rpc-KStL0zOx.mjs +41 -0
- package/.output/server/_ssr/insightsUsage-CzhVjsc8.mjs +56 -0
- package/.output/server/_ssr/insights_.distribution-CVrnbP3R.mjs +7 -0
- package/.output/server/_ssr/insights_.distribution-D2HaNTAA.mjs +16 -0
- package/.output/server/_ssr/{insights_.distribution-INw6QxbU.mjs → insights_.distribution-DN9pR422.mjs} +50 -22
- package/.output/server/_ssr/installations-BHmbbnH8.mjs +5 -0
- package/.output/server/_ssr/{installations-DH-tQuRo.mjs → installations-BSCmFq8Q.mjs} +279 -367
- package/.output/server/_ssr/installations-DD1g__Nc.mjs +69 -0
- package/.output/server/_ssr/listReleases-BfUBlCHo.mjs +79 -0
- package/.output/server/_ssr/plugins-BaD1slHx.mjs +2086 -0
- package/.output/server/_ssr/release-adoption-005tQRpo.mjs +55 -0
- package/.output/server/_ssr/release-adoption-rpc-BsstqxUp.mjs +41 -0
- package/.output/server/_ssr/releaseAdoption-CtOFkwli.mjs +114 -0
- package/.output/server/_ssr/releaseManagement-DFMUnDF5.mjs +11 -0
- package/.output/server/_ssr/remote-config-C2Ee8lXO.mjs +5 -0
- package/.output/server/_ssr/remote-config-Dv1ccMo-.mjs +17 -0
- package/.output/server/_ssr/remote-config-of0lGQH8.mjs +2648 -0
- package/.output/server/_ssr/remote-config-rpc-BzX31mUS.mjs +115 -0
- package/.output/server/_ssr/rolldown-runtime-rSIU-vHC.mjs +13 -0
- package/.output/server/_ssr/{router-DfFyAp5p.mjs → router-D8NuoJ_I.mjs} +117 -136
- package/.output/server/_ssr/{routes-BtsfVx-p.mjs → routes-DgvnFqDy.mjs} +195 -429
- package/.output/server/_ssr/routes-V8sDybGf.mjs +409 -0
- package/.output/server/_ssr/runtime.server-De0QVWc9.mjs +104 -0
- package/.output/server/_ssr/schema-BiAVyEj2.mjs +361 -0
- package/.output/server/_ssr/{select-CyvLaMza.mjs → select-t3iXRwc9.mjs} +3 -3
- package/.output/server/_ssr/server-h4VxnExB.mjs +8325 -0
- package/.output/server/_ssr/{createSsrRpc-C-dLcQuy.mjs → sidebar-DJcErBMo.mjs} +107 -47
- package/.output/server/_ssr/ssr.mjs +1 -1
- package/.output/server/_ssr/start-BfFbHKMK.mjs +4 -0
- package/.output/server/_ssr/switch-E-btwMGt.mjs +43 -0
- package/.output/server/_ssr/{table-CkVhsNpe.mjs → table-37Dd23TN.mjs} +2 -2
- package/.output/server/_ssr/tabs-DEFnTm95.mjs +45 -0
- package/.output/server/_ssr/updateFailures-H6pnnYK4.mjs +40 -0
- package/.output/server/_ssr/{uuidv7-D0QFkPL_.mjs → uuidv7-C88s9jWF.mjs} +2 -2
- package/.output/server/_tanstack-start-manifest_v-55AGsehh.mjs +139 -0
- package/.output/server/index.mjs +303 -205
- package/LICENSE +13 -14
- package/README.md +80 -71
- package/lib/index.d.mts +23 -11
- package/lib/vite-internal.mjs +13 -3
- package/lib/vite.d.mts +2 -0
- package/package.json +14 -14
- package/src/components/AppSidebar.tsx +74 -75
- package/src/components/ConsoleAccessPage.tsx +5 -1
- package/src/components/ConsoleFeatureUnavailable.tsx +80 -0
- package/src/components/NotFoundPage.tsx +7 -7
- package/src/components/features/FeatureSlots.tsx +103 -0
- package/src/components/features/api-keys/apiKeysFeatureUi.tsx +15 -0
- package/src/components/features/bundles/BundleMetadata.tsx +8 -5
- package/src/components/features/bundles/RolloutCohortsDialog.tsx +1 -1
- package/src/components/features/channels/ChannelManagementDialog.tsx +8 -6
- package/src/components/features/insights/AppUsage.tsx +41 -14
- package/src/components/features/insights/BuiltinBundle.tsx +36 -0
- package/src/components/features/insights/ComparedBundlesChart.tsx +310 -0
- package/src/components/features/insights/EstimatedCount.tsx +18 -0
- package/src/components/features/insights/EventDetails.tsx +390 -26
- package/src/components/features/insights/EventHistoryCard.tsx +111 -25
- package/src/components/features/insights/EventHistoryList.tsx +1 -1
- package/src/components/features/insights/FailureReports.tsx +407 -0
- package/src/components/features/insights/InsightsControls.tsx +240 -142
- package/src/components/features/insights/InsightsErrorAlert.tsx +14 -1
- package/src/components/features/insights/InsightsOverview.tsx +601 -403
- package/src/components/features/insights/InsightsPageHeader.tsx +19 -14
- package/src/components/features/insights/InsightsPeriodSelector.tsx +67 -12
- package/src/components/features/insights/InstallationHistoryCard.tsx +65 -10
- package/src/components/features/insights/InstallationMatchesCard.tsx +1 -1
- package/src/components/features/insights/ReleaseActivity.tsx +308 -0
- package/src/components/features/insights/ReportingDevicesSummary.tsx +13 -13
- package/src/components/features/insights/RollbackButton.tsx +118 -0
- package/src/components/features/insights/UpdateFailures.tsx +382 -0
- package/src/components/features/insights/insightsFeatureUi.tsx +35 -0
- package/src/components/features/releases/ReleaseEditorSheet.tsx +27 -13
- package/src/components/features/remote-config/ConditionDialog.tsx +592 -0
- package/src/components/features/remote-config/ConditionsCard.tsx +247 -0
- package/src/components/features/remote-config/ParameterDialog.tsx +426 -0
- package/src/components/features/remote-config/ParametersCard.tsx +254 -0
- package/src/components/features/remote-config/PreviewCard.tsx +284 -0
- package/src/components/features/remote-config/PublishDialog.tsx +325 -0
- package/src/components/features/remote-config/RemoteConfigPage.tsx +353 -0
- package/src/components/features/remote-config/RuleSummary.tsx +21 -0
- package/src/components/features/remote-config/ValueInput.tsx +151 -0
- package/src/components/features/remote-config/VersionsCard.tsx +384 -0
- package/src/components/features/remote-config/remoteConfigFeatureUi.tsx +15 -0
- package/src/components/features/remote-config/useDateTimeText.ts +16 -0
- package/src/components/ui/sidebar.tsx +22 -29
- package/src/index.ts +26 -19
- package/src/lib/api-keys-api.ts +0 -28
- package/src/lib/api-keys-rpc.ts +27 -38
- package/src/lib/api-rpc.ts +125 -288
- package/src/lib/api.ts +15 -134
- package/src/lib/bundle-activity.ts +24 -4
- package/src/lib/console-access.ts +20 -0
- package/src/lib/console-features-api.ts +68 -0
- package/src/lib/console-features-rpc.ts +13 -0
- package/src/lib/console-features.ts +98 -0
- package/src/lib/insights-api.ts +56 -2
- package/src/lib/insights-errors.ts +64 -0
- package/src/lib/insights-failures-rpc.ts +36 -0
- package/src/lib/insights-failures.ts +130 -0
- package/src/lib/insights-recovery-rpc.ts +13 -17
- package/src/lib/insights-recovery.ts +12 -36
- package/src/lib/insights-retention.ts +21 -0
- package/src/lib/insights-rpc.ts +30 -12
- package/src/lib/insights-search.ts +50 -4
- package/src/lib/insights-usage-rpc.ts +15 -9
- package/src/lib/insights-usage.ts +41 -3
- package/src/lib/insights-view.ts +34 -5
- package/src/lib/release-adoption-api.ts +214 -0
- package/src/lib/release-adoption-rpc.ts +49 -0
- package/src/lib/release-adoption.ts +164 -0
- package/src/lib/remote-config-api.ts +119 -0
- package/src/lib/remote-config-draft.ts +666 -0
- package/src/lib/remote-config-rpc.ts +196 -0
- package/src/lib/scroll-restoration.ts +21 -0
- package/src/lib/server/auth.server.ts +13 -5
- package/src/lib/server/bundleActivity.ts +27 -28
- package/src/lib/server/config.server.ts +21 -76
- package/src/lib/server/console-feature-apis.ts +70 -0
- package/src/lib/server/console-runtime.server.ts +82 -38
- package/src/lib/server/downloadBundle.ts +14 -15
- package/src/lib/server/failureReports.ts +50 -0
- package/src/lib/server/getBundleChildren.ts +31 -122
- package/src/lib/server/insightsUsage.ts +52 -113
- package/src/lib/server/listReleases.ts +109 -44
- package/src/lib/server/releaseAdoption.ts +151 -0
- package/src/lib/server/releaseReachability.ts +8 -8
- package/src/lib/server/remoteConfig.ts +75 -0
- package/src/lib/server/runtime.server.ts +120 -31
- package/src/lib/server/updateFailures.ts +66 -0
- package/src/lib/use-dialog-target.ts +27 -0
- package/src/routeTree.gen.ts +44 -44
- package/src/router.tsx +3 -2
- package/src/routes/-installations-search.ts +32 -8
- package/src/routes/-releases-search.ts +76 -29
- package/src/routes/__root.tsx +7 -1
- package/src/routes/api/bundles/$bundleId/download.ts +2 -5
- package/src/routes/api-keys.tsx +5 -2
- package/src/routes/index.tsx +210 -152
- package/src/routes/insights.tsx +91 -23
- package/src/routes/insights_.distribution.tsx +50 -9
- package/src/routes/installations.tsx +97 -40
- package/src/routes/remote-config.tsx +42 -0
- package/src/styles.css +9 -0
- package/src/vite-internal.ts +15 -3
- package/src/vite.ts +2 -0
- package/.output/public/assets/HashValueDisplay-BpTc3Oyg.js +0 -1
- package/.output/public/assets/InsightsPageHeader-DC2eEst8.js +0 -1
- package/.output/public/assets/api-CdUyUqzR.js +0 -42
- package/.output/public/assets/api-keys-64PM9PwW.js +0 -1
- package/.output/public/assets/api-keys-api-BeaJnvY5.js +0 -1
- package/.output/public/assets/arrow-left-04Rh8Zgp.js +0 -1
- package/.output/public/assets/card-CYHs5FZv.js +0 -1
- package/.output/public/assets/chart-no-axes-combined-DwyMsVFW.js +0 -1
- package/.output/public/assets/createServerFn-DU71xucx.js +0 -3
- package/.output/public/assets/dialog-IVMkBRCq.js +0 -1
- package/.output/public/assets/dist-BR4GzeEu.js +0 -1
- package/.output/public/assets/field-B3CYDpjg.js +0 -1
- package/.output/public/assets/index-C39o7rJH.js +0 -10
- package/.output/public/assets/info-C3y9HNoU.js +0 -1
- package/.output/public/assets/input-group-nLZylhWF.js +0 -1
- package/.output/public/assets/insights-Bm9v8uO3.js +0 -2
- package/.output/public/assets/insights-DS3iO7Up.js +0 -1
- package/.output/public/assets/insights-search-Byj3g3Mp.js +0 -1
- package/.output/public/assets/insights-usage-rpc-BaGR3lgq.js +0 -1
- package/.output/public/assets/insights_.distribution-B1i6cjlQ.js +0 -1
- package/.output/public/assets/insights_.distribution-C1Wf27eB.js +0 -2
- package/.output/public/assets/installations-CkFW4fV9.js +0 -2
- package/.output/public/assets/installations-DxTaIcHD.js +0 -1
- package/.output/public/assets/lazyRouteComponent-BapzjYnb.js +0 -1
- package/.output/public/assets/list-Dqt53fWZ.js +0 -1
- package/.output/public/assets/loader-circle-CUKfUqow.js +0 -1
- package/.output/public/assets/preload-helper-ClBMtM1g.js +0 -1
- package/.output/public/assets/refresh-cw-CNE_2PnD.js +0 -1
- package/.output/public/assets/routes-Cgtvspjg.js +0 -2
- package/.output/public/assets/routes-O2r2UUN8.js +0 -1
- package/.output/public/assets/shield-check-BFcJ46kz.js +0 -1
- package/.output/public/assets/signing-BgspC-xP.js +0 -1
- package/.output/public/assets/styles-DnrWuBwd.css +0 -2
- package/.output/public/assets/table-BuWQgxJJ.js +0 -1
- package/.output/public/assets/useMutation-CSV9NCUl.js +0 -1
- package/.output/public/assets/useOpenInteractionType-D5kduCTD.js +0 -1
- package/.output/public/assets/valueToPercent-BAtcbSLk.js +0 -1
- package/.output/server/__23tanstack-start-server-fn-resolver-CmYkol9D.mjs +0 -150
- package/.output/server/_ssr/InsightsPageHeader-Dma3dVj1.mjs +0 -64
- package/.output/server/_ssr/api-C3bGmgY0.mjs +0 -332
- package/.output/server/_ssr/api-keys-api-BRF6rbRC.mjs +0 -60
- package/.output/server/_ssr/api-keys-rpc-BMa1ZM6N.mjs +0 -136
- package/.output/server/_ssr/api-rpc-BYQ2e0z6.mjs +0 -1399
- package/.output/server/_ssr/auth.server-CmicHh0J.mjs +0 -47
- package/.output/server/_ssr/bundle-signing-rpc-DbQ4pFAX.mjs +0 -16
- package/.output/server/_ssr/bundle-signing.server-Uqt1OF49.mjs +0 -12
- package/.output/server/_ssr/bundleActivity-pBrPSG01.mjs +0 -28
- package/.output/server/_ssr/card-B7KSO_25.mjs +0 -108
- package/.output/server/_ssr/config-Dv8qLDZ0.mjs +0 -13
- package/.output/server/_ssr/config.server-C-d1QaBU.mjs +0 -368
- package/.output/server/_ssr/databaseRows-5bCRTxm-.mjs +0 -126
- package/.output/server/_ssr/deleteBundle-8X-jq7Z7.mjs +0 -66
- package/.output/server/_ssr/field-BDwuU8RE.mjs +0 -74
- package/.output/server/_ssr/getBundleChildren-DoL8l_AS.mjs +0 -50
- package/.output/server/_ssr/insights-BDJjaDLp.mjs +0 -938
- package/.output/server/_ssr/insights-D0FWpfOS.mjs +0 -10
- package/.output/server/_ssr/insights-recovery-Cv6RSyeR.mjs +0 -21
- package/.output/server/_ssr/insights-recovery-rpc-BE9YsK_T.mjs +0 -37
- package/.output/server/_ssr/insights-search-1czJMZgk.mjs +0 -21
- package/.output/server/_ssr/insights-usage-rpc-BE_aCnea.mjs +0 -184
- package/.output/server/_ssr/insights-usage-rpc-CtAolz-t.mjs +0 -24
- package/.output/server/_ssr/insightsContract-B09K_Px1.mjs +0 -303
- package/.output/server/_ssr/insightsHistory-Ci4rYAgl.mjs +0 -41
- package/.output/server/_ssr/insightsRecovery-CaghWL2t.mjs +0 -113
- package/.output/server/_ssr/insightsUsage-DNIj6jxF.mjs +0 -71
- package/.output/server/_ssr/insights_.distribution-Cp0kf1vW.mjs +0 -10
- package/.output/server/_ssr/installations-Bhyiwx8G.mjs +0 -29
- package/.output/server/_ssr/routes-xBkI2Fmt.mjs +0 -37
- package/.output/server/_ssr/runtime.server-CsiKFp_Z.mjs +0 -436
- package/.output/server/_ssr/server-BdkuOWe8.mjs +0 -7468
- package/.output/server/_ssr/signing-CQ70saFm.mjs +0 -133
- package/.output/server/_ssr/start-DpViQGnt.mjs +0 -4
- package/.output/server/_tanstack-start-manifest_v-CrBsoKQQ.mjs +0 -125
- package/src/components/features/bundles/BundleActivityChart.tsx +0 -97
- package/src/components/features/bundles/BundleInsightsSummary.tsx +0 -126
- package/src/components/features/signing/BundleSigningPage.tsx +0 -139
- package/src/lib/bundle-signing-api.ts +0 -14
- package/src/lib/bundle-signing-rpc.ts +0 -16
- package/src/lib/server/bundle-signing.server.ts +0 -23
- package/src/lib/server/deleteBundle.ts +0 -145
- package/src/lib/server/insightsHistory.ts +0 -52
- package/src/lib/server/insightsRecovery.ts +0 -187
- package/src/routes/signing.tsx +0 -37
|
@@ -1,16 +1,46 @@
|
|
|
1
1
|
import { i as __toESM } from "../_runtime.mjs";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.
|
|
2
|
+
import { _t as require_react, gt as require_jsx_runtime } from "./@base-ui/react+[...].mjs";
|
|
3
|
+
import { a as QueryObserver, d as shouldThrowError, i as InfiniteQueryObserver, n as QueriesObserver, o as notifyManager, r as MutationObserver, u as noop } from "./tanstack__query-core.mjs";
|
|
4
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
5
5
|
var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
|
|
6
6
|
var import_jsx_runtime = require_jsx_runtime();
|
|
7
|
+
/**
|
|
8
|
+
* The context that `useQueryClient` reads from. `QueryClientProvider` is the normal way to set it.
|
|
9
|
+
*/
|
|
7
10
|
var QueryClientContext = import_react.createContext(void 0);
|
|
11
|
+
/**
|
|
12
|
+
* The `useQueryClient` hook returns the current `QueryClient` instance.
|
|
13
|
+
*
|
|
14
|
+
* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will
|
|
15
|
+
* be used.
|
|
16
|
+
* @returns The current `QueryClient` instance.
|
|
17
|
+
* @throws If no `queryClient` argument is passed and no `QueryClientProvider` is found in the component tree.
|
|
18
|
+
*/
|
|
8
19
|
var useQueryClient = (queryClient) => {
|
|
9
20
|
const client = import_react.useContext(QueryClientContext);
|
|
10
21
|
if (queryClient) return queryClient;
|
|
11
22
|
if (!client) throw new Error("No QueryClient set, use QueryClientProvider to set one");
|
|
12
23
|
return client;
|
|
13
24
|
};
|
|
25
|
+
/**
|
|
26
|
+
* Use the `QueryClientProvider` component to connect and provide a `QueryClient` to your application. Also
|
|
27
|
+
* calls `client.mount()`/`client.unmount()` as this component mounts/unmounts, which subscribes the client to
|
|
28
|
+
* focus/online events (resuming any paused mutations and refetching as needed when the app regains focus or
|
|
29
|
+
* comes back online).
|
|
30
|
+
*
|
|
31
|
+
* @returns The provided `children`, wrapped so they can read the `QueryClient` via `useQueryClient`.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
|
36
|
+
*
|
|
37
|
+
* const queryClient = new QueryClient()
|
|
38
|
+
*
|
|
39
|
+
* function App() {
|
|
40
|
+
* return <QueryClientProvider client={queryClient}>...</QueryClientProvider>
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
14
44
|
var QueryClientProvider = ({ client, children }) => {
|
|
15
45
|
import_react.useEffect(() => {
|
|
16
46
|
client.mount();
|
|
@@ -24,12 +54,22 @@ var QueryClientProvider = ({ client, children }) => {
|
|
|
24
54
|
});
|
|
25
55
|
};
|
|
26
56
|
//#endregion
|
|
27
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.
|
|
57
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
|
|
28
58
|
var IsRestoringContext = import_react.createContext(false);
|
|
59
|
+
/**
|
|
60
|
+
* If you are using `PersistQueryClientProvider`, you can also use the `useIsRestoring` hook alongside it to
|
|
61
|
+
* check if a restore is currently in progress. `useQuery` and friends also check this internally to avoid
|
|
62
|
+
* race conditions between the restore and mounting queries.
|
|
63
|
+
*
|
|
64
|
+
* @returns `true` while a persisted client is being restored, `false` otherwise.
|
|
65
|
+
*/
|
|
29
66
|
var useIsRestoring = () => import_react.useContext(IsRestoringContext);
|
|
30
67
|
IsRestoringContext.Provider;
|
|
31
68
|
//#endregion
|
|
32
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.
|
|
69
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
70
|
+
/**
|
|
71
|
+
* Resets any query errors within the boundary, so queries know they can try again.
|
|
72
|
+
*/
|
|
33
73
|
function createValue() {
|
|
34
74
|
let isReset = false;
|
|
35
75
|
return {
|
|
@@ -45,12 +85,42 @@ function createValue() {
|
|
|
45
85
|
};
|
|
46
86
|
}
|
|
47
87
|
var QueryErrorResetBoundaryContext = import_react.createContext(createValue());
|
|
88
|
+
/**
|
|
89
|
+
* This hook will reset any query errors within the closest `QueryErrorResetBoundary`. If there is no boundary
|
|
90
|
+
* defined it will reset them globally.
|
|
91
|
+
*
|
|
92
|
+
* @returns The boundary's {@link QueryErrorResetBoundaryValue}.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```tsx
|
|
96
|
+
* import { ErrorBoundary } from 'react-error-boundary'
|
|
97
|
+
* import { useQueryErrorResetBoundary } from '@tanstack/react-query'
|
|
98
|
+
*
|
|
99
|
+
* function App({ children }: { children: React.ReactNode }) {
|
|
100
|
+
* const { reset } = useQueryErrorResetBoundary()
|
|
101
|
+
*
|
|
102
|
+
* return (
|
|
103
|
+
* <ErrorBoundary
|
|
104
|
+
* onReset={reset}
|
|
105
|
+
* fallbackRender={({ resetErrorBoundary }) => (
|
|
106
|
+
* <div>
|
|
107
|
+
* There was an error!
|
|
108
|
+
* <button onClick={() => resetErrorBoundary()}>Try again</button>
|
|
109
|
+
* </div>
|
|
110
|
+
* )}
|
|
111
|
+
* >
|
|
112
|
+
* {children}
|
|
113
|
+
* </ErrorBoundary>
|
|
114
|
+
* )
|
|
115
|
+
* }
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
48
118
|
var useQueryErrorResetBoundary = () => import_react.useContext(QueryErrorResetBoundaryContext);
|
|
49
119
|
//#endregion
|
|
50
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.
|
|
120
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
|
|
51
121
|
var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
|
|
52
122
|
const throwOnError = query?.state.error && typeof options.throwOnError === "function" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;
|
|
53
|
-
if (options.suspense ||
|
|
123
|
+
if (options.suspense || throwOnError) {
|
|
54
124
|
if (!errorResetBoundary.isReset()) options.retryOnMount = false;
|
|
55
125
|
}
|
|
56
126
|
};
|
|
@@ -63,7 +133,7 @@ var getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }
|
|
|
63
133
|
return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
|
|
64
134
|
};
|
|
65
135
|
//#endregion
|
|
66
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.
|
|
136
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/suspense.js
|
|
67
137
|
var ensureSuspenseTimers = (defaultedOptions) => {
|
|
68
138
|
if (defaultedOptions.suspense) {
|
|
69
139
|
const MIN_SUSPENSE_TIME_MS = 1e3;
|
|
@@ -73,26 +143,205 @@ var ensureSuspenseTimers = (defaultedOptions) => {
|
|
|
73
143
|
if (typeof defaultedOptions.gcTime === "number") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);
|
|
74
144
|
}
|
|
75
145
|
};
|
|
76
|
-
var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
|
|
77
146
|
var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
|
|
78
147
|
var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
|
|
79
148
|
errorResetBoundary.clearReset();
|
|
80
149
|
});
|
|
81
150
|
//#endregion
|
|
82
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.
|
|
151
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useQueries.js
|
|
152
|
+
/**
|
|
153
|
+
* The `useQueries` hook can be used to fetch a variable number of queries.
|
|
154
|
+
*
|
|
155
|
+
* The `queries` key accepts an array with query option objects mostly identical to `useQuery` — the top-level
|
|
156
|
+
* `subscribed` option isn't accepted per query (see `placeholderData` below for another difference). A custom
|
|
157
|
+
* `QueryClient` is supplied once, as `useQueries`' own top-level second argument, rather than per query.
|
|
158
|
+
*
|
|
159
|
+
* Having the same query key more than once in the array of query objects may cause some data to be shared
|
|
160
|
+
* between queries. To avoid this, consider de-duplicating the queries and map the results back to the desired
|
|
161
|
+
* structure.
|
|
162
|
+
*
|
|
163
|
+
* The `combine` option can be used to combine the results of the queries into a single value. The result will
|
|
164
|
+
* be structurally shared to be as referentially stable as possible.
|
|
165
|
+
*
|
|
166
|
+
* @remarks The `combine` function only re-runs if it changed referentially, or if any of the query results
|
|
167
|
+
* changed. An inlined `combine` function, as shown in the example below, therefore runs on every render — wrap
|
|
168
|
+
* it in `useCallback`, or extract it to a stable function reference if it doesn't have any dependencies, to
|
|
169
|
+
* avoid that.
|
|
170
|
+
*
|
|
171
|
+
* Unlike `useQuery`, `useQueries` cannot infer the `data` argument of an _inline_ `select` from its sibling
|
|
172
|
+
* `queryFn`. Because `useQueries` infers the type of the whole `queries` array at once, the `select` parameter
|
|
173
|
+
* of a query object written inline cannot be contextually typed from that same object's `queryFn`, so it falls
|
|
174
|
+
* back to `unknown` — a [known TypeScript limitation](https://github.com/TanStack/query/issues/6556). Annotate
|
|
175
|
+
* the `select` parameter explicitly, or define the query with {@link queryOptions}, which resolves its types in
|
|
176
|
+
* a single object _before_ it reaches `useQueries`, to work around this — see the example below. The same
|
|
177
|
+
* limitation applies to {@link useSuspenseQueries}.
|
|
178
|
+
*
|
|
179
|
+
* `placeholderData` is supported here too, but unlike `useQuery`, it doesn't receive information from
|
|
180
|
+
* previously rendered queries, because the number of queries can differ between renders.
|
|
181
|
+
* @param queryClient - Use this to provide a custom `QueryClient`. Otherwise, the one from the nearest context
|
|
182
|
+
* will be used.
|
|
183
|
+
* @returns The combined result. Without `combine`, this is an array with all the query results, in the same
|
|
184
|
+
* order as the input. When `combine` is provided, this is the value returned by `combine` instead.
|
|
185
|
+
*
|
|
186
|
+
* @example
|
|
187
|
+
* ```tsx
|
|
188
|
+
* import { useQueries } from '@tanstack/react-query'
|
|
189
|
+
*
|
|
190
|
+
* function Posts({ ids }: { ids: Array<number> }) {
|
|
191
|
+
* const postQueries = useQueries({
|
|
192
|
+
* queries: ids.map((id) => ({
|
|
193
|
+
* queryKey: ['post', id],
|
|
194
|
+
* queryFn: () => fetchPost(id),
|
|
195
|
+
* staleTime: Infinity,
|
|
196
|
+
* })),
|
|
197
|
+
* })
|
|
198
|
+
*
|
|
199
|
+
* return (
|
|
200
|
+
* <ul>
|
|
201
|
+
* {postQueries.map((query, index) => {
|
|
202
|
+
* if (query.isPending) return <li key={ids[index]}>Loading...</li>
|
|
203
|
+
* if (query.isError) return <li key={ids[index]}>Error: {query.error.message}</li>
|
|
204
|
+
* return <li key={ids[index]}>{query.data.title}</li>
|
|
205
|
+
* })}
|
|
206
|
+
* </ul>
|
|
207
|
+
* )
|
|
208
|
+
* }
|
|
209
|
+
* ```
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* Combining results into a single value:
|
|
213
|
+
* ```tsx
|
|
214
|
+
* import { useQueries } from '@tanstack/react-query'
|
|
215
|
+
*
|
|
216
|
+
* function Posts({ ids }: { ids: Array<number> }) {
|
|
217
|
+
* const { data, isPending, isError } = useQueries({
|
|
218
|
+
* queries: ids.map((id) => ({
|
|
219
|
+
* queryKey: ['post', id],
|
|
220
|
+
* queryFn: () => fetchPost(id),
|
|
221
|
+
* })),
|
|
222
|
+
* combine: (postQueries) => {
|
|
223
|
+
* return {
|
|
224
|
+
* data: postQueries.map((query) => query.data),
|
|
225
|
+
* isPending: postQueries.some((query) => query.isPending),
|
|
226
|
+
* isError: postQueries.some((query) => query.isError),
|
|
227
|
+
* }
|
|
228
|
+
* },
|
|
229
|
+
* })
|
|
230
|
+
*
|
|
231
|
+
* if (isPending) return 'Loading...'
|
|
232
|
+
* if (isError) return 'Error loading posts'
|
|
233
|
+
*
|
|
234
|
+
* return (
|
|
235
|
+
* <ul>
|
|
236
|
+
* {data.map((post) => (
|
|
237
|
+
* <li key={post?.id}>{post?.title}</li>
|
|
238
|
+
* ))}
|
|
239
|
+
* </ul>
|
|
240
|
+
* )
|
|
241
|
+
* }
|
|
242
|
+
* ```
|
|
243
|
+
*
|
|
244
|
+
* @example
|
|
245
|
+
* Typing `select` via {@link queryOptions}. Note that spreading a `queryOptions` result and overriding
|
|
246
|
+
* `select` inline still falls back to `unknown` — wrap the spread in `queryOptions` again so the override is
|
|
247
|
+
* resolved before it reaches `useQueries`:
|
|
248
|
+
* ```tsx
|
|
249
|
+
* import { queryOptions, useQueries } from '@tanstack/react-query'
|
|
250
|
+
*
|
|
251
|
+
* const postOptions = (id: number) =>
|
|
252
|
+
* queryOptions({
|
|
253
|
+
* queryKey: ['post', id],
|
|
254
|
+
* queryFn: () => fetchPost(id),
|
|
255
|
+
* })
|
|
256
|
+
*
|
|
257
|
+
* function PostTitle({ id }: { id: number }) {
|
|
258
|
+
* const [{ data: broken }] = useQueries({
|
|
259
|
+
* queries: [
|
|
260
|
+
* {
|
|
261
|
+
* ...postOptions(id),
|
|
262
|
+
* // ❌ `data` is `unknown` here
|
|
263
|
+
* select: (data) => data.title,
|
|
264
|
+
* },
|
|
265
|
+
* ],
|
|
266
|
+
* })
|
|
267
|
+
*
|
|
268
|
+
* const [{ data: fixed }] = useQueries({
|
|
269
|
+
* queries: [
|
|
270
|
+
* queryOptions({
|
|
271
|
+
* ...postOptions(id),
|
|
272
|
+
* // ✅ `data` is `Post`
|
|
273
|
+
* select: (data) => data.title,
|
|
274
|
+
* }),
|
|
275
|
+
* ],
|
|
276
|
+
* })
|
|
277
|
+
*
|
|
278
|
+
* return <h1>{fixed}</h1>
|
|
279
|
+
* }
|
|
280
|
+
* ```
|
|
281
|
+
*/
|
|
282
|
+
function useQueries({ queries, ...options }, queryClient) {
|
|
283
|
+
const client = useQueryClient(queryClient);
|
|
284
|
+
const isRestoring = useIsRestoring();
|
|
285
|
+
const errorResetBoundary = useQueryErrorResetBoundary();
|
|
286
|
+
const subscribed = options.subscribed !== false;
|
|
287
|
+
const defaultedQueries = import_react.useMemo(() => queries.map((opts) => {
|
|
288
|
+
const defaultedOptions = client.defaultQueryOptions(opts);
|
|
289
|
+
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : subscribed ? "optimistic" : void 0;
|
|
290
|
+
return defaultedOptions;
|
|
291
|
+
}), [
|
|
292
|
+
queries,
|
|
293
|
+
client,
|
|
294
|
+
isRestoring,
|
|
295
|
+
subscribed
|
|
296
|
+
]);
|
|
297
|
+
defaultedQueries.forEach((queryOptions) => {
|
|
298
|
+
ensureSuspenseTimers(queryOptions);
|
|
299
|
+
ensurePreventErrorBoundaryRetry(queryOptions, errorResetBoundary, client.getQueryCache().get(queryOptions.queryHash));
|
|
300
|
+
});
|
|
301
|
+
useClearResetErrorBoundary(errorResetBoundary);
|
|
302
|
+
const [observer] = import_react.useState(() => new QueriesObserver(client, defaultedQueries, options));
|
|
303
|
+
const [optimisticResult, getCombinedResult, trackResult] = observer.getOptimisticResult(defaultedQueries, options.combine);
|
|
304
|
+
const shouldSubscribe = !isRestoring && subscribed;
|
|
305
|
+
import_react.useSyncExternalStore(import_react.useCallback((onStoreChange) => shouldSubscribe ? observer.subscribe(notifyManager.batchCalls(onStoreChange)) : noop, [observer, shouldSubscribe]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
|
|
306
|
+
import_react.useEffect(() => {
|
|
307
|
+
observer.setQueries(defaultedQueries, options);
|
|
308
|
+
}, [
|
|
309
|
+
defaultedQueries,
|
|
310
|
+
options,
|
|
311
|
+
observer
|
|
312
|
+
]);
|
|
313
|
+
const suspensePromises = optimisticResult.some((result, index) => shouldSuspend(defaultedQueries[index], result)) ? optimisticResult.flatMap((result, index) => {
|
|
314
|
+
const opts = defaultedQueries[index];
|
|
315
|
+
if (opts && shouldSuspend(opts, result)) return fetchOptimistic(opts, new QueryObserver(client, opts), errorResetBoundary);
|
|
316
|
+
return [];
|
|
317
|
+
}) : [];
|
|
318
|
+
if (suspensePromises.length > 0) throw Promise.all(suspensePromises);
|
|
319
|
+
const firstSingleResultWhichShouldThrow = optimisticResult.find((result, index) => {
|
|
320
|
+
const query = defaultedQueries[index];
|
|
321
|
+
return query && getHasError({
|
|
322
|
+
result,
|
|
323
|
+
errorResetBoundary,
|
|
324
|
+
throwOnError: query.throwOnError,
|
|
325
|
+
query: client.getQueryCache().get(query.queryHash),
|
|
326
|
+
suspense: query.suspense
|
|
327
|
+
});
|
|
328
|
+
});
|
|
329
|
+
if (firstSingleResultWhichShouldThrow) throw firstSingleResultWhichShouldThrow.error;
|
|
330
|
+
return getCombinedResult(trackResult());
|
|
331
|
+
}
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
83
334
|
function useBaseQuery(options, Observer, queryClient) {
|
|
84
335
|
const isRestoring = useIsRestoring();
|
|
85
336
|
const errorResetBoundary = useQueryErrorResetBoundary();
|
|
86
337
|
const client = useQueryClient(queryClient);
|
|
87
338
|
const defaultedOptions = client.defaultQueryOptions(options);
|
|
88
|
-
client.getDefaultOptions().queries?._experimental_beforeQuery?.(defaultedOptions);
|
|
89
339
|
const query = client.getQueryCache().get(defaultedOptions.queryHash);
|
|
90
340
|
const subscribed = options.subscribed !== false;
|
|
91
341
|
defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : subscribed ? "optimistic" : void 0;
|
|
92
342
|
ensureSuspenseTimers(defaultedOptions);
|
|
93
343
|
ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query);
|
|
94
344
|
useClearResetErrorBoundary(errorResetBoundary);
|
|
95
|
-
const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
|
|
96
345
|
const [observer] = import_react.useState(() => new Observer(client, defaultedOptions));
|
|
97
346
|
const result = observer.getOptimisticResult(defaultedOptions);
|
|
98
347
|
const shouldSubscribe = !isRestoring && subscribed;
|
|
@@ -112,19 +361,192 @@ function useBaseQuery(options, Observer, queryClient) {
|
|
|
112
361
|
query,
|
|
113
362
|
suspense: defaultedOptions.suspense
|
|
114
363
|
})) throw result.error;
|
|
115
|
-
client.getDefaultOptions().queries?._experimental_afterQuery?.(defaultedOptions, result);
|
|
116
|
-
if (defaultedOptions.experimental_prefetchInRender && !environmentManager.isServer() && willFetch(result, isRestoring)) (isNewCacheEntry ? fetchOptimistic(defaultedOptions, observer, errorResetBoundary) : query?.promise)?.catch(noop).finally(() => {
|
|
117
|
-
observer.updateResult();
|
|
118
|
-
});
|
|
119
364
|
return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
|
|
120
365
|
}
|
|
121
366
|
//#endregion
|
|
122
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.
|
|
367
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
123
368
|
function useQuery(options, queryClient) {
|
|
124
369
|
return useBaseQuery(options, QueryObserver, queryClient);
|
|
125
370
|
}
|
|
126
371
|
//#endregion
|
|
127
|
-
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.
|
|
372
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/queryOptions.js
|
|
373
|
+
function queryOptions(options) {
|
|
374
|
+
return options;
|
|
375
|
+
}
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useMutation.js
|
|
378
|
+
/**
|
|
379
|
+
* Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects.
|
|
380
|
+
* `useMutation` is the hook for that.
|
|
381
|
+
*
|
|
382
|
+
* @see {@link mutationOptions} to share these options across multiple `useMutation` call sites, or to look
|
|
383
|
+
* the mutation up elsewhere via its `mutationKey` (e.g. with `useMutationState`).
|
|
384
|
+
* @param options - The {@link UseMutationOptions} to use — everything you can pass to `useMutation`.
|
|
385
|
+
* @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will
|
|
386
|
+
* be used.
|
|
387
|
+
* @returns `mutate`/`mutateAsync` also accept per-call `onSuccess`/`onError`/`onSettled` callbacks as a second
|
|
388
|
+
* argument, useful for triggering call-site side effects (e.g. navigation) without coupling them to the shared
|
|
389
|
+
* mutation definition. Hook-level callbacks (passed to `options`) fire for every mutation; per-call callbacks
|
|
390
|
+
* fire only for the latest call you've made, and only while the component is still mounted — unmounting before
|
|
391
|
+
* the mutation settles removes the subscription and prevents them from firing.
|
|
392
|
+
*
|
|
393
|
+
* @example
|
|
394
|
+
* ```tsx
|
|
395
|
+
* import { useMutation, useQueryClient } from '@tanstack/react-query'
|
|
396
|
+
*
|
|
397
|
+
* function AddTodo() {
|
|
398
|
+
* const queryClient = useQueryClient()
|
|
399
|
+
*
|
|
400
|
+
* const addMutation = useMutation({
|
|
401
|
+
* mutationFn: addTodo,
|
|
402
|
+
* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
|
|
403
|
+
* })
|
|
404
|
+
*
|
|
405
|
+
* return (
|
|
406
|
+
* <button
|
|
407
|
+
* onClick={() =>
|
|
408
|
+
* addMutation.mutate('Item', {
|
|
409
|
+
* onError: (error) => console.error('Failed to add item:', error),
|
|
410
|
+
* })
|
|
411
|
+
* }
|
|
412
|
+
* >
|
|
413
|
+
* Add
|
|
414
|
+
* </button>
|
|
415
|
+
* )
|
|
416
|
+
* }
|
|
417
|
+
* ```
|
|
418
|
+
*
|
|
419
|
+
* @example
|
|
420
|
+
* Rendering the mutation's own state, rather than just firing it off:
|
|
421
|
+
* ```tsx
|
|
422
|
+
* import { useMutation, useQueryClient } from '@tanstack/react-query'
|
|
423
|
+
*
|
|
424
|
+
* function AddTodo() {
|
|
425
|
+
* const queryClient = useQueryClient()
|
|
426
|
+
*
|
|
427
|
+
* const addMutation = useMutation({
|
|
428
|
+
* mutationFn: addTodo,
|
|
429
|
+
* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
|
|
430
|
+
* })
|
|
431
|
+
*
|
|
432
|
+
* return (
|
|
433
|
+
* <div>
|
|
434
|
+
* {addMutation.isPending ? (
|
|
435
|
+
* 'Adding todo...'
|
|
436
|
+
* ) : (
|
|
437
|
+
* <>
|
|
438
|
+
* {addMutation.isError ? (
|
|
439
|
+
* <div>An error occurred: {addMutation.error.message}</div>
|
|
440
|
+
* ) : null}
|
|
441
|
+
* <button onClick={() => addMutation.mutate('Item')}>Add</button>
|
|
442
|
+
* </>
|
|
443
|
+
* )}
|
|
444
|
+
* </div>
|
|
445
|
+
* )
|
|
446
|
+
* }
|
|
447
|
+
* ```
|
|
448
|
+
*
|
|
449
|
+
* @example
|
|
450
|
+
* Optimistic update via `onMutate`, rolling back on `onError`:
|
|
451
|
+
* ```tsx
|
|
452
|
+
* import { useMutation, useQueryClient } from '@tanstack/react-query'
|
|
453
|
+
*
|
|
454
|
+
* function AddTodo() {
|
|
455
|
+
* const queryClient = useQueryClient()
|
|
456
|
+
*
|
|
457
|
+
* const addMutation = useMutation({
|
|
458
|
+
* mutationFn: addTodo,
|
|
459
|
+
* onMutate: async (newTodo) => {
|
|
460
|
+
* await queryClient.cancelQueries({ queryKey: ['todos'] })
|
|
461
|
+
* const previousTodos = queryClient.getQueryData<Array<string>>(['todos'])
|
|
462
|
+
*
|
|
463
|
+
* queryClient.setQueryData<Array<string>>(['todos'], (old) => [
|
|
464
|
+
* ...(old ?? []),
|
|
465
|
+
* newTodo,
|
|
466
|
+
* ])
|
|
467
|
+
*
|
|
468
|
+
* // Passed to `onError` as `onMutateResult` if the mutation fails.
|
|
469
|
+
* return { previousTodos }
|
|
470
|
+
* },
|
|
471
|
+
* onError: (_err, _newTodo, onMutateResult) => {
|
|
472
|
+
* queryClient.setQueryData(['todos'], onMutateResult?.previousTodos)
|
|
473
|
+
* },
|
|
474
|
+
* onSettled: () => {
|
|
475
|
+
* queryClient.invalidateQueries({ queryKey: ['todos'] })
|
|
476
|
+
* },
|
|
477
|
+
* })
|
|
478
|
+
*
|
|
479
|
+
* return (
|
|
480
|
+
* <button onClick={() => addMutation.mutate('Item')}>Add</button>
|
|
481
|
+
* )
|
|
482
|
+
* }
|
|
483
|
+
* ```
|
|
484
|
+
*
|
|
485
|
+
* @example
|
|
486
|
+
* Callbacks passed per call to `mutate` only fire for the last call — `mutateAsync` gives you a
|
|
487
|
+
* promise per call instead, so you can wait for all of them when they succeed:
|
|
488
|
+
* ```tsx
|
|
489
|
+
* import { useMutation, useQueryClient } from '@tanstack/react-query'
|
|
490
|
+
*
|
|
491
|
+
* function AddTodos() {
|
|
492
|
+
* const queryClient = useQueryClient()
|
|
493
|
+
*
|
|
494
|
+
* const addMutation = useMutation({
|
|
495
|
+
* mutationFn: addTodo,
|
|
496
|
+
* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
|
|
497
|
+
* })
|
|
498
|
+
*
|
|
499
|
+
* async function handleAddAll(todos: Array<string>) {
|
|
500
|
+
* try {
|
|
501
|
+
* await Promise.all(todos.map((todo) => addMutation.mutateAsync(todo)))
|
|
502
|
+
* } catch (error) {
|
|
503
|
+
* console.error('Failed to add todos:', error)
|
|
504
|
+
* }
|
|
505
|
+
* }
|
|
506
|
+
*
|
|
507
|
+
* return (
|
|
508
|
+
* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>
|
|
509
|
+
* Add all
|
|
510
|
+
* </button>
|
|
511
|
+
* )
|
|
512
|
+
* }
|
|
513
|
+
* ```
|
|
514
|
+
*
|
|
515
|
+
* @example
|
|
516
|
+
* If some of the mutations above can fail independently of the others, and you want to know which ones
|
|
517
|
+
* did — rather than losing that information the moment the first one rejects — swap `Promise.all` for
|
|
518
|
+
* `Promise.allSettled`:
|
|
519
|
+
* ```tsx
|
|
520
|
+
* import { useMutation, useQueryClient } from '@tanstack/react-query'
|
|
521
|
+
*
|
|
522
|
+
* function AddTodos() {
|
|
523
|
+
* const queryClient = useQueryClient()
|
|
524
|
+
*
|
|
525
|
+
* const addMutation = useMutation({
|
|
526
|
+
* mutationFn: addTodo,
|
|
527
|
+
* onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
|
|
528
|
+
* })
|
|
529
|
+
*
|
|
530
|
+
* async function handleAddAll(todos: Array<string>) {
|
|
531
|
+
* const addResults = await Promise.allSettled(
|
|
532
|
+
* todos.map((todo) => addMutation.mutateAsync(todo)),
|
|
533
|
+
* )
|
|
534
|
+
*
|
|
535
|
+
* addResults.forEach((addResult, index) => {
|
|
536
|
+
* if (addResult.status === 'rejected') {
|
|
537
|
+
* console.error(`Failed to add "${todos[index]}":`, addResult.reason)
|
|
538
|
+
* }
|
|
539
|
+
* })
|
|
540
|
+
* }
|
|
541
|
+
*
|
|
542
|
+
* return (
|
|
543
|
+
* <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>
|
|
544
|
+
* Add all
|
|
545
|
+
* </button>
|
|
546
|
+
* )
|
|
547
|
+
* }
|
|
548
|
+
* ```
|
|
549
|
+
*/
|
|
128
550
|
function useMutation(options, queryClient) {
|
|
129
551
|
const client = useQueryClient(queryClient);
|
|
130
552
|
const [observer] = import_react.useState(() => new MutationObserver(client, options));
|
|
@@ -132,8 +554,8 @@ function useMutation(options, queryClient) {
|
|
|
132
554
|
observer.setOptions(options);
|
|
133
555
|
}, [observer, options]);
|
|
134
556
|
const result = import_react.useSyncExternalStore(import_react.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
|
|
135
|
-
const mutate = import_react.useCallback((
|
|
136
|
-
observer.mutate(
|
|
557
|
+
const mutate = import_react.useCallback((...args) => {
|
|
558
|
+
observer.mutate(args[0], args[1]).catch(noop);
|
|
137
559
|
}, [observer]);
|
|
138
560
|
if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;
|
|
139
561
|
return {
|
|
@@ -143,4 +565,9 @@ function useMutation(options, queryClient) {
|
|
|
143
565
|
};
|
|
144
566
|
}
|
|
145
567
|
//#endregion
|
|
146
|
-
|
|
568
|
+
//#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js
|
|
569
|
+
function useInfiniteQuery(options, queryClient) {
|
|
570
|
+
return useBaseQuery(options, InfiniteQueryObserver, queryClient);
|
|
571
|
+
}
|
|
572
|
+
//#endregion
|
|
573
|
+
export { useQueries as a, useQuery as i, useMutation as n, QueryClientProvider as o, queryOptions as r, useQueryClient as s, useInfiniteQuery as t };
|
|
@@ -68,6 +68,36 @@ function parse(version, options = {}) {
|
|
|
68
68
|
prerelease
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
+
var NUMERIC = /^\d+$/;
|
|
72
|
+
function compareIdentifiers(left, right) {
|
|
73
|
+
if (typeof left === "number" && typeof right === "number") return left === right ? 0 : left < right ? -1 : 1;
|
|
74
|
+
const leftNumeric = NUMERIC.test(String(left));
|
|
75
|
+
const rightNumeric = NUMERIC.test(String(right));
|
|
76
|
+
const normalizedLeft = leftNumeric ? Number(left) : left;
|
|
77
|
+
const normalizedRight = rightNumeric ? Number(right) : right;
|
|
78
|
+
return normalizedLeft === normalizedRight ? 0 : leftNumeric && !rightNumeric ? -1 : rightNumeric && !leftNumeric ? 1 : normalizedLeft < normalizedRight ? -1 : 1;
|
|
79
|
+
}
|
|
80
|
+
function compareMainParsed(left, right) {
|
|
81
|
+
return left.major === right.major ? left.minor === right.minor ? left.patch === right.patch ? 0 : left.patch < right.patch ? -1 : 1 : left.minor < right.minor ? -1 : 1 : left.major < right.major ? -1 : 1;
|
|
82
|
+
}
|
|
83
|
+
function comparePrereleaseParsed(left, right) {
|
|
84
|
+
const leftPrerelease = left.prerelease;
|
|
85
|
+
const rightPrerelease = right.prerelease;
|
|
86
|
+
if (leftPrerelease?.length && !rightPrerelease?.length) return -1;
|
|
87
|
+
if (!leftPrerelease?.length && rightPrerelease?.length) return 1;
|
|
88
|
+
if (!leftPrerelease?.length && !rightPrerelease?.length) return 0;
|
|
89
|
+
for (let index = 0;; index++) {
|
|
90
|
+
const leftIdentifier = leftPrerelease?.[index];
|
|
91
|
+
const rightIdentifier = rightPrerelease?.[index];
|
|
92
|
+
if (leftIdentifier === void 0 && rightIdentifier === void 0) return 0;
|
|
93
|
+
if (rightIdentifier === void 0) return 1;
|
|
94
|
+
if (leftIdentifier === void 0) return -1;
|
|
95
|
+
if (leftIdentifier !== rightIdentifier) return compareIdentifiers(leftIdentifier, rightIdentifier);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function compareParsed(left, right) {
|
|
99
|
+
return compareMainParsed(left, right) || comparePrereleaseParsed(left, right);
|
|
100
|
+
}
|
|
71
101
|
//#endregion
|
|
72
102
|
//#region ../../node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/set-CC5YeoYX.js
|
|
73
103
|
var STRICT_COMPARATOR = safeRegex(String.raw`^${GREATER_LESS_THAN}\s*(${FULL_PLAIN})$|^$`);
|
|
@@ -89,6 +119,40 @@ function parseComparator(comparator, options = {}) {
|
|
|
89
119
|
version
|
|
90
120
|
};
|
|
91
121
|
}
|
|
122
|
+
function testParsedComparator(comparator, version) {
|
|
123
|
+
if (!comparator.version) return true;
|
|
124
|
+
const comparison = compareParsed(version, comparator.version);
|
|
125
|
+
switch (comparator.operator) {
|
|
126
|
+
case "": return comparison === 0;
|
|
127
|
+
case ">": return comparison > 0;
|
|
128
|
+
case ">=": return comparison >= 0;
|
|
129
|
+
case "<": return comparison < 0;
|
|
130
|
+
case "<=": return comparison <= 0;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
function comparatorAllowsPrerelease(comparator, version) {
|
|
134
|
+
const allowed = comparator.version;
|
|
135
|
+
return allowed !== null && !!allowed.prerelease?.length && allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch;
|
|
136
|
+
}
|
|
137
|
+
function testComparatorSet(set, version, options) {
|
|
138
|
+
if (set.some((comparator) => !testParsedComparator(comparator, version))) return false;
|
|
139
|
+
return !version.prerelease?.length || !!options.includePrerelease || set.some((comparator) => comparatorAllowsPrerelease(comparator, version));
|
|
140
|
+
}
|
|
141
|
+
function parsedComparatorsIntersect(left, right, options = {}) {
|
|
142
|
+
if (!left.version || !right.version) return true;
|
|
143
|
+
if (left.operator === "") return testComparatorSet([right], left.version, options);
|
|
144
|
+
if (right.operator === "") return testComparatorSet([left], right.version, options);
|
|
145
|
+
const leftValue = formatComparator(left);
|
|
146
|
+
const rightValue = formatComparator(right);
|
|
147
|
+
if (options.includePrerelease && (leftValue === "<0.0.0-0" || rightValue === "<0.0.0-0")) return false;
|
|
148
|
+
if (!options.includePrerelease && (leftValue.startsWith("<0.0.0") || rightValue.startsWith("<0.0.0"))) return false;
|
|
149
|
+
if (left.operator.startsWith(">") && right.operator.startsWith(">")) return true;
|
|
150
|
+
if (left.operator.startsWith("<") && right.operator.startsWith("<")) return true;
|
|
151
|
+
const comparison = compareParsed(left.version, right.version);
|
|
152
|
+
if (comparison === 0 && left.operator.includes("=") && right.operator.includes("=")) return true;
|
|
153
|
+
if (comparison < 0 && left.operator.startsWith(">") && right.operator.startsWith("<")) return true;
|
|
154
|
+
return comparison > 0 && left.operator.startsWith("<") && right.operator.startsWith(">");
|
|
155
|
+
}
|
|
92
156
|
//#endregion
|
|
93
157
|
//#region ../../node_modules/.pnpm/verkit@0.4.0/node_modules/verkit/dist/range-DvX-Y6iv.js
|
|
94
158
|
function formatRange(range) {
|
|
@@ -243,9 +307,46 @@ function tryParseRange(range, options = {}) {
|
|
|
243
307
|
return null;
|
|
244
308
|
}
|
|
245
309
|
}
|
|
310
|
+
function exactVersion(set) {
|
|
311
|
+
for (const comparator of set) if (comparator.operator === "" && comparator.version) return comparator.version;
|
|
312
|
+
return null;
|
|
313
|
+
}
|
|
314
|
+
function isSatisfiable(comparators, options) {
|
|
315
|
+
const exact = exactVersion(comparators);
|
|
316
|
+
if (exact) return testComparatorSet(comparators, exact, options);
|
|
317
|
+
const remaining = [...comparators];
|
|
318
|
+
let current = remaining.pop();
|
|
319
|
+
while (current && remaining.length) {
|
|
320
|
+
if (remaining.some((other) => !parsedComparatorsIntersect(current, other, options))) return false;
|
|
321
|
+
current = remaining.pop();
|
|
322
|
+
}
|
|
323
|
+
return true;
|
|
324
|
+
}
|
|
325
|
+
function setsIntersect(left, right, options) {
|
|
326
|
+
const leftExact = exactVersion(left);
|
|
327
|
+
if (leftExact) return testComparatorSet(right, leftExact, options);
|
|
328
|
+
const rightExact = exactVersion(right);
|
|
329
|
+
if (rightExact) return testComparatorSet(left, rightExact, options);
|
|
330
|
+
return left.every((leftComparator) => right.every((rightComparator) => parsedComparatorsIntersect(leftComparator, rightComparator, options)));
|
|
331
|
+
}
|
|
332
|
+
function parsedRangesIntersect(left, right, options = {}) {
|
|
333
|
+
return left.sets.some((leftSet) => isSatisfiable(leftSet, options) && right.sets.some((rightSet) => isSatisfiable(rightSet, options) && setsIntersect(leftSet, rightSet, options)));
|
|
334
|
+
}
|
|
335
|
+
function isValidRange(range, options = {}) {
|
|
336
|
+
return tryParseRange(range, options) !== null;
|
|
337
|
+
}
|
|
246
338
|
function normalizeRange(range, options = {}) {
|
|
247
339
|
const parsed = tryParseRange(range, options);
|
|
248
340
|
return parsed ? formatRange(parsed) || "*" : null;
|
|
249
341
|
}
|
|
342
|
+
function rangesIntersect(left, right, options = {}) {
|
|
343
|
+
const parsedLeft = parseRange(left, options);
|
|
344
|
+
const parsedRight = parseRange(right, options);
|
|
345
|
+
return parsedRangesIntersect(parsedLeft, parsedRight, {
|
|
346
|
+
...parsedLeft.options,
|
|
347
|
+
...parsedRight.options,
|
|
348
|
+
...options
|
|
349
|
+
});
|
|
350
|
+
}
|
|
250
351
|
//#endregion
|
|
251
|
-
export { normalizeRange as t };
|
|
352
|
+
export { normalizeRange as n, rangesIntersect as r, isValidRange as t };
|