arri 0.0.33 → 0.0.35

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.
@@ -35,14 +35,14 @@ require('node:v8');
35
35
  require('consola');
36
36
  require('esbuild');
37
37
  require('prettier');
38
- require('../shared/arri.a83bc214.cjs');
38
+ require('../shared/arri.e56456d6.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.aace9c55.cjs');
45
+ require('../shared/arri.ac3dd4d8.cjs');
46
46
  require('child_process');
47
47
  require('listhen');
48
48
 
@@ -33,14 +33,14 @@ import 'node:v8';
33
33
  import 'consola';
34
34
  import 'esbuild';
35
35
  import 'prettier';
36
- import '../shared/arri.76f7a6f9.mjs';
36
+ import '../shared/arri.ae86cc80.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.984c232f.mjs';
43
+ import '../shared/arri.6beaa946.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.a83bc214.cjs');
28
+ const app = require('./shared/arri.e56456d6.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.aace9c55.cjs');
36
+ const dart = require('./shared/arri.ac3dd4d8.cjs');
37
37
  const listhen = require('listhen');
38
38
  require('child_process');
39
39
 
@@ -20011,8 +20011,7 @@ async function bundleFiles$1(config) {
20011
20011
  minifyWhitespace: true,
20012
20012
  banner: {
20013
20013
  js: `import { createRequire as topLevelCreateRequire } from 'module';
20014
- const require = topLevelCreateRequire(import.meta.url);
20015
- const __dirname = new URL(".", import.meta.url).pathname;`
20014
+ const require = topLevelCreateRequire(import.meta.url);`
20016
20015
  },
20017
20016
  outdir: path__default$1.resolve(config.rootDir, ".output")
20018
20017
  });
@@ -20153,13 +20152,13 @@ const dev = citty.defineCommand({
20153
20152
  },
20154
20153
  async run({ args }) {
20155
20154
  process.env.ARRI_DEV_MODE = "true";
20156
- const config = await loadConfig({
20155
+ const { config } = await loadConfig({
20157
20156
  configFile: path__default$1.resolve(args.config)
20158
20157
  });
20159
20158
  if (!config) {
20160
20159
  throw new Error("Unable to find config");
20161
20160
  }
20162
- await startDevServer(config.config);
20161
+ await startDevServer(config);
20163
20162
  }
20164
20163
  });
20165
20164
  const startListener = (config, showQr = false) => listhen.listenAndWatch(path__default$1.resolve(config.rootDir, config.buildDir, "bundle.js"), {
@@ -20178,7 +20177,8 @@ async function bundleFiles(config) {
20178
20177
  format: "esm",
20179
20178
  bundle: true,
20180
20179
  target: "node18",
20181
- platform: "node"
20180
+ platform: "node",
20181
+ sourcemap: true
20182
20182
  });
20183
20183
  }
20184
20184
  async function startDevServer(config) {
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.76f7a6f9.mjs';
26
+ import { j as camelCase, r as removeDisallowedChars, o as kebabCase, k as isApplicationDef, D as DEV_DEFINITION_ENDPOINT } from './shared/arri.ae86cc80.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.984c232f.mjs';
34
+ import { a as dartClientGenerator } from './shared/arri.6beaa946.mjs';
35
35
  import { listenAndWatch } from 'listhen';
36
36
  import 'child_process';
37
37
 
@@ -19990,8 +19990,7 @@ async function bundleFiles$1(config) {
19990
19990
  minifyWhitespace: true,
19991
19991
  banner: {
19992
19992
  js: `import { createRequire as topLevelCreateRequire } from 'module';
19993
- const require = topLevelCreateRequire(import.meta.url);
19994
- const __dirname = new URL(".", import.meta.url).pathname;`
19993
+ const require = topLevelCreateRequire(import.meta.url);`
19995
19994
  },
19996
19995
  outdir: path$e.resolve(config.rootDir, ".output")
19997
19996
  });
