arri 0.0.38 → 0.0.40
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 +3 -3
- package/dist/chunks/index.mjs +3 -3
- package/dist/cli.cjs +11 -11
- package/dist/cli.mjs +4 -4
- package/dist/codegen.cjs +43 -56
- package/dist/codegen.d.cts +3 -4
- package/dist/codegen.d.mts +3 -4
- package/dist/codegen.d.ts +3 -4
- package/dist/codegen.mjs +5 -9
- package/dist/index.cjs +656 -25
- package/dist/index.d.cts +105 -5
- package/dist/index.d.mts +105 -5
- package/dist/index.d.ts +105 -5
- package/dist/index.mjs +639 -6
- package/dist/shared/arri.0752aa2b.cjs +192 -0
- package/dist/shared/{arri.1a30c6b5.mjs → arri.3b1c1533.mjs} +74 -2
- package/dist/shared/arri.4536bc49.d.cts +77 -0
- package/dist/shared/arri.4536bc49.d.mts +77 -0
- package/dist/shared/arri.4536bc49.d.ts +77 -0
- package/dist/shared/{arri.edc9d295.cjs → arri.529292e9.cjs} +103 -25
- package/dist/shared/arri.ebf86912.mjs +179 -0
- package/package.json +3 -3
- package/dist/shared/arri.8a065f92.cjs +0 -934
- package/dist/shared/arri.a8159363.d.cts +0 -205
- package/dist/shared/arri.a8159363.d.mts +0 -205
- package/dist/shared/arri.a8159363.d.ts +0 -205
- package/dist/shared/arri.f1c922a6.mjs +0 -893
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.0752aa2b.cjs');
|
|
39
|
+
require('../index.cjs');
|
|
39
40
|
require('@sinclair/typebox');
|
|
40
41
|
require('h3');
|
|
41
42
|
require('@sinclair/typebox/errors');
|
|
42
43
|
require('@sinclair/typebox/value');
|
|
43
|
-
require('../index.cjs');
|
|
44
44
|
require('ofetch');
|
|
45
|
-
require('../shared/arri.
|
|
45
|
+
require('../shared/arri.529292e9.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.ebf86912.mjs';
|
|
37
|
+
import '../index.mjs';
|
|
37
38
|
import '@sinclair/typebox';
|
|
38
39
|
import 'h3';
|
|
39
40
|
import '@sinclair/typebox/errors';
|
|
40
41
|
import '@sinclair/typebox/value';
|
|
41
|
-
import '../index.mjs';
|
|
42
42
|
import 'ofetch';
|
|
43
|
-
import '../shared/arri.
|
|
43
|
+
import '../shared/arri.3b1c1533.mjs';
|
|
44
44
|
import 'child_process';
|
|
45
45
|
import 'listhen';
|
|
46
46
|
|
package/dist/cli.cjs
CHANGED
|
@@ -25,16 +25,16 @@ 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
|
|
28
|
+
const utils$l = require('./shared/arri.0752aa2b.cjs');
|
|
29
29
|
const index = require('./index.cjs');
|
|
30
30
|
require('node:stream');
|
|
31
31
|
const ofetch = require('ofetch');
|
|
32
|
+
const dart = require('./shared/arri.529292e9.cjs');
|
|
33
|
+
const listhen = require('listhen');
|
|
32
34
|
require('@sinclair/typebox');
|
|
33
35
|
require('h3');
|
|
34
36
|
require('@sinclair/typebox/errors');
|
|
35
37
|
require('@sinclair/typebox/value');
|
|
36
|
-
const dart = require('./shared/arri.edc9d295.cjs');
|
|
37
|
-
const listhen = require('listhen');
|
|
38
38
|
require('child_process');
|
|
39
39
|
|
|
40
40
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
@@ -19869,7 +19869,7 @@ async function getVirtualRouteBatch(globPattern, config) {
|
|
|
19869
19869
|
importParts.push("js");
|
|
19870
19870
|
routes.push({
|
|
19871
19871
|
name: meta.id,
|
|
19872
|
-
importName:
|
|
19872
|
+
importName: utils$l.camelCase(meta.id.split(".").join("_")),
|
|
19873
19873
|
importPath: `./${importParts.join(".")}`
|
|
19874
19874
|
});
|
|
19875
19875
|
}
|
|
@@ -19892,18 +19892,18 @@ const getRpcMetaFromPath = (config, filePath) => {
|
|
|
19892
19892
|
nameParts.push(part);
|
|
19893
19893
|
}
|
|
19894
19894
|
const fileName = nameParts.reverse().pop() ?? "";
|
|
19895
|
-
const serviceParts = nameParts.filter((part) => part.trim().length > 0).map((part) =>
|
|
19895
|
+
const serviceParts = nameParts.filter((part) => part.trim().length > 0).map((part) => utils$l.removeDisallowedChars(part, disallowedNameChars));
|
|
19896
19896
|
const fileNameParts = fileName.split(".");
|
|
19897
19897
|
if (!fileNameParts.length) {
|
|
19898
19898
|
return void 0;
|
|
19899
19899
|
}
|
|
19900
|
-
const rpcName =
|
|
19900
|
+
const rpcName = utils$l.removeDisallowedChars(
|
|
19901
19901
|
fileNameParts[0],
|
|
19902
19902
|
disallowedNameChars
|
|
19903
19903
|
);
|
|
19904
19904
|
const httpParts = [
|
|
19905
|
-
...serviceParts.map((part) =>
|
|
19906
|
-
|
|
19905
|
+
...serviceParts.map((part) => utils$l.kebabCase(part)),
|
|
19906
|
+
utils$l.kebabCase(rpcName)
|
|
19907
19907
|
];
|
|
19908
19908
|
return {
|
|
19909
19909
|
id: [...serviceParts, rpcName].join("."),
|
|
@@ -19982,7 +19982,7 @@ async function startBuild(config, skipCodeGen = false) {
|
|
|
19982
19982
|
"__definition.json"
|
|
19983
19983
|
);
|
|
19984
19984
|
const def = JSON.parse(fs$e.readFileSync(defJson, { encoding: "utf-8" }));
|
|
19985
|
-
if (
|
|
19985
|
+
if (utils$l.isApplicationDef(def)) {
|
|
19986
19986
|
await Promise.all(
|
|
19987
19987
|
config.clientGenerators.map((plugin) => plugin.generator(def))
|
|
19988
19988
|
);
|
|
@@ -20248,9 +20248,9 @@ async function startDevServer(config) {
|
|
|
20248
20248
|
async function generateClients(config) {
|
|
20249
20249
|
try {
|
|
20250
20250
|
const result = await ofetch.ofetch(
|
|
20251
|
-
`http://127.0.0.1:${config.port}${
|
|
20251
|
+
`http://127.0.0.1:${config.port}${index.DEV_DEFINITION_ENDPOINT}`
|
|
20252
20252
|
);
|
|
20253
|
-
if (!
|
|
20253
|
+
if (!utils$l.isApplicationDef(result)) {
|
|
20254
20254
|
return;
|
|
20255
20255
|
}
|
|
20256
20256
|
logger.log(`Generating client code...`);
|
package/dist/cli.mjs
CHANGED
|
@@ -23,16 +23,16 @@ 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 {
|
|
27
|
-
import { defaultConfig } from './index.mjs';
|
|
26
|
+
import { c as camelCase, r as removeDisallowedChars, k as kebabCase, d as isApplicationDef } from './shared/arri.ebf86912.mjs';
|
|
27
|
+
import { defaultConfig, DEV_DEFINITION_ENDPOINT } from './index.mjs';
|
|
28
28
|
import 'node:stream';
|
|
29
29
|
import { ofetch } from 'ofetch';
|
|
30
|
+
import { g as dartClientGenerator } from './shared/arri.3b1c1533.mjs';
|
|
31
|
+
import { listenAndWatch } from 'listhen';
|
|
30
32
|
import '@sinclair/typebox';
|
|
31
33
|
import 'h3';
|
|
32
34
|
import '@sinclair/typebox/errors';
|
|
33
35
|
import '@sinclair/typebox/value';
|
|
34
|
-
import { a as dartClientGenerator } from './shared/arri.1a30c6b5.mjs';
|
|
35
|
-
import { listenAndWatch } from 'listhen';
|
|
36
36
|
import 'child_process';
|
|
37
37
|
|
|
38
38
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
package/dist/codegen.cjs
CHANGED
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
const require$$0 = require('fs');
|
|
4
4
|
const prettier = require('prettier');
|
|
5
|
-
const
|
|
6
|
-
const dart = require('./shared/arri.
|
|
7
|
-
require('@sinclair/typebox');
|
|
8
|
-
require('h3');
|
|
9
|
-
require('@sinclair/typebox/errors');
|
|
10
|
-
require('@sinclair/typebox/value');
|
|
5
|
+
const utils = require('./shared/arri.0752aa2b.cjs');
|
|
6
|
+
const dart = require('./shared/arri.529292e9.cjs');
|
|
11
7
|
require('child_process');
|
|
12
8
|
|
|
13
9
|
let generatedModels = [];
|
|
@@ -36,14 +32,14 @@ const typescriptClientGenerator = dart.defineClientGeneratorPlugin(
|
|
|
36
32
|
);
|
|
37
33
|
async function createTypescriptClient(def, prefix = "Client") {
|
|
38
34
|
generatedModels = [];
|
|
39
|
-
const services =
|
|
35
|
+
const services = utils.unflattenObject(def.procedures);
|
|
40
36
|
const serviceParts = [];
|
|
41
37
|
const procedureParts = [];
|
|
42
38
|
const modelParts = [];
|
|
43
39
|
Object.keys(services).forEach((key) => {
|
|
44
40
|
const item = services[key];
|
|
45
|
-
if (
|
|
46
|
-
const serviceName =
|
|
41
|
+
if (utils.isServiceDef(item)) {
|
|
42
|
+
const serviceName = utils.pascalCase(`${prefix}_${key}_service`);
|
|
47
43
|
serviceParts.push({
|
|
48
44
|
name: serviceName,
|
|
49
45
|
key,
|
|
@@ -54,7 +50,7 @@ async function createTypescriptClient(def, prefix = "Client") {
|
|
|
54
50
|
procedureParts.push(tsRpcFromProcedureDefinition(key, item));
|
|
55
51
|
});
|
|
56
52
|
Object.keys(def.models).forEach((key) => {
|
|
57
|
-
const modelName =
|
|
53
|
+
const modelName = utils.pascalCase(`${key}`);
|
|
58
54
|
if (!generatedModels.includes(modelName)) {
|
|
59
55
|
modelParts.push(tsModelFromDefinition(modelName, def.models[key]));
|
|
60
56
|
generatedModels.push(modelName);
|
|
@@ -91,11 +87,11 @@ function tsServiceFromServiceDefinition(name, def) {
|
|
|
91
87
|
const subServiceParts = [];
|
|
92
88
|
Object.keys(def).forEach((key) => {
|
|
93
89
|
const val = def[key];
|
|
94
|
-
if (
|
|
90
|
+
if (utils.isProcedureDef(val)) {
|
|
95
91
|
rpcParts.push(tsRpcFromProcedureDefinition(key, val));
|
|
96
92
|
return;
|
|
97
93
|
}
|
|
98
|
-
const subServiceName =
|
|
94
|
+
const subServiceName = utils.pascalCase(
|
|
99
95
|
`${name.split("Service").join("")}_${key}_service`
|
|
100
96
|
);
|
|
101
97
|
subServiceParts.push({
|
|
@@ -144,13 +140,13 @@ function tsModelFromDefinition(name, def) {
|
|
|
144
140
|
const isOptional = !def.required?.includes(key);
|
|
145
141
|
const prop = def.properties?.[key];
|
|
146
142
|
const keyPart = isOptional ? `${key}?` : key;
|
|
147
|
-
if (
|
|
143
|
+
if (dart.isJsonSchemaScalarType(prop)) {
|
|
148
144
|
fieldParts.push(
|
|
149
145
|
tsInterfaceScalarField(key, prop, isOptional) ?? ""
|
|
150
146
|
);
|
|
151
147
|
return;
|
|
152
148
|
}
|
|
153
|
-
if (
|
|
149
|
+
if (dart.isJsonSchemaNullType(prop)) {
|
|
154
150
|
switch (prop.type) {
|
|
155
151
|
case "null":
|
|
156
152
|
fieldParts.push(`${keyPart}: null;`);
|
|
@@ -161,8 +157,8 @@ function tsModelFromDefinition(name, def) {
|
|
|
161
157
|
}
|
|
162
158
|
return;
|
|
163
159
|
}
|
|
164
|
-
if (
|
|
165
|
-
const subModelName = prop.$id ??
|
|
160
|
+
if (dart.isJsonSchemaObject(prop)) {
|
|
161
|
+
const subModelName = prop.$id ?? utils.pascalCase(`${name}_${key}`);
|
|
166
162
|
if (!generatedModels.includes(subModelName)) {
|
|
167
163
|
const content = tsModelFromDefinition(
|
|
168
164
|
subModelName,
|
|
@@ -173,18 +169,18 @@ function tsModelFromDefinition(name, def) {
|
|
|
173
169
|
fieldParts.push(`${keyPart}: ${subModelName};`);
|
|
174
170
|
return;
|
|
175
171
|
}
|
|
176
|
-
if (
|
|
172
|
+
if (dart.isJsonSchemaRecord(prop)) {
|
|
177
173
|
fieldParts.push(`${keyPart}: any;`);
|
|
178
174
|
}
|
|
179
|
-
if (
|
|
175
|
+
if (dart.isJsonSchemaEnum(prop)) {
|
|
180
176
|
const vals = prop.anyOf.map(
|
|
181
177
|
(opt) => opt.type === "string" ? `'${opt.const}'` : `${opt.const}`
|
|
182
178
|
);
|
|
183
179
|
fieldParts.push(`${keyPart}: ${vals.join(" | ")};`);
|
|
184
180
|
return;
|
|
185
181
|
}
|
|
186
|
-
if (
|
|
187
|
-
if (
|
|
182
|
+
if (dart.isJsonSchemaArray(prop)) {
|
|
183
|
+
if (dart.isJsonSchemaScalarType(prop.items)) {
|
|
188
184
|
const part = tsInterfaceScalarField(
|
|
189
185
|
key,
|
|
190
186
|
prop.items,
|
|
@@ -193,7 +189,7 @@ function tsModelFromDefinition(name, def) {
|
|
|
193
189
|
fieldParts.push(part);
|
|
194
190
|
return;
|
|
195
191
|
}
|
|
196
|
-
if (
|
|
192
|
+
if (dart.isJsonSchemaNullType(prop.items)) {
|
|
197
193
|
if (prop.items.type === "null") {
|
|
198
194
|
fieldParts.push(`${keyPart}: null[]`);
|
|
199
195
|
return;
|
|
@@ -201,8 +197,8 @@ function tsModelFromDefinition(name, def) {
|
|
|
201
197
|
fieldParts.push(`${keyPart}: undefined[]`);
|
|
202
198
|
return;
|
|
203
199
|
}
|
|
204
|
-
if (
|
|
205
|
-
const subModelName = prop.items.$id ??
|
|
200
|
+
if (dart.isJsonSchemaObject(prop.items)) {
|
|
201
|
+
const subModelName = prop.items.$id ?? utils.pascalCase(`${name}_${key}_item`);
|
|
206
202
|
if (!generatedModels.includes(subModelName)) {
|
|
207
203
|
subModelParts.push(
|
|
208
204
|
tsModelFromDefinition(subModelName, prop.items)
|
|
@@ -246,14 +242,14 @@ const kotlinClientGenerator = dart.defineClientGeneratorPlugin(function(options)
|
|
|
246
242
|
};
|
|
247
243
|
});
|
|
248
244
|
function createKotlinClient(def, clientName, packageName) {
|
|
249
|
-
const procedures =
|
|
245
|
+
const procedures = utils.unflattenProcedures(def.procedures);
|
|
250
246
|
const modelParts = [];
|
|
251
247
|
Object.keys(def.models).forEach((key) => {
|
|
252
248
|
const node = def.models[key];
|
|
253
|
-
if (
|
|
249
|
+
if (dart.isJsonSchemaObject(node)) {
|
|
254
250
|
modelParts.push(
|
|
255
251
|
createKotlinModelFromDefinition(
|
|
256
|
-
|
|
252
|
+
utils.pascalCase(`${clientName}_${key}`),
|
|
257
253
|
node
|
|
258
254
|
)
|
|
259
255
|
);
|
|
@@ -271,10 +267,10 @@ function createKotlinServiceFromDefinition(clientName, serviceName, def) {
|
|
|
271
267
|
const subServiceParts = [];
|
|
272
268
|
Object.keys(def).forEach((key) => {
|
|
273
269
|
const node = def[key];
|
|
274
|
-
if (
|
|
270
|
+
if (utils.isServiceDef(node)) {
|
|
275
271
|
const nameParts = serviceName.split("Service");
|
|
276
272
|
nameParts.pop();
|
|
277
|
-
const subServiceName =
|
|
273
|
+
const subServiceName = utils.pascalCase(
|
|
278
274
|
`${nameParts.join("")}_${key}_service`
|
|
279
275
|
);
|
|
280
276
|
subServiceParts.push({
|
|
@@ -303,9 +299,9 @@ function createKotlinServiceFromDefinition(clientName, serviceName, def) {
|
|
|
303
299
|
${subServiceParts.map((service) => service.content).join("\n")}`;
|
|
304
300
|
}
|
|
305
301
|
function createKotlinRpcFromDefinition(clientName, name, def) {
|
|
306
|
-
const paramStr = def.params ? `params: ${
|
|
307
|
-
const responseStr = def.response ?
|
|
308
|
-
return `suspend fun ${
|
|
302
|
+
const paramStr = def.params ? `params: ${utils.pascalCase(def.params)}` : "";
|
|
303
|
+
const responseStr = def.response ? utils.pascalCase(`${clientName}_${def.response}`) : "";
|
|
304
|
+
return `suspend fun ${utils.camelCase(name)}(${paramStr}): ${responseStr} {
|
|
309
305
|
${responseStr ? "val response = " : ""}handleRequest(
|
|
310
306
|
httpClient,
|
|
311
307
|
"\${baseUrl}${def.path}",
|
|
@@ -317,14 +313,14 @@ function createKotlinRpcFromDefinition(clientName, name, def) {
|
|
|
317
313
|
}`;
|
|
318
314
|
}
|
|
319
315
|
function createKotlinModelFromDefinition(name, def) {
|
|
320
|
-
const finalName =
|
|
316
|
+
const finalName = utils.pascalCase(name);
|
|
321
317
|
const requiredProps = def.required ?? [];
|
|
322
318
|
const fieldParts = [];
|
|
323
319
|
Object.keys(def.properties).forEach((key) => {
|
|
324
320
|
const isRequired = requiredProps.includes(key);
|
|
325
321
|
const prop = def.properties[key];
|
|
326
|
-
if (
|
|
327
|
-
const subModelName =
|
|
322
|
+
if (dart.isJsonSchemaObject(prop)) {
|
|
323
|
+
const subModelName = utils.pascalCase(`${name}_${key}`);
|
|
328
324
|
createKotlinModelFromDefinition(
|
|
329
325
|
subModelName,
|
|
330
326
|
prop
|
|
@@ -334,7 +330,7 @@ function createKotlinModelFromDefinition(name, def) {
|
|
|
334
330
|
);
|
|
335
331
|
return;
|
|
336
332
|
}
|
|
337
|
-
if (
|
|
333
|
+
if (dart.isJsonSchemaScalarType(prop)) {
|
|
338
334
|
switch (prop.type) {
|
|
339
335
|
case "string":
|
|
340
336
|
case "Date":
|
|
@@ -361,14 +357,14 @@ function createKotlinModelFromDefinition(name, def) {
|
|
|
361
357
|
}
|
|
362
358
|
return;
|
|
363
359
|
}
|
|
364
|
-
if (
|
|
360
|
+
if (dart.isJsonSchemaEnum(prop)) {
|
|
365
361
|
return;
|
|
366
362
|
}
|
|
367
|
-
if (
|
|
363
|
+
if (dart.isJsonSchemaNullType(prop)) {
|
|
368
364
|
return;
|
|
369
365
|
}
|
|
370
|
-
if (
|
|
371
|
-
if (
|
|
366
|
+
if (dart.isJsonSchemaArray(prop)) {
|
|
367
|
+
if (dart.isJsonSchemaScalarType(prop.items)) {
|
|
372
368
|
switch (prop.items.type) {
|
|
373
369
|
case "string":
|
|
374
370
|
case "Date":
|
|
@@ -499,23 +495,14 @@ const handleRequestFnString = `private suspend fun handleRequest(
|
|
|
499
495
|
}
|
|
500
496
|
}`;
|
|
501
497
|
|
|
502
|
-
exports.
|
|
503
|
-
exports.
|
|
504
|
-
exports.
|
|
505
|
-
exports.
|
|
506
|
-
exports.
|
|
507
|
-
exports.
|
|
508
|
-
exports.
|
|
509
|
-
exports.
|
|
510
|
-
exports.isJsonSchemaRecord = app.isJsonSchemaRecord;
|
|
511
|
-
exports.isJsonSchemaScalarType = app.isJsonSchemaScalarType;
|
|
512
|
-
exports.isProcedureDef = app.isProcedureDef;
|
|
513
|
-
exports.isServiceDef = app.isServiceDef;
|
|
514
|
-
exports.normalizeWhitespace = app.normalizeWhitespace;
|
|
515
|
-
exports.removeDisallowedChars = app.removeDisallowedChars;
|
|
516
|
-
exports.setNestedObjectProperty = app.setNestedObjectProperty;
|
|
517
|
-
exports.unflattenObject = app.unflattenObject;
|
|
518
|
-
exports.unflattenProcedures = app.unflattenProcedures;
|
|
498
|
+
exports.isApplicationDef = utils.isApplicationDef;
|
|
499
|
+
exports.isProcedureDef = utils.isProcedureDef;
|
|
500
|
+
exports.isServiceDef = utils.isServiceDef;
|
|
501
|
+
exports.normalizeWhitespace = utils.normalizeWhitespace;
|
|
502
|
+
exports.removeDisallowedChars = utils.removeDisallowedChars;
|
|
503
|
+
exports.setNestedObjectProperty = utils.setNestedObjectProperty;
|
|
504
|
+
exports.unflattenObject = utils.unflattenObject;
|
|
505
|
+
exports.unflattenProcedures = utils.unflattenProcedures;
|
|
519
506
|
exports.classListTransformer = dart.classListTransformer;
|
|
520
507
|
exports.classTransformer = dart.classTransformer;
|
|
521
508
|
exports.createDartClient = dart.createDartClient;
|
package/dist/codegen.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { C as ClientGeneratorPlugin, A as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.4536bc49.cjs';
|
|
2
|
+
export { a as ClientGenerator, d as defineClientGeneratorPlugin, c as isApplicationDef, i as isProcedureDef, b as isServiceDef, n as normalizeWhitespace, r as removeDisallowedChars, s as setNestedObjectProperty, u as unflattenObject, e as unflattenProcedures } from './shared/arri.4536bc49.cjs';
|
|
3
3
|
import '@sinclair/typebox';
|
|
4
|
-
import 'h3';
|
|
5
4
|
|
|
6
5
|
interface TypescriptClientGeneratorOptions {
|
|
7
6
|
clientName: string;
|
|
@@ -69,4 +68,4 @@ declare function createKotlinServiceFromDefinition(clientName: string, serviceNa
|
|
|
69
68
|
declare function createKotlinRpcFromDefinition(clientName: string, name: string, def: ProcedureDef): string;
|
|
70
69
|
declare function createKotlinModelFromDefinition(name: string, def: JsonSchemaObject): string;
|
|
71
70
|
|
|
72
|
-
export { ApplicationDef, ClientGeneratorPlugin, type DartBaseType, type DartClientGeneratorOptions, type DartType, type DartTypeWithNullables,
|
|
71
|
+
export { ApplicationDef, ClientGeneratorPlugin, type DartBaseType, type DartClientGeneratorOptions, type DartType, type DartTypeWithNullables, ProcedureDef, ServiceDef, classListTransformer, classTransformer, createDartClient, createKotlinClient, createKotlinModelFromDefinition, createKotlinRpcFromDefinition, createKotlinServiceFromDefinition, createTypescriptClient, dartClientGenerator, dartModelFromJsonSchema, dartParsedJsonField, dartProcedureFromServiceDefinition, dartPropertyTypeFromSchema, dartServiceFromServiceDefinition, isDartType, isDartTypeWithNullables, kotlinClientGenerator, transformers, tsModelFromDefinition, tsRpcFromProcedureDefinition, tsServiceFromServiceDefinition, typescriptClientGenerator };
|
package/dist/codegen.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { C as ClientGeneratorPlugin, A as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.4536bc49.mjs';
|
|
2
|
+
export { a as ClientGenerator, d as defineClientGeneratorPlugin, c as isApplicationDef, i as isProcedureDef, b as isServiceDef, n as normalizeWhitespace, r as removeDisallowedChars, s as setNestedObjectProperty, u as unflattenObject, e as unflattenProcedures } from './shared/arri.4536bc49.mjs';
|
|
3
3
|
import '@sinclair/typebox';
|
|
4
|
-
import 'h3';
|
|
5
4
|
|
|
6
5
|
interface TypescriptClientGeneratorOptions {
|
|
7
6
|
clientName: string;
|
|
@@ -69,4 +68,4 @@ declare function createKotlinServiceFromDefinition(clientName: string, serviceNa
|
|
|
69
68
|
declare function createKotlinRpcFromDefinition(clientName: string, name: string, def: ProcedureDef): string;
|
|
70
69
|
declare function createKotlinModelFromDefinition(name: string, def: JsonSchemaObject): string;
|
|
71
70
|
|
|
72
|
-
export { ApplicationDef, ClientGeneratorPlugin, type DartBaseType, type DartClientGeneratorOptions, type DartType, type DartTypeWithNullables,
|
|
71
|
+
export { ApplicationDef, ClientGeneratorPlugin, type DartBaseType, type DartClientGeneratorOptions, type DartType, type DartTypeWithNullables, ProcedureDef, ServiceDef, classListTransformer, classTransformer, createDartClient, createKotlinClient, createKotlinModelFromDefinition, createKotlinRpcFromDefinition, createKotlinServiceFromDefinition, createTypescriptClient, dartClientGenerator, dartModelFromJsonSchema, dartParsedJsonField, dartProcedureFromServiceDefinition, dartPropertyTypeFromSchema, dartServiceFromServiceDefinition, isDartType, isDartTypeWithNullables, kotlinClientGenerator, transformers, tsModelFromDefinition, tsRpcFromProcedureDefinition, tsServiceFromServiceDefinition, typescriptClientGenerator };
|
package/dist/codegen.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { C as ClientGeneratorPlugin, A as ApplicationDef, S as ServiceDef, P as ProcedureDef, J as JsonSchemaObject } from './shared/arri.4536bc49.js';
|
|
2
|
+
export { a as ClientGenerator, d as defineClientGeneratorPlugin, c as isApplicationDef, i as isProcedureDef, b as isServiceDef, n as normalizeWhitespace, r as removeDisallowedChars, s as setNestedObjectProperty, u as unflattenObject, e as unflattenProcedures } from './shared/arri.4536bc49.js';
|
|
3
3
|
import '@sinclair/typebox';
|
|
4
|
-
import 'h3';
|
|
5
4
|
|
|
6
5
|
interface TypescriptClientGeneratorOptions {
|
|
7
6
|
clientName: string;
|
|
@@ -69,4 +68,4 @@ declare function createKotlinServiceFromDefinition(clientName: string, serviceNa
|
|
|
69
68
|
declare function createKotlinRpcFromDefinition(clientName: string, name: string, def: ProcedureDef): string;
|
|
70
69
|
declare function createKotlinModelFromDefinition(name: string, def: JsonSchemaObject): string;
|
|
71
70
|
|
|
72
|
-
export { ApplicationDef, ClientGeneratorPlugin, type DartBaseType, type DartClientGeneratorOptions, type DartType, type DartTypeWithNullables,
|
|
71
|
+
export { ApplicationDef, ClientGeneratorPlugin, type DartBaseType, type DartClientGeneratorOptions, type DartType, type DartTypeWithNullables, ProcedureDef, ServiceDef, classListTransformer, classTransformer, createDartClient, createKotlinClient, createKotlinModelFromDefinition, createKotlinRpcFromDefinition, createKotlinServiceFromDefinition, createTypescriptClient, dartClientGenerator, dartModelFromJsonSchema, dartParsedJsonField, dartProcedureFromServiceDefinition, dartPropertyTypeFromSchema, dartServiceFromServiceDefinition, isDartType, isDartTypeWithNullables, kotlinClientGenerator, transformers, tsModelFromDefinition, tsRpcFromProcedureDefinition, tsServiceFromServiceDefinition, typescriptClientGenerator };
|
package/dist/codegen.mjs
CHANGED
|
@@ -1,13 +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
|
|
4
|
-
export {
|
|
5
|
-
import { d as defineClientGeneratorPlugin } from './shared/arri.
|
|
6
|
-
export {
|
|
7
|
-
import '@sinclair/typebox';
|
|
8
|
-
import 'h3';
|
|
9
|
-
import '@sinclair/typebox/errors';
|
|
10
|
-
import '@sinclair/typebox/value';
|
|
3
|
+
import { u as unflattenObject, i as isServiceDef, p as pascalCase, a as isProcedureDef, b as unflattenProcedures, c as camelCase } from './shared/arri.ebf86912.mjs';
|
|
4
|
+
export { d as isApplicationDef, n as normalizeWhitespace, r as removeDisallowedChars, s as setNestedObjectProperty } from './shared/arri.ebf86912.mjs';
|
|
5
|
+
import { d as defineClientGeneratorPlugin, i as isJsonSchemaScalarType, a as isJsonSchemaNullType, b as isJsonSchemaObject, c as isJsonSchemaRecord, e as isJsonSchemaEnum, f as isJsonSchemaArray } from './shared/arri.3b1c1533.mjs';
|
|
6
|
+
export { p as classListTransformer, o as classTransformer, h as createDartClient, g as dartClientGenerator, l as dartModelFromJsonSchema, n as dartParsedJsonField, k as dartProcedureFromServiceDefinition, m as dartPropertyTypeFromSchema, j as dartServiceFromServiceDefinition, q as isDartType, r as isDartTypeWithNullables, t as transformers } from './shared/arri.3b1c1533.mjs';
|
|
11
7
|
import 'child_process';
|
|
12
8
|
|
|
13
9
|
let generatedModels = [];
|
|
@@ -499,4 +495,4 @@ const handleRequestFnString = `private suspend fun handleRequest(
|
|
|
499
495
|
}
|
|
500
496
|
}`;
|
|
501
497
|
|
|
502
|
-
export { createKotlinClient, createKotlinModelFromDefinition, createKotlinRpcFromDefinition, createKotlinServiceFromDefinition, createTypescriptClient, defineClientGeneratorPlugin,
|
|
498
|
+
export { createKotlinClient, createKotlinModelFromDefinition, createKotlinRpcFromDefinition, createKotlinServiceFromDefinition, createTypescriptClient, defineClientGeneratorPlugin, isProcedureDef, isServiceDef, kotlinClientGenerator, tsModelFromDefinition, tsRpcFromProcedureDefinition, tsServiceFromServiceDefinition, typescriptClientGenerator, unflattenObject, unflattenProcedures };
|