@orpc/shared
Advanced tools
Comparing version 0.0.0-next-20241119022811 to 0.0.0-next-20241120060815
@@ -0,3 +1,4 @@ | ||
// src/error.ts | ||
import { ZodError } from "zod"; | ||
const ORPC_ERROR_CODE_STATUSES = { | ||
var ORPC_ERROR_CODE_STATUSES = { | ||
BAD_REQUEST: 400, | ||
@@ -23,3 +24,3 @@ UNAUTHORIZED: 401, | ||
}; | ||
class ORPCError extends Error { | ||
var ORPCError = class _ORPCError extends Error { | ||
constructor(zz$oe) { | ||
@@ -60,3 +61,3 @@ if (zz$oe.status && (zz$oe.status < 400 || zz$oe.status >= 600)) { | ||
} | ||
return new ORPCError({ | ||
return new _ORPCError({ | ||
code: json.code, | ||
@@ -69,3 +70,3 @@ status: json.status, | ||
} | ||
} | ||
}; | ||
export { | ||
@@ -75,1 +76,2 @@ ORPCError, | ||
}; | ||
//# sourceMappingURL=error.js.map |
@@ -1,4 +0,2 @@ | ||
import { isPlainObject } from "is-what"; | ||
import { isPlainObject as isPlainObject2 } from "is-what"; | ||
import { guard, mapEntries, mapValues, omit, trim } from "radash"; | ||
// src/json.ts | ||
function parseJSONSafely(text) { | ||
@@ -12,2 +10,5 @@ if (text === "") return void 0; | ||
} | ||
// src/object.ts | ||
import { isPlainObject } from "is-what"; | ||
function set(root, segments, value) { | ||
@@ -55,2 +56,6 @@ const ref = { root }; | ||
} | ||
// src/index.ts | ||
import { isPlainObject as isPlainObject2 } from "is-what"; | ||
import { guard, trim, mapEntries, omit, mapValues } from "radash"; | ||
export { | ||
@@ -68,1 +73,2 @@ findDeepMatches, | ||
}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@orpc/shared", | ||
"type": "module", | ||
"version": "0.0.0-next-20241119022811", | ||
"version": "0.0.0-next-20241120060815", | ||
"author": { | ||
@@ -49,5 +49,6 @@ "name": "unnoq", | ||
"scripts": { | ||
"build": "UNPLUGIN_ON_SUCCESS='tsc -b --noCheck' vite build", | ||
"build": "tsup --clean --sourcemap --entry.index=src/index.ts --entry.error=src/error.ts --format=esm --onSuccess='tsc -b --noCheck'", | ||
"build:watch": "pnpm run build --watch", | ||
"type:check": "tsc -b" | ||
} | ||
} |
82381
20
399