arri 0.19.1 → 0.19.4
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.
|
|
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.
|
|
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
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.
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "0.19.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -26,28 +26,28 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@joshmossas/listhen": "1.5.13",
|
|
29
|
-
"c12": "^1.
|
|
29
|
+
"c12": "^1.6.1",
|
|
30
30
|
"chokidar": "^3.5.3",
|
|
31
31
|
"citty": "^0.1.5",
|
|
32
32
|
"consola": "^3.2.3",
|
|
33
33
|
"degit": "^2.8.4",
|
|
34
|
-
"esbuild": "^0.19.
|
|
34
|
+
"esbuild": "^0.19.11",
|
|
35
35
|
"esbuild-plugin-replace": "^1.4.0",
|
|
36
36
|
"globby": "^14.0.0",
|
|
37
|
-
"h3": "^1.
|
|
37
|
+
"h3": "^1.10.0",
|
|
38
38
|
"jiti": "^1.21.0",
|
|
39
39
|
"ofetch": "^1.3.3",
|
|
40
40
|
"pathe": "^1.1.1",
|
|
41
41
|
"prettier": "^3.1.1",
|
|
42
42
|
"scule": "^1.1.1",
|
|
43
43
|
"uncrypto": "^0.1.3",
|
|
44
|
-
"arri-codegen-
|
|
45
|
-
"arri-codegen-
|
|
46
|
-
"arri-codegen-utils": "0.19.
|
|
47
|
-
"arri-validate": "0.19.
|
|
44
|
+
"arri-codegen-dart": "0.19.4",
|
|
45
|
+
"arri-codegen-ts": "0.19.4",
|
|
46
|
+
"arri-codegen-utils": "0.19.4",
|
|
47
|
+
"arri-validate": "0.19.4"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/degit": "^2.8.6",
|
|
51
|
-
"bun-types": "^1.0.
|
|
51
|
+
"bun-types": "^1.0.21"
|
|
52
52
|
}
|
|
53
53
|
}
|