@hot-updater/console 0.36.16 → 0.36.17

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.
Files changed (24) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/assets/dist-BI6FSMS0.js +3 -0
  3. package/.output/public/assets/index-C4PncbHt.js +11 -0
  4. package/.output/public/assets/routes-6EQXztxs.js +54 -0
  5. package/.output/server/{__23tanstack-start-server-fn-resolver-CgwgZ0-i.mjs → __23tanstack-start-server-fn-resolver-CNUWOV2f.mjs} +15 -15
  6. package/.output/server/_libs/@tanstack/react-form+[...].mjs +6 -6
  7. package/.output/server/_libs/@tanstack/react-router+[...].mjs +3730 -4032
  8. package/.output/server/_libs/tanstack__history.mjs +68 -41
  9. package/.output/server/_libs/tanstack__query-core.mjs +1570 -256
  10. package/.output/server/_libs/tanstack__react-query.mjs +254 -19
  11. package/.output/server/_ssr/{api-rpc-BIbDUKSz.mjs → api-rpc-irQMOQXO.mjs} +2 -2
  12. package/.output/server/_ssr/{createServerFn-DzU0k62V.mjs → createServerFn-CwIQ_zCm.mjs} +41 -56
  13. package/.output/server/_ssr/{empty-plugin-adapters-B4HCzgmM.mjs → empty-plugin-adapters-DvRHA3Ns.mjs} +1 -1
  14. package/.output/server/_ssr/{router-C3hqEy3k.mjs → router-bOwIHAiQ.mjs} +3 -3
  15. package/.output/server/_ssr/{routes-B0lQvvlC.mjs → routes-D6eq6WM0.mjs} +3 -3
  16. package/.output/server/_ssr/ssr.mjs +5103 -4246
  17. package/.output/server/_ssr/start-CQ99Z6e_.mjs +4 -0
  18. package/.output/server/{_tanstack-start-manifest_v-Bpx52WOU.mjs → _tanstack-start-manifest_v-D42dM0BV.mjs} +4 -4
  19. package/.output/server/index.mjs +34 -34
  20. package/package.json +13 -13
  21. package/.output/public/assets/dist-DJX53faP.js +0 -3
  22. package/.output/public/assets/index-Iylis5kY.js +0 -10
  23. package/.output/public/assets/routes-HT21hs0C.js +0 -54
  24. package/.output/server/_ssr/start-02sLteYG.mjs +0 -4
@@ -1,17 +1,47 @@
1
1
  import { r as __toESM } from "../_runtime.mjs";
2
2
  import { u as require_react } from "./@floating-ui/react-dom+[...].mjs";
3
3
  import { P as require_jsx_runtime } from "./@radix-ui/react-alert-dialog+[...].mjs";
4
- import { a as environmentManager, i as notifyManager, n as MutationObserver, o as noop, r as QueryObserver, s as shouldThrowError } from "./tanstack__query-core.mjs";
5
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
4
+ import { a as noop, i as notifyManager, n as MutationObserver, o as shouldThrowError, r as QueryObserver } from "./tanstack__query-core.mjs";
5
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
6
6
  var import_react = /* @__PURE__ */ __toESM(require_react(), 1);
7
7
  var import_jsx_runtime = require_jsx_runtime();
8
+ /**
9
+ * The context that `useQueryClient` reads from. `QueryClientProvider` is the normal way to set it.
10
+ */
8
11
  var QueryClientContext = import_react.createContext(void 0);
12
+ /**
13
+ * The `useQueryClient` hook returns the current `QueryClient` instance.
14
+ *
15
+ * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will
16
+ * be used.
17
+ * @returns The current `QueryClient` instance.
18
+ * @throws If no `queryClient` argument is passed and no `QueryClientProvider` is found in the component tree.
19
+ */
9
20
  var useQueryClient = (queryClient) => {
10
21
  const client = import_react.useContext(QueryClientContext);
11
22
  if (queryClient) return queryClient;
12
23
  if (!client) throw new Error("No QueryClient set, use QueryClientProvider to set one");
13
24
  return client;
14
25
  };
