arri 0.0.26 → 0.0.28

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.38792eb4.cjs');
38
+ require('../shared/arri.198ae3ea.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.12a51234.cjs');
45
+ require('../shared/arri.2826746b.cjs');
46
46
  require('child_process');
47
47
  require('listhen');
48
48
 
@@ -3819,14 +3819,26 @@ const Pack = warner$1(class Pack extends Minipass {
3819
3819
 
3820
3820
  this.portable = !!opt.portable;
3821
3821
  this.zip = null;
3822
- if (opt.gzip) {
3823
- if (typeof opt.gzip !== 'object') {
3824
- opt.gzip = {};
3822
+
3823
+ if (opt.gzip || opt.brotli) {
3824
+ if (opt.gzip && opt.brotli) {
3825
+ throw new TypeError('gzip and brotli are mutually exclusive')
3826
+ }
3827
+ if (opt.gzip) {
3828
+ if (typeof opt.gzip !== 'object') {
3829
+ opt.gzip = {};
3830
+ }
3831
+ if (this.portable) {
3832
+ opt.gzip.portable = true;
3833
+ }
3834
+ this.zip = new zlib$1.Gzip(opt.gzip);
3825
3835
  }
3826
- if (this.portable) {
3827
- opt.gzip.portable = true;
3836
+ if (opt.brotli) {
3837
+ if (typeof opt.brotli !== 'object') {
3838
+ opt.brotli = {};
3839
+ }
3840
+ this.zip = new zlib$1.BrotliCompress(opt.brotli);
3828
3841
  }
3829
- this.zip = new zlib$1.Gzip(opt.gzip);
3830
3842
  this.zip.on('data', chunk => super.write(chunk));
3831
3843
  this.zip.on('end', _ => super.end());
3832
3844
  this.zip.on('drain', _ => this[ONDRAIN]());
@@ -4678,6 +4690,16 @@ var parse$1 = warner(class Parser extends EE {
4678
4690
  this.strict = !!opt.strict;
4679
4691
  this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize;
4680
4692
  this.filter = typeof opt.filter === 'function' ? opt.filter : noop;
4693
+ // Unlike gzip, brotli doesn't have any magic bytes to identify it
4694
+ // Users need to explicitly tell us they're extracting a brotli file
4695
+ // Or we infer from the file extension
4696
+ const isTBR = (opt.file && (
4697
+ opt.file.endsWith('.tar.br') || opt.file.endsWith('.tbr')));
4698
+ // if it's a tbr file it MIGHT be brotli, but we don't know until
4699
+ // we look at it and verify it's not a valid tar file.
4700
+ this.brotli = !opt.gzip && opt.brotli !== undefined ? opt.brotli
4701
+ : isTBR ? undefined
4702
+ : false;
4681
4703
 
4682
4704
  // have to set this so that streams are ok piping into it
4683
4705
  this.writable = true;
@@ -4928,7 +4950,9 @@ var parse$1 = warner(class Parser extends EE {
4928
4950
  }
4929
4951
 
4930
4952
  // first write, might be gzipped
4931
- if (this[UNZIP] === null && chunk) {
4953
+ const needSniff = this[UNZIP] === null ||
4954
+ this.brotli === undefined && this[UNZIP] === false;
4955
+ if (needSniff && chunk) {
4932
4956
  if (this[BUFFER]) {
4933
4957
  chunk = Buffer.concat([this[BUFFER], chunk]);
4934
4958
  this[BUFFER] = null;
@@ -4937,15 +4961,45 @@ var parse$1 = warner(class Parser extends EE {
4937
4961
  this[BUFFER] = chunk;
4938
4962
  return true
4939
4963
  }
4964
+
4965
+ // look for gzip header
4940
4966
  for (let i = 0; this[UNZIP] === null && i < gzipHeader.length; i++) {
4941
4967
  if (chunk[i] !== gzipHeader[i]) {
4942
4968
  this[UNZIP] = false;
4943
4969
  }
4944
4970
  }
4945
- if (this[UNZIP] === null) {
4971
+
4972
+ const maybeBrotli = this.brotli === undefined;
4973
+ if (this[UNZIP] === false && maybeBrotli) {
4974
+ // read the first header to see if it's a valid tar file. If so,
4975
+ // we can safely assume that it's not actually brotli, despite the
4976
+ // .tbr or .tar.br file extension.
4977
+ // if we ended before getting a full chunk, yes, def brotli
4978
+ if (chunk.length < 512) {
4979
+ if (this[ENDED$1]) {
4980
+ this.brotli = true;
4981
+ } else {
4982
+ this[BUFFER] = chunk;
4983
+ return true
4984
+ }
4985
+ } else {
4986
+ // if it's tar, it's pretty reliably not brotli, chances of
4987
+ // that happening are astronomical.
4988
+ try {
4989
+ new Header(chunk.slice(0, 512));
4990
+ this.brotli = false;
4991
+ } catch (_) {
4992
+ this.brotli = true;
4993
+ }
4994
+ }
4995
+ }
4996
+
4997
+ if (this[UNZIP] === null || (this[UNZIP] === false && this.brotli)) {
4946
4998
  const ended = this[ENDED$1];
4947
4999
  this[ENDED$1] = false;
4948
- this[UNZIP] = new zlib.Unzip();
5000
+ this[UNZIP] = this[UNZIP] === null
5001
+ ? new zlib.Unzip()
5002
+ : new zlib.BrotliDecompress();
4949
5003
  this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk));
4950
5004
  this[UNZIP].on('error', er => this.abort(er));
4951
5005
  this[UNZIP].on('end', _ => {
@@ -5083,6 +5137,7 @@ var parse$1 = warner(class Parser extends EE {
5083
5137
  this[UNZIP].end(chunk);
5084
5138
  } else {
5085
5139
  this[ENDED$1] = true;
5140
+ if (this.brotli === undefined) chunk = chunk || Buffer.alloc(0);
5086
5141
  this.write(chunk);
5087
5142
  }
5088
5143
  }
@@ -33,14 +33,14 @@ import 'node:v8';
33
33
  import 'consola';
34
34
  import 'esbuild';
35
35
  import 'prettier';
36
- import '../shared/arri.e547206a.mjs';
36
+ import '../shared/arri.74885d3a.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.6966fa30.mjs';
43
+ import '../shared/arri.7f1296ca.mjs';
44
44
  import 'child_process';
45
45
  import 'listhen';
46
46
 
@@ -3798,14 +3798,26 @@ const Pack = warner$1(class Pack extends Minipass {
3798
3798
 
3799
3799
  this.portable = !!opt.portable;
3800
3800
  this.zip = null;
3801
- if (opt.gzip) {
3802
- if (typeof opt.gzip !== 'object') {
3803
- opt.gzip = {};
3801
+
3802
+ if (opt.gzip || opt.brotli) {
3803
+ if (opt.gzip && opt.brotli) {
3804
+ throw new TypeError('gzip and brotli are mutually exclusive')
3805
+ }
3806
+ if (opt.gzip) {
3807
+ if (typeof opt.gzip !== 'object') {
3808
+ opt.gzip = {};
3809
+ }
3810
+ if (this.portable) {
3811
+ opt.gzip.portable = true;
3812
+ }
3813
+ this.zip = new zlib$1.Gzip(opt.gzip);
3804
3814
  }
3805
- if (this.portable) {
3806
- opt.gzip.portable = true;
3815
+ if (opt.brotli) {
3816
+ if (typeof opt.brotli !== 'object') {
3817
+ opt.brotli = {};
3818
+ }
3819
+ this.zip = new zlib$1.BrotliCompress(opt.brotli);
3807
3820
  }
3808
- this.zip = new zlib$1.Gzip(opt.gzip);
3809
3821
  this.zip.on('data', chunk => super.write(chunk));
3810
3822
  this.zip.on('end', _ => super.end());
3811
3823
  this.zip.on('drain', _ => this[ONDRAIN]());
@@ -4657,6 +4669,16 @@ var parse$1 = warner(class Parser extends EE {
4657
4669
  this.strict = !!opt.strict;
4658
4670
  this.maxMetaEntrySize = opt.maxMetaEntrySize || maxMetaEntrySize;
4659
4671
  this.filter = typeof opt.filter === 'function' ? opt.filter : noop;
4672
+ // Unlike gzip, brotli doesn't have any magic bytes to identify it
4673
+ // Users need to explicitly tell us they're extracting a brotli file
4674
+ // Or we infer from the file extension
4675
+ const isTBR = (opt.file && (
4676
+ opt.file.endsWith('.tar.br') || opt.file.endsWith('.tbr')));
4677
+ // if it's a tbr file it MIGHT be brotli, but we don't know until
4678
+ // we look at it and verify it's not a valid tar file.
4679
+ this.brotli = !opt.gzip && opt.brotli !== undefined ? opt.brotli
4680
+ : isTBR ? undefined
4681
+ : false;
4660
4682
 
4661
4683
  // have to set this so that streams are ok piping into it
4662
4684
  this.writable = true;
@@ -4907,7 +4929,9 @@ var parse$1 = warner(class Parser extends EE {
4907
4929
  }
4908
4930
 
4909
4931
  // first write, might be gzipped
4910
- if (this[UNZIP] === null && chunk) {
4932
+ const needSniff = this[UNZIP] === null ||
4933
+ this.brotli === undefined && this[UNZIP] === false;
4934
+ if (needSniff && chunk) {
4911
4935
  if (this[BUFFER]) {
4912
4936
  chunk = Buffer.concat([this[BUFFER], chunk]);
4913
4937
  this[BUFFER] = null;
@@ -4916,15 +4940,45 @@ var parse$1 = warner(class Parser extends EE {
4916
4940
  this[BUFFER] = chunk;
4917
4941
  return true
4918
4942
  }
4943
+
4944
+ // look for gzip header
4919
4945
  for (let i = 0; this[UNZIP] === null && i < gzipHeader.length; i++) {
4920
4946
  if (chunk[i] !== gzipHeader[i]) {
4921
4947
  this[UNZIP] = false;
4922
4948
  }
4923
4949
  }
4924
- if (this[UNZIP] === null) {
4950
+
4951
+ const maybeBrotli = this.brotli === undefined;
4952
+ if (this[UNZIP] === false && maybeBrotli) {
4953
+ // read the first header to see if it's a valid tar file. If so,
4954
+ // we can safely assume that it's not actually brotli, despite the
4955
+ // .tbr or .tar.br file extension.
4956
+ // if we ended before getting a full chunk, yes, def brotli
4957
+ if (chunk.length < 512) {
4958
+ if (this[ENDED$1]) {
4959
+ this.brotli = true;
4960
+ } else {
4961
+ this[BUFFER] = chunk;
4962
+ return true
4963
+ }
4964
+ } else {
4965
+ // if it's tar, it's pretty reliably not brotli, chances of
4966
+ // that happening are astronomical.
4967
+ try {
4968
+ new Header(chunk.slice(0, 512));
4969
+ this.brotli = false;
4970
+ } catch (_) {
4971
+ this.brotli = true;
4972
+ }
4973
+ }
4974
+ }
4975
+
4976
+ if (this[UNZIP] === null || (this[UNZIP] === false && this.brotli)) {
4925
4977
  const ended = this[ENDED$1];
4926
4978
  this[ENDED$1] = false;
4927
- this[UNZIP] = new zlib.Unzip();
4979
+ this[UNZIP] = this[UNZIP] === null
4980
+ ? new zlib.Unzip()
4981
+ : new zlib.BrotliDecompress();
4928
4982
  this[UNZIP].on('data', chunk => this[CONSUMECHUNK](chunk));
4929
4983
  this[UNZIP].on('error', er => this.abort(er));
4930
4984
  this[UNZIP].on('end', _ => {
@@ -5062,6 +5116,7 @@ var parse$1 = warner(class Parser extends EE {
5062
5116
  this[UNZIP].end(chunk);
5063
5117
  } else {
5064
5118
  this[ENDED$1] = true;
5119
+ if (this.brotli === undefined) chunk = chunk || Buffer.alloc(0);
5065
5120
  this.write(chunk);
5066
5121
  }
5067
5122
  }
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.38792eb4.cjs');
28
+ const app = require('./shared/arri.198ae3ea.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.12a51234.cjs');
36
+ const dart = require('./shared/arri.2826746b.cjs');
37
37
  const listhen = require('listhen');
38
38
  require('child_process');
39
39
 
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 { h as camelCase, r as removeDisallowedChars, m as kebabCase, j as isApplicationDef, D as DEV_DEFINITION_ENDPOINT } from './shared/arri.e547206a.mjs';
26
+ import { j as camelCase, r as removeDisallowedChars, o as kebabCase, k as isApplicationDef, D as DEV_DEFINITION_ENDPOINT } from './shared/arri.74885d3a.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.6966fa30.mjs';
34
+ import { a as dartClientGenerator } from './shared/arri.7f1296ca.mjs';
35
35
  import { listenAndWatch } from 'listhen';
36
36
  import 'child_process';
37
37
 
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.38792eb4.cjs');
6
- const dart = require('./shared/arri.12a51234.cjs');
5
+ const app = require('./shared/arri.198ae3ea.cjs');
6
+ const dart = require('./shared/arri.2826746b.cjs');
7
7
  require('@sinclair/typebox');
8
8
  require('h3');
9
9
  require('@sinclair/typebox/errors');
@@ -173,6 +173,9 @@ function tsModelFromDefinition(name, def) {
173
173
  fieldParts.push(`${keyPart}: ${subModelName};`);
174
174
  return;
175
175
  }
176
+ if (app.isJsonSchemaRecord(prop)) {
177
+ fieldParts.push(`${keyPart}: any;`);
178
+ }
176
179
  if (app.isJsonSchemaEnum(prop)) {
177
180
  const vals = prop.anyOf.map(
178
181
  (opt) => opt.type === "string" ? `'${opt.const}'` : `${opt.const}`
@@ -504,6 +507,7 @@ exports.isJsonSchemaArray = app.isJsonSchemaArray;
504
507
  exports.isJsonSchemaEnum = app.isJsonSchemaEnum;
505
508
  exports.isJsonSchemaNullType = app.isJsonSchemaNullType;
506
509
  exports.isJsonSchemaObject = app.isJsonSchemaObject;
510
+ exports.isJsonSchemaRecord = app.isJsonSchemaRecord;
507
511
  exports.isJsonSchemaScalarType = app.isJsonSchemaScalarType;
508
512
  exports.isProcedureDef = app.isProcedureDef;
509
513
  exports.isServiceDef = app.isServiceDef;
@@ -1,5 +1,5 @@
1
- import { B as ClientGeneratorPlugin, F as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.b176bba1.cjs';
2
- export { C as ClientGenerator, a4 as JsonSchemaArray, a2 as JsonSchemaComplexType, X as JsonSchemaComplexTypeValues, a7 as JsonSchemaEnum, a0 as JsonSchemaNullType, W as JsonSchemaNullTypeValues, _ as JsonSchemaScalarType, V as JsonSchemaScalarTypeValues, Y as JsonSchemaType, Z as JsonSchemaTypeValue, a6 as JsonSchemaUint8Array, G as defineClientGeneratorPlugin, N as isApplicationDef, a5 as isJsonSchemaArray, a8 as isJsonSchemaEnum, a1 as isJsonSchemaNullType, a3 as isJsonSchemaObject, $ as isJsonSchemaScalarType, K as isProcedureDef, L as isServiceDef, I as normalizeWhitespace, U as removeDisallowedChars, T as setNestedObjectProperty, O as unflattenObject, Q as unflattenProcedures } from './shared/arri.b176bba1.cjs';
1
+ import { B as ClientGeneratorPlugin, F as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.f0cec5fb.cjs';
2
+ export { C as ClientGenerator, a6 as JsonSchemaArray, a2 as JsonSchemaComplexType, X as JsonSchemaComplexTypeValues, a9 as JsonSchemaEnum, a0 as JsonSchemaNullType, W as JsonSchemaNullTypeValues, a4 as JsonSchemaRecord, _ as JsonSchemaScalarType, V as JsonSchemaScalarTypeValues, Y as JsonSchemaType, Z as JsonSchemaTypeValue, a8 as JsonSchemaUint8Array, G as defineClientGeneratorPlugin, N as isApplicationDef, a7 as isJsonSchemaArray, aa as isJsonSchemaEnum, a1 as isJsonSchemaNullType, a3 as isJsonSchemaObject, a5 as isJsonSchemaRecord, $ as isJsonSchemaScalarType, K as isProcedureDef, L as isServiceDef, I as normalizeWhitespace, U as removeDisallowedChars, T as setNestedObjectProperty, O as unflattenObject, Q as unflattenProcedures } from './shared/arri.f0cec5fb.cjs';
3
3
  import '@sinclair/typebox';
4
4
  import 'h3';
5
5
 
@@ -1,5 +1,5 @@
1
- import { B as ClientGeneratorPlugin, F as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.b176bba1.mjs';
2
- export { C as ClientGenerator, a4 as JsonSchemaArray, a2 as JsonSchemaComplexType, X as JsonSchemaComplexTypeValues, a7 as JsonSchemaEnum, a0 as JsonSchemaNullType, W as JsonSchemaNullTypeValues, _ as JsonSchemaScalarType, V as JsonSchemaScalarTypeValues, Y as JsonSchemaType, Z as JsonSchemaTypeValue, a6 as JsonSchemaUint8Array, G as defineClientGeneratorPlugin, N as isApplicationDef, a5 as isJsonSchemaArray, a8 as isJsonSchemaEnum, a1 as isJsonSchemaNullType, a3 as isJsonSchemaObject, $ as isJsonSchemaScalarType, K as isProcedureDef, L as isServiceDef, I as normalizeWhitespace, U as removeDisallowedChars, T as setNestedObjectProperty, O as unflattenObject, Q as unflattenProcedures } from './shared/arri.b176bba1.mjs';
1
+ import { B as ClientGeneratorPlugin, F as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.f0cec5fb.mjs';
2
+ export { C as ClientGenerator, a6 as JsonSchemaArray, a2 as JsonSchemaComplexType, X as JsonSchemaComplexTypeValues, a9 as JsonSchemaEnum, a0 as JsonSchemaNullType, W as JsonSchemaNullTypeValues, a4 as JsonSchemaRecord, _ as JsonSchemaScalarType, V as JsonSchemaScalarTypeValues, Y as JsonSchemaType, Z as JsonSchemaTypeValue, a8 as JsonSchemaUint8Array, G as defineClientGeneratorPlugin, N as isApplicationDef, a7 as isJsonSchemaArray, aa as isJsonSchemaEnum, a1 as isJsonSchemaNullType, a3 as isJsonSchemaObject, a5 as isJsonSchemaRecord, $ as isJsonSchemaScalarType, K as isProcedureDef, L as isServiceDef, I as normalizeWhitespace, U as removeDisallowedChars, T as setNestedObjectProperty, O as unflattenObject, Q as unflattenProcedures } from './shared/arri.f0cec5fb.mjs';
3
3
  import '@sinclair/typebox';
4
4
  import 'h3';
5
5
 
package/dist/codegen.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { B as ClientGeneratorPlugin, F as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.b176bba1.js';
2
- export { C as ClientGenerator, a4 as JsonSchemaArray, a2 as JsonSchemaComplexType, X as JsonSchemaComplexTypeValues, a7 as JsonSchemaEnum, a0 as JsonSchemaNullType, W as JsonSchemaNullTypeValues, _ as JsonSchemaScalarType, V as JsonSchemaScalarTypeValues, Y as JsonSchemaType, Z as JsonSchemaTypeValue, a6 as JsonSchemaUint8Array, G as defineClientGeneratorPlugin, N as isApplicationDef, a5 as isJsonSchemaArray, a8 as isJsonSchemaEnum, a1 as isJsonSchemaNullType, a3 as isJsonSchemaObject, $ as isJsonSchemaScalarType, K as isProcedureDef, L as isServiceDef, I as normalizeWhitespace, U as removeDisallowedChars, T as setNestedObjectProperty, O as unflattenObject, Q as unflattenProcedures } from './shared/arri.b176bba1.js';
1
+ import { B as ClientGeneratorPlugin, F as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.f0cec5fb.js';
2
+ export { C as ClientGenerator, a6 as JsonSchemaArray, a2 as JsonSchemaComplexType, X as JsonSchemaComplexTypeValues, a9 as JsonSchemaEnum, a0 as JsonSchemaNullType, W as JsonSchemaNullTypeValues, a4 as JsonSchemaRecord, _ as JsonSchemaScalarType, V as JsonSchemaScalarTypeValues, Y as JsonSchemaType, Z as JsonSchemaTypeValue, a8 as JsonSchemaUint8Array, G as defineClientGeneratorPlugin, N as isApplicationDef, a7 as isJsonSchemaArray, aa as isJsonSchemaEnum, a1 as isJsonSchemaNullType, a3 as isJsonSchemaObject, a5 as isJsonSchemaRecord, $ as isJsonSchemaScalarType, K as isProcedureDef, L as isServiceDef, I as normalizeWhitespace, U as removeDisallowedChars, T as setNestedObjectProperty, O as unflattenObject, Q as unflattenProcedures } from './shared/arri.f0cec5fb.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 isJsonSchemaEnum, f as isJsonSchemaArray, g as unflattenProcedures, h as camelCase } from './shared/arri.e547206a.mjs';
4
- export { l as JsonSchemaComplexTypeValues, k as JsonSchemaNullTypeValues, J as JsonSchemaScalarTypeValues, j as isApplicationDef, n as normalizeWhitespace, r as removeDisallowedChars, s as setNestedObjectProperty } from './shared/arri.e547206a.mjs';
5
- import { d as defineClientGeneratorPlugin } from './shared/arri.6966fa30.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.6966fa30.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.74885d3a.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.74885d3a.mjs';
5
+ import { d as defineClientGeneratorPlugin } from './shared/arri.7f1296ca.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.7f1296ca.mjs';
7
7
  import '@sinclair/typebox';
8
8
  import 'h3';
9
9
  import '@sinclair/typebox/errors';
@@ -173,6 +173,9 @@ function tsModelFromDefinition(name, def) {
173
173
  fieldParts.push(`${keyPart}: ${subModelName};`);
174
174
  return;
175
175
  }
176
+ if (isJsonSchemaRecord(prop)) {
177
+ fieldParts.push(`${keyPart}: any;`);
178
+ }
176
179
  if (isJsonSchemaEnum(prop)) {
177
180
  const vals = prop.anyOf.map(
178
181
  (opt) => opt.type === "string" ? `'${opt.const}'` : `${opt.const}`
@@ -496,4 +499,4 @@ const handleRequestFnString = `private suspend fun handleRequest(
496
499
  }
497
500
  }`;
498
501
 
499
- export { createKotlinClient, createKotlinModelFromDefinition, createKotlinRpcFromDefinition, createKotlinServiceFromDefinition, createTypescriptClient, defineClientGeneratorPlugin, isJsonSchemaArray, isJsonSchemaEnum, isJsonSchemaNullType, isJsonSchemaObject, isJsonSchemaScalarType, isProcedureDef, isServiceDef, kotlinClientGenerator, tsModelFromDefinition, tsRpcFromProcedureDefinition, tsServiceFromServiceDefinition, typescriptClientGenerator, unflattenObject, unflattenProcedures };
502
+ export { createKotlinClient, createKotlinModelFromDefinition, createKotlinRpcFromDefinition, createKotlinServiceFromDefinition, createTypescriptClient, defineClientGeneratorPlugin, isJsonSchemaArray, isJsonSchemaEnum, isJsonSchemaNullType, isJsonSchemaObject, isJsonSchemaRecord, isJsonSchemaScalarType, isProcedureDef, isServiceDef, kotlinClientGenerator, tsModelFromDefinition, tsRpcFromProcedureDefinition, tsServiceFromServiceDefinition, typescriptClientGenerator, unflattenObject, unflattenProcedures };
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const app = require('./shared/arri.38792eb4.cjs');
3
+ const app = require('./shared/arri.198ae3ea.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 { C as ClientGenerator } from './shared/arri.b176bba1.cjs';
2
- export { A as Arri, d as ArriProcedure, c as ArriProcedureBase, g as ArriProcedureHandler, h as ArriProcedurePostHandler, q as ArriRoute, v as ArriRouteHandler, y as ArriRoutePostHandler, a as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ExtractParam, u as ExtractParams, e as HandlerContext, b as HttpMethod, H as HttpMethodValues, M as Middleware, w as RouteHandlerContext, x as RoutePostHandlerContext, R as RpcHandlerContext, f as RpcPostHandlerContext, l as createRpcDefinition, t as defineMiddleware, s as defineRoute, k as defineRpc, o as getRpcParamDefinition, n as getRpcParamName, m as getRpcPath, p as getRpcResponseName, i as isHttpMethod, j as isRpc, z as registerRoute, r as registerRpc } from './shared/arri.b176bba1.cjs';
1
+ import { C as ClientGenerator } from './shared/arri.f0cec5fb.cjs';
2
+ export { A as Arri, d as ArriProcedure, c as ArriProcedureBase, g as ArriProcedureHandler, h as ArriProcedurePostHandler, q as ArriRoute, v as ArriRouteHandler, y as ArriRoutePostHandler, a as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ExtractParam, u as ExtractParams, e as HandlerContext, b as HttpMethod, H as HttpMethodValues, M as Middleware, w as RouteHandlerContext, x as RoutePostHandlerContext, R as RpcHandlerContext, f as RpcPostHandlerContext, l as createRpcDefinition, t as defineMiddleware, s as defineRoute, k as defineRpc, o as getRpcParamDefinition, n as getRpcParamName, m as getRpcPath, p as getRpcResponseName, i as isHttpMethod, j as isRpc, z as registerRoute, r as registerRpc } from './shared/arri.f0cec5fb.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 { C as ClientGenerator } from './shared/arri.b176bba1.mjs';
2
- export { A as Arri, d as ArriProcedure, c as ArriProcedureBase, g as ArriProcedureHandler, h as ArriProcedurePostHandler, q as ArriRoute, v as ArriRouteHandler, y as ArriRoutePostHandler, a as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ExtractParam, u as ExtractParams, e as HandlerContext, b as HttpMethod, H as HttpMethodValues, M as Middleware, w as RouteHandlerContext, x as RoutePostHandlerContext, R as RpcHandlerContext, f as RpcPostHandlerContext, l as createRpcDefinition, t as defineMiddleware, s as defineRoute, k as defineRpc, o as getRpcParamDefinition, n as getRpcParamName, m as getRpcPath, p as getRpcResponseName, i as isHttpMethod, j as isRpc, z as registerRoute, r as registerRpc } from './shared/arri.b176bba1.mjs';
1
+ import { C as ClientGenerator } from './shared/arri.f0cec5fb.mjs';
2
+ export { A as Arri, d as ArriProcedure, c as ArriProcedureBase, g as ArriProcedureHandler, h as ArriProcedurePostHandler, q as ArriRoute, v as ArriRouteHandler, y as ArriRoutePostHandler, a as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ExtractParam, u as ExtractParams, e as HandlerContext, b as HttpMethod, H as HttpMethodValues, M as Middleware, w as RouteHandlerContext, x as RoutePostHandlerContext, R as RpcHandlerContext, f as RpcPostHandlerContext, l as createRpcDefinition, t as defineMiddleware, s as defineRoute, k as defineRpc, o as getRpcParamDefinition, n as getRpcParamName, m as getRpcPath, p as getRpcResponseName, i as isHttpMethod, j as isRpc, z as registerRoute, r as registerRpc } from './shared/arri.f0cec5fb.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 { C as ClientGenerator } from './shared/arri.b176bba1.js';
2
- export { A as Arri, d as ArriProcedure, c as ArriProcedureBase, g as ArriProcedureHandler, h as ArriProcedurePostHandler, q as ArriRoute, v as ArriRouteHandler, y as ArriRoutePostHandler, a as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ExtractParam, u as ExtractParams, e as HandlerContext, b as HttpMethod, H as HttpMethodValues, M as Middleware, w as RouteHandlerContext, x as RoutePostHandlerContext, R as RpcHandlerContext, f as RpcPostHandlerContext, l as createRpcDefinition, t as defineMiddleware, s as defineRoute, k as defineRpc, o as getRpcParamDefinition, n as getRpcParamName, m as getRpcPath, p as getRpcResponseName, i as isHttpMethod, j as isRpc, z as registerRoute, r as registerRpc } from './shared/arri.b176bba1.js';
1
+ import { C as ClientGenerator } from './shared/arri.f0cec5fb.js';
2
+ export { A as Arri, d as ArriProcedure, c as ArriProcedureBase, g as ArriProcedureHandler, h as ArriProcedurePostHandler, q as ArriRoute, v as ArriRouteHandler, y as ArriRoutePostHandler, a as DEV_DEFINITION_ENDPOINT, D as DEV_ENDPOINT_ROOT, E as ExtractParam, u as ExtractParams, e as HandlerContext, b as HttpMethod, H as HttpMethodValues, M as Middleware, w as RouteHandlerContext, x as RoutePostHandlerContext, R as RpcHandlerContext, f as RpcPostHandlerContext, l as createRpcDefinition, t as defineMiddleware, s as defineRoute, k as defineRpc, o as getRpcParamDefinition, n as getRpcParamName, m as getRpcPath, p as getRpcResponseName, i as isHttpMethod, j as isRpc, z as registerRoute, r as registerRpc } from './shared/arri.f0cec5fb.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, o as DEV_ENDPOINT_ROOT, I as ErrorResponse, H as HttpMethodValues, w as createRpcDefinition, K as defineError, F as defineMiddleware, E as defineRoute, v as defineRpc, L as errorResponseFromValidationErrors, z as getRpcParamDefinition, y as getRpcParamName, x as getRpcPath, B as getRpcResponseName, q as isHttpMethod, t as isRpc, G as registerRoute, C as registerRpc } from './shared/arri.e547206a.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, t as isHttpMethod, v as isRpc, I as registerRoute, E as registerRpc } from './shared/arri.74885d3a.mjs';
2
2
  import '@sinclair/typebox';
3
3
  import 'h3';
4
4
  import '@sinclair/typebox/errors';
@@ -389,6 +389,12 @@ const isJsonSchemaObject = (input) => {
389
389
  }
390
390
  return "type" in input && input.type === "object" && "properties" in input && typeof input.properties === "object";
391
391
  };
392
+ const isJsonSchemaRecord = (input) => {
393
+ if (typeof input !== "object") {
394
+ return false;
395
+ }
396
+ return "type" in input && input.type === "object" && "patternProperties" in input && typeof input.patternProperties === "object";
397
+ };
392
398
  function isJsonSchemaArray(input) {
393
399
  if (typeof input !== "object") {
394
400
  return false;
@@ -835,6 +841,7 @@ exports.isJsonSchemaArray = isJsonSchemaArray;
835
841
  exports.isJsonSchemaEnum = isJsonSchemaEnum;
836
842
  exports.isJsonSchemaNullType = isJsonSchemaNullType;
837
843
  exports.isJsonSchemaObject = isJsonSchemaObject;
844
+ exports.isJsonSchemaRecord = isJsonSchemaRecord;
838
845
  exports.isJsonSchemaScalarType = isJsonSchemaScalarType;
839
846
  exports.isProcedureDef = isProcedureDef;
840
847
  exports.isRpc = isRpc;
@@ -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.38792eb4.cjs');
5
+ const app = require('./arri.198ae3ea.cjs');
6
6
 
7
7
  function defineClientGeneratorPlugin(plugin) {
8
8
  return plugin;
@@ -293,6 +293,9 @@ function dartModelFromJsonSchema(modelName, schema, opts) {
293
293
  isNullable
294
294
  );
295
295
  }
296
+ if (field.type.includes("Map<")) {
297
+ return `"${field.jsonKey}": ${field.name}`;
298
+ }
296
299
  return classTransformer(typeName, isNullable).toJsonBody(
297
300
  field.name,
298
301
  field.jsonKey,
@@ -391,6 +394,9 @@ function dartPropertyTypeFromSchema(objectName, propertyName, schema, opts) {
391
394
  const joinedPropName = prop.$id ? app.pascalCase(prop.$id) : app.pascalCase(`${objectName}_${propertyName}`);
392
395
  finalType = isOptional ? `${joinedPropName}?` : joinedPropName;
393
396
  }
397
+ if (app.isJsonSchemaRecord(prop)) {
398
+ finalType = isOptional ? `Map<dynamic, dynamic>?` : "Map<dynamic, dynamic>";
399
+ }
394
400
  if (app.isJsonSchemaArray(prop)) {
395
401
  const item = prop.items;
396
402
  const type = item.type;
@@ -419,15 +425,19 @@ function dartPropertyTypeFromSchema(objectName, propertyName, schema, opts) {
419
425
  finalType = isOptional ? "List<DateTime>?" : "List<DateTime>";
420
426
  break;
421
427
  case "object": {
422
- const subTypeName = item.$id ?? app.pascalCase(`${objectName}_${propertyName}_item`);
423
- if (!generatedModels.includes(subTypeName)) {
424
- const model = dartModelFromJsonSchema(
425
- subTypeName,
426
- item);
427
- subTypes.push(model);
428
- generatedModels.push(subTypeName);
428
+ if (app.isJsonSchemaObject(item)) {
429
+ const subTypeName = item.$id ?? app.pascalCase(`${objectName}_${propertyName}_item`);
430
+ if (!generatedModels.includes(subTypeName)) {
431
+ const model = dartModelFromJsonSchema(
432
+ subTypeName,
433
+ item);
434
+ subTypes.push(model);
435
+ generatedModels.push(subTypeName);
436
+ }
437
+ finalType = isOptional ? `List<${subTypeName}>?` : `List<${subTypeName}>`;
438
+ } else {
439
+ finalType = isOptional ? `Map<dynamic, dynamic>?` : `Map<dynamic, dynamic>`;
429
440
  }
430
- finalType = isOptional ? `List<${subTypeName}>?` : `List<${subTypeName}>`;
431
441
  break;
432
442
  }
433
443
  }
@@ -521,6 +531,9 @@ function dartParsedJsonField(fieldName, jsonKey, dartType) {
521
531
  dartType.endsWith("?") ? "null" : "[]"
522
532
  );
523
533
  }
534
+ if (dartType.includes("Map<")) {
535
+ return `${fieldName}: json["${jsonKey}"] is Map ? json["${jsonKey}"] : {}`;
536
+ }
524
537
  const classType = dartType.split("?").join("").trim();
525
538
  return classTransformer(classType, dartType.endsWith("?")).fromJsonBody(
526
539
  fieldName,
@@ -387,6 +387,12 @@ const isJsonSchemaObject = (input) => {
387
387
  }
388
388
  return "type" in input && input.type === "object" && "properties" in input && typeof input.properties === "object";
389
389
  };
390
+ const isJsonSchemaRecord = (input) => {
391
+ if (typeof input !== "object") {
392
+ return false;
393
+ }
394
+ return "type" in input && input.type === "object" && "patternProperties" in input && typeof input.patternProperties === "object";
395
+ };
390
396
  function isJsonSchemaArray(input) {
391
397
  if (typeof input !== "object") {
392
398
  return false;
@@ -808,4 +814,4 @@ const isHttpMethod = (input) => {
808
814
  return HttpMethodValues.includes(input);
809
815
  };
810
816
 
811
- export { Arri as A, getRpcResponseName as B, registerRpc as C, DEV_DEFINITION_ENDPOINT as D, defineRoute as E, defineMiddleware as F, registerRoute as G, HttpMethodValues as H, ErrorResponse as I, JsonSchemaScalarTypeValues as J, defineError as K, errorResponseFromValidationErrors as L, isProcedureDef as a, isJsonSchemaScalarType as b, isJsonSchemaNullType as c, isJsonSchemaObject as d, isJsonSchemaEnum as e, isJsonSchemaArray as f, unflattenProcedures as g, camelCase as h, isServiceDef as i, isApplicationDef as j, JsonSchemaNullTypeValues as k, JsonSchemaComplexTypeValues as l, kebabCase as m, normalizeWhitespace as n, DEV_ENDPOINT_ROOT as o, pascalCase as p, isHttpMethod as q, removeDisallowedChars as r, setNestedObjectProperty as s, isRpc as t, unflattenObject as u, defineRpc as v, createRpcDefinition as w, getRpcPath as x, getRpcParamName as y, getRpcParamDefinition as z };
817
+ export { Arri as A, getRpcParamDefinition as B, getRpcResponseName as C, DEV_DEFINITION_ENDPOINT as D, registerRpc as E, defineRoute as F, defineMiddleware as G, HttpMethodValues as H, registerRoute as I, JsonSchemaScalarTypeValues as J, ErrorResponse as K, defineError as L, errorResponseFromValidationErrors as M, isProcedureDef as a, isJsonSchemaScalarType as b, isJsonSchemaNullType as c, isJsonSchemaObject as d, isJsonSchemaRecord as e, isJsonSchemaEnum as f, isJsonSchemaArray as g, unflattenProcedures as h, isServiceDef as i, camelCase as j, isApplicationDef as k, JsonSchemaNullTypeValues as l, JsonSchemaComplexTypeValues as m, normalizeWhitespace as n, kebabCase as o, pascalCase as p, DEV_ENDPOINT_ROOT as q, removeDisallowedChars as r, setNestedObjectProperty as s, isHttpMethod as t, unflattenObject as u, isRpc as v, defineRpc as w, createRpcDefinition as x, getRpcPath as y, getRpcParamName as z };
@@ -1,6 +1,6 @@
1
1
  import { execSync } from 'child_process';
2
2
  import { writeFileSync } from 'fs';
3
- import { g as unflattenProcedures, i as isServiceDef, p as pascalCase, h as camelCase, a as isProcedureDef, d as isJsonSchemaObject, e as isJsonSchemaEnum, c as isJsonSchemaNullType, b as isJsonSchemaScalarType, f as isJsonSchemaArray } from './arri.e547206a.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.74885d3a.mjs';
4
4
 
5
5
  function defineClientGeneratorPlugin(plugin) {
6
6
  return plugin;
@@ -291,6 +291,9 @@ function dartModelFromJsonSchema(modelName, schema, opts) {
291
291
  isNullable
292
292
  );
293
293
  }
294
+ if (field.type.includes("Map<")) {
295
+ return `"${field.jsonKey}": ${field.name}`;
296
+ }
294
297
  return classTransformer(typeName, isNullable).toJsonBody(
295
298
  field.name,
296
299
  field.jsonKey,
@@ -389,6 +392,9 @@ function dartPropertyTypeFromSchema(objectName, propertyName, schema, opts) {
389
392
  const joinedPropName = prop.$id ? pascalCase(prop.$id) : pascalCase(`${objectName}_${propertyName}`);
390
393
  finalType = isOptional ? `${joinedPropName}?` : joinedPropName;
391
394
  }
395
+ if (isJsonSchemaRecord(prop)) {
396
+ finalType = isOptional ? `Map<dynamic, dynamic>?` : "Map<dynamic, dynamic>";
397
+ }
392
398
  if (isJsonSchemaArray(prop)) {
393
399
  const item = prop.items;
394
400
  const type = item.type;
@@ -417,15 +423,19 @@ function dartPropertyTypeFromSchema(objectName, propertyName, schema, opts) {
417
423
  finalType = isOptional ? "List<DateTime>?" : "List<DateTime>";
418
424
  break;
419
425
  case "object": {
420
- const subTypeName = item.$id ?? pascalCase(`${objectName}_${propertyName}_item`);
421
- if (!generatedModels.includes(subTypeName)) {
422
- const model = dartModelFromJsonSchema(
423
- subTypeName,
424
- item);
425
- subTypes.push(model);
426
- generatedModels.push(subTypeName);
426
+ if (isJsonSchemaObject(item)) {
427
+ const subTypeName = item.$id ?? pascalCase(`${objectName}_${propertyName}_item`);
428
+ if (!generatedModels.includes(subTypeName)) {
429
+ const model = dartModelFromJsonSchema(
430
+ subTypeName,
431
+ item);
432
+ subTypes.push(model);
433
+ generatedModels.push(subTypeName);
434
+ }
435
+ finalType = isOptional ? `List<${subTypeName}>?` : `List<${subTypeName}>`;
436
+ } else {
437
+ finalType = isOptional ? `Map<dynamic, dynamic>?` : `Map<dynamic, dynamic>`;
427
438
  }
428
- finalType = isOptional ? `List<${subTypeName}>?` : `List<${subTypeName}>`;
429
439
  break;
430
440
  }
431
441
  }
@@ -519,6 +529,9 @@ function dartParsedJsonField(fieldName, jsonKey, dartType) {
519
529
  dartType.endsWith("?") ? "null" : "[]"
520
530
  );
521
531
  }
532
+ if (dartType.includes("Map<")) {
533
+ return `${fieldName}: json["${jsonKey}"] is Map ? json["${jsonKey}"] : {}`;
534
+ }
522
535
  const classType = dartType.split("?").join("").trim();
523
536
  return classTransformer(classType, dartType.endsWith("?")).fromJsonBody(
524
537
  fieldName,
@@ -49,7 +49,7 @@ interface JsonSchemaNullType {
49
49
  type: (typeof JsonSchemaNullTypeValues)[number];
50
50
  }
51
51
  declare function isJsonSchemaNullType(input: any): input is JsonSchemaNullType;
52
- type JsonSchemaComplexType = JsonSchemaObject | JsonSchemaArray;
52
+ type JsonSchemaComplexType = JsonSchemaObject | JsonSchemaArray | JsonSchemaRecord;
53
53
  interface JsonSchemaObject {
54
54
  $id?: string;
55
55
  title?: string;
@@ -59,6 +59,13 @@ interface JsonSchemaObject {
59
59
  required?: string[];
60
60
  }
61
61
  declare const isJsonSchemaObject: (input: any) => input is JsonSchemaObject;
62
+ interface JsonSchemaRecord {
63
+ $id?: string;
64
+ title?: string;
65
+ type: "object";
66
+ patternProperties: Record<string, JsonSchemaType>;
67
+ }
68
+ declare const isJsonSchemaRecord: (input: any) => input is JsonSchemaRecord;
62
69
  interface JsonSchemaArray {
63
70
  $id?: string;
64
71
  title?: string;
@@ -188,4 +195,4 @@ interface ClientGenerator<TOptions extends Record<string, any> | undefined> {
188
195
  type ClientGeneratorPlugin<TOptions extends Record<string, any> | undefined> = (options: TOptions) => ClientGenerator<TOptions>;
189
196
  declare function defineClientGeneratorPlugin<TOptions extends Record<string, any> | undefined>(plugin: ClientGeneratorPlugin<TOptions>): ClientGeneratorPlugin<TOptions>;
190
197
 
191
- export { isJsonSchemaScalarType as $, Arri as A, type ClientGeneratorPlugin as B, type ClientGenerator as C, DEV_ENDPOINT_ROOT as D, type ExtractParam as E, type ApplicationDef as F, defineClientGeneratorPlugin as G, HttpMethodValues as H, normalizeWhitespace as I, type JsonSchemaObject as J, isProcedureDef as K, isServiceDef as L, type Middleware as M, isApplicationDef as N, unflattenObject as O, type ProcedureDef as P, unflattenProcedures as Q, type RpcHandlerContext as R, type ServiceDef as S, setNestedObjectProperty as T, removeDisallowedChars as U, JsonSchemaScalarTypeValues as V, JsonSchemaNullTypeValues as W, JsonSchemaComplexTypeValues as X, type JsonSchemaType as Y, type JsonSchemaTypeValue as Z, type JsonSchemaScalarType as _, DEV_DEFINITION_ENDPOINT as a, type JsonSchemaNullType as a0, isJsonSchemaNullType as a1, type JsonSchemaComplexType as a2, isJsonSchemaObject as a3, type JsonSchemaArray as a4, isJsonSchemaArray as a5, type JsonSchemaUint8Array as a6, type JsonSchemaEnum as a7, isJsonSchemaEnum as a8, type HttpMethod as b, type ArriProcedureBase as c, type ArriProcedure as d, type HandlerContext as e, type RpcPostHandlerContext as f, type ArriProcedureHandler as g, type ArriProcedurePostHandler as h, isHttpMethod as i, isRpc as j, defineRpc as k, createRpcDefinition as l, getRpcPath as m, getRpcParamName as n, getRpcParamDefinition as o, getRpcResponseName as p, type ArriRoute as q, registerRpc as r, defineRoute as s, defineMiddleware as t, type ExtractParams as u, type ArriRouteHandler as v, type RouteHandlerContext as w, type RoutePostHandlerContext as x, type ArriRoutePostHandler as y, registerRoute as z };
198
+ export { isJsonSchemaScalarType as $, Arri as A, type ClientGeneratorPlugin as B, type ClientGenerator as C, DEV_ENDPOINT_ROOT as D, type ExtractParam as E, type ApplicationDef as F, defineClientGeneratorPlugin as G, HttpMethodValues as H, normalizeWhitespace as I, type JsonSchemaObject as J, isProcedureDef as K, isServiceDef as L, type Middleware as M, isApplicationDef as N, unflattenObject as O, type ProcedureDef as P, unflattenProcedures as Q, type RpcHandlerContext as R, type ServiceDef as S, setNestedObjectProperty as T, removeDisallowedChars as U, JsonSchemaScalarTypeValues as V, JsonSchemaNullTypeValues as W, JsonSchemaComplexTypeValues as X, type JsonSchemaType as Y, type JsonSchemaTypeValue as Z, type JsonSchemaScalarType as _, DEV_DEFINITION_ENDPOINT as a, type JsonSchemaNullType as a0, isJsonSchemaNullType as a1, type JsonSchemaComplexType as a2, isJsonSchemaObject as a3, type JsonSchemaRecord as a4, isJsonSchemaRecord as a5, type JsonSchemaArray as a6, isJsonSchemaArray as a7, type JsonSchemaUint8Array as a8, type JsonSchemaEnum as a9, isJsonSchemaEnum as aa, type HttpMethod as b, type ArriProcedureBase as c, type ArriProcedure as d, type HandlerContext as e, type RpcPostHandlerContext as f, type ArriProcedureHandler as g, type ArriProcedurePostHandler as h, isHttpMethod as i, isRpc as j, defineRpc as k, createRpcDefinition as l, getRpcPath as m, getRpcParamName as n, getRpcParamDefinition as o, getRpcResponseName as p, type ArriRoute as q, registerRpc as r, defineRoute as s, defineMiddleware as t, type ExtractParams as u, type ArriRouteHandler as v, type RouteHandlerContext as w, type RoutePostHandlerContext as x, type ArriRoutePostHandler as y, registerRoute as z };
@@ -49,7 +49,7 @@ interface JsonSchemaNullType {
49
49
  type: (typeof JsonSchemaNullTypeValues)[number];
50
50
  }
51
51
  declare function isJsonSchemaNullType(input: any): input is JsonSchemaNullType;
52
- type JsonSchemaComplexType = JsonSchemaObject | JsonSchemaArray;
52
+ type JsonSchemaComplexType = JsonSchemaObject | JsonSchemaArray | JsonSchemaRecord;
53
53
  interface JsonSchemaObject {
54
54
  $id?: string;
55
55
  title?: string;
@@ -59,6 +59,13 @@ interface JsonSchemaObject {
59
59
  required?: string[];
60
60
  }
61
61
  declare const isJsonSchemaObject: (input: any) => input is JsonSchemaObject;
62
+ interface JsonSchemaRecord {
63
+ $id?: string;
64
+ title?: string;
65
+ type: "object";
66
+ patternProperties: Record<string, JsonSchemaType>;
67
+ }
68
+ declare const isJsonSchemaRecord: (input: any) => input is JsonSchemaRecord;
62
69
  interface JsonSchemaArray {
63
70
  $id?: string;
64
71
  title?: string;
@@ -188,4 +195,4 @@ interface ClientGenerator<TOptions extends Record<string, any> | undefined> {
188
195
  type ClientGeneratorPlugin<TOptions extends Record<string, any> | undefined> = (options: TOptions) => ClientGenerator<TOptions>;
189
196
  declare function defineClientGeneratorPlugin<TOptions extends Record<string, any> | undefined>(plugin: ClientGeneratorPlugin<TOptions>): ClientGeneratorPlugin<TOptions>;
190
197
 
191
- export { isJsonSchemaScalarType as $, Arri as A, type ClientGeneratorPlugin as B, type ClientGenerator as C, DEV_ENDPOINT_ROOT as D, type ExtractParam as E, type ApplicationDef as F, defineClientGeneratorPlugin as G, HttpMethodValues as H, normalizeWhitespace as I, type JsonSchemaObject as J, isProcedureDef as K, isServiceDef as L, type Middleware as M, isApplicationDef as N, unflattenObject as O, type ProcedureDef as P, unflattenProcedures as Q, type RpcHandlerContext as R, type ServiceDef as S, setNestedObjectProperty as T, removeDisallowedChars as U, JsonSchemaScalarTypeValues as V, JsonSchemaNullTypeValues as W, JsonSchemaComplexTypeValues as X, type JsonSchemaType as Y, type JsonSchemaTypeValue as Z, type JsonSchemaScalarType as _, DEV_DEFINITION_ENDPOINT as a, type JsonSchemaNullType as a0, isJsonSchemaNullType as a1, type JsonSchemaComplexType as a2, isJsonSchemaObject as a3, type JsonSchemaArray as a4, isJsonSchemaArray as a5, type JsonSchemaUint8Array as a6, type JsonSchemaEnum as a7, isJsonSchemaEnum as a8, type HttpMethod as b, type ArriProcedureBase as c, type ArriProcedure as d, type HandlerContext as e, type RpcPostHandlerContext as f, type ArriProcedureHandler as g, type ArriProcedurePostHandler as h, isHttpMethod as i, isRpc as j, defineRpc as k, createRpcDefinition as l, getRpcPath as m, getRpcParamName as n, getRpcParamDefinition as o, getRpcResponseName as p, type ArriRoute as q, registerRpc as r, defineRoute as s, defineMiddleware as t, type ExtractParams as u, type ArriRouteHandler as v, type RouteHandlerContext as w, type RoutePostHandlerContext as x, type ArriRoutePostHandler as y, registerRoute as z };
198
+ export { isJsonSchemaScalarType as $, Arri as A, type ClientGeneratorPlugin as B, type ClientGenerator as C, DEV_ENDPOINT_ROOT as D, type ExtractParam as E, type ApplicationDef as F, defineClientGeneratorPlugin as G, HttpMethodValues as H, normalizeWhitespace as I, type JsonSchemaObject as J, isProcedureDef as K, isServiceDef as L, type Middleware as M, isApplicationDef as N, unflattenObject as O, type ProcedureDef as P, unflattenProcedures as Q, type RpcHandlerContext as R, type ServiceDef as S, setNestedObjectProperty as T, removeDisallowedChars as U, JsonSchemaScalarTypeValues as V, JsonSchemaNullTypeValues as W, JsonSchemaComplexTypeValues as X, type JsonSchemaType as Y, type JsonSchemaTypeValue as Z, type JsonSchemaScalarType as _, DEV_DEFINITION_ENDPOINT as a, type JsonSchemaNullType as a0, isJsonSchemaNullType as a1, type JsonSchemaComplexType as a2, isJsonSchemaObject as a3, type JsonSchemaRecord as a4, isJsonSchemaRecord as a5, type JsonSchemaArray as a6, isJsonSchemaArray as a7, type JsonSchemaUint8Array as a8, type JsonSchemaEnum as a9, isJsonSchemaEnum as aa, type HttpMethod as b, type ArriProcedureBase as c, type ArriProcedure as d, type HandlerContext as e, type RpcPostHandlerContext as f, type ArriProcedureHandler as g, type ArriProcedurePostHandler as h, isHttpMethod as i, isRpc as j, defineRpc as k, createRpcDefinition as l, getRpcPath as m, getRpcParamName as n, getRpcParamDefinition as o, getRpcResponseName as p, type ArriRoute as q, registerRpc as r, defineRoute as s, defineMiddleware as t, type ExtractParams as u, type ArriRouteHandler as v, type RouteHandlerContext as w, type RoutePostHandlerContext as x, type ArriRoutePostHandler as y, registerRoute as z };
@@ -49,7 +49,7 @@ interface JsonSchemaNullType {
49
49
  type: (typeof JsonSchemaNullTypeValues)[number];
50
50
  }
51
51
  declare function isJsonSchemaNullType(input: any): input is JsonSchemaNullType;
52
- type JsonSchemaComplexType = JsonSchemaObject | JsonSchemaArray;
52
+ type JsonSchemaComplexType = JsonSchemaObject | JsonSchemaArray | JsonSchemaRecord;
53
53
  interface JsonSchemaObject {
54
54
  $id?: string;
55
55
  title?: string;
@@ -59,6 +59,13 @@ interface JsonSchemaObject {
59
59
  required?: string[];
60
60
  }
61
61
  declare const isJsonSchemaObject: (input: any) => input is JsonSchemaObject;
62
+ interface JsonSchemaRecord {
63
+ $id?: string;
64
+ title?: string;
65
+ type: "object";
66
+ patternProperties: Record<string, JsonSchemaType>;
67
+ }
68
+ declare const isJsonSchemaRecord: (input: any) => input is JsonSchemaRecord;
62
69
  interface JsonSchemaArray {
63
70
  $id?: string;
64
71
  title?: string;
@@ -188,4 +195,4 @@ interface ClientGenerator<TOptions extends Record<string, any> | undefined> {
188
195
  type ClientGeneratorPlugin<TOptions extends Record<string, any> | undefined> = (options: TOptions) => ClientGenerator<TOptions>;
189
196
  declare function defineClientGeneratorPlugin<TOptions extends Record<string, any> | undefined>(plugin: ClientGeneratorPlugin<TOptions>): ClientGeneratorPlugin<TOptions>;
190
197
 
191
- export { isJsonSchemaScalarType as $, Arri as A, type ClientGeneratorPlugin as B, type ClientGenerator as C, DEV_ENDPOINT_ROOT as D, type ExtractParam as E, type ApplicationDef as F, defineClientGeneratorPlugin as G, HttpMethodValues as H, normalizeWhitespace as I, type JsonSchemaObject as J, isProcedureDef as K, isServiceDef as L, type Middleware as M, isApplicationDef as N, unflattenObject as O, type ProcedureDef as P, unflattenProcedures as Q, type RpcHandlerContext as R, type ServiceDef as S, setNestedObjectProperty as T, removeDisallowedChars as U, JsonSchemaScalarTypeValues as V, JsonSchemaNullTypeValues as W, JsonSchemaComplexTypeValues as X, type JsonSchemaType as Y, type JsonSchemaTypeValue as Z, type JsonSchemaScalarType as _, DEV_DEFINITION_ENDPOINT as a, type JsonSchemaNullType as a0, isJsonSchemaNullType as a1, type JsonSchemaComplexType as a2, isJsonSchemaObject as a3, type JsonSchemaArray as a4, isJsonSchemaArray as a5, type JsonSchemaUint8Array as a6, type JsonSchemaEnum as a7, isJsonSchemaEnum as a8, type HttpMethod as b, type ArriProcedureBase as c, type ArriProcedure as d, type HandlerContext as e, type RpcPostHandlerContext as f, type ArriProcedureHandler as g, type ArriProcedurePostHandler as h, isHttpMethod as i, isRpc as j, defineRpc as k, createRpcDefinition as l, getRpcPath as m, getRpcParamName as n, getRpcParamDefinition as o, getRpcResponseName as p, type ArriRoute as q, registerRpc as r, defineRoute as s, defineMiddleware as t, type ExtractParams as u, type ArriRouteHandler as v, type RouteHandlerContext as w, type RoutePostHandlerContext as x, type ArriRoutePostHandler as y, registerRoute as z };
198
+ export { isJsonSchemaScalarType as $, Arri as A, type ClientGeneratorPlugin as B, type ClientGenerator as C, DEV_ENDPOINT_ROOT as D, type ExtractParam as E, type ApplicationDef as F, defineClientGeneratorPlugin as G, HttpMethodValues as H, normalizeWhitespace as I, type JsonSchemaObject as J, isProcedureDef as K, isServiceDef as L, type Middleware as M, isApplicationDef as N, unflattenObject as O, type ProcedureDef as P, unflattenProcedures as Q, type RpcHandlerContext as R, type ServiceDef as S, setNestedObjectProperty as T, removeDisallowedChars as U, JsonSchemaScalarTypeValues as V, JsonSchemaNullTypeValues as W, JsonSchemaComplexTypeValues as X, type JsonSchemaType as Y, type JsonSchemaTypeValue as Z, type JsonSchemaScalarType as _, DEV_DEFINITION_ENDPOINT as a, type JsonSchemaNullType as a0, isJsonSchemaNullType as a1, type JsonSchemaComplexType as a2, isJsonSchemaObject as a3, type JsonSchemaRecord as a4, isJsonSchemaRecord as a5, type JsonSchemaArray as a6, isJsonSchemaArray as a7, type JsonSchemaUint8Array as a8, type JsonSchemaEnum as a9, isJsonSchemaEnum as aa, type HttpMethod as b, type ArriProcedureBase as c, type ArriProcedure as d, type HandlerContext as e, type RpcPostHandlerContext as f, type ArriProcedureHandler as g, type ArriProcedurePostHandler as h, isHttpMethod as i, isRpc as j, defineRpc as k, createRpcDefinition as l, getRpcPath as m, getRpcParamName as n, getRpcParamDefinition as o, getRpcResponseName as p, type ArriRoute as q, registerRpc as r, defineRoute as s, defineMiddleware as t, type ExtractParams as u, type ArriRouteHandler as v, type RouteHandlerContext as w, type RoutePostHandlerContext as x, type ArriRoutePostHandler as y, registerRoute as z };
package/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  },
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
- "@sinclair/typebox": "^0.31.8",
15
+ "@sinclair/typebox": "^0.31.14",
16
16
  "h3": "^1.8.1",
17
17
  "esbuild": "^0.19.2",
18
18
  "scule": "^1.0.0",
@@ -25,7 +25,7 @@
25
25
  "chokidar": "^3.5.3",
26
26
  "listhen": "^1.4.4"
27
27
  },
28
- "version": "0.0.26",
28
+ "version": "0.0.28",
29
29
  "repository": {
30
30
  "url": "https://github.com/modiimedia/arri"
31
31
  }