@arrirpc/codegen-dart 0.76.4 → 0.77.0
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 +3 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
@@ -22,10 +22,11 @@ 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
|
| format | Run `dart format` on the generated file (Defaults to `true`) |
|
28
|
-
|
|
28
|
+
| typePrefix | Add a prefix to the generated class names |
|
29
|
+
| rootService | The root service of the generated client |
|
29
30
|
|
30
31
|
### 2) Install the Dart client library
|
31
32
|
|
package/dist/index.cjs
CHANGED
@@ -1112,7 +1112,7 @@ function createDartClient(def, options) {
|
|
1112
1112
|
generatedTypes: [],
|
1113
1113
|
clientVersion: def.info?.version ?? ""
|
1114
1114
|
};
|
1115
|
-
const services = codegenUtils.unflattenProcedures(def.procedures);
|
1115
|
+
const services = codegenUtils.unflattenProcedures(def.procedures, options.rootService);
|
1116
1116
|
const subServices = [];
|
1117
1117
|
const subServiceParts = [];
|
1118
1118
|
const rpcParts = [];
|
package/dist/index.d.cts
CHANGED
@@ -31,9 +31,11 @@ interface DartClientGeneratorOptions {
|
|
31
31
|
*/
|
32
32
|
typePrefix?: string;
|
33
33
|
format?: boolean;
|
34
|
+
rootService?: string;
|
34
35
|
}
|
35
36
|
declare const dartClientGenerator: _arrirpc_codegen_utils.GeneratorPlugin<DartClientGeneratorOptions>;
|
36
37
|
declare function createDartClient(def: AppDefinition, options: DartClientGeneratorOptions): string;
|
37
38
|
declare function dartTypeFromSchema(schema: Schema, context: CodegenContext): DartProperty;
|
38
39
|
|
39
|
-
export {
|
40
|
+
export { createDartClient, dartClientGenerator, dartTypeFromSchema };
|
41
|
+
export type { DartClientGeneratorOptions };
|
package/dist/index.d.mts
CHANGED
@@ -31,9 +31,11 @@ interface DartClientGeneratorOptions {
|
|
31
31
|
*/
|
32
32
|
typePrefix?: string;
|
33
33
|
format?: boolean;
|
34
|
+
rootService?: string;
|
34
35
|
}
|
35
36
|
declare const dartClientGenerator: _arrirpc_codegen_utils.GeneratorPlugin<DartClientGeneratorOptions>;
|
36
37
|
declare function createDartClient(def: AppDefinition, options: DartClientGeneratorOptions): string;
|
37
38
|
declare function dartTypeFromSchema(schema: Schema, context: CodegenContext): DartProperty;
|
38
39
|
|
39
|
-
export {
|
40
|
+
export { createDartClient, dartClientGenerator, dartTypeFromSchema };
|
41
|
+
export type { DartClientGeneratorOptions };
|
package/dist/index.d.ts
CHANGED
@@ -31,9 +31,11 @@ interface DartClientGeneratorOptions {
|
|
31
31
|
*/
|
32
32
|
typePrefix?: string;
|
33
33
|
format?: boolean;
|
34
|
+
rootService?: string;
|
34
35
|
}
|
35
36
|
declare const dartClientGenerator: _arrirpc_codegen_utils.GeneratorPlugin<DartClientGeneratorOptions>;
|
36
37
|
declare function createDartClient(def: AppDefinition, options: DartClientGeneratorOptions): string;
|
37
38
|
declare function dartTypeFromSchema(schema: Schema, context: CodegenContext): DartProperty;
|
38
39
|
|
39
|
-
export {
|
40
|
+
export { createDartClient, dartClientGenerator, dartTypeFromSchema };
|
41
|
+
export type { DartClientGeneratorOptions };
|
package/dist/index.mjs
CHANGED
@@ -1105,7 +1105,7 @@ function createDartClient(def, options) {
|
|
1105
1105
|
generatedTypes: [],
|
1106
1106
|
clientVersion: def.info?.version ?? ""
|
1107
1107
|
};
|
1108
|
-
const services = unflattenProcedures(def.procedures);
|
1108
|
+
const services = unflattenProcedures(def.procedures, options.rootService);
|
1109
1109
|
const subServices = [];
|
1110
1110
|
const subServiceParts = [];
|
1111
1111
|
const rpcParts = [];
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@arrirpc/codegen-dart",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.77.0",
|
4
4
|
"type": "module",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": {
|
@@ -23,6 +23,6 @@
|
|
23
23
|
],
|
24
24
|
"dependencies": {
|
25
25
|
"pathe": "^2.0.3",
|
26
|
-
"@arrirpc/codegen-utils": "0.
|
26
|
+
"@arrirpc/codegen-utils": "0.77.0"
|
27
27
|
}
|
28
28
|
}
|