kitcn 0.33.1 → 0.33.3
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/CHANGELOG.md +19 -0
- package/dist/aggregate/index.d.ts +1 -1
- package/dist/auth/client/index.js +1 -1
- package/dist/auth/generated/index.d.ts +1 -1
- package/dist/auth/index.d.ts +19 -19
- package/dist/auth/nextjs/index.d.ts +2 -2
- package/dist/auth/nextjs/index.js +2 -2
- package/dist/auth/start/server/index.d.ts +2 -2
- package/dist/auth/start/server/index.js +2 -2
- package/dist/{auth-store-BnsWs1xd.js → auth-store-x3_wvhTR.js} +17 -2
- package/dist/{caller-factory-C-N540BC.js → caller-factory-CEKbQdGY.js} +1 -1
- package/dist/cli.mjs +48 -7
- package/dist/crpc/index.d.ts +9 -5
- package/dist/crpc/index.js +1 -1
- package/dist/{error-Dyqhgbf6.js → error-CLgc9khF.js} +18 -3
- package/dist/{generated-contract-disabled-B_EaHGCP.d.ts → generated-contract-disabled-BPjuEPZD.d.ts} +43 -43
- package/dist/{http-types-8FBr10yl.d.ts → http-types-BhhPZtwa.d.ts} +79 -3
- package/dist/{middleware-D2hKJuSZ.d.ts → middleware-BBS7oLtT.d.ts} +1 -1
- package/dist/orm/index.d.ts +1 -1
- package/dist/orm/migrations/index.d.ts +1 -1
- package/dist/plugins/index.d.ts +1 -1
- package/dist/{procedure-name-kn-awLk1.d.ts → procedure-name-DRSOwAJY.d.ts} +139 -5
- package/dist/ratelimit/index.d.ts +2 -2
- package/dist/react/index.js +1 -1
- package/dist/rsc/index.d.ts +3 -4
- package/dist/rsc/index.js +1 -1
- package/dist/server/index.d.ts +4 -5
- package/dist/server/index.js +1 -1
- package/dist/solid/index.js +17 -2
- package/dist/{types-Cl0utsTL.d.ts → types-C7JkpfeY.d.ts} +1 -2
- package/dist/{where-clause-compiler-CoPVAVDO.d.ts → where-clause-compiler-jhCEPHxi.d.ts} +129 -129
- package/package.json +1 -1
- package/dist/caller-factory-C3pcbzo0.d.ts +0 -140
- package/dist/transformer-BEkxlnss.d.ts +0 -78
- /package/dist/{context-utils-ax351iFc.d.ts → context-utils-Cbv4r0AA.d.ts} +0 -0
- /package/dist/{token-CZpDQUHd.d.ts → token-tlbNKQS0.d.ts} +0 -0
- /package/dist/{types-CzGsrLrY.d.ts → types-Bkeicpo6.d.ts} +0 -0
package/dist/solid/index.js
CHANGED
|
@@ -8,6 +8,13 @@ import { QueriesObserver, hashKey } from "@tanstack/query-core";
|
|
|
8
8
|
import { convexToJson } from "convex/values";
|
|
9
9
|
|
|
10
10
|
//#region src/crpc/error.ts
|
|
11
|
+
const CLIENT_ERROR_CODES = [
|
|
12
|
+
"UNAUTHORIZED",
|
|
13
|
+
"FORBIDDEN",
|
|
14
|
+
"NOT_FOUND",
|
|
15
|
+
"BAD_REQUEST",
|
|
16
|
+
"TOO_MANY_REQUESTS"
|
|
17
|
+
];
|
|
11
18
|
/**
|
|
12
19
|
* Client-side CRPC error.
|
|
13
20
|
* Mirrors backend CRPCError pattern with typed error codes.
|
|
@@ -22,8 +29,16 @@ var CRPCClientError = class extends Error {
|
|
|
22
29
|
this.functionName = opts.functionName;
|
|
23
30
|
}
|
|
24
31
|
};
|
|
25
|
-
/**
|
|
26
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Type guard for CRPCClientError.
|
|
34
|
+
* Checks shape, not constructor: package entrypoints bundle separate copies
|
|
35
|
+
* of the class, so `instanceof` fails across them.
|
|
36
|
+
*/
|
|
37
|
+
const isCRPCClientError = (error) => {
|
|
38
|
+
if (!(error instanceof Error)) return false;
|
|
39
|
+
const candidate = error;
|
|
40
|
+
return candidate.name === "CRPCClientError" && CLIENT_ERROR_CODES.includes(candidate.code) && typeof candidate.functionName === "string" && typeof candidate.message === "string";
|
|
41
|
+
};
|
|
27
42
|
/** Default unauthorized detection - checks UNAUTHORIZED code */
|
|
28
43
|
const defaultIsUnauthorized = (error) => {
|
|
29
44
|
if (!error || typeof error !== "object") return false;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as HttpClientError } from "./http-types-8FBr10yl.js";
|
|
1
|
+
import { P as CombinedDataTransformer, r as HttpClientError } from "./http-types-BhhPZtwa.js";
|
|
3
2
|
import { FunctionArgs, FunctionReference, FunctionReturnType } from "convex/server";
|
|
4
3
|
|
|
5
4
|
//#region src/crpc/http-client.d.ts
|