@arrirpc/codegen-kotlin 0.76.4 → 0.77.1

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/README.md CHANGED
@@ -22,9 +22,10 @@ export default defineConfig({
22
22
 
23
23
  | Name | Description |
24
24
  | --------------------- | ------------------------------------------------------------- |
25
- | clientName | The name of the generated client class (Defaults to "Client") |
26
25
  | outputFile (required) | Path to the file that will be created by the generator |
26
+ | clientName | The name of the generated client class (Defaults to "Client") |
27
27
  | typePrefix | Add a prefix to the generated class names |
28
+ | rootService | The root service of the generated client |
28
29
 
29
30
  ### 2) Install dependencies
30
31
 
package/dist/index.cjs CHANGED
@@ -1354,7 +1354,7 @@ function kotlinClientFromAppDefinition(def, options) {
1354
1354
  }
1355
1355
  const procedureParts = [];
1356
1356
  const subServiceParts = [];
1357
- const services = codegenUtils.unflattenProcedures(def.procedures);
1357
+ const services = codegenUtils.unflattenProcedures(def.procedures, options.rootService);
1358
1358
  for (const key of Object.keys(services)) {
1359
1359
  const subSchema = services[key];
1360
1360
  if (codegenUtils.isServiceDefinition(subSchema)) {
package/dist/index.d.cts CHANGED
@@ -33,9 +33,11 @@ interface KotlinClientOptions {
33
33
  clientName?: string;
34
34
  typePrefix?: string;
35
35
  outputFile: string;
36
+ rootService?: string;
36
37
  }
37
38
  declare const kotlinClientGenerator: _arrirpc_codegen_utils.GeneratorPlugin<KotlinClientOptions>;
38
39
  declare function kotlinClientFromAppDefinition(def: AppDefinition, options: KotlinClientOptions): string;
39
40
  declare function kotlinTypeFromSchema(schema: Schema, context: CodegenContext): KotlinProperty;
40
41
 
41
- export { type KotlinClientOptions, type ServiceContext, kotlinClientFromAppDefinition, kotlinClientGenerator, kotlinTypeFromSchema };
42
+ export { kotlinClientFromAppDefinition, kotlinClientGenerator, kotlinTypeFromSchema };
43
+ export type { KotlinClientOptions, ServiceContext };
package/dist/index.d.mts CHANGED
@@ -33,9 +33,11 @@ interface KotlinClientOptions {
33
33
  clientName?: string;
34
34
  typePrefix?: string;
35
35
  outputFile: string;
36
+ rootService?: string;
36
37
  }
37
38
  declare const kotlinClientGenerator: _arrirpc_codegen_utils.GeneratorPlugin<KotlinClientOptions>;
38
39
  declare function kotlinClientFromAppDefinition(def: AppDefinition, options: KotlinClientOptions): string;
39
40
  declare function kotlinTypeFromSchema(schema: Schema, context: CodegenContext): KotlinProperty;
40
41
 
41
- export { type KotlinClientOptions, type ServiceContext, kotlinClientFromAppDefinition, kotlinClientGenerator, kotlinTypeFromSchema };
42
+ export { kotlinClientFromAppDefinition, kotlinClientGenerator, kotlinTypeFromSchema };
43
+ export type { KotlinClientOptions, ServiceContext };
package/dist/index.d.ts CHANGED
@@ -33,9 +33,11 @@ interface KotlinClientOptions {
33
33
  clientName?: string;
34
34
  typePrefix?: string;
35
35
  outputFile: string;
36
+ rootService?: string;
36
37
  }
37
38
  declare const kotlinClientGenerator: _arrirpc_codegen_utils.GeneratorPlugin<KotlinClientOptions>;
38
39
  declare function kotlinClientFromAppDefinition(def: AppDefinition, options: KotlinClientOptions): string;
39
40
  declare function kotlinTypeFromSchema(schema: Schema, context: CodegenContext): KotlinProperty;
40
41
 
41
- export { type KotlinClientOptions, type ServiceContext, kotlinClientFromAppDefinition, kotlinClientGenerator, kotlinTypeFromSchema };
42
+ export { kotlinClientFromAppDefinition, kotlinClientGenerator, kotlinTypeFromSchema };
43
+ export type { KotlinClientOptions, ServiceContext };
package/dist/index.mjs CHANGED
@@ -1348,7 +1348,7 @@ function kotlinClientFromAppDefinition(def, options) {
1348
1348
  }
1349
1349
  const procedureParts = [];
1350
1350
  const subServiceParts = [];
1351
- const services = unflattenProcedures(def.procedures);
1351
+ const services = unflattenProcedures(def.procedures, options.rootService);
1352
1352
  for (const key of Object.keys(services)) {
1353
1353
  const subSchema = services[key];
1354
1354
  if (isServiceDefinition(subSchema)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrirpc/codegen-kotlin",
3
- "version": "0.76.4",
3
+ "version": "0.77.1",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -22,6 +22,6 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@arrirpc/codegen-utils": "0.76.4"
25
+ "@arrirpc/codegen-utils": "0.77.1"
26
26
  }
27
27
  }