@orpc/contract 0.0.0-next.c59d67c → 0.0.0-next.db1f26d
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/dist/index.js +3 -0
- package/dist/src/procedure.d.ts +1 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -59,6 +59,9 @@ function isContractProcedure(item) {
|
|
|
59
59
|
var ContractRouterBuilder = class _ContractRouterBuilder {
|
|
60
60
|
constructor(zz$crb) {
|
|
61
61
|
this.zz$crb = zz$crb;
|
|
62
|
+
if (zz$crb.prefix && zz$crb.prefix.includes("{")) {
|
|
63
|
+
throw new Error('Prefix cannot contain "{" for dynamic routing');
|
|
64
|
+
}
|
|
62
65
|
}
|
|
63
66
|
prefix(prefix) {
|
|
64
67
|
return new _ContractRouterBuilder({
|
package/dist/src/procedure.d.ts
CHANGED
|
@@ -33,6 +33,7 @@ export declare class ContractProcedure<TInputSchema extends Schema, TOutputSchem
|
|
|
33
33
|
outputExample?: SchemaOutput<TOutputSchema>;
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
+
export type WELL_CONTRACT_PROCEDURE = ContractProcedure<Schema, Schema>;
|
|
36
37
|
export declare class DecoratedContractProcedure<TInputSchema extends Schema, TOutputSchema extends Schema> extends ContractProcedure<TInputSchema, TOutputSchema> {
|
|
37
38
|
static decorate<TInputSchema extends Schema, TOutputSchema extends Schema>(cp: ContractProcedure<TInputSchema, TOutputSchema>): DecoratedContractProcedure<TInputSchema, TOutputSchema>;
|
|
38
39
|
route(opts: RouteOptions): DecoratedContractProcedure<TInputSchema, TOutputSchema>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/contract",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.0-next.
|
|
4
|
+
"version": "0.0.0-next.db1f26d",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
|
7
7
|
"repository": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"zod": ">=3.23.0"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@orpc/shared": "0.0.0-next.
|
|
35
|
+
"@orpc/shared": "0.0.0-next.db1f26d"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "tsup --clean --sourcemap --entry.index=src/index.ts --format=esm --onSuccess='tsc -b --noCheck'",
|