arri 0.1.1 → 0.1.2
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/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -4
- package/dist/index.d.mts +3 -4
- package/dist/index.d.ts +3 -4
- package/dist/index.mjs +1 -1
- package/dist/shared/{arri.ed4bd5e1.cjs → arri.2d97a1ad.cjs} +1 -1
- package/dist/shared/{arri.121d68e9.mjs → arri.b18baa8f.mjs} +1 -1
- package/package.json +7 -7
package/dist/cli.cjs
CHANGED
|
@@ -11,7 +11,7 @@ const consola = require('consola');
|
|
|
11
11
|
const esbuild = require('esbuild');
|
|
12
12
|
const path = require('pathe');
|
|
13
13
|
const prettier = require('prettier');
|
|
14
|
-
const config = require('./shared/arri.
|
|
14
|
+
const config = require('./shared/arri.2d97a1ad.cjs');
|
|
15
15
|
const globby = require('globby');
|
|
16
16
|
const scule = require('scule');
|
|
17
17
|
const arriCodegenDart = require('arri-codegen-dart');
|
package/dist/cli.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import * as esbuild from 'esbuild';
|
|
|
10
10
|
import { build as build$1 } from 'esbuild';
|
|
11
11
|
import path from 'pathe';
|
|
12
12
|
import prettier from 'prettier';
|
|
13
|
-
import { m as defaultConfig, l as isResolvedArriConfig, a as DEV_DEFINITION_ENDPOINT } from './shared/arri.
|
|
13
|
+
import { m as defaultConfig, l as isResolvedArriConfig, a as DEV_DEFINITION_ENDPOINT } from './shared/arri.b18baa8f.mjs';
|
|
14
14
|
import { globby } from 'globby';
|
|
15
15
|
import { camelCase, kebabCase } from 'scule';
|
|
16
16
|
import { dartClientGenerator } from 'arri-codegen-dart';
|
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HttpMethod, RpcDefinition, AppDefinition, ClientGenerator } from 'arri-codegen-utils';
|
|
2
|
-
import * as arri_validate from 'arri-validate';
|
|
3
2
|
import { AObjectSchema, ASchema, InferType, a, ValidationError } from 'arri-validate';
|
|
4
3
|
import { H3EventContext, H3Event, Router, App, H3Error } from 'h3';
|
|
5
4
|
export * from 'h3';
|
|
@@ -134,11 +133,11 @@ interface ArriOptions {
|
|
|
134
133
|
onError?: (error: H3Error, event: MiddlewareEvent) => void | Promise<void>;
|
|
135
134
|
}
|
|
136
135
|
|
|
137
|
-
declare const ErrorResponse:
|
|
136
|
+
declare const ErrorResponse: AObjectSchema<{
|
|
138
137
|
statusCode: number;
|
|
139
138
|
statusMessage: string;
|
|
140
|
-
stack
|
|
141
|
-
data
|
|
139
|
+
stack?: string | undefined;
|
|
140
|
+
data?: any;
|
|
142
141
|
}, false>;
|
|
143
142
|
type ErrorResponse = a.infer<typeof ErrorResponse>;
|
|
144
143
|
declare function defineError(statusCode: StatusCode, input?: Partial<Omit<ErrorResponse, "statusCode" | "stack">> & {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HttpMethod, RpcDefinition, AppDefinition, ClientGenerator } from 'arri-codegen-utils';
|
|
2
|
-
import * as arri_validate from 'arri-validate';
|
|
3
2
|
import { AObjectSchema, ASchema, InferType, a, ValidationError } from 'arri-validate';
|
|
4
3
|
import { H3EventContext, H3Event, Router, App, H3Error } from 'h3';
|
|
5
4
|
export * from 'h3';
|
|
@@ -134,11 +133,11 @@ interface ArriOptions {
|
|
|
134
133
|
onError?: (error: H3Error, event: MiddlewareEvent) => void | Promise<void>;
|
|
135
134
|
}
|
|
136
135
|
|
|
137
|
-
declare const ErrorResponse:
|
|
136
|
+
declare const ErrorResponse: AObjectSchema<{
|
|
138
137
|
statusCode: number;
|
|
139
138
|
statusMessage: string;
|
|
140
|
-
stack
|
|
141
|
-
data
|
|
139
|
+
stack?: string | undefined;
|
|
140
|
+
data?: any;
|
|
142
141
|
}, false>;
|
|
143
142
|
type ErrorResponse = a.infer<typeof ErrorResponse>;
|
|
144
143
|
declare function defineError(statusCode: StatusCode, input?: Partial<Omit<ErrorResponse, "statusCode" | "stack">> & {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HttpMethod, RpcDefinition, AppDefinition, ClientGenerator } from 'arri-codegen-utils';
|
|
2
|
-
import * as arri_validate from 'arri-validate';
|
|
3
2
|
import { AObjectSchema, ASchema, InferType, a, ValidationError } from 'arri-validate';
|
|
4
3
|
import { H3EventContext, H3Event, Router, App, H3Error } from 'h3';
|
|
5
4
|
export * from 'h3';
|
|
@@ -134,11 +133,11 @@ interface ArriOptions {
|
|
|
134
133
|
onError?: (error: H3Error, event: MiddlewareEvent) => void | Promise<void>;
|
|
135
134
|
}
|
|
136
135
|
|
|
137
|
-
declare const ErrorResponse:
|
|
136
|
+
declare const ErrorResponse: AObjectSchema<{
|
|
138
137
|
statusCode: number;
|
|
139
138
|
statusMessage: string;
|
|
140
|
-
stack
|
|
141
|
-
data
|
|
139
|
+
stack?: string | undefined;
|
|
140
|
+
data?: any;
|
|
142
141
|
}, false>;
|
|
143
142
|
type ErrorResponse = a.infer<typeof ErrorResponse>;
|
|
144
143
|
declare function defineError(statusCode: StatusCode, input?: Partial<Omit<ErrorResponse, "statusCode" | "stack">> & {
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ArriApp, o as ArriRouter, a as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ErrorResponse, c as createRpcDefinition, m as defaultConfig, n as defineConfig, f as defineError, p as defineRoute, d as defineRpc, h as errorResponseFromValidationErrors, b as getRpcParamName, g as getRpcPath, e as getRpcResponseName, j as handleH3Error, s as handleRoute, k as isArriConfig, l as isResolvedArriConfig, i as isRpc, q as registerRoute, r as registerRpc } from './shared/arri.
|
|
1
|
+
export { A as ArriApp, o as ArriRouter, a as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ErrorResponse, c as createRpcDefinition, m as defaultConfig, n as defineConfig, f as defineError, p as defineRoute, d as defineRpc, h as errorResponseFromValidationErrors, b as getRpcParamName, g as getRpcPath, e as getRpcResponseName, j as handleH3Error, s as handleRoute, k as isArriConfig, l as isResolvedArriConfig, i as isRpc, q as registerRoute, r as registerRpc } from './shared/arri.b18baa8f.mjs';
|
|
2
2
|
export * from 'h3';
|
|
3
3
|
import 'arri-validate';
|
|
4
4
|
import 'arri-codegen-utils';
|
|
@@ -8,7 +8,7 @@ const scule = require('scule');
|
|
|
8
8
|
const ErrorResponse = arriValidate.a.object({
|
|
9
9
|
statusCode: arriValidate.a.int8(),
|
|
10
10
|
statusMessage: arriValidate.a.string(),
|
|
11
|
-
stack: arriValidate.a.
|
|
11
|
+
stack: arriValidate.a.optional(arriValidate.a.string()),
|
|
12
12
|
data: arriValidate.a.optional(arriValidate.a.any())
|
|
13
13
|
});
|
|
14
14
|
function defineError(statusCode, input = {}) {
|
|
@@ -6,7 +6,7 @@ import { kebabCase, pascalCase } from 'scule';
|
|
|
6
6
|
const ErrorResponse = a.object({
|
|
7
7
|
statusCode: a.int8(),
|
|
8
8
|
statusMessage: a.string(),
|
|
9
|
-
stack: a.
|
|
9
|
+
stack: a.optional(a.string()),
|
|
10
10
|
data: a.optional(a.any())
|
|
11
11
|
});
|
|
12
12
|
function defineError(statusCode, input = {}) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arri",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"chokidar": "^3.5.3",
|
|
23
23
|
"citty": "^0.1.4",
|
|
24
24
|
"consola": "^3.2.3",
|
|
25
|
-
"esbuild": "^0.19.
|
|
25
|
+
"esbuild": "^0.19.5",
|
|
26
26
|
"globby": "^13.2.2",
|
|
27
27
|
"h3": "^1.8.2",
|
|
28
28
|
"jiti": "^1.20.0",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"pathe": "^1.1.1",
|
|
32
32
|
"prettier": "^3.0.3",
|
|
33
33
|
"scule": "^1.0.0",
|
|
34
|
-
"arri-codegen-ts": "0.1.
|
|
35
|
-
"arri-codegen-dart": "0.1.
|
|
36
|
-
"arri-codegen-utils": "0.1.
|
|
37
|
-
"arri-validate": "0.1.
|
|
34
|
+
"arri-codegen-ts": "0.1.2",
|
|
35
|
+
"arri-codegen-dart": "0.1.2",
|
|
36
|
+
"arri-codegen-utils": "0.1.2",
|
|
37
|
+
"arri-validate": "0.1.2"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"bun-types": "^1.0.
|
|
40
|
+
"bun-types": "^1.0.6"
|
|
41
41
|
}
|
|
42
42
|
}
|