arri 0.19.1 → 0.19.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/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.fb99f509.cjs');
15
+ const config = require('./shared/arri.6b7e8945.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.deade82a.mjs';
14
+ import { n as defaultConfig, m as isResolvedArriConfig, a as DEV_DEFINITION_ENDPOINT } from './shared/arri.ea72d98f.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.fb99f509.cjs');
3
+ const config = require('./shared/arri.6b7e8945.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.deade82a.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.ea72d98f.mjs';
2
2
  export * from 'h3';
3
3
  import 'arri-validate';
4
4
  import 'node:process';
@@ -425,8 +425,10 @@ var __publicField$2 = (obj, key, value) => {
425
425
  function setSseHeaders(event) {
426
426
  h3.setHeaders(event, {
427
427
  "Content-Type": "text/event-stream",
428
+ "Cache-Control": "private, no-cache, no-store, no-transform, must-revalidate, max-age=0",
428
429
  Connection: "keep-alive",
429
- "Cache-Control": "no-cache"
430
+ Pragma: "no-cache",
431
+ "X-Accel-Buffering": "no"
430
432
  });
431
433
  }
432
434
  function defineEventStreamRpc(config) {
@@ -473,8 +475,6 @@ class EventStreamConnection {
473
475
  __publicField$2(this, "pingInterval");
474
476
  __publicField$2(this, "pingIntervalMs");
475
477
  this.h3Event = event;
476
- setSseHeaders(this.h3Event);
477
- h3.setResponseStatus(this.h3Event, 200);
478
478
  const id = h3.getHeader(event, "Last-Event-ID");
479
479
  this.lastEventId = id;
480
480
  const { readable, writable } = new TransformStream();
@@ -492,6 +492,8 @@ class EventStreamConnection {
492
492
  * Start sending the event stream to the client
493
493
  */
494
494
  start() {
495
+ setSseHeaders(this.h3Event);
496
+ h3.setResponseStatus(this.h3Event, 200);
495
497
  this.h3Event._handled = true;
496
498
  void h3.sendStream(this.h3Event, this.readable);
497
499
  this.pingInterval = setInterval(async () => {
@@ -423,8 +423,10 @@ var __publicField$2 = (obj, key, value) => {
423
423
  function setSseHeaders(event) {
424
424
  setHeaders(event, {
425
425
  "Content-Type": "text/event-stream",
426
+ "Cache-Control": "private, no-cache, no-store, no-transform, must-revalidate, max-age=0",
426
427
  Connection: "keep-alive",
427
- "Cache-Control": "no-cache"
428
+ Pragma: "no-cache",
429
+ "X-Accel-Buffering": "no"
428
430
  });
429
431
  }
430
432
  function defineEventStreamRpc(config) {
@@ -471,8 +473,6 @@ class EventStreamConnection {
471
473
  __publicField$2(this, "pingInterval");
472
474
  __publicField$2(this, "pingIntervalMs");
473
475
  this.h3Event = event;
474
- setSseHeaders(this.h3Event);
475
- setResponseStatus(this.h3Event, 200);
476
476
  const id = getHeader(event, "Last-Event-ID");
477
477
  this.lastEventId = id;
478
478
  const { readable, writable } = new TransformStream();
@@ -490,6 +490,8 @@ class EventStreamConnection {
490
490
  * Start sending the event stream to the client
491
491
  */
492
492
  start() {
493
+ setSseHeaders(this.h3Event);
494
+ setResponseStatus(this.h3Event, 200);
493
495
  this.h3Event._handled = true;
494
496
  void sendStream(this.h3Event, this.readable);
495
497
  this.pingInterval = setInterval(async () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arri",
3
- "version": "0.19.1",
3
+ "version": "0.19.3",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -41,10 +41,10 @@
41
41
  "prettier": "^3.1.1",
42
42
  "scule": "^1.1.1",
43
43
  "uncrypto": "^0.1.3",
44
- "arri-codegen-ts": "0.19.1",
45
- "arri-codegen-dart": "0.19.1",
46
- "arri-codegen-utils": "0.19.1",
47
- "arri-validate": "0.19.1"
44
+ "arri-codegen-dart": "0.19.3",
45
+ "arri-validate": "0.19.3",
46
+ "arri-codegen-utils": "0.19.3",
47
+ "arri-codegen-ts": "0.19.3"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/degit": "^2.8.6",