26
+ /**
27
+ * Use the `QueryClientProvider` component to connect and provide a `QueryClient` to your application. Also
28
+ * calls `client.mount()`/`client.unmount()` as this component mounts/unmounts, which subscribes the client to
29
+ * focus/online events (resuming any paused mutations and refetching as needed when the app regains focus or
30
+ * comes back online).
31
+ *
32
+ * @returns The provided `children`, wrapped so they can read the `QueryClient` via `useQueryClient`.
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
37
+ *
38
+ * const queryClient = new QueryClient()
39
+ *
40
+ * function App() {
41
+ * return <QueryClientProvider client={queryClient}>...</QueryClientProvider>
42
+ * }
43
+ * ```
44
+ */
15
45
  var QueryClientProvider = ({ client, children }) => {
16
46
  import_react.useEffect(() => {
17
47
  client.mount();
@@ -25,12 +55,22 @@ var QueryClientProvider = ({ client, children }) => {
25
55
  });
26
56
  };
27
57
  //#endregion
28
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
58
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/IsRestoringProvider.js
29
59
  var IsRestoringContext = import_react.createContext(false);
60
+ /**
61
+ * If you are using `PersistQueryClientProvider`, you can also use the `useIsRestoring` hook alongside it to
62
+ * check if a restore is currently in progress. `useQuery` and friends also check this internally to avoid
63
+ * race conditions between the restore and mounting queries.
64
+ *
65
+ * @returns `true` while a persisted client is being restored, `false` otherwise.
66
+ */
30
67
  var useIsRestoring = () => import_react.useContext(IsRestoringContext);
31
68
  IsRestoringContext.Provider;
32
69
  //#endregion
33
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
70
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
71
+ /**
72
+ * Resets any query errors within the boundary, so queries know they can try again.
73
+ */
34
74
  function createValue() {
35
75
  let isReset = false;
36
76
  return {
@@ -46,12 +86,42 @@ function createValue() {
46
86
  };
47
87
  }
48
88
  var QueryErrorResetBoundaryContext = import_react.createContext(createValue());
89
+ /**
90
+ * This hook will reset any query errors within the closest `QueryErrorResetBoundary`. If there is no boundary
91
+ * defined it will reset them globally.
92
+ *
93
+ * @returns The boundary's {@link QueryErrorResetBoundaryValue}.
94
+ *
95
+ * @example
96
+ * ```tsx
97
+ * import { ErrorBoundary } from 'react-error-boundary'
98
+ * import { useQueryErrorResetBoundary } from '@tanstack/react-query'
99
+ *
100
+ * function App({ children }: { children: React.ReactNode }) {
101
+ * const { reset } = useQueryErrorResetBoundary()
102
+ *
103
+ * return (
104
+ * <ErrorBoundary
105
+ * onReset={reset}
106
+ * fallbackRender={({ resetErrorBoundary }) => (
107
+ * <div>
108
+ * There was an error!
109
+ * <button onClick={() => resetErrorBoundary()}>Try again</button>
110
+ * </div>
111
+ * )}
112
+ * >
113
+ * {children}
114
+ * </ErrorBoundary>
115
+ * )
116
+ * }
117
+ * ```
118
+ */
49
119
  var useQueryErrorResetBoundary = () => import_react.useContext(QueryErrorResetBoundaryContext);
50
120
  //#endregion
51
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
121
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js
52
122
  var ensurePreventErrorBoundaryRetry = (options, errorResetBoundary, query) => {
53
123
  const throwOnError = query?.state.error && typeof options.throwOnError === "function" ? shouldThrowError(options.throwOnError, [query.state.error, query]) : options.throwOnError;
54
- if (options.suspense || options.experimental_prefetchInRender || throwOnError) {
124
+ if (options.suspense || throwOnError) {
55
125
  if (!errorResetBoundary.isReset()) options.retryOnMount = false;
56
126
  }
57
127
  };
@@ -64,7 +134,7 @@ var getHasError = ({ result, errorResetBoundary, throwOnError, query, suspense }
64
134
  return result.isError && !errorResetBoundary.isReset() && !result.isFetching && query && (suspense && result.data === void 0 || shouldThrowError(throwOnError, [result.error, query]));
65
135
  };
66
136
  //#endregion
67
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/suspense.js
137
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/suspense.js
68
138
  var ensureSuspenseTimers = (defaultedOptions) => {
69
139
  if (defaultedOptions.suspense) {
70
140
  const MIN_SUSPENSE_TIME_MS = 1e3;
@@ -74,26 +144,23 @@ var ensureSuspenseTimers = (defaultedOptions) => {
74
144
  if (typeof defaultedOptions.gcTime === "number") defaultedOptions.gcTime = Math.max(defaultedOptions.gcTime, MIN_SUSPENSE_TIME_MS);
75
145
  }
76
146
  };
77
- var willFetch = (result, isRestoring) => result.isLoading && result.isFetching && !isRestoring;
78
147
  var shouldSuspend = (defaultedOptions, result) => defaultedOptions?.suspense && result.isPending;
79
148
  var fetchOptimistic = (defaultedOptions, observer, errorResetBoundary) => observer.fetchOptimistic(defaultedOptions).catch(() => {
80
149
  errorResetBoundary.clearReset();
81
150
  });
82
151
  //#endregion
83
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
152
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
84
153
  function useBaseQuery(options, Observer, queryClient) {
85
154
  const isRestoring = useIsRestoring();
86
155
  const errorResetBoundary = useQueryErrorResetBoundary();
87
156
  const client = useQueryClient(queryClient);
88
157
  const defaultedOptions = client.defaultQueryOptions(options);
89
- client.getDefaultOptions().queries?._experimental_beforeQuery?.(defaultedOptions);
90
158
  const query = client.getQueryCache().get(defaultedOptions.queryHash);
91
159
  const subscribed = options.subscribed !== false;
92
160
  defaultedOptions._optimisticResults = isRestoring ? "isRestoring" : subscribed ? "optimistic" : void 0;
93
161
  ensureSuspenseTimers(defaultedOptions);
94
162
  ensurePreventErrorBoundaryRetry(defaultedOptions, errorResetBoundary, query);
95
163
  useClearResetErrorBoundary(errorResetBoundary);
96
- const isNewCacheEntry = !client.getQueryCache().get(defaultedOptions.queryHash);
97
164
  const [observer] = import_react.useState(() => new Observer(client, defaultedOptions));
98
165
  const result = observer.getOptimisticResult(defaultedOptions);
99
166
  const shouldSubscribe = !isRestoring && subscribed;
@@ -113,19 +180,187 @@ function useBaseQuery(options, Observer, queryClient) {
113
180
  query,
114
181
  suspense: defaultedOptions.suspense
115
182
  })) throw result.error;
116
- client.getDefaultOptions().queries?._experimental_afterQuery?.(defaultedOptions, result);
117
- if (defaultedOptions.experimental_prefetchInRender && !environmentManager.isServer() && willFetch(result, isRestoring)) (isNewCacheEntry ? fetchOptimistic(defaultedOptions, observer, errorResetBoundary) : query?.promise)?.catch(noop).finally(() => {
118
- observer.updateResult();
119
- });
120
183
  return !defaultedOptions.notifyOnChangeProps ? observer.trackResult(result) : result;
121
184
  }
122
185
  //#endregion
123
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useQuery.js
186
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useQuery.js
124
187
  function useQuery(options, queryClient) {
125
188
  return useBaseQuery(options, QueryObserver, queryClient);
126
189
  }
127
190
  //#endregion
128
- //#region ../../node_modules/.pnpm/@tanstack+react-query@5.101.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useMutation.js
191
+ //#region ../../node_modules/.pnpm/@tanstack+react-query@5.104.0_react@19.2.6/node_modules/@tanstack/react-query/build/modern/useMutation.js
192
+ /**
193
+ * Unlike queries, mutations are typically used to create/update/delete data or perform server side-effects.
194
+ * `useMutation` is the hook for that.
195
+ *
196
+ * @see {@link mutationOptions} to share these options across multiple `useMutation` call sites, or to look
197
+ * the mutation up elsewhere via its `mutationKey` (e.g. with `useMutationState`).
198
+ * @param options - The {@link UseMutationOptions} to use — everything you can pass to `useMutation`.
199
+ * @param queryClient - Use this to use a custom `QueryClient`. Otherwise, the one from the nearest context will
200
+ * be used.
201
+ * @returns `mutate`/`mutateAsync` also accept per-call `onSuccess`/`onError`/`onSettled` callbacks as a second
202
+ * argument, useful for triggering call-site side effects (e.g. navigation) without coupling them to the shared
203
+ * mutation definition. Hook-level callbacks (passed to `options`) fire for every mutation; per-call callbacks
204
+ * fire only for the latest call you've made, and only while the component is still mounted — unmounting before
205
+ * the mutation settles removes the subscription and prevents them from firing.
206
+ *
207
+ * @example
208
+ * ```tsx
209
+ * import { useMutation, useQueryClient } from '@tanstack/react-query'
210
+ *
211
+ * function AddTodo() {
212
+ * const queryClient = useQueryClient()
213
+ *
214
+ * const addMutation = useMutation({
215
+ * mutationFn: addTodo,
216
+ * onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
217
+ * })
218
+ *
219
+ * return (
220
+ * <button
221
+ * onClick={() =>
222
+ * addMutation.mutate('Item', {
223
+ * onError: (error) => console.error('Failed to add item:', error),
224
+ * })
225
+ * }
226
+ * >
227
+ * Add
228
+ * </button>
229
+ * )
230
+ * }
231
+ * ```
232
+ *
233
+ * @example
234
+ * Rendering the mutation's own state, rather than just firing it off:
235
+ * ```tsx
236
+ * import { useMutation, useQueryClient } from '@tanstack/react-query'
237
+ *
238
+ * function AddTodo() {
239
+ * const queryClient = useQueryClient()
240
+ *
241
+ * const addMutation = useMutation({
242
+ * mutationFn: addTodo,
243
+ * onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
244
+ * })
245
+ *
246
+ * return (
247
+ * <div>
248
+ * {addMutation.isPending ? (
249
+ * 'Adding todo...'
250
+ * ) : (
251
+ * <>
252
+ * {addMutation.isError ? (
253
+ * <div>An error occurred: {addMutation.error.message}</div>
254
+ * ) : null}
255
+ * <button onClick={() => addMutation.mutate('Item')}>Add</button>
256
+ * </>
257
+ * )}
258
+ * </div>
259
+ * )
260
+ * }
261
+ * ```
262
+ *
263
+ * @example
264
+ * Optimistic update via `onMutate`, rolling back on `onError`:
265
+ * ```tsx
266
+ * import { useMutation, useQueryClient } from '@tanstack/react-query'
267
+ *
268
+ * function AddTodo() {
269
+ * const queryClient = useQueryClient()
270
+ *
271
+ * const addMutation = useMutation({
272
+ * mutationFn: addTodo,
273
+ * onMutate: async (newTodo) => {
274
+ * await queryClient.cancelQueries({ queryKey: ['todos'] })
275
+ * const previousTodos = queryClient.getQueryData<Array<string>>(['todos'])
276
+ *
277
+ * queryClient.setQueryData<Array<string>>(['todos'], (old) => [
278
+ * ...(old ?? []),
279
+ * newTodo,
280
+ * ])
281
+ *
282
+ * // Passed to `onError` as `onMutateResult` if the mutation fails.
283
+ * return { previousTodos }
284
+ * },
285
+ * onError: (_err, _newTodo, onMutateResult) => {
286
+ * queryClient.setQueryData(['todos'], onMutateResult?.previousTodos)
287
+ * },
288
+ * onSettled: () => {
289
+ * queryClient.invalidateQueries({ queryKey: ['todos'] })
290
+ * },
291
+ * })
292
+ *
293
+ * return (
294
+ * <button onClick={() => addMutation.mutate('Item')}>Add</button>
295
+ * )
296
+ * }
297
+ * ```
298
+ *
299
+ * @example
300
+ * Callbacks passed per call to `mutate` only fire for the last call — `mutateAsync` gives you a
301
+ * promise per call instead, so you can wait for all of them when they succeed:
302
+ * ```tsx
303
+ * import { useMutation, useQueryClient } from '@tanstack/react-query'
304
+ *
305
+ * function AddTodos() {
306
+ * const queryClient = useQueryClient()
307
+ *
308
+ * const addMutation = useMutation({
309
+ * mutationFn: addTodo,
310
+ * onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
311
+ * })
312
+ *
313
+ * async function handleAddAll(todos: Array<string>) {
314
+ * try {
315
+ * await Promise.all(todos.map((todo) => addMutation.mutateAsync(todo)))
316
+ * } catch (error) {
317
+ * console.error('Failed to add todos:', error)
318
+ * }
319
+ * }
320
+ *
321
+ * return (
322
+ * <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>
323
+ * Add all
324
+ * </button>
325
+ * )
326
+ * }
327
+ * ```
328
+ *
329
+ * @example
330
+ * If some of the mutations above can fail independently of the others, and you want to know which ones
331
+ * did — rather than losing that information the moment the first one rejects — swap `Promise.all` for
332
+ * `Promise.allSettled`:
333
+ * ```tsx
334
+ * import { useMutation, useQueryClient } from '@tanstack/react-query'
335
+ *
336
+ * function AddTodos() {
337
+ * const queryClient = useQueryClient()
338
+ *
339
+ * const addMutation = useMutation({
340
+ * mutationFn: addTodo,
341
+ * onSuccess: () => queryClient.invalidateQueries({ queryKey: ['todos'] }),
342
+ * })
343
+ *
344
+ * async function handleAddAll(todos: Array<string>) {
345
+ * const addResults = await Promise.allSettled(
346
+ * todos.map((todo) => addMutation.mutateAsync(todo)),
347
+ * )
348
+ *
349
+ * addResults.forEach((addResult, index) => {
350
+ * if (addResult.status === 'rejected') {
351
+ * console.error(`Failed to add "${todos[index]}":`, addResult.reason)
352
+ * }
353
+ * })
354
+ * }
355
+ *
356
+ * return (
357
+ * <button onClick={() => handleAddAll(['Todo 1', 'Todo 2', 'Todo 3'])}>
358
+ * Add all
359
+ * </button>
360
+ * )
361
+ * }
362
+ * ```
363
+ */
129
364
  function useMutation(options, queryClient) {
130
365
  const client = useQueryClient(queryClient);
131
366
  const [observer] = import_react.useState(() => new MutationObserver(client, options));
@@ -133,8 +368,8 @@ function useMutation(options, queryClient) {
133
368
  observer.setOptions(options);
134
369
  }, [observer, options]);
135
370
  const result = import_react.useSyncExternalStore(import_react.useCallback((onStoreChange) => observer.subscribe(notifyManager.batchCalls(onStoreChange)), [observer]), () => observer.getCurrentResult(), () => observer.getCurrentResult());
136
- const mutate = import_react.useCallback((variables, mutateOptions) => {
137
- observer.mutate(variables, mutateOptions).catch(noop);
371
+ const mutate = import_react.useCallback((...args) => {
372
+ observer.mutate(args[0], args[1]).catch(noop);
138
373
  }, [observer]);
139
374
  if (result.error && shouldThrowError(observer.options.throwOnError, [result.error])) throw result.error;
140
375
  return {
@@ -1,6 +1,6 @@
1
- import { c as createServerFn, i as TSS_SERVER_FUNCTION } from "./createServerFn-DzU0k62V.mjs";
1
+ import { a as TSS_SERVER_FUNCTION, l as createServerFn } from "./createServerFn-CwIQ_zCm.mjs";
2
2
  import { n as isRuntimeStoragePlugin } from "./storageProfile-FVkjPoGb.mjs";
3
- //#region node_modules/.nitro/vite/services/ssr/assets/api-rpc-BIbDUKSz.js
3
+ //#region node_modules/.nitro/vite/services/ssr/assets/api-rpc-irQMOQXO.js
4
4
  var createServerRpc = (serverFnMeta, splitImportFn) => {
5
5
  const url = "/_serverFn/" + serverFnMeta.id;
6
6
  return Object.assign(splitImportFn, {
@@ -1,15 +1,15 @@
1
1
  import { AsyncLocalStorage } from "node:async_hooks";
2
- //#region node_modules/.nitro/vite/services/ssr/assets/createServerFn-DzU0k62V.js
2
+ //#region node_modules/.nitro/vite/services/ssr/assets/createServerFn-CwIQ_zCm.js
3
3
  /**
4
4
  * Create a redirect Response understood by TanStack Router.
5
5
  *
6
6
  * Use from route `loader`/`beforeLoad` or server functions to trigger a
7
7
  * navigation. If `throw: true` is set, the redirect is thrown instead of
8
- * returned. When an absolute `href` is supplied and `reloadDocument` is not
9
- * set, a full-document navigation is inferred.
8
+ * returned. External `href` values are classified as full-document
9
+ * navigations when the router resolves the redirect.
10
10
  *
11
11
  * @param opts Options for the redirect. Common fields:
12
- * - `href`: absolute URL for external redirects; infers `reloadDocument`.
12
+ * - `href`: absolute URL for external redirects.
13
13
  * - `statusCode`: HTTP status code to use (defaults to 307).
14
14
  * - `headers`: additional headers to include on the Response.
15
15
  * - Standard navigation options like `to`, `params`, `search`, `replace`,
@@ -19,10 +19,6 @@ import { AsyncLocalStorage } from "node:async_hooks";
19
19
  */
20
20
  function redirect(opts) {
21
21
  opts.statusCode = opts.statusCode || opts.code || 307;
22
- if (!opts._builtLocation && !opts.reloadDocument && typeof opts.href === "string") try {
23
- new URL(opts.href);
24
- opts.reloadDocument = true;
25
- } catch {}
26
22
  const headers = new Headers(opts.headers);
27
23
  if (opts.href && headers.get("Location") === null) headers.set("Location", opts.href);
28
24
  const response = new Response(null, {
@@ -34,16 +30,9 @@ function redirect(opts) {
34
30
  return response;
35
31
  }
36
32
  /** Check whether a value is a TanStack Router redirect Response. */
37
- /** Check whether a value is a TanStack Router redirect Response. */
38
33
  function isRedirect(obj) {
39
34
  return obj instanceof Response && !!obj.options;
40
35
  }
41
- /** True if value is a redirect with a resolved `href` location. */
42
- /** True if value is a redirect with a resolved `href` location. */
43
- function isResolvedRedirect(obj) {
44
- return isRedirect(obj) && !!obj.options.href;
45
- }
46
- /** Parse a serialized redirect object back into a redirect Response. */
47
36
  /** Parse a serialized redirect object back into a redirect Response. */
48
37
  function parseRedirect(obj) {
49
38
  if (obj !== null && typeof obj === "object" && obj.isSerializedRedirect) return redirect(obj);
@@ -55,42 +44,12 @@ var X_TSS_SERIALIZED = "x-tss-serialized";
55
44
  var X_TSS_RAW_RESPONSE = "x-tss-raw";
56
45
  /** Content-Type for multiplexed framed responses (RawStream support) */
57
46
  var TSS_CONTENT_TYPE_FRAMED = "application/x-tss-framed";
58
- /**
59
- * Frame types for binary multiplexing protocol.
60
- */
61
- var FrameType = {
62
- JSON: 0,
63
- CHUNK: 1,
64
- END: 2,
65
- ERROR: 3
66
- };
47
+ /** Largest payload accepted by one framed-protocol record. */
48
+ var MAX_FRAME_PAYLOAD_SIZE = 16 * 1024 * 1024;
49
+ /** Largest number of raw streams accepted in one framed response. */
50
+ var MAX_FRAMED_STREAMS = 1024;
67
51
  /** Full Content-Type header value with version parameter */
68
52
  var TSS_CONTENT_TYPE_FRAMED_VERSIONED = `${TSS_CONTENT_TYPE_FRAMED}; v=1`;
69
- function isSafeKey(key) {
70
- return key !== "__proto__" && key !== "constructor" && key !== "prototype";
71
- }
72
- /**
73
- * Merge target and source into a new null-proto object, filtering dangerous keys.
74
- */
75
- function safeObjectMerge(target, source) {
76
- const result = Object.create(null);
77
- if (target) {
78
- for (const key of Object.keys(target)) if (isSafeKey(key)) result[key] = target[key];
79
- }
80
- if (source && typeof source === "object") {
81
- for (const key of Object.keys(source)) if (isSafeKey(key)) result[key] = source[key];
82
- }
83
- return result;
84
- }
85
- /**
86
- * Create a null-prototype object, optionally copying from source.
87
- */
88
- function createNullProtoObject(source) {
89
- if (!source) return Object.create(null);
90
- const obj = Object.create(null);
91
- for (const key of Object.keys(source)) if (isSafeKey(key)) obj[key] = source[key];
92
- return obj;
93
- }
94
53
  var GLOBAL_STORAGE_KEY = Symbol.for("tanstack-start:start-storage-context");
95
54
  var globalObj = globalThis;
96
55
  if (!globalObj[GLOBAL_STORAGE_KEY]) globalObj[GLOBAL_STORAGE_KEY] = new AsyncLocalStorage();
@@ -104,7 +63,6 @@ function getStartContext(opts) {
104
63
  return context;
105
64
  }
106
65
  var getStartOptions = () => getStartContext().startOptions;
107
- var getStartContextServerOnly = getStartContext;
108
66
  function splitSetCookieString(cookiesString) {
109
67
  if (Array.isArray(cookiesString)) return cookiesString.flatMap((c) => splitSetCookieString(c));
110
68
  if (typeof cookiesString !== "string") return [];
@@ -161,6 +119,32 @@ function mergeHeaders(...headers) {
161
119
  return acc;
162
120
  }, new Headers());
163
121
  }
122
+ function isSafeKey(key) {
123
+ return key !== "__proto__" && key !== "constructor" && key !== "prototype";
124
+ }
125
+ /**
126
+ * Merge target and source into a new null-proto object, filtering dangerous keys.
127
+ */
128
+ function safeObjectMerge(target, source) {
129
+ const result = Object.create(null);
130
+ if (target) {
131
+ for (const key of Object.keys(target)) if (isSafeKey(key)) result[key] = target[key];
132
+ }
133
+ if (source && typeof source === "object") {
134
+ for (const key of Object.keys(source)) if (isSafeKey(key)) result[key] = source[key];
135
+ }
136
+ return result;
137
+ }
138
+ /**
139
+ * Create a null-prototype object, optionally copying from source.
140
+ */
141
+ function createNullProtoObject(source) {
142
+ if (!source) return Object.create(null);
143
+ const obj = Object.create(null);
144
+ for (const key of Object.keys(source)) if (isSafeKey(key)) obj[key] = source[key];
145
+ return obj;
146
+ }
147
+ var getStartContextServerOnly = getStartContext;
164
148
  var createServerFn = (options, __opts) => {
165
149
  const resolvedOptions = __opts || options || {};
166
150
  if (typeof resolvedOptions.method === "undefined") resolvedOptions.method = "GET";
@@ -175,10 +159,10 @@ var createServerFn = (options, __opts) => {
175
159
  options: resolvedOptions,
176
160
  middleware: (middleware) => {
177
161
  const newMiddleware = [...resolvedOptions.middleware || []];
178
- middleware.map((m) => {
179
- if (TSS_SERVER_FUNCTION_FACTORY in m) {
180
- if (m.options.middleware) newMiddleware.push(...m.options.middleware);
181
- } else newMiddleware.push(m);
162
+ middleware.forEach((item) => {
163
+ if (TSS_SERVER_FUNCTION_FACTORY in item) {
164
+ if (item.options.middleware) newMiddleware.push(...item.options.middleware);
165
+ } else newMiddleware.push(item);
182
166
  });
183
167
  const res = createServerFn(void 0, {
184
168
  ...resolvedOptions,
@@ -220,7 +204,8 @@ var createServerFn = (options, __opts) => {
220
204
  const serverContextAfterGlobalMiddlewares = startContext.contextAfterGlobalMiddlewares;
221
205
  return await executeMiddleware(resolvedMiddleware, "server", {
222
206
  ...extractedFn,
223
- ...opts,
207
+ data: opts.data,
208
+ method: opts.method ?? resolvedOptions.method,
224
209
  serverFnMeta: extractedFn.serverFnMeta,
225
210
  context: safeObjectMerge(opts.context, serverContextAfterGlobalMiddlewares),
226
211
  request: startContext.request
@@ -356,4 +341,4 @@ function serverFnBaseToMiddleware(options) {
356
341
  };
357
342
  }
358
343
  //#endregion
359
- export { X_TSS_RAW_RESPONSE as a, createServerFn as c, getStartOptions as d, isRedirect as f, safeObjectMerge as g, runWithStartContext as h, TSS_SERVER_FUNCTION as i, flattenMiddlewares as l, mergeHeaders as m, TSS_CONTENT_TYPE_FRAMED_VERSIONED as n, X_TSS_SERIALIZED as o, isResolvedRedirect as p, TSS_FORMDATA_CONTEXT as r, createNullProtoObject as s, FrameType as t, getStartContext as u };
344
+ export { TSS_SERVER_FUNCTION as a, createNullProtoObject as c, getStartContext as d, getStartOptions as f, safeObjectMerge as g, runWithStartContext as h, TSS_FORMDATA_CONTEXT as i, createServerFn as l, mergeHeaders as m, MAX_FRAME_PAYLOAD_SIZE as n, X_TSS_RAW_RESPONSE as o, isRedirect as p, TSS_CONTENT_TYPE_FRAMED_VERSIONED as r, X_TSS_SERIALIZED as s, MAX_FRAMED_STREAMS as t, flattenMiddlewares as u };
@@ -1,4 +1,4 @@
1
- //#region node_modules/.nitro/vite/services/ssr/assets/empty-plugin-adapters-B4HCzgmM.js
1
+ //#region node_modules/.nitro/vite/services/ssr/assets/empty-plugin-adapters-DvRHA3Ns.js
2
2
  var pluginSerializationAdapters = [];
3
3
  var hasPluginAdapters = false;
4
4
  //#endregion
@@ -4,11 +4,11 @@ import { P as require_jsx_runtime } from "../_libs/@radix-ui/react-alert-dialog+
4
4
  import { b as CircleCheck, c as Package, f as LoaderCircle, i as Sun, l as OctagonX, m as Info, n as TriangleAlert, u as Moon } from "../_libs/lucide-react.mjs";
5
5
  import { a as SidebarContent, b as TooltipProvider, c as SidebarGroupContent, d as SidebarInset, f as SidebarMenu, h as SidebarProvider, i as Sidebar, l as SidebarGroupLabel, m as SidebarMenuItem, o as SidebarFooter, p as SidebarMenuButton, s as SidebarGroup, t as Button, u as SidebarHeader } from "./sidebar-Cv_H0_Jv.mjs";
6
6
  import { a as useRouterState, c as Outlet, d as createRootRoute, f as Link, i as HeadContent, l as lazyRouteComponent, r as Scripts, s as createRouter, u as createFileRoute } from "../_libs/@tanstack/react-router+[...].mjs";
7
- import { t as QueryClient } from "../_libs/tanstack__query-core.mjs";
8
7
  import { r as QueryClientProvider } from "../_libs/tanstack__react-query.mjs";
8
+ import { t as QueryClient } from "../_libs/tanstack__query-core.mjs";
9
9
  import { t as z } from "../_libs/next-themes.mjs";
10
10
  import { t as Toaster } from "../_libs/sonner.mjs";
11
- //#region node_modules/.nitro/vite/services/ssr/assets/router-C3hqEy3k.js
11
+ //#region node_modules/.nitro/vite/services/ssr/assets/router-bOwIHAiQ.js
12
12
  var import_react = /* @__PURE__ */ __toESM(require_react());
13
13
  var import_jsx_runtime = require_jsx_runtime();
14
14
  function HotUpdaterLogo({ className }) {
@@ -273,7 +273,7 @@ function RootLayout() {
273
273
  children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Outlet, {})
274
274
  })] });
275
275
  }
276
- var $$splitComponentImporter = () => import("./routes-B0lQvvlC.mjs");
276
+ var $$splitComponentImporter = () => import("./routes-D6eq6WM0.mjs");
277
277
  var rootRouteChildren = { IndexRoute: createFileRoute("/")({
278
278
  component: lazyRouteComponent($$splitComponentImporter, "component"),
279
279
  validateSearch: (search) => {
@@ -1,5 +1,5 @@
1
1
  import { r as __toESM } from "../_runtime.mjs";
2
- import { c as createServerFn, i as TSS_SERVER_FUNCTION } from "./createServerFn-DzU0k62V.mjs";
2
+ import { a as TSS_SERVER_FUNCTION, l as createServerFn } from "./createServerFn-CwIQ_zCm.mjs";
3
3
  import { c as getPatchBaseFileHash, d as isValidCohort, f as normalizeCohortValue, l as getPatchFileHash, n as NUMERIC_COHORT_SIZE, o as getNumericCohortRolloutPosition, p as normalizeRolloutCohortCount, s as getPatchBaseBundleId, t as INVALID_COHORT_ERROR_MESSAGE } from "./dist-KboydRVk.mjs";
4
4
  import { u as require_react } from "../_libs/@floating-ui/react-dom+[...].mjs";
5
5
  import { A as Slot, P as require_jsx_runtime, a as Overlay2, c as Title2, d as Description, f as Overlay, g as Trigger, h as Title, i as Description2, l as Close, m as Root, n as Cancel, o as Portal2, p as Portal, r as Content2, s as Root2, t as Action, u as Content } from "../_libs/@radix-ui/react-alert-dialog+[...].mjs";
@@ -14,11 +14,11 @@ import { m as useSearch, p as useNavigate } from "../_libs/@tanstack/react-route
14
14
  import { n as useStore, t as useForm } from "../_libs/@tanstack/react-form+[...].mjs";
15
15
  import { i as useQueryClient, n as useQuery, t as useMutation } from "../_libs/tanstack__react-query.mjs";
16
16
  import { n as toast } from "../_libs/sonner.mjs";
17
- import { t as getServerFnById } from "../__23tanstack-start-server-fn-resolver-CgwgZ0-i.mjs";
17
+ import { t as getServerFnById } from "../__23tanstack-start-server-fn-resolver-CNUWOV2f.mjs";
18
18
  import { t as normalizeRange } from "../_libs/verkit.mjs";
19
19
  import { i as getCoreRowModel, n as useReactTable, r as createColumnHelper, t as flexRender } from "../_libs/@tanstack/react-table+[...].mjs";
20
20
  import { n as require_dayjs_min, t as require_relativeTime } from "../_libs/dayjs.mjs";
21
- //#region node_modules/.nitro/vite/services/ssr/assets/routes-B0lQvvlC.js
21
+ //#region node_modules/.nitro/vite/services/ssr/assets/routes-D6eq6WM0.js
22
22
  var import_react = /* @__PURE__ */ __toESM(require_react());
23
23
  var import_jsx_runtime = require_jsx_runtime();
24
24
  var import_dayjs_min = /* @__PURE__ */ __toESM(require_dayjs_min());