arri 0.22.0 → 0.22.1

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 CHANGED
@@ -12,7 +12,7 @@ const esbuild = require('esbuild');
12
12
  const esbuildPluginReplace = require('esbuild-plugin-replace');
13
13
  const path = require('pathe');
14
14
  const prettier = require('prettier');
15
- const config = require('./shared/arri.b90bc113.cjs');
15
+ const config = require('./shared/arri.b27cbd19.cjs');
16
16
  const globby = require('globby');
17
17
  const scule = require('scule');
18
18
  const arriCodegenDart = require('arri-codegen-dart');
package/dist/cli.mjs CHANGED
@@ -11,7 +11,7 @@ import { build as build$1 } from 'esbuild';
11
11
  import { replace } from 'esbuild-plugin-replace';
12
12
  import path from 'pathe';
13
13
  import prettier from 'prettier';
14
- import { n as defaultConfig, m as isResolvedArriConfig, a as DEV_DEFINITION_ENDPOINT } from './shared/arri.f69ab093.mjs';
14
+ import { n as defaultConfig, m as isResolvedArriConfig, a as DEV_DEFINITION_ENDPOINT } from './shared/arri.62a101bf.mjs';
15
15
  import { globby } from 'globby';
16
16
  import { camelCase, kebabCase } from 'scule';
17
17
  import { dartClientGenerator } from 'arri-codegen-dart';
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const config = require('./shared/arri.b90bc113.cjs');
3
+ const config = require('./shared/arri.b27cbd19.cjs');
4
4
  const h3 = require('h3');
5
5
  require('arri-validate');
6
6
  require('node:process');
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { A as ArriApp, p as ArriRouter, a as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ErrorResponse, B as EventStreamConnection, c as createRpcDefinition, n as defaultConfig, o as defineConfig, h as defineError, w as defineEventStreamRpc, q as defineRoute, d as defineRpc, j as errorResponseFromValidationErrors, y as formatSse, z as formatSseList, e as getRpcParamName, g as getRpcPath, f as getRpcResponseName, k as handleH3Error, t as handleRoute, l as isArriConfig, x as isEventStreamRpc, m as isResolvedArriConfig, b as isRpc, i as isRpcParamSchema, C as registerEventStreamRpc, s as registerRoute, r as registerRpc, u as setSseHeaders, v as validateRpcRequestInput } from './shared/arri.f69ab093.mjs';
1
+ export { A as ArriApp, p as ArriRouter, a as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ErrorResponse, B as EventStreamConnection, c as createRpcDefinition, n as defaultConfig, o as defineConfig, h as defineError, w as defineEventStreamRpc, q as defineRoute, d as defineRpc, j as errorResponseFromValidationErrors, y as formatSse, z as formatSseList, e as getRpcParamName, g as getRpcPath, f as getRpcResponseName, k as handleH3Error, t as handleRoute, l as isArriConfig, x as isEventStreamRpc, m as isResolvedArriConfig, b as isRpc, i as isRpcParamSchema, C as registerEventStreamRpc, s as registerRoute, r as registerRpc, u as setSseHeaders, v as validateRpcRequestInput } from './shared/arri.62a101bf.mjs';
2
2
  export * from 'h3';
3
3
  import 'arri-validate';
4
4
  import 'node:process';
@@ -186,7 +186,11 @@ const errorResponseDefaults = {
186
186
  }
187
187
  };
188
188
  async function handleH3Error(err, event, onError) {
189
- const error = isError(err) ? err : defineError(500, { data: err, stack: `${err}` });
189
+ const error = isError(err) ? err : defineError(500, {
190
+ statusMessage: typeof err === "object" && err != null && "message" in err && typeof err.message === "string" ? err.message : void 0,
191
+ data: err,
192
+ stack: `${err}`
193
+ });
190
194
  setResponseStatus(event, error.statusCode);
191
195
  if (onError) {
192
196
  await onError(error, event);
@@ -483,6 +487,7 @@ class EventStreamConnection {
483
487
  __publicField$2(this, "validator");
484
488
  __publicField$2(this, "serializer");
485
489
  __publicField$2(this, "h3Event");
490
+ // for some reason Rollup cannot output DTS when this is set to NodeJS.Timeout
486
491
  __publicField$2(this, "pingInterval");
487
492
  __publicField$2(this, "pingIntervalMs");
488
493
  this.h3Event = event;
@@ -188,7 +188,11 @@ const errorResponseDefaults = {
188
188
  }
189
189
  };
190
190
  async function handleH3Error(err, event, onError) {
191
- const error = h3.isError(err) ? err : defineError(500, { data: err, stack: `${err}` });
191
+ const error = h3.isError(err) ? err : defineError(500, {
192
+ statusMessage: typeof err === "object" && err != null && "message" in err && typeof err.message === "string" ? err.message : void 0,
193
+ data: err,
194
+ stack: `${err}`
195
+ });
192
196
  h3.setResponseStatus(event, error.statusCode);
193
197
  if (onError) {
194
198
  await onError(error, event);
@@ -485,6 +489,7 @@ class EventStreamConnection {
485
489
  __publicField$2(this, "validator");
486
490
  __publicField$2(this, "serializer");
487
491
  __publicField$2(this, "h3Event");
492
+ // for some reason Rollup cannot output DTS when this is set to NodeJS.Timeout
488
493
  __publicField$2(this, "pingInterval");
489
494
  __publicField$2(this, "pingIntervalMs");
490
495
  this.h3Event = event;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arri",
3
- "version": "0.22.0",
3
+ "version": "0.22.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -38,16 +38,16 @@
38
38
  "jiti": "^1.21.0",
39
39
  "ofetch": "^1.3.3",
40
40
  "pathe": "^1.1.2",
41
- "prettier": "^3.2.4",
41
+ "prettier": "^3.2.5",
42
42
  "scule": "^1.2.0",
43
43
  "uncrypto": "^0.1.3",
44
- "arri-codegen-dart": "0.22.0",
45
- "arri-codegen-utils": "0.22.0",
46
- "arri-validate": "0.22.0",
47
- "arri-codegen-ts": "0.22.0"
44
+ "arri-codegen-dart": "0.22.1",
45
+ "arri-codegen-ts": "0.22.1",
46
+ "arri-validate": "0.22.1",
47
+ "arri-codegen-utils": "0.22.1"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/degit": "^2.8.6",
51
- "bun-types": "^1.0.25"
51
+ "bun-types": "^1.0.26"
52
52
  }
53
53
  }