@@ -20132,13 +20131,13 @@ const dev = defineCommand({
20132
20131
  },
20133
20132
  async run({ args }) {
20134
20133
  process.env.ARRI_DEV_MODE = "true";
20135
- const config = await loadConfig({
20134
+ const { config } = await loadConfig({
20136
20135
  configFile: path$e.resolve(args.config)
20137
20136
  });
20138
20137
  if (!config) {
20139
20138
  throw new Error("Unable to find config");
20140
20139
  }
20141
- await startDevServer(config.config);
20140
+ await startDevServer(config);
20142
20141
  }
20143
20142
  });
20144
20143
  const startListener = (config, showQr = false) => listenAndWatch(path$e.resolve(config.rootDir, config.buildDir, "bundle.js"), {
@@ -20157,7 +20156,8 @@ async function bundleFiles(config) {
20157
20156
  format: "esm",
20158
20157
  bundle: true,
20159
20158
  target: "node18",
20160
- platform: "node"
20159
+ platform: "node",
20160
+ sourcemap: true
20161
20161
  });
20162
20162
  }
20163
20163
  async function startDevServer(config) {
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.a83bc214.cjs');
6
- const dart = require('./shared/arri.aace9c55.cjs');
5
+ const app = require('./shared/arri.e56456d6.cjs');
6
+ const dart = require('./shared/arri.ac3dd4d8.cjs');
7
7
  require('@sinclair/typebox');
8
8
  require('h3');
9
9
  require('@sinclair/typebox/errors');
@@ -1,5 +1,5 @@
1
- import { F as ClientGeneratorPlugin, G as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.36bc8896.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.36bc8896.cjs';
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
 
@@ -1,5 +1,5 @@
1
- import { F as ClientGeneratorPlugin, G as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.36bc8896.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.36bc8896.mjs';
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.36bc8896.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.36bc8896.js';
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.76f7a6f9.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.76f7a6f9.mjs';
5
- import { d as defineClientGeneratorPlugin } from './shared/arri.984c232f.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.984c232f.mjs';
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.ae86cc80.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.ae86cc80.mjs';
5
+ import { d as defineClientGeneratorPlugin } from './shared/arri.6beaa946.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.6beaa946.mjs';
7
7
  import '@sinclair/typebox';
8
8
  import 'h3';
9
9
  import '@sinclair/typebox/errors';
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const app = require('./shared/arri.a83bc214.cjs');
3
+ const app = require('./shared/arri.e56456d6.cjs');
4
4
  require('@sinclair/typebox');
5
5
  require('h3');
6
6
  require('@sinclair/typebox/errors');
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.36bc8896.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.36bc8896.cjs';
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.36bc8896.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.36bc8896.mjs';
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.36bc8896.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.36bc8896.js';
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.76f7a6f9.mjs';
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.ae86cc80.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.76f7a6f9.mjs';
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.ae86cc80.mjs';
4
4
 
5
5
  function defineClientGeneratorPlugin(plugin) {
6
6
  return plugin;
@@ -1,5 +1,5 @@
1
1
  import { TObject, TSchema, Static } from '@sinclair/typebox';
2
- import { H3Event, Router, H3Error } from 'h3';
2
+ import { H3Event, Router, App, H3Error } from 'h3';
3
3
 
4
4
  interface ApplicationDef {
5
5
  arriSchemaVersion: "0.0.1";
@@ -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 TObject ? Static<TObject> : undefined, TResponse extends TSchema ? Static<TResponse> : TFallbackResponse>;
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>;
@@ -172,7 +172,7 @@ declare class Arri {
172
172
  registerRpc<TParams extends TObject | undefined, TResponse extends TObject | undefined>(name: string, procedure: ArriProcedure<TParams, TResponse>): void;
173
173
  registerRoute<TPath extends string, TMethod extends HttpMethod = HttpMethod, TQuery extends TObject | undefined = undefined, TBody extends TSchema | undefined = undefined, TResponse extends TSchema | undefined = undefined, TFallbackResponse = any>(route: ArriRoute<TPath, TMethod, TQuery, TBody, TResponse, TFallbackResponse>): void;
174
174
  getAppDefinition(): ApplicationDef;
175
- getH3Instance(): void;
175
+ getH3Instance(): App;
176
176
  }
177
177
  interface ArriOptions {
178
178
  debug?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { TObject, TSchema, Static } from '@sinclair/typebox';
2
- import { H3Event, Router, H3Error } from 'h3';
2
+ import { H3Event, Router, App, H3Error } from 'h3';
3
3
 
4
4
  interface ApplicationDef {
5
5
  arriSchemaVersion: "0.0.1";
@@ -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 TObject ? Static<TObject> : undefined, TResponse extends TSchema ? Static<TResponse> : TFallbackResponse>;
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>;
@@ -172,7 +172,7 @@ declare class Arri {
172
172
  registerRpc<TParams extends TObject | undefined, TResponse extends TObject | undefined>(name: string, procedure: ArriProcedure<TParams, TResponse>): void;
173
173
  registerRoute<TPath extends string, TMethod extends HttpMethod = HttpMethod, TQuery extends TObject | undefined = undefined, TBody extends TSchema | undefined = undefined, TResponse extends TSchema | undefined = undefined, TFallbackResponse = any>(route: ArriRoute<TPath, TMethod, TQuery, TBody, TResponse, TFallbackResponse>): void;
174
174
  getAppDefinition(): ApplicationDef;
175
- getH3Instance(): void;
175
+ getH3Instance(): App;
176
176
  }
177
177
  interface ArriOptions {
178
178
  debug?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { TObject, TSchema, Static } from '@sinclair/typebox';
2
- import { H3Event, Router, H3Error } from 'h3';
2
+ import { H3Event, Router, App, H3Error } from 'h3';
3
3
 
4
4
  interface ApplicationDef {
5
5
  arriSchemaVersion: "0.0.1";
@@ -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 TObject ? Static<TObject> : undefined, TResponse extends TSchema ? Static<TResponse> : TFallbackResponse>;
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>;
@@ -172,7 +172,7 @@ declare class Arri {
172
172
  registerRpc<TParams extends TObject | undefined, TResponse extends TObject | undefined>(name: string, procedure: ArriProcedure<TParams, TResponse>): void;
173
173
  registerRoute<TPath extends string, TMethod extends HttpMethod = HttpMethod, TQuery extends TObject | undefined = undefined, TBody extends TSchema | undefined = undefined, TResponse extends TSchema | undefined = undefined, TFallbackResponse = any>(route: ArriRoute<TPath, TMethod, TQuery, TBody, TResponse, TFallbackResponse>): void;
174
174
  getAppDefinition(): ApplicationDef;
175
- getH3Instance(): void;
175
+ getH3Instance(): App;
176
176
  }
177
177
  interface ArriOptions {
178
178
  debug?: boolean;
@@ -2,7 +2,7 @@
2
2
 
3
3
  const child_process = require('child_process');
4
4
  const require$$0 = require('fs');
5
- const app = require('./arri.a83bc214.cjs');
5
+ const app = require('./arri.e56456d6.cjs');
6
6
 
7
7
  function defineClientGeneratorPlugin(plugin) {
8
8
  return plugin;
@@ -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(
@@ -869,6 +869,7 @@ class Arri {
869
869
  return appDef;
870
870
  }
871
871
  getH3Instance() {
872
+ return this.h3App;
872
873
  }
873
874
  }
874
875
  const HttpMethodValues = [
@@ -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(
@@ -871,6 +871,7 @@ class Arri {
871
871
  return appDef;
872
872
  }
873
873
  getH3Instance() {
874
+ return this.h3App;
874
875
  }
875
876
  }
876
877
  const HttpMethodValues = [
package/package.json CHANGED
@@ -23,9 +23,9 @@
23
23
  "consola": "^3.2.3",
24
24
  "ofetch": "^1.3.3",
25
25
  "chokidar": "^3.5.3",
26
- "listhen": "^1.4.4"
26
+ "listhen": "^1.4.7"
27
27
  },
28
- "version": "0.0.33",
28
+ "version": "0.0.35",
29
29
  "repository": {
30
30
  "url": "https://github.com/modiimedia/arri"
31
31
  }