arri 0.0.34 → 0.0.36
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/chunks/index.cjs +2 -2
- package/dist/chunks/index.mjs +2 -2
- package/dist/cli.cjs +14 -4
- package/dist/cli.mjs +14 -4
- package/dist/codegen.cjs +2 -2
- package/dist/codegen.d.cts +2 -2
- package/dist/codegen.d.mts +2 -2
- package/dist/codegen.d.ts +2 -2
- package/dist/codegen.mjs +4 -4
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/shared/{arri.4f2fd509.mjs → arri.1a30c6b5.mjs} +1 -1
- package/dist/shared/{arri.85feed59.cjs → arri.8a065f92.cjs} +4 -1
- package/dist/shared/{arri.ff3f1007.d.mts → arri.a8159363.d.cts} +1 -1
- package/dist/shared/{arri.ff3f1007.d.ts → arri.a8159363.d.mts} +1 -1
- package/dist/shared/{arri.ff3f1007.d.cts → arri.a8159363.d.ts} +1 -1
- package/dist/shared/{arri.2cb8e56b.cjs → arri.edc9d295.cjs} +1 -1
- package/dist/shared/{arri.e50487f7.mjs → arri.f1c922a6.mjs} +4 -1
- package/package.json +1 -1
package/dist/chunks/index.cjs
CHANGED
|
@@ -35,14 +35,14 @@ require('node:v8');
|
|
|
35
35
|
require('consola');
|
|
36
36
|
require('esbuild');
|
|
37
37
|
require('prettier');
|
|
38
|
-
require('../shared/arri.
|
|
38
|
+
require('../shared/arri.8a065f92.cjs');
|
|
39
39
|
require('@sinclair/typebox');
|
|
40
40
|
require('h3');
|
|
41
41
|
require('@sinclair/typebox/errors');
|
|
42
42
|
require('@sinclair/typebox/value');
|
|
43
43
|
require('../index.cjs');
|
|
44
44
|
require('ofetch');
|
|
45
|
-
require('../shared/arri.
|
|
45
|
+
require('../shared/arri.edc9d295.cjs');
|
|
46
46
|
require('child_process');
|
|
47
47
|
require('listhen');
|
|
48
48
|
|
package/dist/chunks/index.mjs
CHANGED
|
@@ -33,14 +33,14 @@ import 'node:v8';
|
|
|
33
33
|
import 'consola';
|
|
34
34
|
import 'esbuild';
|
|
35
35
|
import 'prettier';
|
|
36
|
-
import '../shared/arri.
|
|
36
|
+
import '../shared/arri.f1c922a6.mjs';
|
|
37
37
|
import '@sinclair/typebox';
|
|
38
38
|
import 'h3';
|
|
39
39
|
import '@sinclair/typebox/errors';
|
|
40
40
|
import '@sinclair/typebox/value';
|
|
41
41
|
import '../index.mjs';
|
|
42
42
|
import 'ofetch';
|
|
43
|
-
import '../shared/arri.
|
|
43
|
+
import '../shared/arri.1a30c6b5.mjs';
|
|
44
44
|
import 'child_process';
|
|
45
45
|
import 'listhen';
|
|
46
46
|
|
package/dist/cli.cjs
CHANGED
|
@@ -25,7 +25,7 @@ const require$$0$3 = require('stream');
|
|
|
25
25
|
const consola = require('consola');
|
|
26
26
|
const esbuild = require('esbuild');
|
|
27
27
|
const prettier = require('prettier');
|
|
28
|
-
const app = require('./shared/arri.
|
|
28
|
+
const app = require('./shared/arri.8a065f92.cjs');
|
|
29
29
|
const index = require('./index.cjs');
|
|
30
30
|
require('node:stream');
|
|
31
31
|
const ofetch = require('ofetch');
|
|
@@ -33,7 +33,7 @@ require('@sinclair/typebox');
|
|
|
33
33
|
require('h3');
|
|
34
34
|
require('@sinclair/typebox/errors');
|
|
35
35
|
require('@sinclair/typebox/value');
|
|
36
|
-
const dart = require('./shared/arri.
|
|
36
|
+
const dart = require('./shared/arri.edc9d295.cjs');
|
|
37
37
|
const listhen = require('listhen');
|
|
38
38
|
require('child_process');
|
|
39
39
|
|
|
@@ -20006,6 +20006,7 @@ async function bundleFiles$1(config) {
|
|
|
20006
20006
|
platform: config.esbuild.platform ?? "node",
|
|
20007
20007
|
target: config.esbuild.target ?? "node18",
|
|
20008
20008
|
bundle: true,
|
|
20009
|
+
packages: "external",
|
|
20009
20010
|
format: "esm",
|
|
20010
20011
|
sourcemap: true,
|
|
20011
20012
|
minifyWhitespace: true,
|
|
@@ -20176,9 +20177,10 @@ async function bundleFiles(config) {
|
|
|
20176
20177
|
outfile: path__default$1.resolve(config.rootDir, config.buildDir, "bundle.js"),
|
|
20177
20178
|
format: "esm",
|
|
20178
20179
|
bundle: true,
|
|
20180
|
+
sourcemap: true,
|
|
20179
20181
|
target: "node18",
|
|
20180
20182
|
platform: "node",
|
|
20181
|
-
|
|
20183
|
+
packages: "external"
|
|
20182
20184
|
});
|
|
20183
20185
|
}
|
|
20184
20186
|
async function startDevServer(config) {
|
|
@@ -20190,10 +20192,18 @@ async function startDevServer(config) {
|
|
|
20190
20192
|
transpileFiles(config)
|
|
20191
20193
|
]);
|
|
20192
20194
|
await bundleFiles(config);
|
|
20193
|
-
await startListener(config, true);
|
|
20195
|
+
const listener = await startListener(config, true);
|
|
20194
20196
|
setTimeout(async () => {
|
|
20195
20197
|
await generateClients(config);
|
|
20196
20198
|
}, 1e3);
|
|
20199
|
+
const cleanExit = async () => {
|
|
20200
|
+
process.exit();
|
|
20201
|
+
};
|
|
20202
|
+
process.on("exit", async () => {
|
|
20203
|
+
await Promise.allSettled([listener.close(), fileWatcher?.close()]);
|
|
20204
|
+
});
|
|
20205
|
+
process.on("SIGINT", cleanExit);
|
|
20206
|
+
process.on("SIGTERM", cleanExit);
|
|
20197
20207
|
async function load(isRestart, reason) {
|
|
20198
20208
|
try {
|
|
20199
20209
|
if (fileWatcher) {
|
package/dist/cli.mjs
CHANGED
|
@@ -23,7 +23,7 @@ import require$$0$3 from 'stream';
|
|
|
23
23
|
import { createConsola } from 'consola';
|
|
24
24
|
import { build as build$1 } from 'esbuild';
|
|
25
25
|
import prettier from 'prettier';
|
|
26
|
-
import { j as camelCase, r as removeDisallowedChars, o as kebabCase, k as isApplicationDef, D as DEV_DEFINITION_ENDPOINT } from './shared/arri.
|
|
26
|
+
import { j as camelCase, r as removeDisallowedChars, o as kebabCase, k as isApplicationDef, D as DEV_DEFINITION_ENDPOINT } from './shared/arri.f1c922a6.mjs';
|
|
27
27
|
import { defaultConfig } from './index.mjs';
|
|
28
28
|
import 'node:stream';
|
|
29
29
|
import { ofetch } from 'ofetch';
|
|
@@ -31,7 +31,7 @@ import '@sinclair/typebox';
|
|
|
31
31
|
import 'h3';
|
|
32
32
|
import '@sinclair/typebox/errors';
|
|
33
33
|
import '@sinclair/typebox/value';
|
|
34
|
-
import { a as dartClientGenerator } from './shared/arri.
|
|
34
|
+
import { a as dartClientGenerator } from './shared/arri.1a30c6b5.mjs';
|
|
35
35
|
import { listenAndWatch } from 'listhen';
|
|
36
36
|
import 'child_process';
|
|
37
37
|
|
|
@@ -19985,6 +19985,7 @@ async function bundleFiles$1(config) {
|
|
|
19985
19985
|
platform: config.esbuild.platform ?? "node",
|
|
19986
19986
|
target: config.esbuild.target ?? "node18",
|
|
19987
19987
|
bundle: true,
|
|
19988
|
+
packages: "external",
|
|
19988
19989
|
format: "esm",
|
|
19989
19990
|
sourcemap: true,
|
|
19990
19991
|
minifyWhitespace: true,
|
|
@@ -20155,9 +20156,10 @@ async function bundleFiles(config) {
|
|
|
20155
20156
|
outfile: path$e.resolve(config.rootDir, config.buildDir, "bundle.js"),
|
|
20156
20157
|
format: "esm",
|
|
20157
20158
|
bundle: true,
|
|
20159
|
+
sourcemap: true,
|
|
20158
20160
|
target: "node18",
|
|
20159
20161
|
platform: "node",
|
|
20160
|
-
|
|
20162
|
+
packages: "external"
|
|
20161
20163
|
});
|
|
20162
20164
|
}
|
|
20163
20165
|
async function startDevServer(config) {
|
|
@@ -20169,10 +20171,18 @@ async function startDevServer(config) {
|
|
|
20169
20171
|
transpileFiles(config)
|
|
20170
20172
|
]);
|
|
20171
20173
|
await bundleFiles(config);
|
|
20172
|
-
await startListener(config, true);
|
|
20174
|
+
const listener = await startListener(config, true);
|
|
20173
20175
|
setTimeout(async () => {
|
|
20174
20176
|
await generateClients(config);
|
|
20175
20177
|
}, 1e3);
|
|
20178
|
+
const cleanExit = async () => {
|
|
20179
|
+
process.exit();
|
|
20180
|
+
};
|
|
20181
|
+
process.on("exit", async () => {
|
|
20182
|
+
await Promise.allSettled([listener.close(), fileWatcher?.close()]);
|
|
20183
|
+
});
|
|
20184
|
+
process.on("SIGINT", cleanExit);
|
|
20185
|
+
process.on("SIGTERM", cleanExit);
|
|
20176
20186
|
async function load(isRestart, reason) {
|
|
20177
20187
|
try {
|
|
20178
20188
|
if (fileWatcher) {
|
package/dist/codegen.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
const require$$0 = require('fs');
|
|
4
4
|
const prettier = require('prettier');
|
|
5
|
-
const app = require('./shared/arri.
|
|
6
|
-
const dart = require('./shared/arri.
|
|
5
|
+
const app = require('./shared/arri.8a065f92.cjs');
|
|
6
|
+
const dart = require('./shared/arri.edc9d295.cjs');
|
|
7
7
|
require('@sinclair/typebox');
|
|
8
8
|
require('h3');
|
|
9
9
|
require('@sinclair/typebox/errors');
|
package/dist/codegen.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as ClientGeneratorPlugin, G as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.
|
|
2
|
-
export { C as ClientGenerator, a7 as JsonSchemaArray, a3 as JsonSchemaComplexType, Y as JsonSchemaComplexTypeValues, aa as JsonSchemaEnum, a1 as JsonSchemaNullType, X as JsonSchemaNullTypeValues, a5 as JsonSchemaRecord, $ as JsonSchemaScalarType, W as JsonSchemaScalarTypeValues, Z as JsonSchemaType, _ as JsonSchemaTypeValue, a9 as JsonSchemaUint8Array, I as defineClientGeneratorPlugin, O as isApplicationDef, a8 as isJsonSchemaArray, ab as isJsonSchemaEnum, a2 as isJsonSchemaNullType, a4 as isJsonSchemaObject, a6 as isJsonSchemaRecord, a0 as isJsonSchemaScalarType, L as isProcedureDef, N as isServiceDef, K as normalizeWhitespace, V as removeDisallowedChars, U as setNestedObjectProperty, Q as unflattenObject, T as unflattenProcedures } from './shared/arri.
|
|
1
|
+
import { F as ClientGeneratorPlugin, G as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.a8159363.cjs';
|
|
2
|
+
export { C as ClientGenerator, a7 as JsonSchemaArray, a3 as JsonSchemaComplexType, Y as JsonSchemaComplexTypeValues, aa as JsonSchemaEnum, a1 as JsonSchemaNullType, X as JsonSchemaNullTypeValues, a5 as JsonSchemaRecord, $ as JsonSchemaScalarType, W as JsonSchemaScalarTypeValues, Z as JsonSchemaType, _ as JsonSchemaTypeValue, a9 as JsonSchemaUint8Array, I as defineClientGeneratorPlugin, O as isApplicationDef, a8 as isJsonSchemaArray, ab as isJsonSchemaEnum, a2 as isJsonSchemaNullType, a4 as isJsonSchemaObject, a6 as isJsonSchemaRecord, a0 as isJsonSchemaScalarType, L as isProcedureDef, N as isServiceDef, K as normalizeWhitespace, V as removeDisallowedChars, U as setNestedObjectProperty, Q as unflattenObject, T as unflattenProcedures } from './shared/arri.a8159363.cjs';
|
|
3
3
|
import '@sinclair/typebox';
|
|
4
4
|
import 'h3';
|
|
5
5
|
|
package/dist/codegen.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as ClientGeneratorPlugin, G as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.
|
|
2
|
-
export { C as ClientGenerator, a7 as JsonSchemaArray, a3 as JsonSchemaComplexType, Y as JsonSchemaComplexTypeValues, aa as JsonSchemaEnum, a1 as JsonSchemaNullType, X as JsonSchemaNullTypeValues, a5 as JsonSchemaRecord, $ as JsonSchemaScalarType, W as JsonSchemaScalarTypeValues, Z as JsonSchemaType, _ as JsonSchemaTypeValue, a9 as JsonSchemaUint8Array, I as defineClientGeneratorPlugin, O as isApplicationDef, a8 as isJsonSchemaArray, ab as isJsonSchemaEnum, a2 as isJsonSchemaNullType, a4 as isJsonSchemaObject, a6 as isJsonSchemaRecord, a0 as isJsonSchemaScalarType, L as isProcedureDef, N as isServiceDef, K as normalizeWhitespace, V as removeDisallowedChars, U as setNestedObjectProperty, Q as unflattenObject, T as unflattenProcedures } from './shared/arri.
|
|
1
|
+
import { F as ClientGeneratorPlugin, G as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.a8159363.mjs';
|
|
2
|
+
export { C as ClientGenerator, a7 as JsonSchemaArray, a3 as JsonSchemaComplexType, Y as JsonSchemaComplexTypeValues, aa as JsonSchemaEnum, a1 as JsonSchemaNullType, X as JsonSchemaNullTypeValues, a5 as JsonSchemaRecord, $ as JsonSchemaScalarType, W as JsonSchemaScalarTypeValues, Z as JsonSchemaType, _ as JsonSchemaTypeValue, a9 as JsonSchemaUint8Array, I as defineClientGeneratorPlugin, O as isApplicationDef, a8 as isJsonSchemaArray, ab as isJsonSchemaEnum, a2 as isJsonSchemaNullType, a4 as isJsonSchemaObject, a6 as isJsonSchemaRecord, a0 as isJsonSchemaScalarType, L as isProcedureDef, N as isServiceDef, K as normalizeWhitespace, V as removeDisallowedChars, U as setNestedObjectProperty, Q as unflattenObject, T as unflattenProcedures } from './shared/arri.a8159363.mjs';
|
|
3
3
|
import '@sinclair/typebox';
|
|
4
4
|
import 'h3';
|
|
5
5
|
|
package/dist/codegen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as ClientGeneratorPlugin, G as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.
|
|
2
|
-
export { C as ClientGenerator, a7 as JsonSchemaArray, a3 as JsonSchemaComplexType, Y as JsonSchemaComplexTypeValues, aa as JsonSchemaEnum, a1 as JsonSchemaNullType, X as JsonSchemaNullTypeValues, a5 as JsonSchemaRecord, $ as JsonSchemaScalarType, W as JsonSchemaScalarTypeValues, Z as JsonSchemaType, _ as JsonSchemaTypeValue, a9 as JsonSchemaUint8Array, I as defineClientGeneratorPlugin, O as isApplicationDef, a8 as isJsonSchemaArray, ab as isJsonSchemaEnum, a2 as isJsonSchemaNullType, a4 as isJsonSchemaObject, a6 as isJsonSchemaRecord, a0 as isJsonSchemaScalarType, L as isProcedureDef, N as isServiceDef, K as normalizeWhitespace, V as removeDisallowedChars, U as setNestedObjectProperty, Q as unflattenObject, T as unflattenProcedures } from './shared/arri.
|
|
1
|
+
import { F as ClientGeneratorPlugin, G as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.a8159363.js';
|
|
2
|
+
export { C as ClientGenerator, a7 as JsonSchemaArray, a3 as JsonSchemaComplexType, Y as JsonSchemaComplexTypeValues, aa as JsonSchemaEnum, a1 as JsonSchemaNullType, X as JsonSchemaNullTypeValues, a5 as JsonSchemaRecord, $ as JsonSchemaScalarType, W as JsonSchemaScalarTypeValues, Z as JsonSchemaType, _ as JsonSchemaTypeValue, a9 as JsonSchemaUint8Array, I as defineClientGeneratorPlugin, O as isApplicationDef, a8 as isJsonSchemaArray, ab as isJsonSchemaEnum, a2 as isJsonSchemaNullType, a4 as isJsonSchemaObject, a6 as isJsonSchemaRecord, a0 as isJsonSchemaScalarType, L as isProcedureDef, N as isServiceDef, K as normalizeWhitespace, V as removeDisallowedChars, U as setNestedObjectProperty, Q as unflattenObject, T as unflattenProcedures } from './shared/arri.a8159363.js';
|
|
3
3
|
import '@sinclair/typebox';
|
|
4
4
|
import 'h3';
|
|
5
5
|
|
package/dist/codegen.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { writeFileSync } from 'fs';
|
|
2
2
|
import { format } from 'prettier';
|
|
3
|
-
import { u as unflattenObject, i as isServiceDef, p as pascalCase, a as isProcedureDef, b as isJsonSchemaScalarType, c as isJsonSchemaNullType, d as isJsonSchemaObject, e as isJsonSchemaRecord, f as isJsonSchemaEnum, g as isJsonSchemaArray, h as unflattenProcedures, j as camelCase } from './shared/arri.
|
|
4
|
-
export { m as JsonSchemaComplexTypeValues, l as JsonSchemaNullTypeValues, J as JsonSchemaScalarTypeValues, k as isApplicationDef, n as normalizeWhitespace, r as removeDisallowedChars, s as setNestedObjectProperty } from './shared/arri.
|
|
5
|
-
import { d as defineClientGeneratorPlugin } from './shared/arri.
|
|
6
|
-
export { j as classListTransformer, i as classTransformer, c as createDartClient, a as dartClientGenerator, f as dartModelFromJsonSchema, h as dartParsedJsonField, e as dartProcedureFromServiceDefinition, g as dartPropertyTypeFromSchema, b as dartServiceFromServiceDefinition, k as isDartType, l as isDartTypeWithNullables, t as transformers } from './shared/arri.
|
|
3
|
+
import { u as unflattenObject, i as isServiceDef, p as pascalCase, a as isProcedureDef, b as isJsonSchemaScalarType, c as isJsonSchemaNullType, d as isJsonSchemaObject, e as isJsonSchemaRecord, f as isJsonSchemaEnum, g as isJsonSchemaArray, h as unflattenProcedures, j as camelCase } from './shared/arri.f1c922a6.mjs';
|
|
4
|
+
export { m as JsonSchemaComplexTypeValues, l as JsonSchemaNullTypeValues, J as JsonSchemaScalarTypeValues, k as isApplicationDef, n as normalizeWhitespace, r as removeDisallowedChars, s as setNestedObjectProperty } from './shared/arri.f1c922a6.mjs';
|
|
5
|
+
import { d as defineClientGeneratorPlugin } from './shared/arri.1a30c6b5.mjs';
|
|
6
|
+
export { j as classListTransformer, i as classTransformer, c as createDartClient, a as dartClientGenerator, f as dartModelFromJsonSchema, h as dartParsedJsonField, e as dartProcedureFromServiceDefinition, g as dartPropertyTypeFromSchema, b as dartServiceFromServiceDefinition, k as isDartType, l as isDartTypeWithNullables, t as transformers } from './shared/arri.1a30c6b5.mjs';
|
|
7
7
|
import '@sinclair/typebox';
|
|
8
8
|
import 'h3';
|
|
9
9
|
import '@sinclair/typebox/errors';
|
package/dist/index.cjs
CHANGED
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RpcHandlerContext, a as RouteHandlerContext, A as ArriOptions, C as ClientGenerator } from './shared/arri.
|
|
2
|
-
export { c as Arri, f as ArriProcedure, e as ArriProcedureBase, j as ArriProcedureHandler, k as ArriProcedurePostHandler, t as ArriRoute, x as ArriRouteHandler, z as ArriRoutePostHandler, b as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ExtractParam, w as ExtractParams, g as HandlerContext, d as HttpMethod, H as HttpMethodValues, M as Middleware, y as RoutePostHandlerContext, h as RpcPostHandlerContext, n as createRpcDefinition, v as defineMiddleware, u as defineRoute, m as defineRpc, q as getRpcParamDefinition, p as getRpcParamName, o as getRpcPath, r as getRpcResponseName, i as isHttpMethod, l as isRpc, B as registerRoute, s as registerRpc } from './shared/arri.
|
|
1
|
+
import { R as RpcHandlerContext, a as RouteHandlerContext, A as ArriOptions, C as ClientGenerator } from './shared/arri.a8159363.cjs';
|
|
2
|
+
export { c as Arri, f as ArriProcedure, e as ArriProcedureBase, j as ArriProcedureHandler, k as ArriProcedurePostHandler, t as ArriRoute, x as ArriRouteHandler, z as ArriRoutePostHandler, b as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ExtractParam, w as ExtractParams, g as HandlerContext, d as HttpMethod, H as HttpMethodValues, M as Middleware, y as RoutePostHandlerContext, h as RpcPostHandlerContext, n as createRpcDefinition, v as defineMiddleware, u as defineRoute, m as defineRpc, q as getRpcParamDefinition, p as getRpcParamName, o as getRpcPath, r as getRpcResponseName, i as isHttpMethod, l as isRpc, B as registerRoute, s as registerRpc } from './shared/arri.a8159363.cjs';
|
|
3
3
|
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
4
4
|
import { Static } from '@sinclair/typebox';
|
|
5
5
|
import { ValueError } from '@sinclair/typebox/errors';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RpcHandlerContext, a as RouteHandlerContext, A as ArriOptions, C as ClientGenerator } from './shared/arri.
|
|
2
|
-
export { c as Arri, f as ArriProcedure, e as ArriProcedureBase, j as ArriProcedureHandler, k as ArriProcedurePostHandler, t as ArriRoute, x as ArriRouteHandler, z as ArriRoutePostHandler, b as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ExtractParam, w as ExtractParams, g as HandlerContext, d as HttpMethod, H as HttpMethodValues, M as Middleware, y as RoutePostHandlerContext, h as RpcPostHandlerContext, n as createRpcDefinition, v as defineMiddleware, u as defineRoute, m as defineRpc, q as getRpcParamDefinition, p as getRpcParamName, o as getRpcPath, r as getRpcResponseName, i as isHttpMethod, l as isRpc, B as registerRoute, s as registerRpc } from './shared/arri.
|
|
1
|
+
import { R as RpcHandlerContext, a as RouteHandlerContext, A as ArriOptions, C as ClientGenerator } from './shared/arri.a8159363.mjs';
|
|
2
|
+
export { c as Arri, f as ArriProcedure, e as ArriProcedureBase, j as ArriProcedureHandler, k as ArriProcedurePostHandler, t as ArriRoute, x as ArriRouteHandler, z as ArriRoutePostHandler, b as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ExtractParam, w as ExtractParams, g as HandlerContext, d as HttpMethod, H as HttpMethodValues, M as Middleware, y as RoutePostHandlerContext, h as RpcPostHandlerContext, n as createRpcDefinition, v as defineMiddleware, u as defineRoute, m as defineRpc, q as getRpcParamDefinition, p as getRpcParamName, o as getRpcPath, r as getRpcResponseName, i as isHttpMethod, l as isRpc, B as registerRoute, s as registerRpc } from './shared/arri.a8159363.mjs';
|
|
3
3
|
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
4
4
|
import { Static } from '@sinclair/typebox';
|
|
5
5
|
import { ValueError } from '@sinclair/typebox/errors';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RpcHandlerContext, a as RouteHandlerContext, A as ArriOptions, C as ClientGenerator } from './shared/arri.
|
|
2
|
-
export { c as Arri, f as ArriProcedure, e as ArriProcedureBase, j as ArriProcedureHandler, k as ArriProcedurePostHandler, t as ArriRoute, x as ArriRouteHandler, z as ArriRoutePostHandler, b as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ExtractParam, w as ExtractParams, g as HandlerContext, d as HttpMethod, H as HttpMethodValues, M as Middleware, y as RoutePostHandlerContext, h as RpcPostHandlerContext, n as createRpcDefinition, v as defineMiddleware, u as defineRoute, m as defineRpc, q as getRpcParamDefinition, p as getRpcParamName, o as getRpcPath, r as getRpcResponseName, i as isHttpMethod, l as isRpc, B as registerRoute, s as registerRpc } from './shared/arri.
|
|
1
|
+
import { R as RpcHandlerContext, a as RouteHandlerContext, A as ArriOptions, C as ClientGenerator } from './shared/arri.a8159363.js';
|
|
2
|
+
export { c as Arri, f as ArriProcedure, e as ArriProcedureBase, j as ArriProcedureHandler, k as ArriProcedurePostHandler, t as ArriRoute, x as ArriRouteHandler, z as ArriRoutePostHandler, b as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ExtractParam, w as ExtractParams, g as HandlerContext, d as HttpMethod, H as HttpMethodValues, M as Middleware, y as RoutePostHandlerContext, h as RpcPostHandlerContext, n as createRpcDefinition, v as defineMiddleware, u as defineRoute, m as defineRpc, q as getRpcParamDefinition, p as getRpcParamName, o as getRpcPath, r as getRpcResponseName, i as isHttpMethod, l as isRpc, B as registerRoute, s as registerRpc } from './shared/arri.a8159363.js';
|
|
3
3
|
import * as _sinclair_typebox from '@sinclair/typebox';
|
|
4
4
|
import { Static } from '@sinclair/typebox';
|
|
5
5
|
import { ValueError } from '@sinclair/typebox/errors';
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Arri, D as DEV_DEFINITION_ENDPOINT, q as DEV_ENDPOINT_ROOT, K as ErrorResponse, H as HttpMethodValues, x as createRpcDefinition, L as defineError, G as defineMiddleware, F as defineRoute, w as defineRpc, M as errorResponseFromValidationErrors, B as getRpcParamDefinition, z as getRpcParamName, y as getRpcPath, C as getRpcResponseName, N as handleH3Error, t as isHttpMethod, v as isRpc, I as registerRoute, E as registerRpc } from './shared/arri.
|
|
1
|
+
export { A as Arri, D as DEV_DEFINITION_ENDPOINT, q as DEV_ENDPOINT_ROOT, K as ErrorResponse, H as HttpMethodValues, x as createRpcDefinition, L as defineError, G as defineMiddleware, F as defineRoute, w as defineRpc, M as errorResponseFromValidationErrors, B as getRpcParamDefinition, z as getRpcParamName, y as getRpcPath, C as getRpcResponseName, N as handleH3Error, t as isHttpMethod, v as isRpc, I as registerRoute, E as registerRpc } from './shared/arri.f1c922a6.mjs';
|
|
2
2
|
import '@sinclair/typebox';
|
|
3
3
|
import 'h3';
|
|
4
4
|
import '@sinclair/typebox/errors';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { execSync } from 'child_process';
|
|
2
2
|
import { writeFileSync } from 'fs';
|
|
3
|
-
import { h as unflattenProcedures, i as isServiceDef, p as pascalCase, j as camelCase, a as isProcedureDef, d as isJsonSchemaObject, f as isJsonSchemaEnum, c as isJsonSchemaNullType, b as isJsonSchemaScalarType, e as isJsonSchemaRecord, g as isJsonSchemaArray } from './arri.
|
|
3
|
+
import { h as unflattenProcedures, i as isServiceDef, p as pascalCase, j as camelCase, a as isProcedureDef, d as isJsonSchemaObject, f as isJsonSchemaEnum, c as isJsonSchemaNullType, b as isJsonSchemaScalarType, e as isJsonSchemaRecord, g as isJsonSchemaArray } from './arri.f1c922a6.mjs';
|
|
4
4
|
|
|
5
5
|
function defineClientGeneratorPlugin(plugin) {
|
|
6
6
|
return plugin;
|
|
@@ -679,7 +679,7 @@ function registerRoute(router, route, middleware, prefix, opts) {
|
|
|
679
679
|
if (route.query) {
|
|
680
680
|
const result = await h3.getValidatedQuery(
|
|
681
681
|
event,
|
|
682
|
-
typeboxSafeValidate(route.query)
|
|
682
|
+
typeboxSafeValidate(route.query, true)
|
|
683
683
|
);
|
|
684
684
|
if (!result.success) {
|
|
685
685
|
throw errorResponseFromValidationErrors(
|
|
@@ -722,6 +722,9 @@ function registerRoute(router, route, middleware, prefix, opts) {
|
|
|
722
722
|
} catch (err) {
|
|
723
723
|
await handleH3Error(err, context, event, opts?.onError);
|
|
724
724
|
}
|
|
725
|
+
if (!event.handled) {
|
|
726
|
+
await h3.send(event, "");
|
|
727
|
+
}
|
|
725
728
|
return "";
|
|
726
729
|
});
|
|
727
730
|
const finalPath = (prefix ? `/${prefix}${route.path}` : route.path).split("//").join("/");
|
|
@@ -97,7 +97,7 @@ interface ArriRoute<TPath extends string, TMethod extends HttpMethod, TQuery ext
|
|
|
97
97
|
query?: TQuery;
|
|
98
98
|
body?: TBody;
|
|
99
99
|
response?: TResponse;
|
|
100
|
-
handler: ArriRouteHandler<TPath, TQuery extends TObject ? Static<TQuery> : undefined, TBody extends
|
|
100
|
+
handler: ArriRouteHandler<TPath, TQuery extends TObject ? Static<TQuery> : undefined, TBody extends TSchema ? Static<TBody> : undefined, TResponse extends TSchema ? Static<TResponse> : TFallbackResponse>;
|
|
101
101
|
postHandler?: ArriRoutePostHandler<TPath, TQuery extends TObject ? Static<TQuery> : undefined, TBody extends TObject ? Static<TObject> : undefined, TResponse extends TSchema ? Static<TResponse> : TFallbackResponse>;
|
|
102
102
|
}
|
|
103
103
|
declare function defineRoute<TPath extends string, TMethod extends HttpMethod, TQuery extends TObject | undefined = any, TBody extends TSchema | undefined = any, TResponse extends TSchema | undefined = undefined, TFallbackResponse = any>(config: ArriRoute<TPath, TMethod, TQuery, TBody, TResponse, TFallbackResponse>): ArriRoute<TPath, TMethod, TQuery, TBody, TResponse, TFallbackResponse>;
|
|
@@ -97,7 +97,7 @@ interface ArriRoute<TPath extends string, TMethod extends HttpMethod, TQuery ext
|
|
|
97
97
|
query?: TQuery;
|
|
98
98
|
body?: TBody;
|
|
99
99
|
response?: TResponse;
|
|
100
|
-
handler: ArriRouteHandler<TPath, TQuery extends TObject ? Static<TQuery> : undefined, TBody extends
|
|
100
|
+
handler: ArriRouteHandler<TPath, TQuery extends TObject ? Static<TQuery> : undefined, TBody extends TSchema ? Static<TBody> : undefined, TResponse extends TSchema ? Static<TResponse> : TFallbackResponse>;
|
|
101
101
|
postHandler?: ArriRoutePostHandler<TPath, TQuery extends TObject ? Static<TQuery> : undefined, TBody extends TObject ? Static<TObject> : undefined, TResponse extends TSchema ? Static<TResponse> : TFallbackResponse>;
|
|
102
102
|
}
|
|
103
103
|
declare function defineRoute<TPath extends string, TMethod extends HttpMethod, TQuery extends TObject | undefined = any, TBody extends TSchema | undefined = any, TResponse extends TSchema | undefined = undefined, TFallbackResponse = any>(config: ArriRoute<TPath, TMethod, TQuery, TBody, TResponse, TFallbackResponse>): ArriRoute<TPath, TMethod, TQuery, TBody, TResponse, TFallbackResponse>;
|
|
@@ -97,7 +97,7 @@ interface ArriRoute<TPath extends string, TMethod extends HttpMethod, TQuery ext
|
|
|
97
97
|
query?: TQuery;
|
|
98
98
|
body?: TBody;
|
|
99
99
|
response?: TResponse;
|
|
100
|
-
handler: ArriRouteHandler<TPath, TQuery extends TObject ? Static<TQuery> : undefined, TBody extends
|
|
100
|
+
handler: ArriRouteHandler<TPath, TQuery extends TObject ? Static<TQuery> : undefined, TBody extends TSchema ? Static<TBody> : undefined, TResponse extends TSchema ? Static<TResponse> : TFallbackResponse>;
|
|
101
101
|
postHandler?: ArriRoutePostHandler<TPath, TQuery extends TObject ? Static<TQuery> : undefined, TBody extends TObject ? Static<TObject> : undefined, TResponse extends TSchema ? Static<TResponse> : TFallbackResponse>;
|
|
102
102
|
}
|
|
103
103
|
declare function defineRoute<TPath extends string, TMethod extends HttpMethod, TQuery extends TObject | undefined = any, TBody extends TSchema | undefined = any, TResponse extends TSchema | undefined = undefined, TFallbackResponse = any>(config: ArriRoute<TPath, TMethod, TQuery, TBody, TResponse, TFallbackResponse>): ArriRoute<TPath, TMethod, TQuery, TBody, TResponse, TFallbackResponse>;
|
|
@@ -677,7 +677,7 @@ function registerRoute(router, route, middleware, prefix, opts) {
|
|
|
677
677
|
if (route.query) {
|
|
678
678
|
const result = await getValidatedQuery(
|
|
679
679
|
event,
|
|
680
|
-
typeboxSafeValidate(route.query)
|
|
680
|
+
typeboxSafeValidate(route.query, true)
|
|
681
681
|
);
|
|
682
682
|
if (!result.success) {
|
|
683
683
|
throw errorResponseFromValidationErrors(
|
|
@@ -720,6 +720,9 @@ function registerRoute(router, route, middleware, prefix, opts) {
|
|
|
720
720
|
} catch (err) {
|
|
721
721
|
await handleH3Error(err, context, event, opts?.onError);
|
|
722
722
|
}
|
|
723
|
+
if (!event.handled) {
|
|
724
|
+
await send(event, "");
|
|
725
|
+
}
|
|
723
726
|
return "";
|
|
724
727
|
});
|
|
725
728
|
const finalPath = (prefix ? `/${prefix}${route.path}` : route.path).split("//").join("/");
|